Nodes/tri3d-comfyui-nodes/Smart Depth v5.1.0
ComfyUI Node

Smart Depth v5.1.0

Smart Box's black-fill twin (yes, they shipped both)

By TRI3D-LC·Created 3 years ago·Updated about a year ago· 27
Smart Depth v5.1.0
  • image
  • IMAGE
keypoints_json

Smart Depth is Smart Box with exactly two lines changed - and you should know which two before you pick it, because one of them will bite you. Same pack (tri3d-comfyui-nodes, TRI3D-LC, v5.1.0), same inputs, same pose-driven bounding box, opposite fill color.

What actually differs

I diffed the two node implementations so you don't have to. Both take a mask image and a DWPose keypoints_json, take the topmost torso keypoint (MidHip/RHip/RKnee/RAnkle/LHip/LKnee - indices 8–13) as the hip line, find the mask contours below it, and draw one filled rectangle around them. The differences:

  • Fill color: Smart Box fills the rectangle white; Smart Depth fills it black.
  • Speck filter: Smart Box drops contours under 20 px of area; Smart Depth keeps everything down to 1 px (area > 0).

So Smart Depth gives you a solid black box over the lower body where Smart Box gives you white. The "depth" in the name is a hint about intent - a blacked-out box reads like a void/depth-zero region, and the author's try-on pipelines use it where the lower body should be treated as "nothing here." If you're feeding a mask into an inpainting node, black-fill is often literally invisible to the model, so grab Smart Box for that job. The only reason to reach for this one is if you've got a workflow that expects the lower region blacked out - a reference image for conditioning, or a depth-style signal where the void should be black.

Inputs and install

Identical to Smart Box: image (the mask, channel 0 is read) and keypoints_json (STRING path to the 130-point keypoint file - generate it with the pack's tri3d_SaveFlattenedPoseKpsAsJsonFile wired to DWPose). Output is one IMAGE.

Install the same way:

cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes

or via ComfyUI Manager (search tri3d-comfyui-nodes), then restart. No model downloads for this node.

Gotchas

Same silent pass-through as its twin: no valid torso keypoints means hip_y = 0 and the image comes back unchanged, so verify DWPose found the person before you trust the output. And remember the speck filter is looser here - a noisy mask can balloon the box across stray pixels that Smart Box would have filtered. Honestly, this node is the one I'd deprioritize in the pack: it's a near-duplicate shipped for a niche use, and most people should just use Smart Box and convert the mask color themselves if needed.

CategoryTRI3D

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
keypoints_jsonSTRING

Outputs (1)

NameTypeDescription
IMAGEIMAGE