Nodes/Marigold V2 Tiled Depth - Vathography/Marigold V2 Tiled Depth - Vathography
ComfyUI Node

Marigold V2 Tiled Depth - Vathography

What the Tiling Actually Does

By vathography·Created 9 days ago·Updated 3 days ago· 17
Marigold V2 Tiled Depth - Vathography
  • image
  • model
  • vae
  • conditioning
  • depth

If you have ever fed a 4000px photograph to a depth estimator and got back something soft and vaguely in the right places, you know why this pack exists. Marigold has always been the quality-first depth model - it reads a scene through a diffusion prior rather than a discriminative net, which is why it holds up on odd, artistic material where the fast models get confused. The catch was resolution: the original ran at a fixed working size, downsampled your image and upsampled the map back. People noticed in the first week - one early user found results only came good above about 1.5k pixels of source, and pushing a single pass much further went fuzzy again.

Marigold V2 Tiled Depth - Vathography attacks that from the other end. It keeps the photograph's full resolution and estimates the depth in pieces.

What tiling actually buys you

If you want a ControlNet depth hint for a 1024px generation, you're in the wrong place - Depth Anything V2 Large does that in a fraction of the time and the difference won't survive the sampler. This node is for when the depth map is the artwork: a large photograph distilled to its volume and handed to Blender as a height field.

How it works

Two passes, then a merge. The global pass pins your photo onto a grid of at most ~3.2 MP (multiples of 16) and gets the overall shape - where the foreground ends, where the horizon sits. The tiles are 1536 px squares stepping across the photo with at least 512 px of overlap, each coming back with detail the global resize threw away.

The interesting part is stitching them without seams, because a tile doesn't know what depth the global assigned to its corner. Each tile prediction is mapped onto the global's values with a quantile fit over its central 80%, saturated "rail" pixels excluded. Tiles whose steepest segment is 68× the median slope - cliffs, hard silhouettes - use a straight-line Huber fit instead, which the log calls a "steep-segment fallback". A mosaic blends the aligned tiles with raised-cosine weights; then a Laplacian merge recombines them, high frequencies from the mosaic, low frequencies from the global. Global keeps the shape, tiles keep the detail, overlap disappears.

Finally the map is stretched between its 0.5% and 99.5% percentiles and flipped so near is bright. You get a 0..1 grey IMAGE at exactly your photo's size.

Under the hood it's a single sampler step - euler, sigmas 0.5 down to 0, no noise - which is why the sampling setup matters. If your MODEL isn't on IMG_TO_IMG_VELOCITY sampling, the node refuses rather than handing you a garbage map.

Inputs and outputs

Only four inputs, and three of them come from the pack's own template subgraph:

  • image - one photo. A batch is refused, because the merge assumes a single canvas.
  • model - the Marigold V2 depth model after ModelSamplingAuraFlow with shift 1.73 and sampling set to img_to_img_velocity.
  • vae and conditioning - the matching Marigold V2 depth VAE and the ConditioningLoader embedding.

One output, depth, near = bright, photo-sized. Wire it into Save Image (Advanced) as 32-bit EXR with linear colour if you're headed to Blender (that's what the template does), or straight into the pack's Depth Relief Increase node if you're staying in ComfyUI.

The base model needs four files, in these exact folders:

ComfyUI/models/diffusion_models/qwen_image_edit_2509_int8_convrot.safetensors
ComfyUI/models/loras/marigold_v2_depth_log_stage2.safetensors
ComfyUI/models/vae/marigold_v2_depth_log_stage2_vae.safetensors
ComfyUI/models/embeddings/marigold_v2_depth_conditioning.safetensors

They're from Comfy-Org/marigold-v2-0. The node fingerprints the LoRA and the VAE and picks the recipe itself, and if you pair a LoRA from one model with the other's VAE it refuses rather than handing you a subtly wrong map.

Install

Search Marigold V2 Tiled Depth Vathography in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/vathography/ComfyUI-Marigold-V2-Tiled-Depth-Vathography
pip install -r ComfyUI-Marigold-V2-Tiled-Depth-Vathography/requirements.txt

Then restart ComfyUI. Two things the README doesn't emphasise enough: it needs ComfyUI v0.36.0 or newer for the native Marigold V2 sampling modes, and despite the "no extra Python packages" line, tiled_core.py imports pyrdown/pyrup from kornia at startup. Manager install handles that for you; a bare git clone without the pip step leaves the whole pack failing on import.

Where people get burned

The most common failure isn't a crash, it's the wiring - the node needs ModelSamplingAuraFlow in the chain, and the IMG_TO_IMG_VELOCITY error is it telling you so. Use the template rather than building the graph by hand.

Then memory. The stated floor is about 8 GB VRAM plus 24 GB system RAM, honest for a 1536px tiled diffusion pass. On a small card the VAE falls back to tiled encode/decode - same result, slower. A real OOM on a tile can't be fixed by shrinking the tile, because smaller tiles were judged clearly worse and aren't offered.

And budget time. A 12 MP shot (4000×3000) plans out to 4×3 = 12 tiles plus the global pass - thirteen forward passes, each with a 512px strip appended on the right and cropped off after the prediction so the model isn't staring at a hard frame edge mid-scene. That's the honest cost of full-resolution depth, and why this is a coffee-break node.

Categoryimage/geometry estimation

Inputs (4)

NameTypeDefaultDescription
imageIMAGEThe photo (one image). Larger photos give more tiles and more detail.
modelMODELThe Marigold V2 depth model AFTER 'ModelSamplingAuraFlow' (shift 1.73, sampling img_to_img_velocity), as in the template.
vaeVAEThe Marigold V2 depth VAE from the template.
conditioningCONDITIONINGThe Marigold V2 depth conditioning from the template ('ConditioningLoader').

Outputs (1)

NameTypeDescription
depthIMAGEDepth map, 0..1, near = bright, at the photo's size.