OCIO Color Space Converter
The straightforward way to move between OCIO color spaces
- image
- image
- conversion_info
OCIOColorSpaceConverter is the entry point to the pack's OpenColorIO side: image in, source color space name, target color space name, image out. No gamut-compression knobs, no transfer-function gymnastics - just a professional-grade color space conversion using whatever OCIO configuration you point it at (or the pack's bundled default). If you've used OCIO in DaVinci Resolve or a Nuke pipeline, this is that, in a node.
How it works
It loads an OCIO config - Config.CreateFromFile if you give it an ocio_config_path, otherwise the environment's current config - validates that your source_colorspace and target_colorspace names actually exist in it, runs the transform through PyOpenColorIO, handles the alpha channel, and returns the image plus a conversion_info JSON describing the transform. That's it. The color space names are typed as strings rather than dropdowns, which is deliberate: a dropdown can only list the spaces in the bundled config, but OCIO configs (especially ACES) have dozens or hundreds of spaces. Typing names is how you reach spaces your config knows about but the UI author never anticipated.
The inputs that matter
- image - IMAGE tensor, as usual.
- ocio_config_path - optional. Leave empty to use the current/default OCIO config; fill in a path to a
.ociofile (like an ACES config you downloaded) to use that. The README's example points atC:\ProgramData\OpenColorIO\config.ocioor/usr/local/share/OpenColorIO/config.ocio. - source_colorspace / target_colorspace - names from your config. The defaults are
sRGB→Linear sRGB, which is a perfectly sensible first test: run it on a test image, confirm it went linear, then start exploring.
The obvious next step is wiring this behind the pack's TestPatternGenerator - generate a known pattern, push it through the conversion, and see exactly what the transform does to known colors. That's the workflow the README recommends, and it's a genuinely good way to sanity-check any OCIO setup.
Install and the one thing that'll trip you up
Pack install is the standard: ComfyUI Manager, search "ComfyUI Color Profile Reader," or:
cd ComfyUI/custom_nodes
git clone https://github.com/APZmedia/ComfyUI-color-tools
Restart after (and the README's clone URL is a placeholder - use APZmedia/ComfyUI-color-tools). But for this node specifically, PyOpenColorIO has to be present. install.py attempts it automatically on startup, but if it's not installed the OCIO group simply fails to register with a console warning - you'll open the node list and these just won't be there. The fix:
pip install opencolorio
A quick reality check while you're here: OCIO is niche in the ComfyUI community - it comes up in maybe a handful of threads a year - so don't expect workflow templates to use it. This is a bring-your-own-color-science situation. Which is fine; if you need it, you know why you need it. If you just want your images to not be washed out, this node is overkill - start with the pack's QuickColorSpaceFix instead.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| ocio_config_path | STRING | — | |
| source_colorspace | STRING | sRGB | — |
| target_colorspace | STRING | Linear sRGB | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| conversion_info | STRING | — |