Skip to content

Harvard-AI-and-Robotics-Lab/CurveFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CurveFlow: Curvature-Guided Flow Matching for Image Generation

This project is built upon SimpleTuner.

Install Prerequisites

conda create --name CurveFlow python=3.11
pip install -r requirements.txt

Download Datasets

python scripts/download_coco17.py
python scripts/download_coco14.py

Login to huggingface

huggingface-cli login

Fine-Tuning

CUDA_VISIBLE_DEVICES=0,1,2,3 CONFIG_ENV_FILE='config/config_base.env' CONFIG_JSON_FILE='config/config_coco17.json' CONFIG_BACKEND=json DISABLE_UPDATES=1 ./train.sh
CUDA_VISIBLE_DEVICES=0,1,2,3 CONFIG_ENV_FILE='config/config_base.env' CONFIG_JSON_FILE='config/config_coco17.json' CONFIG_BACKEND=json DISABLE_UPDATES=1 ./train_npd.sh
CUDA_VISIBLE_DEVICES=0,1,2,3 CONFIG_ENV_FILE='config/config_rw_base.env' CONFIG_JSON_FILE='config/config_coco17_lognorm.json' CONFIG_BACKEND=json DISABLE_UPDATES=1 ./train_lossreweight.sh
CUDA_VISIBLE_DEVICES=0,1,2,3 CONFIG_ENV_FILE='config/config_proposed.env' CONFIG_JSON_FILE='config/config_proposed.json' CONFIG_BACKEND=json DISABLE_UPDATES=1 ./train_proposed.sh

Inference

CUDA_VISIBLE_DEVICES=0 bash ./inference.sh

Evaluation on Image Quality and Image-Text Alignment

bash ./evaluate_on_image_generation.sh

Evaluation on Image Reward

bash ./evaluate_image_reward.sh

Evaluation on PickScore

bash ./evaluate_pickscore.sh

Evaluation on Image-To-Text Semantics Consistency with BLIP v2

# This would generate captions bsed on the generated images
bash ./evaluate_with_blip_caption.sh

Evaluation on CLAIR

bash ./evaluate_CLAIR_with_generated_captions.sh

Qualitative Examples

Citation

If you find this work useful, please cite:

@article{luo2025curveflow,
  title={Curveflow: Curvature-guided flow matching for image generation},
  author={Luo, Yan and Du, Drake and Huang, Hao and Fang, Yi and Wang, Mengyu},
  journal={arXiv preprint arXiv:2508.15093},
  year={2025}
}

About

[arXiv 2025] CurveFlow: Curvature-Guided Flow Matching for Image Generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages