Buckets:

download
raw
8.41 kB
import{s as ie,n as de,o as ce}from"../chunks/scheduler.53228c21.js";import{S as ue,i as me,e as i,s as a,c as u,h as pe,a as d,d as o,b as s,f as C,g as m,j as Q,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.0ef49226.js";import{D as z}from"../chunks/Docstring.9de32ff4.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.48d5cb47.js";function $e(ee){let c,Z,D,F,_,J,v,V,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,w,Y,K,y,O,E,M,W,k,U,I,q;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">&quot;Lightricks/LTX-2&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,lang:"python",wrap:!1}}),A=new le({props:{title:"AutoencoderKLLTX2Audio",local:"diffusers.AutoencoderKLLTX2Audio",headingTag:"h2"}}),x=new z({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_13921/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L668"}}),w=new z({props:{name:"wrapper",anchor:"diffusers.AutoencoderKLLTX2Audio.encode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/utils/accelerate_utils.py#L43"}}),y=new z({props:{name:"wrapper",anchor:"diffusers.AutoencoderKLLTX2Audio.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/utils/accelerate_utils.py#L43"}}),M=new z({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>) &#x2014; 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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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_13921/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L788",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>If <code>return_dict</code> is True, a <code>DecoderOutput</code> is returned, otherwise a plain <code>tuple</code> is returned.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>DecoderOutput</code> or <code>tuple</code></p>
`}}),k=new he({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/autoencoderkl_audio_ltx_2.md"}}),{c(){c=i("meta"),Z=a(),D=i("p"),F=a(),u(_.$$.fragment),J=a(),u(v.$$.fragment),V=a(),b=i("p"),b.innerHTML=te,H=a(),L=i("p"),L.textContent=oe,N=a(),u(T.$$.fragment),P=a(),u(A.$$.fragment),R=a(),r=i("div"),u(x.$$.fragment),S=a(),X=i("p"),X.textContent=re,B=a(),j=i("div"),u(w.$$.fragment),Y=a(),K=i("div"),u(y.$$.fragment),O=a(),E=i("div"),u(M.$$.fragment),W=a(),u(k.$$.fragment),U=a(),I=i("p"),this.h()},l(e){const t=pe("svelte-u9bgzb",document.head);c=d(t,"META",{name:!0,content:!0}),t.forEach(o),Z=s(e),D=d(e,"P",{}),C(D).forEach(o),F=s(e),m(_.$$.fragment,e),J=s(e),m(v.$$.fragment,e),V=s(e),b=d(e,"P",{"data-svelte-h":!0}),Q(b)!=="svelte-18cc776"&&(b.innerHTML=te),H=s(e),L=d(e,"P",{"data-svelte-h":!0}),Q(L)!=="svelte-1vuni30"&&(L.textContent=oe),N=s(e),m(T.$$.fragment,e),P=s(e),m(A.$$.fragment,e),R=s(e),r=d(e,"DIV",{class:!0});var l=C(r);m(x.$$.fragment,l),S=s(l),X=d(l,"P",{"data-svelte-h":!0}),Q(X)!=="svelte-1jflaji"&&(X.textContent=re),B=s(l),j=d(l,"DIV",{class:!0});var ne=C(j);m(w.$$.fragment,ne),ne.forEach(o),Y=s(l),K=d(l,"DIV",{class:!0});var ae=C(K);m(y.$$.fragment,ae),ae.forEach(o),O=s(l),E=d(l,"DIV",{class:!0});var se=C(E);m(M.$$.fragment,se),se.forEach(o),l.forEach(o),W=s(e),m(k.$$.fragment,e),U=s(e),I=d(e,"P",{}),C(I).forEach(o),this.h()},h(){G(c,"name","hf:doc:metadata"),G(c,"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,c),n(e,Z,t),n(e,D,t),n(e,F,t),f(_,e,t),n(e,J,t),f(v,e,t),n(e,V,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(w,j,null),p(r,Y),p(r,K),f(y,K,null),p(r,O),p(r,E),f(M,E,null),n(e,W,t),f(k,e,t),n(e,U,t),n(e,I,t),q=!0},p:de,i(e){q||(g(_.$$.fragment,e),g(v.$$.fragment,e),g(T.$$.fragment,e),g(A.$$.fragment,e),g(x.$$.fragment,e),g(w.$$.fragment,e),g(y.$$.fragment,e),g(M.$$.fragment,e),g(k.$$.fragment,e),q=!0)},o(e){h(_.$$.fragment,e),h(v.$$.fragment,e),h(T.$$.fragment,e),h(A.$$.fragment,e),h(x.$$.fragment,e),h(w.$$.fragment,e),h(y.$$.fragment,e),h(M.$$.fragment,e),h(k.$$.fragment,e),q=!1},d(e){e&&(o(Z),o(D),o(F),o(J),o(V),o(b),o(H),o(L),o(N),o(P),o(R),o(r),o(W),o(U),o(I)),o(c),$(_,e),$(v,e),$(T,e),$(A,e),$(x),$(w),$(y),$(M),$(k,e)}}}const _e='{"title":"AutoencoderKLLTX2Audio","local":"autoencoderklltx2audio","sections":[{"title":"AutoencoderKLLTX2Audio","local":"diffusers.AutoencoderKLLTX2Audio","sections":[],"depth":2}],"depth":1}';function ve(ee){return ce(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ye extends ue{constructor(c){super(),me(this,c,ve,$e,ie,{})}}export{ye as component};

Xet Storage Details

Size:
8.41 kB
·
Xet hash:
8dc8afbb148e93a352bc30ce3b122668be06f73bb2acab245d07ca7e7e9f2430

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.