Nodes/ComfyUI-VideoColorGrading/Generate Color LUT (VCG)
ComfyUI Node

Generate Color LUT (VCG)

Turn one reference image into a reusable 3D LUT — the expensive part, done once

By kijai·Created 5 months ago·Updated 5 months ago· 63
Generate Color LUT (VCG)
  • vcg_pipeline
  • reference_image
  • source_frames
  • preprocessed_frames
  • lut
steps25
seed42

This is the node that actually does the hard thinking in the VideoColorGrading pack. Generate Color LUT (VCG) takes a reference image - a still with the color look you want - plus the frames of your source video, and produces a 16³ 3D LUT that transfers that look onto the footage. It's a port of the ICCV 2025 paper Video Color Grading via Look-Up Table Generation, and it's the one place in this workflow where diffusion actually runs. Everything else in the pack is just applying the result.

Why this design is smart: instead of running a diffusion model over every frame (slow, and it flickers), you run it once to bake a reusable LUT, then apply the LUT per-frame for free. Generate it, tweak strength on the apply node to your heart's content, and never re-run this again for the same clip and reference.

How it works

There are three moving parts, and the flow is:

  1. Color-transfer preprocessing. Your source frames get a classic Monge-Kantorovitch (MKL) linear color transfer toward the reference, computed on downscaled frames. This rough global push is what comes out the preprocessed_frames output.
  2. ReferenceNet attention bank. A CLIP ViT-B/32 encoder finds the source frame most similar to your reference, then a ReferenceNet (an SD1.5-sized UNet) runs over the reference and matched-frame latents and records a bank of ref-minus-source attention features - the "what's different between these two looks" signal.
  3. The L-Diffuser. A second UNet starts from random noise shaped like an unfolded identity LUT (16³ = 4096 values, laid out as a 64×64 image) and DDIM-denoises it for your steps count, conditioned on that CLIP difference. What comes out is a residual you add back to the identity LUT - your final color LUT.

Both UNets are SD1.5 architecture, so nothing exotic is going on under the hood; the whole checkpoint is about 4.1GB. The internal working resolution is 512×512, so you don't need to care what size your source video is.

The inputs that matter

  • vcg_pipeline - the VCG_PIPELINE output of the Load VCG Model node. Nothing runs without it.
  • reference_image - the still with your target color style. Only the first image in the batch is used.
  • source_frames - your video frames, as a single IMAGE batch (from VHS_LoadVideo or similar). All frames get preprocessed; the best match to the reference drives the latent conditioning.
  • steps (int, default 25, max 100) - DDIM denoising steps. More steps, more refinement, slower. 25 is a sane default; the model won't collapse at 40+ if you want a cleaner LUT.
  • seed (int, default 42) - the usual reproducibility knob.

The outputs

Two of them, and you'll want both:

  • preprocessed_frames - the color-transferred frames. Feed these into VCGApplyLUT's images input. The tooltip is explicit: "apply LUT to these."
  • lut - a VCG_LUT-typed 16³ LUT. Wire it into VCGApplyLUT's lut input. This is the reusable asset; you could even cache it and skip regenerating.

Install

Same pack-wide steps as the other VCG nodes: install via ComfyUI Manager (search "VideoColorGrading") or cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-VideoColorGrading and restart. No requirements.txt - it leans only on ComfyUI's built-in stack - but it uses ComfyUI's newer node API, so keep your ComfyUI updated.

Then grab the checkpoint from HuggingFace: vcg_combined_fp16.safetensors, about 4.1GB, into ComfyUI/models/checkpoints. It holds the CLIP, VAE, ReferenceNet, and L-Diffuser in one file, which is why the loader is so simple.

Gotchas

This is the slow node in the pack - two UNet forwards plus a 25-step DDIM loop, all at 512×512. On a mid-range card it's a "go make a coffee" kind of wait, not a "this is broken" wait. And since only the first reference image is used, don't bother feeding a batch of references expecting it to average them. Finally, if you see a missing node error in an old workflow, it's the ComfyUI API version, not the pack: update ComfyUI before you blame the node.

The author's reputation is worth trusting here - kijai is the community's busiest ComfyUI porter, the person who ships day-one support for basically every major video model (Wan, LTX) and fixes launch-week breakage for everyone else. If he wrapped a paper, it usually means the paper deserved a wrapper.

Categoryvideo/color-grading

Inputs (5)

NameTypeDefaultDescription
vcg_pipelineVCG_PIPELINE
reference_imageIMAGEReference image with target color style
source_framesIMAGESource video frames
stepsINT251–100DDIM denoising steps
seedINT420–18446744073709550000

Outputs (2)

NameTypeDescription
preprocessed_framesIMAGEColor-transferred frames (apply LUT to these)
lutVCG_LUT