---
title: stages
---

<div class="python-reference">
<a id="fastvideo.pipelines.basic.magi_human.stages-classes"></a>
<a id="fastvideo.pipelines.basic.magi_human.stages"></a>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage</code></h2>
<pre class="doc-signature"><code>MagiHumanAudioDecodingStage(audio_vae, time_stretching: float = _UPSTREAM_AUDIO_TIME_STRETCH)</code></pre>
<p>Decode <code>batch.audio_latents</code> to a waveform using Stable Audio's VAE.</p>
<p>The VAE is loaded lazily by <code>SAAudioVAEModel.sa_audio_vae_model</code> — the
first call triggers a snapshot_download (requires HF token + accepted
terms on stabilityai/stable-audio-open-1.0).</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanAudioDecodingStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage</code></h2>
<pre class="doc-signature"><code>MagiHumanDenoisingStage(transformer, scheduler, patch_size: tuple&#91;int, int, int&#93; = (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 = &#x27;v2&#x27;, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0)</code></pre>
<p>UniPC-flow joint denoising with CFG=2 over (video, audio) latents.</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanDenoisingStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage</code></h2>
<pre class="doc-signature"><code>MagiHumanLatentPreparationStage(vae_stride: tuple&#91;int, int, int&#93; = (4, 16, 16), z_dim: int = 48, patch_size: tuple&#91;int, int, int&#93; = (1, 2, 2), fps: int = 25, t5_gemma_target_length: int = 640, coords_style: Literal&#91;&#x27;v1&#x27;, &#x27;v2&#x27;&#93; = &#x27;v2&#x27;, text_offset: int = 0, audio_in_channels: int = 64)</code></pre>
<p>Prepare latents, coords, modality maps, and padded text embed.</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanLatentPreparationStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage</code></h2>
<pre class="doc-signature"><code>MagiHumanReferenceImageStage(vae: Any, vae_scale_factor: int = 16)</code></pre>
<p>Encode a TI2V reference image into the first-frame video latent.</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanReferenceImageStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage</code></h2>
<pre class="doc-signature"><code>MagiHumanSRDenoisingStage(transformer, scheduler, patch_size: tuple&#91;int, int, int&#93; = (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 = &#x27;v1&#x27;)</code></pre>
<p>Denoise only the SR video latent; audio passes through unchanged.</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRDenoisingStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

<h2 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage</code></h2>
<pre class="doc-signature"><code>MagiHumanSRLatentPreparationStage(vae: Any, vae_stride: tuple&#91;int, int, int&#93; = (4, 16, 16), patch_size: tuple&#91;int, int, int&#93; = (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)</code></pre>
<p>Upsample base latents, add SR noise, and refresh SR conditioning.</p>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_input"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_input</code></h3>
<pre class="doc-signature"><code>verify_input(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_output"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.verify_output</code></h3>
<pre class="doc-signature"><code>verify_output(batch, fastvideo_args)</code></pre>

<h3 id="fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.forward"><code>fastvideo.pipelines.basic.magi_human.stages.MagiHumanSRLatentPreparationStage.forward</code></h3>
<pre class="doc-signature"><code>forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -&gt; ForwardBatch</code></pre>

</div>

<h2>Submodules</h2>
<ul>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/audio_decoding">audio_decoding</a></li>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/denoising">denoising</a></li>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/latent_preparation">latent_preparation</a></li>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/reference_image">reference_image</a></li>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/sr_denoising">sr_denoising</a></li>
<li><a href="/FastVideo/api/fastvideo/pipelines/basic/magi_human/stages/sr_latent_preparation">sr_latent_preparation</a></li>
</ul>
