Nodes/ComfyUI-OCIO/OCIO CDLTransform
ComfyUI Node

OCIO CDLTransform

The CDL grade that works in a color pipeline, not just on a screenshot

By SlavaSexton·Created 2 months ago·Updated 3 days ago· 99
OCIO CDLTransform
  • image
  • video
  • image/sequence/video
  • ComfyUI Video
slope_r1.000
slope_g1.000
slope_b1.000
offset_r0.000
offset_g0.000
offset_b0.000
power_r1.000
power_g1.000
power_b1.000
saturation1.000
directionforward
mix1.00

If a colorist ever hands you a grade as a CDL - or you're the one who has to become the colorist for an AI plate - this is the node you want. OCIO CDLTransform is the ASC CDL grade, which is the industry-standard way to describe a primary color correction: three numbers per channel plus a saturation, nothing else. It's the same math Nuke's OCIOCDLTransform runs, rebuilt as a ComfyUI node on the OpenColorIO engine. No API, no key, no model download - it's a pure color operator.

What makes CDL worth reaching for over a generic brightness/saturation node is that it's a defined, portable language. Slope, offset and power have agreed-upon meanings and an agreed-upon order (offset is applied before power - a nuance people get burned on). The same numbers can travel as a .cdl or .ccc file to a real grading suite, and this pack's OCIO FileTransform node will apply those files back. The pack also publishes its accuracy numbers: CDL matches the raw OCIO CPU processor bit for bit (max abs error 0.000e+00 across the measured transforms), so what this node computes is exactly what Nuke and Resolve compute.

The inputs that matter

  • slope_r / slope_g / slope_b (default 1) - a multiply. Think exposure and contrast. Values above 1 push highlights.
  • offset_r / offset_g / offset_b (default 0) - an add, applied before power. This is your lift / black point.
  • power_r / power_g / power_b (default 1) - a gamma. Curves the mids and tails.
  • saturation (default 1) - overall color intensity, 0 is grayscale.
  • direction - forward applies the grade; inverse undoes it. Keep a copy of your numbers and you've built a round-trip.
  • mix (default 1) - blends with the original image. 0.0 is a bypass. Handy when you want 60% of a grade.

The whole node also rides ComfyUI's native VIDEO wire: the image and video inputs are mutually exclusive - connect one and the other disconnects - and a VIDEO in gives you a VIDEO out. So you can drop Load Video → OCIO CDLTransform → Save Video straight into a native video graph and grade a clip without ever touching frames.

Outputs are image/sequence/video and ComfyUI Video. Both carry the graded result.

Installing it

This ships in the ComfyUI-OCIO pack by Slava Sexton (AI VFX NEWS), the Nuke-style OCIO set. Easiest is ComfyUI Manager: search "ComfyUI-OCIO", then in the Select Version dialog pick Nightly - the numbered registry entries (1.2.3, 1.2.4) are old and flagged after a scan read the pack's ffmpeg calls as a risk, so Latest gives you stale code. Or clone it yourself:

cd ComfyUI/custom_nodes
git clone https://github.com/SlavaSexton/ComfyUI-OCIO
pip install -r ComfyUI-OCIO/requirements.txt

Restart and the nodes appear under OCIO. Everything except OCIO LogConvert needs opencolorio; video needs a full ffmpeg build on your PATH.

Where people trip

This node doesn't clamp. A slope of 2 on a display-referred image pushes values past 1.0, and they stay past 1.0 - which is exactly what you want when the result is headed to a float EXR, and exactly what will look blown on an 8-bit preview. Don't fight the node; previews clip, the data doesn't. If you're on ordinary SDR content and just want a nicer look without leaving the range, keep saturation modest and let mix do the heavy lifting. And if you want to send the grade somewhere, wire this into OCIO Write with a float output and the numbers survive intact.

CategoryOCIO

Inputs (14)

NameTypeDefaultDescription
slope_rFLOAT1.000-10–10
slope_gFLOAT1.000-10–10
slope_bFLOAT1.000-10–10
offset_rFLOAT0.000-10–10
offset_gFLOAT0.000-10–10
offset_bFLOAT0.000-10–10
power_rFLOAT1.000-10–10
power_gFLOAT1.000-10–10
power_bFLOAT1.000-10–10
saturationFLOAT1.0000–4
directionCOMBOforward2 options: forward, inverse
mixFLOAT1.000–1Blend with the original: 1.0 = full effect, 0.0 = bypass.
imageoptIMAGE
videooptVIDEO

Outputs (2)

NameTypeDescription
image/sequence/videoIMAGEImage with the ASC CDL grade applied.
ComfyUI VideoVIDEO