upsamplers ¶
Classes¶
fastvideo.models.upsamplers.BlurDownsample ¶
Bases: Module
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).
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
fastvideo.models.upsamplers.LTX2LatentUpsampler ¶
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)
Bases: Module
Model to upsample VAE latents spatially and/or temporally.
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
fastvideo.models.upsamplers.LatentUpsamplerConfigurator ¶
Configurator for LatentUpsampler from a config dict.
fastvideo.models.upsamplers.PixelShuffleND ¶
Bases: Module
N-dimensional pixel shuffle for upsampling.
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
fastvideo.models.upsamplers.ResBlock ¶
Bases: Module
Residual block with two convolutional layers, group norm, and SiLU.
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
fastvideo.models.upsamplers.SpatialRationalResampler ¶
Bases: Module
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).
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
Functions:¶
fastvideo.models.upsamplers.upsample_video ¶
upsample_video(latent: Tensor, video_encoder: Any, upsampler: LatentUpsampler) -> Tensor
Upsample a latent tensor with normalization based on the video encoder's per-channel statistics.