Wan
Remote ComfyUI dispatcher for Wan 2.2 image-to-video, first-last-frame, control video, and BiRefNet cutouts.
Submits Wan 2.2 video generation (i2v, flf, control) and BiRefNet frame-cutout jobs to a GPU host running ComfyUI over SSH/HTTP, returning PNG frame sequences, MP4 clips, and structured JSON reports.
git clone https://github.com/BestRoiMedia/bestroi-game-tools.gitWhy we built it
Running 14B video diffusion models requires a dedicated desktop GPU while development happens on a laptop. Wan automates prompt-graph construction, image flattening/alignment, remote job execution, and transparent cutout post-processing.
Architecture & how it works
Constructs ComfyUI workflow graphs for GGUF-quantized Wan 2.2 high/low-noise stages with 4-step LoRAs, dispatches inputs to the configured WAN_HOST, downloads rendered PNG frames and 16 fps clip.mp4, and optionally runs BiRefNet alpha cutouts and hole-clearing.
Key capabilities
- Three generation modes: i2v (single image), flf (first-last-frame interpolation), and control (motion-guided)
- Automated frame flattening and 16-pixel dimension alignment
- GPU-accelerated transparent frame extraction (cutout) and enclosed background hole cleanup (holes)
- Remote host health check (doctor) and offline graph/validation selftest
Usage example
export WAN_HOST="user@gpu-host"
python3 wan/wan.py flf ./start.png ./end.png ./out/lunge --prompt "character lunges forward" --w 480 --h 720 --frames 81
python3 wan/wan.py cutout ./out/lunge/frames ./out/lunge/cutout