comfyui-video-production

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ComfyUI Video Production Pipeline

ComfyUI视频制作流水线

End-to-end video production orchestration for ComfyUI with automatic error recovery, quality validation, and instance management.
具备自动错误恢复、质量验证和实例管理功能的ComfyUI端到端视频制作编排方案。

Quick Start: Which Pipeline?

快速入门:选择合适的流水线?

Creating a multi-shot narrative video?Keyframe Pipeline - Generate keyframes → Animate → Stitch with transitions
Animating existing images?I2V Batch Pipeline - Load images → Queue I2V jobs → Auto-validate → Combine
Need smooth transitions between scenes?Transition Pipeline - Crossfades, motion blur, zoom effects via FFmpeg
ComfyUI stuck or crashed?Instance Manager - Auto-restart, health checks, queue monitoring
Debugging video issues?Validation Suite - Check resolution, FPS, codec, face consistency, color grading

要创建多镜头叙事视频?关键帧流水线 - 生成关键帧 → 动画化 → 添加转场拼接
要将现有图像转为动画?I2V批量流水线 - 加载图像 → 排队I2V任务 → 自动验证 → 合并
需要场景间的平滑转场?转场流水线 - 通过FFmpeg实现交叉淡入淡出、运动模糊、缩放效果
ComfyUI卡顿或崩溃?实例管理器 - 自动重启、健康检查、队列监控
调试视频问题?验证套件 - 检查分辨率、FPS、编码格式、面部一致性、色彩分级

Core Pipelines

核心流水线

Pipeline 1: Keyframe-to-Video (Complete Narrative)

流水线1:关键帧转视频(完整叙事)

Use when: Creating story-driven videos with multiple distinct shots
1. Keyframe Generation Phase
   - Generate consistent keyframes with IP-Adapter/LoRA
   - Validate face consistency, lighting, pose progression
   - Save to organized directory structure
   - Auto-retry failed generations

2. I2V Animation Phase
   - Queue each keyframe to I2V model (Wan 2.2, LTX-2, AnimateDiff)
   - Monitor progress via ComfyUI API
   - Validate each clip (resolution, fps, duration)
   - Auto-retry with different seeds if failed

3. Concatenation Phase
   - Pre-flight validation (ensure all clips match)
   - Apply transition effects (crossfade, motion blur)
   - FFmpeg encoding with proper codec
   - Export final video with metadata

4. Quality Assurance
   - Face consistency check across clips
   - Color grading consistency
   - Audio sync validation (if applicable)
   - Generate QA report
Expected output: Single cohesive video with smooth transitions

适用场景: 创建包含多个不同镜头的故事驱动型视频
1. 关键帧生成阶段
   - 使用IP-Adapter/LoRA生成一致性关键帧
   - 验证面部一致性、光线、姿态连贯性
   - 保存至结构化目录
   - 自动重试失败的生成任务

2. I2V动画化阶段
   - 将每个关键帧提交至I2V模型队列(Wan 2.2、LTX-2、AnimateDiff)
   - 通过ComfyUI API监控进度
   - 验证每个片段的分辨率、帧率、时长
   - 失败时自动使用不同种子重试

3. 拼接阶段
   - 预验证(确保所有片段参数匹配)
   - 应用转场效果(交叉淡入淡出、运动模糊)
   - 使用FFmpeg按正确编码格式转码
   - 导出带元数据的最终视频

4. 质量保证
   - 检查片段间的面部一致性
   - 色彩分级一致性
   - 音频同步验证(如有音频)
   - 生成质量报告
预期输出: 转场流畅的连贯视频

Pipeline 2: Batch I2V Processing

流水线2:批量I2V处理

Use when: You have multiple images to animate independently
1. Image Discovery
   - Scan directory for source images
   - Validate image specs (resolution, format)
   - Generate processing manifest

2. Parallel I2V Queue
   - Queue all images to ComfyUI with appropriate prompts
   - Stagger submissions to avoid overload
   - Monitor queue depth and ETA

3. Progressive Validation
   - Check each completed video immediately
   - Flag issues (wrong resolution, fps, corruption)
   - Auto-retry flagged videos

4. Export & Organize
   - Move validated videos to output directory
   - Generate index with metadata
   - Create contact sheet (thumbnail preview grid)
