Depth Shape Modifier β‘π ‘π π £π
Sculpt a bulge or dip into a depth map, masked
- depth_map
- mask
- IMAGE
This is the node behind the pack author's own "Depth Chamber" workflow, and it's a genuinely fun trick: instead of only using a depth map for ControlNet conditioning, you reach in and sculpt it. Pick a masked region and this node injects a spherical gradient into it - pushing that area to read as bulging forward or receding backward in Z-space - before you feed the modified depth map into your ControlNet pipeline. The author's own description for it, from a Reddit demo of this exact node, was "depth injection" - you're literally injecting fake geometry into a real depth estimate.
How it works
Feed it a depth_map and a mask marking the region to sculpt. Inside that masked area, the node blends in a spherical gradient shape whose steepness is set by gradient_steepness - low values give a gentle, wide dome; high values give a sharp, tight bulge. depth_min/depth_max clamp the range of depth values the modification can push the masked area into, and strength is the overall blend intensity between the original depth map and the injected shape. The practical effect: an object that was flat in your depth estimate can be made to look like it protrudes or recedes, and since the output is still a standard depth map, it flows straight into whatever ControlNet or 3D-effect chain was already consuming depth maps in your workflow.
The inputs and outputs that matter
depth_map(IMAGE, required) - "Input depth map to be modified," per the tooltip.mask(MASK, required) - "Mask defining areas to apply the shape modification."gradient_steepness(default 2, range 0.1β10) - controls the steepness of the injected spherical gradient.depth_min/depth_max(default 0 / 1, range 0β1) - the depth-value range the modified area is clamped to.strength(default 1, range 0β1) - overall strength of the modification, i.e. how much of the original depth shows through versus the injected shape.
Output: a single IMAGE - the modified depth map, same format as the input.
For finer control over exactly how the injected shape blends with the original - linear crossfade vs. Photoshop-style blend modes - the pack also ships DepthShapeModifierPrecise, which adds a composite_method choice on top of this same core idea.
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. No model download for this node - it's geometry math on a depth map and mask you already have, running on the pack's opencv-python/scikit-image dependencies.
Common issues & troubleshooting
The modification barely shows up. Check strength first - at low values the original depth map dominates and the injected shape is nearly invisible. Also confirm your mask is actually covering where you expect; a wrong or empty mask means nothing gets modified regardless of the other settings.
The bulge looks like a hard, obviously-fake blob instead of blending in. Try lowering gradient_steepness for a softer, wider gradient, and check depth_min/depth_max aren't clamped to a range that clashes badly with the surrounding depth values - a sharp jump at the mask boundary is usually a range or steepness mismatch, not a bug.
Result looks fine in isolation but breaks your ControlNet output. Remember this node changes the depth map, not the source image - if your downstream ControlNet strength is high, an aggressive depth injection will visibly reshape the generation to match the new (fake) geometry. That's expected; dial back strength here or your ControlNet weight if it's overpowering the rest of the prompt.
Depth quality upstream is already noisy. As with any node in this pack that touches depth, garbage in, garbage out - a shaky or low-res depth estimate will make the injected shape look inconsistent frame to frame in a video sequence, independent of anything you set here.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| depth_map | IMAGE | Input depth map to be modified | |
| mask | MASK | Mask defining areas to apply the shape modification | |
| gradient_steepness | FLOAT | 2.00.1β10 | Controls the steepness of the spherical gradient (0.1 to 10.0) |
| depth_min | FLOAT | 0.000β1 | Minimum depth value for modified areas (0.0 to 1.0) |
| depth_max | FLOAT | 1.000β1 | Maximum depth value for modified areas (0.0 to 1.0) |
| strength | FLOAT | 1.000β1 | Overall strength of the modification (0.0 to 1.0) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |