Nodes/Pirog's Nodes for ComfyUI/Lens-simulated Bloom
ComfyUI Node

Lens-simulated Bloom

That dreamy glow around bright lights — lens bloom as a luminosity-mask pass

By Pirog17000·Created about a year ago·Updated 10 months ago· 3
Lens-simulated Bloom
  • image
  • IMAGE
threshold0.80
iterations4
amount10.0
opacity1.00

Neon signs, car headlights, a sunset through a window - the reason those shots feel cinematic is bloom: the glow that spills from bright sources into the dark around them. Lens-simulated Bloom adds that halo to your images using the same technique Photoshop folks know as luminosity masking: find the bright pixels, blur them, and lay the glow back over the image. It's the pack's "cinematic finish" node, and it pairs naturally with DSLR noise for an overall filmic look.

How it works

The node converts the image to LAB color space and uses the L (lightness) channel to find highlights. Your threshold (default 0.8) decides what counts as "bright enough" - only pixels above it become bloom sources. Those highlights get blurred across multiple passes, and here's the nice touch: the amount input is the initial blur strength, and each subsequent iteration uses half the previous one. So iteration 1 does a broad haze, iteration 2 a tighter glow, iteration 3 a crisp edge halo - the multi-scale stack is what makes the effect look like real lens bloom instead of a smeared highlight.

The blurred layers are max-composited over the original (screen-style, so brights add without darkening anything), and opacity fades the whole effect from 0 (original) to 1 (full bloom). iterations (default 4) controls how many blur layers build the stack - more layers, richer falloff.

The inputs that matter

  • threshold (0–1, default 0.8) - what counts as a highlight. Lower it and more of the image blooms; raise it to limit the effect to the brightest speculars.
  • iterations (1–16) - number of blur layers. 4–6 is a good range.
  • amount (0.1–100, default 10) - initial blur strength, halved per iteration.
  • opacity (0–1, default 1) - overall strength of the effect.

Output: IMAGE.

Where you'd use it

Street scenes, night shots, product renders with hot lighting - anywhere bright sources exist and you want atmosphere instead of hard glare. It's also the fast route to "backlit subject with a glow around the rim" if you have a bright background. Keep it subtle; a bloom that's visible as "bloom" is usually too strong. Opacity 0.3–0.6 is where most photographic looks live.

Installing it

Part of Pirog's Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Pirog17000/Pirogs-Nodes
pip install -r Pirogs-Nodes/requirements.txt

Or search "Pirog's Nodes" in ComfyUI Manager and restart. This node needs opencv-python and numpy - both in the pack's requirements, so the standard install covers it.

Gotchas

One honest discrepancy: the pack's README describes a fancier kernel-driven bloom with FFT convolution and diffraction spikes, but the shipped code implements the luminosity-mask/multi-pass-blur approach you get in the UI. Don't expect star-shaped lens flares out of this node - that description overpromises. Expect a clean, controllable glow. Also, amount is in blur-sigma units, so at the high end (50+) you're building enormous halos; start at 10 and scale down. And as with most of this pack's realism nodes, the effect is best used before final output, at a strength you can barely point to - not a slider you max out.

CategoryPirog/image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
thresholdFLOAT0.800–1Luminosity threshold to isolate highlights (0.0-1.0)
iterationsINT41–16Number of blur layers to generate
amountFLOAT10.00.1–100Initial blur strength, which is halved for each subsequent iteration
opacityFLOAT1.000–1Opacity of the bloom effect. 0.0 is original image, 1.0 is full bloom.

Outputs (1)

NameTypeDescription
IMAGEIMAGE