Alex Furer 6ca55080da Revise README for AF - Pack Prompt Nodes
Updated README to improve clarity and organization of content related to AF - Pack Prompt Nodes.
2025-10-29 13:44:25 +01:00
2025-10-14 19:34:17 +02:00
2025-10-23 15:32:22 +02:00
2025-10-12 22:54:53 +02:00
2025-10-12 22:49:34 +02:00
2025-10-23 16:27:08 +02:00

AF - Pack Prompt Nodes

A lightweight suite of ComfyUI custom nodes for AI prompt management and history tracking.

📦 What's Included

AF - Edit Generated Prompt - Receive LLM-generated prompts and optionally edit them manually
AF - Save Prompt History - Archive prompts to JSON files with timestamps
AF - Load Prompt History - Browse and load previous prompts by index


🚀 Installation

  1. Open ComfyUI Manager
  2. Search for "AF - Pack Prompt Nodes"
  3. Install

Manual Installation

cd ComfyUI/custom_nodes/
git clone https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes.git

AF - Edit Generated Prompt

Purpose: Pipe LLM output through your workflow with optional manual editing.

How It Works

  • Upper field (read-only, grayed): Displays incoming prompt from LLM
  • Lower field (editable): Manual input or edited version
  • Output priority: Lower field → Upper field → Empty string

Typical Usage

[Ollama/LLM Node] → [AF - Edit Generated Prompt] → [CLIP Text Encode]

Key Feature: Click "Copy Generated Prompt for Editing" to move prompt from upper to lower field for modifications.


AF - Save Prompt History

Purpose: Save up to 4 prompts per entry with automatic timestamps.

Inputs

  • directory - Folder name (default: "Prompt-History")
  • filename - JSON file name (default: "default")
  • project - Project identifier stored in JSON
  • global_positive/negative - Main prompts (optional)
  • local_positive/negative - Secondary prompts (optional)

Where Files Are Saved

  1. Primary: ComfyUI/output/{directory}/ (user working files)
  2. Fallback: {node_pack_folder}/{directory}/ (bundled defaults)

Output Format

[
  {
    "timestamp": "2025-10-29 14:32:15",
    "project": "MyProject",
    "global_positive": "your prompt",
    "global_negative": "negative prompt",
    "local_positive": "local detail",
    "local_negative": "local negative"
  }
]

Note: All prompts are automatically cleaned (trailing whitespace removed, internal formatting preserved).


AF - Load Prompt History

Purpose: Load saved prompts using index-based time-travel through your history.

Quick Reference

┌─────────────────────────────────┐
│ AF - Load Prompt History        │
├─────────────────────────────────┤
│ directory: [AF-PromptHistory  ] │
│ project:   [MyProject        ▼] │
│ timestamp_index: [0           ] │
├─────────────────────────────────┤
│ Outputs:                        │
│ • global_positive               │
│ • global_negative               │
│ • local_positive                │
│ • local_negative                │
│ • info (connect to Show Text!)  │
└─────────────────────────────────┘

Index System

  • 0 = Most recent prompt
  • 1 = Second most recent
  • 2 = Third most recent
  • etc.

Directory Priority

Files in output/{directory}/ override files in {node_pack}/{directory}/ with the same name.

Critical: Connect the Info Output!

Always connect info → Show Text node to see:

  • Currently selected timestamp
  • Full list of available timestamps with indices
  • Valid range for your selection
  • Error messages if index is out of range

Example Info Display

══════════════════════════════════════════════════
  AF - LOAD PROMPT HISTORY
══════════════════════════════════════════════════

📂 Project: MyProject
📊 Available Timestamps: 4
🔢 Current Index: 0

⏰ SELECTED: 2025-10-29 | 14:32:15

──────────────────────────────────────────────────
Available Timestamps (newest first):
──────────────────────────────────────────────────
► [ 0] 2025-10-29 | 14:32:15
  [ 1] 2025-10-28 | 19:32:32
  [ 2] 2025-10-27 | 10:15:44
  [ 3] 2025-10-26 | 08:22:11
──────────────────────────────────────────────────

💡 TIP: Connect 'info' output to Show Text node
        to see this selection guide!

🔗 Common Workflow Patterns

Pattern 1: AI-Assisted with History Backup

[LLM] → [Edit Prompt] → [Save History] → [CLIP Encode] → [KSampler]

Pattern 2: Load & Compare Previous Prompts

[Load History: index=0] → [Edit] → [CLIP] ┐
[Load History: index=5] → [Edit] → [CLIP] ├→ [KSampler]
[Load History: index=10]→ [Edit] → [CLIP] ┘

Pattern 3: Multi-Project Workflow

[Load: ProjectA] → [Edit Global+] → ┐
[Load: ProjectB] → [Edit Local+]  → ├→ [CLIP Encode]
[Load: ProjectC] → [Edit Global-] → ┘

🔧 Troubleshooting

Projects not appearing in dropdown

  • Check ComfyUI console for cache messages
  • Verify .json files exist in output/{directory}/
  • Restart ComfyUI to rebuild cache

Index out of range

  • Connect info output to Show Text to see valid range
  • Example: 4 timestamps = indices 0-3 are valid

Prompts not loading

  • Ensure project is selected (not "none")
  • Check timestamp_index is within range (see info output)
  • Verify JSON file format matches example above
  • Look for error messages in console

Directory not found

  • Use relative path from ComfyUI root: AF-PromptHistory
  • Or absolute path: /full/path/to/directory
  • Check folder exists and has read/write permissions

💡 Pro Tips

  • Index 0 is your friend - Always points to newest prompt
  • Info output = your map - Always connect it during setup
  • Console logging - Detailed messages help debug issues
  • Multiple load nodes - Each can access different projects/indices
  • Workflows persist - Your selections save with the workflow

📋 Requirements

  • ComfyUI (recent version recommended)
  • No external dependencies required
  • Works with any LLM/text generation nodes

📄 License

MIT License - See LICENSE file for details


🐛 Issues & Contributions

Found a bug? Have a feature request?
→ GitHub Issues


⚠️ Disclaimer

This ComfyUI custom node is developed through AI-assisted coding. While carefully tested, it is provided "as is" without warranty.

By using this node pack:

  • You install and run at your own risk
  • The creator is not liable for damages or data loss
  • Compatibility with your setup is not guaranteed
  • Test in a safe environment before production use

Report issues on GitHub - we appreciate your feedback!


Made with 🔥 by Alex Furer & Claude AI

Simple. Clean. Works every time. ✨

S
Description
No description provided
Readme MIT
1.2 MiB
Languages
JavaScript 50.1%
Python 49.9%