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

β­† Big Palette Switch

Swap color palettes with a single number

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
β­† Big Palette 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β–Ύβ–Ί

The Dream Project pack's palette system is its secret weapon - a way to keep colors consistent across a long animation by sampling, analyzing, and shifting palettes frame by frame. Big Palette Switch [Dream] is the routing node for that system: up to ten RGB_PALETTE inputs, a select integer, and the chosen palette flows out as selected. Think "this section of the video uses the warm palette, that section uses the cool one."

How it works

Standard switch skeleton, palette-flavored. Connect palettes into input_0 through input_9, set select (INT 0–9), and that palette is passed through untouched. on_missing handles empty slots - previous walks backward to the nearest connected palette, next walks forward. Since a palette in this pack is just a list of sampled RGB colors, passing it through the switch costs nothing meaningful.

The inputs that matter

  • select - INT, 0–9. The slot to output.
  • on_missing - previous or next fallback.
  • input_0 … input_9 - the candidate palettes.

Where it fits

The pack's color-coherence workflow produces palettes from Sample Image as Palette [Dream], manipulates them with Palette Color Align / Palette Color Shift, and feeds them into Noise from Palette for consistent coloring. A switch in the middle lets you change the whole color direction at a chosen frame - drive select from a frame counter and the animation shifts from one palette family to another at the beat. It also makes A/B palette testing trivial: two palettes, one number, swap instantly.

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 family gotchas apply - 0-indexed slots, and on_missing silently masking a wrong index by handing you the nearest connected palette. One palette-specific note: the switch only works with RGB_PALETTE type inputs, so don't try to feed it raw images (run them through a sampler node first). And remember the eager evaluation caveat: if a connected palette comes from an expensive image-sampling pipeline, it runs whether you select it or not.

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

Inputs (12)

NameTypeDefaultDescription
selectINT00–9β€”
on_missingCOMBO2 options: previous, next
input_0optRGB_PALETTEβ€”
input_1optRGB_PALETTEβ€”
input_2optRGB_PALETTEβ€”
input_3optRGB_PALETTEβ€”
input_4optRGB_PALETTEβ€”
input_5optRGB_PALETTEβ€”
input_6optRGB_PALETTEβ€”
input_7optRGB_PALETTEβ€”
input_8optRGB_PALETTEβ€”
input_9optRGB_PALETTEβ€”

Outputs (1)

NameTypeDescription
selectedRGB_PALETTEβ€”