Nodes: Random Prompts, Combinatorial Prompts, I'm Feeling Lucky, Magic Prompt, Jinja2 Templates. ComfyUI-DynamicPrompts is a custom nodes library that integrates into your existing ComfyUI Library. It provides nodes that enable the use of Dynamic Prompts in your ComfyUI.
ComfyUI-DynamicPrompts is a custom nodes library that integrates into your existing ComfyUI Library. It provides nodes that enable the use of Dynamic Prompts in your ComfyUI. The nodes provided in this library are:
Nodes can be found in the Dynamic Prompts menu: <img src="images/menu.png"/>
Follow the steps below to install the ComfyUI-DynamicPrompts Library. These commands assume the your current working directory is the ComfyUI root directory.
git clone https://github.com/adieyal/comfyui-dynamicprompts custom_nodes/comfyui-dynamicprompts
python -m pip install -r custom_nodes/comfyui-dynamicprompts/requirements.txt
python custom_nodes/comfyui-dynamicprompts/install.py
mkdir custom_nodes/comfyui-dynamicprompts/wildcards
custom_nodes/comfyui-dynamicprompts/example_workflows
.The extension looks for wildcard files in custom_nodes/comfyui-dynamicprompts/wildcards
. It supports wildcard files in .txt
, .json
and .yaml
(example format).
There are many pre-built wildcards collections available. Here are a few to get you started:
All nodes in this library produce a String output that can typically be passed into Clip Text Encode Prompts. Both positive and negative nodes are supported.
Please note, since ComfyUI is inherently stateless, some nodes might have a slightly unexpected behavior:
The Combinatorial Prompt generation iterates through all possible values in a cycle. For example, A {red|green|blue}
ball will generate the following sequence:
The I'm Feeling Lucky, Magic Prompt, and Jinja2 nodes have an optional auto refresh parameter. If set to True
, a new prompt is generated for every iteration. However, if set to False
, a prompt will be downloaded once and used for subsequent generations.