explaingit

ant-research/magicquill

Analysis updated 2026-07-03

3,682PythonAudience · developerComplexity · 4/5Setup · hard

TLDR

An AI-powered image editing tool where you draw colored strokes on photos to make precise local changes, the system guesses your intent and suggests prompts automatically. Runs locally with a GPU or as a free hosted demo on Hugging Face.

Mindmap

mindmap
  root((magicquill))
    What it does
      Stroke-based image editing
      AI intent guessing DrawNGuess
      Local and hosted demo
    How to use
      Draw strokes on image
      Accept or edit AI prompt
      Apply localized change
    Tech
      Python and Gradio
      PyTorch and CUDA
      ComfyUI extension
      Docker support
    Requirements
      8GB VRAM GPU
      25GB model download
      Linux or Windows
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Draw brush strokes on a photo to add, remove, or stylize specific regions without writing long text descriptions.

USE CASE 2

Try stroke-based AI image editing instantly via the free Hugging Face Spaces demo, no GPU required.

USE CASE 3

Integrate MagicQuill into a ComfyUI workflow for node-based generative image pipelines.

USE CASE 4

Run MagicQuill in a Docker container with GPU passthrough on a Linux server for repeatable local deployments.

What is it built with?

PythonGradioPyTorchComfyUIDockerCUDA

How does it compare?

ant-research/magicquillcalesthio/openmontagedarkmatter2048/windowscleaner
Stars3,6823,6813,681
LanguagePythonPythonPython
Setup difficultyhardmoderateeasy
Complexity4/53/52/5
Audiencedevelopervibe codergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires downloading ~25 GB of model checkpoints and an NVIDIA GPU with at least 8 GB of VRAM, a free hosted demo is available for those without a GPU.

No license explicitly described in the explanation.

In plain English

MagicQuill is an image editing tool that lets you make precise, localized changes to photos and illustrations by drawing directly on them. Instead of describing what you want in text alone, you draw colored strokes on the parts of the image you want to change, and the system figures out what you are trying to do. It was accepted at CVPR 2025, a major computer vision research conference, and is developed by researchers from HKUST, Ant Group, ZJU, and HKU. The core idea is that two types of strokes trigger different effects: adding new content or changing existing content. An AI model watches what you draw and tries to guess what you mean, suggesting text prompts automatically through a feature called DrawNGuess. You can accept, ignore, or modify those suggestions before the edit is applied. This means you spend less time writing detailed descriptions and more time pointing at what you actually want to change. To run the tool on your own computer, you need a graphics card with at least 8 GB of video memory. Setup involves cloning the repository with a specific flag to include a submodule, downloading about 25 GB of model checkpoints, and installing several Python packages including a custom interface component. There are setup scripts for both Windows and Linux to make this easier. Once running, the tool opens in a browser through Gradio, a Python library for building simple web interfaces. For people without a powerful GPU, the project also provides a hosted demo on Hugging Face Spaces and Modelscope so you can try it without any local installation. A ComfyUI extension is available for users who prefer that workflow. The project has been updated steadily since late 2024, adding features like drag-and-drop uploads, auto-save, resolution adjustment, and Docker container support. A second version, MagicQuillV2, has since been released and is linked from the README for anyone wanting the latest iteration.

Copy-paste prompts

Prompt 1
I cloned MagicQuill and downloaded the 25GB checkpoints. Give me the exact commands to launch the Gradio interface on Linux with my NVIDIA GPU.
Prompt 2
I want to use MagicQuill to erase a person from a photo and fill in the background. What type of stroke should I draw and what should I type in the prompt field?
Prompt 3
Write a Python script that calls MagicQuill's underlying inpainting model directly on a batch of images without opening the Gradio UI.
Prompt 4
I'm getting a CUDA out-of-memory error in MagicQuill on my 8GB GPU. Which settings should I reduce to lower VRAM usage?
Prompt 5
How do I install the MagicQuill ComfyUI extension and connect it to my existing ComfyUI setup? List each step.

Frequently asked questions

What is magicquill?

An AI-powered image editing tool where you draw colored strokes on photos to make precise local changes, the system guesses your intent and suggests prompts automatically. Runs locally with a GPU or as a free hosted demo on Hugging Face.

What language is magicquill written in?

Mainly Python. The stack also includes Python, Gradio, PyTorch.

What license does magicquill use?

No license explicitly described in the explanation.

How hard is magicquill to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is magicquill for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub ant-research on gitmyhub

Verify against the repo before relying on details.