✦
Summary
Bokeh Diffusion is a text-to-image diffusion model framework that enables precise, physically grounded control over defocus blur — the bokeh effect — in generated images, conditioning generation explicitly on a physical defocus blur parameter instead of relying on prompt engineering.
Key Features
Explicit defocus blur conditioning for precise and continuous bokeh control
Hybrid training pipeline combining real in-the-wild images and synthetic blur augmentations
Decoupled cross-attention modules that preserve semantic content during blur modulation
Grounded self-attention using pivot images to maintain consistent scene layout
Supports real image editing via inversion to adjust bokeh strength post-capture
Generates lens-like bokeh effects without altering underlying scene structure
About Bokeh Diffusion
It combines a hybrid dataset pipeline of real-world images with natural bokeh and synthetic blur augmentations, defocus blur conditioning injected via decoupled cross-attention modules that modulate blur intensity without overwriting textual or semantic features, and grounded self-attention that uses a pivot image to anchor scene layout and prevent unwanted content shifts as blur levels change. This lets users smoothly vary background blur while preserving scene structure and semantic content, producing lens-like, realistic bokeh that respects the spatial layout of objects.
Bokeh Diffusion also supports real image editing through inversion, adjusting the bokeh strength of existing photos, and it outperforms post-processing methods that rely on depth estimation, opening creative possibilities for photographers, artists and content creators working with controllable image synthesis.