Buckets:
| import{s as de,n as ie,o as ue}from"../chunks/scheduler.53228c21.js";import{S as me,i as ce,e as d,s as a,c as m,h as pe,a as i,d as o,b as s,f as C,g as c,j as O,k as G,l as p,m as n,n as f,t as g,o as h,p as _}from"../chunks/index.cac5d66a.js";import{C as fe}from"../chunks/CopyLLMTxtMenu.d3355f38.js";import{D as q}from"../chunks/Docstring.41979c71.js";import{C as ge}from"../chunks/CodeBlock.606cbaf4.js";import{H as le,E as he}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e4b76f09.js";function _e(ee){let u,I,Z,J,$,V,v,D,b,te='The 3D variational autoencoder (VAE) model with KL loss used in <a href="https://huggingface.co/Lightricks/LTX-2" rel="nofollow">LTX-2</a> was introduced by Lightricks. This is for encoding and decoding audio latent representations.',H,L,oe="The model can be loaded with the following code snippet.",N,T,P,A,R,r,x,S,X,re="LTX2 audio VAE for encoding and decoding audio latent representations.",B,j,y,Y,K,M,Q,E,w,W,k,z,F,U;return $=new fe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),v=new le({props:{title:"AutoencoderKLLTX2Audio",local:"autoencoderklltx2audio",headingTag:"h1"}}),T=new ge({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0xMVFgyQXVkaW8lMEElMEF2YWUlMjAlM0QlMjBBdXRvZW5jb2RlcktMTFRYMkF1ZGlvLmZyb21fcHJldHJhaW5lZCglMjJMaWdodHJpY2tzJTJGTFRYLTIlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ2YWUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MzIpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKLLTX2Audio | |
| vae = AutoencoderKLLTX2Audio.from_pretrained(<span class="hljs-string">"Lightricks/LTX-2"</span>, subfolder=<span class="hljs-string">"vae"</span>, torch_dtype=torch.float32).to(<span class="hljs-string">"cuda"</span>)`,lang:"python",wrap:!1}}),A=new le({props:{title:"AutoencoderKLLTX2Audio",local:"diffusers.AutoencoderKLLTX2Audio",headingTag:"h2"}}),x=new q({props:{name:"class diffusers.AutoencoderKLLTX2Audio",anchor:"diffusers.AutoencoderKLLTX2Audio",parameters:[{name:"base_channels",val:": int = 128"},{name:"output_channels",val:": int = 2"},{name:"ch_mult",val:": tuple = (1, 2, 4)"},{name:"num_res_blocks",val:": int = 2"},{name:"attn_resolutions",val:": tuple[int, ...] | None = None"},{name:"in_channels",val:": int = 2"},{name:"resolution",val:": int = 256"},{name:"latent_channels",val:": int = 8"},{name:"norm_type",val:": str = 'pixel'"},{name:"causality_axis",val:": str | None = 'height'"},{name:"dropout",val:": float = 0.0"},{name:"mid_block_add_attention",val:": bool = False"},{name:"sample_rate",val:": int = 16000"},{name:"mel_hop_length",val:": int = 160"},{name:"is_causal",val:": bool = True"},{name:"mel_bins",val:": int | None = 64"},{name:"double_z",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_13803/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L668"}}),y=new q({props:{name:"encode",anchor:"diffusers.AutoencoderKLLTX2Audio.encode",parameters:[{name:"x",val:": Tensor"},{name:"return_dict",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_13803/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L759"}}),M=new q({props:{name:"decode",anchor:"diffusers.AutoencoderKLLTX2Audio.decode",parameters:[{name:"z",val:": Tensor"},{name:"return_dict",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/vr_13803/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L775"}}),w=new q({props:{name:"forward",anchor:"diffusers.AutoencoderKLLTX2Audio.forward",parameters:[{name:"sample",val:": Tensor"},{name:"sample_posterior",val:": bool = False"},{name:"return_dict",val:": bool = True"},{name:"generator",val:": torch._C.Generator | None = None"}],parametersDescription:[{anchor:"diffusers.AutoencoderKLLTX2Audio.forward.sample",description:"<strong>sample</strong> (<code>torch.Tensor</code>) — Input sample.",name:"sample"},{anchor:"diffusers.AutoencoderKLLTX2Audio.forward.sample_posterior",description:`<strong>sample_posterior</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to sample from the posterior.`,name:"sample_posterior"},{anchor:"diffusers.AutoencoderKLLTX2Audio.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>DecoderOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.AutoencoderKLLTX2Audio.forward.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) — | |
| A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make sampling | |
| deterministic.`,name:"generator"}],source:"https://github.com/huggingface/diffusers/blob/vr_13803/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L788"}}),k=new he({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/autoencoderkl_audio_ltx_2.md"}}),{c(){u=d("meta"),I=a(),Z=d("p"),J=a(),m($.$$.fragment),V=a(),m(v.$$.fragment),D=a(),b=d("p"),b.innerHTML=te,H=a(),L=d("p"),L.textContent=oe,N=a(),m(T.$$.fragment),P=a(),m(A.$$.fragment),R=a(),r=d("div"),m(x.$$.fragment),S=a(),X=d("p"),X.textContent=re,B=a(),j=d("div"),m(y.$$.fragment),Y=a(),K=d("div"),m(M.$$.fragment),Q=a(),E=d("div"),m(w.$$.fragment),W=a(),m(k.$$.fragment),z=a(),F=d("p"),this.h()},l(e){const t=pe("svelte-u9bgzb",document.head);u=i(t,"META",{name:!0,content:!0}),t.forEach(o),I=s(e),Z=i(e,"P",{}),C(Z).forEach(o),J=s(e),c($.$$.fragment,e),V=s(e),c(v.$$.fragment,e),D=s(e),b=i(e,"P",{"data-svelte-h":!0}),O(b)!=="svelte-18cc776"&&(b.innerHTML=te),H=s(e),L=i(e,"P",{"data-svelte-h":!0}),O(L)!=="svelte-1vuni30"&&(L.textContent=oe),N=s(e),c(T.$$.fragment,e),P=s(e),c(A.$$.fragment,e),R=s(e),r=i(e,"DIV",{class:!0});var l=C(r);c(x.$$.fragment,l),S=s(l),X=i(l,"P",{"data-svelte-h":!0}),O(X)!=="svelte-1jflaji"&&(X.textContent=re),B=s(l),j=i(l,"DIV",{class:!0});var ne=C(j);c(y.$$.fragment,ne),ne.forEach(o),Y=s(l),K=i(l,"DIV",{class:!0});var ae=C(K);c(M.$$.fragment,ae),ae.forEach(o),Q=s(l),E=i(l,"DIV",{class:!0});var se=C(E);c(w.$$.fragment,se),se.forEach(o),l.forEach(o),W=s(e),c(k.$$.fragment,e),z=s(e),F=i(e,"P",{}),C(F).forEach(o),this.h()},h(){G(u,"name","hf:doc:metadata"),G(u,"content",$e),G(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(r,"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,t){p(document.head,u),n(e,I,t),n(e,Z,t),n(e,J,t),f($,e,t),n(e,V,t),f(v,e,t),n(e,D,t),n(e,b,t),n(e,H,t),n(e,L,t),n(e,N,t),f(T,e,t),n(e,P,t),f(A,e,t),n(e,R,t),n(e,r,t),f(x,r,null),p(r,S),p(r,X),p(r,B),p(r,j),f(y,j,null),p(r,Y),p(r,K),f(M,K,null),p(r,Q),p(r,E),f(w,E,null),n(e,W,t),f(k,e,t),n(e,z,t),n(e,F,t),U=!0},p:ie,i(e){U||(g($.$$.fragment,e),g(v.$$.fragment,e),g(T.$$.fragment,e),g(A.$$.fragment,e),g(x.$$.fragment,e),g(y.$$.fragment,e),g(M.$$.fragment,e),g(w.$$.fragment,e),g(k.$$.fragment,e),U=!0)},o(e){h($.$$.fragment,e),h(v.$$.fragment,e),h(T.$$.fragment,e),h(A.$$.fragment,e),h(x.$$.fragment,e),h(y.$$.fragment,e),h(M.$$.fragment,e),h(w.$$.fragment,e),h(k.$$.fragment,e),U=!1},d(e){e&&(o(I),o(Z),o(J),o(V),o(D),o(b),o(H),o(L),o(N),o(P),o(R),o(r),o(W),o(z),o(F)),o(u),_($,e),_(v,e),_(T,e),_(A,e),_(x),_(y),_(M),_(w),_(k,e)}}}const $e='{"title":"AutoencoderKLLTX2Audio","local":"autoencoderklltx2audio","sections":[{"title":"AutoencoderKLLTX2Audio","local":"diffusers.AutoencoderKLLTX2Audio","sections":[],"depth":2}],"depth":1}';function ve(ee){return ue(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Me extends me{constructor(u){super(),ce(this,u,ve,_e,de,{})}}export{Me as component}; | |
Xet Storage Details
- Size:
- 8.12 kB
- Xet hash:
- db9721cd464689555fc4eabeb5815f6a46bc8d697df71a72afacc52238b32a53
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.