ComfyUI flow control
Routing, switching, broadcast, bundling, looping, gating. Where does
the signal go once the decision is made.
Six packs on this install contribute flow-control primitives. Each has
overlapping options and pack-specific quirks — the goal of this skill
is to pick the right one in one decision, not browse a dropdown.
When to Use This Skill
| Use this skill when... |
Use instead when... |
| Wiring how a signal routes, switches, broadcasts, loops, or is gated |
Forming the predicate that drives the route -> comfy-conditionals |
| Picking a switch / index-switch / broadcast node |
Debugging or inspecting a routed value -> comfy-debug-preview |
Sources of truth
custom_nodes/rgthree-comfy/__init__.py — context bundles, Any Switch, Power Lora Loader, fast groups muter (frontend-only)
custom_nodes/cg-use-everywhere/__init__.py — broadcast "Anything Everywhere" sentinels
custom_nodes/ComfyUI-Crystools/crystools/nodes_switch.py — type-typed CSwitchBoolean* family
custom_nodes/comfyui-impact-pack/modules/impact/special_samplers.py and core.py — ImpactSwitch (GeneralSwitch/GeneralInversedSwitch), ImpactConditionalBranch, ExecutionOrderController
custom_nodes/comfyui-easy-use/py/nodes/logic.py and flow.py — easy switches, pipes, forLoop, whileLoop, blocker
- ComfyUI core — built-in
ComfySwitchNode (boolean toggle between two same-type inputs)
Pick-a-switch decision
| You have… |
Selector |
Best node |
Why |
| 2 IMAGE inputs, BOOLEAN selector |
bool |
easy imageSwitch or Crystools CSwitchBooleanImage |
Lazy: only the chosen branch runs |
| 2 ANY inputs, BOOLEAN selector |
bool |
Crystools CSwitchBooleanAny |
Lazy; cleanest signature |
| 2 STRING inputs, BOOLEAN selector |
bool |
easy textSwitch or Crystools CSwitchBooleanString |
Both lazy |
| 2 CONDITIONING inputs, BOOLEAN |
bool |
Crystools CSwitchBooleanConditioning |
Lazy; native CONDITIONING type |
| 2 LATENT / MASK inputs, BOOLEAN |
bool |
Crystools CSwitchBooleanLatent / CSwitchBooleanMask |
Lazy; typed |
| N ANY inputs, INT selector (3-20) |
index |
easy anythingIndexSwitch (up to 20) |
Only easy-use scales past 2 inputs |
| N IMAGE / TEXT / CONDITIONING, INT |
index |
easy imageIndexSwitch / easy textIndexSwitch / easy conditioningIndexSwitch |
Typed N-way |
| K ANY inputs, "first non-None wins" |
any |
rgthree Any Switch |
Pick the first connected/non-empty input |
| 1 ANY input → 2 ANY outputs (demux) |
bool |
Crystools CSwitchFromAny |
Unique: output-side mux. Bool routes the one input to one of two outputs |
| 2 BOOLEAN inputs that disagree |
logic |
easy compare or ImpactCompare then a switch above |
Predicate formation lives in comfy-conditionals |
| Toggle entire LoRA stack on/off |
bool |
rgthree Power Lora Loader with toggles per row |
Single node holds the stack + per-LoRA enable/strength |
| Mute/bypass a whole group of nodes |
mouse |
rgthree fast groups muter (frontend) |
Right-click group → Mute / Bypass. No node needed |
Input-side vs output-side mux
- Input-side mux (the standard pattern): N inputs → 1 output. The
switch decides which input to forward. The bool/index selector reads
before the upstream graph evaluates, so unselected branches can
often be skipped (see lazy-vs-eager below).
- Output-side mux (Crystools
CSwitchFromAny only): 1 input → 2
outputs. The bool picks which output port receives the value; the
other port emits None / a default. Use this when one upstream
feeds two divergent downstream paths and you want to send it to only
one at a time.
Lazy vs eager evaluation
Lazy switches mark unselected branches as "do not evaluate", so the
upstream chain feeding the discarded branch is skipped entirely. Saves
GPU and time. Eager switches force every upstream branch to compute
even if its output gets thrown away.
| Lazy (skip unselected upstream) |
Eager (run all branches always) |
easy ifElse, easy imageSwitch, easy textSwitch, easy anythingIndexSwitch (and the typed *IndexSwitch siblings), easy blocker (downstream blocker) |
ImpactSwitch / GeneralSwitch (data routing only) |
All CSwitchBoolean* (Crystools) |
CSwitchFromAny (must compute input before routing) |
ImpactConditionalBranch, ImpactConditionalBranchSelMode |
rgthree Any Switch (selects after upstream resolves) |
When the unselected branch is cheap (a constant or a small VAEDecode),
the difference is invisible. When it's a sampler chain, lazy switches
save tens of seconds per queue.
Broadcast routing — cg-use-everywhere
The Anything Everywhere family doesn't have output ports. You wire a
value (model / clip / vae / seed / conditioning / anything) into the
node, and it acts as an invisible producer: any unconnected input
slot of the matching type elsewhere in the graph receives the value
automatically.
| Node |
Use when |
Anything Everywhere |
One MODEL or VAE is reused by 6 nodes scattered across the graph — declare once, skip 6 reroute wires |
Anything Somewhere |
Regex-filtered: broadcasts only to inputs whose socket name matches the regex you set on the broadcaster |
Anything Everywhere Triplet |
Positive + negative + latent triplet bundle (the SDXL/Flux conditioning trio) |
Seed Everywhere |
Deprecated; the frontend auto-rewrites to a regular Anything Everywhere connected to INT |
Silent-failure mode: if two broadcasters carry compatible types
and both could match an empty socket, one of them wins (depends on
node id ordering) and the other is silently ignored. Color the broadcasters
in the UI so the routing is visible — they're invisible by design and
hard to debug otherwise. When debugging, replace with explicit reroutes
to see exactly where each value lands.
Use broadcast for scalars and constants (seed, model, vae, a
shared prompt). Avoid for transient intermediate values whose meaning
shifts as the graph runs — explicit wires there make the workflow
more legible.
Context vs pipe bundles
Both rgthree's Context and easy-use's pipeIn/pipeOut carry a
multi-typed bundle on a single wire. They are not interchangeable.
|
rgthree Context |
easy-use pipe |
| Wire type |
RGTHREE_CONTEXT (custom) |
PIPE_LINE (custom) |
| Field access |
Named (model / clip / vae / positive / negative / latent / image / seed) |
Positional (model, pos, neg, latent, vae, clip, image, seed) |
| Override / edit mid-graph |
Context Merge / Context Merge Big |
pipeEdit |
| Unpack |
Context Switch selects between multiple full contexts; individual fields auto-emerge from the Context node's right side |
pipeOut emits all 8 slots; or downstream nodes consume PIPE_LINE directly |
| Bridge between |
Convert manually: unpack with Context outputs → repack with pipeIn (and vice-versa) |
Same, reverse |
| Best for |
Sharing a stable model/clip/vae across many subgraphs |
easy-use's own ecosystem (its samplers and pre-samplers expect PIPE_LINE) |
Mixing the two in one workflow is allowed but every cross-bridge is a
manual repack. Pick one bundle convention per workflow.
Loops
Easy-use ships the only general-purpose loop primitives in this
install. Use sparingly — ComfyUI's execution model wasn't designed for
iteration, and loops expand at prompt-queue time to a sequence of
copied subgraph nodes (so an N=50 loop is N=50 sampler instances in
the graph, not one node looping).
| Loop |
Setup |
easy forLoopStart → body → easy forLoopEnd |
total count (INT), values_1..N carry state through iterations |
easy whileLoopStart → body → easy whileLoopEnd |
condition (BOOLEAN) checked after each iteration; emits FLOW_CONTROL token + state |
Best practice:
- Keep loop bodies short. Each iteration replicates the entire subgraph
in the queue, so 30 iterations × 50 nodes ≈ 1500-node queue.
- Always have an exit predicate.
whileLoopEnd with no terminating
condition will hang the queue forever.
- The state-carry slots (
values_*) are how you accumulate — write to
them at the end, read at the start.
- For per-image batch iteration, prefer ComfyUI's native batch
semantics (let the sampler process a batch) over a loop. Loops are
for iteration where each round depends on the previous round's
output.
Execution gating
| Primitive |
What it does |
easy blocker |
Pass-through; if continue=False returns an ExecutionBlocker sentinel. Any downstream node touching the sentinel is silently skipped. |
ImpactConditionalStopIteration |
Inside an Impact iterator (detector → detailer loop), halts the loop when its BOOLEAN input is True. |
ImpactExecutionOrderController |
Pins a side-effect node (SaveImage, log, webhook) to run before / after a designated other node. Used when ComfyUI's free reordering picks the wrong sequence. |
ExecutionBlocker is the canonical "kill this path" primitive in
ComfyUI — see comfy-conditionals for predicate formation and
detailed semantics (Preview Bridge consumes the sentinel silently;
SaveImage downstream is the abort target).
Recipes
Toggleable LoRA stack with bypass
You have 3–8 LoRAs stacked into a chain. You want each one individually
toggleable, with a master "all off" too.
UNETLoader ─┐
│
▼
rgthree Power Lora Loader ← per-row: enabled (bool), name, strength
│
▼
ModelSamplingAuraFlow (or whatever)
- One node holds the stack. UI per-row toggle + strength.
- Group the loader + downstream sampler nodes; right-click → Mute
Group to bypass the whole branch when prototyping.
- To make a single LoRA toggleable as a separate node, wrap with
Crystools
CSwitchBooleanAny: bool=on → goes through LoraLoaderModelOnly,
bool=off → bypasses straight to the next stage.
Optional upscale pass with lazy switch
User sometimes wants a 2× upscale, sometimes doesn't. Without lazy
evaluation, the upscale chain (model loader + KSampler + VAEDecode)
runs even when discarded.
┌── on_true: UpscaleModelLoader → Sampler → VAEDecode ──┐
SaveImage upstream ────────── ┤ ├── SaveImage
└── on_false: passthrough ─────────────────────────────┘
▲
│
Crystools CSwitchBooleanImage (lazy)
- The Crystools switch is lazy → when bool=False, the entire upscale
chain is skipped, not just discarded.
- Bool can come from a
PrimitiveBoolean, a RgthreeContext field, or
an easy compare predicate.
Migrating a workflow off broadcast wires for review
When sharing a workflow that uses Anything Everywhere, the rest of
the graph has unconnected input sockets that "look" wrong but work
fine because of the broadcaster. For readability when sending the
workflow to someone:
- Right-click
Anything Everywhere → "Show connections" (frontend
flag in the rgthree side panel) — renders dashed lines.
- Manually wire what the broadcaster was implicitly doing.
- Delete the broadcaster node.
Reverse the process when receiving a wired workflow you want to
clean up.
Gotchas
ComfySwitchNode (core) is widget-overridden by an input.
When you wire a BOOLEAN into the switch slot of ComfySwitchNode,
the node's own widget value is ignored — the connected input wins.
This bites you when the widget shows False but a connected
PrimitiveBoolean(True) is in effect.
Any Switch (rgthree) is eager — it evaluates all upstream
inputs before picking the first non-None. Don't use it as a
performance optimizer; use a typed CSwitchBoolean* for laziness.
Preview Bridge swallows ExecutionBlocker: if you tee a path
through Preview Bridge to inspect it, and the path is blocked, the
Preview shows nothing and the downstream abort doesn't propagate
through the bridge. Use FastPreview (comfyui-kjnodes) downstream
of a Preview Bridge when blockers may appear, or wire previews off
branches that can't be blocked.
ImpactConditionalBranch.cond is BOOLEAN, not INT/FLOAT.
SimpleMathCondition (essentials) returns FLOAT — convert with a
comparator before feeding the branch.
- Context Big silently drops mismatched slots. If you wire an
IMAGE to a Context Big.latent slot the wire is ignored at
evaluation. Hover the Context outputs to check what's actually
populated.
- Easy-use loops expand at queue-time, not runtime. A loop of 50
iterations becomes 50 copies of the body inside the queue's prompt
graph. Very large loops can OOM the frontend (browser) before
even reaching the backend.
Cross-refs
comfy-conditionals — forming the boolean / index that feeds these
switches. Predicates, comparisons, null checks, ExecutionBlocker
patterns.
comfy-prompting — Power Lora Loader plays nicely with LoRA
trigger-word autoload nodes; see the cross-ref there for the full
recipe.
comfy-debug-preview — Preview Bridge details, FastPreview as the
blocker-aware alternative.
comfy-math-strings — primitive sources (PrimitiveBoolean, INT/FLOAT
constants, sliders) that drive these switches.
Things this skill does NOT cover
- Predicate formation — how to build the boolean that feeds a
switch. →
comfy-conditionals.
- Reroute nodes for visual cleanup — those are frontend-only and
don't affect execution; covered by
comfy-workflow-layout and
rgthree's UI affordances.
- Sampler / model routing (KSampler vs DPMPP vs Euler, model
loader switching) — that's model-family work; see
wan, z-image,
hidream-o1 skills.
- Subgraph composition — packaging part of a workflow into a
reusable subgraph. That's a project
CLAUDE.md topic under
"Editing workflow JSON".
1---
2created: 2026-07-07
3modified: 2026-07-31
4reviewed: 2026-07-07
5name: comfy-flow-control
6description: >-
7 ComfyUI routing nodes: typed switches, index switches, broadcast (Anything Everywhere), pipe/context bundles, for/while loops, ExecutionBlocker gates. Use when wiring where a signal routes in a workflow.
8allowed-tools: Read, Grep, Glob
9---
10
11# ComfyUI flow control
12
13Routing, switching, broadcast, bundling, looping, gating. *Where does
14the signal go* once the decision is made.
15
16Six packs on this install contribute flow-control primitives. Each has
17overlapping options and pack-specific quirks — the goal of this skill
18is to pick the right one in one decision, not browse a dropdown.
19
20## When to Use This Skill
21
22| Use this skill when... | Use instead when... |
23|---|---|
24| Wiring how a signal routes, switches, broadcasts, loops, or is gated | Forming the predicate that drives the route -> `comfy-conditionals` |
25| Picking a switch / index-switch / broadcast node | Debugging or inspecting a routed value -> `comfy-debug-preview` |
26
27## Sources of truth
28
29- `custom_nodes/rgthree-comfy/__init__.py` — context bundles, Any Switch, Power Lora Loader, fast groups muter (frontend-only)
30- `custom_nodes/cg-use-everywhere/__init__.py` — broadcast "Anything Everywhere" sentinels
31- `custom_nodes/ComfyUI-Crystools/crystools/nodes_switch.py` — type-typed CSwitchBoolean* family
32- `custom_nodes/comfyui-impact-pack/modules/impact/special_samplers.py` and `core.py` — ImpactSwitch (`GeneralSwitch`/`GeneralInversedSwitch`), ImpactConditionalBranch, ExecutionOrderController
33- `custom_nodes/comfyui-easy-use/py/nodes/logic.py` and `flow.py` — easy switches, pipes, forLoop, whileLoop, blocker
34- ComfyUI core — built-in `ComfySwitchNode` (boolean toggle between two same-type inputs)
35
36## Pick-a-switch decision
37
38| You have… | Selector | Best node | Why |
39|---|---|---|---|
40| 2 IMAGE inputs, BOOLEAN selector | bool | `easy imageSwitch` or Crystools `CSwitchBooleanImage` | Lazy: only the chosen branch runs |
41| 2 ANY inputs, BOOLEAN selector | bool | Crystools `CSwitchBooleanAny` | Lazy; cleanest signature |
42| 2 STRING inputs, BOOLEAN selector | bool | `easy textSwitch` or Crystools `CSwitchBooleanString` | Both lazy |
43| 2 CONDITIONING inputs, BOOLEAN | bool | Crystools `CSwitchBooleanConditioning` | Lazy; native CONDITIONING type |
44| 2 LATENT / MASK inputs, BOOLEAN | bool | Crystools `CSwitchBooleanLatent` / `CSwitchBooleanMask` | Lazy; typed |
45| N ANY inputs, INT selector (3-20) | index | `easy anythingIndexSwitch` (up to 20) | Only easy-use scales past 2 inputs |
46| N IMAGE / TEXT / CONDITIONING, INT | index | `easy imageIndexSwitch` / `easy textIndexSwitch` / `easy conditioningIndexSwitch` | Typed N-way |
47| K ANY inputs, "first non-None wins" | any | rgthree `Any Switch` | Pick the first connected/non-empty input |
48| 1 ANY input → 2 ANY outputs (demux) | bool | Crystools `CSwitchFromAny` | Unique: output-side mux. Bool routes the *one* input to one of two outputs |
49| 2 BOOLEAN inputs that disagree | logic | `easy compare` or `ImpactCompare` then a switch above | Predicate formation lives in `comfy-conditionals` |
50| Toggle entire LoRA stack on/off | bool | rgthree `Power Lora Loader` with toggles per row | Single node holds the stack + per-LoRA enable/strength |
51| Mute/bypass a whole group of nodes | mouse | rgthree fast groups muter (frontend) | Right-click group → Mute / Bypass. No node needed |
52
53### Input-side vs output-side mux
54
55- **Input-side mux** (the standard pattern): N inputs → 1 output. The
56 switch decides which input to forward. The bool/index selector reads
57 *before* the upstream graph evaluates, so unselected branches can
58 often be skipped (see lazy-vs-eager below).
59- **Output-side mux** (Crystools `CSwitchFromAny` only): 1 input → 2
60 outputs. The bool picks which output port receives the value; the
61 other port emits None / a default. Use this when *one upstream*
62 feeds two divergent downstream paths and you want to send it to only
63 one at a time.
64
65### Lazy vs eager evaluation
66
67Lazy switches mark unselected branches as "do not evaluate", so the
68upstream chain feeding the discarded branch is skipped entirely. Saves
69GPU and time. Eager switches force every upstream branch to compute
70even if its output gets thrown away.
71
72| Lazy (skip unselected upstream) | Eager (run all branches always) |
73|---|---|
74| `easy ifElse`, `easy imageSwitch`, `easy textSwitch`, `easy anythingIndexSwitch` (and the typed `*IndexSwitch` siblings), `easy blocker` (downstream blocker) | `ImpactSwitch` / `GeneralSwitch` (data routing only) |
75| All `CSwitchBoolean*` (Crystools) | `CSwitchFromAny` (must compute input before routing) |
76| `ImpactConditionalBranch`, `ImpactConditionalBranchSelMode` | rgthree `Any Switch` (selects after upstream resolves) |
77
78When the unselected branch is cheap (a constant or a small VAEDecode),
79the difference is invisible. When it's a sampler chain, lazy switches
80save tens of seconds per queue.
81
82## Broadcast routing — `cg-use-everywhere`
83
84The `Anything Everywhere` family doesn't have output ports. You wire a
85value (model / clip / vae / seed / conditioning / anything) *into* the
86node, and it acts as an invisible producer: any *unconnected* input
87slot of the matching type elsewhere in the graph receives the value
88automatically.
89
90| Node | Use when |
91|---|---|
92| `Anything Everywhere` | One MODEL or VAE is reused by 6 nodes scattered across the graph — declare once, skip 6 reroute wires |
93| `Anything Somewhere` | Regex-filtered: broadcasts only to inputs whose *socket name* matches the regex you set on the broadcaster |
94| `Anything Everywhere Triplet` | Positive + negative + latent triplet bundle (the SDXL/Flux conditioning trio) |
95| `Seed Everywhere` | Deprecated; the frontend auto-rewrites to a regular `Anything Everywhere` connected to INT |
96
97**Silent-failure mode**: if two broadcasters carry compatible types
98and both could match an empty socket, *one of them wins* (depends on
99node id ordering) and the other is silently ignored. Color the broadcasters
100in the UI so the routing is visible — they're invisible by design and
101hard to debug otherwise. When debugging, replace with explicit reroutes
102to see exactly where each value lands.
103
104Use broadcast for **scalars and constants** (seed, model, vae, a
105shared prompt). Avoid for transient intermediate values whose meaning
106shifts as the graph runs — explicit wires there make the workflow
107more legible.
108
109## Context vs pipe bundles
110
111Both rgthree's `Context` and easy-use's `pipeIn`/`pipeOut` carry a
112multi-typed bundle on a single wire. They are not interchangeable.
113
114| | rgthree Context | easy-use pipe |
115|---|---|---|
116| Wire type | `RGTHREE_CONTEXT` (custom) | `PIPE_LINE` (custom) |
117| Field access | Named (model / clip / vae / positive / negative / latent / image / seed) | Positional (model, pos, neg, latent, vae, clip, image, seed) |
118| Override / edit mid-graph | `Context Merge` / `Context Merge Big` | `pipeEdit` |
119| Unpack | `Context Switch` selects between multiple full contexts; individual fields auto-emerge from the Context node's right side | `pipeOut` emits all 8 slots; or downstream nodes consume `PIPE_LINE` directly |
120| Bridge between | Convert manually: unpack with `Context` outputs → repack with `pipeIn` (and vice-versa) | Same, reverse |
121| Best for | Sharing a stable model/clip/vae across many subgraphs | easy-use's own ecosystem (its samplers and pre-samplers expect PIPE_LINE) |
122
123Mixing the two in one workflow is allowed but every cross-bridge is a
124manual repack. Pick one bundle convention per workflow.
125
126## Loops
127
128Easy-use ships the only general-purpose loop primitives in this
129install. Use sparingly — ComfyUI's execution model wasn't designed for
130iteration, and loops expand at prompt-queue time to a sequence of
131copied subgraph nodes (so an N=50 loop is N=50 sampler instances in
132the graph, not one node looping).
133
134| Loop | Setup |
135|---|---|
136| `easy forLoopStart` → body → `easy forLoopEnd` | `total` count (INT), `values_1..N` carry state through iterations |
137| `easy whileLoopStart` → body → `easy whileLoopEnd` | `condition` (BOOLEAN) checked after each iteration; emits FLOW_CONTROL token + state |
138
139Best practice:
140
141- Keep loop bodies short. Each iteration replicates the entire subgraph
142 in the queue, so 30 iterations × 50 nodes ≈ 1500-node queue.
143- Always have an exit predicate. `whileLoopEnd` with no terminating
144 condition will hang the queue forever.
145- The state-carry slots (`values_*`) are how you accumulate — write to
146 them at the end, read at the start.
147- For per-image batch iteration, prefer ComfyUI's native batch
148 semantics (let the sampler process a batch) over a loop. Loops are
149 for iteration where each round depends on the previous round's
150 output.
151
152## Execution gating
153
154| Primitive | What it does |
155|---|---|
156| `easy blocker` | Pass-through; if `continue=False` returns an `ExecutionBlocker` sentinel. Any downstream node touching the sentinel is silently skipped. |
157| `ImpactConditionalStopIteration` | Inside an Impact iterator (detector → detailer loop), halts the loop when its BOOLEAN input is True. |
158| `ImpactExecutionOrderController` | Pins a side-effect node (SaveImage, log, webhook) to run before / after a designated other node. Used when ComfyUI's free reordering picks the wrong sequence. |
159
160`ExecutionBlocker` is the canonical "kill this path" primitive in
161ComfyUI — see `comfy-conditionals` for predicate formation and
162detailed semantics (Preview Bridge consumes the sentinel silently;
163SaveImage downstream is the abort target).
164
165## Recipes
166
167### Toggleable LoRA stack with bypass
168
169You have 3–8 LoRAs stacked into a chain. You want each one individually
170toggleable, with a master "all off" too.
171
172```
173UNETLoader ─┐
174 │
175 ▼
176rgthree Power Lora Loader ← per-row: enabled (bool), name, strength
177 │
178 ▼
179ModelSamplingAuraFlow (or whatever)
180```
181
182- One node holds the stack. UI per-row toggle + strength.
183- Group the loader + downstream sampler nodes; right-click → Mute
184 Group to bypass the whole branch when prototyping.
185- To make a *single* LoRA toggleable as a separate node, wrap with
186 Crystools `CSwitchBooleanAny`: bool=on → goes through `LoraLoaderModelOnly`,
187 bool=off → bypasses straight to the next stage.
188
189### Optional upscale pass with lazy switch
190
191User sometimes wants a 2× upscale, sometimes doesn't. Without lazy
192evaluation, the upscale chain (model loader + KSampler + VAEDecode)
193runs even when discarded.
194
195```
196 ┌── on_true: UpscaleModelLoader → Sampler → VAEDecode ──┐
197SaveImage upstream ────────── ┤ ├── SaveImage
198 └── on_false: passthrough ─────────────────────────────┘
199 ▲
200 │
201 Crystools CSwitchBooleanImage (lazy)
202```
203
204- The Crystools switch is lazy → when bool=False, the entire upscale
205 chain is skipped, not just discarded.
206- Bool can come from a `PrimitiveBoolean`, a `RgthreeContext` field, or
207 an `easy compare` predicate.
208
209### Migrating a workflow off broadcast wires for review
210
211When sharing a workflow that uses `Anything Everywhere`, the rest of
212the graph has unconnected input sockets that "look" wrong but work
213fine because of the broadcaster. For readability when sending the
214workflow to someone:
215
2161. Right-click `Anything Everywhere` → "Show connections" (frontend
217 flag in the rgthree side panel) — renders dashed lines.
2182. Manually wire what the broadcaster was implicitly doing.
2193. Delete the broadcaster node.
220
221Reverse the process when receiving a wired workflow you want to
222clean up.
223
224## Gotchas
225
226- **`ComfySwitchNode` (core)** is widget-overridden by an input.
227 When you wire a BOOLEAN into the `switch` slot of `ComfySwitchNode`,
228 the node's own widget value is ignored — the connected input wins.
229 This bites you when the widget shows False but a connected
230 PrimitiveBoolean(True) is in effect.
231- **`Any Switch` (rgthree)** is eager — it evaluates *all* upstream
232 inputs before picking the first non-None. Don't use it as a
233 performance optimizer; use a typed `CSwitchBoolean*` for laziness.
234- **`Preview Bridge` swallows `ExecutionBlocker`**: if you tee a path
235 through Preview Bridge to inspect it, and the path is blocked, the
236 Preview shows nothing and the downstream abort doesn't propagate
237 through the bridge. Use `FastPreview` (`comfyui-kjnodes`) downstream
238 of a Preview Bridge when blockers may appear, or wire previews off
239 branches that can't be blocked.
240- **`ImpactConditionalBranch.cond` is BOOLEAN, not INT/FLOAT**.
241 `SimpleMathCondition` (essentials) returns FLOAT — convert with a
242 comparator before feeding the branch.
243- **Context Big silently drops mismatched slots**. If you wire an
244 `IMAGE` to a `Context Big.latent` slot the wire is ignored at
245 evaluation. Hover the Context outputs to check what's actually
246 populated.
247- **Easy-use loops expand at queue-time, not runtime**. A loop of 50
248 iterations becomes 50 copies of the body inside the queue's prompt
249 graph. Very large loops can OOM the *frontend* (browser) before
250 even reaching the backend.
251
252## Cross-refs
253
254- `comfy-conditionals` — forming the boolean / index that feeds these
255 switches. Predicates, comparisons, null checks, ExecutionBlocker
256 patterns.
257- `comfy-prompting` — `Power Lora Loader` plays nicely with LoRA
258 trigger-word autoload nodes; see the cross-ref there for the full
259 recipe.
260- `comfy-debug-preview` — Preview Bridge details, FastPreview as the
261 blocker-aware alternative.
262- `comfy-math-strings` — primitive sources (PrimitiveBoolean, INT/FLOAT
263 constants, sliders) that drive these switches.
264
265## Things this skill does NOT cover
266
267- **Predicate formation** — how to build the boolean that feeds a
268 switch. → `comfy-conditionals`.
269- **Reroute nodes for visual cleanup** — those are frontend-only and
270 don't affect execution; covered by `comfy-workflow-layout` and
271 rgthree's UI affordances.
272- **Sampler / model routing** (KSampler vs DPMPP vs Euler, model
273 loader switching) — that's model-family work; see `wan`, `z-image`,
274 `hidream-o1` skills.
275- **Subgraph composition** — packaging part of a workflow into a
276 reusable subgraph. That's a project `CLAUDE.md` topic under
277 "Editing workflow JSON".