ProPostDepthMapBlur
Real depth-of-field, driven by an actual depth map
- image
- depth_map
- IMAGE
- MASK
Radial blur fakes depth of field by guessing that "far from the frame center" means "should be blurry." This node doesn't guess - it takes an actual depth map and blurs based on real scene geometry, so a subject off to one side stays sharp while background clutter behind them gets soft, exactly like a real camera with a wide aperture. If you've already got a depth map lying around from a ControlNet step, or you're happy to generate one, this is the more honest way to do post-generation depth of field.
How it works
You feed it your rendered image plus a separate depth_map - typically the output of a Depth Anything or MiDaS node, both of which the pack's own docs point to explicitly. Depth maps encode distance as brightness: white is close, black is far (that's the standard convention across depth-estimation ComfyUI nodes, though it's always worth a quick visual check on the first frame). The node picks a "focal depth" in that map, treats it as the plane that should stay in focus, and blurs everything else based on how far its depth value is from that plane.
The inputs and outputs that matter
- depth_map - a second
IMAGEinput for the depth map itself. This has to come from somewhere; Depth Anything V2 is the current go-to depth preprocessor in the ComfyUI ecosystem and is what the pack author demoed it with. - focal_depth (default 1.0, range 0.0–1.0) - which depth level stays sharp. 1.0 means the closest things in frame are in focus; 0.0 means the farthest things are. This is the one setting that decides "what's my subject."
- focal_range (default 0.0, range 0.0–1.0) - how much depth around the focal point also stays sharp. 0.0 keeps only the exact focal plane crisp; push it toward 1.0 and more of the image stays in focus, which is useful when your depth map is noisy and a razor-thin focal plane looks patchy.
- blur_strength (default 64.0, range 0.0–256.0) and focus_spread (default 1.0, range 1.0–8.0) - how strong the blur is and how wide the transition zone is between sharp and blurred, same idea as radial blur's controls.
- steps (default 5, up to 32) - blur quality vs. speed; more steps for a smoother falloff on larger images.
- mask_blur (default 1, odd values 1–127) - pre-blurs the depth map itself before it's used, smoothing out noisy or blocky depth data so the transition between sharp and blurry doesn't look jagged. 1 means no pre-blur.
Two outputs: IMAGE, the blurred result, and MASK - the derived focus mask, handy if you want to composite something else (like a second grain pass at a different intensity) selectively onto just the background.
Installing it
ComfyUI Manager, search propost, install, restart - or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/digitaljohn/comfyui-propost.git
pip install -r requirements.txt
You'll also need a depth-map source node if you don't already have one in your workflow - comfyui_controlnet_aux (Fannovel16) is the standard pack that bundles Depth Anything and MiDaS preprocessors, and it's a separate install from ProPost.
Where people get tripped up
The most common miss is dimension mismatch - the depth map has to match the image's resolution, so if you generated depth from a resized or cropped copy, resize it back before wiring it in. Second: if the blur looks completely backwards - background sharp, subject blurry - check which depth convention your source node is using. Not every depth preprocessor agrees on whether close is bright or dark, and this node has no way to know which one it's getting; flip focal_depth from near 0 toward near 1 (or vice versa) if that happens rather than assuming something's broken. And if the focus transition looks blocky or noisy rather than a smooth falloff, that's almost always a rough depth map - raise mask_blur a few steps before touching anything else.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| depth_map | IMAGE | — | |
| blur_strength | FLOAT | 640–256 | — |
| focal_depth | FLOAT | 1.000–1 | — |
| focus_spread | FLOAT | 1.01–8 | — |
| steps | INT | 51–32 | — |
| focal_range | FLOAT | 0.000–1 | — |
| mask_blur | INT | 11–127 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |