Peek Condition Gate
A boolean switch for your float values
- value
PeekConditionGate is a conditional multiplexer: feed it a boolean and two floats, and it passes through true_value when the condition is true, false_value when it isn't. Three inputs, one output, nothing fancy. It's a two-value switch - the kind of node that seems pointless until you need it, then feels indispensable.
Nothing about this node is sampling-specific, despite living in a sampler-peek pack. It just selects between two numbers based on a condition. Its natural partner is StepExpression, which produces exactly the boolean you need: a step-based condition. Together they give you "use this value before step 12, that value after" - or "value A during the first half of the run, value B during the second."
The inputs and output
condition- a BOOLEAN. True routes totrue_value, false routes tofalse_value.true_value- float to pass when true. Default 1.false_value- float to pass when false. Default 0.value(output) - the chosen float.
Because the output is a plain FLOAT, you can wire it into any numeric input on your graph: a CFG scale, a denoise amount, a strength, a multiplier feeding some downstream math. The classic pattern is condition from StepExpression's boolean output and the two values set by hand, so a single expression swap re-routes your whole schedule. You can also gate on anything else that produces a boolean - an image-analysis check, a comparison, a manual toggle.
Why this beats doing it by hand
You could, in principle, rebuild this with a few math nodes, but it'd be a small tangle of comparisons and switches every single time. This collapses it to one node, and its real value shows when the condition isn't static. A fixed toggle you can just type into a widget; the moment the decision depends on the current step, the batch, or a model output, a gate node like this is what keeps the graph readable. It's ComfyUI node-plumbing at its most honest: one value, one source of truth, no duplicated logic.
Install
Part of the comfyui-sampler-peek pack. In ComfyUI Manager, search comfyui-sampler-peek, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Prohect/comfyui-sampler-peek
Restart and it's ready. No dependencies beyond ComfyUI itself, no model downloads. (Heads up: the README's clone command still names the old aria4comfyui repository, which is dead - the URL above is the live one.)
The limits
It's a float gate, and that's the whole scope. If you need to switch between two images, two latents, or two text prompts, this isn't the node - there are dedicated conditioning and image-switch nodes for that. It also doesn't clamp, interpolate, or remember anything; it's a pure pass-through selector. Set the two values, feed a condition, move on. For step-dependent routing in a sampling workflow, that's exactly the right amount of machinery.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | BOOLEAN | Gate condition | |
| true_value | FLOAT | 1.00-10000–10000 | Value when condition is True |
| false_value | FLOAT | 0.00-10000–10000 | Value when condition is False |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | FLOAT | — |