Nodes/ComfyUI-RndNanthu/🎥 Color Space Simulator
ComfyUI Node

🎥 Color Space Simulator

Make your generated image look like it was shot in S-Log3 — or LogC, or C-Log

By rndnanthu·Created about a year ago·Updated 9 months ago· 28
🎥 Color Space Simulator
  • image
  • out
target_profileSony S-Log3
simulate_camera_encodefalse
enable_gammafalse
gamma_value2.20
enable_lutfalse
lut_nameNone
profile_strength1.00
enable_tone_maptrue
contrast_boost1.05

ColorSpaceSim does one very specific party trick: it takes your flat, SDR, generated image and makes it look like it was recorded by a camera shooting a log profile. Pick Sony S-Log3, Arri LogC, or Canon C-Log and the node applies the corresponding camera curve - the flat, desaturated, wide-dynamic-range look you see on-set before anything's graded. It's the color-science cousin of the pack's LogReconstructionNode, but where that one goes AI → log for compositing, this one is more about looks: log as a creative starting point, or a convincing "shot on camera" vibe.

The filmic framing matters here. ComfyUI images are born in sRGB with the punch dialed in. Real footage arrives flat in log precisely so a colorist has headroom to grade. By squashing your image through a log curve, you buy back that headroom and get a much more natural base for a grade - which is exactly the workflow the KB's photorealism notes push for: AI images run oversaturated and high-contrast, so pulling the saturation back and working from a flatter starting point gets you closer to "captured" than "rendered."

How it works

Everything is tensor math on your GPU - no model, no LUT required. The pipeline: optionally linearize (when simulate_camera_encode is on), apply the selected camera curve, run a gentle Reinhard-style tone rolloff (x / (x + 0.25)), optionally apply a gamma, optionally run a .cube LUT, then a contrast boost. The whole result is blended with the original by profile_strength, so 1.0 is full conversion and 0 is passthrough.

One thing to be straight about: these curves are approximations of the vendor formulas, not an OCIO-accurate color-managed conversion. They'll give you a very believable S-Log3 or LogC look. They won't match a real Alexa's LogC output to the decimal point. If that level of accuracy matters, you want an actual color pipeline - this is a looks node.

The inputs that matter

  • target_profile - the dropdown: Sony S-Log3, Arri LogC, Canon C-Log, Rec.709. Note that Rec.709 is effectively the "no curve" option - the code only implements the three log curves, so picking Rec.709 mostly means "leave it alone." Don't expect it to do a 709 conversion.
  • simulate_camera_encode - when on, it linearizes the sRGB input first, which is the technically correct order for log encoding. On by default gives the more "real" result; turn it off for a punchier, more stylized flatten.
  • enable_lut + lut_name - the LUT option. Here's the gotcha: the dropdown is built by scanning the pack's assets/luts folder at startup, and that folder ships empty. Until you drop your own .cube files in there and restart ComfyUI, the only option is "None". The LUT path uses torch's grid_sample, so it runs on GPU.
  • profile_strength - the blend between original and converted. 0.6–0.8 gives you "loggy but not flat-out washed."
  • enable_tone_map (on by default) and contrast_boost (default 1.05) - the shape controls. If the result looks too flat, bump the contrast boost rather than turning off the tone map.

Output

One output, out (IMAGE). Wire it into a preview, a SaveImage, or straight into ProColorGrading to grade your freshly flattened image. That log → grade → grain chain is where this node earns its keep.

Install

It's part of the RndNanthu pack - install once, get all the color nodes:

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

Then restart ComfyUI. Manager users: search "ComfyUI-RndNanthu". Dependencies are torch, numpy, opencv-python, Pillow, matplotlib, imageio - nothing exotic, no model downloads. The whole pack is CC BY-NC 4.0, so non-commercial use only.

Where people get burned

  • The LUT dropdown is empty until you add files. Drop .cube files into ComfyUI/custom_nodes/ComfyUI-RndNanthu/assets/luts/ and restart - the options appear at import time, not dynamically. This is the #1 "where are my LUTs?" moment.
  • It processes the whole batch, which is actually the good news - unlike most nodes in this pack, it doesn't just take frame 0. But that means a big batch can be slower per-frame since the curve math runs on everything.
  • "Rec.709" won't do what you hope. It's the passthrough target, not a conversion. If you want a true 709 transform, do it in the color conversion nodes before this one.

If your mental image is "log footage to grade," this is the node. It's a vibe generator with surprisingly good mechanics - just remember the approximations aren't color-accurate and the LUTs need a manual drop-in first.

Categoryrndnanthu/🎨Color Tools

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
target_profileCOMBOSony S-Log34 options: Sony S-Log3, Arri LogC, Canon C-Log, Rec.709
simulate_camera_encodeBOOLEANfalse
enable_gammaBOOLEANfalse
gamma_valueFLOAT2.200.1–5
enable_lutBOOLEANfalse
lut_nameCOMBONone1 options: None
profile_strengthFLOAT1.000–1
enable_tone_mapBOOLEANtrue
contrast_boostFLOAT1.050.5–2

Outputs (1)

NameTypeDescription
outIMAGE