Nodes/RyanOnTheInside/Depth Blender βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Depth Blender βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Combine two depth maps, and let a reactive signal drive the mix

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Depth Blender βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • depth_maps
  • other_depth_maps
  • opt_feature
  • IMAGE
β—„strength1.00β–Ί
β—„feature_threshold0.00β–Ί
β—„feature_paramβ–Ύβ–Ί
β—„feature_moderelativeβ–Ί
β—„blend_modeaverageβ–Ί

If you're combining two depth passes - say, a depth map of your subject and a separate depth map of a background plate, or two different estimators' takes on the same shot - Depth Blender is the node that merges them. It's a small, focused utility, but like most of RyanOnTheInside's mask/image nodes it's built on the pack's "Flex" reactivity system, so the blend itself can be pushed around by an incoming audio or motion signal instead of sitting at one fixed ratio for the whole clip.

Depth maps are the backbone of ControlNet's Depth conditioning - whatever estimator you used upstream (MiDaS, Depth Anything, Marigold) to produce your depth passes, this node doesn't care; it just blends whatever IMAGE-typed depth maps you hand it.

How it works

Two depth-map sequences go in, a blend_mode decides how they combine, and one merged depth map comes out. The Flex layer sits on top: feature_param lets you choose whether strength gets modulated by an incoming FEATURE signal, or leave it static with None.

The inputs and outputs that matter

  • depth_maps and other_depth_maps (both IMAGE, required) - the two depth-map sequences to combine.
  • blend_mode (default average) - add, subtract, multiply, or average. Average is the safe default for merging two independent depth estimates of roughly the same scene; add/multiply are more for deliberate compositing effects than "clean up my depth pass."
  • strength (default 1, 0–1) - overall blend intensity.
  • feature_param (strength / None) - whether an incoming feature curve is allowed to modulate the blend strength over time.
  • feature_mode (relative / absolute, default relative) - relative changes are centered around your set strength value; absolute scales from zero up to the max regardless of what you set strength to.
  • feature_threshold - the minimum feature value before modulation kicks in at all.
  • opt_feature (optional, FEATURE) - the reactive input itself, per its tooltip pulling from "audio, motion, color, or other sources."
  • Output - a single IMAGE (the blended depth map).

How to install it

Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart. Nothing here needs a model download - it's a pure image-math node on depth maps you're already producing elsewhere in your graph.

Common issues & troubleshooting

Blended output looks washed out or flat. average is gentle by design - if the two source depth maps disagree a lot (different scenes, wildly different depth ranges), averaging them can produce a result that doesn't clearly represent either. Try add or multiply if you actually want the more dramatic passes to dominate.

Strength modulation doesn't seem to do anything. Confirm feature_param is set to strength, not left on None - that's the switch that actually connects your opt_feature input to the blend. None means the feature is ignored regardless of whether it's wired in.

Feeding this into a ControlNet Depth pass and getting inconsistent conditioning. Whatever you output here goes straight into whatever consumes it downstream (typically a depth ControlNet preprocessor step), so instability frame-to-frame usually traces back to one of your two source depth-map sequences being noisy rather than to the blend itself - check each input independently before blaming the blend.

CategoryRyanOnTheInside/DepthModifiers

Inputs (8)

NameTypeDefaultDescription
strengthFLOAT1.000–1Overall strength of the effect (0.0 to 1.0)
feature_thresholdFLOAT0.000–1Minimum feature value to apply the effect (0.0 to 1.0)
feature_paramCOMBOParameter to be modulated by the feature
feature_modeCOMBOrelativeHow the feature modulates the parameter ('relative' or 'absolute')
depth_mapsIMAGEInput depth maps to be processed
other_depth_mapsIMAGESecondary depth maps to blend with
blend_modeCOMBOaverageMethod of blending ('add', 'subtract', 'multiply', 'average')
opt_featureoptFEATUREOptional feature input for parameter modulation

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”