ImpactConditionalBranch
Pick one of two values from a boolean
- tt_value
- ff_value
- *
ImpactConditionalBranch is an if/else in a box. You give it a true-or-false condition and two values, and it hands back one of them: the tt_value when the condition is true, the ff_value when it's false. That's the entire node. If you've written a line of code, you already understand it - it's the ternary operator, cond ? tt_value : ff_value, drawn as a node.
The reason it exists is that ComfyUI is a dataflow graph with no native "if." Everything wired up runs; there's no branch keyword. Impact Pack's experimental Logic nodes bolt a bit of control flow on anyway, and ImpactConditionalBranch is the fork in the road. It's the node that makes the pack's auto-queuing loops actually decide things instead of just repeating. Pair it with ImpactCompare - which produces the boolean by testing two numbers - and you've got the classic loop shape: a counter, a comparison, a branch. The branch picks "keep looping" versus "you're done," or swaps which value flows downstream on the final pass.
What goes in, what comes out
Three inputs. cond is a BOOLEAN - usually the output of an ImpactCompare or some other test, not something you toggle by hand, or the branch would be pointless. tt_value and ff_value are both wildcard type (*), which is what makes this node genuinely useful: they can be anything. A latent, an image, a model, a number, a string. The node doesn't care what flows through it; it just gates on the boolean. The single output, also wildcard, is whichever of the two you selected.
That "anything" is the point. Because the values are typed as wildcard, one ConditionalBranch can switch a whole model between two checkpoints, or route between two different latents, or pick between two prompts. The type only resolves when you connect it to something concrete downstream.
The catch with wildcard types
Here's the honest wrinkle. Impact Pack leans on wildcard types all over the place because ComfyUI didn't (and mostly still doesn't) support proper dynamic types, and the pack's own docs are upfront that this can throw spurious type-validation error messages even when the graph is wired correctly. So if ComfyUI lights up a red "mismatched type" complaint on a ConditionalBranch that looks fine, that's often the wildcard limitation talking, not your mistake. Make sure both branches feed something that expects the same kind of value and it'll run.
The other thing to internalize: both inputs still evaluate. This is a dataflow graph, not lazy code. Wiring a heavy sampling branch into tt_value doesn't mean it's skipped when the condition is false - ComfyUI may still execute whatever produces that value. ConditionalBranch selects the output, it doesn't prune the computation. If your goal is to avoid running an expensive branch entirely, this node alone won't do it; that's what the mute/bypass nodes (Set Mute State) and Switch nodes are for. People reach for ConditionalBranch expecting it to save compute and are surprised when both sides still churn.
So: use it to choose a value, not to skip work. For skipping work, mute the branch.
Where it fits
Realistically, this is a node for people building loops or dynamic switching in ComfyUI - the niche, experimental end of Impact Pack. If you're detailing faces and upscaling, you'll likely never touch it. If you're the kind of person automating a multi-pass loop that changes behaviour on the last iteration, it's one of your core three nodes. There's no tutorial-grade example bundled (the loop nodes are the pack's least-documented corner, sitting in a Logic category the author flags as experimental), so expect to prototype it a few times before the pattern feels natural.
Installing it
It ships with ComfyUI Impact Pack - no separate install. Grab the pack from ComfyUI-Manager (search ComfyUI Impact Pack, Install, restart), or clone it: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, then install requirements.txt into ComfyUI's own Python environment (portable build: ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt) and restart. Auto-install was dropped in v7.6, so a bare manual clone without the requirements step won't load. The pack is ltdrdata's, maintained alongside ComfyUI-Manager, so it's stable - this particular node adds zero model or dependency weight of its own.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| cond | BOOLEAN | — | |
| tt_value | * | — | |
| ff_value | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |