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.
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
Modules¶
fastvideo.models.upsamplers.hunyuan15
¶
Classes¶
fastvideo.models.upsamplers.hunyuan15.SRTo1080pUpsampler
¶
Bases: Module
Source code in fastvideo/models/upsamplers/hunyuan15.py
Functions¶
fastvideo.models.upsamplers.hunyuan15.SRTo1080pUpsampler.forward
¶Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tensor
|
(B, C, T, H, W) |
required |
target_shape
|
Sequence[int]
|
(H, W) |
None
|
Source code in fastvideo/models/upsamplers/hunyuan15.py
Functions¶
fastvideo.models.upsamplers.ltx2_upsampler
¶
LTX-2 latent upsampler (spatial/temporal) implementation.
Classes¶
fastvideo.models.upsamplers.ltx2_upsampler.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.ltx2_upsampler.LTX2LatentUpsampler
¶
fastvideo.models.upsamplers.ltx2_upsampler.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.ltx2_upsampler.LatentUpsamplerConfigurator
¶
Configurator for LatentUpsampler from a config dict.
fastvideo.models.upsamplers.ltx2_upsampler.PixelShuffleND
¶
Bases: Module
N-dimensional pixel shuffle for upsampling.
Source code in fastvideo/models/upsamplers/ltx2_upsampler.py
fastvideo.models.upsamplers.ltx2_upsampler.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.ltx2_upsampler.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.ltx2_upsampler.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.