WI Parameter (Float)
Hunt down your model's sweet-spot CFG the way you'd actually tune it
- param_stack_in
- param_stack
WI Parameter (Float) is the decimal-flavored member of the Workflow Iterator parameter family, and its default config points at the single most tuned number in stable diffusion: CFG scale, on the KSampler's cfg widget. If you've ever sat there bumping CFG from 5.5 to 5.75 to 6.0 and still couldn't tell if the render actually got better, this node exists for exactly that kind of procrastination - except it removes the manual part.
It shares the same five inputs as its siblings. parameter_name is the label that lands on grid axes and in filenames (cfg is the sensible default). target_node_title and target_widget_name tell the pack which node and widget to overwrite - any float widget works, from denoise to a LoRA's strength, not just KSampler's CFG. enabled lets you drop a parameter from an experiment by flipping a boolean instead of rewiring, and param_stack_in chains it into the other parameter nodes feeding WI Workflow Iterator.
Value syntax
The one input that differs in spirit is values, and for floats the range syntax is where it shines:
# Range with step (default example)
5-10, 0.5 -> [5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0]
# Comma list
5.0, 7.5, 10.0 -> [5.0, 7.5, 10.0]
The parser does its float arithmetic with Decimal and rounds to the step's precision, so you don't get the classic 0.30000000000000004 garbage in your axis labels. Set 5-10, 0.5 and the grid reads 5.0 … 10.0, clean. Non-numeric entries fail the parse and the parameter is quietly skipped - the batch keeps going, which is either forgiving or infuriating depending on whether you notice the log line.
The workflow
Same wiring as every parameter node: param_stack output into the next node's param_stack_in, and the final node's param_stack into the iterator. Its only output is that param_stack, so on its own it does nothing - the magic happens at queue time when the pack clones your prompt N times with cfg rewritten each time.
Install is the pack's standard story: ComfyUI Manager, search "Workflow Iterator", install, restart. Or git clone https://github.com/jason-n-tran/comfyui-workflow-iterator into custom_nodes. One dependency (Pillow>=9.0.0, already present), no downloads.
Two honest gotchas. First, the title you put in target_node_title has to match the target node's canvas title - matching is a case-insensitive substring test, so "KSampler" works for the default, but rename the node and you'll see a "could not find node" warning with the value silently never applied. Second, float sweeps are the easiest way to blow up a matrix batch without realizing it: a step of 0.25 over 5-10 is 21 values, and against two other parameters that's hundreds of renders. Start coarse (0.5), find the neighborhood, then tighten. And pair the sweep with a fixed seed so the CFG difference isn't masked by noise - a single-value seed parameter in linear mode does the job.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| parameter_name | STRING | cfg | — |
| values | STRING | 5-10, 0.5 | — |
| target_node_title | STRING | KSampler | — |
| target_widget_name | STRING | cfg | — |
| enabled | BOOLEAN | true | — |
| param_stack_inopt | WI_PARAM_STACK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| param_stack | WI_PARAM_STACK | — |