Expected output: Directory of validated animated clips

适用场景: 需独立动画化多张图像
1. 图像识别
   - 扫描目录获取源图像
   - 验证图像规格(分辨率、格式)
   - 生成处理清单

2. 并行I2V队列
   - 将所有图像按对应提示词提交至ComfyUI
   - 错开提交时间避免过载
   - 监控队列深度和预计完成时间

3. 渐进式验证
   - 完成后立即检查每个视频
   - 标记问题(错误分辨率、帧率、损坏)
   - 自动重试标记的视频

4. 导出与整理
   - 将验证通过的视频移至输出目录
   - 生成带元数据的索引
   - 创建预览缩略图网格
预期输出: 包含验证通过动画片段的目录

Pipeline 3: Video Concatenation with Transitions

流水线3:带转场的视频拼接

Use when: Combining existing video clips with professional transitions
1. Clip Validation
   - Verify all clips exist and are readable
   - Check resolution, fps, codec consistency
   - Report mismatches with fix suggestions

2. Transition Planning
   - Detect scene changes (cut detection)
   - Recommend transition types (crossfade, zoom, pan)
   - Calculate transition timing

3. FFmpeg Pipeline
   - Apply transitions between clips
   - Re-encode with consistent settings
   - Preserve quality (high bitrate, proper codec)

4. Audio Handling
   - Extract audio from clips (if present)
   - Crossfade audio at transitions
   - Sync to final video timeline
Expected output: Polished video with seamless transitions

适用场景: 为现有视频片段添加专业转场
1. 片段验证
   - 验证所有片段存在且可读取
   - 检查分辨率、帧率、编码格式一致性
   - 报告不匹配问题并提供修复建议

2. 转场规划
   - 检测场景切换
   - 推荐转场类型(交叉淡入淡出、缩放、平移)
   - 计算转场时长

3. FFmpeg流水线
   - 在片段间应用转场
   - 按统一设置重新编码
   - 保留画质(高码率、正确编码格式)

4. 音频处理
   - 提取片段中的音频(如有)
   - 在转场处交叉淡入淡出音频
   - 同步至最终视频时间轴
预期输出: 转场无缝的精修视频

Model Support (2026)

模型支持(2026)

Image-to-Video Models

图像转视频模型

ModelQualitySpeedVRAMBest ForNotes
LTX-2★★★★★Medium16GB+Production 4K videoNative 4K, audio+video
Wan 2.2 MoE★★★★★Slow24GB+Film-quality aestheticsFirst+last frame control
Wan 2.1 14B★★★★Slow24GBHigh qualityProven, stable
Wan 2.1 1.3B★★★Fast8GBQuick iterationConsumer-friendly
AnimateDiff V3★★★Fast8GBInfinite lengthMotion LoRAs
SVD (Stable Video Diffusion)★★★Medium12GBShort clips14-25 frames
Model画质速度VRAM适用场景说明
LTX-2★★★★★中等16GB+专业4K视频制作原生4K,支持音视频
Wan 2.2 MoE★★★★★较慢24GB+电影级画质支持首尾帧控制
Wan 2.1 14B★★★★较慢24GB高质量成熟稳定
Wan 2.1 1.3B★★★较快8GB快速迭代面向普通用户
AnimateDiff V3★★★较快8GB无限时长支持运动LoRA
SVD (Stable Video Diffusion)★★★中等12GB短片段14-25帧

Transition Effects

转场效果

EffectUse CaseEncoding Cost
CrossfadeGeneral purposeLow
Motion blurHigh-motion scenesMedium
Zoom in/outDramatic emphasisMedium
Pan left/rightScene establishmentMedium
Fade to/from blackChapter breaksLow
Custom LUTColor gradingLow

效果适用场景编码成本
交叉淡入淡出通用场景
运动模糊高动态场景中等
缩放戏剧性强调中等
左右平移场景铺垫中等
淡入淡出黑场章节切换
自定义LUT色彩分级

ComfyUI Instance Management

ComfyUI实例管理

Health Monitoring

健康监控

python
undefined
python
undefined

Auto-detected issues:

自动检测的问题:

  • Queue stalled (no progress for 5+ minutes)
  • Memory leak (VRAM usage climbing)
  • Process crashed (connection refused)
  • API unresponsive (timeout on /queue endpoint)
  • Disk full (output directory at capacity)
undefined
  • 队列停滞(5分钟无进度)
  • 内存泄漏(显存持续攀升)
  • 进程崩溃(连接被拒绝)
  • API无响应(/queue端点超时)
  • 磁盘已满(输出目录容量不足)
undefined

Auto-Recovery Actions

自动恢复操作

python
1. Soft Recovery (no restart)
   - Clear stuck queue items
   - Force garbage collection
   - Unload models from VRAM

2. Hard Recovery (restart required)
   - Save current queue state
   - Kill ComfyUI process gracefully
   - Wait for port release
   - Restart with same config
   - Restore queue from saved state

3. Emergency Fallback
   - Switch to backup ComfyUI instance
   - Redirect queue to instance on different port
   - Continue processing without data loss
python
1. 软恢复(无需重启)
   - 清除停滞队列项
   - 强制垃圾回收
   - 从显存卸载模型

2. 硬恢复(需重启)
   - 保存当前队列状态
   - 优雅终止ComfyUI进程
   - 等待端口释放
   - 使用相同配置重启
   - 从保存的状态恢复队列

3. 紧急降级
   - 切换至备用ComfyUI实例
   - 将队列重定向至不同端口的实例
   - 无数据丢失继续处理

Multi-Instance Support

多实例支持

bash
undefined
bash
undefined

Run multiple ComfyUI instances for parallel processing

运行多个ComfyUI实例实现并行处理

Instance 1: localhost:8188 (primary - I2V generation) Instance 2: localhost:8189 (secondary - upscaling/post-processing) Instance 3: localhost:8190 (backup - standby for failover)
实例1: localhost:8188(主实例 - I2V生成) 实例2: localhost:8189(副实例 - 超分辨率/后期处理) 实例3: localhost:8190(备用实例 - 故障转移)

Load balancing strategy:

负载均衡策略:

  • Round-robin for equal workloads
  • Priority-based for mixed tasks
  • Failover for crashed instances

---
  • 轮询分配实现负载均等
  • 基于优先级处理混合任务
  • 故障实例自动转移

---

Validation Suite

验证套件

Pre-Generation Validation

生成前验证

python
✓ Check ComfyUI is running and responsive
✓ Verify models are loaded (UNET, VAE, CLIP)
✓ Confirm output directory has sufficient space
✓ Validate source images exist and are readable
✓ Check prompts are non-empty and formatted correctly
✓ Verify workflow JSON is valid
python
✓ 检查ComfyUI是否运行且响应正常
✓ 验证模型已加载(UNET、VAE、CLIP)
✓ 确认输出目录有足够空间
✓ 验证源图像存在且可读取
✓ 检查提示词非空且格式正确
✓ 验证工作流JSON有效

Post-Generation Validation

生成后验证

