import{s as Ze,n as et,o as tt}from"../chunks/scheduler.53228c21.js";import{S as ot,i as nt,e as d,s as n,c as u,h as rt,a as i,d as t,b as r,f as b,g as m,j as _,k as $,l as s,m as a,n as f,t as p,o as g,p as h}from"../chunks/index.100fac89.js";import{C as st}from"../chunks/CopyLLMTxtMenu.4f0519ef.js";import{D as x}from"../chunks/Docstring.d02a9fa5.js";import{H as re,E as at}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.62dbb7c4.js";function dt(qe){let v,se,oe,ae,D,de,T,ie,C,Ge='The Oobleck variational autoencoder (VAE) model with KL loss was introduced in <a href="https://github.com/Stability-AI/stable-audio-tools" rel="nofollow">Stability-AI/stable-audio-tools</a> and <a href="https://huggingface.co/papers/2407.14358" rel="nofollow">Stable Audio Open</a> by Stability AI. The model is used in 🤗 Diffusers to encode audio waveforms into latents and to decode latent representations into audio waveforms.',le,E,Fe="The abstract from the paper is:",ce,L,je="<em>Open generative models are vitally important for the community, allowing for fine-tunes and serving as baselines when presenting new models. However, most current text-to-audio models are private and not accessible for artists and researchers to build upon. Here we describe the architecture and training process of a new open-weights text-to-audio model trained with Creative Commons data. Our evaluation shows that the model’s performance is competitive with the state-of-the-art across various metrics. Notably, the reported FDopenl3 results (measuring the realism of the generations) showcase its potential for high-quality stereo sound synthesis at 44.1kHz.</em>",ue,I,me,l,M,De,K,Ne=`An autoencoder for encoding waveforms into latents and decoding latent representations into waveforms. First
introduced in Stable Audio.`,Te,U,We=`This model inherits from <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin">ModelMixin</a>. Check the superclass documentation for it’s generic methods implemented
for all models (such as downloading or saving).`,Ce,B,P,Ee,J,z,Le,y,H,Ie,Q,Re=`Disable sliced VAE decoding. If <code>enable_slicing</code> was previously enabled, this method will go back to computing
decoding in one step.`,Me,A,V,Pe,X,Ke=`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.`,ze,Y,S,fe,q,pe,k,G,He,Z,Ue="Output of decoding method.",ge,F,he,O,j,Ve,ee,Be="Output of decoding method.",be,N,$e,w,W,Se,te,Je="Output of AutoencoderOobleck encoding method.",_e,R,ve,ne,ke;return D=new st({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),T=new re({props:{title:"AutoencoderOobleck",local:"autoencoderoobleck",headingTag:"h1"}}),I=new re({props:{title:"AutoencoderOobleck",local:"diffusers.AutoencoderOobleck",headingTag:"h2"}}),M=new x({props:{name:"class diffusers.AutoencoderOobleck",anchor:"diffusers.AutoencoderOobleck",parameters:[{name:"encoder_hidden_size",val:" = 128"},{name:"downsampling_ratios",val:" = [2, 4, 4, 8, 8]"},{name:"channel_multiples",val:" = [1, 2, 4, 8, 16]"},{name:"decoder_channels",val:" = 128"},{name:"decoder_input_channels",val:" = 64"},{name:"audio_channels",val:" = 2"},{name:"sampling_rate",val:" = 44100"}],parametersDescription:[{anchor:"diffusers.AutoencoderOobleck.encoder_hidden_size",description:`<strong>encoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Intermediate representation dimension for the encoder.`,name:"encoder_hidden_size"},{anchor:"diffusers.AutoencoderOobleck.downsampling_ratios",description:`<strong>downsampling_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 4, 4, 8, 8]</code>) &#x2014;
Ratios for downsampling in the encoder. These are used in reverse order for upsampling in the decoder.`,name:"downsampling_ratios"},{anchor:"diffusers.AutoencoderOobleck.channel_multiples",description:`<strong>channel_multiples</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 4, 8, 16]</code>) &#x2014;
Multiples used to determine the hidden sizes of the hidden layers.`,name:"channel_multiples"},{anchor:"diffusers.AutoencoderOobleck.decoder_channels",description:`<strong>decoder_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Intermediate representation dimension for the decoder.`,name:"decoder_channels"},{anchor:"diffusers.AutoencoderOobleck.decoder_input_channels",description:`<strong>decoder_input_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Input dimension for the decoder. Corresponds to the latent dimension.`,name:"decoder_input_channels"},{anchor:"diffusers.AutoencoderOobleck.audio_channels",description:`<strong>audio_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of channels in the audio data. Either 1 for mono or 2 for stereo.`,name:"audio_channels"},{anchor:"diffusers.AutoencoderOobleck.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 44100) &#x2014;
The sampling rate at which the audio waveform should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L294"}}),P=new x({props:{name:"wrapper",anchor:"diffusers.AutoencoderOobleck.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/accelerate_utils.py#L43"}}),z=new x({props:{name:"wrapper",anchor:"diffusers.AutoencoderOobleck.encode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/accelerate_utils.py#L43"}}),H=new x({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderOobleck.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L366"}}),V=new x({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderOobleck.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L359"}}),S=new x({props:{name:"forward",anchor:"diffusers.AutoencoderOobleck.forward",parameters:[{name:"sample",val:": Tensor"},{name:"sample_posterior",val:": bool = False"},{name:"return_dict",val:": bool = True"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],parametersDescription:[{anchor:"diffusers.AutoencoderOobleck.forward.sample",description:"<strong>sample</strong> (<code>torch.Tensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.AutoencoderOobleck.forward.sample_posterior",description:`<strong>sample_posterior</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to sample from the posterior.`,name:"sample_posterior"},{anchor:"diffusers.AutoencoderOobleck.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>OobleckDecoderOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L439"}}),q=new re({props:{title:"OobleckDecoderOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",headingTag:"h2"}}),G=new x({props:{name:"class diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",anchor:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",parameters:[{name:"sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, audio_channels, sequence_length)</code>) &#x2014;
The decoded output sample from the last layer of the model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L202"}}),F=new re({props:{title:"OobleckDecoderOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",headingTag:"h2"}}),j=new x({props:{name:"class diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",anchor:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",parameters:[{name:"sample",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, audio_channels, sequence_length)</code>) &#x2014;
The decoded output sample from the last layer of the model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L202"}}),N=new re({props:{title:"AutoencoderOobleckOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput",headingTag:"h2"}}),W=new x({props:{name:"class diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput",anchor:"diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput",parameters:[{name:"latent_dist",val:": OobleckDiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput.latent_dist",description:`<strong>latent_dist</strong> (<code>OobleckDiagonalGaussianDistribution</code>) &#x2014;
Encoded outputs of <code>Encoder</code> represented as the mean and standard deviation of
<code>OobleckDiagonalGaussianDistribution</code>. <code>OobleckDiagonalGaussianDistribution</code> allows for sampling latents
from the distribution.`,name:"latent_dist"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoders/autoencoder_oobleck.py#L187"}}),R=new at({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/autoencoder_oobleck.md"}}),{c(){v=d("meta"),se=n(),oe=d("p"),ae=n(),u(D.$$.fragment),de=n(),u(T.$$.fragment),ie=n(),C=d("p"),C.innerHTML=Ge,le=n(),E=d("p"),E.textContent=Fe,ce=n(),L=d("p"),L.innerHTML=je,ue=n(),u(I.$$.fragment),me=n(),l=d("div"),u(M.$$.fragment),De=n(),K=d("p"),K.textContent=Ne,Te=n(),U=d("p"),U.innerHTML=We,Ce=n(),B=d("div"),u(P.$$.fragment),Ee=n(),J=d("div"),u(z.$$.fragment),Le=n(),y=d("div"),u(H.$$.fragment),Ie=n(),Q=d("p"),Q.innerHTML=Re,Me=n(),A=d("div"),u(V.$$.fragment),Pe=n(),X=d("p"),X.textContent=Ke,ze=n(),Y=d("div"),u(S.$$.fragment),fe=n(),u(q.$$.fragment),pe=n(),k=d("div"),u(G.$$.fragment),He=n(),Z=d("p"),Z.textContent=Ue,ge=n(),u(F.$$.fragment),he=n(),O=d("div"),u(j.$$.fragment),Ve=n(),ee=d("p"),ee.textContent=Be,be=n(),u(N.$$.fragment),$e=n(),w=d("div"),u(W.$$.fragment),Se=n(),te=d("p"),te.textContent=Je,_e=n(),u(R.$$.fragment),ve=n(),ne=d("p"),this.h()},l(e){const o=rt("svelte-u9bgzb",document.head);v=i(o,"META",{name:!0,content:!0}),o.forEach(t),se=r(e),oe=i(e,"P",{}),b(oe).forEach(t),ae=r(e),m(D.$$.fragment,e),de=r(e),m(T.$$.fragment,e),ie=r(e),C=i(e,"P",{"data-svelte-h":!0}),_(C)!=="svelte-1fhkutu"&&(C.innerHTML=Ge),le=r(e),E=i(e,"P",{"data-svelte-h":!0}),_(E)!=="svelte-1cwsb16"&&(E.textContent=Fe),ce=r(e),L=i(e,"P",{"data-svelte-h":!0}),_(L)!=="svelte-1rfs7ni"&&(L.innerHTML=je),ue=r(e),m(I.$$.fragment,e),me=r(e),l=i(e,"DIV",{class:!0});var c=b(l);m(M.$$.fragment,c),De=r(c),K=i(c,"P",{"data-svelte-h":!0}),_(K)!=="svelte-qyq2gm"&&(K.textContent=Ne),Te=r(c),U=i(c,"P",{"data-svelte-h":!0}),_(U)!=="svelte-1hyu2ru"&&(U.innerHTML=We),Ce=r(c),B=i(c,"DIV",{class:!0});var Qe=b(B);m(P.$$.fragment,Qe),Qe.forEach(t),Ee=r(c),J=i(c,"DIV",{class:!0});var Xe=b(J);m(z.$$.fragment,Xe),Xe.forEach(t),Le=r(c),y=i(c,"DIV",{class:!0});var Oe=b(y);m(H.$$.fragment,Oe),Ie=r(Oe),Q=i(Oe,"P",{"data-svelte-h":!0}),_(Q)!=="svelte-189cc7b"&&(Q.innerHTML=Re),Oe.forEach(t),Me=r(c),A=i(c,"DIV",{class:!0});var we=b(A);m(V.$$.fragment,we),Pe=r(we),X=i(we,"P",{"data-svelte-h":!0}),_(X)!=="svelte-14bnrb6"&&(X.textContent=Ke),we.forEach(t),ze=r(c),Y=i(c,"DIV",{class:!0});var Ye=b(Y);m(S.$$.fragment,Ye),Ye.forEach(t),c.forEach(t),fe=r(e),m(q.$$.fragment,e),pe=r(e),k=i(e,"DIV",{class:!0});var xe=b(k);m(G.$$.fragment,xe),He=r(xe),Z=i(xe,"P",{"data-svelte-h":!0}),_(Z)!=="svelte-18u8upa"&&(Z.textContent=Ue),xe.forEach(t),ge=r(e),m(F.$$.fragment,e),he=r(e),O=i(e,"DIV",{class:!0});var ye=b(O);m(j.$$.fragment,ye),Ve=r(ye),ee=i(ye,"P",{"data-svelte-h":!0}),_(ee)!=="svelte-18u8upa"&&(ee.textContent=Be),ye.forEach(t),be=r(e),m(N.$$.fragment,e),$e=r(e),w=i(e,"DIV",{class:!0});var Ae=b(w);m(W.$$.fragment,Ae),Se=r(Ae),te=i(Ae,"P",{"data-svelte-h":!0}),_(te)!=="svelte-1deyjjw"&&(te.textContent=Je),Ae.forEach(t),_e=r(e),m(R.$$.fragment,e),ve=r(e),ne=i(e,"P",{}),b(ne).forEach(t),this.h()},h(){$(v,"name","hf:doc:metadata"),$(v,"content",it),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){s(document.head,v),a(e,se,o),a(e,oe,o),a(e,ae,o),f(D,e,o),a(e,de,o),f(T,e,o),a(e,ie,o),a(e,C,o),a(e,le,o),a(e,E,o),a(e,ce,o),a(e,L,o),a(e,ue,o),f(I,e,o),a(e,me,o),a(e,l,o),f(M,l,null),s(l,De),s(l,K),s(l,Te),s(l,U),s(l,Ce),s(l,B),f(P,B,null),s(l,Ee),s(l,J),f(z,J,null),s(l,Le),s(l,y),f(H,y,null),s(y,Ie),s(y,Q),s(l,Me),s(l,A),f(V,A,null),s(A,Pe),s(A,X),s(l,ze),s(l,Y),f(S,Y,null),a(e,fe,o),f(q,e,o),a(e,pe,o),a(e,k,o),f(G,k,null),s(k,He),s(k,Z),a(e,ge,o),f(F,e,o),a(e,he,o),a(e,O,o),f(j,O,null),s(O,Ve),s(O,ee),a(e,be,o),f(N,e,o),a(e,$e,o),a(e,w,o),f(W,w,null),s(w,Se),s(w,te),a(e,_e,o),f(R,e,o),a(e,ve,o),a(e,ne,o),ke=!0},p:et,i(e){ke||(p(D.$$.fragment,e),p(T.$$.fragment,e),p(I.$$.fragment,e),p(M.$$.fragment,e),p(P.$$.fragment,e),p(z.$$.fragment,e),p(H.$$.fragment,e),p(V.$$.fragment,e),p(S.$$.fragment,e),p(q.$$.fragment,e),p(G.$$.fragment,e),p(F.$$.fragment,e),p(j.$$.fragment,e),p(N.$$.fragment,e),p(W.$$.fragment,e),p(R.$$.fragment,e),ke=!0)},o(e){g(D.$$.fragment,e),g(T.$$.fragment,e),g(I.$$.fragment,e),g(M.$$.fragment,e),g(P.$$.fragment,e),g(z.$$.fragment,e),g(H.$$.fragment,e),g(V.$$.fragment,e),g(S.$$.fragment,e),g(q.$$.fragment,e),g(G.$$.fragment,e),g(F.$$.fragment,e),g(j.$$.fragment,e),g(N.$$.fragment,e),g(W.$$.fragment,e),g(R.$$.fragment,e),ke=!1},d(e){e&&(t(se),t(oe),t(ae),t(de),t(ie),t(C),t(le),t(E),t(ce),t(L),t(ue),t(me),t(l),t(fe),t(pe),t(k),t(ge),t(he),t(O),t(be),t($e),t(w),t(_e),t(ve),t(ne)),t(v),h(D,e),h(T,e),h(I,e),h(M),h(P),h(z),h(H),h(V),h(S),h(q,e),h(G),h(F,e),h(j),h(N,e),h(W),h(R,e)}}}const it='{"title":"AutoencoderOobleck","local":"autoencoderoobleck","sections":[{"title":"AutoencoderOobleck","local":"diffusers.AutoencoderOobleck","sections":[],"depth":2},{"title":"OobleckDecoderOutput","local":"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput","sections":[],"depth":2},{"title":"OobleckDecoderOutput","local":"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput","sections":[],"depth":2},{"title":"AutoencoderOobleckOutput","local":"diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput","sections":[],"depth":2}],"depth":1}';function lt(qe){return tt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gt extends ot{constructor(v){super(),nt(this,v,lt,dt,Ze,{})}}export{gt as component};
