TL;DR
Editing an image with a text prompt usually relies on steering a single generative path through latent space—a fragile approach where random noise easily causes unwanted changes to the background or subject identity. OTEdit recasts image editing as a cloud-to-cloud mapping problem: by sampling neighborhoods of source and plausible target images, it uses Optimal Transport to dynamically steer the editing trajectory like a smart GPS, keeping the original structure intact while landing cleanly on the desired edit.
What Problem Does This Paper Address?
Modern generative models like Stable Diffusion 3 and FLUX are flow matching models: they learn velocity fields that push pure random noise along an Ordinary Differential Equation (ODE) path until it becomes a clean image.
To edit an existing image (say, turning a red apple green), you used to have to run the ODE backward to turn the apple into noise (inversion), then run it forward with the new prompt. Unfortunately, tiny numerical errors accumulate on the round trip, warping the image. Newer inversion-free methods skip the round trip and construct a direct path from the source image to the target prompt.
However, all existing inversion-free methods share a blind spot: they operate on a single trajectory. For any prompt like "rusty bicycle," there isn't just one valid output—there is a whole distribution of plausible edits. Relying on a single path makes the edit vulnerable to noise-induced drift, and trying to fix that drift with rigid, pre-programmed schedules either under-corrects big mistakes or suffocates valid edits.
Methods
Instead of flying blind on a single trajectory, OTEdit (Transport-Guided Flow Editing) builds a local map of the terrain before and during the flight, augmenting standard FlowAlign dynamics with three novel mechanisms:
- Particle Cloud Construction: First, it creates a source cloud by adding slight Gaussian perturbations to the encoded source image. Next, it builds a target cloud of plausible edits. Rather than running the base editing ODE from the exact same starting point (which causes paths to collapse together), it uses annealed seeding—injecting independent noise at varied starting times to guarantee a diverse spread of candidate edits.
- Online Entropic Optimal Transport (OT): How should source perturbations pair up with target candidates? The authors solve an entropic OT problem (via the Sinkhorn algorithm) using a custom three-part cost function: latent $L_2$ proximity, perceptual similarity (CLIP visual features), and directional CLIP alignment (checking if the visual change vector points in the same direction as the text change vector). Crucially, as the image evolves along the ODE, this transport plan is updated online at every step—using warm-starts from the previous step's math to cut Sinkhorn iterations from ~200 down to ~40. This coupling yields a weighted average target—a barycentric anchor—at every timestep.
- Variational Co-State Correction: Instead of pulling the trajectory toward the anchor using a fixed, decaying schedule, OTEdit frames trajectory correction as an optimal control problem with a running cost along the path. Using Pontryagin’s minimum principle, it derives a dynamic co-state variable that acts like an error accumulator: if the trajectory drifts far from the OT anchor, the co-state builds up a strong corrective push; once the path settles near the anchor, the correction naturally backs off.
Datasets
Because OTEdit is completely training-free and operates at test time on pre-trained models (Stable Diffusion 3 Medium), no training datasets are used. Evaluation is conducted on:
- PIE-Bench: Synthetic and natural images paired with prompts across 10 editing categories.
- Edit-Bench (Reverse PIE-Bench): A reversibility test introduced in prior work (FlowAlign) that flips the PIE-Bench task (edited $\rightarrow$ source) to see if a method can cleanly undo an edit without leaving artifacts.
- PIE-Bench++: An extension of PIE-Bench featuring complex, compositional prompts.
Key Insights and Ideas
- Diversity requires staggered starts: Because neural velocity fields are smooth (Lipschitz-continuous), running multiple trajectories from $t=1$ causes them to contract toward nearly identical endpoints. Staggering initialization times (annealed seeding) provably preserves separation in the target cloud, giving Optimal Transport diverse options to work with.
- Correction should respond to drift, not the clock: Prior optimal-control editing methods only penalized errors at the very end of the trajectory ($t=0$), resulting in static schedules that decay monotonically regardless of what the image is actually doing. Penalizing drift along the trajectory creates a self-regulating correction that peaks mid-flight when drift is worst and vanishes near $t=0$ once the edit locks in.
- Small clouds go a long way: You don't need massive simulations to get distributional awareness; performance saturates at just $N = M = 8$ particles.
Key Results
Across all three benchmarks, OTEdit achieves state-of-the-art structure and background preservation while delivering top-tier semantic alignment with the edit prompt:
- On PIE-Bench, OTEdit reaches 29.76 dB PSNR (up from FlowAlign's 28.58 dB) and 39.20 LPIPS ($\times 10^3$), representing a ~20% perceptual error reduction over FlowAlign (49.23), while simultaneously achieving the highest edited-region CLIP similarity (28.40).
- Trajectory tracking reveals that OTEdit accumulates the least total displacement from the source image across integration—roughly 7$\times$ less displacement than FlowEdit—explaining why unedited backgrounds stay crisp.
- Qualitatively, OTEdit cleanly executes tricky localized edits (opening a dog's mouth, swapping a cat into a tiger while keeping its pink beanie, or inserting a bird beside a koala) where baselines either fail to edit or hallucinate entirely new subjects.
Limitations and Future Work
Not discussed in the paper. (Note: While the provided main text pages do not include a dedicated limitations section, an operational trade-off apparent in Algorithm 1 is the upfront computational overhead of integrating $M=8$ annealed trajectories and decoding them for CLIP features prior to running the main editing loop.)
Summary updated