FlowTranslator: Training-Free In-Image Machine Translation with Flow-Based Editing
Organizations: Institute of Trustworthy Embodied AI, Fudan University · Shanghai Key Laboratory of Multimodal Embodied AI
Abstract
In-image machine translation (IIMT) replaces text in an image with its translation while preserving the surrounding visual context. Existing task-specific models achieve convincing performance but require massive paired training images before and after translation. As advanced text-to-image (T2I) models have reached a practically usable level of multilingual text generation, we argue that this capability can be transferred to IIMT and present FlowTranslator. It is a training-free IIMT framework that first employs an OCR model and an LLM to generate the translation prompt, which is injected into the T2I-based diffusion model. To optimize the accurate and natural generation of translated text, we introduce two trajectory controls: Region Coupling Release (RCR) partially decorrelates target-branch noise inside the text region early in the trajectory, while Coupling Expansion (CE) amplifies the emerging edit displacement mid-trajectory. Under the EasyOCR read-back protocol, FlowTranslator achieves average PRIM BLEU and COMET scores of 20.6 and 57.2, respectively, substantially outperforming the strong training-based baseline UniTranslator. On the more challenging and realistic whole-image ScenePair photographs translated into Chinese, it reaches 40.1% exact-match accuracy and surpasses existing editing systems, some of which only address the text-rendering stage rather than the complete IIMT task. These results establish flow-based editing as a strong, fully training-free baseline for IIMT.
Figures & tables
| BLEU | Avg. | ||||||
| Model | IIMT-tuned | De En | En De | Fr En | Ro En | BLEU | SSIM |
| GPT-Image-1 [ 20 ] | 20.75 | 19.61 | 27.38 | 24.50 | 23.06 | 0.734 | |
| Qwen-Image [ 31 ] | 0.23 | 0.21 | 0.20 | 0.22 | 0.22 | 0.785 | |
| OCR+MT+T2I [ 14 ] | ✓ | 15.37 | 13.22 | 21.60 | 18.34 | 17.13 | 0.771 |
| PEIT+T2I [ 47 ] | ✓ | 10.91 | 8.77 | 18.51 | 14.54 | 13.18 | 0.769 |
| Translatotron-V [ 14 ] | ✓ | 15.39 | 13.23 | 22.20 | 18.44 | 17.32 | 0.776 |
| BLEU / COMET | Avg. | |||||||
| Model | IIMT-tuned | En-De | En-Fr | En-Cs | En-Ru | En-Ro | BLEU | COMET |
| PARSeq-mT-Render [ 26 ] | ✓ | 9.5 / 41.7 | 13.8 / 46.9 | 7.7 / 43.9 | 5.5 / 48.1 | 12.8 / 53.5 | 9.9 | 46.8 |
| PEIT-Render [ 47 ] | ✓ | 10.4 / 45.1 | 14.0 / 48.1 | 7.9 / 46.2 | 5.3 / 47.7 | 14.2 / 52.9 | 10.4 | 48.0 |
| Translatotron-V [ 14 ] | ✓ | 1.7 / 34.3 | 1.9 / 30.2 | 1.1 / 30.5 | 0.9 / 32.0 | 1.3 / 33.9 | 1.4 | 32.2 |
| VisTrans [ 26 ] | ✓ | 12.6 / 44.4 | 17.0 / 49.4 | 5.9 / 41.8 | 7.2 / 49.4 | 13.9 / 50.2 | 11.3 | 47.0 |
| UniTranslator [ 18 ] | ✓ | 13.1 / 48.7 | 21.6 / 58.5 | 7.4 / 43.3 | 8.4 / 50.2 | 13.5 / 52.8 | 12.8 | 50.7 |
| Model | STE-tr. | Zh | ACC | SSIM |
|---|---|---|---|---|
| TextDiffuser [ 3 ] | ✓ | 0.00 | 0.9434 | |
| DiffSTE [ 10 ] | ✓ | 0.23 | 0.9796 | |
| AnyText [ 28 ] | ✓ | ✓ | 36.80 | 0.8157 |
| TextFlux [ 34 ] | ✓ | ✓ | 14.30 | 0.9506 |
| FLUX.1-Fill [ 2 ] | 0.39 | 0.9231 | ||
| FLUX.1-Kontext [ 1 ] | 0.00 | 0.4273 |
| Component | Setting | BLEU |
| Controls (PRIM avg.) | Masked FlowEdit (Baseline) | 16.88 |
| +RCR only | 17.40 | |
| +CE only | 20.21 | |
| +RCR+CE (Ours) | 20.57 | |
| Edit window | 43 | 18.95 |
| 45 (Default) | 20.57 |
| Diagnostic | Masked FlowEdit | +RCR | +CE | +RCR+CE |
|---|---|---|---|---|
| early | 0.740 | 0.481 | 0.738 | 0.480 |
| early signal ratio | 1.94 | 2.63 | 1.93 | 2.63 |
| ignition step | 9.50 | 7.75 | 9.42 | 7.67 |
| final | 0.440 | 0.443 | 0.533 | 0.513 |
| max rel. CE pert. | 0.000 | 0.000 | 0.267 | 0.246 |
| max | 3.991 | 4.052 | 3.991 | 4.053 |