Buckets:
AutoencoderKLHunyuanVideo
The 3D variational autoencoder (VAE) model with KL loss used in HunyuanVideo, which was introduced in HunyuanVideo: A Systematic Framework For Large Video Generative Models by Tencent.
The model can be loaded with the following code snippet.
from diffusers import AutoencoderKLHunyuanVideo
vae = AutoencoderKLHunyuanVideo.from_pretrained("hunyuanvideo-community/HunyuanVideo", subfolder="vae", torch_dtype=torch.float16)
AutoencoderKLHunyuanVideo[[diffusers.AutoencoderKLHunyuanVideo]]
class diffusers.AutoencoderKLHunyuanVideodiffusers.AutoencoderKLHunyuanVideo
A VAE model with KL loss for encoding videos into latents and decoding latent representations into videos. Introduced in HunyuanVideo.
This model inherits from ModelMixin. Check the superclass documentation for it's generic methods implemented for all models (such as downloading or saving).
wrapperdiffusers.AutoencoderKLHunyuanVideo.decode
disable_slicingdiffusers.AutoencoderKLHunyuanVideo.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.AutoencoderKLHunyuanVideo.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.AutoencoderKLHunyuanVideo.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.AutoencoderKLHunyuanVideo.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_min_num_frames (
int, optional) -- The minimum number of frames required for a sample to be separated into tiles across the frame 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. - tile_sample_stride_num_frames (
int, optional) -- The stride between two consecutive frame tiles. This is to ensure that there are no tiling artifacts produced across the frame 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.AutoencoderKLHunyuanVideo.forwardtorch.Tensor) -- Input sample.
- sample_posterior (
bool, optional, defaults toFalse) -- Whether to sample from the posterior. - return_dict (
bool, optional, defaults toTrue) -- Whether or not to return aDecoderOutputinstead of a plain tuple.0
tiled_decodediffusers.AutoencoderKLHunyuanVideo.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.AutoencoderKLHunyuanVideo.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:
- 10.3 kB
- Xet hash:
- 630556157da39ab9c4e1b9b4ff9471a319ae01cb7e4bd9ff76a277c666b1bb1d
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.