Buckets:
AutoencoderKLKVAEVideo
KL 손실을 사용하는 3D 변분 오토인코더(VAE) 모델.
다음 코드 스니펫으로 모델을 로드할 수 있습니다.
import torch
from diffusers import AutoencoderKLKVAEVideo
vae = AutoencoderKLKVAEVideo.from_pretrained("kandinskylab/KVAE-3D-1.0", subfolder="diffusers", dtype=torch.float16)
AutoencoderKLKVAEVideo[[diffusers.AutoencoderKLKVAEVideo]]
diffusers.AutoencoderKLKVAEVideo[[diffusers.AutoencoderKLKVAEVideo]]
diffusers.AutoencoderKLKVAEVideo(ch: int = 128, ch_mult: typing.Tuple[int, ...] = (1, 2, 4, 8), num_res_blocks: int = 2, in_channels: int = 3, out_ch: int = 3, z_channels: int = 16, temporal_compress_times: int = 4)
매개변수:
ch (int, 선택 사항, 기본값 128) : 기본 채널 수.
ch_mult (Tuple[int], 선택 사항, 기본값 (1, 2, 4, 8)) : 레벨별 채널 배율입니다.
num_res_blocks (int, 선택 사항, 기본값 2) : 레벨당 잔차 블록의 수.
in_channels (int, 선택 사항, 기본값 3) : 입력 채널 수.
out_ch (int, 선택 사항, 기본값 3) : 출력 채널 수.
z_channels (int, 선택 사항, 기본값 16) : 잠재 채널의 수.
temporal_compress_times (int, 선택 사항, 기본값 4) : 시간 압축 계수.
KL 손실을 사용하여 비디오를 잠재 변수로 인코딩하고 잠재 표현을 비디오로 디코딩하는 VAE 모델입니다. KVAE에서 사용됩니다.
이 모델은 ModelMixin에서 상속됩니다. 모든 모델에 대해 구현된 일반적 메서드(다운로드 또는 저장 등)에 대해서는 상위 클래스 문서를 확인하세요.
decode[[diffusers.AutoencoderKLKVAEVideo.decode]]
decode(z: Tensor, return_dict: bool = True)
매개변수:
z (torch.Tensor) : (B, C, T, H, W) 형태의 잠재 벡터 입력 배치.
return_dict (bool, 선택 사항, 기본값 True) : 일반 튜플 대신 ~models.vae.DecoderOutput를 반환할지 여부.
반환값: ~models.vae.DecoderOutput 또는 tuple
디코딩된 비디오.
videos 배치의 디코딩을 수행합니다.
disable_slicing[[diffusers.AutoencoderKLKVAEVideo.disable_slicing]]
disable_slicing()
슬라이스된 VAE 디코딩을 비활성화합니다.
enable_slicing[[diffusers.AutoencoderKLKVAEVideo.enable_slicing]]
enable_slicing()
슬라이스 VAE 디코딩을 활성화합니다.
encode[[diffusers.AutoencoderKLKVAEVideo.encode]]
encode(x: Tensor, return_dict: bool = True)
매개변수:
x (torch.Tensor) : (B, C, T, H, W) 모양의 비디오 입력 배치.
return_dict (bool, 선택 사항, 기본값 True) : 일반 튜플 대신 ~models.autoencoder_kl.AutoencoderKLOutput을 반환할지 여부.
반환값:
인코딩된 비디오의 잠재 표현(latent representations).
…
forward[[diffusers.AutoencoderKLKVAEVideo.forward]]
forward(sample: Tensor, sample_posterior: bool = False, return_dict: bool = True, generator: typing.Optional[torch.Generator] = None)
매개변수:
sample (torch.Tensor) : 입력 샘플.
sample_posterior (bool, 선택 사항, 기본값 False) : 사후 분포에서 샘플링할지 여부.
return_dict (bool, 선택 사항, 기본값 True) : 일반 튜플 대신 DecoderOutput를 반환할지 여부.
generator (torch.Generator, 선택 사항) : 샘플링을 결정적으로 만들기 위한 torch.Generator입니다.
반환값: ~models.vae.DecoderOutput 또는 tuple
return_dict가 True이면 ~models.vae.DecoderOutput가 반환되고, 그렇지 않으면 일반 tuple이 반환됩니다.
Xet Storage Details
- Size:
- 4.66 kB
- Xet hash:
- de5c5bc79cf78a39e378e240881df2fa040c99d406a92238934e182b652d5372
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.