Comfyui Video Pipeline

mckruz/comfyui-expert/skills/comfyui-video-pipeline

作者 mckruzdee27dc3d69b無授權條款91 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫6 個月前更新

Generate videos using ComfyUI with Wan 2.2, FramePack, or AnimateDiff. Handles image-to-video, text-to-video, talking heads, and motion-controlled animation. Use when creating any video content from character images or text descriptions.

已封存僅含說明Design & Creative
AI 產生的概覽

指導透過 ComfyUI 使用 Wan 2.2、FramePack 或 AnimateDiff 生成影片,涵蓋引擎選擇、參數設定與後製處理。

功能
此技能提供在三種引擎之間協調 AI 影片生成的說明:Wan 2.2(圖生影片、文生影片、首尾幀控制)、FramePack(長影片、低 VRAM)以及 AnimateDiff V3(快速、可控運動)。它給出引擎選擇準則、模型檔案、解析度、影格數、步數、CFG、取樣器和 LoRA 選項。它也描述後製流程(RIFE 補幀、FaceDetailer、去閃爍、色彩校正、VHS Video Combine)以及結合音訊、嘴型同步與臉部增強的數位人說話影片流程。它產出的是設定指引與檢查清單,本身不執行腳本。
適用情境
適用於在 ComfyUI 中規劃或設定 AI 影片生成時,例如依 VRAM 預算或時長選擇引擎、設定取樣參數,或組裝數位人說話影片或運動控制片段。也適合從角色圖像或文字描述建立影片內容的需求。
執行需求
需要可存取的 ComfyUI 執行個體(COMFYUI_URL 環境變數)以及 curl 或 wget;支援 macOS、Linux 和 Windows。它引用特定模型檔案(Wan 2.2、FramePack、AnimateDiff、VAE、CLIP、RIFE、FaceDetailer),這些檔案必須存在於 ComfyUI 的模型目錄中,並需要與所選引擎相符的 GPU VRAM。它不附帶腳本,僅提供說明;文中還提到語音與影片合成相關的其他技能。

ComfyUI Video Pipeline

Orchestrates video generation across three engines, selecting the best one based on requirements and available resources.

Engine Selection

VIDEO REQUEST    |    |-- Need film-level quality?    |   |-- Yes + 24GB+ VRAM → Wan 2.2 MoE 14B    |   |-- Yes + 8GB VRAM → Wan 2.2 1.3B    |    |-- Need long video (>10 seconds)?    |   |-- Yes → FramePack (60 seconds on 6GB)    |    |-- Need fast iteration?    |   |-- Yes → AnimateDiff Lightning (4-8 steps)    |    |-- Need camera/motion control?    |   |-- Yes → AnimateDiff V3 + Motion LoRAs    |    |-- Need first+last frame control?    |   |-- Yes → Wan 2.2 MoE (exclusive feature)    |    |-- Default → Wan 2.2 (best general quality)

Pipeline 1: Wan 2.2 MoE (Highest Quality)

Image-to-Video

Prerequisites:

  • wan2.1_i2v_720p_14b_bf16.safetensors in models/diffusion_models/
  • umt5_xxl_fp8_e4m3fn_scaled.safetensors in models/clip/
  • open_clip_vit_h_14.safetensors in models/clip_vision/
  • wan_2.1_vae.safetensors in models/vae/

Settings:

ParameterValueNotes
Resolution1280x720 (landscape) or 720x1280 (portrait)Native training resolution
Frames81 (~5 seconds at 16fps)Multiples of 4 + 1
Steps30-50Higher = better quality
CFG5-7
Sampleruni_pcRecommended for Wan
Schedulernormal

Frame count guide:

DurationFrames (16fps)
1 second17
3 seconds49
5 seconds81
10 seconds161

VRAM optimization:

  • FP8 quantization: halves VRAM with minimal quality loss
  • SageAttention: faster attention computation
  • Reduce frames if OOM

Text-to-Video

Same as I2V but uses wan2.1_t2v_14b_bf16.safetensors and EmptySD3LatentImage instead of image conditioning.

