Add a button that formats the prompts in textfields
This is an Extension for ComfyUI, which helps formatting texts.
This adds a button to the menu, Format, which when clicked will:
1girl, solo, smile, 1girl
will become 1girl, solo, smile
a girl walking, a girl wearing dress
will not be changedBy default, this only processes the built-in CLIPTextEncode
node. You can add other custom nodes by adding an entry, promptFormat.settings, to the ~ComfyUI\user\default\comfy.settings.json
file.
Open a workflow
.json
to see the name for the nodes
The entries are in the format of "NodeType": ["property", dedupe?, [keep_keywords]]
"CLIPTextEncode"
)"widgets_values"
)true
/ false
)Automatic1111
, it would be ["BREAK", "AND"]
as those are built-in keywords){
"promptFormat.settings": {
"CLIPTextEncode": [
"widgets_values",
true,
[
"BREAK"
]
]
}
}