ComfyUI-PromptUtilities
★ 25
提示词工具 字符串处理 预设加载 ComfyUI
一组用于提示词处理的节点,提供字符串拼接、格式化、常量与预设加载,简化Prompt构建与复用。
💡 在管线中格式化与组合提示词,快速加载提示预设。
🍴 10 Forks 💻 Python 🔄 2025-03-30
https://pan.quark.cn/s/6862a2001521
📋 点击复制链接
📄 README
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 argN strings concatenated with separator.
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 argN embedded in a prompt.
In the prompt, [N] is replaced by the value of argN.
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 prompt weights.
Replace or Insert Tag
Replace (mode=replace) or append (mode=insert) the value to the tag matching the pattern.
Sample Tags
Sample min_k ~ max_k random values (no duplicates) from a list of tags delimited by tags_delimiter.
! [Example Sample Tags](img/ex_sample_tags.png “Example Sample Tags”)
Sample Tags With Weight
Sample min_k ~ max_k random values (no duplicates) from a list of tags delimited by tags_delimiter.
Each tag sampled is given a random weight of min_w ~ max_w (step:step_w).
Misc
Renaming config.ini.example to config.ini will output Wildcard format text files from the presets placed in the presets directory to the directory specified by output_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 .