Skip to main content
Built by Best ROI MediaMITWave 1 · LiveBestRoiMedia/anim-toolkit

framedraw

Complete-frame raster animation compositing and local ComfyUI/Qwen inker backend.

Rig-free complete-frame 2D animation toolkit combining easel copy-paper part masks and per-frame raster reshaping (framedraw) with a local SSH-tunneled ComfyUI Qwen-Image-Edit-2511 inker backend (inkers).

View on GitHub ↗
Quick clonegit clone https://github.com/BestRoiMedia/anim-toolkit.git
GitHub repositoryBestRoiMedia/anim-toolkit
Module path_tools/anim/framedraw/ + anim/inkers/
LicenseMIT
Release waveWave 1
LanguagesPython · JSON

Why we built it

When a character cannot be cleanly split into rigid paper-doll parts—or when paid cloud image APIs are too costly for rapid iteration—we needed both a programmatic complete-frame compositing workflow and a zero-API-cost local GPU inker that drops directly into anim-studio.

Architecture & how it works

anim/framedraw/ (parts.py and kai_demo.py) flattens Bezier copypaper_part outlines into anti-aliased masks, inpaints occluded regions once, reshapes articulated limbs per frame, and composites props and blinks via easel into complete PNG frames plus a tracks.json for onion.py frames. Alongside it, anim/inkers/comfy_qwen.py exposes an ink() function matching studio/inker.py's exact contract, driving Qwen-Image-Edit-2511 (GGUF + 4-step Lightning LoRA) in a local ComfyUI instance over a configurable COMFY_URL / COMFY_SSH tunnel with img2img denoise locking.

Key capabilities

  • Anti-aliased Bezier part-mask flattening from easel copy-paper documents (parts.py)
  • Complete-frame raster animation generation with tracks.json export for onion.py (no rig required)
  • Drop-in local GPU inker (comfy_qwen.py) matching anim-studio's exact inker.ink() signature
  • Pose-locked img2img denoising (--denoise 0.6) with multi-reference guide + model sheet support
  • Configurable COMFY_URL and COMFY_SSH environment overrides with automated doctor health checks

Usage example

Generate a complete-frame sequence and run local ComfyUI Qwen inkingPython
python3 anim/framedraw/kai_demo.py ./out/framedraw_demo
python3 anim/inkers/comfy_qwen.py doctor
python3 anim/inkers/comfy_qwen.py batch --guides ./guides --ref ./sheet.png --prompt-file ./prompt.txt --out ./inked --denoise 0.6
framedraw uses easel and OpenCV locally; comfy_qwen.py requires a reachable ComfyUI server (via COMFY_URL / COMFY_SSH) with Qwen-Image-Edit-2511 nodes.