[ECCV 2026] Official repository of FlowInOne: Unifying Multimodal Generation as Image-In Image-Out Flow Matching
119
stars
17
commits
Python
primary language
Sep 4, 2026
updated
TL;DR: The first vision-centric image-in, image-out image generation model.
Junchao Yi1*, Rui Zhao3*, Jiahao Tang2*, Weixian Lei3, Linjie Li6,
Qisheng Su4, Zhengyuan Yang6, Lijuan Wang6, Xiaofeng Zhu1†, Alex Jinpeng Wang2†
1 University of Electronic Science and Technology of China, 2 Central South University
3 National University of Singapore, 4 University of Science and Technology of China, 5 Microsoft
🌐 Homepage | 💻 Code | 📄 Paper | 📁 Dataset | 🌏 Benchmark | 🤗 Model
Fig 1. Overview of the FlowInOne. We unify the conditions as visual input and form a simple image-in, image-out framework with a single model.
Fig 2. We construct VisPrompt, a comprehensive dataset that covers wide spectrum of image-to-image generation, ranging from basic text-in-image generation to compositional editing, and further to physics-aware instruction following.
1. Create conda environment
conda create -n flowinone python=3.10 -y
conda activate flowinone
2. Install required packages
git clone git@github.com:CSU-JPG/FlowInOne.git
cd FlowInOne/scripts
sh setup.sh
1. Download the pretrained checkpoint from Hugging Face
mkdir -p checkpoints
wget -O checkpoints/flowinone_256px.pth https://huggingface.co/CSU-JPG/FlowInOne/resolve/main/flowinone_256px.pth
2. Open scripts/inference.sh and directly modify these variables as needed:
NNET_PATH: path to the downloaded checkpointINPUT_IMAGE: input image folder (supports both relative and absolute paths)OUTPUT_IMAGE: output image folder (supports both relative and absolute paths)CONFIG_FILE: config file pathCFG_SCALE: classifier-free guidance scale (default: 7.0)SAMPLE_STEPS: sampling steps (default: 50)SKIP_CROSS_ATTEN: whether to skip spatially-adaptive gated network and cross attention, if you task is text2image, please set ture (true/false, default: false)BATCH_SIZE: batch size during inference (default: 1)3. Run inference with the provided script:
sh scripts/inference.sh
You can either:
Download and use our dataset from Hugging Face: VisPrompt5M, or prepare your own image-pair dataset.
For custom data, organize files with paired input/ and output/ folders.
Each sample must have a matching relative path/name in input and output (extension can be .png/.jpg/.jpeg):
your_source_root/
subset_a/
input/
0001.png
group1/0002.jpg
output/
0001.png
group1/0002.jpg
subset_b/
input/
xxx.jpeg
output/
xxx.jpeg
Then pack the dataset into WebDataset tar shards using scripts/wds_organize/run_unified_to_tars.sh:
scripts/wds_organize/run_unified_to_tars.sh and modify:--root: your source dataset root (the folder containing paired input/ and output/)--tar-dir: output folder for generated tar shards--samples-per-shard: number of samples in each tar shard (e.g., 600)--key-prefix: prefix of each sample __key__ written into tar (e.g., t2i)--data-type: only for text-to-image (T2I) packs, set t2i so each sample gets a type field; for any other task, omit this flag and use the script default (no type field written)--read-workers: number of worker processes for image reading/packing (larger is faster but uses more CPU/RAM)When to use --key-prefix and --data-type:
--key-prefix is useful when you merge multiple tar datasets and want globally distinguishable sample keys (for example, t2i_, c2i_, edit_).--data-type: use **t2i only** when packing a text-to-image dataset. For editing or other tasks, do not pass --data-type (remove it from run_unified_to_tars.sh if present); the default behavior is sufficient.sh scripts/wds_organize/run_unified_to_tars.sh
After packing, tar shards like pairs-000000.tar, pairs-000001.tar will be written to --tar-dir.
We provide data examples for various I2I tasks. The I2I dataset is sampled within VisPrompt5M, and packaged into a tar shard files using the script from the previous section.
We offer examples in both raw-image folder and tar shard formats. For other data formats, you can use our dataset code as a template and extend it as needed.
wget -O flowinone_demo_dataset.tar.gz https://huggingface.co/CSU-JPG/FlowInOne/resolve/main/flowinone_demo_dataset.tar.gz
tar -xzvf "flowinone_demo_dataset.tar.gz" -C "/path/to/flowinone_demo_dataset"
Hierarchy:
flowinone_demo_dataset/
├── train_tar_pattern/ # tar shards for training
│ ├── class2image/
│ │ └── pairs-000000.tar
│ ├── doodles_edit/
│ │ └── pairs-000000.tar
│ ├── force_understand/
│ │ └── pairs-000000.tar
│ ├── text_box_edit/
│ │ └── pairs-000000.tar
│ ├── text_in_image_edit/
│ │ └── pairs-000000.tar
│ ├── text2image/
│ │ └── pairs-000000.tar
│ ├── trajectory_understand/
│ │ └── pairs-000000.tar
│ └── visual_marker_edit/
│ └── pairs-000000.tar
├── test_tar_pattern/ # tar shards for evaluation (usually fewer tar shards)
│ ├── pairs-000000.tar
│
└── vis_imgs/
├── input/ # source/condition images
└── output/ # target images; matched with input by filename
Edit every placeholder in run_train.sh: --train_tar_pattern, --test_tar_pattern, and --vis_image_root.
(Optional) Extend with your own tar shards to mix extra data.
Detailed training instructions are available in TRAIN.md, including:
run_train.sh script with inline commentstrain_tar_pattern / test_tar_pattern format and multi-source exampleThen run:
bash run_train.sh
Evaluates image generation quality on the VPBench benchmark using a VLM judge (OpenAI-compatible API: GPT-5.2, etc.).
The benchmark is loaded directly from HuggingFace via load_dataset. You only need to provide your model's generated images.
Evaluate all subsets
python evaluate_vpbench.py \
--generated_dir /path/to/your/generated/images \
--output_dir ./results \
--model gpt-5.2 \
--api_key YOUR_OPENAI_API_KEY
Evaluate specific subsets only
python evaluate_vpbench.py \
--generated_dir /path/to/your/generated/images \
--output_dir ./results \
--model gpt-5.2 \
--api_key YOUR_OPENAI_API_KEY \
--subsets class2image text2image doodles
(You can also use the environment variable OPENAI_API_KEY instead of passing --api_key)
The script recursively searches generated_dir for a file whose stem (filename without extension) matches the benchmark image name. Both flat and nested layouts are supported — no subset subfolders required.
Flat layout (simplest):
generated/
img_001.png
img_002.png
...
Nested layout (also fine):
generated/
class2image/
img_001.png
doodles/
img_002.png
NOTE: Generated images must share the same filename stem as the benchmark source images (case-insensitive, any extension is accepted). Example: benchmark image
cat_001.png→ matchcat_001.jpgorcat_001.png.
If you find our work can be helpful, we would appreciate your citation:
@article{yi2026flowinoneunifyingmultimodalgenerationimagein,
title={FlowInOne:Unifying Multimodal Generation as Image-in, Image-out Flow Matching},
author={Junchao Yi and Rui Zhao and Jiahao Tang and Weixian Lei and Linjie Li and Qisheng Su and Zhengyuan Yang and Lijuan Wang and Xiaofeng Zhu and Alex Jinpeng Wang},
journal={arXiv preprint arXiv:2604.06757},
year={2026}
}
Please send emails to junchaoyi52@gmail.com if there is any question
This codebase is built upon the CrossFlow.We would like to thank for their great work.
17 commits
Python
98.8%
Shell
1.2%
[ECCV 2026] Official repository of FlowInOne: Unifying Multimodal Generation as Image-In Image-Out Flow Matching
119
stars
17
commits
Python
primary language
Sep 4, 2026
updated
TL;DR: The first vision-centric image-in, image-out image generation model.
Junchao Yi1*, Rui Zhao3*, Jiahao Tang2*, Weixian Lei3, Linjie Li6,
Qisheng Su4, Zhengyuan Yang6, Lijuan Wang6, Xiaofeng Zhu1†, Alex Jinpeng Wang2†
1 University of Electronic Science and Technology of China, 2 Central South University
3 National University of Singapore, 4 University of Science and Technology of China, 5 Microsoft
🌐 Homepage | 💻 Code | 📄 Paper | 📁 Dataset | 🌏 Benchmark | 🤗 Model
Fig 1. Overview of the FlowInOne. We unify the conditions as visual input and form a simple image-in, image-out framework with a single model.
Fig 2. We construct VisPrompt, a comprehensive dataset that covers wide spectrum of image-to-image generation, ranging from basic text-in-image generation to compositional editing, and further to physics-aware instruction following.
1. Create conda environment
conda create -n flowinone python=3.10 -y
conda activate flowinone
2. Install required packages
git clone git@github.com:CSU-JPG/FlowInOne.git
cd FlowInOne/scripts
sh setup.sh
1. Download the pretrained checkpoint from Hugging Face
mkdir -p checkpoints
wget -O checkpoints/flowinone_256px.pth https://huggingface.co/CSU-JPG/FlowInOne/resolve/main/flowinone_256px.pth
2. Open scripts/inference.sh and directly modify these variables as needed:
NNET_PATH: path to the downloaded checkpointINPUT_IMAGE: input image folder (supports both relative and absolute paths)OUTPUT_IMAGE: output image folder (supports both relative and absolute paths)CONFIG_FILE: config file pathCFG_SCALE: classifier-free guidance scale (default: 7.0)SAMPLE_STEPS: sampling steps (default: 50)SKIP_CROSS_ATTEN: whether to skip spatially-adaptive gated network and cross attention, if you task is text2image, please set ture (true/false, default: false)BATCH_SIZE: batch size during inference (default: 1)3. Run inference with the provided script:
sh scripts/inference.sh
You can either:
Download and use our dataset from Hugging Face: VisPrompt5M, or prepare your own image-pair dataset.
For custom data, organize files with paired input/ and output/ folders.
Each sample must have a matching relative path/name in input and output (extension can be .png/.jpg/.jpeg):
your_source_root/
subset_a/
input/
0001.png
group1/0002.jpg
output/
0001.png
group1/0002.jpg
subset_b/
input/
xxx.jpeg
output/
xxx.jpeg
Then pack the dataset into WebDataset tar shards using scripts/wds_organize/run_unified_to_tars.sh:
scripts/wds_organize/run_unified_to_tars.sh and modify:--root: your source dataset root (the folder containing paired input/ and output/)--tar-dir: output folder for generated tar shards--samples-per-shard: number of samples in each tar shard (e.g., 600)--key-prefix: prefix of each sample __key__ written into tar (e.g., t2i)--data-type: only for text-to-image (T2I) packs, set t2i so each sample gets a type field; for any other task, omit this flag and use the script default (no type field written)--read-workers: number of worker processes for image reading/packing (larger is faster but uses more CPU/RAM)When to use --key-prefix and --data-type:
--key-prefix is useful when you merge multiple tar datasets and want globally distinguishable sample keys (for example, t2i_, c2i_, edit_).--data-type: use **t2i only** when packing a text-to-image dataset. For editing or other tasks, do not pass --data-type (remove it from run_unified_to_tars.sh if present); the default behavior is sufficient.sh scripts/wds_organize/run_unified_to_tars.sh
After packing, tar shards like pairs-000000.tar, pairs-000001.tar will be written to --tar-dir.
We provide data examples for various I2I tasks. The I2I dataset is sampled within VisPrompt5M, and packaged into a tar shard files using the script from the previous section.
We offer examples in both raw-image folder and tar shard formats. For other data formats, you can use our dataset code as a template and extend it as needed.
wget -O flowinone_demo_dataset.tar.gz https://huggingface.co/CSU-JPG/FlowInOne/resolve/main/flowinone_demo_dataset.tar.gz
tar -xzvf "flowinone_demo_dataset.tar.gz" -C "/path/to/flowinone_demo_dataset"
Hierarchy:
flowinone_demo_dataset/
├── train_tar_pattern/ # tar shards for training
│ ├── class2image/
│ │ └── pairs-000000.tar
│ ├── doodles_edit/
│ │ └── pairs-000000.tar
│ ├── force_understand/
│ │ └── pairs-000000.tar
│ ├── text_box_edit/
│ │ └── pairs-000000.tar
│ ├── text_in_image_edit/
│ │ └── pairs-000000.tar
│ ├── text2image/
│ │ └── pairs-000000.tar
│ ├── trajectory_understand/
│ │ └── pairs-000000.tar
│ └── visual_marker_edit/
│ └── pairs-000000.tar
├── test_tar_pattern/ # tar shards for evaluation (usually fewer tar shards)
│ ├── pairs-000000.tar
│
└── vis_imgs/
├── input/ # source/condition images
└── output/ # target images; matched with input by filename
Edit every placeholder in run_train.sh: --train_tar_pattern, --test_tar_pattern, and --vis_image_root.
(Optional) Extend with your own tar shards to mix extra data.
Detailed training instructions are available in TRAIN.md, including:
run_train.sh script with inline commentstrain_tar_pattern / test_tar_pattern format and multi-source exampleThen run:
bash run_train.sh
Evaluates image generation quality on the VPBench benchmark using a VLM judge (OpenAI-compatible API: GPT-5.2, etc.).
The benchmark is loaded directly from HuggingFace via load_dataset. You only need to provide your model's generated images.
Evaluate all subsets
python evaluate_vpbench.py \
--generated_dir /path/to/your/generated/images \
--output_dir ./results \
--model gpt-5.2 \
--api_key YOUR_OPENAI_API_KEY
Evaluate specific subsets only
python evaluate_vpbench.py \
--generated_dir /path/to/your/generated/images \
--output_dir ./results \
--model gpt-5.2 \
--api_key YOUR_OPENAI_API_KEY \
--subsets class2image text2image doodles
(You can also use the environment variable OPENAI_API_KEY instead of passing --api_key)
The script recursively searches generated_dir for a file whose stem (filename without extension) matches the benchmark image name. Both flat and nested layouts are supported — no subset subfolders required.
Flat layout (simplest):
generated/
img_001.png
img_002.png
...
Nested layout (also fine):
generated/
class2image/
img_001.png
doodles/
img_002.png
NOTE: Generated images must share the same filename stem as the benchmark source images (case-insensitive, any extension is accepted). Example: benchmark image
cat_001.png→ matchcat_001.jpgorcat_001.png.
If you find our work can be helpful, we would appreciate your citation:
@article{yi2026flowinoneunifyingmultimodalgenerationimagein,
title={FlowInOne:Unifying Multimodal Generation as Image-in, Image-out Flow Matching},
author={Junchao Yi and Rui Zhao and Jiahao Tang and Weixian Lei and Linjie Li and Qisheng Su and Zhengyuan Yang and Lijuan Wang and Xiaofeng Zhu and Alex Jinpeng Wang},
journal={arXiv preprint arXiv:2604.06757},
year={2026}
}
Please send emails to junchaoyi52@gmail.com if there is any question
This codebase is built upon the CrossFlow.We would like to thank for their great work.
17 commits
Python
98.8%
Shell
1.2%