Agent Skillshao-ai-lab/FastVideo › add-model-06-port-generic

add-model-06-port-generic

GitHub

用于在FastVideo中添加非DiT、VAE或编码器的通用组件(如调度器、条件器等)。支持原型开发与 parity 调试,遵循共享规范,确保状态管理、配置桶选择及官方行为一致性。

.agents/skills/add-model-06-port-generic/SKILL.md hao-ai-lab/FastVideo

Trigger Scenarios

需要移植 FastVideo 中的调度器、条件器、上采样器、声码器、适配器或预处理器等非核心模型组件 进行组件的原型开发或parity调试,且该组件不属于 DiT、VAE 或编码器类别

Install

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

Non-standard path

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

Use without installing

npx skills use hao-ai-lab/FastVideo@add-model-06-port-generic

指定 Agent (Claude Code)

npx skills add hao-ai-lab/FastVideo --skill add-model-06-port-generic -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-06-port-generic",
    "description": "Use during \/add-model Phase 4 or Phase 6 to prototype or parity-debug one non-DiT, non-VAE, non-encoder FastVideo component."
}

Add Model Port Generic

Goal

Prototype or parity-debug one scheduler, conditioner, upsampler, vocoder, adapter, preprocessor, or unknown component in FastVideo-native code.

Inputs

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

Generic-component packet fields:

  • component: component name.
  • component_type: scheduler, conditioner, upsampler, vocoder, adapter, preprocessor, or unknown.
  • parity_test: tests/local_tests/<bucket>/test_<family>_<component>_parity.py.
  • weights: converted component dir, HF subfolder, or none.
  • target_files: matching fastvideo/models/ and fastvideo/configs/models/ bucket files when applicable.

Modes

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

Generic-component prototype concerns include stateless/stateful ambiguity, missing loader buckets, source prefixes, mutable scheduler state, and output container shape.

Reuse Proof

Apply the shared reuse proof. Generic-component comparison must include mutable state, scaling constants, scheduler/conditioner semantics, output containers, and whether the component owns state or is stateless.

Existing FastVideo Patterns

  • Schedulers live under fastvideo/models/schedulers/ and expose EntryClass.
  • Upsamplers use fastvideo/models/upsamplers/ plus configs under fastvideo/configs/models/upsamplers/; see hunyuan15.py.
  • Vocoders and audio-specific modules can live under fastvideo/models/audio/ with configs under fastvideo/configs/models/audio/; see ltx2_audio_vae.py.
  • Compound conditioners may fit the encoder bucket when the pipeline loader uses ConditionerLoader; see stable_audio_conditioner.py.
  • Registry discovery uses EntryClass; config bucket exports are required when pipeline configs import them by bucket.
  • Use the narrowest matching config bucket. Wrong bucket inheritance can typecheck but fail during pipeline wiring.
  • Layer guidance: fastvideo/layers/AGENTS.md.

Bucket Decision

  • If the component is a transformer/DiT, stop and use add-model-03-port-dit.
  • If the component is a VAE/autoencoder, stop and use add-model-04-port-vae.
  • If the component is a text/image/audio encoder or encoder-like conditioner, stop and use add-model-05-port-encoder unless the loader requires a different bucket.
  • Otherwise choose the narrowest existing bucket. Add a new bucket only when no existing loader/config shape can represent the component without misleading names or unsafe runtime behavior.

Implementation Rules

  • Match official behavior, not just shapes: constructor args, default values, runtime flags, RNG use, dtype/autocast, scaling constants, masks, and output containers all matter.
  • Keep the implementation minimal and native. Do not keep a runtime import of the official implementation as the production component.
  • For schedulers, compare timesteps, sigmas/noise levels, step outputs, shift handling, prediction type, and any mutable internal state.
  • For upsamplers, compare resize mode, align_corners, residual branches, causal padding, normalization, and exact target-shape behavior.
  • For vocoders/audio components, compare waveform shape, sample-rate contract, channel order, hop length, normalization, and dtype.
  • If private upstream deps are required only for tests, keep stubs under tests/local_tests/helpers/ and do not import them from production code.

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, add targeted intermediate comparisons in the test to identify the first divergent operation.

Escape Hatches

Follow ../add-model/shared/common_rules.md and the component-specific guidance in ../add-model/shared/component_skill_common.md. Generic-component ask cases include creating a new loader bucket, accepting an unsupported private op, choosing between incompatible official definitions, or dropping a required component.

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-04-port-vae/SKILL.md
.agents/skills/add-model-05-port-encoder/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
7058f28a
Indexed
2026-07-05 20:11

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 18:38
浙ICP备14020137号-1 $bản đồ khách truy cập$