Nodes/Mickmumpitz-Nodes/Image Mode Router
ComfyUI Node

Image Mode Router

Decides whether you're doing image-to-video or pure reference video

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Image Mode Router
  • reference_images
  • start_image
  • start_images
  • reference_frames
modeAuto-Detect

Image Mode Router is a three-way switch that decides how your reference images get used in a video workflow: as a literal starting image for image-to-video, as free-floating reference frames, or automatically, based on how many references you're feeding it. It's a small node, but it encodes a real design decision, and it's the kind of thing you reach for when the same graph needs to serve both "animate this one image" and "generate with this reference set" without rewiring.

It comes from the Mickmumpitz pack, where it sits in the video/iteration context - the pack's whole thing is iterative and context-driven generation, and this node is how a workflow switches between "start somewhere specific" and "just keep this character/look in mind."

How it works

The mechanism is dead simple. Two inputs, start_image and reference_images, plus a mode dropdown. In Start + Reference, both pass through to their outputs. In Reference Only, the start output is dropped (returns None) and only references flow. Auto-Detect is the clever one: it counts the reference batch - if there's more than one reference image, it behaves like Reference Only; if there's exactly one, it behaves like Start + Reference. The logic is that a single image is usually the thing you want to start the video from, while multiple references are identity/style guides, not a starting frame.

That's the whole trick: one heuristic, one dropdown, and the graph gets to make the "am I doing I2V or reference-conditional generation?" decision at run time instead of at build time. You'll see it wired in front of an image-to-video sampler whose start-image input is optional.

The inputs and outputs

  • reference_images (IMAGE, required) - the reference set; its count drives Auto-Detect.
  • start_image (IMAGE, optional) - the I2V starting frame.
  • mode (default Auto-Detect) - one of the three modes above.

Outputs:

  • start_images (IMAGE) - the start frame when active, None in Reference Only modes.
  • reference_frames (IMAGE) - the reference batch, always passed through.

Wire start_images into the sampler's start-image/init input and reference_frames into wherever references are consumed.

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

Pure routing, no models.

Common issues

The Auto-Detect heuristic is a heuristic. If you have exactly two references that you actually want to use as both start and reference (rare, but it happens with two-shot continuity work), Auto-Detect will drop the start image and surprise you - pick Start + Reference explicitly for that. And note that a None start_images output can trip up a sampler that doesn't gracefully accept an unconnected start input; if your I2V model insists on a start frame, keep the mode on Start + Reference rather than relying on the auto path to guess right.

CategoryMickmumpitz/Utils

Inputs (3)

NameTypeDefaultDescription
reference_imagesIMAGE
modeCOMBOAuto-Detect3 options: Start + Reference, Reference Only, Auto-Detect
start_imageoptIMAGE

Outputs (2)

NameTypeDescription
start_imagesIMAGE
reference_framesIMAGE