Nukomfy OCIO ColorSpace
The bridge between ComfyUI's sRGB tensors and a scene-linear comp
- image
- image
ComfyUI lives in sRGB-encoded tensors in a 0–1 range. A VFX comp lives in scene-linear float with a wide gamut, managed by OCIO - usually ACES. Those two worlds do not agree, and the moment you hand raw ComfyUI output to a Nuke comp, every blend, merge, and grade is wrong: gamma-encoded values treated as linear light blow out, and no amount of tweaking the grade fixes a decode that never happened.
Nukomfy OCIO ColorSpace is the honest bridge. It's a mirror of Nuke's own OCIOColorSpace node: pick the colorspace the image is currently in, pick the one you want it in, and it converts using the active OCIO config - by default the ACES Studio Config v4.0.0 (ACES 2.0) that the suite loads at boot.
And a fair warning before you go down this path, straight from the color-management folks: if you're a solo generator making finished images, you don't need any of this and the sRGB path is correct. This node exists for the moment your AI output has to survive as an element in a color-managed shot next to real footage. Then you need it, and you need it correct - a single un-managed decode poisons the whole comp.
How it works
Under the hood it's an OpenImageIO colorconvert against the active config, called with unpremult=True. That last bit is the detail that shows someone thought about compositing: alpha is unpremultiplied around the transform so partially transparent pixels don't get colored halos at their edges.
Two properties to note. The transform is direct - input to output with no intermediate round-trip through a working space, which is what you want to avoid double-applying a curve. And when Input and Output colorspaces are the same, the node returns the image untouched, no conversion cost.
Inputs and outputs
Three inputs, and two of them are the whole job:
- image - the tensor to convert
- Input Colorspace - what the image is already in. Defaults to
Linear Rec.709 (sRGB) - Output Colorspace - what you want. Same default
There's deliberately no auto option: you state both ends. The dropdowns list the full colorspace set from the active OCIO config, which in this suite is the ACES Studio Config - the same list Nuke's OCIO nodes give you when they're pointed at the same config. One output: image, the converted tensor, ready to feed a sampler or a Write node.
Where it fits in a workflow
You reach for this when Nukomfy Read's Apply Color Transform toggle doesn't cover the case. A typical move: keep Read and Write in pass-through mode (Apply Color Transform off on both), and put an explicit conversion in the middle - decode an sRGB plate to linear before it reaches the diffusion model, or convert your linear output to the delivery colorspace just before Write. One conversion point in the graph is easier to reason about than two silent ones.
Install
Same pack, same dance. ComfyUI Manager → search Nukomfy Suite, or:
cd ComfyUI/custom_nodes
git clone https://github.com/francescolorussi/ComfyUI-Nukomfy-Suite
cd ComfyUI-Nukomfy-Suite && pip install -r requirements.txt
The two deps are OpenImageIO>=3.1.10 and fileseq. The version pin isn't cosmetic: the suite's default ACES 2.0 Studio Config ships with OpenImageIO 3.1.10+, so an older OIIO falls back to older configs (still fine, just a shorter colorspace list). No model downloads.
Where people get burned
The colorspace menus are whatever the active config exposes, and configs change when you upgrade OpenImageIO. A saved workflow can reference a colorspace name the new config doesn't have - the node errors at runtime with a message telling you to sync parameters in the Nukomfy Workflow Editor. Annoying, but explicit, which beats a silently-wrong conversion.
Also worth internalizing: this node converts pixels, but it does not tag the output file. If you want the EXR you write to carry the right OCIO colorspace into Nuke, that's Nukomfy Write's Output Transform job. Convert here for the math, tag there for the delivery - use both, or accept that Nuke will guess when it reads your file.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| input_colorspace | COMBO | Linear Rec.709 (sRGB) | Colorspace the input image is already in. The image is converted from this colorspace to the Output Colorspace. When Input and Output match, the image is returned unchanged. |
| output_colorspace | COMBO | Linear Rec.709 (sRGB) | Colorspace the image is converted to. The transform is direct (no intermediate roundtrip). Alpha is unpremultiplied around the transform to avoid halos on partially transparent pixels. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |