ComfyUI-PromptUtilities
Nodes: Format String, Join String List, Load Preset, Load Preset (Advanced), Const String, Const String (multi line). Add useful nodes related to prompt.
Nodes (13)
One line in, the same line out
A plain textarea that outputs its own text
Template your prompt with [1], [2] placeholders
Comma-glue for prompt pieces scattered across your graph
A picklist of canned prompt fragments
Presets that carry a LoRA, not just text
Build (tag:1.2) syntax without fat-fingering parentheses
Roll the dice on a whole preset file instead of picking
Random prompt and random LoRA in one pull
Swap one tag out of a bigger prompt string
Tidy up ugly (tag:1.23456789) numbers
Pull a random handful of tags from a list, no repeats
Random tags, each with its own random emphasis
ComfyUI-PromptUtilities

日本語版READMEはこちら。
- Custom node for ComfyUI.
- Add useful nodes related to prompt.
Installation
cd <ComfyUI directory>/custom_nodes
git clone https://github.com/nkchocoai/ComfyUI-PromptUtilities.git
Nodes
Join String List (Experimental)
- Outputs string which are the input
argNstrings concatenated withseparator. - There may be some bugs as we have not been able to check the operation very well.

Format String (Experimental)
- Output string containing the input
argNembedded in aprompt. - In the
prompt,[N]is replaced by the value ofargN. - There may be some bugs as we have not been able to check the operation very well.

Load Preset
- Outputs the prompt for the selected preset.
- The presets are listed in a CSV file located in the presets directory.
- Easy Prompt Selector yml file is also partially supported.

Load Preset (Advanced)
- Outputs the following values for the selected preset.
- Positive prompt
- Negative prompt
- LoRA and its intensity
- LoRA Stack (for Efficiency Nodes)
- The presets are listed in a JSON file located in the advanced_presets directory.

Random Preset / Random Preset (Advanced) (Experimental)
- Outputs preset values randomly selected from within the selected file.
- There may be some bugs as we have not been able to check the operation very well.
Const String
- Outputs the input string.
Const String(multi line)
- Outputs the input string.
- You can input the string in multiple lines.
Prompt Weight
- Outputs a weighted string for each
prompt.
Round Prompt Weight
- Round
promptweights.
Replace or Insert Tag
- Replace (
mode=replace) or append (mode=insert) thevalueto the tag matching thepattern.
Sample Tags
- Sample
min_k~max_krandom values (no duplicates) from a list oftagsdelimited bytags_delimiter. ! [Example Sample Tags](img/ex_sample_tags.png “Example Sample Tags”)
Sample Tags With Weight
- Sample
min_k~max_krandom values (no duplicates) from a list oftagsdelimited bytags_delimiter. - Each tag sampled is given a random weight of
min_w~max_w(step:step_w).
Misc
- Renaming config.ini.example to
config.iniwill output Wildcard format text files from the presets placed in the presets directory to the directory specified byoutput_csv_presets_as_wildcards.
Recommended extensions
- ComfyUI-Custom-Scripts
- Preset Text : Load a preset of text like the "Load Preset" node. And save the preset on ComfyUI.
- Show Text : Displays input string.
- String Function : Append or replace strings.
- ComfyUI-Impact-Pack
- Wildcard : Choose random prompt from text files.
- UE Nodes
- Anything Everywhere : Outputs the input value to unconnected inputs of other nodes. Used in img/ex_preset_adv_01.png.