Nodes/ComfyUI-NL_Nodes/🎨 NL Log To Linear
ComfyUI Node

🎨 NL Log To Linear

Log to linear in one node, for when your plate is a log video

By NOLABEL-VFXΒ·Created 9 months agoΒ·Updated 2 months agoΒ· 0
🎨 NL Log To Linear
  • images
  • image
  • image_info_json
β—„image_info_jsonβ€”β–Ί

If you've ever loaded a log-encoded video (S-Log, V-Log, LOG C - any of the "flat, washed out" camera curves) into a diffusion pipeline and watched it come out looking like mud, you already understand why NL Log To Linear exists. It converts an image tensor from the OCIO compositing_log role into the scene_linear role - in plain terms, it takes footage that's stored in a log encoding and turns it into proper linear light, which is what the model and your grading tools actually want to do math on.

The whole point of log encoding is to cram more dynamic range into a fixed bit depth; the whole point of this node is to undo that so your values are physically meaningful again. Diffusers, colorists, and linear-light compositing all agree on linear. Start with a log plate, and if you grade it without converting, your "darken" slider is lying to you about what it's doing.

The node is deliberately minimal: images in, image out, plus optional image_info_json passthrough from an upstream NL node so the pipeline keeps its color metadata. That's the entire interface. No mode selector, no curve choices - the conversion is defined by the OCIO config the pack is running under, which is exactly how a managed pipeline should work. You don't pick a Log-C vs S-Log curve here; that interpretation happens upstream at read time, in the input_colorspace handling.

When to use it

Reach for it when your source is genuinely log-encoded and the pipeline hasn't already normalized it. In practice, NL Read already normalizes color sources into the working space when it loads them, so this node is for the cases where a tensor shows up mid-graph already in log form - say, extracted from a video with a non-NL node, or read with color_role set to data and converted by hand. If your image looks "flat" and you can't tell if it's log or just a bad render, this node is also a decent diagnostic: run it and see if contrast reappears.

Install

Standard pack route:

cd ComfyUI/custom_nodes
git clone https://github.com/NOLABEL-VFX/ComfyUI-NL_Nodes

or ComfyUI Manager β†’ "ComfyUI-NL_Nodes", restart. Requires the color pipeline dependencies - PyOpenColorIO and OpenEXR from requirements-color.txt - since it's doing a real OCIO role conversion. Without them this node won't do its one job. And its sibling NL Linear To Log is the round-trip inverse, so if you're shipping linear footage back to a log-based delivery, that's the pair you want.

CategoryNOLABEL/Color

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEInput image tensor in the OCIO compositing_log role.
image_info_jsonoptSTRINGOptional serialized image metadata from upstream NL node.

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
image_info_jsonSTRINGβ€”