---
title: Testing Huggingface
emoji: 🌍
colorFrom: gray
colorTo: yellow
sdk: docker
pinned: false
---
# 🪶 MagicQuill: An Intelligent Interactive Image Editing System
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)
- [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.
- [ ] 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!
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 [Web Demo (Alipay Cloud)](http://magic.chenjunfeng.xyz/). 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.
## Tutorial
Please read before you try!








