◎ Radiance Depth of Field
Cinematic defocus from a depth map, bokeh shape and all
- image
- depth_map
- IMAGE
Depth of field is one of the strongest "this was shot on a real camera" signals an image can have, and it's one of the hardest things to fake well in post. Radiance Depth of Field is the node that does it: it blurs your image based on a depth map, so the background falls out of focus while the subject stays sharp, instead of the flat "blur everything" you get from a plain Gaussian.
The mechanism is the standard trick from the depth-estimation world: a depth map (bright = near, dark = far, or the opposite if you invert it) tells the blur how strong to be at every pixel. Areas far from the focus plane get blurred hard; areas on it don't. Feed it the output of Radiance's own Depth Map Generator - the two are designed to pair - and you get a one-stop defocus pass. Feed it no depth map at all and it degrades to a flat blur, which is only worth doing for a stylized look.
The inputs that matter
- image - the frame to blur.
- depth_map - optional, but this is the node's whole reason to exist. Without it you get uniform blur; with it, defocus.
- blur_amount - 0 to 50, default 5. How strong the maximum blur gets.
- focus_distance - 0 to 1, default 0.5. Which depth value is in focus. Tune this to move the sharp band through the scene.
- focus_range - how deep the in-focus band is. Small = razor-thin, large = deep focus. This is your f-stop in disguise.
- bokeh_shape - Circle, Hexagon, Octagon, or Anamorphic Oval. Approximates the aperture's physical shape in the out-of-focus blur. The anamorphic oval is the one that sells the cinema look - oval highlights and horizontal streaks read as "anamorphic lens" instantly. Note the caveat: it's approximate. For real anamorphic character you'd still add streaking in a compositor.
- highlight_boost - 1 to 3. Makes bright out-of-focus highlights bloom into bokeh discs instead of dull smears. This is what separates a convincing fake DoF from a blur filter.
- foreground_blur - on by default. Real lenses blur foreground elements too; turn it off if you want only the background to fall off.
Output is a single IMAGE at the same size you fed in.
Where it fits
This is the payoff node for the depth map: ControlNet uses depth for generation, but DoF is the post side, and it's the move that makes a flat render read as a camera shot. Pair it with Radiance Film Grain and a grade and you've got most of the "shot on film" checklist without re-rolling the generation. One honest note: the pack's marketing overstates the 32-bit pipeline in places (the launch thread caught nodes dropping to 8-bit), and this node is a blur - it won't recover detail that was already lost, and it's only as good as the depth map you feed it. A noisy or mispolarized depth map makes halos, so use the Depth Map Generator's blur_edges to smooth it first.
Install
In the fxtdstudios/radiance pack - Manager search "Radiance", or:
cd ComfyUI/custom_nodes
git clone https://github.com/fxtdstudios/radiance.git
cd radiance
pip install -r requirements_linux.txt # or windows/mac_silicon
Restart after; Linux needs libopenexr-dev before pip. Heavy dependency set (OpenEXR, OpenColorIO, colour-science, transformers) means a slow first boot, and if Manager's security level blocks the install, the README's manual clone is the workaround.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| blur_amount | FLOAT | 5.00–50 | — |
| depth_mapopt | IMAGE | — | |
| focus_distanceopt | FLOAT | 0.500–1 | — |
| focus_rangeopt | FLOAT | 0.100.01–0.5 | — |
| bokeh_shapeopt | COMBO | Circle | Approximate aperture shape for out-of-focus blur. |
| highlight_boostopt | FLOAT | 1.01–3 | — |
| foreground_bluropt | BOOLEAN | true | — |
| use_gpuopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |