(deforum) ColorMatch Parameters
Pick your anchor and color space
- deforum_data
- deforum_data
(deforum) ColorMatch Parameters is where you configure color coherence; the (deforum) Color Match node is where it happens. This is the parameters half of that pair - a config node in the deforum/parameters chain that decides whether to fight color drift, what to anchor the video's colors to, and which color space to do the matching in. It merges five settings into the deforum_data dict that flows to the rest of the pipeline, and it's where beginners should look first when their animation's colors crawl away from them over time.
The inputs that matter
color_coherence- the big one:None,HSV,LAB,RGB,Video Input,Image.Nonedisables coherence entirely (color drift allowed).HSVandLABare the usual picks for keeping natural colors - HSV matches hue/saturation, LAB works on perceptual color, and both preserve detail better than the naiveRGB.Video Inputanchors against frames of an init video;Imageanchors against a static image (used with the image-path setting below).color_coherence_image_path- whencolor_coherenceisImage, this is the path to the reference image the animation will be graded toward.color_coherence_video_every_N_frames- forVideo Inputmode: how often to refresh the color sample from the init video. Default 1 means grab a fresh reference every frame; higher values sample less often.color_force_grayscale- force every frame to grayscale. A one-click noir filter, essentially; also a clean way to test whether coherence itself (vs. hue) is what's fixing your drift.legacy_colormatch- use the old Deforum color-matching algorithm instead of the newer one. Flip it if the modern matcher produces oversaturation or artifacts on your content; it's a compatibility switch from the A1111 Deforum days.
How it works
Like every Deforum parameters node, it inherits the pack's config-merging base: take the incoming deforum_data dict, update it with these settings, pass it along. Nothing is computed here - the actual color remapping happens later in the Color Match node on each frame, which reads color_coherence (and the sample) out of this dict. So this node is configuration-as-data: chain it after (deforum) Base Parameters in the params row, and make sure the dict reaches the pipeline that runs the per-frame color node.
Installing it
Part of Deforum Nodes (XmYx). ComfyUI Manager → "Deforum Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart and let first-boot install.py finish (opencv-contrib-python, moviepy, numpy<2.0.0, deforum-studio backend). Python 3.10 per the README.
Where people get burned
The classic trap: setting color_coherence to Image but leaving color_coherence_image_path empty - the node then has no anchor, and behavior gets unpredictable. Set the path when you pick the mode. The second one is treating color_force_grayscale as a styling extra instead of what it is: a hard switch that strips all color from every frame, so don't leave it on by accident. And if your colors look oversaturated after enabling coherence, try LAB instead of HSV, or the legacy_colormatch toggle - the two algorithms genuinely disagree on aggressive content.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| color_coherence | COMBO | 6 options: None, HSV, LAB, RGB, Video Input, Image | |
| color_coherence_image_path | STRING | — | |
| color_coherence_video_every_N_frames | INT | 1 | — |
| color_force_grayscale | BOOLEAN | false | — |
| legacy_colormatch | BOOLEAN | false | — |
| deforum_dataopt | deforum_data | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| deforum_data | deforum_data | — |