https://github.com/user-attachments/assets/8ee9663a-fef2-484a-a0b7-8427ab590424
There is an HD video on Youtube.
Zichen Liu*,1,2, Yue Yu*,1,2, Hao Ouyang2, Qiuyu Wang2, Ka Leong Cheng1,2, Wen Wang3,2, Zhiheng Liu4, Qifeng Chen†,1, Yujun Shen†,2
1HKUST 2Ant Group 3ZJU 4HKU *equal contribution †corresponding author
TLDR: MagicQuill is an intelligent and interactive system achieving precise image editing.
Key Features: 😎 User-friendly interface / 🤖 AI-powered suggestions / 🎨 Precise local editing

.bat and .sh files for convenient environment install on Windows and Linux. Thanks lior007 and JamesIV4.To update the latest features, pull the latest code and re-install the gradio_magicquill:
pip uninstall -y gradio_magicquill-0.0.1-py3-none-any.whl
pip install gradio_magicquill-0.0.1-py3-none-any.whl
For users with limited GPU resources, please try our Huggingface Demo and Modelscope Demo. Also, consider disabling the DrawNGuess automatic prompt filling by clicking the wand icon above if it takes too long time on your machine.
Follow the following guide to set up the environment.
--recursive flag. Otherwise, you will find LLaVA submodule missing.
git clone --recursive https://github.com/magic-quill/MagicQuill.git
cd MagicQuillwget -O models.zip "https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1"
unzip models.zip
If the .zip file is not accessible, download it via browser. All checkpoints are about 25 GB in total. It may take some time to download. Alternatively, check our checkpoints at huggingface.If you are a Windows user, you may try to use windows_setup.bat to conveniently install environments, just enter windows_setup.bat in your Python shell. For Linux user, check linux_setup.sh.
Alternatively, follow the step-by-step installation guide.
create environment
conda create -n MagicQuill python=3.10 -y
conda activate MagicQuill
install torch with GPU support
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
install the interface
pip install gradio_magicquill-0.0.1-py3-none-any.whl
install llava environment
(For Linux)
cp -f pyproject.toml MagicQuill/LLaVA/
pip install -e MagicQuill/LLaVA/
or
(For Windows)
copy /Y pyproject.toml MagicQuill\LLaVA\
pip install -e MagicQuill\LLaVA\
(For Windows PowerShell, the first line should be Copy-Item -Path pyproject.toml -Destination "MagicQuill\LLaVA" -Force)
install the remaining environment
pip install -r requirements.txt
run magicquill
python gradio_run.py
If you are mainland user, you may try export HF_ENDPOINT=https://hf-mirror.com to use huggingface mirror to facilitate the download of some necessary checkpoints to run our system.
You can build a docker container with MagicQuill as follows:
git clone repo. Please don't forget the --recursive flag. Otherwise, you will find LLaVA submodule missing.
git clone --recursive https://github.com/magic-quill/MagicQuill.git
cd MagicQuill
download and unzip checkpoints
wget -O models.zip "https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1"
unzip models.zip
If the .zip file is not accessible, download it via browser. All checkpoints are about 25 GB in total. It may take some time to download. Alternatively, check our checkpoints at huggingface.
Note: these can be located anywhere on the host computer, but Docker Compose expects them to be in /data/magicquill/models by default. Update docker-compose.yaml if you unzip them to another location.
build the image
docker compose build
run the image
docker compose up -d
Please read before you try!
"With just a few strokes, a vivid little deer comes to life"
"Adorn the beautiful lady with a necklace"
"A dolphin with two tail fins? Let's give it a quick 'treatment'!"
"Let's take off Mr. Skeleton's hat and help him cool down."
"Let's give Mona Lisa a pet cat~"
"Let's give this handsome fellow a new tie!"
"Precise color highlighting - paint exactly where you want to color"
"Don't you think the blue flowers look more dreamy than the pink ones?"
*Please note the color brush and add&subtract brush are mutually exclusive - you can only use one at a time!
"Oops! I don't want to draw a vine, I want to create a path!"
$ claude mcp add MagicQuill \
-- python -m otcore.mcp_server <graph>