WP Var → Float
Turning Wildcard Picks Into Denoise Values and CFG Sliders
- context
- wp_var_name
- value
WP Var → Float is the sibling of WP Var → Int with one crucial difference: it keeps the decimals. Where the Int node is for resolutions and step counts, this one is for the parameters that live in the 0.0–1.0 zone - denoise strength, CFG scale, strength values on LoRA/ControlNet applications. Same shape as its sibling: feed it a context, pick a $variable, it extracts a number from the text and emits a FLOAT socket you can wire anywhere.
How it works
Four inputs, identical in spirit to WP Var → Int:
- context - the PIPELINE_CONTEXT to read from.
- wp_var_name - a picker menu of the variables your context defines.
- index - which number to extract when the value holds several (0 = first).
- default - the FLOAT fallback when the variable is missing or the index is out of range. Defaults to 0.0.
The parsing rule matters more here than in the Int node: it matches the Nth signed-float substring (-?\d+(?:\.\d+)?(?:[eE][-+]?\d+)?), which means plain integers match too - 1920 becomes 1920.0 - and scientific notation like 1e-3 parses fine. One gotcha: it expects a dot decimal point, so a European-style 0,6 only yields the 0. Keep your wildcard options in dot form and you're fine. If the value has no number at all - high or low - you get the default.
The default behavior is the feature that keeps it batch-safe: missing variable, empty text, out-of-range index, no digits - all of them return the default and the run continues without erroring. That's wonderful for a 100-iteration loop and maddening when you're debugging, because a silently-applied default looks identical to a correct parse. This is the node's one trap, and it's the same trap as its siblings: verify with WP Debug when a parameter comes out suspiciously constant.
The use case that sells it
Wildcards pick words well; they pick parameters better, once you have this. The canonical move: a wildcard $denoise with options 0.4, 0.6, 0.8, wired through WP Var → Float into a sampler's denoise input. Suddenly each roll in your loop varies both the prompt and how much of the original image it keeps - which is exactly how you explore a img2img space without babysitting a slider. Same trick works for CFG: a variable $guidance that rolls 3.5 / 6 / 9.5 fed into a sampler's cfg, giving you per-iteration sampling behavior. Combined with WP Context Loop and WP Seed List, you get reproducible batches where every render is a deliberate point in (prompt, seed, denoise) space instead of a haphazard thumb-flick.
Install
Part of the pack, one-time setup: ComfyUI Manager → Wildcard Pipeline → install, or the manual git clone + pip install -e . + pnpm build path. Needs ComfyUI ≥ 0.3.36, no model downloads, no extra Python deps. GPL-3.0.
The rule of thumb for choosing between the two numeric converters: if the target input's widget shows a decimal and you care about values between whole numbers, use this one. If you want 768 for a width, WP Var → Int is cleaner - but honestly this node handles integers gracefully too, so when in doubt, the float node's 1920.0 is harmless downstream.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| context | PIPELINE_CONTEXT | The resolved $variable context from any upstream WP Context / Loop / Injector chain. Required — without it the node has no variables to read. | |
| wp_var_name | WP_VAR_PICKER | — | |
| index | INT | 00–999 | Which number in the value to extract when multiple are present (0 = first). |
| default | FLOAT | 0.00-1e+38–1e+38 | Value to use when the variable is missing or the index is out of range. The node never errors — it falls back to this. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |