TL;DR
FlashClear bridges the gap between high-quality diffusion-based object removal and real-time performance by combining a novel few-step distillation technique with a training-free spatial feature caching strategy. By compressing the denoising process to just 4 steps and avoiding redundant background computations, it achieves up to an 8.26× speedup over its base model (ObjectClear) and a massive 122× speedup over OmniPaint, all while perfectly erasing objects along with their complex shadows and reflections.
What Problem Does This Paper Address?
Diffusion models have revolutionized image editing, particularly in object removal tasks where they don't just "patch" a hole, but intelligently infer and remove secondary visual effects like shadows and reflections. However, this high visual quality comes at a steep computational cost. Standard diffusion models indiscriminately denoise every single token (pixel patch) across dozens of timesteps.
This is incredibly inefficient for object removal, which is inherently a localized task—most of the background remains completely unchanged.
To speed things up, researchers typically turn to two methods: step distillation (reducing the number of denoising steps) or feature caching (reusing computed features across adjacent steps). Unfortunately, these two approaches are fundamentally incompatible. When you compress a model down to 2 or 4 steps via distillation, you destroy the temporal redundancy between steps, causing standard feature caching methods to fail catastrophically and degrade image quality. FlashClear resolves this conflict.
Methods
FlashClear introduces a two-pronged framework to achieve ultra-fast object removal without sacrificing quality:
1. Region-aware Adversarial Distillation (RAD)
To shrink the denoising process down to 4 steps, the authors employ adversarial (GAN-based) distillation, but with a clever twist: asymmetric masking.
- The Generator is fed a tight, user-provided mask covering only the object.
- The Latent Discriminator (built by adding trainable heads to the base model's U-Net encoder) is given an expanded mask that includes both the object and its surrounding causal effects (like shadows).
This forces the discriminator to penalize the model if it leaves behind ghostly reflections or awkward shadow remnants, ensuring the few-step generator remains highly sensitive to global scene physics.
2. Foreground-Prioritized Asymmetric Attention and Caching (FPAC)
Since distillation eliminates temporal redundancy, FPAC shifts the focus to spatial redundancy. It uses internal cross-attention maps to dynamically separate invariant background tokens from changing foreground tokens.
Instead of completely dropping background tokens (which causes edge artifacts), FlashClear introduces Asymmetric Attention:
- Background tokens bypass query generation and MLP updates entirely; their features are simply populated from a cache.
- Foreground tokens actively generate queries and compute attention across the entire image space (including the cached background keys and values). This ensures the newly synthesized background perfectly blends with the existing context.
Datasets
The authors evaluated FlashClear on two primary object removal benchmarks:
- OBER-Test: A benchmark consisting of 163 samples evaluated at $512 \times 512$ resolution, specifically designed to test precise object and effect removal.
- RORD-Val: A real-world object removal dataset containing 343 complex, higher-resolution ($960 \times 540$) scenes.
- CausRem: Used additionally to evaluate performance specifically on challenging reflection and shadow sub-datasets.
Key Insights and Ideas
- Exploiting Spatial over Temporal Redundancy: The core "aha!" moment is realizing that while few-step models lack temporal redundancy, localized editing tasks like object removal retain massive spatial redundancy. Caching based on space rather than time makes feature reuse viable in few-step regimes.
- The Power of Asymmetric Attention: Completely zeroing out or omitting background tokens during attention computation breaks the global context. By allowing foreground tokens to query cached background tokens, the model maintains full contextual awareness at a fraction of the computational cost.
- Discriminator-Led Physics Awareness: Forcing the generator to find shadows on its own in a 4-step regime is too difficult. By shifting that burden to an expanded mask on the discriminator during training, the generator learns to clean up complex reflections implicitly.
Key Results
FlashClear sets a new state-of-the-art for efficient, high-fidelity object removal:
- Massive Speedups: On the OBER benchmark, FlashClear achieves a 8.26× speedup in terms of FLOPs over ObjectClear and a 122× speedup over OmniPaint.
- Improved Metrics: Despite being significantly faster, FlashClear actually improves image quality metrics over the multi-step baseline on OBER-Test, raising the PSNR from 32.06 to 33.05 and lowering the perceptual error (LPIPS) from 0.038 to 0.035.
- Qualitative Superiority: As seen in the qualitative comparisons, FlashClear cleanly removes objects and their corresponding water reflections or ground shadows where competing fast-sampling or caching methods (like ToCa or HiCache) leave behind severe artifacts or fail to erase the object entirely.
Limitations and Future Work
While FlashClear delivers impressive theoretical and practical speedups, the authors note a few limitations:
- Task Specificity: The FPAC caching mechanism relies heavily on the assumption of background spatial redundancy. It is highly tailored for localized editing (like object removal or inpainting) and cannot be directly applied to full-image text-to-image generation.
- System-Level Bottlenecks: Because the model's computational complexity (FLOPs) has been reduced so drastically, practical end-to-end wall-clock speedups can become bottlenecked by system-level overheads, such as memory bandwidth and I/O operations.
Future work will likely involve optimizing these system-level implementations to ensure the theoretical FLOP reductions translate fully to on-device deployment.
Summary updated