upsamplers
fastvideo.models.upsamplers.BlurDownsample
BlurDownsample(dims: int, stride: int, kernel_size: int = 5)
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).
fastvideo.models.upsamplers.BlurDownsample.forward
forward(x: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.LTX2LatentUpsampler
LTX2LatentUpsampler(config: dict[str, Any])
Public wrapper for the LTX-2 latent upsampler.
fastvideo.models.upsamplers.LTX2LatentUpsampler.forward
forward(latent: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.LatentUpsampler
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)
Model to upsample VAE latents spatially and/or temporally.
fastvideo.models.upsamplers.LatentUpsampler.forward
forward(latent: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.LatentUpsamplerConfigurator
LatentUpsamplerConfigurator()
Configurator for LatentUpsampler from a config dict.
fastvideo.models.upsamplers.LatentUpsamplerConfigurator.from_config
from_config(config: dict[str, Any]) -> LatentUpsampler
fastvideo.models.upsamplers.PixelShuffleND
PixelShuffleND(dims: int, upscale_factors: Tuple[int, int, int] = (2, 2, 2))
N-dimensional pixel shuffle for upsampling.
fastvideo.models.upsamplers.PixelShuffleND.forward
forward(x: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.ResBlock
ResBlock(channels: int, mid_channels: Optional[int] = None, dims: int = 3)
Residual block with two convolutional layers, group norm, and SiLU.
fastvideo.models.upsamplers.ResBlock.forward
forward(x: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.SpatialRationalResampler
SpatialRationalResampler(mid_channels: int, scale: float)
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).
fastvideo.models.upsamplers.SpatialRationalResampler.forward
forward(x: torch.Tensor) -> torch.Tensor
fastvideo.models.upsamplers.upsample_video
upsample_video(latent: torch.Tensor, video_encoder: Any, upsampler: LatentUpsampler) -> torch.Tensor
Upsample a latent tensor with normalization based on the video encoder's per-channel statistics.