Nodes/ComfyUI-Majoor-ImageOps/〽️ Image Ops Defocus
ComfyUI Node

〽️ Image Ops Defocus

A ComfyUI node in image/imageops with 14 inputs and 2 outputs.

By MajoorWaldi·Created 9 months ago·Updated 4 days ago· 14
〽️ 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)

NameTypeDefaultDescription
bypassBOOLEANfalse—
focus_distanceFLOAT0.500–1Depth value (0=near, 1=far by default) that stays in focus.
focus_rangeFLOAT0.050–0.99Depth thickness around focus_distance that stays sharp before blur ramps up.
max_blur_radiusINT240–128Bokeh disc radius in pixels at the depth extremes.
num_layersINT82–32Depth slices blurred and interpolated between. Higher = smoother falloff, slower.
bokeh_shapeCOMBOcircle4 options: circle, hexagon, octagon, custom
highlight_thresholdFLOAT0.900–2Brightness above which pixels bloom into visible bokeh discs when blurred.
highlight_boostFLOAT1.50–8Strength of the bokeh highlight bloom.
invert_depthBOOLEANfalse—
invert_maskBOOLEANfalse—
imageoptIMAGE,VIDEOImages/Video input.
depthoptIMAGE,VIDEODepth map (grayscale). Its luma drives the per-pixel blur amount.
shape_textureoptIMAGE,VIDEOOptional grayscale bokeh aperture shape, used when bokeh_shape is custom.
maskoptMASK—

Outputs (2)

NameTypeDescription
imageIMAGE—
maskMASK—