CoCo Cryptomatte Layer
Pulling crypto passes out of EXR — the parts that actually work
- cryptomatte
- image
Let's be straight about what this node is and isn't, because the README is honest about it and you should be too. Cryptomatte is the render-pass trick that gives every object in a 3D scene its own ID: the EXR stores unique string IDs plus a boundary, and the pretty colors are just so you can find an object with a color picker. People have been "desperately looking for a cryptomatte node" in ComfyUI since 2024 - for turning those IDs into masks for inpainting, regional prompting, or compositing. This node is a step toward that, not the whole staircase.
CoCo Cryptomatte Layer is marked WIP in the pack's own README. What it does is pull a named cryptomatte layer out of an EXR and hand it to you as an image. What it doesn't do yet is decode that layer into an actual object mask - no picking "the tree" and getting a matte out. Manage your expectations and it's still useful.
How it works
It's a subclass of the pack's Load EXR Layer by Name node, narrowed to the cryptomatte dictionary. The CRYPTOMATTE type isn't a ComfyUI core type - it's the pack's own output type, produced by the Load EXR and Load EXR Sequence nodes, which split crypto channels out of your file by name (anything starting with crypto, plus the standard cryptoasset/cryptomaterial/cryptoobject/cryptoprimvar families).
You feed it two things:
cryptomatte- the CRYPTOMATTE dict from a loader node.layer_name- a string, default "none". The author's own tooltip is the guide: look for names starting withcryptoin the metadata. It's manually typed, so grab the exact name from the loader's "layer names" output.
The name matching is forgiving - case-insensitive, partial matches, and hierarchical names like CITY SCENE.CryptoAsset00 if you type CryptoAsset. If nothing matches at all, it falls back to the first layer in the dict. That fallback can silently hand you the wrong pass, so check the output once.
The single output is image (IMAGE) - the raw crypto layer rendered as a tensor you can preview or inspect. That's it.
Why you'd reach for it anyway
Two realistic uses, one honest:
- Inspection. Plug Load EXR → Cryptomatte Layer → PreviewImage and you can actually see the crypto passes you're dealing with before you decide how to composite them. For anyone coming from VFX, that's the "let's look at the AOVs" habit.
- The pipeline seed. The pack clearly intends this to become mask generation (the README's to-do list has "Complete cryptomatte layer implementation"). Right now, if you need an actual mask from an ID pass, the pragmatic route is Load EXR → Load EXR Layer by Name on the ID layer → the
Mask from Colornode in ComfyUI Essentials, which is the community's standard answer for picking objects by color.
Installing and troubleshooting
It's part of the CoCoTools pack - Manager (search "CoCoTools") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Conor-Collins/ComfyUI-CoCoTools_IO
pip install -r ComfyUI-CoCoTools_IO/requirements.txt
The pack needs OpenImageIO installed for the loader side to work at all, and it needs to land in the same Python ComfyUI runs (portable builds: use python_embeded\python.exe -m pip install). If you leave layer_name at "none" or type a name that doesn't exist, you get an empty placeholder tensor - a 1×1 image - not an error, which is confusing the first time you hit it. Check your spelling against the loader's layer-name output, or use the fuzzy matching to your advantage and type the short form.
This node has single-digit impressions on the site and near-zero CTR, which tracks: it's a WIP niche tool in a niche pack. It's worth knowing about because it's one of the few things that even touches cryptomatte in ComfyUI - but if you're coming for finished object masks, the crypto ecosystem here just isn't done yet.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| cryptomatte | CRYPTOMATTE | — | |
| layer_name | STRING | none | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |