A standard way to find defects in an image of a never-before-seen product is to "heal" it. You take a large image generator pretrained on web data, partially corrupt the photo with noise, and ask the generator to restore it. A generator trained on mostly normal-looking objects tends to paint over a scratch or crack. Wherever the restored image differs from the original, there is probably a defect. The catch is speed. Diffusion models are generators that turn noise into an image by repeated small denoising steps, and these steps must run one after another. The best training-free version of this idea, DIVAD, first reverses many such steps to map the image back to noise, then runs many more forward steps to heal it. Multi-timestep methods such as DZAD gather features at several noise levels, also in sequence, and DZAD's authors name speed as the main obstacle to deployment.
This note proposes a different route. Newer "one-step" generators, especially average-velocity models such as Mean Flows, can jump straight from any noise level to a clean image. That removes the ordering constraint along the time axis. Healing at five different noise levels then becomes five independent jumps that can run as one batched forward pass. They no longer have to run as a long chain. The result should keep the multi-scale benefit that DZAD found for small versus large defects while needing only one sequential network call. It also needs no inversion at all, because the image is corrupted with fresh random noise instead of being reversed into the noise space.
Core Claim
Zero-shot reconstruction-based anomaly localization does not need either of two expensive components. It does not need sequential inversion, and it does not need sequential multi-timestep denoising. One batched call can heal the image from a forward-noised copy at several noise levels with a one-step generator, compare deep features of each healed copy against the original, and combine the per-level maps with a rule fixed before seeing the target domain. We claim this matches DIVAD-level pixel localization at a fraction of the wall-clock latency. The multi-level part is essential: a single noise level, which is what a naive one-step port would use, should be measurably worse.
Concretely, let $x_t = (1-t)\,x + t\,\epsilon$ be the query image $x$ mixed with Gaussian noise $\epsilon$ at level $t \in (0,1)$. An average-velocity model $u_\theta(z, r, t)$ returns the mean velocity over the interval $[r, t]$, so a one-step heal is $\hat{x}^{(t)} = x_t - t\, u_\theta(x_t, 0, t)$. For a set of levels $t_1,\dots,t_K$, each with $M$ noise draws, the anomaly map is
$$A(x) = \mathrm{Agg}_{k}\Big[\tfrac{1}{M}\textstyle\sum_{m} \big(1 - \cos(\phi(x), \phi(\hat{x}^{(t_k, m)}))\big)\Big],$$
Here $\phi$ is a frozen self-supervised patch encoder (DINO, as in DIVAD), the cosine is taken per patch, and $\mathrm{Agg}$ is a per-image normalization followed by a mean over levels. All $K \times M$ heals share one batched forward pass.
Relation to Prior Work
Three strands of prior work play distinct roles here.
The training-free reconstructive methods motivate the work and supply the scoring recipe. DIVAD heals via DDIM inversion followed by partial denoising from $T'=10$. It scores with DINO feature dissimilarity and uses CutLER object masks, and it reports that results hinge on that single fragile timestep. We reuse its feature comparison and masking but replace inversion with forward noising and the single timestep with a parallel set. DZAD shows that different defect scales surface at different diffusion stages and weights timesteps with a handcrafted schedule. We test whether that benefit survives when the levels are reached by direct jumps rather than a trajectory, which is the open question about whether collapsing the trajectory discards multi-scale signal.
The fast anomaly detectors constrain the design. DiffusionAD already heals in one step at two noise scales and reaches 23.5 FPS, but it trains on each target category with synthetic defects, so it is not zero-shot. TCCM and DTE give one-pass scores on tabular data or embeddings, but they need target-domain normals and produce no spatial map. CLIPFUSION is the closest zero-shot competitor on speed. It reads a Stable Diffusion denoiser once, without healing, and fuses those features with CLIP patch features, at 783 ms per image.
The one-step generator literature supplies the mechanism. Mean Flows learns $u$ for arbitrary interval endpoints and reaches 1-step FID 3.43 on ImageNet 256. That property is exactly what makes jumps from many $t$ well defined. Training-Free Image Inversion for One-Step Diffusion Models shows that inverting one-step models still needs iterative optimization. This is why we avoid inversion entirely rather than trying to make it fast.
Research Program
Stage one uses an existing text-conditioned one-step model of the SD-Turbo family that TFinv studies. It is conditioned only on a generic prompt, "a photo of a [class]", exactly as DIVAD does, so no defect vocabulary is engineered. This stage tests the batching, scoring and aggregation logic.
Such models are trained mainly to jump from pure noise, so intermediate-level jumps may be poor. Stage two therefore post-trains the same latent backbone with the MeanFlow objective on a generic open image corpus that excludes every evaluation benchmark. This gives proper arbitrary-interval jumps.
The aggregation rule, the level set $\{t_k\}$ and $M$ are chosen on one benchmark and frozen before evaluating on the others. This follows the cross-dataset zero-shot protocol DZAD uses, and it avoids tuning on test categories.
Two analyses accompany the method. The first produces per-level maps binned by defect area, to check whether small defects peak at low $t$ and large ones at high $t$ as DZAD's findings predict. The second is a latency study that separates single-image latency from throughput, because batching $K \times M$ copies costs compute even when it saves sequential depth. We report both honestly, on the same GPU and resolution for every method.
Baselines
The accuracy reference is DIVAD run with its published multi-step DDIM inversion and $T'=10$ denoising. It is the strongest training-free healing method in the file. It reports pixel AUROC 93.4 and PRO 78.2 on VisA, pixel AUROC 88.6 on MVTec-AD, and pixel AUROC 94.9 with AP 22.9 on MPDD (DIVAD). No latency figure for DIVAD is reported in the file, so we will measure it ourselves on our hardware. Beating it means coming within about one pixel-AUROC point on all three datasets at substantially lower measured latency, or exceeding it outright.
The speed-and-accuracy competitor is CLIPFUSION, which reports 90.9% zero-shot segmentation AUROC on MVTec-AD at 783 ms per image (CLIP Meets Diffusion). We will rerun it on identical hardware and resolution, because its latency was measured elsewhere. For image-level detection the reference is DZAD at 0.935 AUROC on MVTec-AD and 0.902 on VisA (DZAD). WinCLIP is the prompt-ensemble floor at 85.1% segmentation AUROC on MVTec-AD and 79.6% on VisA (WinCLIP).
The naive reference point is DIVAD with its inversion and denoising truncated to the same number of sequential network calls as our method. This is the "just use fewer steps" answer.
The key ablation sets $K=1$: one-step healing at a single best noise level, with the same backbone, encoder, masks and frozen-protocol tuning budget. If the multi-level aggregate does not beat this, the core claim fails.
A further ablation swaps forward noising for DDIM inversion inside our pipeline, which isolates what removing inversion costs. DiffusionAD's 23.5 FPS is cited only as the speed target for trained, non-zero-shot systems, not as a like-for-like competitor.
Why not just…?
Why not just use CLIP patch features, which are already one forward pass? This is a real threat on speed. CLIPFUSION's patch branch avoids sliding windows. Exposing Outlier Exposure shows CLIP excels on semantic shifts but struggles on technical surface defects, and adding diffusion features lifted MVTec-AD segmentation from WinCLIP's 85.1 to 90.9 in CLIPFUSION. We will run CLIP-patch-only scoring as a baseline and also test a late fusion of our map with it. If CLIP-only matches us on MPDD and VisA texture-like categories, the generative branch is not earning its cost and we will say so.
Why not just run DIVAD with few DDIM steps? DIVAD itself reports that moving the healing timestep breaks results, and discretization error grows as steps are dropped. The step-matched truncated-DIVAD baseline tests this directly at equal sequential depth.
Why not just heal once at one noise level with SD-Turbo? This is the most plausible simple alternative, and the $K=1$ ablation is designed to settle it. DZAD's evidence that defect scales appear at different noise levels predicts a gap that grows with defect-size diversity, so we report results stratified by defect area. If the gap is negligible, the proposal reduces to "drop inversion", which is still useful but smaller than the claim.
Why not just train a fast per-category model like DiffusionAD? That requires normal images of every new product and synthetic defect training, which the zero-shot setting forbids. We keep it only as a speed reference.
Decisive Experiments
Evaluation uses MVTec-AD, VisA and MPDD with pixel AUROC, PRO and AP, plus image AUROC computed as the max of the map. Tuning happens on one dataset and the other two are evaluated frozen, rotating the held-out roles. Latency is reported as milliseconds per image at batch one and images per second at saturation, for every method on one GPU.
The first decisive check is whether multi-level parallel healing beats the $K=1$ ablation on pixel AUROC and PRO while adding under 2x latency. The second is whether it reaches DIVAD's reported accuracy at lower measured latency than both DIVAD and CLIPFUSION. The third is whether the average-velocity backbone from stage two improves on SD-Turbo at intermediate noise levels.
Two failure analyses round this out. One covers missing-component and logical defects, such as the MVTec-AD transistor class, where DIVAD already fails and healing is not expected to help. The other covers false positives on fine high-frequency texture, where averaging over noise draws should reduce variance.
References
- Training Free Zero-Shot Visual Anomaly Localization via Diffusion Inversion
- DZAD: Diffusion-based Zero-shot Anomaly Detection
- Mean Flows for One-step Generative Modeling
- DiffusionAD: Norm-Guided One-Step Denoising Diffusion for Anomaly Detection
- Scalable, Explainable and Provably Robust Anomaly Detection with One-Step Flow Matching
- On Diffusion Modeling for Anomaly Detection
- CLIP Meets Diffusion: A Synergistic Approach to Anomaly Detection
- Training-free image inversion for one-step diffusion models
- WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
- Exposing Outlier Exposure: What Can Be Learned From Few, One, and Zero Outlier Images