ComfyUI > Nodes > ComfyUI_ColorMod > Tonemap (Reinhard)

ComfyUI Node: Tonemap (Reinhard)

Class Name

CV2TonemapReinhard

Category
ColorMod/tonemap
Author
city96 (Account age: 552days)
Extension
ComfyUI_ColorMod
Latest Updated
2024-08-06
Github Stars
0.07K

How to Install ComfyUI_ColorMod

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

Tonemap (Reinhard) Description

Apply Reinhard tonemapping algorithm to HDR images for display on standard monitors, preserving natural appearance and enhancing visual quality.

Tonemap (Reinhard):

The CV2TonemapReinhard node is designed to apply the Reinhard tonemapping algorithm to high dynamic range (HDR) images, converting them into a format suitable for display on standard monitors. This method is particularly effective in preserving the natural appearance of images by balancing the luminance and color adaptation, making it a popular choice for AI artists looking to enhance the visual quality of their HDR images. The Reinhard tonemapping technique is known for its ability to maintain detail in both the highlights and shadows, providing a more realistic and visually appealing result.

Tonemap (Reinhard) Input Parameters:

image

This parameter expects an HDR image that you want to tonemap. The image should be in a format that supports high dynamic range data.

gamma

This parameter controls the gamma correction applied to the image. Gamma correction adjusts the brightness of the image, with a default value of 1.0. The value can range from 0.0 to 8.0, allowing you to fine-tune the brightness to your preference.

intensity

This parameter adjusts the overall intensity of the tonemapped image. It has a default value of 0.0 and can range from -8.0 to 8.0. Increasing the intensity can make the image appear more vivid, while decreasing it can create a more subdued effect.

light_adapt

This parameter controls the light adaptation level, which affects how the tonemapping algorithm adapts to different lighting conditions in the image. The default value is 1.0, with a range from 0.0 to 1.6. Lower values can make the image appear darker, while higher values can enhance the brightness.

color_adapt

This parameter adjusts the color adaptation level, influencing how colors are balanced in the tonemapped image. The default value is 1.0, with a range from 0.0 to 1.6. Lower values can desaturate the colors, while higher values can make them more vibrant.

mult

This parameter is a multiplier that scales the final tonemapped image. The default value is 1.0, with a range from 0.0 to 8.0. Adjusting this value can help you achieve the desired brightness and contrast in the final image.

Tonemap (Reinhard) Output Parameters:

IMAGE

The output is the tonemapped image, which has been processed using the Reinhard tonemapping algorithm. This image is now suitable for display on standard monitors, with balanced luminance and color adaptation, preserving details in both highlights and shadows.

Tonemap (Reinhard) Usage Tips:

  • Experiment with the gamma parameter to adjust the overall brightness of your image. A higher gamma value can make the image appear brighter, while a lower value can darken it.
  • Use the intensity parameter to enhance or reduce the vividness of your image. This can be particularly useful for creating different moods or artistic effects.
  • Adjust the light_adapt and color_adapt parameters to fine-tune how the tonemapping algorithm handles different lighting conditions and color balances in your image.
  • The mult parameter can be used to scale the final image, helping you achieve the desired brightness and contrast.

Tonemap (Reinhard) Common Errors and Solutions:

"AttributeError: 'NoneType' object has no attribute 'process'"

  • Explanation: This error occurs when the tonemap_op attribute is not properly initialized, possibly due to an unsupported OpenCV version.
  • Solution: Ensure that you are using a version of OpenCV that supports the createTonemapReinhard function. Update OpenCV if necessary.

"ValueError: Input image must be in HDR format"

  • Explanation: This error indicates that the input image is not in a high dynamic range format, which is required for the tonemapping process.
  • Solution: Verify that your input image is in an HDR format. Convert the image to HDR if needed before applying the tonemap.

"TypeError: Expected float for parameter 'gamma'"

  • Explanation: This error occurs when the gamma parameter is not provided as a float value.
  • Solution: Ensure that the gamma parameter is specified as a float. For example, use 1.0 instead of 1.

"RuntimeError: Tonemapping failed due to invalid parameter values"

  • Explanation: This error suggests that one or more input parameters have values outside their acceptable ranges.
  • Solution: Double-check the values of all input parameters to ensure they fall within the specified ranges. Adjust any parameters that are out of bounds.

Tonemap (Reinhard) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_ColorMod
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.