MCPcopy Index your code
hub / github.com/SlavaSexton/ComfyUI-OCIO

github.com/SlavaSexton/ComfyUI-OCIO @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
448 symbols 1,303 edges 26 files 125 documented · 28% updated todayv1.2.2 · 2026-07-07★ 631 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OCIO Nodes for ComfyUI - by AI VFX NEWS, Slava Sexton

ComfyUI-OCIO

Nuke-style OpenColorIO color nodes for ComfyUI.

Read a sequence, grade in ACES, write ProRes - fully color-managed.

Now on ComfyUI's native VIDEO wire: color-manage HDR, LTX, Flux, Cineon and 10-bit clips inside a native video graph.

By AI VFX NEWS · Slava Sexton.

License: MIT ComfyUI OpenColorIO ACES


Nine color-management nodes for ComfyUI, modelled on The Foundry Nuke's OCIO node set and backed by OpenColorIO with the built-in ACES config. Convert between colorspaces, grade with ASC CDL, apply a display transform or a LUT, scrub the result in an on-node viewer, and - the two big ones - Read any still / image sequence / video off disk and Write it back out color-managed, in EXR / TIFF / PNG / JPEG or ProRes / DNxHR / h264 / hevc.

Every node is a standard ComfyUI node, so it interoperates with the whole ecosystem on plain IMAGE / MASK / FLOAT / STRING types: pipe OCIO Read into any node, and any node into OCIO Write. The six color nodes now also carry a native ComfyUI VIDEO input and output beside the IMAGE one, so they drop straight into ComfyUI's native video graph as color and light stages: Load Video -> OCIO color node -> Video Combine / Save Video. Same nodes, same math, now on the native VIDEO wire.

The OCIO nodes in a ComfyUI workflow: native Load Image and Load Video feed OCIO Read, ColorSpace, LogConvert, Display, CDLTransform, FileTransform, LookTransform, Player and Write through paired OCIO Img/Seq/Vid and ComfyUI Video sockets

Install

Manual (works today):

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

Restart ComfyUI. The nodes appear under the OCIO category.

ComfyUI Manager: the pack ships a Comfy Registry pyproject.toml, so once it is published to the registry it installs from Manager's node list. Until then, use the manual clone above.

EXR note. OpenCV reads and writes EXR only when OPENCV_IO_ENABLE_OPENEXR=1 is set in the environment before ComfyUI starts. Set it in your launcher (set OPENCV_IO_ENABLE_OPENEXR=1 on Windows, export OPENCV_IO_ENABLE_OPENEXR=1 on Linux/macOS) if you work with EXR.

Requirements

  • OpenColorIO (pip install opencolorio) - the color engine. All nodes except OCIO LogConvert need it.
  • OpenCV (opencv-python-headless), tifffile, Pillow, numpy - image IO.

requirements.txt covers all of the Python packages above (pip install -r requirements.txt).

Video and codecs (ffmpeg)

Stills and image sequences need nothing extra - EXR / TIFF / PNG / JPEG go through OpenCV, tifffile and Pillow, installed by requirements.txt.

