Nodes/ComfyUI-NegiTools/Depth Estimation by Marigold (experimental) πŸ§…
ComfyUI Node

Depth Estimation by Marigold (experimental) πŸ§…

Marigold depth, officially abandoned β€” read this before you build on it

By natto-makiΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 31
Depth Estimation by Marigold (experimental) πŸ§…
  • image
  • DEPTH_IMAGE
β—„infer_passes10β–Ί
β—„denoise_steps10β–Ί
β—„seed0β–Ί
β—„runtimeβ–Ύβ–Ί
β—„depth_exponent1.0β–Ί
β—„invertfalseβ–Ί

Let's start with the part the README puts in giant warning text: this node is not maintained and will be discontinued. The pack's author says so themselves, and points you to kijai/ComfyUI-Marigold as the replacement. So why write about it at all? Because it's still in the pack, it's a genuinely interesting piece of engineering, and if you install ComfyUI-NegiTools you might stumble into it. Consider this the "understand it, then don't build on it" review.

What it does

It estimates depth with Marigold - the ETH Zurich model that reframes depth estimation as a generative diffusion process rather than a discriminative one. Where MiDaS or Depth Anything predict a depth map directly, Marigold denoises one: it starts from noise conditioned on your image and refines a depth map through repeated steps. That makes it slower than any direct estimator - the KB clocks it at roughly 9 seconds per denoising step - but sharper-edged and far better at unusual, illustrative, or synthetic inputs that discriminative models choke on. For depth-ControlNet quality and 3D-printing height maps, it's a heavyweight champion.

How it works (the part that matters)

This node doesn't run Marigold in-process. On first use it git clones the original prs-eth/Marigold repo into a dependencies/ folder, runs an install script that downloads the weights, then shells out to the repo's own run.py as a subprocess and loads the resulting depth .npy back in. The runtime dropdown is the big decision:

  • bare (recommended) - installs Marigold's Python requirements into your current ComfyUI environment. It usually works, but it's a package-management gamble: Marigold's dependencies get dropped into the same env as all your other nodes, which is precisely how dependency hell starts.
  • venv (if "bare" doesn't work) - creates a separate virtualenv for Marigold so it can't poison your ComfyUI env. Safer, slower to set up, and the correct choice if you value not breaking everything else.

The node's own code comments call the whole subprocess approach "a very bad idea, but it works" - and the README's "use Kijai instead" note is effectively the author agreeing.

The inputs that matter

  • infer_passes (default 10) - how many ensemble passes to average. More = better, much slower.
  • denoise_steps (default 10) - denoising steps per pass.
  • seed - reproducibility for the diffusion process.
  • depth_exponent (default 1.0) - gamma-curves the depth values; higher pushes contrast.
  • invert - flip near/far (some workflows want dark = close).
  • Output: a single DEPTH_IMAGE (IMAGE), normalized to 0–1.

Installing it

It's in ComfyUI-NegiTools - ComfyUI Manager (search "ComfyUI-NegiTools") or:

cd ComfyUI/custom_nodes
git clone https://github.com/natto-maki/ComfyUI-NegiTools
pip install -r ComfyUI-NegiTools/requirements.txt

then restart. Note this node's extra install: the first run clones the Marigold repo, runs its install script, and downloads weights - so first use is slow and requires internet. And it pairs neatly with the pack's Stereo Image Generator, which is a fellow runtime-clone of an A1111 extension.

The honest verdict

Skip it. The author told you to. Kijai's ComfyUI-Marigold is the maintained, in-process alternative that does the same thing without subprocess roulette and env pollution. If you're determined to use this node, at least pick the venv runtime so the bare install can't wreck your ComfyUI env - the failure mode you're avoiding is a node pack that quietly upgrades your numpy or torch and breaks a dozen unrelated nodes. Depth estimation itself is a great addition to your toolbox; this particular wrapper is the deprecated version of the idea.

CategoryGenerator

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
infer_passesINT101–40β€”
denoise_stepsINT101–40β€”
seedINT00–4294967295β€”
runtimeCOMBO2 options: bare (recommended), venv (if "bare" doesn't work)
depth_exponentFLOAT1.00.1–3β€”
invertBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
DEPTH_IMAGEIMAGEβ€”