ComfyUI > Nodes > MTB Nodes > Filter Z (mtb)

ComfyUI Node: Filter Z (mtb)

Class Name

Filter Z (mtb)

Category
mtb/filters
Author
melMass (Account age: 3754days)
Extension
MTB Nodes
Latest Updated
2024-07-02
Github Stars
0.35K

How to Install MTB Nodes

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

Filter Z (mtb) Description

Powerful image filter using depth map for masking and alpha channel adjustments, ideal for AI artists creating depth-based effects.

Filter Z (mtb):

Filter Z (mtb) is a powerful node designed to filter an image based on a depth map, allowing you to manipulate the image by either masking certain areas to black or adjusting the alpha channel for transparency effects. This node is particularly useful for AI artists who want to create depth-based effects or selectively highlight parts of an image based on depth information. By leveraging a depth map, Filter Z (mtb) can help you achieve sophisticated visual effects that respond to the spatial characteristics of the image, enhancing the overall artistic expression.

Filter Z (mtb) Input Parameters:

image

The image parameter is the primary image that you want to filter. This input should be an image tensor, which the node will process based on the provided depth map and other settings.

depth

The depth parameter is a depth map corresponding to the image. This depth map is used to determine which parts of the image will be affected by the filter. The depth map should also be an image tensor.

to_black

The to_black parameter is a boolean that determines whether the filtered areas of the image should be turned to black. If set to True, the areas of the image that meet the threshold criteria will be masked to black. The default value is True.

threshold

The threshold parameter is a float value that sets the depth threshold for filtering. The node will use this threshold to decide which parts of the image to filter based on their depth values. The threshold can range from 0.0 to 1.0, with a default value of 0.5. Adjusting this value will change the sensitivity of the filter to depth variations.

invert

The invert parameter is a boolean that determines whether the depth threshold should be inverted. If set to True, the filter will invert the depth criteria, affecting areas that do not meet the threshold. The default value is True.

Filter Z (mtb) Output Parameters:

image

The output image is the filtered image tensor. Depending on the input parameters, this image will either have certain areas masked to black or have an adjusted alpha channel for transparency effects. The output image retains the original dimensions and format but includes the applied depth-based filtering.

Filter Z (mtb) Usage Tips:

  • To create a silhouette effect, set to_black to True and adjust the threshold to target specific depth ranges.
  • For transparency effects, set to_black to False and fine-tune the threshold and invert parameters to achieve the desired level of transparency based on depth.

Filter Z (mtb) Common Errors and Solutions:

"Depth map and image dimensions do not match"

  • Explanation: This error occurs when the dimensions of the depth map do not match the dimensions of the image.
  • Solution: Ensure that the depth map and the image have the same dimensions before inputting them into the node.

"Invalid threshold value"

  • Explanation: This error occurs when the threshold value is set outside the allowed range of 0.0 to 1.0.
  • Solution: Adjust the threshold value to be within the range of 0.0 to 1.0.

"Input tensors must be of type torch.Tensor"

  • Explanation: This error occurs when the inputs are not provided as torch tensors.
  • Solution: Convert your image and depth map to torch tensors before using them as inputs for the node.

Filter Z (mtb) Related Nodes

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