First+Last Frame Control (Wan 2.2 Exclusive)

Wan 2.2 MoE allows specifying both the first and last frame, enabling precise video planning:

  1. Generate two hero images with consistent character
  2. Use first as start frame, second as end frame
  3. Wan interpolates the motion between them

Pipeline 2: FramePack (Long Videos, Low VRAM)

Key Innovation

VRAM usage is invariant to video length - generates 60-second videos at 30fps on just 6GB VRAM.

How it works:

  • Dynamic context compression: 1536 markers for key frames, 192 for transitions
  • Bidirectional memory with reverse generation prevents drift
  • Frame-by-frame generation with context window

Settings

ParameterValueNotes
Resolution640x384 to 1280x720Depends on VRAM
DurationUp to 60 secondsVRAM-invariant
QualityHigh (comparable to Wan)Uses same base models

When to Use

  • Videos longer than 10 seconds
  • Limited VRAM systems (but RTX 5090 doesn't need this)
  • When VRAM is needed for parallel operations
  • Batch video generation

Pipeline 3: AnimateDiff V3 (Fast, Controllable)

Strengths

  • Motion LoRAs for camera control (pan, zoom, tilt, roll)
  • Effect LoRAs (shatter, smoke, explosion, liquid)
  • Sliding context window for infinite length
  • Very fast with Lightning model (4-8 steps)

Settings

ParameterValue (Standard)Value (Lightning)
Motion Modulev3_sd15_mm.ckptanimatediff_lightning_4step.safetensors
Steps20-254-8
CFG7-81.5-2.0
Samplereuler_ancestrallcm
Resolution512x512512x512
Context Length1616
Context Overlap44

Camera Motion LoRAs

LoRAMotion
v2_lora_ZoomInCamera zooms in
v2_lora_ZoomOutCamera zooms out
v2_lora_PanLeftCamera pans left
v2_lora_PanRightCamera pans right
v2_lora_TiltUpCamera tilts up
v2_lora_TiltDownCamera tilts down
v2_lora_RollingClockwiseCamera rolls clockwise

Post-Processing Pipeline

After any video generation:

1. Frame Interpolation (RIFE)

Doubles or quadruples frame count for smoother motion:

Input (16fps) → RIFE 2x → Output (32fps)Input (16fps) → RIFE 4x → Output (64fps)

Use rife47 or rife49 model.

2. Face Enhancement (if character video)

Apply FaceDetailer to each frame:

  • denoise: 0.3-0.4 (lower than image - preserves temporal consistency)
  • guide_size: 384 (speed optimization for video)
  • detection_model: face_yolov8m.pt

3. Deflicker (if needed)

Reduces temporal inconsistencies between frames.

4. Color Correction

Maintain consistent color grading across frames.

5. Video Combine

Final output via VHS Video Combine:

frame_rate: 16 (native) or 24/30 (after interpolation)format: "video/h264-mp4"crf: 19 (high quality) to 23 (smaller file)

Talking Head Pipeline

Complete pipeline for character dialogue:

1. Generate audio → comfyui-voice-pipeline2. Generate base video → This skill (Wan I2V or AnimateDiff)   - Prompt: "{character}, talking naturally, slight head movement"   - Duration: match audio length3. Apply lip-sync → Wav2Lip or LatentSync4. Enhance faces → FaceDetailer + CodeFormer5. Final output → video-assembly

Quality Checklist

Before marking video as complete:

  • Character identity consistent across frames
  • No flickering or temporal artifacts
  • Motion looks natural (not jerky or frozen)
  • Face enhancement applied if character video
  • Frame rate is smooth (24+ fps for delivery)
  • Audio synced (if talking head)
  • Resolution matches delivery target

Reference

  • references/workflows.md - Workflow templates for Wan and AnimateDiff
  • references/models.md - Video model download links
  • references/research-log.md - Latest video generation advances
  • state/inventory.json - Available video models

來源與署名

來源:mckruz/comfyui-expert位於skills/comfyui-video-pipeline提交dee27dc

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架