Skip to content

NaviEdit/NaviEdit

Repository files navigation

[ICML 2026] Semantic Granularity Navigation in Image Editing

Liangsi Lu1, Minzhe Guo1, Xuhang Chen2, Yang Shi1†
1 Guangdong University of Technology, 2 Huizhou University
Corresponding author

Overview

This repository provides the standalone public release of Navi-FlowAlign, the FlowAlign-based instantiation of NaviEdit for real-image editing.

NaviEdit is a training-free controller that decouples edit progress from model scale traversal. This release keeps only the method-specific code needed for:

  • the standalone Navi-FlowAlign editing pipeline
  • a lightweight Gradio demo
  • PIE-Bench export in the layout expected by the official PnP evaluation code

Resources

Please make sure you have accepted the Stability AI model license on Hugging Face before downloading the SD3 weights.

1. Environment

  • Python 3.12 or newer
  • PyTorch with CUDA support
  • Stable Diffusion 3 Medium in diffusers format

--model-root can be either:

  • a local checkpoint directory such as /path/to/stable-diffusion-3-medium-diffusers
  • a Hugging Face model id such as stabilityai/stable-diffusion-3-medium-diffusers

2. Install Dependencies

pip install -r requirement.txt

3. Run the Web Demo

Launch the interactive demo:

python app.py \
  --model-root /path/to/stable-diffusion-3-medium-diffusers \
  --server-port 7860

If you want to reuse defaults from an existing editor config, you can point --config at a YAML file containing method_config::

python app.py \
  --config /path/to/piebench_full.yaml \
  --model-root /path/to/stable-diffusion-3-medium-diffusers \
  --server-port 7860

Running python app.py launches a local Gradio app for Navi-FlowAlign.

  • Left panel: upload the source image and provide source / target prompts
  • Right panel: view the edited output image
  • Bottom section: click built-in examples to auto-fill the inputs

NaviEdit app

Optional examples can be placed under images/ using the same lightweight demo layout:

images/
  001/
    i.jpg
    meta.jsonl

Each line in meta.jsonl should contain at least:

{"original_prompt": "...", "edited_prompt": "..."}

4. Run PIE-Bench Export

Export predictions in PIE-Bench format with:

python run_pie_bench.py \
  --model-root /path/to/stable-diffusion-3-medium-diffusers \
  --pie-root /path/to/pie_bench

You can also reuse an existing config:

python run_pie_bench.py \
  --config /path/to/piebench_full.yaml \
  --model-root /path/to/stable-diffusion-3-medium-diffusers \
  --pie-root /path/to/pie_bench

--pie-root should point to a PIE-Bench folder containing at least:

  1. annotation_images/ — the original PIE-Bench images
  2. mapping_file.json — prompt and metadata annotations

Example layout:

pie_bench/
  annotation_images/
  mapping_file.json

The script writes predictions to:

<pie-root>/output/NaviEdit/annotation_images/...

and can optionally synchronize:

<pie-root>/data/mapping_file.json
<pie-root>/data/annotation_images/...

This matches the export pattern expected by the official PIE-Bench / PnP evaluation code.

For PIE-Bench data preparation and evaluation protocol details, please refer to: https://github.com/cure-lab/PnPInversion

5. Repository Structure

naviedit/
  app.py                 # Gradio demo entrypoint
  run_pie_bench.py       # PIE-Bench export entrypoint
  pipeline_factory.py    # Pipeline construction and runtime defaults
  pipeline_naviedit.py   # Standalone Navi-FlowAlign pipeline wrapper
  model.py               # Navi-FlowAlign controller core
  sd3_bundle.py          # SD3 loading, text encoding, VAE adapter
  utils.py               # Config loading and example discovery
  images/                # Optional local demo examples

6. Citation

If you find our work helpful, please consider starring this repository and citing:

@article{lu2026naviedit,
  title={Semantic granularity navigation in image editing},
  author={Lu, Liangsi and Guo, Minzhe and Chen, Xuhang and Shi, Yang},
  journal={arXiv preprint arXiv:2605.21190},
  year={2026}
}

About

[ICML 2026] Official implementation for Semantic Granularity Navigation in Image Editing

Topics

Resources

License

Stars

6 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages