Run ComfyUI Easily with InstaSD

Skip the complex setup and run ComfyUI online. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

MarigoldDepthEstimation_v2_video

MarigoldDepthEstimation_v2_video Documentation

Overview

MarigoldDepthEstimation_v2_video is a specialized node within ComfyUI designed for diffusion-based monocular depth estimation in video sequences. It leverages the Marigold depth estimation model, a pre-trained diffusion model, to produce smooth depth maps from video inputs. The node utilizes pipelines from the Hugging Face Diffusers library and features specific enhancements to ensure smoother transitions between frames in video processing.

Node Functionality

This node produces depth maps for a sequence of video frames using a diffusion model approach. It offers an innovative solution for video processing by smoothing out the transitions between frames, providing more consistent depth estimation across the sequence.

Inputs

  • marigold_model (required): A pre-loaded model compatible with the Marigold diffusion pipelines, typically obtained through the MarigoldModelLoader node.

  • images (required): A batch of video frames provided as input. Each frame is processed to estimate depth.

  • seed (required): An integer used as the random seed for generating noise during processing. Adjusting the seed can influence the generated depth maps.

  • denoise_steps (required): Number of steps dedicated to the denoise process per frame. Increasing the number of steps may enhance the accuracy of the depth estimation at the cost of increased processing time.

  • processing_resolution (required): Desired resolution for processing the depth maps. The value is adjustable in increments of 8, with a typical default setting of 768p, which balances performance and output quality.

  • scheduler (required): A choice between DDIMScheduler and LCMScheduler, governing the diffusion and scheduling process during depth map generation.

  • blend_factor (required): A floating-point value dictating the blending level of the previous frame's latent representation with the current frame. This feature helps maintain smooth transitions between consecutive frames.

  • use_taesd_vae (required): A boolean parameter determining whether to use a specific VAE (Variational Autoencoder) from the taesd model to enhance image processing.

  • keep_model_loaded (optional): A boolean parameter that, if set to True, keeps the model loaded in VRAM between operations to potentially reduce load times for subsequent processes.

Outputs

  • image: The output is a sequence of images representing the depth maps of the input video frames. Each depth map is aligned spatially and temporally to preserve the continuity of the video sequence.

Usage in ComfyUI Workflows

MarigoldDepthEstimation_v2_video is particularly useful in workflows involving video content that requires depth map estimation. Key applications include:

  • Visual Effects: By providing accurate depth maps, this node can assist in creating realistic effects that rely on depth cues, such as simulating focus changes or generating volumetric lighting effects.

  • 3D Reconstruction: Facilitates 3D model generation from video sequences by providing consistent depth information.

  • AI Guided Editing: Depth information can guide complex transformations in videos, such as background replacement or object manipulation.

Special Features and Considerations

  • Smooth Frame Transition: The node uses a previous frame's latent representation as an initialization for the next frame, carefully blending them to ensure a smooth transition across video frames.

  • Performance Optimization: Users are encouraged to manage processing resolution and denoise steps to balance between quality and computation time. High resolutions and denoise steps increase accuracy but require more computational resources.

  • Model Download: If the required model is not available locally, it will be automatically downloaded using a compatible pipeline from Hugging Face, ensuring that users always have access to the most up-to-date models.

  • Resource Management: Be aware that this node can be memory-intensive. The use of fp16 data type (half precision) is recommended to reduce VRAM usage without a significant loss in depth estimation quality. Additionally, setting keep_model_loaded to False can free up resources when not processing in quick succession.

Want to try ComfyUI-Marigold without installing anything? Run ComfyUI online on InstaSD's cloud GPUs — no setup required.