| available_loras_stem | STRING | | Compatibility placeholder for older workflows. This field is kept only to preserve widget ordering. |
| seed | INT | 00–18446744073709550000 | Same seed + same prompt + same connected in1-in4 texts always returns the same output prompt. Changed input text re-rolls the picks even with a fixed seed. |
| line_suffix | STRING | | Appends this string to the end of every line. Useful to automate suffixing of tags and descriptive text with either commas or single dots. |
| single_line_output | BOOLEAN | true | This must be True for multi-line combinations to work. |
| remove_whitespaces | BOOLEAN | true | Trims every line and converts multiple spaces to single space, ex: ' ' -> ' '. Also removes empty lines. |
| remove_empty_tags | BOOLEAN | true | 'tags' here is anything between dots or commas. Fixes cases like this: 'cat,, , dog' -> 'cat, dog'. |
| load_loras_from_prompt | BOOLEAN | true | Compatibility placeholder for older workflows. LoRA loading is no longer handled by this node. |
| remove_loras_pattern | BOOLEAN | true | Compatibility placeholder for older workflows. When enabled, LoRA tags are stripped from the final prompt text. |
| wildcard_directory | STRING | /tmp/ComfyUI/custom_nodes/comfyui-ValiTools/wildcards | The directory where TXT wildcard files are stored. |
| promptopt | STRING | ### Instructions and Tips
## SYNTAX:
## COMBINATIONS
# They use '{' and '}' delimiters with '|' as separator.
# Distribution is even by default but you can specify custom choice distribution using 'N::' prefix where N is a number from 0 to 1.
# Examples:
A {red|blue} car. # 50% chance for both red and blue
A {green|} bird. # 50% chance for 'green' and 50% for empty string
{0.1::green|0.2::yellow|{pink|red}} background. # 10% chance for green, 20% for yellow and 70% for {pink|red}
{child|{jumping up|running} {cat|{large|small}dog}|boring human}. # nested posible with levels colored differently
## WILDCARDS
# These pull a random non-empty line from a TXT file directly stored in 'wildcard_directory'.
# They use double underscore delimiters and its content should be the filename without extension.
# Single '#' comments still go until the end of the line, but '#comment#' can now be used inline too.
# When 'wildcard_directory\filename.txt' does not exist -> the __filename__ string will remain in the prompt.
# Wildcards are highlighted as YELLOW when they point to a .txt file that exists - otherwise, RED.
# This highlight feature only supports up to 4 nested subfolders - wildcards pointing to deeper files will still work but show up as red.
# You can add comments and combinations within wildcards but try to not create infinite loops when doing so - the node has safety against that though.
__ThisIsAWildCard__ # pulls from 'wildcard_directory\ThisIsAWildCard.txt' but I don't have that file so this string will appear in the final prompt
__Folder1\Folder2\ThisIsAWildCard__ # sub-directory support - will pull from 'wildcard_directory\Folder1\Folder2\ThisIsAWildCard.txt'
## You can nest combinations and wildcards at will (ex: combination within wildcard within combination ...)
## VARIABLES
# Append '==<name>' right after a combination or wildcard to remember its resolved value.
# The assignment still outputs its value where it stands - it just also saves it for reuse.
# Reuse the value anywhere AFTER the assignment - even inside later combinations or wildcards - by writing <name>.
# Names may contain letters, digits and underscores and are case-insensitive. Reassigning a name overwrites its value.
# A <name> that is never assigned anywhere stays as-is in the output (and shows up RED in the editor).
# Plain text works too: 'fore-head==<part>' stores the single word (no spaces) right before '=='.
# That also works inside combination branches - only the SELECTED branch's assignment happens: her {face==<part>|fore-head==<part>|head==<part>}
# For a fixed MULTI-WORD text use a single-choice combination: {crime scene}==<loc>
# SILENT assignment: '==!<name>' stores the value but outputs NOTHING where it stands - only the <name> references output it.
# NODE INPUTS: text connected to the in1..in4 input sockets is available here as <in1>..<in4> - chain VSmartPrompt nodes by wiring one's output into another's socket.
# VARIABLE HAND-OVER: wire a node's 'variables' output into the next node's 'vars_in' input and every <name> it assigned works there too (and travels on down the chain).
# TIP: typing '<' opens a dropdown with all assigned variables - type to filter, UP/DOWN + ENTER/TAB or click to insert, ESC to close.
{blonde|ginger}==<haircolor> hair # picks one AND remembers the pick
her {light <haircolor>|dark <haircolor>} eyebrows match her <haircolor> hair
__names__==<girlname> enters. Say hi to <girlname>!
{sunny|rainy|foggy}==!<weather> # rolls + remembers, outputs nothing here
the <weather> morning turns into a <weather> afternoon
## SWITCHER (conditional blocks)
# Gate a combination or wildcard on a variable's value: glue '<name>==value::' DIRECTLY in front of it.
# Value matches (case-insensitive) -> it resolves normally. No match -> the whole thing outputs nothing.
# '<name>!=value::' is the NOT form: fires for every value EXCEPT the given one.
# Assign the tag BEFORE the switch. Silent branch tags are perfect for this:
she is {cutting the wedding cake cake==!<act>|holding a champagne glas glass==!<act>|dancing dance==!<act>}.
<act>==cake::{she serves the cake|she cuts another slice}
<act>!=cake::{she is not near the cake} # fires for glass AND dance
<act>==cake::__cake_actions__ # wildcards can be gated too
## Word weightning
# This is already natively supported by ComfyUI - in case you didn't know, it reinforces the importance of the encased words.
(car or something:1.2) # Just showcasing that these are also highlighted
## Hotkeys/Shortcuts/Misc:
# - CTRL + Left Mouse Click on a Yellow wildcard -> opens the file with your default text editor (Notepad++ recommended)
# - CTRL + Left Mouse Click on a Red wildcard -> creates and opens the file with your default text editor (Notepad++ recommended)
# - Adjust Font Size with CTRL + Mouse Wheel Up/Down
# - CTRL + UP/DOWN (on selected text) mimics ComfyUI's fast text weighting
## TIPS:
# - This node is (accidentally) fully compatible with subgraphs. This means you can actually add the 'prompt area' as a widget to the subgraph's widgets!
# To do so: place the node inside a subgraph then outside the subgraph -> right click on it -> Edit subgraph widgets -> Search 'vsmart' and turn the visibility ON for 'richprompt_widget_-1'
| — |
| in1opt | STRING | | External text, reference it in the prompt as <in1>. Inserted as-is (not re-resolved). The upstream branch only executes if <in1> appears in the prompt. |
| in2opt | STRING | | External text, reference it in the prompt as <in2>. Inserted as-is (not re-resolved). The upstream branch only executes if <in2> appears in the prompt. |
| in3opt | STRING | | External text, reference it in the prompt as <in3>. Inserted as-is (not re-resolved). The upstream branch only executes if <in3> appears in the prompt. |
| in4opt | STRING | | External text, reference it in the prompt as <in4>. Inserted as-is (not re-resolved). The upstream branch only executes if <in4> appears in the prompt. |
| vars_inopt | VS_VARS | | Variables from another VSmartPrompt: wire its 'variables' output here and every <name> it assigned is available in this prompt (and is passed on again). |