# MagicQuill
**Repository Path**: mirrors/MagicQuill
## Basic Information
- **Project Name**: MagicQuill
- **Description**: MagicQuill 是简单好用的开源交互式图像编辑 AI 工具,只需要简单的笔画和添加提示词,就能轻松完成图像编辑任务,如添加新元素、移除物体、画面调色等操作,此外还提供了丰富画
- **Primary Language**: Python
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: https://www.oschina.net/p/magicquill
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-03-25
- **Last Updated**: 2025-10-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 🪶 MagicQuill: An Intelligent Interactive Image Editing System (*CVPR 2025*)
https://github.com/user-attachments/assets/8ee9663a-fef2-484a-a0b7-8427ab590424
There is an HD video on [Youtube](https://www.youtube.com/watch?v=5DiKfONMnE4).
[Zichen Liu](https://zliucz.github.io)\*,1,2, [Yue Yu](https://bruceyyu.github.io/)\*,1,2, [Hao Ouyang](https://ken-ouyang.github.io/)2, [Qiuyu Wang](https://github.com/qiuyu96)2, [Ka Leong Cheng](https://felixcheng97.github.io/)1,2, [Wen Wang](https://github.com/encounter1997)3,2, [Zhiheng Liu](https://johanan528.github.io/)4, [Qifeng Chen](https://cqf.io/)†,1, [Yujun Shen](https://shenyujun.github.io/)†,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
- [🪶 MagicQuill: An Intelligent Interactive Image Editing System](#-magicquill-an-intelligent-interactive-image-editing-system)
- [TODO List](#todo-list)
- [Update Log](#update-log)
- [Hardware Requirements](#hardware-requirements)
- [Docker Container](#docker-container)
- [Setup](#setup)
- [Tutorial](#tutorial)
- [Citation](#citation)
- [Acknowledgement](#acknowledgement)
- [Note](#note)
## TODO List
- [x] Release the paper and demo page. Visit [magicquill.art](https://magicquill.art) 🪩
- [x] Release the code and checkpoints.
- [x] Release gradio demo.
- [x] Release ComfyUI MagicQuill custom node.
## Update Log
- [2024.11.21] 📢 Update the save button; Fix path bug on Windows; Add `.bat` and `.sh` files for convenient environment install on Windows and Linux. Thanks [lior007](https://github.com/lior007) and [JamesIV4](https://github.com/JamesIV4).
- [2024.11.25] 📢 New UI Updates: Drag & Drop Images + Download Button: We've enhanced our interface with two exciting features! Now you can easily upload images with drag & drop functionality, and quickly save your work using our new download button. Try it out and let us know what you think!
- [2024.12.06] 📢 New Feature Updates: Auto-save and Resolution Adjustment are now enabled in the parameter settings. Thanks [Furkan Gözükara](https://github.com/FurkanGozukara) for his brilliant suggestions.
- [2024.12.07] 🎉 Exciting News: ComfyUI MagicQuill Node has been released! Check the repository https://github.com/magic-quill/ComfyUI_MagicQuill for more details.
- [2024.12.16] 🎉 Exciting News: MagicQuill is also available at [Modelscope](https://modelscope.cn/studios/ant-research/MagicQuill_demo). Thanks for their amazing support and infrastructure.
- [2025.01.02] 🎉 Exciting News: MagicQuill docker container is now available. You can now build & run your own image in a cleaner, isolated environment. Thanks [gbudge](https://github.com/gbudge) for his contribution.
- [2025.02.27] 🎉 Exciting News: MagicQuill has been accepted to CVPR 2025! Looking forward to meeting everyone in Tennessee!
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
```
## Hardware Requirements
- GPU is required to run MagicQuill. **Through our testing, we have confirmed that the model can run on GPUs with 8GB VRAM (RTX4070 Laptop).**
For users with limited GPU resources, please try our [Huggingface Demo](https://huggingface.co/spaces/AI4Editing/MagicQuill) and [Modelscope Demo](https://modelscope.cn/studios/ant-research/MagicQuill_demo). Also, consider disabling the DrawNGuess automatic prompt filling by clicking the wand icon above if it takes too long time on your machine.
## Setup
Follow the following guide to set up the environment.
1. 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
```
2. 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](https://huggingface.co/LiuZichen/MagicQuill-models).
---
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.
3. create environment
```
conda create -n MagicQuill python=3.10 -y
conda activate MagicQuill
```
4. 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
```
5. install the interface
```
pip install gradio_magicquill-0.0.1-py3-none-any.whl
```
6. 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`)
7. install the remaining environment
```
pip install -r requirements.txt
```
8. 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.
## Docker Container
You can build a docker container with MagicQuill as follows:
1. 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
```
2. 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](https://huggingface.co/LiuZichen/MagicQuill-models).
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.
3. build the image
```
docker compose build
```
4. run the image
```
docker compose up -d
```
## Tutorial
Please read before you try!