ComfyUI Node

DepthCrafter

Depth maps for video that don't flicker

By akatz-ai·Created 2 years ago·Updated about a year ago· 260
DepthCrafter
  • depthcrafter_model
  • images
  • depth_maps
force_sizetrue
num_inference_steps5
guidance_scale1.0
window_size110
overlap25

If you've ever run a per-frame depth model on a video and watched the background breathe and shimmer from one frame to the next, you already know why this node exists. Frame-by-frame depth flickers. DepthCrafter is video-native - Tencent built it to look at whole clips, not single frames - and the result is depth maps that hold still. That temporal consistency is the entire point, and it's the reason people reach for this pack instead of running Depth Anything per frame.

What it actually does

This is the render node: it takes the loaded pipeline from DownloadAndLoadDepthCrafterModel plus a batch of images (your video loaded as frames), runs the DepthCrafter UNet, and returns one grayscale depth_maps tensor per input frame, normalized to 0–1. The output is a plain IMAGE, so it plugs into anything that takes an image batch - save it as a depth video, feed it to depth ControlNet, or drive a parallax animation. The author's own DepthFlow pack is the natural companion for the parallax half of that story.

The mechanism: sliding windows

DepthCrafter processes video through a sliding context window, and the two parameters that sound like jargon are the ones that actually shape your results:

  • window_size (default 110, recommended 75–110) - how many frames the model looks at in one pass. This is your VRAM lever: lower it and the model needs far less memory, at the cost of more passes and slower render.
  • overlap (default 25) - how much consecutive windows share when your clip is longer than the window, so seams don't show. Keep it at the default unless you're fighting artifacts at window boundaries.

The inputs that matter

depthcrafter_model    the handle from the loader node
images                your video as an image batch
force_size            default true
num_inference_steps   default 5  (1–100)
guidance_scale        default 1.0  (0.1–10)
window_size           default 110
overlap               default 25

Three things to actually touch:

  • force_size - leave it on. The model internally requires width and height to be multiples of 64. With it enabled, input is silently resized to the nearest valid dimensions; disable it and a non-conforming clip raises an error instead. The only reason to turn it off is if you're feeding pre-resized frames.
  • num_inference_steps - more steps, fewer artifacts, longer render. Five is the default and it's a good starting point; the author's own example ran ten.
  • guidance_scale - stay in the 1.0–1.2 band the README recommends. This isn't like image diffusion; pushing it high does not help.

Performance and VRAM, honestly

DepthCrafter is a hungry model. The author calls 8GB the minimum, and his own guidance is that long clips at 768p and up want more like 16GB+. On a 4090, a 10-second clip at 10 steps ran in roughly 3–4 minutes - drop to 4–5 steps to speed it up. Your three real levers, in order of impact: resolution (drop it first), window_size, and the offload toggles on the loader node.

Troubleshooting

  • Blurry or artifact-heavy output at high res - this is the model's known tradeoff, not a bug. DepthCrafter's output resolution is lower than its input, so a 1280×720 clip can come out soft. Lower-res input renders cleaner maps, and people on 12GB cards (3060s included) report artifacts at 720p+ that resolve when they drop the resolution and window size.
  • Flicker that won't go away - check that you're actually feeding DepthCrafter the whole clip, not re-running it per frame; its whole advantage is temporal context.
  • License - the model is non-commercial academic use only. Great for experiments, worth reading the license before anything commercial.

If you need one-shot depth for stills, Depth Anything V2 is the better tool. If you need a video's depth to stop dancing around, this is the one.

CategoryDepthCrafter

Inputs (7)

NameTypeDefaultDescription
depthcrafter_modelDEPTHCRAFTER_MODEL
imagesIMAGE
force_sizeBOOLEANtrue
num_inference_stepsINT51–100
guidance_scaleFLOAT1.00.1–10
window_sizeINT1101–200
overlapINT250–100

Outputs (1)

NameTypeDescription
depth_mapsIMAGE