ComfyUI > Nodes > ComfyUI-CoCoTools > Cryptomatte Layer

ComfyUI Node: Cryptomatte Layer

Class Name

CryptomatteLayer

Category
Image/EXR
Author
Conor-Collins (Account age: 431days)
Extension
ComfyUI-CoCoTools
Latest Updated
2025-03-05
Github Stars
0.03K

How to Install ComfyUI-CoCoTools

Install this extension via the ComfyUI Manager by searching for ComfyUI-CoCoTools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-CoCoTools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Cryptomatte Layer Description

Extract specific cryptomatte layers from EXR files for streamlined manipulation in visual effects and graphics.

Cryptomatte Layer:

The CryptomatteLayer node is designed to facilitate the extraction of specific cryptomatte layers from an EXR file, which is a high-dynamic-range image file format commonly used in visual effects and computer graphics. This node is particularly useful for artists and designers who need to isolate and manipulate individual elements within a complex image. By focusing exclusively on cryptomatte layers, the node streamlines the process of selecting and working with these layers, which are often used to store object IDs, material IDs, or other metadata that can be used for compositing and rendering tasks. The node's primary function is to identify and extract the desired cryptomatte layer based on its name, providing a straightforward way to access and utilize this data in your projects. This capability is essential for tasks that require precise control over specific elements within an image, such as color correction, masking, or compositing.

Cryptomatte Layer Input Parameters:

cryptomatte

The cryptomatte parameter is a dictionary that maps cryptomatte layer names to their corresponding image tensors. This input is crucial as it contains all the available cryptomatte layers from which you can select the one you need. The dictionary should be populated with valid cryptomatte data, typically extracted from an EXR file. The presence of this data allows the node to function correctly, enabling you to extract and work with specific layers.

layer_name

The layer_name parameter is a string that specifies the name of the cryptomatte layer you wish to extract. This parameter is essential for identifying the exact layer you want to work with. If the specified layer name does not exist, the node will attempt to find a close match or use the first available layer as a fallback. The default value for this parameter is "none," which will result in an empty tensor being returned if no specific layer is selected. This parameter allows for flexibility in selecting layers, even if the exact name is not known.

Cryptomatte Layer Output Parameters:

image

The image output parameter is a tensor representing the extracted cryptomatte layer. This output is crucial for further processing or manipulation within your project. The tensor contains the image data for the specified layer, allowing you to perform operations such as compositing, masking, or color correction. The output is directly influenced by the input parameters, particularly the layer_name, which determines which layer's data is extracted and returned.

Cryptomatte Layer Usage Tips:

  • Ensure that the cryptomatte dictionary is correctly populated with valid data from an EXR file to avoid errors and ensure accurate layer extraction.
  • When specifying the layer_name, try to use exact names when possible. If unsure, provide a partial name to allow the node to find the closest match, ensuring you still get the desired layer.

Cryptomatte Layer Common Errors and Solutions:

No cryptomatte layers available in the input

  • Explanation: This error occurs when the cryptomatte dictionary is empty or not provided, meaning there are no layers to extract.
  • Solution: Verify that the cryptomatte dictionary is correctly populated with data from an EXR file before using the node.

Cryptomatte layer <layer_name> not found and no close matches

  • Explanation: The specified layer_name does not exist in the cryptomatte dictionary, and no similar names were found.
  • Solution: Double-check the spelling of the layer_name and ensure it matches one of the available layers. If unsure, try using a partial name to find a close match.

No cryptomatte layer specified, returning empty tensor

  • Explanation: The layer_name parameter is set to "none" or is not specified, resulting in an empty tensor being returned.
  • Solution: Specify a valid layer_name to extract the desired cryptomatte layer. If you do not need a specific layer, be aware that the output will be an empty tensor.

Cryptomatte Layer Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CoCoTools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.