Buckets:
AutoencoderKLWan
The 3D variational autoencoder (VAE) model with KL loss used in Wan 2.1 by the Alibaba Wan Team.
The model can be loaded with the following code snippet.
from diffusers import AutoencoderKLWan
vae = AutoencoderKLWan.from_pretrained("Wan-AI/Wan2.1-T2V-1.3B-Diffusers", subfolder="vae", torch_dtype=torch.float32)
AutoencoderKLWan[[diffusers.AutoencoderKLWan]]
class diffusers.AutoencoderKLWandiffusers.AutoencoderKLWan
A VAE model with KL loss for encoding videos into latents and decoding latent representations into videos. Introduced in [Wan 2.1].
This model inherits from ModelMixin. Check the superclass documentation for it's generic methods implemented for all models (such as downloading or saving).
wrapperdiffusers.AutoencoderKLWan.decode
disable_slicingdiffusers.AutoencoderKLWan.disable_slicing
Disable sliced VAE decoding. If enable_slicing was previously enabled, this method will go back to computing
decoding in one step.
disable_tilingdiffusers.AutoencoderKLWan.disable_tiling
Disable tiled VAE decoding. If enable_tiling was previously enabled, this method will go back to computing
decoding in one step.
enable_slicingdiffusers.AutoencoderKLWan.enable_slicing
Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.
enable_tilingdiffusers.AutoencoderKLWan.enable_tilingint, optional) --
The minimum height required for a sample to be separated into tiles across the height dimension.
- tile_sample_min_width (
int, optional) -- The minimum width required for a sample to be separated into tiles across the width dimension. - tile_sample_stride_height (
int, optional) -- The minimum amount of overlap between two consecutive vertical tiles. This is to ensure that there are no tiling artifacts produced across the height dimension. - tile_sample_stride_width (
int, optional) -- The stride between two consecutive horizontal tiles. This is to ensure that there are no tiling artifacts produced across the width dimension.0
Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow processing larger images.
forwarddiffusers.AutoencoderKLWan.forwardtorch.Tensor) -- Input sample.
- return_dict (
bool, optional, defaults toTrue) -- Whether or not to return aDecoderOutputinstead of a plain tuple.0
tiled_decodediffusers.AutoencoderKLWan.tiled_decodetorch.Tensor) -- Input batch of latent vectors.
- return_dict (
bool, optional, defaults toTrue) -- Whether or not to return a~models.vae.DecoderOutputinstead of a plain tuple.0~models.vae.DecoderOutputortupleIf return_dict is True, a~models.vae.DecoderOutputis returned, otherwise a plaintupleis returned.
Decode a batch of images using a tiled decoder.
tiled_encodediffusers.AutoencoderKLWan.tiled_encodetorch.Tensor) -- Input batch of videos.0torch.TensorThe latent representation of the encoded videos.
Encode a batch of images using a tiled encoder.
DecoderOutput[[diffusers.models.autoencoders.vae.DecoderOutput]]
class diffusers.models.autoencoders.vae.DecoderOutputdiffusers.models.autoencoders.vae.DecoderOutputtorch.Tensor of shape (batch_size, num_channels, height, width)) --
The decoded output sample from the last layer of the model.0
Output of decoding method.
Xet Storage Details
- Size:
- 9.47 kB
- Xet hash:
- ed77b61f3bf7a4cb963a619ba487643220dcd5038119625ab74a4d0ac9fd4ed1
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.