ComfyUI > Nodes > ComfyUI-CoCoTools > Load EXR Layer by Name

ComfyUI Node: Load EXR Layer by Name

Class Name

LoadExrLayerByName

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

Load EXR Layer by Name Description

Extract specific layers from EXR files for enhanced image manipulation and data utilization.

Load EXR Layer by Name:

The LoadExrLayerByName node is designed to facilitate the extraction of specific layers from an EXR file, which is a high-dynamic-range image file format commonly used in visual effects and computer graphics. This node functions similarly to the Shuffle node in Nuke, allowing you to select and output a particular layer from an EXR layer dictionary. By providing a straightforward method to access individual layers, this node enhances your ability to manipulate and utilize specific image data within your projects. Whether you are working with complex multi-layered EXR files or need to isolate a particular channel for further processing, LoadExrLayerByName offers a streamlined approach to managing and extracting the exact data you need.

Load EXR Layer by Name Input Parameters:

layers

This parameter represents the collection of layers available within the EXR file. It is a required input that provides the node with the necessary data to extract the specified layer. The layers are typically organized in a dictionary format, where each key corresponds to a layer name, and the value is the associated image data. This parameter does not have a default value, as it depends on the EXR file being processed.

layer_name

The layer_name parameter allows you to specify the exact name of the layer you wish to extract from the EXR file. It is a required string input, with a default value of "none". This parameter is crucial for identifying the target layer within the EXR file's metadata, which can be accessed through the Load EXR node. By providing the correct layer name, you ensure that the node extracts the desired image data for further processing.

conversion

The conversion parameter offers options for how the extracted layer should be processed. It is an optional parameter with three possible values: "Auto", "To RGB", and "To Mask", with "Auto" being the default. This parameter determines whether the extracted layer should be converted to an RGB image, a mask, or left in its original format. Choosing the appropriate conversion option can significantly impact the node's output, allowing you to tailor the results to your specific needs.

Load EXR Layer by Name Output Parameters:

image

The image output parameter provides the extracted layer as an RGB image. This output is particularly useful when the selected layer contains color information that you wish to preserve and utilize in subsequent processing steps. If the conversion option is set to "To RGB", the node will ensure that the output is formatted as a three-channel image, even if the original layer was a single-channel mask.

mask

The mask output parameter delivers the extracted layer as a mask, which is a single-channel image. This output is ideal for scenarios where the layer represents a mask or needs to be used as a mask in further processing. If the conversion option is set to "To Mask", the node will convert the layer to a single-channel format, making it suitable for use in masking operations.

Load EXR Layer by Name Usage Tips:

  • Ensure that the layer_name you provide matches exactly with the names available in the EXR file's metadata to avoid errors and ensure accurate layer extraction.
  • Use the conversion parameter to tailor the output format to your needs. For instance, if you need to use a layer as a mask, select "To Mask" to automatically convert it to a single-channel format.
  • When working with complex EXR files containing multiple layers, consider using the Load EXR node to first examine the available layers and their names before using LoadExrLayerByName.

Load EXR Layer by Name Common Errors and Solutions:

No layer specified, returning empty tensors

  • Explanation: This error occurs when no layer_name is provided, or the default value "none" is used, resulting in the node returning empty tensors.
  • Solution: Ensure that you specify a valid layer_name that corresponds to an existing layer in the EXR file's metadata.

Layer '<layer_name>' has an unsupported tensor shape

  • Explanation: This error indicates that the specified layer has a tensor shape that the node does not recognize or support.
  • Solution: Verify that the layer_name is correct and corresponds to a layer with a supported format. If the issue persists, check the EXR file for any unusual layer configurations.

Load EXR Layer by Name 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.