Skip to content
FastVideo
Esc
↑↓navigate↵open⌘Jpreview
On this page

stages

fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage

MagiHumanAudioDecodingStage(audio_vae, time_stretching: float = _UPSTREAM_AUDIO_TIME_STRETCH)

Decode batch.audio_latents to a waveform using Stable Audio's VAE.

The VAE is loaded lazily by SAAudioVAEModel.sa_audio_vae_model — the first call triggers a snapshot_download (requires HF token + accepted terms on stabilityai/stable-audio-open-1.0).

fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage

MagiHumanDenoisingStage(transformer, scheduler, patch_size: tuple[int, int, int] = (1, 2, 2), video_in_channels: int = 192, audio_in_channels: int = 64, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, coords_style: str = 'v2', video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0)

UniPC-flow joint denoising with CFG=2 over (video, audio) latents.

fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage

MagiHumanLatentPreparationStage(vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, patch_size: tuple[int, int, int] = (1, 2, 2), fps: int = 25, t5_gemma_target_length: int = 640, coords_style: Literal['v1', 'v2'] = 'v2', text_offset: int = 0, audio_in_channels: int = 64)

Prepare latents, coords, modality maps, and padded text embed.

fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage

MagiHumanReferenceImageStage(vae: Any, vae_scale_factor: int = 16)

Encode a TI2V reference image into the first-frame video latent.

fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage

MagiHumanSRDenoisingStage(transformer, scheduler, patch_size: tuple[int, int, int] = (1, 2, 2), video_in_channels: int = 192, audio_in_channels: int = 64, sr_num_inference_steps: int = 5, sr_video_txt_guidance_scale: float = 3.5, use_cfg_trick: bool = True, cfg_trick_start_frame: int = 13, cfg_trick_value: float = 2.0, cfg_number: int = 2, coords_style: str = 'v1')

Denoise only the SR video latent; audio passes through unchanged.

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage

MagiHumanSRLatentPreparationStage(vae: Any, vae_stride: tuple[int, int, int] = (4, 16, 16), patch_size: tuple[int, int, int] = (1, 2, 2), noise_value: int = 220, sr_audio_noise_scale: float = 0.7, sr_height: int = 512, sr_width: int = 896, vae_scale_factor: int = 16)

Upsample base latents, add SR noise, and refresh SR conditioning.

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_input

verify_input(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_output

verify_output(batch, fastvideo_args)

fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.forward

forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch

Submodules

Was this page helpful?