ComfyUI  >  Nodes  >  ComfyUI-IC-Light >  Load HDR Image

ComfyUI Node: Load HDR Image

Class Name

LoadHDRImage

Category
IC-Light
Author
kijai (Account age: 2181 days)
Extension
ComfyUI-IC-Light
Latest Updated
6/19/2024
Github Stars
0.4K

How to Install ComfyUI-IC-Light

Install this extension via the ComfyUI Manager by searching for  ComfyUI-IC-Light
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-IC-Light 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 Cloud for ready-to-use ComfyUI environment

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

Run ComfyUI Online

Load HDR Image Description

Convert HDR images to LDR images with exposure control for AI artists using OpenCV and PyTorch.

Load HDR Image:

The LoadHDRImage node is designed to load High Dynamic Range (HDR) images and convert them into a batch of Low Dynamic Range (LDR) images with specified exposure levels. This node is particularly useful for AI artists who want to work with HDR images and simulate different lighting conditions by adjusting the exposure. By converting HDR images to LDR images, you can better visualize and manipulate the image data for various artistic and technical purposes. The node leverages OpenCV for image processing and PyTorch for tensor manipulation, ensuring high performance and flexibility in handling image data.

Load HDR Image Input Parameters:

image

This parameter specifies the HDR image file to be loaded. The image should be located in the input directory, and the node will read the file path from this location. The image file must be in a format that supports HDR, such as .hdr. The correct selection of the image file is crucial as it forms the basis for generating the LDR images with different exposures.

exposures

This parameter allows you to specify the exposure levels for generating the LDR images. The exposures should be provided as a comma-separated string of integers, such as "-2,-1,0,1,2". Each value represents a different exposure level, where negative values darken the image and positive values brighten it. The default value is "-2,-1,0,1,2", which provides a range of exposures from two stops underexposed to two stops overexposed. Adjusting these values will impact the brightness and contrast of the resulting LDR images.

Load HDR Image Output Parameters:

IMAGE

The output is a batch of LDR images, each corresponding to one of the specified exposure levels. These images are converted from the original HDR image and are represented as tensors. The batch of images can be used for further processing, visualization, or as input to other nodes in your workflow. Each image in the batch is normalized to the range [0, 1] and is in the format (C, H, W), where C is the number of color channels, H is the height, and W is the width.

MASK

This output is reserved for future use or additional functionalities that may involve masking operations on the images. Currently, it may not be utilized directly by the node but is included for compatibility with other nodes that expect a mask output.

Load HDR Image Usage Tips:

  • Ensure that the HDR image file is correctly placed in the input directory and is in a supported format like .hdr.
  • Experiment with different exposure values to achieve the desired lighting effects in your LDR images. The default range "-2,-1,0,1,2" is a good starting point.
  • Use the output batch of LDR images as input to other nodes for further processing, such as image enhancement, filtering, or artistic transformations.

Load HDR Image Common Errors and Solutions:

FileNotFoundError: [Errno 2] No such file or directory

  • Explanation: This error occurs when the specified HDR image file is not found in the input directory.
  • Solution: Ensure that the image file is correctly named and placed in the input directory. Verify the file path and try again.

ValueError: invalid literal for int() with base 10

  • Explanation: This error occurs when the exposures parameter contains non-integer values or is incorrectly formatted.
  • Solution: Check the exposures string to ensure it contains only comma-separated integers. Correct any formatting issues and try again.

cv2.error: OpenCV(4.x.x) /path/to/opencv/modules/imgcodecs/src/loadsave.cpp:xxxx: error: (-215:Assertion failed) !filename.empty() in function 'imread'

  • Explanation: This error occurs when OpenCV fails to read the HDR image file, possibly due to an incorrect file path or unsupported file format.
  • Solution: Verify that the image file path is correct and that the file is in a supported HDR format. Ensure the file is not corrupted and try again.

Load HDR Image Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-IC-Light
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.