Nodes/ComfyTV/CDL Grade
ComfyUI Node

CDL Grade

The colorist's grade, in ten portable numbers

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
CDL Grade
  • video
  • video
force_run_token0
project_id
parent_output_id0
slope_r1.00
slope_g1.00
slope_b1.00
offset_r0.00
offset_g0.00
offset_b0.00
power_r1.00
power_g1.00
power_b1.00
cdl_sat1.00

Most color grading in a node graph is slider chaos - three-way wheels, curves, LUTs, each with its own opinion of how color should work. CDL Grade takes the opposite route: it's an ASC Color Decision List, the industry-standard slope / offset / power model that on-set DITs and finishing suites all speak. Per RGB channel you get a slope (gain), an offset (lift), and a power (gamma), plus one overall saturation. That's it. Ten numbers that any colorist on the planet can read back to you.

The appeal isn't just the math being standard - it's portability. A CDL is ten values, not a baked LUT. You can get a grade from another stage of a real pipeline, type it in, and have the same look. Or balance a clip in the same language your colorist uses before you do anything creative. The KB makes a related point about this whole post-processing layer: most of it isn't AI, and reaching for the deterministic, milliseconds-costing operation instead of a diffusion pass is the right call. CDL is exactly that kind of primitive.

How it works

The math is the ASC standard, applied per channel: (pixel × slope + offset) ^ power, then overall saturation on top. It's a COMFYTV_VIDEO in and out, rendered on a Torch backend as a cdl fx-spec pass with a ▶ Run and a live preview on the node. The pack is careful about the neutral case: if every slope, power, and saturation is 1 and every offset is 0, the clip passes through untouched - no wasted render.

The inputs that matter

Nine grading values, and they group cleanly:

  • slope_r / slope_g / slope_b - per-channel gain, 0–4, default 1. Multiplying the channel: raise it and highlights brighten and gain contrast.
  • offset_r / offset_g / offset_b - per-channel lift, −1 to 1, default 0. Adds a constant, most visible in the shadows.
  • power_r / power_g / power_b - per-channel gamma, 0.1–4, default 1. An exponent on the midtones: below 1 brightens mids, above 1 darkens them.
  • cdl_sat - saturation after the SOP math, 0–4, default 1. 0 is fully desaturated, above 1 boosts.

Output is video (COMFYTV_VIDEO).

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart the backend (not just the tab); nodes appear under ComfyTV. ComfyUI Manager finds the pack by searching "ComfyTV". The README's two recurring gotchas: on Desktop/macOS/multi-install setups the relative cd can clone into the wrong instance - read the startup log for the real base path and clone into that absolute path, quoted - and custom_nodes/ComfyTV/ must contain __init__.py at its first level, not a nested ComfyTV/ComfyTV/ folder. Zero Python dependencies to install.

Troubleshooting and tips

  • Run changes nothing. You're fully neutral. At least one value must be off default - that's by design, not a bug.
  • Order matters. Slope and offset act first, power last, then saturation. Set your balance with slope/offset before shaping mids with power; that's the SOP discipline, and it's why the node exists.
  • Hands-on instead of numeric? The docs point to Video Color (wheels and levels) for that; CDL is for when you specifically want the SOP model. If a slider-grade result leaves you wanting a portable number set, this is the honest upgrade.
CategoryComfyTV/VideoFX

Inputs (14)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
slope_rFLOAT1.000–4
slope_gFLOAT1.000–4
slope_bFLOAT1.000–4
offset_rFLOAT0.00-1–1
offset_gFLOAT0.00-1–1
offset_bFLOAT0.00-1–1
power_rFLOAT1.000.1–4
power_gFLOAT1.000.1–4
power_bFLOAT1.000.1–4
cdl_satFLOAT1.000–4
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO