ComfyUI Extension: ComfyUI AF - Pack-Prompt-Nodes
A lightweight suite of ComfyUI custom nodes for AI prompt management and history tracking.
Custom Nodes (0)
README
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
AF - Show Text - SImple node that displays the connected text
š Installation
Via ComfyUI Manager (Recommended)
- Open ComfyUI Manager
- Search for "AF - Pack Prompt Nodes"
- 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
Key Feature: Click "Copy Generated Prompt for Editing" to move prompt from upper to lower field for modifications.
<img width="1890" height="919" alt="AF - Edit Generated Prompt" src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Edit_Generated_Prompt_Node.png" />Typical Usage
[Ollama/LLM Node] ā [AF - Edit Generated Prompt] ā [CLIP Text Encode]
<img width="2095" height="521" alt="AF - Edit Generated Prompt - Workflow Download" src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Edit_Generated_Prompt_Workflow_Example.png" />
Download example workflow (right click -> save as...)
Short Video
https://github.com/user-attachments/assets/f16e0324-ddad-41fd-92a9-860cac2d02e3
Watch the Video on Youtube in higher Resolution
Video of "AF - Edit Generated Prompt" in a workflow
<a href="https://youtu.be/H0ZfDIShJLQ"> <img src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Edit-Generated-Prompt_Workflow_SmallThumb.jpg" width="100%" alt="Click to watch"> </a>AF - Save Prompt History
Purpose: Save up to 4 prompts per entry with automatic timestamps.
<img width="1877" height="609" alt="AF - Save Prompt History" src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Save_Prompt_History_Node.png" />Inputs
directory- Folder name (default: "Prompt-History")filename- JSON file name (default: "default")project- Project identifier (stored as metadata in JSON for reference)global_positive/negative- Main prompts (optional)local_positive/negative- Secondary prompts (optional)
Download example workflow (right click -> save as...)
Where Files Are Saved
- Primary:
ComfyUI/output/{directory}/(user working files) - 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). The project field is stored for your reference but not used for filtering.
š Common Workflow Patterns
AI-Assisted with History Backup with the "AF - Save Prompt History" Node
[LLM] ā [Edit Prompt] ⬠ā [CLIP Encode] ā [KSampler]
ā ā [Save History]
AF - Load Prompt History
Purpose: Load saved prompts using index-based time-travel through your history.
<img width="1095" height="945" alt="AF - Load Prompt History" src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Load_Prompt_History_Node.png" />Quick Reference
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AF - Load Prompt History ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā directory: [AF-PromptHistory ] ā
ā filename: [MyProject ā¼] ā
ā timestamp_index: [0 ] ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Outputs: ā
ā ⢠global_positive ā
ā ⢠global_negative ā
ā ⢠local_positive ā
ā ⢠local_negative ā
ā ⢠info (connect to Show Text!) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
How It Works
- Filename dropdown - Lists all
.jsonfiles in the directory (without .json extension) - Index selection - Choose which timestamp to load (0 = newest)
- Info output - Shows selected prompt content and metadata
Download example workflow (right click -> save as...)
Index System
0= Most recent prompt1= Second most recent2= 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 filename and timestamp
- Full content of all 4 prompts being loaded
- Total available timestamps count
- Error messages if index is out of range
Example Info Display
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
AF - LOAD PROMPT HISTORY
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š Filename: MyProject
š Available Timestamps: 205
š¢ SELECTED: [126] | 2025-10-29 | 14:32:15
Global Positive:
A serene mountain landscape at sunset, golden hour lighting...
Global Negative:
ugly, deformed, low quality, blurry
Local Positive:
detailed foreground rocks, wildflowers
Local Negative:
(empty)
Console Output:
AF Load - ā Successfully loaded: ID: 126 | 2025-10-29 14:32:15
š Common Workflow Patterns (suggestions)
"AF - Load Prompt History" Node, 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-File Workflow
[Load: FileA.json] ā [Edit Global+] ā ā
[Load: FileB.json] ā [Edit Local+] ā āā [CLIP Encode]
[Load: FileC.json] ā [Edit Global-] ā ā
AF - Show Text
A very simple node that shows the text connected to the input of the Node
<img width="1052" height="550" alt="AF - Show Text" src="https://github.com/alFrame/ComfyUI-AF-Pack-Prompt-Nodes/blob/main/Docs/screenshots/AF-Show_Text_Node.png" />š§ Troubleshooting
Files not appearing in dropdown
- Check ComfyUI console for cache messages
- Verify
.jsonfiles exist inoutput/{directory}/ - Restart ComfyUI to rebuild cache
- Ensure files end with
.jsonextension
Index out of range
- Connect
infooutput to Show Text to see available count - Example: 205 timestamps = valid indices are 0-204
- The info display shows total count at the top
Prompts not loading
- Ensure filename 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 e.g.:
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 shows everything - See exactly what you loaded
- Console logging - Check ID and timestamp confirmation
- Multiple load nodes - Each can access different files/indices
- Workflows persist - Your selections save with the workflow
- Project field - Use it as a mental note when saving, great for manual inspection
š Requirements
- ComfyUI (recent version recommended)
- No external dependencies required
- Works with any LLM/text generation nodes, or your manual prompting text 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!
š Additional Resources
- Changelog - Version history and updates
- GitHub Issues - Report bugs & request features
- License - MIT License details
Made with ā¤ļø by Alex Furer & Qwen3, Claude AI, DeepSeek