Nodes/Workflow Iterator/WI Parameter (String)
ComfyUI Node

WI Parameter (String)

Sweep prompts, not just sliders — one line per prompt variation

By jason-n-tran·Created 5 months ago·Updated 5 months ago· 2
WI Parameter (String)
  • param_stack_in
  • param_stack
parameter_nameprompt
valuesa beautiful sunset a majestic mountain
target_node_titleCLIP Text Encode
target_widget_nametext
enabledtrue

WI Parameter (String) is the prompt-sweeping member of the Workflow Iterator pack, and it's the one that turns a numeric tuning tool into a creative one. Its default config targets CLIP Text Encode's text widget, so instead of sweeping steps or CFG you're sweeping what you tell the model. The value syntax is the most human of the family: newline-separated lines, each line becomes one value.

a majestic mountain at golden hour
a majestic mountain in a thunderstorm
a majestic mountain in heavy snow

Hit queue and the pack runs one full generation per line, each with a different positive prompt, all landing in a labeled grid. For tweaking a character's wardrobe, testing subject descriptions, or A/B-ing phrasing ("cinematic bokeh" vs "35mm portrait lens"), this is the node that replaces copy-paste-into-a-text-box forty times.

Wildcards - the extra gear

String parameters also support two wildcard forms, expanded at queue time before combinations are generated:

a photo of __subjects__ in {summer|winter}

The {opt1|opt2} inline form works out of the box and expands to the Cartesian product of the options. The __name__ form is shakier: it's meant to pull lines from a wildcards/name.txt file, but the pack's code never actually configures a wildcard directory for you - set_wildcard_dir exists and nothing calls it. In practice that means __name__ file references will error with "no wildcard directory configured" unless something else in your install sets it up, while the inline {a|b} syntax just works. File wildcard fans are better off sticking with a dedicated wildcard pack and letting this node sweep plain strings.

Wiring, install, gotchas

Identical shape to every parameter node here: parameter_name, values, target_node_title (default CLIP Text Encode), target_widget_name (default text), enabled, param_stack_in, single param_stack output feeding the WI Workflow Iterator. The title-matching rule still bites - if your CLIP Text Encode node has a custom canvas title, you must type that exact title (matching is case-insensitive substring), or you'll get a "Could not find node" warning and prompts that silently don't change.

Install: ComfyUI Manager → search "Workflow Iterator", or git clone https://github.com/jason-n-tran/comfyui-workflow-iterator into custom_nodes, restart. Dependency is just Pillow>=9.0.0. Small, young pack - v1.0.0, MIT, registered on the ComfyUI registry.

The trap to dodge: prompt sweeps in matrix mode against two other parameters multiply fast, and each cell is a full diffuser pass, so ten prompt lines × a CFG sweep × a steps sweep is a genuinely long batch. A prompt sweep is also where a fixed seed matters most - if every line renders from different noise you can't tell whether the prompt or the seed made the difference. One seed parameter holding a single value in linear mode keeps the comparison clean.

CategoryWorkflow Iterator/Parameters

Inputs (6)

NameTypeDefaultDescription
parameter_nameSTRINGprompt
valuesSTRINGa beautiful sunset a majestic mountain
target_node_titleSTRINGCLIP Text Encode
target_widget_nameSTRINGtext
enabledBOOLEANtrue
param_stack_inoptWI_PARAM_STACK

Outputs (1)

NameTypeDescription
param_stackWI_PARAM_STACK