Lens Blur
Photoshop's bokeh-style blur, not the flat Gaussian kind
- image
- IMAGE
Gaussian blur softens things evenly and reads as "smudged." Lens blur is what a real out-of-focus camera lens actually does - bright points turn into distinct hexagonal or circular discs (that's bokeh), and the blur has structure to it instead of just being mush. This node reproduces that specific look, modeled on Photoshop's own Lens Blur filter, rather than the generic Gaussian everyone defaults to.
How it works
It simulates blur through a virtual lens with a configurable number of aperture blades (components), which is what gives out-of-focus highlights their polygonal shape instead of a plain circle. exposure_gamma then reshapes how bright vs. dark areas respond in the blurred result - it's the knob that controls how punchy or washed-out those blurred highlights look. There's no depth awareness here (that's the sibling node, Lens Blur with Depth Map) - this version applies the same blur uniformly across the whole image.
The inputs and outputs that matter
image- the picture to blur.radius(1–4096, default 5) - blur strength. This is the one dial you'll actually move most of the time; higher radius means a bigger, more obvious blur.components(1–6, default 4) - number of virtual lens/aperture blades. Lower numbers (1–3) give sharper, more angular bokeh shapes; higher numbers approach a rounder disc.exposure_gamma(-100 to 100, default 2) - affects the quality/contrast of the blurred areas, per the author's own description. Push it to see brighter blurred highlights stand out more.
Output is a single IMAGE.
How to install it
ComfyUI Manager: search Virtuoso Nodes for ComfyUI, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/chrisfreilich/virtuoso-nodes
pip install -r virtuoso-nodes/requirements.txt
Restart, find it under Virtuoso/Blur. No model weights needed - it's a lens-simulation algorithm running on the CPU/image tensor, not a neural net.
Common issues & troubleshooting
It's noticeably slower than Gaussian Blur at the same radius. That's expected - simulating a multi-component lens aperture is more work per pixel than a straightforward Gaussian kernel. If you're iterating on a workflow and don't need the bokeh shapes yet, prototype with plain Gaussian Blur and swap to Lens Blur once you're happy with everything else.
The blur looks flat, not like real bokeh. Try lowering components first - a value of 4–6 gets you visibly polygonal highlights, while very low or very high settings can look closer to a generic soft blur depending on your image. exposure_gamma is the second lever; nudging it up tends to make bright spots pop more distinctly out of the blur.
You want the background blurred but the subject sharp. This node doesn't know the difference - it blurs everything uniformly. For a selective, distance-aware version, you want Lens Blur with Depth Map instead, which takes a depth map and only blurs based on distance from camera.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| radius | INT | 51–4096 | — |
| components | INT | 41–6 | — |
| exposure_gamma | FLOAT | 2.00-100–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |