[NIPS 2024] Official code for FastDrag
Xuanjia Zhao
Jian Guan
Congyi Fan
Dongli Xu
Youtian Lin
Haiwei Pan
Pengming Feng
To install the required libraries, simply run the following command:
conda env create -f environment.yaml
conda activate fastdrag
If you want download huggingface weights in local, you should download runwayml/stable-diffusion-v1-5 and SimianLuo/LCM_Dreamshaper_v7.
Suggestion 1
: It is suggested that download the model into the directory "local_pretrained_models";Suggestion 2
: runwayml/stable-diffusion-v1-5 might not exist in huggingface, but can be found in other websites like gitee. Then you can set path in config as below:
To start with, in command line, run the following to start the gradio user interface:
python drag_ui.py
For users struggling in loading models from huggingface due to internet constraint, please run:
sh run_drag.sh
Code related to the FastDrag algorithm is under Apache 2.0 license.
If you find our repo helpful, please consider leaving a star or cite our paper :)
@misc{zhao2024fastdrag,
title={FastDrag: Manipulate Anything in One Step},
author={Xuanjia Zhao and Jian Guan and Congyi Fan and Dongli Xu and Youtian Lin and Haiwei Pan and Pengming Feng},
year={2024},
eprint={2405.15769},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
The code is built based on DragDiffusion and diffusers, thanks for their outstanding work!
For the fisrt time to run, it may be slow, but it will perform normally afterwards.