Getting Wan 2.2 to render one clip in ComfyUI is a solved problem; there are dozens of guides. Getting it to render a hundred clips overnight without babysitting is not. This is the SRE view of AI video: treat ComfyUI as a service, not a desktop app.
Know your VRAM budget first
Wan 2.2 comes in a 5B text-and-image-to-video model and 14B text-to-video and image-to-video models. The 14B image-to-video workflow uses two experts, a high-noise model for motion and composition and a low-noise model for detail, and the sampler splits steps between them. Rough budgets reported by the community:
- 5B: runs on 8 GB-class GPUs at 480p.
- 14B: wants 24 GB or more for comfortable 480p and 720p; quantised GGUF versions and distillation LoRAs such as Lightx2v make 8 GB cards possible, slowly.
Pick one resolution, frame count and model per queue. Mixing 720p 14B jobs with 480p 5B jobs on one GPU is how you get out-of-memory crashes at 3 a.m.
Use ComfyUI as an API, not a canvas
ComfyUI exposes an HTTP API on its server (port 8188 by default):
- Build the workflow in the UI, then export it in API format.
- Your worker loads that JSON, patches the prompt, seed and input image, and posts it to
/prompt. - Track progress over the WebSocket (
/ws) or poll/history/{prompt_id}for outputs.
Keep workflows in git. A workflow file is code: review changes to it like code.
Put a real queue in front
ComfyUI has its own internal queue, but it is not a job system. Put a small queue in front (Redis, Postgres, or any job library) that stores:
- the workflow version, inputs and seed (so any clip is reproducible),
- attempts and the last error,
- which GPU worker took it and when.
Out-of-memory errors poison the next job too. After an OOM, restart the worker process before retrying, and retry at most twice.
Monitor it like any service
Export a few metrics and put them on one dashboard:
- queue depth and age of the oldest job,
- seconds per clip, by model and resolution,
- GPU utilisation, VRAM used and temperature (
nvidia-smior the DCGM exporter), - failures by type (OOM, missing model, bad input).
Alert on queue age, not on single failures. The same reasoning appears in SLOs for LLM features: alert on what users feel.
Pin models and custom nodes
Most “it worked yesterday” problems come from an updated custom node or a swapped model file. Pin ComfyUI and node versions, store model checksums, and rebuild workers from one image. If you run this in a home lab, the network advice in home lab networking with WireGuard applies: keep the ComfyUI port off the public internet.
FAQ
Can ComfyUI be used as an API?
Yes. Export the workflow in API format, POST it to the /prompt endpoint, and read results from /history or the WebSocket.
How much VRAM does Wan 2.2 need?
The 5B model works on 8 GB-class cards at 480p. The 14B models are comfortable on 24 GB or more; quantised versions can run on less, much more slowly.
Should I render locally or on cloud GPUs?
Locally for learning, prompts and small batches. Cloud or a dedicated GPU box when you need volume, higher resolution or your workstation back.