fallenshock/FlowEdit
Official implementation of the paper: "FlowEdit: Inversion-Free Text-Based Editing Using Pre-Trained Flow Models"
FlowEdit – Inversion‑Free Text‑Based Image Editing
What it is – FlowEdit is the official PyTorch implementation of the ICCV 2025 Best Student Paper “FlowEdit: Inversion‑Free Text‑Based Editing Using Pre‑Trained Flow Models”. It lets you edit an image by providing a source caption and a target caption, without needing to invert the diffusion process. The method re‑uses existing text‑to‑image diffusion models (e.g., Stable Diffusion 3, Flux) and a pre‑trained flow network to steer the generation toward the desired edit.
Key ideas
- Inversion‑free: No costly latent‑space inversion; the flow model directly maps the original image’s noise trajectory to the edited one.
- Plug‑and‑play: Works with any diffusion model that can be loaded via 🤗 Diffusers (the repo ships examples for SD‑3 and Flux).
- Editable prompts: You supply a source prompt (what the original image depicts) and one or more target prompts; the system computes a concise “target code” that encodes the semantic shift.
How to get started
- Clone & install
git clone https://github.com/fallenshock/FlowEdit.git cd FlowEdit pip install torch diffusers transformers accelerate sentencepiece protobuf # If you hit version conflicts, pin diffusers to 0.30.1 as the README suggests - Run a demo
- For Stable Diffusion 3:
python run_script.py --exp_yaml SD3_exp.yaml - For Flux:
python run_script.py --exp_yaml FLUX_exp.yaml
- For Stable Diffusion 3:
- Edit your own images
- Place images in
example_images/. - Create an
edits.yamldescribing each edit (input path, source prompt, target prompt(s), optional target codes). - Create an experiment YAML (e.g., copy
FLUX_exp.yaml) that points to youredits.yamland sets hyper‑parameters such asn_maxandn_min. - Run
python run_script.py --exp_yaml <your_experiment.yaml>.
- Place images in
Integration with ComfyUI
- The repo links to community‑maintained ComfyUI nodes for Flux and HunyuanLoom, and a separate LTX‑Video implementation for video editing.
Related community work
- Training‑Free‑WAN‑Editing – combines FlowEdit with WAN2.1 for video editing.
- DNAEdit – refines the Gaussian noise to improve edit quality (NeurIPS 2025 Spotlight).
- FlowAlign – adds optimal‑control trajectory shaping to the inversion‑free pipeline (ICLR 2026).
- DynaEdit – extends FlowEdit to dynamic video editing (EECV 2026).
License & citation
- MIT License.
- Cite the ICCV 2025 paper if you use the code in research.
Why it matters FlowEdit demonstrates that high‑quality text‑guided image editing can be achieved without the heavy compute of diffusion inversion, opening the door to faster, more flexible editing pipelines that can be dropped into existing diffusion‑based tools.
Related
- Project
- Project
- Project
- Dispatch
- Project