ComfyUI Extension
comfyui-prompt-append
A custom node for ComfyUI that provides advanced, condition-based prompt appending allowing you to dynamically build prompts based on the presence or absence of specific…
COkedat/comfyui-prompt-append
Nodes1
On cloudLocal install
Categoryutils/prompt
Stars0
Updated4 months ago
Readme
ComfyUI Conditional Prompt Append
A custom node for ComfyUI that provides advanced, condition-based prompt appending. It allows you to dynamically build prompts based on the presence or absence of specific tags.
Features
- Conditional Appending (Core Feature): Choose exactly when to append your new prompts:
Always: Appends the prompt regardless of search results.If Detected: Appends only if the search prompt is found in the base prompt.If Not Detected: Appends only if the search prompt is missing from the base prompt.
- Additional Search Logic: Supports
AND/ORlogic when searching for multiple tags. - Weight Management: Automatically groups the appended tags and applies a single weight bracket around them (e.g.,
(tag1, tag2:1.2)). - Duplicate Prevention: Includes a
skip_duplicateoption to prevent adding tags that already exist in the base prompt. - Flexible Delimiters: Fully supports multiline text inputs and custom delimiters (e.g., parsing line breaks into commas automatically).
- Position Control: Choose to append new prompts to the
frontorbackof the base prompt.
Installation
- Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes/ - Clone this repository:
git clone https://github.com/COkedat/comfyui-prompt-append - Restart ComfyUI.
- You can find the node under the utils/prompt category, named Conditional Prompt Append.
How to Use
- base_prompt: Your main prompt text.
- search_prompt: The tags you want to search for within the
base_prompt. - search_logic: Determines whether to use
ANDorORlogic when searching for multiple tags. - append_prompt: Additional Prompt text you want to add conditionally.
- condition: Choose the exact condition for appending the new prompts (Always, If Detected, If Not Detected).
- input_delimiter: The delimiter used to split the input prompts (
base_prompt,search_prompt,append_prompt). - output_delimiter: The delimiter used to join the tags in the final output prompt.
- skip_duplicate: Prevents adding prompts from the
append_promptthat already exist in thebase_prompt. - position: Choose whether to add the new tags to the
frontorbackof the base prompt. - prompt (Output): The final resulting prompt text.
- is_detected (Output): Outputs a BOOLEAN (True/False) indicating whether the search tags were found, which can be routed to other logic nodes.