DepthCrafter Nodes
Create consistent depth maps for your videos using DepthCrafter in ComfyUI.
Original DepthCrafter repo: https://github.com/Tencent/DepthCrafter
Updates:
(10/25/2024): Added enable_model_cpu_offload and enable_sequential_cpu_offload options to model loader. Only enable one at a time!
- enable_model_cpu_offload: Can save +25% of VRAM with little impact to speed by offloading models to cpu when no longer needed for inference.
- enable_sequential_cpu_offload: Can save +37% of VRAM at the expense of slower inference speed by moving all models to CPU.
⭐ Example Workflow:
📦 Included Nodes:
- DownloadAndLoadDepthCrafterModel: Will fetch the model files need to run DepthCrafter and save them under models/depthcrafter.
- DepthCrafter: Renders out depthmap videos given the following inputs:
- depthcrafter_model: (input from the first node)
- images: (single or batch),
- max_res: the maximum resolution of the input images, supports increments of 64 pixels. (Larger resolutions require more VRAM)
- max_inference_steps: more steps may result in less artifacts in the output, but will take longer to render.
- guidance_scale: (1 - 1.2 recommended)
- window_size: the length of the context window for DepthCrafter. You can lower this to save on VRAM at the expense of taking longer to render (75-110 recommended)
- overlap: how much to overlap each context window to render longer videos > 110 frames. (25 recommended)
🔧 Installation and Usage
- ComfyUI Manager:
- This node pack is available to install via the ComfyUI Manager. You can find it in the Custom Nodes section by searching for "DepthCrafter" and clicking on the entry called "DepthCrafter Nodes".
- Clone the repository: