ComfyUI Node
〽️ Image Ops Defocus
A ComfyUI node in image/imageops with 14 inputs and 2 outputs.
〽️ Image Ops Defocus
- image
- depth
- shape_texture
- mask
- image
- mask
◄bypassfalse►
◄focus_distance0.50►
◄focus_range0.05►
◄max_blur_radius24►
◄num_layers8►
◄bokeh_shapecircle►
◄highlight_threshold0.90►
◄highlight_boost1.5►
◄invert_depthfalse►
◄invert_maskfalse►
Categoryimage/imageops
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| bypass | BOOLEAN | false | — |
| focus_distance | FLOAT | 0.500–1 | Depth value (0=near, 1=far by default) that stays in focus. |
| focus_range | FLOAT | 0.050–0.99 | Depth thickness around focus_distance that stays sharp before blur ramps up. |
| max_blur_radius | INT | 240–128 | Bokeh disc radius in pixels at the depth extremes. |
| num_layers | INT | 82–32 | Depth slices blurred and interpolated between. Higher = smoother falloff, slower. |
| bokeh_shape | COMBO | circle | 4 options: circle, hexagon, octagon, custom |
| highlight_threshold | FLOAT | 0.900–2 | Brightness above which pixels bloom into visible bokeh discs when blurred. |
| highlight_boost | FLOAT | 1.50–8 | Strength of the bokeh highlight bloom. |
| invert_depth | BOOLEAN | false | — |
| invert_mask | BOOLEAN | false | — |
| imageopt | IMAGE,VIDEO | Images/Video input. | |
| depthopt | IMAGE,VIDEO | Depth map (grayscale). Its luma drives the per-pixel blur amount. | |
| shape_textureopt | IMAGE,VIDEO | Optional grayscale bokeh aperture shape, used when bokeh_shape is custom. | |
| maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |