FlashReFocus: Second-Scale Interactive Refocusing, 148× Faster Than GenRefocus

FlashReFocus decouples all-in-focus restoration from blur rendering, running diffusion only once and completing edits in half a second.
FlashReFocus proposes an interactive single-image refocusing framework that decouples all-in-focus image restoration from blur rendering. Restoration is ill-posed and needs generative priors, while blur rendering is largely determined by depth and focal plane. The method uses a one-step diffusion deblurrer plus decoder refiner for single-pass restoration, and a defocus-biased attention renderer conditioned on an explicit defocus map for real-time blur synthesis. On EBB! and 3CReal it achieves the best zero-shot bokeh fidelity, 148.3× faster refocusing than GenRefocus, and ~0.5s per edit (462× speedup). The team also built the 3CReal cross-camera benchmark. Limitations include dependence on depth estimation accuracy, with complex-scene performance yet to be validated.
Single-image refocusing technology lets users change the focal plane and depth of field of a photo after capture, but existing generative methods require re-running a large diffusion model for every edit, resulting in high interaction latency and a disjointed experience. FlashReFocus proposes a new approach: decouple all-in-focus image restoration from blur rendering, so the diffusion model runs only once, and subsequent edits are handled in real time by a lightweight network.

Core Insight: The Two Subproblems Are Fundamentally Different
The research team observed that the two subtasks of refocusing are essentially different. Restoring an all-in-focus image is an ill-posed problem that requires generative priors to fill in missing details; rendering blur, by contrast, is mainly determined by depth and the focal plane, making it a largely deterministic process. Based on this observation, FlashReFocus confines the computationally intensive part to a single diffusion pass and delegates interactive editing to a lightweight renderer.
This decoupled design directly addresses the core needs of interactive scenarios: users try multiple focal points and blur strengths on the same image, and each edit must be fast and change only the blur effect.
Ill-posed problem in image processing refers to a problem whose solution cannot be uniquely determined from the input alone. Take single-image deblurring as an example: when restoring an all-in-focus image from a defocused image, the lost high-frequency details have countless possible completions, and the model must rely on prior knowledge learned from data to "guess" plausible details. Such problems typically require generative models (e.g., diffusion models) to provide strong priors. In contrast, blur rendering is a forward process: given an all-in-focus image, a depth map, and focal plane parameters, the degree and distribution of defocus blur are largely determined, so it can be implemented efficiently with a lightweight network. Clarifying this difference is the theoretical basis for FlashReFocus's computational decoupling.
Technical Architecture: One-Step Diffusion Deblurring and Defocus-Biased Attention
FlashReFocus's technical approach consists of two key components.
One-Step Diffusion Deblurrer
To address the ill-posed restoration problem, the team designed a one-step diffusion deblurrer paired with a decoder refiner, striking a balance between efficiency and perceptual quality. The diffusion process requires only one step to recover a detail-rich all-in-focus image, avoiding the latency of multi-step iteration.
Diffusion models generate images from random noise through iterative denoising, typically requiring tens to hundreds of steps and incurring high computational cost. One-step diffusion compresses the multi-step denoising process into a single forward pass through techniques such as distillation or consistency training: the model directly learns a mapping from noisy input to clean image, greatly reducing latency while preserving generative priors. FlashReFocus adopts one-step diffusion to restore all-in-focus images precisely to balance perceptual quality and interactive real-time performance in the ill-posed restoration task.
Defocus-Biased Attention Renderer
The renderer is conditioned on an explicit defocus map and employs a defocus-biased attention mechanism. This mechanism allows pixels with similar defocus levels to share information while avoiding interference from pixels at other depths. This ensures that focused content remains unchanged, and editing the defocus map enables advanced controls such as tilt-shift effects or dual focal planes.
A defocus map is an image the same size as the input, where each pixel value indicates the degree of blur at that point caused by defocus (typically measured by the circle of confusion diameter). It is computed from the depth map and camera parameters (aperture, focal length, focus distance): the greater the difference between depth and the focal plane, the stronger the defocus. Defocus-biased attention introduces a bias term on top of this, making attention weights tend to connect pixels with similar defocus levels, so that the renderer aggregates only information at the same depth when synthesizing blur, avoiding "bleeding" between foreground and background. This both ensures that focused regions are not corrupted and lets users flexibly control effects such as tilt-shift and dual focal planes by editing the defocus map.
Performance: 148× Speedup and Zero-Shot Generalization
On the EBB! and 3CReal benchmarks, FlashReFocus achieves the best perceptual fidelity in the zero-shot bokeh rendering task. In terms of speed, refocusing is 148.3× faster than GenRefocus; each subsequent edit takes only about half a second, a 462× speedup.
To test generalization to unseen cameras, the team collected the 3CReal benchmark, containing 89 image pairs captured with three cameras. This dataset fills a gap in cross-camera generalization evaluation and provides a new testbed for future research.
Zero-shot means testing a model directly on new data without fine-tuning for a specific camera or dataset. In bokeh rendering, different cameras have very different optical characteristics (e.g., aperture shape, sensor size), and zero-shot generalization reflects whether a method has learned camera-independent physical laws. Perceptual fidelity, meanwhile, measures how close the generated image is to the original (or reference) image in terms of human visual perception, commonly using metrics such as LPIPS and FID rather than per-pixel error. FlashReFocus's zero-shot performance on EBB! and 3CReal shows that its decoupled design does not sacrifice cross-device generalization.
Significance and Limitations
The value of FlashReFocus lies in redefining the role of generative models in interactive image editing: one diffusion pass ensures restoration quality, while lightweight rendering ensures smooth interaction. This idea can be extended to other generative editing tasks that require real-time feedback. However, the current method still relies on the accuracy of depth estimation, and its performance in complex scenes (e.g., transparent objects, fine hair) remains to be further validated.
According to the paper's original data, FlashReFocus achieves the best perceptual fidelity in zero-shot bokeh rendering and reduces editing latency to sub-second levels, setting a new efficiency benchmark for interactive refocusing.
One-line Summary
FlashReFocus decouples all-in-focus restoration from blur rendering, running the diffusion model only once and completing subsequent edits in half a second.
Paragraph Summary
FlashReFocus proposes an interactive single-image refocusing framework whose core is to decouple all-in-focus image restoration from blur rendering. The research team observed that restoring an all-in-focus image is an ill-posed problem requiring generative priors, whereas rendering blur is largely determined by depth and the focal plane and is highly deterministic. Accordingly, the method uses a one-step diffusion deblurrer with a decoder refiner to restore the all-in-focus image in a single pass, then uses a defocus-biased attention renderer conditioned on an explicit defocus map to synthesize blur in real time. On the EBB! and 3CReal benchmarks, the method achieves the best perceptual fidelity in zero-shot bokeh rendering, refocuses 148.3× faster than GenRefocus, and requires only about half a second per subsequent edit (462× speedup). The team also built the 3CReal cross-camera benchmark to fill an evaluation gap. Limitations include reliance on depth estimation accuracy, with performance in complex scenes yet to be validated.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.