ComfyUI Node

Nuke Grade

Lift, gamma, gain in ComfyUI — the Nuke grade node that doesn't need Nuke

By sumitchatterjee13·Created about a year ago·Updated 9 days ago· 59
Nuke Grade
  • image
  • mask
  • IMAGE
lift0.00
lift_r_offset0.00
lift_g_offset0.00
lift_b_offset0.00
gamma1.00
gamma_r_offset0.00
gamma_g_offset0.00
gamma_b_offset0.00
gain1.00
gain_r_offset0.00
gain_g_offset0.00
gain_b_offset0.00
multiply1.00
offset0.00

If you've ever graded footage in Nuke, Resolve, or even a camera plugin, you know the lift/gamma/gain trio the way you know your own name. NukeGrade brings that exact control to ComfyUI: three master sliders, per-channel offsets for each, a multiply and an offset, plus an optional mask to keep the grade where you want it. It's the color-correction node you reach for when "adjust brightness in the VAE decode chain" isn't precise enough.

Why you'd actually use it: ComfyUI's core has no decent grading node. You can fake contrast with a math node, but NukeGrade gives you the filmic workflow - set your blacks with lift, your mids with gamma, your whites with gain - and it does it on float images, so it behaves on EXR data, not just 8-bit JPEGs. It's also where a lot of "make the generated image look like it was shot on a camera" grading starts: feed it a VAE-decoded image, crush the lift, warm the gain, and the thing instantly stops looking like raw model output.

How it works

The math is the classic Nuke formula, computed per channel on a PyTorch tensor: ((rgb + lift) ^ (1/gamma)) * gain, then * multiply + offset. The per-channel offsets (lift_r_offset, gain_b_offset, etc.) just add onto the master before the formula runs, so you can warm up red without touching the global lift. Alpha passes through untouched, and the final result gets clamped to 0–1.

The mask is the hidden gem. Drop any IMAGE into mask and the grade blends against the original using the mask's first channel - resized to match if the dimensions differ. That's how you darken only a background, or grade a face without dragging the whole frame.

The inputs that matter

You'll live on five knobs and mostly ignore the rest:

  • lift (−1 to 1): offset the blacks. Default 0.
  • gamma (0.1 to 3): curve the mids. 1 is neutral.
  • gain (0 to 3): scale the highlights. 1 is neutral.
  • multiply (0.01 to 3) and offset (−1 to 1): the global final tweaks.

The per-channel *_r_offset / *_g_offset / *_b_offset trio exists for every master - they're how you do a white-balance nudge. The single output is an IMAGE, ready for a Preview or a Save.

Installing it

NukeGrade ships inside the Nuke Nodes pack, so one install brings every Nuke-style node. In ComfyUI Manager, search "Nuke Nodes" and install. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/sumitchatterjee13/nuke-nodes-comfyui.git nuke-nodes
cd nuke-nodes
pip install -r requirements.txt

Restart ComfyUI and the node lives under Add Node → Nuke → Color. No model files, no checkpoints - this is pure image math, so there's nothing to download and nothing that changes between versions of a checkpoint.

Gotchas

  • Work in one colorspace. If the rest of your graph is in sRGB-encoded space and you're grading, your gamma curve will fight the transfer function. Grade where your images live; if you're on a Nuke-style linear pipeline, put this after a NukeRead with colorspace="linear" so your lift/gain numbers mean what you think.
  • The clamp. Everything is clamped to 0–1 at the output. Grading past white will flatten highlights rather than roll them - for a proper filmic roll you'll want to grade before the final tonemap, or keep values conservative.
  • Mask gotcha: the mask input is an IMAGE, not a MASK. Feed it a real image - a VAE-decoded mask becomes a black/white image anyway, but a raw MASK tensor won't plug straight in.
  • This pack is young and small (basically no community footprint yet), so if a behavior surprises you, check the source rather than hunting for forum lore - there isn't any.
CategoryNuke/Color

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
liftFLOAT0.00-1–1
lift_r_offsetFLOAT0.00-1–1
lift_g_offsetFLOAT0.00-1–1
lift_b_offsetFLOAT0.00-1–1
gammaFLOAT1.000.1–3
gamma_r_offsetFLOAT0.00-2–2
gamma_g_offsetFLOAT0.00-2–2
gamma_b_offsetFLOAT0.00-2–2
gainFLOAT1.000–3
gain_r_offsetFLOAT0.00-2–2
gain_g_offsetFLOAT0.00-2–2
gain_b_offsetFLOAT0.00-2–2
multiplyFLOAT1.000.01–3
offsetFLOAT0.00-1–1
maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE