Files
hao-ai-lab-FastVideo/examples/inference/basic/basic_magi_human_distill_ti2v.py
T
SolitaryThinker e114fba53f [docs] examples: add basic_* stubs for remaining magi-human variants
Upstream daVinci-MagiHuman ships 4 model variants x 2 input modes = 8
inference entrypoints (base / distill / sr_540p / sr_1080p, each in
T2V and TI2V mode). FastVideo currently has working code for the base
T2V path (basic_magi_human.py) and a registered preset for distill
T2V (magi_human_distill, but no example until now).

Add example files for the 7 remaining variants:

  * basic_magi_human_distill.py -- runnable T2V example for the
    DMD-2 distilled model. Just point conversion at the distill
    subfolder and the existing magi_human_distill preset takes over.

  * basic_magi_human_ti2v.py
    basic_magi_human_distill_ti2v.py -- not-yet-ported TI2V (image
    conditioning) variants. Each docstring lists the pipeline-side
    work that is missing in FastVideo (VAE encoder load, reference
    image stage, latent_video[..., :1] overwrite at every denoise
    step, new I2V config + preset). main() raises NotImplementedError
    with a pointer to magi-human.md.

  * basic_magi_human_sr540p.py
    basic_magi_human_sr540p_ti2v.py -- not-yet-ported super-resolution
    to 540p. Docstring describes the upstream two-stage flow (base ->
    SR latent prep with trilinear up + ZeroSNR noise -> SR DiT -> Wan
    VAE) and lists the FV components needed (MagiHumanSR540pConfig,
    SR latent prep stage, SR denoise stage with cfg-trick guidance
    tensor, conversion script invocation for the 540p_sr subfolder,
    new preset + registry entry).

  * basic_magi_human_sr1080p.py
    basic_magi_human_sr1080p_ti2v.py -- not-yet-ported SR-1080p.
    Same SR-540p scaffolding plus a block-sparse local-window
    attention path (32 of 40 SR DiT layers). The docstring points at
    upstream's FFAHandler q_ranges/k_ranges blocks in dit_module.py
    and notes that MagiAttention currently always runs full SDPA.

All stubs follow the existing example file convention (SPDX header,
focused docstring, single main()). The not-yet-ported stubs exit with
NotImplementedError so they fail loudly rather than silently misbehaving;
each error message points at the docstring for the missing-component
checklist.
2026-05-05 10:55:49 -07:00

24 lines
763 B
Python

# SPDX-License-Identifier: Apache-2.0
"""Stub example for daVinci-MagiHuman DMD-2 distilled TI2V — NOT YET PORTED.
Mirrors upstream `daVinci-MagiHuman/example/distill/run_TI2V.sh`. Same arch
as `magi_human_distill` (8 steps, no CFG, ~30 GB bf16 weights) but in
TI2V mode — see `basic_magi_human_ti2v.py` for the missing pipeline-side
work that applies to both base and distill TI2V variants.
"""
import sys
def main() -> None:
raise NotImplementedError(
"MagiHuman distilled TI2V is not yet ported. See "
"`basic_magi_human_ti2v.py` for the required image-conditioning "
"pipeline work and `tests/local_tests/magi-human.md` for the "
"port-status journal.",
)
if __name__ == "__main__":
main()
sys.exit(0)