Nodes/Mickmumpitz-Nodes/Match Mode Switch
ComfyUI Node

Match Mode Switch

A/B/C the VFX pipeline without rewiring a thing

By mickmumpitz·Created 8 months ago·Updated 10 days ago· 47
Match Mode Switch
  • passthrough
  • color_match
  • compose_match
  • image
match_modeCompose + Match

Match Mode Switch is a three-way image router from the Mickmumpitz pack, built for the pack's LTX video-VFX pipeline. When you're compositing generated VFX onto a plate (a real or generated background video), there are a few ways the VFX can come out: raw, color-matched to the plate, or composited and color-matched. This node lets you pick between those three with a dropdown instead of rewiring the graph every time you change your mind.

The three branches, per the author's tooltips, are:

  • Disabled (pass-through) - output the generated video unchanged. Fastest, for when you just want the raw output to look at.
  • Color Match - match the video's color grading to the first generation (only meaningful from the second iteration on, because it needs that first generation as a reference).
  • Compose + Match - composite the VFX onto the plate using the mask, then match the grading. This is the "real" look and it's heavier.

How it works

The clever part is that the inputs are lazy: only the branch you select actually gets evaluated. Wire all three branches into their slots, flip the dropdown, and ComfyUI runs only the graph behind the selected input. That matters because the Compose + Match branch is expensive - it's a full composite with color grading - and you don't want it running when you're just comparing raw output. The node's check_lazy_status tells ComfyUI which input it needs based on the current match_mode, so the unused branches genuinely don't execute. That's the difference between this and a plain switch: a dumb switch evaluates everything and picks one; this one evaluates only what you asked for.

When the selected input isn't connected, the node still marks it as needed (via the lazy mechanism), so the graph stays consistent rather than silently passing through garbage.

The inputs and outputs

  • match_mode - the dropdown (default Compose + Match): Disabled (pass-through), Color Match, or Compose + Match.
  • passthrough (IMAGE, lazy) - the unprocessed generated video.
  • color_match (IMAGE, lazy) - the color-matched video.
  • compose_match (IMAGE, lazy) - the output of the Compose + Match node.

The single output, image, is the selected branch's frames.

Installing it

Part of the Mickmumpitz pack - ComfyUI Manager, search "Mickmumpitz", install, restart:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git

No models beyond what the branches themselves use; the switch is pure routing.

Common issues

The main trap is expecting Color Match to work on iteration 0. It's explicitly "only works from the second iteration on" - it needs the first generation as the matching reference, so on the first pass you'll get nothing sensible out of that branch. If your loop starts on iteration 0 with Color Match selected, either use Disabled for the first pass or rely on Compose + Match. And remember: with lazy inputs, unselected branches don't run - so if you've only wired passthrough and the dropdown says Compose + Match, you get an empty selection and downstream has nothing to chew on. Wire the branch that matches the mode you're actually using.

CategoryMickmumpitz/Image

Inputs (4)

NameTypeDefaultDescription
match_modeCOMBOCompose + MatchSelects how the generated VFX is processed before output (only the selected branch runs): - Disabled (pass-through): outputs the generated video unchanged. - Color Match: only works from the second iteration on; matches the video based on the first generation. - Compose + Match: composites the VFX based on the mask and matches its grading to the plate (heavier).
passthroughoptIMAGEDisabled branch: wire the generated video here to output it unchanged.
color_matchoptIMAGEColor Match branch: the color-matched video (matched to the first generation; from the 2nd iteration on).
compose_matchoptIMAGECompose + Match branch: output of the Compose + Match node (composites the VFX and grades it to the plate).

Outputs (1)

NameTypeDescription
imageIMAGE