Nodes/Comfy-UmiAI/Umi Bypass
ComfyUI Node

Umi Bypass

The Bypass Node With a One-Run Lag (and Why That's Still Fine)

By Tinuva88·Created 10 months ago·Updated 12 days ago· 28
Umi Bypass
  • image
  • latent
  • conditioning
  • model
  • clip
  • image
  • latent
  • conditioning
  • model
  • clip
  • string
◄passthrough_typeIMAGE►
◄matched_list►
◄match_index0►
◄matchedtrue►
◄string—►

Umi Bypass is the node that lets a prompt decide what runs. Roll a simple background and skip the background-removal branch; roll a detailed city and let it through. It's the most interesting idea in the pack and the fiddliest node in it, and being straight about the second part saves you an evening.

The mechanism

The trigger comes from upstream. The Wildcard Processor has bypass_phrases - a comma-separated list matched as whole words, case-insensitively, against the finished prompt - and it emits bypass_matches, a JSON list of booleans in the order you listed the phrases. Wire that into this node's matched_list and set match_index to the phrase you care about; index 0 is the first phrase, so a single phrase means index 0.

matched is a manual boolean widget (default true) that acts as the fallback decision. It only applies when matched_list is empty or unparseable - if the list resolves, it wins and the widget is ignored. That's worth knowing, because a node that "ignores" a widget you flipped is exactly the kind of thing that eats a debugging session.

Then passthrough_type picks which stream this instance handles: IMAGE, LATENT, CONDITIONING, MODEL, CLIP or STRING. The node declares an input socket and an output socket for all six types, but only the one you selected gets a value - the other five outputs come back empty. So one bypass node per stream, each set to the type it's sitting on.

What happens when the match is false depends on your ComfyUI build:

  • If ComfyUI's ExecutionBlocker is available, the node returns the blocker in place of your data, and everything downstream of it stops for that run. Close to real conditional execution.
  • If it isn't, the node passes your data through anyway and signals the frontend instead, which toggles bypass mode on the first connected downstream node. That change lands on the next queue item, not this one.

The one-run lag is not the author's fault

The pack's own design notes document an extended attempt at same-run control - mutating node mode, properties.bypass, muted, disabled in the prompt graph, a pre-queue prompt handler, a frontend wrapper around queuePrompt. ComfyUI 0.10.0's execution engine simply doesn't read execution-control flags out of the prompt graph; the execution plan is fixed before any node runs. The conclusion in those notes is blunt and, I think, correct: same-run bypass in that design is architecturally impossible, and the one-run lag is the working version.

This is the general ComfyUI fact behind a lot of switch-node weirdness, and it's not unique to this pack. Execution order is decided up front.

So what is it actually good for?

Batch runs where consecutive prompts resemble each other. Queue twenty variations with simple background, detailed crowd, simple background and the branch toggles a step behind - a detailer or background pass applies to roughly the right images, and you stop paying thirty seconds of extra work on images that don't need it. It is not a tool for precise per-image gating; if you need exactly the right branch on exactly the right frame in one pass, use a real conditional rather than a lagged bypass.

The lag also only matters for the frontend path. On a build where ExecutionBlocker resolves, the block lands in the same run, and the node behaves like a proper gate. Which one you get is a function of your ComfyUI version, not of anything you configure.

Install

Core node. ComfyUI Manager (search the pack title) or:

cd ComfyUI/custom_nodes
git clone https://github.com/Tinuva88/Comfy-UmiAI
cd Comfy-UmiAI && pip install -r requirements.txt

pyyaml for core; restart afterwards. It lives under UmiAI. The frontend half (the part that toggles the downstream node) ships in the pack's js/ folder, so a hard browser refresh after upgrading is worth doing - a cached old script is a plausible cause of "the toggle stopped working."

Wiring it

[Umi AI Wildcard Processor]
   - bypass_phrases: "simple background"
   ↓ bypass_matches
[Umi Bypass]  passthrough_type = IMAGE
   ← image from VAE Decode
   ↓ image
[Remove Background / detailer / upscaler]

If the match is false on a build with ExecutionBlocker, that downstream node doesn't run this pass; otherwise it's toggled off for the next one. Either way you get no error and no red node - just a skipped or applied step. Keep the bypass_phrases list and match_index consistent: add a second phrase to the front of that list and every index shifts.

CategoryUmiAI

Inputs (10)

NameTypeDefaultDescription
passthrough_typeCOMBOIMAGE6 options: IMAGE, LATENT, CONDITIONING, MODEL, CLIP, STRING
matched_listoptSTRING—
match_indexoptINT00–1024—
matchedoptBOOLEANtrue—
imageoptIMAGE—
latentoptLATENT—
conditioningoptCONDITIONING—
modeloptMODEL—
clipoptCLIP—
stringoptSTRING—

Outputs (6)

NameTypeDescription
imageIMAGE—
latentLATENT—
conditioningCONDITIONING—
modelMODEL—
clipCLIP—
stringSTRING—