Diffusers 文件
AutoencoderOobleck
並獲得增強的文件體驗
開始使用
AutoencoderOobleck
Oobleck 變分自編碼器 (VAE) 模型,使用 KL 損失,由 Stability AI 在 Stability-AI/stable-audio-tools 和 Stable Audio Open 中引入。該模型在 🤗 Diffusers 中用於將音訊波形編碼為潛在變數,並將潛在表示解碼為音訊波形。
論文摘要如下:
開放式生成模型對社群至關重要,它們允許進行微調,並在展示新模型時作為基線。然而,目前大多數文字到音訊模型都是私有的,藝術家和研究人員無法在其基礎上進行構建。本文描述了一種使用知識共享資料訓練的新型開放權重文字到音訊模型的架構和訓練過程。我們的評估表明,該模型的效能在各種指標上與最先進的模型具有競爭力。值得注意的是,報告的 FDopenl3 結果(衡量生成作品的真實感)展示了其在 44.1kHz 下合成高質量立體聲的潛力。
AutoencoderOobleck
class diffusers.AutoencoderOobleck
< 原始碼 >( encoder_hidden_size = 128 downsampling_ratios = [2, 4, 4, 8, 8] channel_multiples = [1, 2, 4, 8, 16] decoder_channels = 128 decoder_input_channels = 64 audio_channels = 2 sampling_rate = 44100 )
引數
- encoder_hidden_size (
int
, 可選, 預設為 128) — 編碼器的中間表示維度。 - downsampling_ratios (
List[int]
, 可選, 預設為[2, 4, 4, 8, 8]
) — 編碼器中的下采樣比率。這些比率以相反的順序用於解碼器中的上取樣。 - channel_multiples (
List[int]
, 可選, 預設為[1, 2, 4, 8, 16]
) — 用於確定隱藏層隱藏尺寸的倍數。 - decoder_channels (
int
, 可選, 預設為 128) — 解碼器的中間表示維度。 - decoder_input_channels (
int
, 可選, 預設為 64) — 解碼器的輸入維度。對應於潛在維度。 - audio_channels (
int
, 可選, 預設為 2) — 音訊資料中的通道數。單聲道為 1,立體聲為 2。 - sampling_rate (
int
, 可選, 預設為 44100) — 音訊波形應以赫茲 (Hz) 表示的取樣率進行數字化。
用於將波形編碼為潛在變數並將潛在表示解碼為波形的自編碼器。首次在 Stable Audio 中引入。
此模型繼承自 ModelMixin。有關所有模型實現的通用方法(如下載或儲存),請參閱超類文件。
停用切片 VAE 解碼。如果之前啟用了 enable_slicing
,此方法將恢復一步計算解碼。
啟用切片 VAE 解碼。啟用此選項後,VAE 會將輸入張量分片,分步計算解碼。這有助於節省一些記憶體並允許更大的批次大小。
forward
< 原始碼 >( sample: Tensor sample_posterior: bool = False return_dict: bool = True generator: typing.Optional[torch._C.Generator] = None )
OobleckDecoderOutput
class diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput
< 原始碼 >( sample: Tensor )
解碼方法的輸出。
OobleckDecoderOutput
class diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput
< 原始碼 >( sample: Tensor )
解碼方法的輸出。
AutoencoderOobleckOutput
class diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput
< 原始碼 >( latent_dist: OobleckDiagonalGaussianDistribution )
AutoencoderOobleck 編碼方法的輸出。