CDL Import
Read a .cdl file and turn it into ten numbers you can wire anywhere
- cdl_data
- slope_r
- slope_g
- slope_b
- offset_r
- offset_g
- offset_b
- power_r
- power_g
- power_b
- saturation
What it does
Reads an ASC CDL file - .cdl, .cc or .ccc - and exposes its contents as outputs. One file path in, eleven values out.
The eleven: cdl_data (a JSON string carrying the whole grade) plus the ten individual numbers as FLOATs - slope_r/g/b, offset_r/g/b, power_r/g/b and saturation. Having both shapes is the point. Wire cdl_data into CDL to apply the grade in one link, or wire the individual floats into whatever you like - your own maths, a comparison, a note, a conditional. Ten loose wires is a lot of wires, but sometimes that's exactly what a graph needs, and there's no "convert to inputs" trick for a JSON blob.
The format handling, and why it's fussier than it sounds
CDL files come in variants. .cdl is a single ColorDecision; .ccc is a ColorCorrectionCollection containing several; .cc is the older ColorCorrection form. Radiance's import covers all three, which is a bigger deal than it sounds - the naming in the wild is inconsistent and people hand you whatever their tool exports.
Parsing goes through defusedxml rather than the standard library's XML parser. That's the right call for a node whose input is an arbitrary file you were sent by someone else; XML parsers have a long and unpleasant history of entity-expansion attacks, and a node ingesting third-party files is precisely where you don't want the naive parser.
Path resolution
This one's got a useful behaviour: a relative path is looked for in ComfyUI's input/ folder first, then output/. Absolute paths are used as given.
So grading/shot_01.cdl means ComfyUI/input/grading/shot_01.cdl if that exists, and ComfyUI/output/grading/shot_01.cdl otherwise. In practice that makes the natural loop work without typing absolute paths: CDL Export writes to a relative path under output/, and CDL Import finds it there. Nice, and easy to miss if you assume relative means "relative to nothing".
Outputs, and the one that matters
cdl_data is the one you'll use 90% of the time. The individual floats exist for graphs that want to display the numbers, compare two CDLs, or feed a value into a non-CDL node.
Nothing here touches pixels, so this node never changes your image on its own. It's a reader.
The workflow it enables
The intended loop, which is worth spelling out because it's the reason these three nodes exist as a set:
- A colourist (or Resolve, or a DIT on set) hands you a
.cdl. - CDL Import reads it,
cdl_datagoes into CDL. - Your image gets the exact grade that was authored elsewhere, applied to the exact encoding it was authored in.
- Change something, re-export with CDL Export, hand the file back.
That round trip is the whole point of CDL as a format, and it's the one thing you cannot do with a pile of bespoke slider nodes.
The realistic beginner use is smaller: you've been sent a .cdl and want to see what's in it. Wire it up, read the numbers, done. That's still worth having.
Install
ComfyUI Manager → search Radiance → install → restart → refresh the browser. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance.git
cd radiance
python -m pip install -r requirements.txt
Windows portable users need ComfyUI's bundled python_embeded\python.exe for that pip call. No model downloads are involved; the relevant dependency is defusedxml, which ships in the pack's requirements.
Gotchas
- A missing file raises. Unlike some nodes in this pack that write failures into a report string, a bad path here fails the node. That's better than silently returning unity values, but it does mean the error surfaces at execution rather than at wiring time.
- Relative paths resolve to
input/thenoutput/. If you dropped the file in a random folder, use an absolute path. - Variable names in the JSON.
cdl_datais designed to plug straight into the CDL node and CDL Export, both of which read the standard slope/offset/power/saturation keys. Feed it somewhere else and you're responsible for knowing the schema. .ccccollections contain several grades. The output reflects the file's contents, not a picker - check what your file holds before assuming it's one decision.- XML you were sent by a stranger. It's parsed safely, but it's still someone else's data describing your grade. Sanity-check the numbers before shipping a shot with them.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | grading/shot_01.cdl | Path to a .cdl, .cc, or .ccc file. A relative path is looked for in ComfyUI's input/ then output/ folder; absolute paths are used as given. |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| cdl_data | STRING | — |
| slope_r | FLOAT | — |
| slope_g | FLOAT | — |
| slope_b | FLOAT | — |
| offset_r | FLOAT | — |
| offset_g | FLOAT | — |
| offset_b | FLOAT | — |
| power_r | FLOAT | — |
| power_g | FLOAT | — |
| power_b | FLOAT | — |
| saturation | FLOAT | — |