ComfyUI Node: Load EXR

Class Name

LoadExr

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 Description

Efficiently loads and processes EXR image files for AI artists and designers, extracting pixel data, channel groups, and metadata.

Load EXR:

The LoadExr node is designed to facilitate the loading and processing of EXR image files, which are commonly used in high-dynamic-range imaging and visual effects due to their ability to store a wide range of color and luminance data. This node is particularly beneficial for AI artists and designers who work with complex image data, as it efficiently extracts and organizes pixel data, channel groups, and metadata from EXR files. By handling both standard RGB and Alpha channels, as well as more specialized data like cryptomatte layers, LoadExr provides a comprehensive solution for managing the intricate details contained within EXR files. Its ability to scan metadata and process sequences ensures that users can access and manipulate the full spectrum of image information, making it an essential tool for those looking to leverage the full potential of EXR files in their creative workflows.

Load EXR Input Parameters:

image_path

The image_path parameter specifies the file path to the EXR image that you wish to load. This parameter is crucial as it directs the node to the correct file location, allowing it to access and process the image data. There are no specific minimum or maximum values for this parameter, but it must be a valid file path string pointing to an existing EXR file. Providing an incorrect path will result in an error, as the node will be unable to locate the file.

normalize

The normalize parameter is a boolean option that determines whether the pixel data should be normalized. When set to True, the pixel values are adjusted to fit within a standard range, which can be beneficial for ensuring consistent image processing and analysis. The default value is True, but you can set it to False if you prefer to work with the raw pixel data. This parameter impacts the final appearance and usability of the image data, especially in applications where consistent color and luminance values are important.

node_id

The node_id parameter is an optional identifier for the node instance. It is primarily used for tracking and logging purposes, allowing you to differentiate between multiple instances of the node within a larger workflow. This parameter does not affect the node's execution or results directly, but it can be useful for debugging and managing complex projects.

layer_data

The layer_data parameter is an optional dictionary that can be used to provide pre-existing metadata for the EXR file. If supplied, this metadata will be used instead of scanning the file for metadata, which can save processing time. This parameter is particularly useful if you have already extracted and stored metadata from the EXR file in a previous step and wish to reuse it. If not provided, the node will automatically scan the EXR file to gather the necessary metadata.

Load EXR Output Parameters:

rgb_tensor

The rgb_tensor output provides the processed RGB channel data from the EXR file. This tensor is a multi-dimensional array that contains the color information for each pixel, making it essential for any visual representation or further image processing tasks. It allows you to access and manipulate the core color data of the image.

alpha_tensor

The alpha_tensor output contains the Alpha channel data, which represents the transparency information for each pixel in the image. This output is crucial for compositing tasks where blending images with varying transparency levels is required. It provides a way to handle and adjust the transparency of the image effectively.

metadata_json

The metadata_json output is a JSON string that encapsulates all the metadata extracted from the EXR file. This includes information about channel groups, layer types, and other relevant details. This output is valuable for understanding the structure and content of the EXR file, enabling you to make informed decisions about how to process and utilize the image data.

layers_dict

The layers_dict output is a dictionary that stores all non-cryptomatte layers extracted from the EXR file. Each entry in the dictionary corresponds to a specific layer, providing a structured way to access and manipulate different parts of the image data. This output is particularly useful for tasks that require working with specific image layers separately.

cryptomatte_dict

The cryptomatte_dict output is a dictionary that contains all cryptomatte layers from the EXR file. Cryptomatte is a technique used in visual effects to create accurate mattes for compositing. This output allows you to access and utilize cryptomatte data, which is essential for precise image compositing and manipulation.

layer_names

The layer_names output is a list of channel names extracted from the EXR file. This list provides a comprehensive overview of all available channels, helping you to understand the structure of the image data and identify specific channels for processing.

processed_layer_names

The processed_layer_names output is a list of names for the processed layers that match the keys in the layers_dict and cryptomatte_dict. This output helps you to correlate the processed data with the original channel names, ensuring that you can accurately track and manage the image data throughout your workflow.

Load EXR Usage Tips:

  • Ensure that the image_path is correctly specified to avoid file not found errors. Double-check the path for typos or incorrect directory structures.
  • Use the normalize parameter to maintain consistent color and luminance values across different images, especially when working with multiple EXR files in a project.
  • If you have pre-existing metadata, use the layer_data parameter to save processing time by bypassing the metadata scanning step.
  • Familiarize yourself with the metadata_json output to gain insights into the structure and content of the EXR file, which can guide your image processing decisions.

Load EXR Common Errors and Solutions:

Could not open <image_path>

  • Explanation: This error occurs when the specified file path is incorrect or the file does not exist at the given location.
  • Solution: Verify that the image_path is correct and that the file exists. Check for typos or incorrect directory paths.

Failed to read image data from <image_path>

  • Explanation: This error indicates that the node was unable to read the pixel data from the EXR file, possibly due to file corruption or unsupported format.
  • Solution: Ensure that the EXR file is not corrupted and is in a supported format. Try opening the file with another application to verify its integrity.

Error scanning EXR metadata from <image_path>

  • Explanation: This error suggests that there was an issue extracting metadata from the EXR file, which could be due to an unsupported file structure or missing metadata.
  • Solution: Check if the EXR file is compatible with the node's metadata extraction capabilities. Consider using a different EXR file or manually providing metadata through the layer_data parameter.

Load EXR 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.