The activation switch. After this PR merges, MagiHuman is publicly
loadable via:
from fastvideo import VideoGenerator
gen = VideoGenerator.from_pretrained('FastVideo/MagiHuman-Diffusers/base')
Files:
- fastvideo/registry.py: 153 lines of register_configs/register_presets
calls covering all 4 variants x 2 modes (8 total entrypoints).
- examples/inference/basic/basic_magi_human{_,_ti2v,_distill,_distill_ti2v,
_sr540p,_sr540p_ti2v,_sr1080p,_sr1080p_ti2v}.py: 8 user-facing scripts.
- fastvideo/tests/ssim/test_magi_human_similarity.py: CI-eligible SSIM
regression test against the umbrella HF repo.
- .agents/memory/codebase-map/models/magi_human.md: codebase-map entry
(first per-model entry under the models/ subdir; sets the convention).
- fastvideo/pipelines/basic/magi_human/AGENTS.md: provenance section
finalized with all 8 PR numbers + the will/magi source SHA.
Verification:
- Existing tests on main: should still pass (no shared component changes
in this PR; the umbrella loader infra landed in PR-B / loader-infra).
- pre-commit run --all-files: clean.
- E2E smoke after activation: any of the 8 examples emits expected mp4
with hash dcf5f2bf6534c7c0d91e7353e42b23db on the base T2V variant.
Magi-Stack: 8/8
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
"""Run daVinci-MagiHuman SR-1080p text-to-AV in FastVideo.
|
|
|
|
Build the converted repo on large local storage, then symlink it into the
|
|
workspace:
|
|
|
|
python scripts/checkpoint_conversion/convert_magi_human_to_diffusers.py \
|
|
--source GAIR/daVinci-MagiHuman \
|
|
--subfolder base \
|
|
--sr-source GAIR/daVinci-MagiHuman \
|
|
--sr-subfolder 1080p_sr \
|
|
--output /raid/william5lin_converted_weights/magi_human_sr_1080p \
|
|
--cast-bf16
|
|
ln -s /raid/william5lin_converted_weights/magi_human_sr_1080p \
|
|
converted_weights/magi_human_sr_1080p
|
|
"""
|
|
from fastvideo import VideoGenerator
|
|
from fastvideo.pipelines.basic.magi_human.pipeline_configs import (
|
|
MagiHumanSR1080pConfig,
|
|
)
|
|
|
|
|
|
PROMPT = (
|
|
"A warm afternoon scene: a person sits on a park bench reading a book, "
|
|
"surrounded by softly swaying trees."
|
|
)
|
|
|
|
|
|
def main() -> None:
|
|
generator = VideoGenerator.from_pretrained(
|
|
"FastVideo/MagiHuman-Diffusers/sr_1080p",
|
|
num_gpus=1,
|
|
override_pipeline_cls_name="MagiHumanSR1080pPipeline",
|
|
pipeline_config=MagiHumanSR1080pConfig(),
|
|
)
|
|
generator.generate_video(
|
|
prompt=PROMPT,
|
|
output_path="outputs_video/magi_human_sr1080p/output_magi_human_sr1080p.mp4",
|
|
save_video=True,
|
|
)
|
|
generator.shutdown()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|