Research map / Image generation / Editing and style transfer
Stable Flow: Vital Layers for Training-Free Image Editing
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Training-free text-driven image editing in FLUX by injecting attention features from a source image into automatically identified "vital" DiT layers, plus latent nudging for real-image inversion.
Problem
Text-driven image editing with DiT-based flow models, where the layer structure (unlike UNets) is unclear, making it hard to know which layers to inject features into for stable edits of real images.
Approach
Measure each DiT layer's vitality by bypassing it and computing perceptual (DINOv2) change in generations; inject attention features from the source trajectory only into the vital layers, leveraging the reduced diversity of flow models for stable edits; and add latent nudging (scaling z0 by 1.15) to improve Euler inversion of real images.
Key results
- Stable Flow achieves CLIPimg 0.92 and CLIPdir 0.14, the best image and direction similarity among compared methods (MagicBrush 0.88 / 0.11), with CLIPtxt 0.23.
- In the AMT user study, Stable Flow wins against all baselines on overall quality, e.g., 74.00% vs MagicBrush and 72.00% vs MasaCTRL.
- Ablation: injecting in all layers drops CLIPtxt to 0.17 and raises CLIPimg to 0.98, while removing latent nudging lowers CLIPimg to 0.62.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use vital-layer attention injection rather than injecting in all layers (ablation) | Stable Flow · COCO evaluation dataset | CLIPtxt: 0.17 -> 0.23 | Helped |
| Use vital-layer attention injection rather than injecting in all layers (ablation) | Stable Flow · COCO evaluation dataset | CLIPdir: 0.00 -> 0.14 | Helped |
| Use vital-layer attention injection rather than injecting in non-vital layers (ablation) | Stable Flow · COCO evaluation dataset | CLIPimg: 0.72 -> 0.92 | Helped |
| Use vital-layer attention injection rather than extending attention in all layers (ablation) | Stable Flow · COCO evaluation dataset | CLIPtxt: 0.18 -> 0.23 | Helped |
| Use vital-layer attention injection rather than extending attention in all layers (ablation) | Stable Flow · COCO evaluation dataset | CLIPdir: 0.01 -> 0.14 | Helped |
| Add latent nudging (ablation) | Stable Flow · COCO evaluation dataset | CLIPimg: 0.62 -> 0.92 | Helped |
| Add latent nudging (ablation) | Stable Flow · COCO evaluation dataset | CLIPdir: 0.05 -> 0.14 | Helped |
| Use Stable Flow instead of MagicBrush | Image editing · COCO evaluation dataset | CLIPimg: 0.88 -> 0.92 | Helped |
| Use Stable Flow instead of MagicBrush | Image editing · COCO evaluation dataset | CLIPdir: 0.11 -> 0.14 | Helped |
Surprising findings
- Vital layers are spread across the transformer with no simple relation to layer position, unlike the coarse-to-fine structure of UNets.
- Reduced diversity of flow models, usually a drawback, is leveraged as an advantage for stable editing.
Limitations
- Struggles with full style changes (e.g., photorealistic to oil painting or animation) because it relies on attention injection.
- Cannot perform object dragging to new locations; changes gaze instead.
- Background replacement leaks from the original background.
Experimental setup
Datasets: COCO
Benchmarks: COCO-based editing benchmark (3,200 samples)
Metrics: CLIPtxt CLIPimg CLIPdir user study win rate
Baselines: SDEdit P2P+NTI Instruct-P2P MagicBrush MasaCTRL
Builds on: FLUX MasaCTRL Prompt-to-Prompt SDEdit DINOv2
Closest papers by meaning
- Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image Editing (CVPR 2024 · similarity 0.90)
- Unveil Inversion and Invariance in Flow Transformer for Versatile Image Editing (CVPR 2025 · similarity 0.90)
- DiT4Edit: Diffusion Transformer for Image Editing (AAAI 2025 · similarity 0.89)
- Towards Efficient Diffusion-Based Image Editing with Instant Attention Masks (AAAI 2024 · similarity 0.89)
- Enabling Instructional Image Editing with In-Context Generation in Large Scale Diffusion Transformer (NeurIPS 2025 · similarity 0.88)
- Inversion-Free Image Editing with Language-Guided Diffusion Models (CVPR 2024 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
