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

WI Parameter (Int)

Sweep an integer widget (steps, batch size, anything) without touching it again

By jason-n-tran·Created 5 months ago·Updated 5 months ago· 2
WI Parameter (Int)
  • param_stack_in
  • param_stack
parameter_namesteps
values10-30, 5
target_node_titleKSampler
target_widget_namesteps
enabledtrue

WI Parameter (Int) is the workhorse of the Workflow Iterator pack. It declares "one integer widget on one node should take these values, one after another," and the pack's main WI Workflow Iterator node turns that into a queued batch. The canonical use is steps - the default target is literally KSampler / steps - and honestly that's the right first experiment for most people: steps are the cheapest lever on image quality, and the sweet spot changes per model, per sampler, per resolution.

It does exactly one job, and its five inputs reflect that. parameter_name is the label that shows up in grid axes and filenames - make it short ("steps"), not "how many steps do we want." target_node_title and target_widget_name tell the iterator which node and which widget to poke; the widget name must be the exact internal name, which for a plain KSampler is steps, cfg, seed, sampler_name, scheduler, denoise. enabled toggles the parameter without you having to disconnect anything, and param_stack_in lets you chain multiple parameter nodes into one experiment.

The values syntax that matters

values is a single text field with two accepted formats:

# Range with step: start-end, step
10-30, 5        -> [10, 15, 20, 25, 30]

# Or a plain comma-separated list
10, 20, 30      -> [10, 20, 30]

The range form is the one you'll type most. A descending range (30-10, 5) works too - the parser reverses the direction for you. If you feed it something unparseable, the parameter is skipped with an error logged, which is quieter than you'd like but at least doesn't crash the batch. There's no step-of-0 escape hatch: the parser rejects non-positive steps.

Wiring it up

Chain it in front of the iterator: param_stack output → the next parameter's param_stack_in, and the last node's param_stackWI Workflow Iterator's param_stack. Its single output, param_stack, is the same WI_PARAM_STACK type every parameter node emits, so the chain is where all the "which nodes matter" complexity lives - this node itself is dumb on purpose.

Install & the shared reality

This pack installs like any other: ComfyUI Manager → search "Workflow Iterator", or git clone https://github.com/jason-n-tran/comfyui-workflow-iterator into custom_nodes, restart ComfyUI. Only dependency is Pillow>=9.0.0, which you already have. No models to download.

The gotchas here are inherited from the whole pack: the target_node_title must match the canvas title of the node you're controlling (matching is a case-insensitive substring check, so "KSampler" finds "KSampler (1)" - but a re-titled node with no shared text won't), and in matrix mode your values get Cartesian-multiplied by every other parameter, so 10-30, 5 against three more parameters is 100 renders before you know it. Test with enabled off or a 2-value list first. And a genuinely useful habit: sweep steps with seed held fixed - throw a WI Parameter (Seed) with a single explicit seed into linear mode - otherwise every step count starts from different noise and your comparison is confounded.

CategoryWorkflow Iterator/Parameters

Inputs (6)

NameTypeDefaultDescription
parameter_nameSTRINGsteps
valuesSTRING10-30, 5
target_node_titleSTRINGKSampler
target_widget_nameSTRINGsteps
enabledBOOLEANtrue
param_stack_inoptWI_PARAM_STACK

Outputs (1)

NameTypeDescription
param_stackWI_PARAM_STACK