Nodes/Dream Project Animation Nodes/β­† Big Image Switch
ComfyUI Node

β­† Big Image Switch

Route between up to ten images with one number

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
β­† Big Image Switch
  • input_0
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • selected
β—„select0β–Ί
β—„on_missingβ–Ύβ–Ί

Sometimes you need the graph to pick which image to process based on a condition - frame 1–100 from camera A, frames 101–200 from camera B. Big Image Switch [Dream] is that router: up to ten IMAGE inputs, a select integer chooses which one flows out as selected. Same design as the pack's other Big switches, just for full images.

How it works

Connect images into input_0 through input_9, set select to an index, and the selected image passes through untouched. Since most slots stay empty, on_missing decides the fallback: previous walks down to the nearest connected input, next walks up. Image slots don't have a sentinel value (an empty IMAGE input is just None), so the fallback logic simply skips unconnected slots.

The inputs that matter

  • select - INT, 0–9. Which slot to output. Drive it from a frame counter or a comparison node to switch images mid-sequence.
  • on_missing - previous or next fallback when the chosen slot is empty.
  • input_0 … input_9 - the candidate images.

Where it fits

This is a value node in a bigger animation graph: swap between reference frames, toggle between two Image Motion [Dream] outputs, pick a base image based on progress. One honest caveat - because the switch evaluates eagerly, every connected image pipeline upstream runs regardless of selection. For images that's usually fine (they're cheap-ish), but if one branch is a heavy sampler you're not actually avoiding the work by switching.

Installing it

Ships with Dream Project Animation Nodes - ComfyUI Manager (search Dream Project Animation) or clone https://github.com/alt-key-project/comfyui-dream-project into custom_nodes, pip install -r requirements.txt, restart. No model downloads.

Common issues

The two stumbles are the same as the rest of the switch family: forgetting that select is 0-indexed (input_0 is the first), and expecting the switch to skip work on unselected branches. It won't. If you genuinely need lazy evaluation of image pipelines, the pack's Lazy switch code exists but isn't shipped active, so plan around the eager behavior.

Category✨ Dream/πŸ›  utils/β­† switches

Inputs (12)

NameTypeDefaultDescription
selectINT00–9β€”
on_missingCOMBO2 options: previous, next
input_0optIMAGEβ€”
input_1optIMAGEβ€”
input_2optIMAGEβ€”
input_3optIMAGEβ€”
input_4optIMAGEβ€”
input_5optIMAGEβ€”
input_6optIMAGEβ€”
input_7optIMAGEβ€”
input_8optIMAGEβ€”
input_9optIMAGEβ€”

Outputs (1)

NameTypeDescription
selectedIMAGEβ€”