Zewei Zhang Huan Liu Jun Chen Xiangyu Xu
- 2024.04.17 - Updated DAI (Dragging Accuracy Index) and GScore (Gemini Score) evaluation methods. Please check the evaluation file. GScore is modified from Generative AI.
Before getting started, please make sure your system is equipped with a CUDA-compatible GPU and Python 3.9 or higher. We provide three methods to directly run GoodDrag:
- Windows Users: Double-click webui.bat to automatically set up your environment and launch the GoodDrag web UI.
- Linux Users: Run webui.sh for a similar one-step setup and launch process.
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Launch the GoodDrag web UI:
python gooddrag_ui.py
For a quick and easy start, access GoodDrag directly through Google Colab. Click the badge below to open a pre-configured notebook that will guide you through using GoodDrag in the Colab environment:
GoodDrag's efficiency depends on the image size and editing complexity. For a 512x512 image on an A100 GPU: the LoRA phase requires ~17 seconds, and drag editing takes around 1 minute. GPU memory requirement is below 13GB.
We have predefined a set of parameters in the GoodDrag WebUI. Here are a few that you might consider adjusting:
Parameter Name | Description |
---|---|
Learning Rate | Influences the speed of drag editing. Higher values lead to faster editing but may result in lower quality or instability. It is recommended to keep this value below 0.05. |
Prompt | The text prompt for the diffusion model. It is suggested to leave this empty. |
End time step | Specifies the length of the time step during the denoise phase of the diffusion model for drag editing. If good results are obtained early in the generated video, consider reducing this value. Conversely, if the drag editing is insufficient, increase it slightly. It is recommended to keep this value below 12. |
Lambda | Controls the consistency of the non-dragged regions with the original image. A higher value keeps the area outside the mask more in line with the original image. |
Part of the code was based on DragDiffusion and DragGAN. Thanks for the great work!
@article{zhang2024gooddrag,
title={GoodDrag: Towards Good Practices for Drag Editing with Diffusion Models},
author={Zhang, Zewei and Liu, Huan and Chen, Jun and Xu, Xiangyu},
journal = {arXiv},
year={2024}
}