explaingit

doubiiu/tooncrafter

5,962PythonAudience · designerComplexity · 4/5Setup · hard

TLDR

A research AI tool that generates the missing animation frames between two cartoon images, turning a start and end keyframe into a short animated clip.

Mindmap

mindmap
  root((ToonCrafter))
    What it does
      Frame interpolation
      Sketch guidance
      Sketch colorization
    Tech
      Video diffusion model
      Python and PyTorch
      Gradio interface
      ComfyUI wrapper
    Output
      512x320 resolution
      Up to 16 frames
      24 seconds on GPU
    Setup
      Anaconda environment
      Hugging Face weights
      Google Colab option
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

Things people build with this

USE CASE 1

Animate two cartoon keyframes into a smooth clip without drawing every in-between frame by hand.

USE CASE 2

Supply rough sketch frames as motion hints to guide how the animation moves between two keyframes.

USE CASE 3

Colorize a black-and-white sketch by providing a reference image that carries the colors and style you want.

USE CASE 4

Run ToonCrafter inside ComfyUI or a Google Colab notebook without setting up a local Python environment.

Tech stack

PythonPyTorchAnacondaGradioComfyUICUDA

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a GPU with at least 10 GB VRAM, pre-trained model weights must be downloaded separately from Hugging Face.

In plain English

ToonCrafter is a research tool that fills in the missing motion between two cartoon images. You give it a starting frame and an ending frame, and it generates the frames in between, producing a short animated clip. It comes from researchers at CUHK and Tencent AI Lab, and was accepted at SIGGRAPH Asia 2024, one of the top academic venues for computer graphics. The core idea relies on a video diffusion model that was originally trained on real-world video. ToonCrafter adapts that model to understand cartoon-style images, so it can invent plausible motion even when the two input frames look very different. The model generates videos at 512x320 resolution, up to 16 frames per clip, and takes roughly 24 seconds to run on a high-end research GPU using 50 generation steps. Community members have brought the memory requirement down to around 10 GB through compression tricks, making it accessible on more consumer cards. Beyond basic interpolation, ToonCrafter supports two additional uses. First, you can supply sparse sketch frames as guidance, giving the model rough hints about what path the motion should follow between the two keyframes. Second, the model can colorize a sketch using a separate reference image, mapping the colors and style of the reference onto the outline drawing. Getting it running requires Python and a compatible GPU. The recommended setup uses Anaconda to create an isolated environment, install dependencies, and then either run a command-line script or launch a local Gradio web interface for a point-and-click experience. Pre-trained model weights are available on Hugging Face. The community has also built wrappers for ComfyUI, Google Colab notebooks, and a Windows-specific package, so there are multiple ways to get started depending on your setup. ToonCrafter is a research prototype, not a commercial product. The authors note that no official paid service or web application exists, so any third-party site charging for access is unofficial.

Copy-paste prompts

Prompt 1
Set up ToonCrafter locally using Anaconda so I can interpolate between two cartoon PNG frames saved on my machine.
Prompt 2
Launch ToonCrafter's Gradio web interface and generate a 16-frame animation between my start and end cartoon images.
Prompt 3
Use ToonCrafter's sketch guidance to animate a character walking, I have 4 rough pose sketches as waypoints between the keyframes.
Prompt 4
Help me reduce ToonCrafter's GPU memory usage to fit within 10 GB so I can run it on a consumer graphics card.
Prompt 5
Use ToonCrafter's colorization mode to apply colors from a reference image onto a black-and-white sketch.
Open on GitHub → Explain another repo

← doubiiu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.