ComfyUI Extension: Dynamic Prompt List Node for ComfyUI
A custom node for ComfyUI that allows you to create lists of prompts with dynamic input count. Add or remove prompt inputs on the fly without creating multiple nodes.
Custom Nodes (0)
README
Dynamic Prompt List Node for ComfyUI
A custom node for ComfyUI that allows you to create lists of prompts with dynamic input count. Add or remove prompt inputs on the fly without creating multiple nodes.
Features
⨠Dynamic Inputs - Adjust the number of prompt inputs from 2 to 50 š Easy Updates - Click "Update inputs" button to add/remove fields š Clean Interface - Multiline text support for each prompt šÆ List Output - Returns a proper list structure for use with other nodes
Installation
Method 1: Clone to ComfyUI custom_nodes
cd ComfyUI/custom_nodes
git clone <your-repo-url> serhii-prompt-list
Method 2: Manual Installation
- Download this repository
- Extract to
ComfyUI/custom_nodes/serhii-prompt-list - Restart ComfyUI
Usage
Basic Workflow
- Add Node: Search for "Dynamic Prompt List" in ComfyUI node menu
- Set Input Count: Adjust the
inputcountparameter (default: 5) - Update Inputs: Click the "Update inputs" button
- Fill Prompts: Enter your prompts in the multiline text fields
- Connect: Connect the output to any node that accepts lists
Node Parameters
- inputcount (INT): Number of prompt inputs (2-50, default: 5)
- prompt_1 to prompt_N (STRING): Multiline text inputs for prompts
Example
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Dynamic Prompt List ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā inputcount: 6 ā
ā [Update inputs] ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā prompt_1: "A sunny beach" ā
ā prompt_2: "Mountain sunset" ā
ā prompt_3: "City at night" ā
ā prompt_4: "Forest path" ā
ā prompt_5: "Desert landscape"ā
ā prompt_6: "Ocean waves" ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
prompt_list (LIST)
File Structure
serhii-prompt-list/
āāā __init__.py # Node registration
āāā prompt_list_node.py # Main node logic
āāā README.md # This file
āāā web/
āāā js/
āāā dynamic_inputs.js # Dynamic input UI logic
How It Works
Python Backend (prompt_list_node.py)
- Defines the node class with dynamic
**kwargssupport - Processes inputs dynamically based on
inputcount - Returns a list of non-empty prompts
JavaScript Frontend (dynamic_inputs.js)
- Adds "Update inputs" button to the node
- Dynamically creates/removes input slots in the UI
- Handles input counting and name management
Troubleshooting
Node doesn't appear in menu
- Restart ComfyUI completely
- Check console for error messages
- Verify files are in the correct directory structure
"Update inputs" button doesn't work
- Make sure JavaScript file is in
web/js/folder - Clear browser cache and refresh ComfyUI
- Check browser console for JavaScript errors
Inputs not connecting
- Ensure you clicked "Update inputs" after changing count
- Verify the input type matches (STRING)
Technical Details
Category: Serhii/Prompts Return Type: STRING (list) Input Range: 2-50 prompts Compatible With: Any node accepting list inputs
Credits
Based on the dynamic input pattern from:
- KJNodes by @kijai - JoinStringMulti implementation
- Comfyroll Custom Nodes - CR Simple Prompt List concept
License
MIT License - Feel free to use, modify, and distribute
Support
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check ComfyUI community forums
Made with ā¤ļø for the ComfyUI community