---
title: upsamplers
---

<div class="python-reference">
<a id="fastvideo.models.upsamplers-classes"></a>
<a id="fastvideo.models.upsamplers-functions"></a>
<a id="fastvideo.models.upsamplers"></a>

<h2 id="fastvideo.models.upsamplers.BlurDownsample"><code>fastvideo.models.upsamplers.BlurDownsample</code></h2>
<pre class="doc-signature"><code>BlurDownsample(dims: int, stride: int, kernel_size: int = 5)</code></pre>
<p>Anti-aliased spatial downsampling by integer stride using a fixed separable binomial kernel.
Applies only on H,W. Works for dims=2 or dims=3 (per-frame).</p>

<h3 id="fastvideo.models.upsamplers.BlurDownsample.forward"><code>fastvideo.models.upsamplers.BlurDownsample.forward</code></h3>
<pre class="doc-signature"><code>forward(x: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.LTX2LatentUpsampler"><code>fastvideo.models.upsamplers.LTX2LatentUpsampler</code></h2>
<pre class="doc-signature"><code>LTX2LatentUpsampler(config: dict&#91;str, Any&#93;)</code></pre>
<p>Public wrapper for the LTX-2 latent upsampler.</p>

<h3 id="fastvideo.models.upsamplers.LTX2LatentUpsampler.forward"><code>fastvideo.models.upsamplers.LTX2LatentUpsampler.forward</code></h3>
<pre class="doc-signature"><code>forward(latent: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.LatentUpsampler"><code>fastvideo.models.upsamplers.LatentUpsampler</code></h2>
<pre class="doc-signature"><code>LatentUpsampler(in_channels: int = 128, mid_channels: int = 512, num_blocks_per_stage: int = 4, dims: int = 3, spatial_upsample: bool = True, temporal_upsample: bool = False, spatial_scale: float = 2.0, rational_resampler: bool = False)</code></pre>
<p>Model to upsample VAE latents spatially and/or temporally.</p>

<h3 id="fastvideo.models.upsamplers.LatentUpsampler.forward"><code>fastvideo.models.upsamplers.LatentUpsampler.forward</code></h3>
<pre class="doc-signature"><code>forward(latent: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.LatentUpsamplerConfigurator"><code>fastvideo.models.upsamplers.LatentUpsamplerConfigurator</code></h2>
<pre class="doc-signature"><code>LatentUpsamplerConfigurator()</code></pre>
<p>Configurator for LatentUpsampler from a config dict.</p>
<h3 id="fastvideo.models.upsamplers.LatentUpsamplerConfigurator.from_config"><code>fastvideo.models.upsamplers.LatentUpsamplerConfigurator.from_config</code></h3>
<pre class="doc-signature"><code>from_config(config: dict&#91;str, Any&#93;) -&gt; LatentUpsampler</code></pre>

<h2 id="fastvideo.models.upsamplers.PixelShuffleND"><code>fastvideo.models.upsamplers.PixelShuffleND</code></h2>
<pre class="doc-signature"><code>PixelShuffleND(dims: int, upscale_factors: Tuple&#91;int, int, int&#93; = (2, 2, 2))</code></pre>
<p>N-dimensional pixel shuffle for upsampling.</p>

<h3 id="fastvideo.models.upsamplers.PixelShuffleND.forward"><code>fastvideo.models.upsamplers.PixelShuffleND.forward</code></h3>
<pre class="doc-signature"><code>forward(x: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.ResBlock"><code>fastvideo.models.upsamplers.ResBlock</code></h2>
<pre class="doc-signature"><code>ResBlock(channels: int, mid_channels: Optional&#91;int&#93; = None, dims: int = 3)</code></pre>
<p>Residual block with two convolutional layers, group norm, and SiLU.</p>

<h3 id="fastvideo.models.upsamplers.ResBlock.forward"><code>fastvideo.models.upsamplers.ResBlock.forward</code></h3>
<pre class="doc-signature"><code>forward(x: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.SpatialRationalResampler"><code>fastvideo.models.upsamplers.SpatialRationalResampler</code></h2>
<pre class="doc-signature"><code>SpatialRationalResampler(mid_channels: int, scale: float)</code></pre>
<p>Fully-learned rational spatial scaling: up by 'num' via PixelShuffle, then
anti-aliased downsample by 'den' using fixed blur + stride. Operates on H,W only.
For dims==3, work per-frame for spatial scaling (temporal axis untouched).</p>

<h3 id="fastvideo.models.upsamplers.SpatialRationalResampler.forward"><code>fastvideo.models.upsamplers.SpatialRationalResampler.forward</code></h3>
<pre class="doc-signature"><code>forward(x: torch.Tensor) -&gt; torch.Tensor</code></pre>

<h2 id="fastvideo.models.upsamplers.upsample_video"><code>fastvideo.models.upsamplers.upsample_video</code></h2>
<pre class="doc-signature"><code>upsample_video(latent: torch.Tensor, video_encoder: Any, upsampler: LatentUpsampler) -&gt; torch.Tensor</code></pre>
<p>Upsample a latent tensor with normalization based on the video encoder's per-channel statistics.</p>
</div>

<h2>Submodules</h2>
<ul>
<li><a href="/FastVideo/api/fastvideo/models/upsamplers/hunyuan15">hunyuan15</a></li>
<li><a href="/FastVideo/api/fastvideo/models/upsamplers/kandinsky6_sr">kandinsky6_sr</a></li>
<li><a href="/FastVideo/api/fastvideo/models/upsamplers/ltx2_upsampler">ltx2_upsampler</a></li>
</ul>
