AfterDark Film LUT
Your Lightroom .cube LUTs, plugged into ComfyUI in two milliseconds
- image
- image
A 3D LUT is the colorist's universal format: one .cube file that remaps every RGB triple, and there are thousands of them free - film emulations, camera "looks," the whole Lightroom preset scene exports to them. AfterDark Film LUT reads those files straight out of ComfyUI/models/luts/ and applies them with GPU trilinear interpolation in about two milliseconds. If you already own LUTs, this is arguably the most immediately useful node in the whole pack: it upgrades your baseline grade with zero prompting.
It lives in the HackAfterDark category alongside the rest of the AfterDark Film nodes. This is the one that does the heavy lifting - while Color Split gives you a teal/amber grade and Grain gives you the texture, a real LUT gives you an entire bespoke color pipeline as one dropdown.
How it works
The node parses an Adobe .cube file - reading LUT_3D_SIZE and the data rows, reshaped into a 3D lookup tensor - then runs it through torch.nn.functional.grid_sample for trilinear interpolation on GPU. That's the fast, resolution-independent way to do a 3D LUT, and why it's sub-2ms. Around that core are the useful bits:
- strength (0–1) alpha-blends between the original and the graded result, so you can dial a heavy LUT back to "barely there."
- color_space offers
sRGB (Standard),Linear -> sRGB, andsRGB -> Lineartransfers. Log or linear film-print LUTs expect linear input; decode to linear, apply, re-encode - the node handles the round trip. - contrast (0.5–1.5) pivots midtones after the LUT, and black_lift (0–0.1) raises shadows to simulate film toe density.
Output is a single image (IMAGE), so it slots after VAE decode and before save, or in a chain with the pack's other film nodes.
Getting LUTs into it
The node looks in two places, recursively: ComfyUI/models/luts/ (your central folder, created automatically if missing) and the pack's own luts/ folder. Because your files live in ComfyUI's model directory, they survive node updates - that's the right pattern, same as checkpoints.
mkdir -p ComfyUI/models/luts
# drop your .cube files in there, then refresh the node (or restart ComfyUI)
Installing it
Same one-time setup as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/hackafterdark/ComfyUI-HackAfterDark-Nodes
Then restart, or install via ComfyUI Manager by searching "HackAfterDark" (pack title AfterDark Film AR Selector). No models to download, no API key. The pack's requirements.txt pulls in google-generativeai for its Gemini node, but the LUT node itself only needs torch - already in ComfyUI.
Where people get tripped up
The dropdown showing "No LUTs found" just means your models/luts/ folder is empty - it's the pack's own sentinel value, not an error. A LUT that looks washed out or crushed is usually a gamma mismatch: try the Linear -> sRGB / sRGB -> Linear options. And one real constraint from the code: it requires a 3-channel RGB image and will raise a ValueError if you feed it an RGBA tensor - strip the alpha first if your pipeline carries one. Keep clip_output on unless you're chaining into something that wants float headroom.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| lut_file | COMBO | 1 options: No LUTs found | |
| strength | FLOAT | 1.000–1 | — |
| contrast | FLOAT | 1.000.5–1.5 | — |
| black_lift | FLOAT | 0.0000–0.1 | — |
| color_space | COMBO | sRGB (Standard) | 3 options: sRGB (Standard), Linear -> sRGB, sRGB -> Linear |
| clip_output | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |