import{s as qe,n as Ge,o as Fe}from"../chunks/scheduler.53228c21.js";import{S as je,i as Ne,e as a,s as r,c,h as Re,a as d,d as t,b as s,f as O,g as u,j as w,k,l,m as n,n as m,t as f,o as p,p as h}from"../chunks/index.100fac89.js";import{C as We}from"../chunks/CopyLLMTxtMenu.fb2ec027.js";import{D as F}from"../chunks/Docstring.86a664ae.js";import{H as Y,E as Ke}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.09d4dba9.js";function Ue(Ae){let b,Z,Q,ee,x,te,D,oe,y,Te='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.',ne,A,Ce="The abstract from the paper is:",re,T,Le="<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>",se,C,ae,i,L,_e,j,Ee=`An autoencoder for encoding waveforms into latents and decoding latent representations into waveforms. First
introduced in Stable Audio.`,ve,N,Me=`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).`,Oe,R,E,ke,W,M,we,K,I,de,P,ie,$,z,xe,U,Ie="Output of decoding method.",le,H,ce,_,S,De,B,Pe="Output of decoding method.",ue,V,me,v,q,ye,J,ze="Output of AutoencoderOobleck encoding method.",fe,G,pe,X,he;return x=new We({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),D=new Y({props:{title:"AutoencoderOobleck",local:"autoencoderoobleck",headingTag:"h1"}}),C=new Y({props:{title:"AutoencoderOobleck",local:"diffusers.AutoencoderOobleck",headingTag:"h2"}}),L=new F({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#L295"}}),E=new F({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"}}),M=new F({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"}}),I=new F({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#L426"}}),P=new Y({props:{title:"OobleckDecoderOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",headingTag:"h2"}}),z=new F({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#L203"}}),H=new Y({props:{title:"OobleckDecoderOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.OobleckDecoderOutput",headingTag:"h2"}}),S=new F({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#L203"}}),V=new Y({props:{title:"AutoencoderOobleckOutput",local:"diffusers.models.autoencoders.autoencoder_oobleck.AutoencoderOobleckOutput",headingTag:"h2"}}),q=new F({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#L188"}}),G=new Ke({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/autoencoder_oobleck.md"}}),{c(){b=a("meta"),Z=r(),Q=a("p"),ee=r(),c(x.$$.fragment),te=r(),c(D.$$.fragment),oe=r(),y=a("p"),y.innerHTML=Te,ne=r(),A=a("p"),A.textContent=Ce,re=r(),T=a("p"),T.innerHTML=Le,se=r(),c(C.$$.fragment),ae=r(),i=a("div"),c(L.$$.fragment),_e=r(),j=a("p"),j.textContent=Ee,ve=r(),N=a("p"),N.innerHTML=Me,Oe=r(),R=a("div"),c(E.$$.fragment),ke=r(),W=a("div"),c(M.$$.fragment),we=r(),K=a("div"),c(I.$$.fragment),de=r(),c(P.$$.fragment),ie=r(),$=a("div"),c(z.$$.fragment),xe=r(),U=a("p"),U.textContent=Ie,le=r(),c(H.$$.fragment),ce=r(),_=a("div"),c(S.$$.fragment),De=r(),B=a("p"),B.textContent=Pe,ue=r(),c(V.$$.fragment),me=r(),v=a("div"),c(q.$$.fragment),ye=r(),J=a("p"),J.textContent=ze,fe=r(),c(G.$$.fragment),pe=r(),X=a("p"),this.h()},l(e){const o=Re("svelte-u9bgzb",document.head);b=d(o,"META",{name:!0,content:!0}),o.forEach(t),Z=s(e),Q=d(e,"P",{}),O(Q).forEach(t),ee=s(e),u(x.$$.fragment,e),te=s(e),u(D.$$.fragment,e),oe=s(e),y=d(e,"P",{"data-svelte-h":!0}),w(y)!=="svelte-1fhkutu"&&(y.innerHTML=Te),ne=s(e),A=d(e,"P",{"data-svelte-h":!0}),w(A)!=="svelte-1cwsb16"&&(A.textContent=Ce),re=s(e),T=d(e,"P",{"data-svelte-h":!0}),w(T)!=="svelte-1rfs7ni"&&(T.innerHTML=Le),se=s(e),u(C.$$.fragment,e),ae=s(e),i=d(e,"DIV",{class:!0});var g=O(i);u(L.$$.fragment,g),_e=s(g),j=d(g,"P",{"data-svelte-h":!0}),w(j)!=="svelte-qyq2gm"&&(j.textContent=Ee),ve=s(g),N=d(g,"P",{"data-svelte-h":!0}),w(N)!=="svelte-1hyu2ru"&&(N.innerHTML=Me),Oe=s(g),R=d(g,"DIV",{class:!0});var He=O(R);u(E.$$.fragment,He),He.forEach(t),ke=s(g),W=d(g,"DIV",{class:!0});var Se=O(W);u(M.$$.fragment,Se),Se.forEach(t),we=s(g),K=d(g,"DIV",{class:!0});var Ve=O(K);u(I.$$.fragment,Ve),Ve.forEach(t),g.forEach(t),de=s(e),u(P.$$.fragment,e),ie=s(e),$=d(e,"DIV",{class:!0});var ge=O($);u(z.$$.fragment,ge),xe=s(ge),U=d(ge,"P",{"data-svelte-h":!0}),w(U)!=="svelte-18u8upa"&&(U.textContent=Ie),ge.forEach(t),le=s(e),u(H.$$.fragment,e),ce=s(e),_=d(e,"DIV",{class:!0});var be=O(_);u(S.$$.fragment,be),De=s(be),B=d(be,"P",{"data-svelte-h":!0}),w(B)!=="svelte-18u8upa"&&(B.textContent=Pe),be.forEach(t),ue=s(e),u(V.$$.fragment,e),me=s(e),v=d(e,"DIV",{class:!0});var $e=O(v);u(q.$$.fragment,$e),ye=s($e),J=d($e,"P",{"data-svelte-h":!0}),w(J)!=="svelte-1deyjjw"&&(J.textContent=ze),$e.forEach(t),fe=s(e),u(G.$$.fragment,e),pe=s(e),X=d(e,"P",{}),O(X).forEach(t),this.h()},h(){k(b,"name","hf:doc:metadata"),k(b,"content",Be),k(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(i,"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"),k(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(v,"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){l(document.head,b),n(e,Z,o),n(e,Q,o),n(e,ee,o),m(x,e,o),n(e,te,o),m(D,e,o),n(e,oe,o),n(e,y,o),n(e,ne,o),n(e,A,o),n(e,re,o),n(e,T,o),n(e,se,o),m(C,e,o),n(e,ae,o),n(e,i,o),m(L,i,null),l(i,_e),l(i,j),l(i,ve),l(i,N),l(i,Oe),l(i,R),m(E,R,null),l(i,ke),l(i,W),m(M,W,null),l(i,we),l(i,K),m(I,K,null),n(e,de,o),m(P,e,o),n(e,ie,o),n(e,$,o),m(z,$,null),l($,xe),l($,U),n(e,le,o),m(H,e,o),n(e,ce,o),n(e,_,o),m(S,_,null),l(_,De),l(_,B),n(e,ue,o),m(V,e,o),n(e,me,o),n(e,v,o),m(q,v,null),l(v,ye),l(v,J),n(e,fe,o),m(G,e,o),n(e,pe,o),n(e,X,o),he=!0},p:Ge,i(e){he||(f(x.$$.fragment,e),f(D.$$.fragment,e),f(C.$$.fragment,e),f(L.$$.fragment,e),f(E.$$.fragment,e),f(M.$$.fragment,e),f(I.$$.fragment,e),f(P.$$.fragment,e),f(z.$$.fragment,e),f(H.$$.fragment,e),f(S.$$.fragment,e),f(V.$$.fragment,e),f(q.$$.fragment,e),f(G.$$.fragment,e),he=!0)},o(e){p(x.$$.fragment,e),p(D.$$.fragment,e),p(C.$$.fragment,e),p(L.$$.fragment,e),p(E.$$.fragment,e),p(M.$$.fragment,e),p(I.$$.fragment,e),p(P.$$.fragment,e),p(z.$$.fragment,e),p(H.$$.fragment,e),p(S.$$.fragment,e),p(V.$$.fragment,e),p(q.$$.fragment,e),p(G.$$.fragment,e),he=!1},d(e){e&&(t(Z),t(Q),t(ee),t(te),t(oe),t(y),t(ne),t(A),t(re),t(T),t(se),t(ae),t(i),t(de),t(ie),t($),t(le),t(ce),t(_),t(ue),t(me),t(v),t(fe),t(pe),t(X)),t(b),h(x,e),h(D,e),h(C,e),h(L),h(E),h(M),h(I),h(P,e),h(z),h(H,e),h(S),h(V,e),h(q),h(G,e)}}}const Be='{"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 Je(Ae){return Fe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tt extends je{constructor(b){super(),Ne(this,b,Je,Ue,qe,{})}}export{tt as component};
