- Video Saver: add MOV ProRes 422, 422 HQ, 4444, and 4444 XQ formats via PyAV (prores_ks encoder; 10-bit YUV 4:2:2 / 4:4:4; alpha preserved for 4444 when input is 4-ch) - Fix ACES 1.2 auto-download not running on fresh installs: call download_aces12() and _refresh_aces12() from __init__.py so the config is fetched at startup - Fix BUILTIN_CONFIG_KEYS stale-reference bug: mutate the list in-place in _refresh_aces12() so nodes.py's imported binding always sees the updated keys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
75 lines
2.9 KiB
Python
75 lines
2.9 KiB
Python
"""
|
|
ComfyUI-ACES-IO
|
|
OpenColorIO / ACES color-management nodes for ComfyUI.
|
|
|
|
Supported ACES versions (built-in, no download needed):
|
|
• ACES 2.0 — CG Config & Studio Config [OCIO 2.5] ← recommended
|
|
• ACES 1.3 — CG Config & Studio Config [OCIO 2.1 / 2.3 / 2.4]
|
|
|
|
• ACES 1.2 and any other config: supply a path to your .ocio / .ocioz file
|
|
via the "Custom path" preset in the Config Loader node.
|
|
Download ACES 1.2 config from:
|
|
https://github.com/colour-science/OpenColorIO-Configs
|
|
|
|
Nodes (mirroring Nuke's OCIO set):
|
|
ACES IO — Config Loader load / select an OCIO config
|
|
ACES IO — ColorSpace OCIOColorSpace (cs → cs conversion)
|
|
ACES IO — Display Transform OCIODisplay (full display pipeline)
|
|
ACES IO — Viewer Nuke Viewer (exposure + gamma + channel view)
|
|
ACES IO — Look Transform OCIOLookTransform
|
|
ACES IO — File LUT OCIOFileTransform
|
|
ACES IO — Log Convert OCIOLogConvert (log ↔ linear)
|
|
ACES IO — Config Info lists colorspaces / displays / views / looks
|
|
"""
|
|
|
|
import os
|
|
import importlib.util
|
|
import logging
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
# Check for PyOpenColorIO before attempting to import nodes so that a missing
|
|
# OCIO installation shows a single, actionable message rather than a traceback.
|
|
if importlib.util.find_spec("PyOpenColorIO") is None:
|
|
_logger.error(
|
|
"\n"
|
|
"[ACES IO] PyOpenColorIO is not installed — nodes will not load.\n"
|
|
"Install it with one of:\n"
|
|
" pip install opencolorio>=2.3.0\n"
|
|
" conda install -c conda-forge opencolorio>=2.3.0\n"
|
|
"Then restart ComfyUI."
|
|
)
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
else:
|
|
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
|
|
# Auto-download ACES 1.2 config if not already present, then refresh the
|
|
# built-in config list so the dropdown includes it on first run.
|
|
try:
|
|
from .install import download_aces12
|
|
from .ocio_utils import _refresh_aces12
|
|
download_aces12()
|
|
_refresh_aces12()
|
|
except Exception as _dl_e:
|
|
_logger.warning(f"[ACES IO] Could not auto-download ACES 1.2 config: {_dl_e}")
|
|
|
|
from .wan_inverse_tonemap import (
|
|
NODE_CLASS_MAPPINGS as _WAN_CM,
|
|
NODE_DISPLAY_NAME_MAPPINGS as _WAN_DNM,
|
|
)
|
|
NODE_CLASS_MAPPINGS = {**NODE_CLASS_MAPPINGS, **_WAN_CM}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {**NODE_DISPLAY_NAME_MAPPINGS, **_WAN_DNM}
|
|
|
|
# Serve web/js to the ComfyUI frontend
|
|
WEB_DIRECTORY = "web"
|
|
|
|
# Register REST API routes (colorspace / display / view pickers)
|
|
try:
|
|
from . import server_routes # noqa: F401
|
|
except Exception as _e:
|
|
import logging
|
|
logging.warning(f"[ACES IO] Could not load server routes: {_e}")
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|