Buckets:
AutoencoderKLLTX2Audio
LTX-2에서 KL 손실을 사용하여 적용된 3D 변분 오토인코더(VAE) 모델은 Lightricks에 의해 도입되었습니다. 이는 오디오 잠재 표현을 인코딩 및 디코딩하는 데 사용됩니다.
다음 코드 스니펫으로 모델을 로드할 수 있습니다.
from diffusers import AutoencoderKLLTX2Audio
vae = AutoencoderKLLTX2Audio.from_pretrained("Lightricks/LTX-2", subfolder="vae", dtype=torch.float32).to("cuda") # or "mps", "xpu", "cpu"
AutoencoderKLLTX2Audio[[diffusers.AutoencoderKLLTX2Audio]]
diffusers.AutoencoderKLLTX2Audio[[diffusers.AutoencoderKLLTX2Audio]]
diffusers.AutoencoderKLLTX2Audio(base_channels: int = 128, output_channels: int = 2, ch_mult: tuple = (1, 2, 4), num_res_blocks: int = 2, attn_resolutions: tuple[int, ...] | None = None, in_channels: int = 2, resolution: int = 256, latent_channels: int = 8, norm_type: str = 'pixel', causality_axis: str | None = 'height', dropout: float = 0.0, mid_block_add_attention: bool = False, sample_rate: int = 16000, mel_hop_length: int = 160, is_causal: bool = True, mel_bins: int | None = 64, double_z: bool = True)
오디오 잠재 표현을 인코딩 및 디코딩하는 LTX2 오디오 VAE입니다.
encode[[diffusers.AutoencoderKLLTX2Audio.encode]]
encode(x: Tensor, return_dict: bool = True)
decode[[diffusers.AutoencoderKLLTX2Audio.decode]]
decode(z: Tensor, return_dict: bool = True)
forward[[diffusers.AutoencoderKLLTX2Audio.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입니다.
반환값: DecoderOutput 또는 tuple
return_dict가 True이면 DecoderOutput가 반환되고, 그렇지 않으면 일반 tuple이 반환됩니다.
Xet Storage Details
- Size:
- 2.91 kB
- Xet hash:
- d0cb8b5d5de6a62706b1f0a6c254007d18c3d4b04315af6907b61dd3a9fd48f7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.