AM OCIO Log Convert
The two-way door between linear and log
- image
- video
- image
- video
AM OCIO Log Convert is the pack's most boring node and one of its most useful. It does exactly one thing: convert between scene-linear and a log encoding, both directions, via whatever OCIO config is active. One checkbox, one job.
It's part of comfyui-am-vfx-tools ("AM VFX Tools/Color" category), Adrian Meyer's 13-node VFX toolkit. In the pack's own framing, it's "useful as the boundary node when feeding scene-linear output into log-trained samplers and back."
Why a log boundary node exists at all
Some diffusion models - and a decent chunk of video models - are trained on log-encoded or otherwise non-linear data, not raw scene-linear. When your pipeline is properly color-managed (read → linear working space → model → back to linear), you sometimes need to hand the sampler log pixels and then undo it afterward. This node is the door: reverse off goes scene-linear → compositing_log; reverse on goes back.
The exact curve isn't hardcoded. It's whatever the active OCIO config binds its scene_linear and compositing_log roles to - ACEScg in ACES configs, Linear Rec.709 in legacy ones, and the Cineon-style log from the compositing_log role. Same code, works across Studio, CG, or a custom config. That's the OCIO way and it's the right way: you never guess at a curve, you let the config be the source of truth.
The inputs
One widget, reverse (off = linear → log, on = log → linear), plus optional image and video. The video path is lazy per-frame like every node in the pack, and alpha passes through untouched. Outputs are image - same primaries as the input, different encoding curve - and video.
Honestly, that's the whole node. If the compositing_log role isn't bound in your config, the transform degrades to whatever the config can do - so its behavior is only as good as the config you loaded. That's not a bug, it's the design: config-driven, the way a real VFX pipeline wants it.
Installing it
Same as every node in the pack - one install, all 13 nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/am-pipeline-prod/comfyui-am-vfx-tools.git
cd comfyui-am-vfx-tools
pip install -r requirements.txt
Restart ComfyUI, or search comfyui-am-vfx-tools in ComfyUI Manager. The opencolorio>=2.5.0 dependency comes from that pip line.
Where people get burned
The trap is expecting it to do something when there's no meaningful config. On the identity stub (the pack's last-resort config), log convert is a no-op that looks successful - you'll think you converted and nothing happened. If your log conversion seems to change nothing, check that you're actually on a real config, and check which direction you asked for. For the 90% case - a color-managed pipeline with a real config, feeding a log-trained model - this is the exact node you reach for.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| reverse | BOOLEAN | false | Off (default): scene_linear → compositing_log. On: compositing_log → scene_linear. The exact curve is whatever the active OCIO config binds those roles to — config-driven, same code works across Studio / CG / custom configs. |
| imageopt | IMAGE | Image batch to transform. Default direction expects linear pixels in the active OCIO config's `scene_linear` role — typically ACEScg in ACES configs, Linear Rec.709 in legacy configs. Reverse direction expects the `compositing_log` role (Cineon-like). | |
| videoopt | VIDEO | Optional VIDEO input. When wired, returns a lazy `OCIOTransformVideo` wrapper applying the lin↔log transform per-frame on consumption — no IMAGE materialisation here. Alpha (when present) passes through untouched. `image` is ignored when `video` is wired. See invariant 28. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Log/Lin-converted IMAGE — same primaries as the input, different encoding curve (linear ↔ Cineon-like log per the active OCIO config). |
| video | VIDEO | Lazy VIDEO output — emits an `OCIOTransformVideo` wrapper when `video` is wired, else a zero-copy `VideoFromComponents` around the IMAGE batch. None when no input is wired. |