ワンクリックで
add-model-03-port-dit
// Use during /add-model Phase 4 or Phase 6 to prototype or parity-debug one FastVideo-native DiT/transformer component.
// Use during /add-model Phase 4 or Phase 6 to prototype or parity-debug one FastVideo-native DiT/transformer component.
| name | add-model-03-port-dit |
| description | Use during /add-model Phase 4 or Phase 6 to prototype or parity-debug one FastVideo-native DiT/transformer component. |
Prototype or parity-debug one diffusion transformer in FastVideo-native code. This skill is for one component only; do not work on the VAE, encoders, pipeline, or unrelated conversion code unless the current component cannot load without a minimal fix there.
Follow ../add-model/shared/component_skill_common.md and require the complete
packet from ../add-model/contracts/component_context.md.
DiT-specific packet fields:
component: transformer or DiT name.parity_test: tests/local_tests/<bucket>/test_<family>_<component>_parity.py.weights: converted transformer dir or local official path.target_files: fastvideo/models/dits/<family>.py and
fastvideo/configs/models/dits/<family>.py.Use the common prototype and parity-debug modes from
../add-model/shared/component_skill_common.md.
DiT-specific prototype concerns include ambiguous official flags, shape mismatches, missing FastVideo layer equivalents, and dedicated output heads.
Apply the shared reuse proof. DiT-specific comparison must include attention algorithm, positional embeddings, RoPE/patching, timestep/guidance embeddings, scaling constants, dtype casts, state-dict names, and every output head.
fastvideo/models/dits/base.py::BaseDiT.DiTConfig and DiTArchConfig in
fastvideo/configs/models/dits/base.py.fastvideo/configs/models/dits/__init__.py.EntryClass = <ClassName> in the model file.TransformerLoader reads transformer/config.json, calls
dit_config.update_model_arch(config), resolves _class_name through
ModelRegistry, and constructs the class with config and hf_config.stable_audio.py, wanvideo.py, sd3.py, longcat.py,
and ltx2.py.fastvideo/layers/AGENTS.md.ReplicatedLinear for DiT hot-path
linears, DistributedAttention for standard full-sequence attention, and
LocalAttention for local/window attention or simple single-GPU parity paths.DiTArchConfig; keep inference steps, CFG scales,
FPS, flow shift, and sampling defaults out of the arch config._fsdp_shard_conditions, _compile_conditions,
param_names_mapping, and reverse_param_names_mapping where needed.../add-model/shared/common_rules.md.Follow the shared prototype success criteria. A useful one-off check is:
python - <<'PY'
# Import the target config/class, instantiate with random weights, and print
# state_dict names/shapes for the conversion mapping.
PY
Run the shared parity-debug loop. The component test command is:
pytest <parity_test> -v -s
For numerical drift, use ../add-model-08-trace/SKILL.md before writing bespoke
hooks. Start with FastVideo's activation trace (fastvideo/hooks/activation_trace.py;
docs/contributing/activation_trace.md) and a block-level regex such as
FASTVIDEO_TRACE_LAYERS="^block\.layers\.[0-9]+$". Only fall back to custom
per-block hooks if the needed boundary or statistic is not exposed by
FASTVIDEO_TRACE_STATS.
Follow ../add-model/shared/common_rules.md and the component-specific guidance
in ../add-model/shared/component_skill_common.md. DiT-specific ask cases include
dropping an output head/modality, accepting an unsupported kernel/private op, or
choosing between incompatible official transformer definitions.
Return ../add-model/contracts/component_skill_handoff.md following the common
handoff rules in ../add-model/shared/component_skill_common.md.
Use during /add-model after reference/architecture study to scaffold and later activate local FastVideo component parity tests. Emphasizes early test creation, official-reference loading, standardized FastVideo loading, and non-skip handoff gates.
Use during /add-model Phase 6 when component parity has failed and root cause requires layer-by-layer divergence analysis. Uses FastVideo activation trace first, falling back to custom hooks only for boundaries or stats the utility cannot observe.
Use during /add-model Phase 7 after all required component parity tests pass to define FastVideo pipeline wiring, configs, presets, registry entries, examples, smoke tests, and pipeline parity tests.
Manual /add-model workflow for implementing a FastVideo model or first-class component port after add-model-01-prep has staged reference code and weights. Organizes the port into numbered phases with conversion rules, component policies, parity gates, and handoff checks.
Use when redeploying the migrated Dreamverse app backend and frontend on a chosen local GPU; tears down existing ports, launches services, and waits for readiness checks.
Re-seed the HF performance-tracking baseline for an intentional runtime, dependency, or environment-caused benchmark shift using one or more reviewed normalized performance JSONs. Use when performance CI fails because metrics such as latency, throughput, component time, or peak memory changed for an accepted reason and the rolling median baseline in FastVideo/performance-tracking must be advanced from a consistent batch of reviewed source results. The workflow backs up existing history under /tmp, validates all source JSONs for the same (model_id, gpu_type), rejects internally inconsistent source batches, uploads one success=true reseed record per accepted source JSON, and offers to clean local temp state after a successful upload.