ComfyUI + Wan 2.2 β€” a ready-to-run text-to-video notebook

A single marimo notebook that turns a fresh GPU box into a private text-to-video studio: it installs ComfyUI, fetches the weights, runs the server, and drives it from the browser. Built and measured on a molab GPU box.

This repository contains no model weights. It is a recipe: a notebook plus a pinned file list. The weights are public and are downloaded from Comfy-Org/Wan_2.2_ComfyUI_Repackaged (Apache-2.0) at the exact revision ee6f4a40737a995bf5818954cfce6d59443b0f04, so the bytes you get are reproducible without duplicating 49 GB.

What it is

Task text-to-video
Models used Wan 2.2 TI2V-5B and Wan 2.2 T2V-A14B (MoE)
Runtime ComfyUI, driven over its HTTP + WebSocket API
Interface a marimo notebook (browser UI, no ComfyUI graph editing needed)
Weights location /marimo/ComfyUI/models on your box
Licence of the weights Apache-2.0

What it can do

  • Text β†’ video. Type a prompt, press Generate video, watch the clip in the notebook and download the .mp4 to your computer.
  • Two model tiers. A fast 5B, and the higher-quality 14B mixture-of-experts.
  • Two A14B speed/quality modes. A distilled 4-step mode, or full 20-step sampling for maximum fidelity.
  • Long videos, up to 10 minutes. Clips are chained β€” each one starts from the previous clip's last frame, so the shot stays continuous (measured 0.94 SSIM across a seam, versus 0.48 for an unrelated clip). 30 s / 1 min / 3 min / 5 min / 10 min are presets.
  • Resumable renders. Finished clips are kept. If a render is interrupted β€” or the whole session is lost β€” pressing Generate again resumes and only renders what is missing.
  • Self-installing. On a fresh box the notebook clones ComfyUI, builds its environment and downloads the weights. Everything under /marimo, so it survives notebook restarts.
  • A clip picker to preview and download everything you have rendered.

How to use it

Option A β€” the notebook (recommended)

curl -fLO https://huggingface.co/dragonlimited/comfyui-molab/resolve/main/notebook.py
marimo edit notebook.py

Then work down the cells:

  1. Install ComfyUI (automatic, a few minutes on a fresh box).
  2. Pick a model and press Download missing model files (18.1 GB for the 5B, 38.0 GB for the A14B β€” see the table below).
  3. Server starts itself on 127.0.0.1:8188.
  4. Write a prompt, choose quality and length, press Generate video.
  5. Watch & download the result. Step 6 lists every clip you have made.

Option B β€” headless

curl -fLO https://huggingface.co/dragonlimited/comfyui-molab/resolve/main/restore.sh
bash restore.sh          # 5B only            (18.1 GB)
bash restore.sh a14b     # A14B only           (38.0 GB, highest quality)
bash restore.sh all      # both                (49.4 GB)

restore.sh clones ComfyUI, creates the venv, installs dependencies and downloads the weights at the pinned revision. It uses curl deliberately β€” see the gotchas.

The models, and what they cost

preset download clip measured speed per clip
Wan 2.2 TI2V-5B 18.1 GB 1280x704, 24 fps, 121 frames (~5 s) Draft ~3.4 s Β· Standard 80.5 s Β· High ~108 s
Wan 2.2 T2V-A14B 38.0 GB (31.3 GB incremental) 1280x720, 16 fps, 81 frames (~5.06 s) Turbo ~80 s Β· Quality 12.9 min

The 5B is the consumer-GPU variant (~24 GB card). The A14B is the quality tier: a two-expert mixture-of-experts, where a high-noise expert samples the first half of the steps and a low-noise expert the second half. It needs a different VAE (wan_2.1_vae, not wan2.2_vae).

A14B quality vs speed

mode steps cfg LoRA measured
A14B Turbo 4 1.0 LightX2V 4-step distillation ~80 s/clip
A14B Quality 20 5.0 none ~12.9 min/clip (34 s per step)

A14B Turbo costs about the same wall-clock as 5B Standard but with the better model β€” that is the sweet spot. Full-quality 20-step A14B is ~9x slower: ideal for one hero shot, impractical for long videos.

Runtime expectations

At 5B Standard (~80 s per 5 s clip): a 30 s video is ~8 min, 1 min ~16 min, 10 min ~2.7 h. At A14B Quality those become ~77 min and ~26 h.

Limitations

  • ~5 seconds per clip is the model's ceiling. Both models are trained on ~5-second clips; anything longer is built by chaining, not by one long shot.
  • The A14B cannot chain. Its text-to-video graph uses EmptyHunyuanLatentVideo, which takes no start image, so consecutive A14B clips cannot be joined into a continuous long video. Long videos therefore require the 5B. Chaining the 14B would need the separate image-to-video experts (wan2.2_i2v_{high,low}_noise_14B_fp8_scaled, ~29 GB more) β€” not included here.
  • No usable faster attention kernel. The shipped flash_attn_4 wheel is FlashAttention 4's flash_attn.cute CuTe-DSL build and provides no flash_attn_func, which is what ComfyUI imports; it rejects --use-flash-attention. --use-ck-attention is not implemented in this ComfyUI. The only real speed levers are fewer sampling steps and lower resolution.
  • Chained videos drift over many clips, since each clip is generated from the previous one.
  • Quality is subjective. No aesthetic guarantees are made.

Gotchas discovered on this box

  • certifi's CA bundle is missing in the molab image. Anything built on httpx β€” the hf CLI, huggingface_hub β€” dies with FileNotFoundError from ssl.create_default_context. urllib and curl work (system CA store), which is why restore.sh uses curl. Fix if you need the CLI: point certifi.where() at /etc/ssl/certs/ca-certificates.crt.
  • The venv is not portable. It is created with --system-site-packages to reuse the box's CUDA-enabled torch, and holds absolute paths. Rebuild it; do not copy it.
  • /marimo is not a persistent volume. It survives a kernel restart but not a fresh container.
  • UI state does not persist. The prompt resets to the sample text, the seed to -1, run buttons are unpressed, and a mo.ui.dropdown resets to its value= default whenever its defining cell re-runs.
  • Model and quality must belong to the same family. Changing the model resets the quality menu; the notebook then shows an explicit "Model/quality mismatch" message rather than failing with a KeyError.

Files

file purpose
notebook.py the marimo notebook β€” the whole workflow, as cells
restore.sh [5b|a14b|all] headless rebuild of ComfyUI + the chosen weights
manifest.json machine-readable list: preset β†’ destination, URL, exact byte size, pinned revision
README.md this card

restore.sh and manifest.json are generated from the notebook's own MODEL_PRESETS, so they cannot drift from the code.

Credits

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support