ComfyUI Extension: ComfyUI-Prompt-Manager

Authored by FranckyB

Created

Updated

2 stars

A simple custom node for ComfyUI that allows you to save and reuse prompts, organized into different categories

Custom Nodes (0)

    README

    ComfyUI Prompt Manager

    A simple custom node for ComfyUI that allows you to organize, manage, and save prompts into different categories. Useful for managing your prompt library and capturing outputs from LLM nodes.

    <div align="center"> <img src="docs/prompt_manager.png" alt="Prompt Manager"> </div>

    Features

    • Category Organization: Create and manage multiple categories to organize your prompts (e.g., Character, Style, Environment, Lighting, Mood)
    • Save & Load Prompts: Quickly save and recall your favorite prompts with custom names
    • LLM Integration: Connect text outputs from other nodes (like LLM generators) and save them directly
    • Direct Editing: Edit prompts directly in the node or select from your saved library
    • Persistent Storage: All prompts are saved in your ComfyUI user folder and persist across sessions
    • Pre-loaded Templates: Comes with example prompts across various categories
    • Easy Management: Delete categories or individual prompts with confirmation dialogs

    Installation

    1. Navigate to your ComfyUI custom nodes directory:

      cd ComfyUI/custom_nodes/
      
    2. Clone this repository:

      git clone https://github.com/FranckyB/ComfyUI-Prompt-Manager.git
      
    3. Restart ComfyUI

    Usage

    Basic Usage

    1. Add the Node: Right-click in ComfyUI → Add Node → Prompt Manager → Prompt Manager

    2. Select a Category: Use the dropdown to choose from your categories (Character, Style, Environment, etc.)

    3. Choose a Prompt: Select a saved prompt from the dropdown

    4. Use the Output: Connect the output to any node that accepts text/string input

    Managing Prompts

    Saving a Prompt

    1. Type or paste your prompt into the text field (or have it connected from another node)
    2. Click the "Save Prompt" button
    3. Enter a name for your prompt
    4. Click OK

    Note: If a prompt with the same name exists in the current category, you'll be asked to confirm before overwriting.

    Creating a New Category

    1. Click the "New Category" button
    2. Enter a name for your category
    3. Click OK

    Deleting a Category

    1. Select the category you want to delete
    2. Click the "Del Category" button
    3. Confirm the deletion

    Deleting a Prompt

    1. Select the prompt you want to delete
    2. Click the "Del Prompt" button
    3. Confirm the deletion

    Working with LLM Outputs

    You can capture and save outputs from LLM nodes:

    1. Connect an LLM output (or any text output) to the "text" input of the Prompt Manager node
    2. Run your workflow - the generated text will appear in the prompt field
    3. Click "Save Prompt" to save the LLM-generated text to your library
    4. Give it a descriptive name for future use

    This is perfect for:

    • Saving interesting prompts generated by LLMs
    • Building a library of AI-generated variations
    • Quickly iterating and saving the best results

    File Structure

    comfyui-prompt-manager/
    ├── __init__.py              # Node registration
    ├── prompt_manager.py        # Main node logic and API endpoints
    ├── default_prompts.json     # Default prompt templates
    ├── js/
    │   └── prompt_manager.js    # Frontend UI and interactions
    └── README.md                # This file
    

    Data Storage

    Prompts are stored in:

    ComfyUI/user/default/prompt_manager.json
    

    The file is automatically created on first use, copying from default_prompts.json. You can:

    • Back up this file to save your prompt library
    • Share it with others
    • Edit it directly (with caution)

    Default Categories

    The node comes pre-loaded with example prompts in the following categories:

    • Character: Fantasy warriors, sci-fi explorers, medieval knights, etc.
    • Style: Cinematic, oil painting, watercolor, photorealistic, etc.
    • Environment: Forests, cyberpunk cities, space stations, ancient temples, etc.
    • Lighting: Golden hour, Rembrandt lighting, neon atmosphere, moonlight, etc.
    • Composition: Dynamic action, minimalist zen, panoramic vistas, etc.
    • Mood: Dark and ominous, peaceful, energetic, melancholic, etc.
    • Illustrious: Anime-style character prompts and scene descriptions

    Feel free to modify or delete these to suit your needs!

    Tips & Tricks

    Workflow Organization

    • Create categories that match your workflow (e.g., "Characters", "Backgrounds", "Styles")
    • Use descriptive names for your prompts to find them easily later
    • Regularly backup your prompt_manager.json file

    LLM Integration

    • Connect multiple Prompt Manager nodes to capture different LLM variations
    • Use one node to store "seeds" and another for "final results"
    • Combine with LLM nodes to build an iterative prompt refinement workflow

    Editing Prompts

    • You can edit prompts directly in the text field even when loaded from the library
    • Changes are not saved automatically - click "Save Prompt" to update
    • Use "Save Prompt" with the same name to overwrite an existing prompt

    Troubleshooting

    Problem: Prompts don't appear in the dropdown

    • Solution: Make sure the category has saved prompts. Try creating a new prompt first.

    Problem: Changes aren't saved

    • Solution: Click the "Save Prompt" button after making changes. Direct edits in the text field are temporary.

    Problem: Can't see LLM output in the node

    • Solution: Make sure the LLM output is connected to the "text" input and run the workflow.

    Problem: Node appears too small

    • Solution: Resize the node by dragging the bottom-right corner. The node will maintain its size in your workflow.

    Changelog

    Version 1.0.1

    • Initial release
    • Category management
    • Prompt save/load functionality
    • LLM output integration
    • Pre-loaded example prompts
    • ComfyUI-style UI dialogs