Minxing Luo Wentao Cheng Jian Yang
This is a research project, NOT a commercial product.
It is recommended to run our code on a Nvidia GPU with a linux system. We have not yet tested on other configurations. Currently, it requires around 14 GB GPU memory to run our method.
To install the required libraries, simply run the following command:
conda env create -f environment.yaml
conda activate rotdrag
To start with, in command line, run the following to start the gradio user interface:
python3 rot_ui.py
Basically, it consists of the following steps:
- train a LoRA
- Drop our input image into the left-most box.
- Input a prompt describing the image in the "prompt" field
- Click the "Use LoRA" button to train a LoRA given the input image before our algorithm.
- do "drag" editing
- Draw a mask in the left-most box to specify the editable areas.
- Click handle and target points in the middle box. Also, you may reset all points by clicking "Undo point".
- Click the "Run" button to run our algorithm. Edited results will be displayed in the right-most box.
To start with, in command line, run the following to start the gradio user interface:
python3 drag_ui.py
The following process is the same as RotationDrag.
This work is inspired by the amazing DragDiffusion, and the code is largely borrowed from it. A huge shout-out to all the amazing open source diffusion models and libraries.