ComfyUI Extension: ComfyUI Prompt Cycler Node
A ComfyUI custom node that cycles through an infinite number of prompts
Custom Nodes (0)
README
ComfyUI Prompt Cycler Node
A custom ComfyUI node that cycles through an infinite number of prompts, perfect for batch generation with varied content. Supports both built-in example prompts and custom user-defined prompts.
Features
- Infinite Prompt Support: Cycle through any number of custom prompts
- 10 Example Prompts: Pre-configured with diverse, high-quality prompts covering various themes
- Sequential Cycling: Automatically cycles through prompts in order
- Random Mode: Randomly selects prompts for more variety
- Custom Prompts: Option to provide your own prompts (unlimited number)
- Reset Functionality: Ability to reset the cycle counter
- Seed Control: Reproducible results with seed input
Installation
Method 1: Git Clone (Recommended)
cd ComfyUI/custom_nodes
git clone https://github.com/tenitsky/tenitsky-prompt-cycler-simple.git
cd tenitsky-prompt-cycler-simple
pip install -r requirements.txt
Method 2: Manual Installation
- Download this repository as a ZIP file
- Extract it to your ComfyUI
custom_nodesdirectory - Install dependencies:
pip install -r requirements.txt - Restart ComfyUI
Usage
Basic Usage
- Add the "Prompt Cycler" node to your workflow
- Connect the
promptoutput to your text input node - Each time you queue the workflow, it will use the next prompt in sequence
Parameters
- Seed: Random seed for reproducible results (0 = no seed)
- Cycle Mode:
sequential: Cycles through prompts in orderrandom: Randomly selects prompts
- Reset Cycle: Checkbox to reset the cycle counter to 0
- Custom Prompts (optional): Provide your own prompts, one per line. Supports unlimited number of prompts.
Example Prompts
The node comes with 10 pre-configured example prompts to get you started:
- "A majestic mountain landscape at sunset with golden light"
- "A futuristic city with flying cars and neon lights"
- "A peaceful forest with sunlight filtering through trees"
- "An underwater scene with colorful coral reefs and fish"
- "A cozy cabin in the woods during winter snowfall"
- "A space station orbiting a distant planet"
- "A bustling marketplace in an ancient city"
- "A serene lake with mountains reflected in the water"
- "A steampunk laboratory with brass gears and steam"
- "A magical garden with glowing flowers and butterflies"
Custom Prompts
To use your own prompts (supports unlimited number):
- Enable the
custom_promptsinput - Enter your prompts, one per line
- The node will cycle through your custom prompts instead of the example ones
- You can have as many prompts as you want - the node will cycle through them infinitely
Example Workflow
Prompt Cycler → Text Input → CLIP Text Encode → KSampler → VAE Decode → Save Image
Outputs
- prompt: The current prompt string
- cycle_index: The index of the current prompt (0-based, cycles through all available prompts)
Tips
- Use sequential mode for consistent batch generation
- Use random mode for more variety in your outputs
- Combine with batch processing nodes for efficient multi-prompt generation
- Use the reset cycle option when you want to start over from the first prompt
Troubleshooting
- Make sure PyTorch is installed correctly
- Check that the node appears in the "text/prompt" category
- If prompts aren't cycling, try using the reset cycle option
- For custom prompts, ensure each prompt is on a separate line
- You can use any number of prompts - the node will cycle through them infinitely
Author
Created by Anton Tenitsky in 2025.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
v1.0.0
- Initial release
- Support for infinite number of custom prompts
- 10 built-in example prompts
- Sequential and random cycling modes
- Reset functionality
- Seed control for reproducible results