Buckets:

HuggingFaceDocBuilder's picture
download
raw
8.04 kB
import{s as ie,n as de,o as me}from"../chunks/scheduler.53228c21.js";import{S as ue,i as ce,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 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.100fac89.js";import{C as fe}from"../chunks/CopyLLMTxtMenu.f7e332d5.js";import{D as z}from"../chunks/Docstring.8934f3ee.js";import{C as ge}from"../chunks/CodeBlock.0adb3827.js";import{H as le,E as he}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.b70fb789.js";function $e(ee){let m,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,w,S,X,re="LTX2 audio VAE for encoding and decoding audio latent representations.",B,j,y,Y,K,x,Q,E,M,W,k,U,F,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"}}),w=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_13769/src/diffusers/models/autoencoders/autoencoder_kl_ltx2_audio.py#L668"}}),y=new z({props:{name:"wrapper",anchor:"diffusers.AutoencoderKLLTX2Audio.encode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/utils/accelerate_utils.py#L43"}}),x=new z({props:{name:"wrapper",anchor:"diffusers.AutoencoderKLLTX2Audio.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/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_13769/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(){m=i("meta"),I=a(),Z=i("p"),J=a(),u(_.$$.fragment),V=a(),u(v.$$.fragment),D=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(w.$$.fragment),S=a(),X=i("p"),X.textContent=re,B=a(),j=i("div"),u(y.$$.fragment),Y=a(),K=i("div"),u(x.$$.fragment),Q=a(),E=i("div"),u(M.$$.fragment),W=a(),u(k.$$.fragment),U=a(),F=i("p"),this.h()},l(e){const t=pe("svelte-u9bgzb",document.head);m=d(t,"META",{name:!0,content:!0}),t.forEach(o),I=s(e),Z=d(e,"P",{}),C(Z).forEach(o),J=s(e),c(_.$$.fragment,e),V=s(e),c(v.$$.fragment,e),D=s(e),b=d(e,"P",{"data-svelte-h":!0}),O(b)!=="svelte-18cc776"&&(b.innerHTML=te),H=s(e),L=d(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=d(e,"DIV",{class:!0});var l=C(r);c(w.$$.fragment,l),S=s(l),X=d(l,"P",{"data-svelte-h":!0}),O(X)!=="svelte-1jflaji"&&(X.textContent=re),B=s(l),j=d(l,"DIV",{class:!0});var ne=C(j);c(y.$$.fragment,ne),ne.forEach(o),Y=s(l),K=d(l,"DIV",{class:!0});var ae=C(K);c(x.$$.fragment,ae),ae.forEach(o),Q=s(l),E=d(l,"DIV",{class:!0});var se=C(E);c(M.$$.fragment,se),se.forEach(o),l.forEach(o),W=s(e),c(k.$$.fragment,e),U=s(e),F=d(e,"P",{}),C(F).forEach(o),this.h()},h(){G(m,"name","hf:doc:metadata"),G(m,"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,m),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(w,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(x,K,null),p(r,Q),p(r,E),f(M,E,null),n(e,W,t),f(k,e,t),n(e,U,t),n(e,F,t),q=!0},p:de,i(e){q||(g(_.$$.fragment,e),g(v.$$.fragment,e),g(T.$$.fragment,e),g(A.$$.fragment,e),g(w.$$.fragment,e),g(y.$$.fragment,e),g(x.$$.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(w.$$.fragment,e),h(y.$$.fragment,e),h(x.$$.fragment,e),h(M.$$.fragment,e),h(k.$$.fragment,e),q=!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(U),o(F)),o(m),$(_,e),$(v,e),$(T,e),$(A,e),$(w),$(y),$(x),$(M),$(k,e)}}}const _e='{"title":"AutoencoderKLLTX2Audio","local":"autoencoderklltx2audio","sections":[{"title":"AutoencoderKLLTX2Audio","local":"diffusers.AutoencoderKLLTX2Audio","sections":[],"depth":2}],"depth":1}';function ve(ee){return me(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xe extends ue{constructor(m){super(),ce(this,m,ve,$e,ie,{})}}export{xe as component};

Xet Storage Details

Size:
8.04 kB
·
Xet hash:
7eaaa38f39ed06ff64b0a424a1e56d7897593e44f1765a727c7327022b41db83

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