- Python 92%
- JavaScript 6.7%
- Shell 1.2%
- Dockerfile 0.1%
Uses the local MiniMaxH3ImageToVideo node built into ComfyUI core (PR #15224). Reuses all four T2V model files (UNet, text encoder, video VAE, audio VAE) from Comfy-Org/MiniMax-H3 int8_convrot - no extra downloads required. Workflow: 10 nodes (UNETLoader, CLIPLoader, VAELoader, MiniMaxH3ImageToVideo, LoadImage, SigmaShift, KSampler, VAEDecode, CreateVideo, SaveVideo). User provides first_frame via LoadImage; optional last_frame also supported. Smoke test verified end-to-end at 512x320x30 framesx8 steps in 90.6 sec on Strix Halo with --lowvram, producing valid H.264 MP4 with first_frame conditioning. Important I2V caveat (documented in minimax_h3_i2v.md): the first_frame VAE- encoded latent must have even H/W dimensions for patchify. This means width and height must BOTH be divisible by 32. 768x432 (used in prior T2V sessions) crashes the first_frame patchify in I2V with RuntimeError on shape mismatch. Workflow defaults to 768x512 (I2V-safe landscape). Verified the 768x432 crash is I2V-only: T2V at 768x432 still works (main latent is auto-padded before patchify; only conditioning latents lack that padding). Also hit Strix Halo silent-hang-on-cold-model-load again during the 768x512 verify (GTT frozen at baseline 5+ min, no log progress). Per wan-video-local rule #8b: interrupted, killed ComfyUI process, restarted, retried. Second attempt in progress at commit time. |
||
|---|---|---|
| bin | ||
| cgpipe | ||
| docs | ||
| share | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| INSTALL.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
cgpipe — Local AI graphics pipeline
A reproducible pipeline that wires Blender, ComfyUI, an LLM-driven bridge, and a multi-provider LLM fallback router into a single command-line workflow. Designed for indie game / asset pipelines where you want local SDXL/Flux generation, MCP-driven 3D editing, and a graceful fallback between a primary and local LLM — all without paying for or leasing cloud GPU time.
┌───────────────────────┐
│ LLM client │
│ (Claude Desktop, │
│ Roo Code, your own │
│ agent, ...) │
└─────────┬─────────────┘
│ Anthropic- or OpenAI-format HTTP
┌─────────▼─────────────┐ ┌──────────────────┐
│ cgpipe llm-router ├────────►│ Primary LLM │
│ (FastAPI, :4000) │ │ (your choice) │
│ └─ primary │ └──────────────────┘
│ └─ fallback │ │
└─────────┬─────────────┘ │
│ │ on error
┌─────────▼─────────────┐ │
│ Blender (headed or │ ┌─────────▼──────────────┐
│ xvfb, :9876) │ │ Local fallback │
│ + blender-mcp addon │ │ (llama.cpp, :8080) │
│ + ComfyUI-BAI-node │ └────────────────────────┘
└─────────┬─────────────┘
│ sprite refinement / ControlNet
▼
┌───────────────────────┐
│ ComfyUI server │
│ (FastAPI, :8188) │
│ per-task venv │
└───────────────────────┘
Quick start — choose your path
| You want… | Run this |
|---|---|
| Everything in Docker, no host installs | docker compose up (see INSTALL.md) |
| Native install on Linux/macOS | git clone … && ./share/install/install_native.sh |
| Just the LLM router, no Blender/ComfyUI | pip install cgpipe && cgpipe router --help (coming) |
The native installer:
- Verifies
blender,uv,gitare present (and installs if missing). - Creates
/home/<user>/.cgpipe/(or$XDG_CONFIG_HOME/cgpipe/) for the venv, runtime config, and logs. - Downloads a pinned
ComfyUIand one SDXL checkpoint (configurable). - Stages both Blender addons under
share/blender_addons/and registers them at install time. - Wires
bin/cgpipeinto~/.local/bin/.
Who this is for
- Solo / small-team indie devs shipping 2D/3D games or assets.
- Engineers who want reproducible ComfyUI + Blender + LLM stacks on Linux (with macOS support on the way).
- Anyone evaluating an LLM-fallback topology without writing a single custom controller.
Who this is not for
- Studios needing a multi-tenant production pipeline (this is single-user).
- Teams comfortable managing their own infra and looking for less glue. cgpipe is glue.
Status
Working on Linux (tested on AMD ROCm 7.2 / RDNA3+). macOS path is staged
but the installer's brew install blender step requires you to have Xcode
CLT installed. NVIDIA path works but is not benchmarked — RTX users should
swap in the NVIDIA PyTorch wheel (see INSTALL.md §"GPU wheels").
Components:
- llm-router (Phase 3) — Anthropic-Messages- and OpenAI-compatible FastAPI proxy with primary/fallback.
- blender-mcp-client (Phase 4) — single-shot MCP-CLI for any LLM/agent without a persistent MCP client.
- ComfyUI bridge (Phase 1) — addon path + isolated Python venv.
What's next
Read INSTALL.md for the walkthrough and the per-tier configuration. Then docs/architecture.md for how the pieces fit together end to end. docs/sanitization.md lists every place a personal credential or path could leak and what we did about it.
License
MIT — see LICENSE.
Contributing
Issues and PRs welcome. Before sending a PR, run:
./tests/smoke_test.sh # boots the stack and asserts a sample LLM call