Generative Visual Chain-of-Thought for Image Editing
Organizations: Beijing University of Posts and Telecommunications · Beijing Key Laboratory of Multimodal Data Intelligent Perception and Governance · Tencent Hunyuan · King Abdullah University of Science and Technology
Abstract
Existing image editing methods struggle to perceive where to edit, especially under complex scenes and nuanced spatial instructions. To address this issue, we propose Generative Visual Chain-of-Thought (GVCoT), a unified framework that performs native visual reasoning by first generating spatial cues to localize the target region and then executing the edit. Unlike prior text-only CoT or tool-dependent visual CoT paradigms, GVCoT jointly optimizes visual tokens generated during the reasoning and editing phases in an end-to-end manner. This way fosters the emergence of innate spatial reasoning ability and enables more effective utilization of visual-domain cues. The main challenge of training GCVoT lies in the scarcity of large-scale editing data with precise edit region annotations; to this end, we construct GVCoT-Edit-Instruct, a dataset of 1.8M high-quality samples spanning 19 tasks. We adopt a progressive training strategy: supervised fine-tuning to build foundational localization ability in reasoning trace before final editing, followed by reinforcement learning to further improve reasoning and editing quality. Finally, we introduce SREdit-Bench, a new benchmark designed to comprehensively stress-test models under sophisticated scenes and fine-grained referring expressions. Experiments demonstrate that GVCoT consistently outperforms state-of-the-art models on SREdit-Bench and ImgEdit. We hope our GVCoT will inspire future research toward interpretable and precise image editing.
Figures & tables
| Model | SREdit-Bench | ||
|---|---|---|---|
| Product-level models | |||
| GPT Image 1 [High] [ 47 ] | 9.02 | 8.42 | 8.56 |
| FLUX.1 Kontext [Pro] | 8.69 | 8.40 | 8.41 |
| Qwen-Image [ 63 ] | 8.57 | 8.43 | 8.32 |
| Generation Only | |||
| Method | CLIP-I | LPIPS | PSNR | SSIM |
|---|---|---|---|---|
| SmartEdit [ 24 ] | 0.8841 | 0.2915 | 17.1728 | 0.6828 |
| BrushNet [ 28 ] | 0.8986 | 0.1830 | 19.2172 | 0.7877 |
| MagicQuill [ 42 ] | 0.9381 | 0.1162 | 22.2380 | 0.8981 |
| MIND-Edit [ 61 ] | 0.9310 | 0.1245 | 22.2714 | 0.8517 |
| Bagel [ 12 ] | 0.9124 | 0.1721 | 22.1843 | 0.8640 |
| Bagel-GVCoT (Ours) | 0.9451 | 0.1066 | 23.0161 | 0.8943 |
| Model | Add | Adjust | Extract | Replace | Remove | Background | Style | Hybrid | Action | Overall |
|---|---|---|---|---|---|---|---|---|---|---|
| Product-level models | ||||||||||
| FLUX.1 Kontext [Pro] [ 31 ] | 4.25 | 4.15 | 2.35 | 4.56 | 3.57 | 4.26 | 4.57 | 3.68 | 4.63 | 4.00 |
| GPT Image 1 [High] [ 47 ] | 4.61 | 4.33 | 2.90 | 4.35 | 3.66 | 4.57 | 4.93 | 3.96 | 4.89 | 4.20 |
| Qwen-Image [ 63 ] | 4.38 | 4.16 | 3.43 | 4.66 | 4.14 | 4.38 | 4.81 | 3.82 | 4.69 | 4.27 |
| Generation Only | ||||||||||
| MagicBrush [ 70 ] | 2.84 | 1.58 | 1.51 | 1.97 | 1.58 | 1.75 | 2.38 | 1.62 | 1.22 | 1.90 |
| Model | IoU | ||||
|---|---|---|---|---|---|
| Bagel * | – | 6.21 | 6.09 | 5.71 | |
| TCoT | – | 6.54 | 6.22 | 5.97 | |
| Mask | VCoT | 0.68 | 7.55 | 7.92 | 7.31 |
| GVCoT | 0.60 | 8.53 | 8.62 | 8.42 | |
| VCoT w/ TF-thought | – | 8.03 | 7.96 | 7.75 | |
| GVCoT w/ TF-thought | – | 8.79 | 8.95 | 8.72 |
| Step 1 | Step 2 | IoU | |||
|---|---|---|---|---|---|
| 0.64 | 7.92 | 8.01 | 7.75 | ||
| 0.61 | 8.21 | 8.33 | 8.10 | ||
| 0.66 | 8.53 | 8.62 | 8.42 |
| Setting | IoU | |||
|---|---|---|---|---|
| SFT Only | 0.60 | 8.53 | 8.62 | 8.42 |
| SFT+RL | 0.67 | 8.57 | 8.76 | 8.53 |
| (1) Multi-stage RL training | ||||
| w/o Stage 2 | 0.67 | 8.32 | 8.47 | 8.25 |
| (2) Visual thought reward design | ||||
| Full reward set | 0.67 | 8.32 | 8.47 | 8.25 |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | GEdit-Bench-EN (Full set) | ||
|---|---|---|---|
| G_SC | G_PQ | G_O | |
| Product-level models | |||
| FLUX.1 Kontext [Pro] [ 31 ] | 7.02 | 7.60 | 6.56 |
| Gemini 2.0 [ 10 ] | 6.73 | 6.61 | 6.32 |
| Gemini 2.5 Flash Image Preview [ 11 ] | 7.28 | 7.83 | 6.93 |
| Gemini 2.5 Flash Image [ 11 ] | 7.41 | 7.96 | 7.10 |
| Emu Edit Test set | MagicBrush Test Set | |||||||||
| Method | DINO | DINO | ||||||||
| InstructPix2Pix [ 4 ] | 0.078 | 0.834 | 0.219 | 0.121 | 0.762 | 0.115 | 0.837 | 0.245 | 0.093 | 0.767 |
| MagicBrush [ 70 ] | 0.090 | 0.838 | 0.222 | 0.100 | 0.776 | 0.123 | 0.883 | 0.261 | 0.058 | 0.871 |
| PnP [ 55 ] | 0.028 | 0.521 | 0.089 | 0.304 | 0.153 | 0.025 | 0.568 | 0.101 | 0.289 | 0.220 |
| Null-Text Inv. [ 45 ] | 0.101 | 0.761 | 0.236 | 0.075 | 0.678 | 0.121 | 0.752 | 0.263 | 0.077 | 0.664 |
| UltraEdit [ 73 ] | 0.107 | 0.793 | 0.283 | 0.071 | 0.844 | - | 0.868 | - | 0.088 | 0.792 |
| Hyperparameter | Stage 1 | Stage 2 |
|---|---|---|
| Optimizer & Scheduler | ||
| Learning Rate (LR) | ||
| LR Scheduler | Cosine Decay | Cosine Decay |
| Min Learning Rate | ||
| Warmup Steps | 1,000 | 1,000 |
| Total Training Steps | 80,00 | 12,000 |
| Hyperparameter | Stage 1 | Stage 2 |
|---|---|---|
| Optimizer & Scheduler | ||
| Learning Rate (LR) | ||
| LR Scheduler | Cosine Decay | Cosine Decay |
| Min Learning Rate | ||
| Warmup Steps | 50 | 50 |
| Total Training Steps | 500 | 450 |
Text-Guided Image Editing
Text-guided image editing changes selected image content from natural-language instructions while aiming to preserve everything else.
See all 159 papers