Video needs ffmpeg. ffmpeg is the codec engine: ProRes, DNxHR, h264 and hevc all come from it, so OCIO Read / Write shell out to ffmpeg (and ffprobe) for any .mov / .mp4. You install it yourself, once, and it must be a full build (the codecs above are only in full builds) on your system PATH:

  • Windows: gyan.dev full build, or winget install Gyan.FFmpeg.
  • macOS: brew install ffmpeg.
  • Linux: apt install ffmpeg (or your distro's package).

Check it is found with ffmpeg -version in a terminal. If ffmpeg is not on PATH, the still/sequence nodes still work - only the video container in OCIO Read / Write is unavailable, and it says so.

Compatibility: web UI and standalone

The pack runs the same in both places: the ComfyUI web UI in a modern browser (tested in Google Chrome) and the desktop / standalone ComfyUI app. The nodes are pure Python, and the front end is a small web/ bundle that loads in any current browser and in the standalone app alike. There is no OS-specific native code to build. The only external dependency for VIDEO is ffmpeg on your PATH (see above); for EXR, set OPENCV_IO_ENABLE_OPENEXR=1 before ComfyUI starts. Neither is platform-specific: set them once on Windows, macOS or Linux and the nodes behave identically.

Colorspaces, the short version

ComfyUI has no color management: it holds images as plain gamma-encoded sRGB in 0..1. These nodes add the color pipeline on top. The working space is sRGB - Display (what ComfyUI expects); OCIO Read converts files into it and OCIO Write converts out of it. Defaults follow the file type: EXR -> ACEScg (scene-linear render space), JPEG / PNG / TIFF -> sRGB - Display. Colorspace names come from the active OCIO config (the built-in ACES studio-config, ~55 spaces including ARRI / RED / Sony camera spaces); drop a custom .ocio in your input folder to use your own.

The config is ACES 2.0, so a few names differ from the ACES 1.x names you may know from Nuke: Linear Rec.709 (sRGB) is the old Utility - Linear - sRGB, and ARRI LogC3 (EI800) is Input - ARRI - V3 LogC (EI800). The whole camera set is present (ARRI LogC3 / LogC4, RED Log3G10, Sony S-Log3, Canon Log, Panasonic V-Log, Apple Log, and more), just under the 2.0 names. Colorspace conversions match Nuke's; the display transform (OCIO Display) is the ACES 2.0 output, which reads slightly different from an ACES 1.x setup.


Image and Video: native ComfyUI video pipeline

These nodes are pure color and light operators, so they belong anywhere in a graph, on stills or on a moving clip. Each of the six color nodes (ColorSpace, LogConvert, Display, CDLTransform, FileTransform, LookTransform) carries two inputs side by side: an IMAGE input labelled "OCIO Img/Seq/Vid" and a VIDEO input labelled "ComfyUI Video". They are mutually exclusive: connect one and the other auto-disconnects. Only the socket that matches the live input carries real data; the other stays empty (None) at runtime, so a VIDEO in gives you a VIDEO out and an IMAGE in gives you an IMAGE out. Wire the input before the output and this is automatic.

The VIDEO type is ComfyUI's native video (the comfy_api VideoFromComponents, the same type Load Video emits), not a custom wrapper. So the nodes talk directly to Load Video, Save Video, Video Combine, Get Video Components, and VHS. Drop a color node into the middle of a stock video graph and it fits.

Two ends of the wire matter most:

  • OCIO Read exposes a VIDEO output ("ComfyUI Video") that feeds ComfyUI-native video nodes downstream.
  • OCIO Write takes a VIDEO input. Wire Load Video (or any VIDEO source) into it and Write records that native clip to disk with all of its settings: container, codec, output colorspace, bit depth. The container inherits the clip's frame rate. Verified: Load Video -> OCIO Write (video, h264) writes a valid h264 mp4.

The practical result: color-manage and render HDR, LTX, Flux and Cineon plates, and 10-bit Seedance 4K, straight inside a native ComfyUI video graph, without bouncing frames out to a folder and back.


The nine nodes

OCIO Read, OCIO Write and two OCIO Player instances on a live ComfyUI graph: Read's viewer scrubbing a 451-frame clip, Write's video preview playing after a render, two Players at different exposure settings

OCIO Read

Load a still / image sequence / video off disk and color-manage it on the way in (Nuke: Read).

  • source - a path to a file, a sequence folder, a frame pattern (shot.####.exr), or a video, anywhere on disk. Use the 📁 browse source button to pick one; ⬆ upload into input copies files into ComfyUI's input folder instead.
  • frame_mode - auto (a numbered file with siblings loads the whole sequence, Nuke's "grab sequence"), single (just that file), sequence (force-collapse the siblings). A folder is always a sequence; a video is always its full clip.
  • input_colorspace - the colorspace the file is in. Auto-suggested by type (EXR -> ACEScg, else sRGB).
  • output_colorspace - the working space the IMAGE comes out in (default sRGB - Display).
  • raw_data - skip the conversion; pass the file's values through untouched (Nuke's Raw Data).
  • start_frame / end_frame - the frame-number range to load (auto-filled to the detected range). Frames requested outside the range are filled by edge_mode (hold / loop / bounce / black).
  • frame_shift - re-base the numbering: the number the first frame becomes downstream (e.g. a 1001-start sequence -> 1). Flows to OCIO Write.
  • missing_frames - how to fill a gap inside the sequence (a missing frame): black, hold the previous frame, or error. Missing frames are detected automatically and listed on the node and in the info output.
  • fps - taken from the video metadata (24 for stills); flows to OCIO Write through the wire.

Outputs: OCIO Img/Seq/Vid (the frame batch), alpha (MASK, the file's alpha channel), fps, info (frames / resolution / format / range / missing frames), and ComfyUI Video (a native ComfyUI VIDEO of the same color-managed batch, to feed Load Video / Save Video / Video Combine and the like).

OCIO Write

Color-manage an IMAGE batch and write it to disk (Nuke: Write).

  • from_colorspace - the working space of the incoming image (default sRGB - Display).
  • output_colorspace - the colorspace to encode into. The format picks the right default (EXR -> ACEScg, PNG / TIFF / JPEG -> sRGB). Written into the file metadata where the format allows it.
  • container - still image (one frame), sequence (numbered frames), or video.
  • still_format - exr / tiff / png / jpeg (used for still / sequence).
  • video_codec - prores_4444 / prores_422hq / prores_422 / dnxhr_hq / h264 / hevc (used for video).
  • bit_depth - narrows to the format: JPEG 8; PNG 8 / 16; TIFF 8 / 16 / 32f; EXR 16f / 32f.
  • auto_range - pull first_frame / last_frame / start_number / fps automatically from the OCIO Read at the other end of the wire (through any number of nodes). Edit them by hand and it turns off; turn it back on to re-detect.
  • first_frame / last_frame - which frames to write. start_number - the number on the first output file (the re-base, e.g. 0086).
  • output_folder - where to write (📁 browse picks a folder on disk, or type / create one). filename - the base name; numbering and extension are added automatically.
  • alpha (optional) - wire a MASK here to write RGBA (EXR / TIFF / PNG). fps (optional) - wire OCIO Read's fps to carry the source rate.
  • video (optional, mutually exclusive with the image input) - wire a ComfyUI Video (Load Video or any native VIDEO source) to record it with all of these settings; the container inherits the clip's own frame rate.
  • raw_data - write the pixels as-is, skipping the conversion.

The node previews the first written frame in its output colorspace (a wrong colorspace pick looks visibly wrong) and reports "wrote N frame(s)". The ▶ Render button queues the graph.

Naming: still image -> <name>.<ext>; sequence -> <name>.0086.<ext>, <name>.0087.<ext>, ...; video -> <name>.mov (ProRes / DNxHR) or <name>.mp4 (h264 / hevc).

HDR source profiles (profile). The top dropdown presets the whole node for a known HDR source. LTX 2.3 HDR sets Linear Rec.709 (sRGB) -> ACEScg. LumiPic LogC3 (Flux/Qwen) and LumiPic V10 LogC4 also decode the log curve inside Write, so you wire a LumiPic VAE-decode plate straight in and it lands in ACEScg. Any HDR profile forces an EXR 16f master. auto reads the upstream node: it detects LTX reliably, and for LumiPic it guesses from the LoRA filename, so confirm that pick. none leaves the colorspaces as you set them, and editing a colorspace by hand switches profile back to none. Seedance 4K 10-bit is a placeholder pending its color spec.

Codec drives the video output. The video_codec fixes the bit depth and container: ProRes 4444 is 12-bit .mov, ProRes 422 / 422 HQ 10-bit .mov, DNxHR HQ 8-bit .mov, h264 and hevc 8-bit .mp4. The file carries the right NCLC color tags (primaries / transfer / matrix) from output_colorspace, so it does not gamma-shift between players. Video defaults to sRGB - Display to match the ComfyUI preview; switch it to Rec.1886 Rec.709 - Display for a broadcast 2.4 master, or Rec.2100-PQ for HDR video.

OCIO Player

An on-node float viewport for scrubbing a graded result, input-only (like Preview Image - nothing flows out, so wiring it never breaks the graph downstream). Takes an OCIO Img/Seq/Vid batch or a ComfyUI Video (mutually exclusive, same as the color nodes). input_colorspace -> output_colorspace bakes the display transform live on the GPU; raw_data shows the pixels untouched. start_frame / end_frame and fps set the playback range, with a transport bar (play / step / loop) and an exposure slider (view-only, never baked into the graph). Full-res HALF-float, HDR-safe: exposure and the display LUT run on the real values, not a pre-baked 8-bit preview.

OCIO ColorSpace

Convert between two OCIO colorspaces (Nuke: OCIOColorSpace). in_colorspace -> out_colorspace, a mix blend with the original, and an optional config_path. The swap button flips in / out in one pre

Core symbols most depended-on inside this repo

W
called by 114
web/ocio_io.js
get
called by 109
nodes.py
run
called by 45
nodes.py
setWSilent
called by 31
web/ocio_io.js
first
called by 18
web/ocio_io.js
_ocioBusy
called by 17
web/ocio_io.js
X
called by 15
web/ocio_io.js
showWidget
called by 13
web/ocio_io.js

Shape

Function 385
Method 39
Class 13
Route 11

Languages

Python64%
TypeScript36%

Modules by API surface

web/ocio_io.js152 symbols
nodes.py75 symbols
io_nodes.py62 symbols
grade_nodes.py26 symbols
__init__.py24 symbols
tools/accuracy/_common.py20 symbols
tools/accuracy/measure_ocio_parity.py13 symbols
tools/accuracy/measure_log_curves.py12 symbols
tools/test_logcurves.py8 symbols
tools/test_cache_parity.py8 symbols
tools/accuracy/measure_quantisation_dither.py7 symbols
tools/accuracy/measure_histogram_compare.py6 symbols

For agents

$ claude mcp add ComfyUI-OCIO \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact