Media svd

From damionrashford/media-os · View interactive version

Media svd is an AI agent skill from the GitHub repository damionrashford/media-os. Open-source AI video generation with STRICTLY permissive-license models: LTX-Video (Apache 2.0, Lightricks realtime-ish text-to-video), CogVideoX-2B / -5B (Apache 2.0, Tsinghua + Zhipu, 2024), Mochi-1 (Apache 2.0, Genmo), AnimateDiff (Apache 2.0, motion module that animates any diffusion image model

How to use this skill

Skill file

Media SVD (open-source video generation)

Context: $ARGUMENTS

Quick start

When to use

Step 1 — Pick a model

| Model | License | Type | Typical duration | VRAM (FP16) | Notes |

|--------------------|------------|--------------|------------------|------------------|-------|

| LTX-Video | Apache 2.0 | t2v + i2v | 5 s (up to ~17 s)| 24 GB (12 GB nf4)| Near-realtime on H100; fastest Apache model |

| CogVideoX-5B | Apache 2.0 | t2v + i2v | 6 s @ 8 fps | 24 GB | Best quality in the 5B class; 2B variant fits 12 GB |

| CogVideoX-2B | Apache 2.0 | t2v | 6 s | 12 GB | Smaller; good for consumer cards |

| Mochi-1 | Apache 2.0 | t2v | 5.4 s @ 30 fps | 60 GB+ (multi-GPU)| SOTA quality, heavy. Use 8-bit / tensor parallel |

| AnimateDiff | Apache 2.0 | motion module| 2–4 s | same as image model | Plugs into a media-sd image pipeline |

| Wan-Video 2.1 | Apache 2.0 | t2v + i2v | 5 s | 24 GB | Alibaba 2025; strong prompt adherence |

| HunyuanVideo | Tencent L. | t2v | 5 s | 60 GB+ | Commercial cap — flag before use; NOT default |

Read references/models.md for per-model prompt style, sampler/scheduler pairs, and published VBench / human-eval scores.

Check environment:

uv run .claude/skills/media-svd/scripts/svd.py check

Step 2 — Install and download

Diffusers pipeline (pure Python, no ComfyUI)

uv run .../svd.py install ltx
# → pip install diffusers transformers accelerate torch imageio imageio-ffmpeg

uv run .../svd.py download --model ltx --yes
# → huggingface_hub snapshot_download into HF cache

ComfyUI (for workflows with AnimateDiff / LoRAs)

See the media-sd skill for ComfyUI install. Then download video-model nodes via ComfyUI-Manager:

Step 3 — Generate

Text-to-video (t2v)

uv run .../svd.py t2v \
    --model ltx \
    --prompt "a cat jumping off a sofa, cinematic, 35mm film grain" \
    --duration 5 --fps 24 \
    --width 768 --height 512 \
    --out cat.mp4 --seed 42

LTX-Video wants resolution as a multiple of 32. CogVideoX is fixed to 720x480. The

script rounds/validates per-model.

Image-to-video (i2v)

uv run .../svd.py i2v \
    --model cogvideox \
    --init-image first_frame.png \
    --prompt "the wind blows and the flag starts waving" \
    --duration 6 --fps 8 \
    --out waving.mp4

The init-image becomes the first frame. Keep the prompt consistent with the image —

conflicting prompts ("dog" when the image is a cat) produce artifacted morphs.

AnimateDiff via ComfyUI

# ComfyUI running on 8188, workflow loaded with AnimateDiff nodes
uv run .../svd.py animate \
    --workflow animatediff_sana.json \
    --out anim.mp4 --server http://127.0.0.1:8188

AnimateDiff adds temporal attention to a frozen image UNet. Inside the ComfyUI

workflow, wire AnimateDiffLoaderGen1 between ModelLoader and KSampler. Use

Apache 2.0 image backbones only (Sana, PixArt-Sigma — see media-sd).

Step 4 — Post-process and mux

Typical follow-ups:

Gotchas

Examples

Example 1: LTX-Video cat clip, 5 s @ 24 fps

uv run .../svd.py t2v --model ltx \
    --prompt "a ginger cat leaps from a sofa to a bookshelf, slow motion" \
    --duration 5 --fps 24 --width 768 --height 512 \
    --out cat.mp4 --seed 7

Example 2: CogVideoX-5B i2v from a still

uv run .../svd.py i2v --model cogvideox-5b \
    --init-image portrait.png \
    --prompt "she smiles and turns her head slightly" \
    --duration 6 --fps 8 --out smile.mp4

Example 3: Low-VRAM CogVideoX-2B on a 12 GB card

uv run .../svd.py t2v --model cogvideox-2b \
    --prompt "neon Tokyo street at night, rain, reflections" \
    --duration 6 --fps 8 --cpu-offload \
    --out tokyo.mp4

Example 4: AnimateDiff on a Sana image backbone

# 1. Pre-author the ComfyUI workflow with AnimateDiffLoaderGen1 + Sana backbone
# 2. Run it:
uv run .../svd.py animate \
    --workflow sana_animatediff.json --out anim.mp4 \
    --server http://127.0.0.1:8188

Example 5: Wan-Video high quality

uv run .../svd.py t2v --model wan \
    --prompt "a hot-air balloon drifts over snow-capped mountains at sunrise" \
    --duration 5 --fps 24 --width 832 --height 480 \
    --out balloon.mp4

Troubleshooting

Error: `ModuleNotFoundError: No module named 'diffusers'`

Cause: diffusers stack not installed.

Solution: uv run .../svd.py install <model> or pip install diffusers transformers accelerate torch imageio imageio-ffmpeg.

Error: `CUDA out of memory` on Mochi-1

Cause: 60+ GB model doesn't fit.

Solution: switch to LTX-Video or CogVideoX-2B, or run Mochi under bitsandbytes 8-bit quant with --cpu-offload (~40 GB). True FP16 Mochi needs multi-GPU tensor parallel.

Output is a static image / no motion

Cause: i2v with --strength 0.0 or mismatched prompt, or forgot --duration.

Solution: set --duration >= 2, ensure prompt describes motion ("she walks", "camera pans"), raise strength if using i2v.

CogVideoX output is blurry

Cause: T5 prompt too short, or negative prompt missing.

Solution: write a 30–60 word prompt describing subject + motion + camera + style. Add --negative-prompt "blurry, low quality, distorted".

Frames appear doubled / juddery at 24 fps

Cause: native model fps is 8; --fps 24 upsampled by frame repeat.

Solution: do not oversell native fps. Render at native, then pass to media-interpolate (RIFE / FILM) for smooth 24/60 fps.

ComfyUI workflow fails: "AnimateDiffLoaderGen1 missing"

Cause: ComfyUI-AnimateDiff-Evolved custom node not installed.

Solution: in ComfyUI-Manager, install "AnimateDiff Evolved" by Kosinkadink. Or git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved custom_nodes/ComfyUI-AnimateDiff-Evolved.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.