Depth Blender β‘π ‘π π £π
Combine two depth maps, and let a reactive signal drive the mix
- depth_maps
- other_depth_maps
- opt_feature
- IMAGE
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_mapsandother_depth_maps(both IMAGE, required) - the two depth-map sequences to combine.blend_mode(defaultaverage) -add,subtract,multiply, oraverage. 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, defaultrelative) - relative changes are centered around your setstrengthvalue; absolute scales from zero up to the max regardless of what you setstrengthto.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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| strength | FLOAT | 1.000β1 | Overall strength of the effect (0.0 to 1.0) |
| feature_threshold | FLOAT | 0.000β1 | Minimum feature value to apply the effect (0.0 to 1.0) |
| feature_param | COMBO | Parameter to be modulated by the feature | |
| feature_mode | COMBO | relative | How the feature modulates the parameter ('relative' or 'absolute') |
| depth_maps | IMAGE | Input depth maps to be processed | |
| other_depth_maps | IMAGE | Secondary depth maps to blend with | |
| blend_mode | COMBO | average | Method of blending ('add', 'subtract', 'multiply', 'average') |
| opt_featureopt | FEATURE | Optional feature input for parameter modulation |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |