Agent Skillshao-ai-lab/FastVideo › add-model-04-port-vae

add-model-04-port-vae

GitHub

在FastVideo中原型开发或调试VAE组件,支持视频、图像和音频。涵盖潜变量归一化、平铺兼容性及编码解码输出等细节,确保与官方实现严格对齐。

.agents/skills/add-model-04-port-vae/SKILL.md hao-ai-lab/FastVideo

Trigger Scenarios

需要为FastVideo添加新的VAE或自动编码器模型 进行VAE组件的原型验证或parity-debug

Install

npx skills add hao-ai-lab/FastVideo --skill add-model-04-port-vae -g -y
More Options

Non-standard path

npx skills add https://github.com/hao-ai-lab/FastVideo/tree/main/.agents/skills/add-model-04-port-vae -g -y

Use without installing

npx skills use hao-ai-lab/FastVideo@add-model-04-port-vae

指定 Agent (Claude Code)

npx skills add hao-ai-lab/FastVideo --skill add-model-04-port-vae -a claude-code -g -y

安装 repo 全部 skill

npx skills add hao-ai-lab/FastVideo --all -g -y

预览 repo 内 skill

npx skills add hao-ai-lab/FastVideo --list

SKILL.md

Frontmatter
{
    "name": "add-model-04-port-vae",
    "description": "Use during \/add-model Phase 4 or Phase 6 to prototype or parity-debug one FastVideo-native VAE component."
}

Add Model Port VAE

Goal

Prototype or parity-debug one VAE or autoencoder in FastVideo-native code. This skill covers video, image, and audio VAEs.

Inputs

Follow ../add-model/shared/component_skill_common.md and require the complete packet from ../add-model/contracts/component_context.md.

VAE-specific packet fields:

  • component: VAE or autoencoder name.
  • parity_test: tests/local_tests/vaes/test_<family>_<component>_parity.py.
  • weights: converted VAE dir, HF subfolder, or local official path.
  • target_files: fastvideo/models/vaes/<arch_or_family>.py and fastvideo/configs/models/vaes/<arch_or_family>.py.

Modes

Use the common prototype and parity-debug modes from ../add-model/shared/component_skill_common.md.

VAE-specific prototype concerns include latent normalization, stochastic posterior behavior, tiling incompatibility, temporal/spatial/audio layout, and decode output containers.

Reuse Proof

Apply the shared reuse proof. VAE-specific comparison must include latent layout, temporal/spatial/audio compression, scaling factor, mean/std normalization, posterior behavior, encode/decode output objects, tiling flags, and cropping.

Existing FastVideo Patterns

  • Shared tiling wrapper: fastvideo/models/vaes/common.py::ParallelTiledVAE.
  • Config bases: VAEConfig and VAEArchConfig in fastvideo/configs/models/vaes/base.py.
  • Use the matching VAE config bucket. Wrong bucket inheritance can typecheck but fail during pipeline wiring.
  • Config export: add the config to fastvideo/configs/models/vaes/__init__.py.
  • Registry discovery: set EntryClass = <ClassName> in the model file.
  • Loader path: VAE loaders resolve _class_name through ModelRegistry and load converted component weights from the VAE subdir.
  • Reference examples: oobleck.py, autoencoder_kl.py, wanvae.py, ltx2vae.py, and gamecraftvae.py.
  • Layer guidance: fastvideo/layers/AGENTS.md.

Implementation Rules

  • Name reusable VAE architectures by architecture (oobleck.py, autoencoder_kl.py); name family-specific VAEs by family.
  • Match official encode/decode contracts exactly: input layout, latent layout, temporal/spatial/audio compression, scaling factor, mean/std normalization, posterior sampling behavior, decode output object, and frame/sample cropping.
  • Compare deterministic outputs in parity: decode outputs, encode mean/mode, or round-trip tensors. Do not compare stochastic samples unless the RNG path is explicitly controlled.
  • Use FastVideo tiling only when it preserves official numerics for the tested shape; disable it in config for audio or unsupported dimensions.
  • Put architecture constants on VAEArchConfig; put load_encoder, load_decoder, tiling, dtype, and pretrained path fields on VAEConfig.
  • Follow the production import boundary in ../add-model/shared/common_rules.md.

Prototype Checks

Follow the shared prototype success criteria.

Parity-Debug Loop

Run the shared parity-debug loop. The component test command is:

pytest <parity_test> -v -s

For numerical drift, check normalization, latent scaling, posterior mode vs sample, channel order, and temporal/spatial/audio cropping before changing layers.

Escape Hatches

Follow ../add-model/shared/common_rules.md and the component-specific guidance in ../add-model/shared/component_skill_common.md. VAE-specific ask cases include dropping an encode/decode path, accepting an unsupported private op, or choosing between incompatible official VAE definitions.

Handoff

Return ../add-model/contracts/component_skill_handoff.md following the common handoff rules in ../add-model/shared/component_skill_common.md.

Version History

  • 31aa115 Current 2026-07-05 20:11

Same Skill Collection

.agents/skills/add-model-01-prep/SKILL.md
.agents/skills/add-model-02-parity/SKILL.md
.agents/skills/add-model-03-port-dit/SKILL.md
.agents/skills/add-model-05-port-encoder/SKILL.md
.agents/skills/add-model-06-port-generic/SKILL.md
.agents/skills/add-model-07-conversion/SKILL.md
.agents/skills/add-model-08-trace/SKILL.md
.agents/skills/add-model-09-pipeline/SKILL.md
.agents/skills/add-model-10-pr-review/SKILL.md
.agents/skills/add-model/SKILL.md
.agents/skills/decompose-pipeline-pr/SKILL.md
.agents/skills/dreamverse-deploy/SKILL.md
.agents/skills/reseed-performance-baseline/SKILL.md
.agents/skills/reseed-ssim-references/SKILL.md
.agents/skills/seed-ssim-references/SKILL.md

Metadata

Files
0
Version
31aa115
Hash
357539f4
Indexed
2026-07-05 20:11

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 21:20
浙ICP备14020137号-1 $Гость$