ComfyUI  >  Nodes  >  ComfyUI-ProPost >  ProPostDepthMapBlur

ComfyUI Node: ProPostDepthMapBlur

Class Name

ProPostDepthMapBlur

Category
Pro Post/Blur Effects
Author
digitaljohn (Account age: 4572 days)
Extension
ComfyUI-ProPost
Latest Updated
8/11/2024
Github Stars
0.1K

How to Install ComfyUI-ProPost

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

ProPostDepthMapBlur Description

Apply depth-based blur effect using depth maps for realistic depth of field control in images.

ProPostDepthMapBlur:

The ProPostDepthMapBlur node is designed to apply a depth-based blur effect to images, enhancing the visual depth and focus of your artwork. This node leverages depth maps to selectively blur parts of an image based on their distance from a specified focal plane, creating a realistic depth of field effect. By adjusting parameters such as blur strength, focal depth, and focus spread, you can control the intensity and transition of the blur effect, making certain areas of the image appear sharp while others are smoothly blurred. This technique is particularly useful for creating a sense of depth and focus in your images, making them more visually appealing and professional.

ProPostDepthMapBlur Input Parameters:

image

The input image to which the depth-based blur effect will be applied. This should be a tensor representing the image data.

depth_map

The depth map corresponding to the input image. This tensor indicates the depth information for each pixel, which is used to determine the blur effect based on distance from the focal plane.

blur_strength

Represents the blur strength. This parameter controls the overall intensity of the blur effect; the higher the value, the more blurred the image becomes. Typical values range from 0.0 (no blur) to 1.0 (maximum blur).

focal_depth

Represents the focal depth. This parameter is used to determine which depth level in the image should remain sharp, while other levels are blurred based on depth differences. Values typically range from 0.0 (foreground) to 1.0 (background).

focus_spread

Represents the focus spread range. This parameter controls the size of the blur transition area near the focal depth; the larger the value, the wider the transition area, and the smoother the blur effect spreads around the focus. Values typically range from 0.0 to 1.0.

steps

Represents the number of steps in the blur process. This parameter determines the calculation precision of the blur effect; the more steps, the finer the blur effect, but this also increases the computational load. Typical values range from 1 to 10.

focal_range

Represents the focal range. This parameter is used to adjust the depth range within the focal depth that remains sharp; the larger the value, the wider the area around the focal depth that remains sharp. Values typically range from 0.0 to 1.0.

mask_blur

Represents the mask blur strength for blurring the depth map. This parameter controls the intensity of the depth map's blur treatment, used for preprocessing the depth map before calculating the final blur effect, to achieve a more natural blur transition. Typical values range from 1 to 10.

ProPostDepthMapBlur Output Parameters:

image_result

The resulting image after applying the depth-based blur effect. This tensor contains the blurred image data, with certain areas appearing sharp based on the specified focal depth and other parameters.

mask_result

The depth mask used during the blur process. This tensor represents the adjusted depth map, indicating which areas of the image were blurred and to what extent.

ProPostDepthMapBlur Usage Tips:

  • Adjust the blur_strength parameter to control the overall intensity of the blur effect. Higher values will result in a more pronounced blur.
  • Use the focal_depth parameter to specify which part of the image should remain in focus. This is useful for highlighting specific areas while blurring the rest.
  • Experiment with the focus_spread parameter to achieve a smooth transition between sharp and blurred areas. A larger value will create a more gradual blur effect.
  • Increase the steps parameter for a finer and more precise blur effect, but be aware that this will also increase the computational load.
  • Use the focal_range parameter to adjust the depth range that remains sharp around the focal depth. This can help in achieving a more natural depth of field effect.
  • Apply a suitable mask_blur value to preprocess the depth map, ensuring a smoother and more natural blur transition.

ProPostDepthMapBlur Common Errors and Solutions:

"Input image and depth map dimensions do not match"

  • Explanation: The dimensions of the input image and the depth map do not match, which is required for the depth-based blur effect to work correctly.
  • Solution: Ensure that the input image and depth map have the same dimensions before passing them to the node.

"Invalid blur strength value"

  • Explanation: The blur_strength parameter is set to a value outside the acceptable range.
  • Solution: Set the blur_strength parameter to a value between 0.0 and 1.0.

"Invalid focal depth value"

  • Explanation: The focal_depth parameter is set to a value outside the acceptable range.
  • Solution: Set the focal_depth parameter to a value between 0.0 and 1.0.

"Invalid focus spread value"

  • Explanation: The focus_spread parameter is set to a value outside the acceptable range.
  • Solution: Set the focus_spread parameter to a value between 0.0 and 1.0.

"Invalid steps value"

  • Explanation: The steps parameter is set to a value outside the acceptable range.
  • Solution: Set the steps parameter to a value between 1 and 10.

"Invalid focal range value"

  • Explanation: The focal_range parameter is set to a value outside the acceptable range.
  • Solution: Set the focal_range parameter to a value between 0.0 and 1.0.

"Invalid mask blur value"

  • Explanation: The mask_blur parameter is set to a value outside the acceptable range.
  • Solution: Set the mask_blur parameter to a value between 1 and 10.

ProPostDepthMapBlur Related Nodes

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