ComfyUI > Nodes > ComfyUI-LBM > Depth / Normal (LBM)

ComfyUI Node: Depth / Normal (LBM)

Class Name

LBM_DepthNormal

Category
🧪AILab/🔆LBM
Author
1038lab (Account age: 800days)
Extension
ComfyUI-LBM
Latest Updated
2025-05-27
Github Stars
0.04K

How to Install ComfyUI-LBM

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

Depth / Normal (LBM) Description

Generate depth and normal maps from images using advanced machine learning models for enhanced digital artwork.

Depth / Normal (LBM):

The LBM_DepthNormal node is designed to facilitate the generation of depth and normal maps from input images, leveraging advanced machine learning models. This node is particularly beneficial for AI artists who wish to enhance their digital artwork with realistic depth and surface orientation details. By utilizing pre-trained models, the node can transform a standard image into a depth map, which represents the distance of surfaces from a viewpoint, or a normal map, which encodes the orientation of surfaces. This transformation is crucial for creating more immersive and visually appealing 3D effects in digital art. The node's primary function is to process images through a series of steps that include encoding, sampling, and decoding, ultimately producing outputs that can be used in various creative applications, such as relighting, texture mapping, and 3D rendering.

Depth / Normal (LBM) Input Parameters:

task

The task parameter specifies the type of map to generate, either "depth" or "normal". This choice determines the model and processing pipeline used by the node. Selecting "depth" will produce a depth map, while "normal" will generate a normal map. This parameter is crucial as it dictates the nature of the output and the underlying model configuration. There are no minimum or maximum values, but the options are strictly "depth" or "normal".

image

The image parameter is the input image that you wish to process. It should be a tensor representing the image data, typically in a format compatible with the node's processing requirements. The quality and resolution of this input image can significantly impact the quality of the resulting depth or normal map. There are no specific minimum or maximum values, but higher resolution images may yield more detailed outputs.

steps

The steps parameter defines the number of processing steps the model will perform during the sampling phase. This parameter affects the quality and accuracy of the output, with more steps generally leading to better results. However, increasing the number of steps will also increase the processing time. There are no explicit minimum or maximum values provided, but a typical range might be from 100 to 1000 steps.

precision

The precision parameter determines the numerical precision used during processing, with options such as "bf16", "fp16", and "fp32". This choice can affect both the performance and the memory usage of the node. Lower precision (e.g., "fp16") can speed up processing and reduce memory usage, but may slightly impact the accuracy of the results. The default is typically "fp32" for maximum precision.

bridge_noise_sigma

The bridge_noise_sigma parameter controls the amount of noise added during the bridging process, which can help in stabilizing the model's output. A typical default value is 0.1, but this can be adjusted to fine-tune the balance between noise and detail in the output. There are no strict minimum or maximum values, but values close to 0.1 are commonly used.

mask

The mask parameter is an optional input that allows you to specify areas of the image to focus on or ignore during processing. This can be useful for selectively applying depth or normal map generation to specific regions of an image. The mask should be a tensor with dimensions compatible with the input image. If not provided, the entire image is processed.

Depth / Normal (LBM) Output Parameters:

out

The out parameter is the primary output of the node, providing the generated depth or normal map as a tensor. This output can be used directly in digital art projects to enhance visual effects or further processed in other nodes for additional creative applications. The output tensor represents either the depth information, with values indicating distance, or the normal information, with values indicating surface orientation. The interpretation of this output is crucial for achieving the desired artistic effects in your projects.

Depth / Normal (LBM) Usage Tips:

  • Experiment with the steps parameter to find a balance between processing time and output quality. More steps generally improve quality but take longer to process.
  • Use the mask parameter to focus on specific areas of your image, which can be particularly useful for complex scenes where only certain elements require depth or normal mapping.
  • Adjust the bridge_noise_sigma to control the level of detail and noise in your output. A lower value can produce cleaner results, while a higher value might add artistic noise effects.

Depth / Normal (LBM) Common Errors and Solutions:

Model file not found

  • Explanation: This error occurs when the required model files are not available in the specified directory.
  • Solution: Ensure that the model files are downloaded and placed in the correct directory. You can use the provided URLs to download the models if they are missing.

Invalid task parameter

  • Explanation: This error arises when an unsupported value is provided for the task parameter.
  • Solution: Check that the task parameter is set to either "depth" or "normal". These are the only supported options.

Image tensor shape mismatch

  • Explanation: This error occurs when the input image tensor does not have the expected dimensions.
  • Solution: Ensure that your input image is formatted correctly, typically as a 4D tensor with dimensions corresponding to batch size, channels, height, and width.

Precision type not supported

  • Explanation: This error happens when an unsupported precision type is specified.
  • Solution: Use one of the supported precision types: "bf16", "fp16", or "fp32". These are the only options that the node can process.

Depth / Normal (LBM) Related Nodes

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