python
✓ Video file exists and is non-zero size
✓ Resolution matches expected (e.g., 768x1024)
✓ FPS matches expected (e.g., 16 or 25)
✓ Duration matches expected (e.g., 3-5 seconds)
✓ Codec is compatible (h264, h265)
✓ No corruption (can read all frames)
✓ Face consistency score >0.85 (if character video)
✓ Color histogram within expected range
python
✓ 视频文件存在且大小非零
✓ 分辨率符合预期(如768x1024)
✓ FPS符合预期(如1625✓ 时长符合预期(如3-5秒)
✓ 编码格式兼容(h264、h265)
✓ 无损坏(可读取所有帧)
✓ 面部一致性得分>0.85(人物视频)
✓ 颜色直方图在预期范围内

Quality Metrics

质量指标

python
Metrics tracked:
- Face embedding distance (identity consistency)
- Optical flow magnitude (motion smoothness)
- Frame PSNR/SSIM (interpolation quality)
- Color histogram deviation (lighting consistency)
- Audio sync offset (if audio present)

python
跟踪的指标:
- 人脸嵌入距离(身份一致性)
- 光流幅度(运动平滑度)
- 帧PSNR/SSIM(插值质量)
- 颜色直方图偏差(光线一致性)
- 音频同步偏移(如有音频)

Error Handling & Recovery

错误处理与恢复

Retry Strategies

重试策略

python
1. Seed Randomization Retry
   - Failed generation? Try different seed
   - Max 3 attempts per keyframe
   - Track seeds that fail (avoid reuse)

2. Parameter Adjustment Retry
   - CFG too high causing artifacts? Lower it
   - Steps too low causing incompleteness? Increase
   - Resolution too high OOM? Downscale

3. Model Fallback Retry
   - Wan 2.2 14B OOM? Fall back to 1.3B
   - LTX-2 unavailable? Fall back to Wan 2.1
   - AnimateDiff motion broken? Switch motion LoRA

4. Checkpoint Resume
   - Save progress after each successful clip
   - Resume from last successful checkpoint
   - Skip already-generated clips
python
1. 种子随机化重试
   - 生成失败?尝试不同种子
   - 每个关键帧最多3次尝试
   - 记录失败种子(避免重复使用)

2. 参数调整重试
   - CFG过高导致伪影?降低参数
   - 步数太少导致不完整?增加步数
   - 分辨率过高导致显存不足?降低分辨率

3. 模型降级重试
   - Wan 2.2 14B显存不足?降级至1.3B
   - LTX-2不可用?降级至Wan 2.1
   - AnimateDiff运动异常?切换运动LoRA

4. 断点续传
   - 每个片段成功后保存进度
   - 从最后成功的断点恢复
   - 跳过已生成的片段

Failure Logging

失败日志

python
logs/
├── 2026-02-16_pipeline.log       # Main pipeline log
├── 2026-02-16_comfyui.log        # ComfyUI stdout/stderr
├── 2026-02-16_validation.json    # Validation results
├── 2026-02-16_failures.json      # Failed attempts with reasons
└── 2026-02-16_recovery.json      # Recovery actions taken

python
logs/
├── 2026-02-16_pipeline.log       # 主流水线日志
├── 2026-02-16_comfyui.log        # ComfyUI标准输出/错误日志
├── 2026-02-16_validation.json    # 验证结果
├── 2026-02-16_failures.json      # 失败尝试及原因
└── 2026-02-16_recovery.json      # 执行的恢复操作

Directory Structure

目录结构

Organized Output

结构化输出

project_name/
├── 00_keyframes/                 # Source keyframe images
│   ├── kf01_scene_description.png
│   ├── kf02_scene_description.png
│   └── ...
├── 01_clips/                     # Individual animated clips
│   ├── clip_001_kf01.mp4
│   ├── clip_002_kf02.mp4
│   └── ...
├── 02_validated/                 # Clips that passed validation
│   ├── clip_001_kf01.mp4
│   ├── clip_002_kf02.mp4
│   └── ...
├── 03_transitions/               # Intermediate files for transitions
│   ├── transition_001_002.mp4
│   └── ...
├── 04_final/                     # Final combined video
│   ├── final_video_v1.mp4
│   ├── final_video_v2.mp4        # After revisions
│   └── ...
├── logs/                         # Execution logs
├── metadata/                     # JSON metadata for each asset
└── manifest.json                 # Complete project manifest

project_name/
├── 00_keyframes/                 # 源关键帧图像
│   ├── kf01_scene_description.png
│   ├── kf02_scene_description.png
│   └── ...
├── 01_clips/                     # 独立动画片段
│   ├── clip_001_kf01.mp4
│   ├── clip_002_kf02.mp4
│   └── ...
├── 02_validated/                 # 验证通过的片段
│   ├── clip_001_kf01.mp4
│   ├── clip_002_kf02.mp4
│   └── ...
├── 03_transitions/               # 转场中间文件
│   ├── transition_001_002.mp4
│   └── ...
├── 04_final/                     # 最终合并视频
│   ├── final_video_v1.mp4
│   ├── final_video_v2.mp4        # 修订后版本
│   └── ...
├── logs/                         # 执行日志
├── metadata/                     # 各资源的JSON元数据
└── manifest.json                 # 完整项目清单

Workflow Examples

工作流示例

Example 1: 30-Second Narrative Video (5 keyframes)

示例1:30秒叙事视频(5个关键帧)

python
undefined
python
undefined

Configuration

配置

project_name = "sage_character_reveal" keyframes = 5 i2v_model = "wan_2.2_moe" target_duration = 30 # seconds fps = 16
project_name = "sage_character_reveal" keyframes = 5 i2v_model = "wan_2.2_moe" target_duration = 30 # 秒 fps = 16

Pipeline execution

流水线执行

  1. Generate 5 keyframes (IP-Adapter + LoRA) → sage_kf01_over_shoulder.png → sage_kf02_turning.png → sage_kf03_cardigan_fallen.png → sage_kf04_removing_bra.png → sage_kf05_topless.png
  2. Validate keyframes → Face consistency: 0.92 ✓ → Lighting consistency: 0.88 ✓ → Pose progression: logical ✓
  3. Queue I2V for each keyframe → clip_001: 6s @ 16fps (96 frames) ✓ → clip_002: 6s @ 16fps (96 frames) ✓ → clip_003: 6s @ 16fps (96 frames) ✓ → clip_004: 6s @ 16fps (96 frames) ✓ → clip_005: 6s @ 16fps (96 frames) ✓
  4. Apply 0.5s crossfade transitions → Total: 30s - 2s (4 transitions × 0.5s) = 28s net
  5. Export final video → sage_character_reveal_final.mp4 (30s, 768x1024, 16fps)
undefined
  1. 生成5个关键帧(IP-Adapter + LoRA) → sage_kf01_over_shoulder.png → sage_kf02_turning.png → sage_kf03_cardigan_fallen.png → sage_kf04_removing_bra.png → sage_kf05_topless.png
  2. 验证关键帧 → 面部一致性: 0.92 ✓ → 光线一致性: 0.88 ✓ → 姿态连贯性: 符合逻辑 ✓
  3. 为每个关键帧提交I2V任务 → clip_001: 6秒 @ 16fps (96帧) ✓ → clip_002: 6秒 @ 16fps (96帧) ✓ → clip_003: 6秒 @ 16fps (96帧) ✓ → clip_004: 6秒 @ 16fps (96帧) ✓ → clip_005: 6秒 @ 16fps (96帧) ✓
  4. 应用0.5秒交叉淡入淡出转场 → 总时长: 30秒 - 2秒(4次转场 × 0.5秒)= 28秒净时长
  5. 导出最终视频 → sage_character_reveal_final.mp4 (30秒, 768x1024, 16fps)
undefined

Example 2: Batch Process 20 Images

示例2:批量处理20张图像

python
undefined
python
undefined

Configuration

配置

input_dir = "E:/ComfyUI/input/character_expressions" i2v_model = "ltx_2" motion_prompt = "gentle breathing, subtle movement, natural" batch_size = 4 # Process 4 at a time
input_dir = "E:/ComfyUI/input/character_expressions" i2v_model = "ltx_2" motion_prompt = "gentle breathing, subtle movement, natural" batch_size = 4 # 每次处理4张

Pipeline execution

流水线执行

  1. Scan input directory → Found 20 PNG files
  2. Queue 4 at a time to ComfyUI → Batch 1: expr_001.png → expr_004.png ✓ → Batch 2: expr_005.png → expr_008.png ✓ → Batch 3: expr_009.png → expr_012.png ✓ → Batch 4: expr_013.png → expr_016.png ✓ → Batch 5: expr_017.png → expr_020.png ✓
  3. Validate each output → 19/20 passed (expr_011 failed - wrong resolution) → Retry expr_011 with corrected settings ✓
  4. Export batch → 20 validated clips in output/expressions/ → Generated contact sheet: expressions_preview.png

---
  1. 扫描输入目录 → 发现20个PNG文件
  2. 每次向ComfyUI提交4张图像 → 批次1: expr_001.png → expr_004.png ✓ → 批次2: expr_005.png → expr_008.png ✓ → 批次3: expr_009.png → expr_012.png ✓ → 批次4: expr_013.png → expr_016.png ✓ → 批次5: expr_017.png → expr_020.png ✓
  3. 验证每个输出 → 19/20通过(expr_011失败 - 分辨率错误) → 调整设置后重试expr_011 ✓
  4. 导出批次结果 → 20个验证通过的片段存于output/expressions/ → 生成预览缩略图网格: expressions_preview.png

---

Reference Files

参考文件

Detailed Guides

详细指南

  • references/keyframe-generation.md
    - Keyframe creation with IP-Adapter, LoRA, consistency tips
  • references/i2v-workflows.md
    - Wan 2.2, LTX-2, AnimateDiff, SVD workflow templates
  • references/concatenation.md
    - FFmpeg commands, transition effects, audio handling
  • references/validation.md
    - Quality metrics, validation thresholds, troubleshooting
  • references/instance-management.md
    - ComfyUI health checks, restart scripts, multi-instance setup
  • references/api-reference.md
    - ComfyUI API endpoints, queue management, workflow submission
  • references/troubleshooting.md
    - Common issues and solutions

  • references/keyframe-generation.md
    - 使用IP-Adapter、LoRA创建关键帧的一致性技巧
  • references/i2v-workflows.md
    - Wan 2.2、LTX-2、AnimateDiff、SVD工作流模板
  • references/concatenation.md
    - FFmpeg命令、转场效果、音频处理
  • references/validation.md
    - 质量指标、验证阈值、故障排查
  • references/instance-management.md
    - ComfyUI健康检查、重启脚本、多实例搭建
  • references/api-reference.md
    - ComfyUI API端点、队列管理、工作流提交
  • references/troubleshooting.md
    - 常见问题及解决方案

Integration with Other Skills

与其他技能集成

Pair with:
  • comfyui-character-gen
    - For generating initial keyframes with identity preservation
  • video-assembly
    - For advanced editing and post-production
  • youtube-uploader
    - For direct upload to YouTube after production

搭配使用:
  • comfyui-character-gen
    - 生成带身份保留的初始关键帧
  • video-assembly
    - 高级编辑与后期制作
  • youtube-uploader
    - 制作完成后直接上传至YouTube

Advanced Features

高级功能

Adaptive Quality

自适应画质

python
undefined
python
undefined

Automatically adjust settings based on available resources

根据可用资源自动调整设置

if vram_available > 24: use_model = "wan_2.2_moe_14b" resolution = (832, 1216) batch_size = 1 elif vram_available > 12: use_model = "wan_2.1_1.3b" resolution = (768, 1024) batch_size = 2 else: use_model = "animatediff_v3" resolution = (512, 768) batch_size = 4
undefined
if vram_available > 24: use_model = "wan_2.2_moe_14b" resolution = (832, 1216) batch_size = 1 elif vram_available > 12: use_model = "wan_2.1_1.3b" resolution = (768, 1024) batch_size = 2 else: use_model = "animatediff_v3" resolution = (512, 768) batch_size = 4
undefined

Progress Tracking

进度跟踪

python
undefined
python
undefined

Real-time progress updates

实时进度更新

[Pipeline] Keyframe generation: 3/5 complete (60%) [Pipeline] ETA: 12 minutes remaining [I2V] clip_003 generating: 47/96 frames (49%) [I2V] Current speed: 0.42 it/s [Validation] clip_001: PASS ✓ [Validation] clip_002: PASS ✓
undefined
[Pipeline] 关键帧生成: 3/5完成 (60%) [Pipeline] 预计剩余时间: 12分钟 [I2V] clip_003生成中: 47/96帧 (49%) [I2V] 当前速度: 0.42 it/s [Validation] clip_001: 通过 ✓ [Validation] clip_002: 通过 ✓
undefined

Rollback & Versioning

回滚与版本控制

python
undefined
python
undefined

Automatically version outputs

自动为输出版本化

output/ ├── final_video_v1.mp4 # Initial render ├── final_video_v2.mp4 # After fixing clip_003 ├── final_video_v3.mp4 # After adding transitions └── final_video_final.mp4 # Approved version
output/ ├── final_video_v1.mp4 # 初始渲染版本 ├── final_video_v2.mp4 # 修复clip_003后版本 ├── final_video_v3.mp4 # 添加转场后版本 └── final_video_final.mp4 # 最终确认版本

Rollback to previous version

回滚至之前版本

rollback_to_version(2) # Restore v2 as current

---
rollback_to_version(2) # 将v2恢复为当前版本

---

Workflow Generation

工作流生成

When asked to create a video production workflow:
  1. Assess Requirements
    • Number of shots/keyframes
    • Target duration per shot
    • I2V model preference
    • Transition style
    • Quality vs speed tradeoff
  2. Generate Pipeline Config
    • Model selection based on VRAM/quality needs
    • Resolution and FPS settings
    • Validation thresholds
    • Retry policies
  3. Provide Execution Scripts
    • Python scripts for API submission
    • FFmpeg commands for concatenation
    • Validation checks
    • Recovery procedures
  4. Monitor & Adapt
    • Track progress in real-time
    • Detect failures early
    • Apply recovery strategies
    • Report final metrics

当被要求创建视频制作工作流时:
  1. 评估需求
    • 镜头/关键帧数量
    • 单镜头目标时长
    • I2V模型偏好
    • 转场风格
    • 画质与速度的权衡
  2. 生成流水线配置
    • 根据显存/画质需求选择模型
    • 分辨率和FPS设置
    • 验证阈值
    • 重试策略
  3. 提供执行脚本
    • API提交用Python脚本
    • 拼接用FFmpeg命令
    • 验证检查脚本
    • 恢复流程
  4. 监控与适配
    • 实时跟踪进度
    • 早期检测失败
    • 应用恢复策略
    • 报告最终指标

Best Practices

最佳实践

For Keyframe Videos

关键帧视频

  • Use same seed across all keyframes (consistency)
  • IP-Adapter weight 0.75-0.85 (strong but not rigid)
  • Validate keyframes before I2V (saves compute)
  • Keep clips 4-8 seconds each (sweet spot)
  • Use 0.5-1s crossfade transitions (smooth but not slow)
  • 所有关键帧使用相同种子(保证一致性)
  • IP-Adapter权重设为0.75-0.85(强约束但不过度)
  • I2V前先验证关键帧(节省算力)
  • 单片段时长保持4-8秒(最优区间)
  • 使用0.5-1秒交叉淡入淡出转场(流畅不拖沓)

For Batch Processing

批量处理

  • Process in small batches (4-8 at a time)
  • Validate immediately after each batch
  • Save checkpoint after each successful batch
  • Use priority queue for important clips
  • 小批量处理(每次4-8张)
  • 每批次完成后立即验证
  • 每批次成功后保存断点
  • 为重要片段设置优先级队列

For Instance Management

实例管理

  • Monitor queue depth every 30s
  • Restart if no progress for 5 minutes
  • Keep backup instance ready on different port
  • Log all restart events for debugging

  • 每30秒监控队列深度
  • 5分钟无进度则重启
  • 在不同端口准备备用实例
  • 记录所有重启事件用于调试

Performance Optimization

性能优化

RTX 50 Series (2026)

RTX 50系列(2026)

bash
undefined
bash
undefined

ComfyUI launch flags for optimal performance

最优性能的ComfyUI启动参数

--highvram
--fp8_e4m3fn-unet
--reserve-vram 7
--use-pytorch-cross-attention
--highvram
--fp8_e4m3fn-unet
--reserve-vram 7
--use-pytorch-cross-attention

Expected performance:

预期性能:

  • Wan 2.2 14B: ~2-3 min per 5s clip (832x1216)
  • LTX-2 4K: ~4-5 min per 5s clip (1920x1080)
  • Wan 2.1 1.3B: ~1-2 min per 5s clip (768x1024)
undefined
  • Wan 2.2 14B: 每5秒片段约2-3分钟(832x1216)
  • LTX-2 4K: 每5秒片段约4-5分钟(1920x1080)
  • Wan 2.1 1.3B: 每5秒片段约1-2分钟(768x1024)
undefined

AMD GPUs (ROCm)

AMD GPU(ROCm)

bash
undefined
bash
undefined

ComfyUI v0.8.1+ has native ROCm support

ComfyUI v0.8.1+原生支持ROCm

No special flags needed, just install ROCm drivers

无需特殊参数,只需安装ROCm驱动


---

---

Skill Evolution

技能演进

This skill adapts to new I2V models and techniques. When new models release:
  1. Add model specs to
    references/i2v-workflows.md
  2. Create workflow template for new model
  3. Update model selection logic in main pipeline
  4. Test with sample project
  5. Document performance characteristics
See
references/evolution.md
for update protocol.
本技能会适配新的I2V模型和技术。新模型发布时:
  1. 将模型规格添加至
    references/i2v-workflows.md
  2. 为新模型创建工作流模板
  3. 更新主流水线中的模型选择逻辑
  4. 用示例项目测试
  5. 记录性能特征
更新流程详见
references/evolution.md