import{S as $n,i as En,s as An,e as o,k as l,w as h,t as r,M as Mn,c as s,d as n,m as d,a,x as g,h as i,b as c,G as t,g as m,y as b,L as kn,q as y,o as _,B as v,v as Jn}from"../../../chunks/vendor-hf-doc-builder.js";import{D as k}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as wn}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ft}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Un(Lt){let w,Me,$,J,ce,G,Qe,ue,Oe,ke,T,He,X,Ke,et,oe,tt,nt,se,ot,st,Je,ae,at,Ue,N,xe,re,rt,Ze,C,Ve,E,U,fe,R,it,pe,lt,We,u,P,dt,me,ct,ut,x,ie,ft,pt,he,mt,ht,gt,q,bt,le,yt,_t,vt,Z,Y,Tt,F,wt,ge,$t,Et,At,V,L,Mt,z,kt,be,Jt,Ut,xt,W,Q,Zt,ye,Vt,Wt,I,O,It,_e,Dt,St,de,H,jt,D,K,Bt,ve,Gt,Xt,S,ee,Nt,Te,Ct,Ie,A,j,we,te,Rt,$e,Pt,De,M,ne,qt,Ee,Yt,Se;return G=new Ft({}),N=new wn({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMkMlMjBBdXRvZW5jb2RlclRpbnklMEElMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi0yLTEtYmFzZSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlLnZhZSUyMCUzRCUyMEF1dG9lbmNvZGVyVGlueS5mcm9tX3ByZXRyYWluZWQoJTIybWFkZWJ5b2xsaW4lMkZ0YWVzZCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMnNsaWNlJTIwb2YlMjBkZWxpY2lvdXMlMjBOZXclMjBZb3JrLXN0eWxlJTIwYmVycnklMjBjaGVlc2VjYWtlJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyNSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyY2hlZXNlY2FrZS5wbmclMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, AutoencoderTiny

pipe = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1-base&quot;</span>, torch_dtype=torch.float16
)
pipe.vae = AutoencoderTiny.from_pretrained(<span class="hljs-string">&quot;madebyollin/taesd&quot;</span>, torch_dtype=torch.float16)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;slice of delicious New York-style berry cheesecake&quot;</span>
image = pipe(prompt, num_inference_steps=<span class="hljs-number">25</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cheesecake.png&quot;</span>)`}}),C=new wn({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMkMlMjBBdXRvZW5jb2RlclRpbnklMEElMEFwaXBlJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSklMEFwaXBlLnZhZSUyMCUzRCUyMEF1dG9lbmNvZGVyVGlueS5mcm9tX3ByZXRyYWluZWQoJTIybWFkZWJ5b2xsaW4lMkZ0YWVzZHhsJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyc2xpY2UlMjBvZiUyMGRlbGljaW91cyUyME5ldyUyMFlvcmstc3R5bGUlMjBiZXJyeSUyMGNoZWVzZWNha2UlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDI1KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJjaGVlc2VjYWtlX3NkeGwucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, AutoencoderTiny

pipe = DiffusionPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, torch_dtype=torch.float16
)
pipe.vae = AutoencoderTiny.from_pretrained(<span class="hljs-string">&quot;madebyollin/taesdxl&quot;</span>, torch_dtype=torch.float16)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;slice of delicious New York-style berry cheesecake&quot;</span>
image = pipe(prompt, num_inference_steps=<span class="hljs-number">25</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cheesecake_sdxl.png&quot;</span>)`}}),R=new Ft({}),P=new k({props:{name:"class diffusers.AutoencoderTiny",anchor:"diffusers.AutoencoderTiny",parameters:[{name:"in_channels",val:" = 3"},{name:"out_channels",val:" = 3"},{name:"encoder_block_out_channels",val:": typing.Tuple[int] = (64, 64, 64, 64)"},{name:"decoder_block_out_channels",val:": typing.Tuple[int] = (64, 64, 64, 64)"},{name:"act_fn",val:": str = 'relu'"},{name:"latent_channels",val:": int = 4"},{name:"upsampling_scaling_factor",val:": int = 2"},{name:"num_encoder_blocks",val:": typing.Tuple[int] = (1, 3, 3, 3)"},{name:"num_decoder_blocks",val:": typing.Tuple[int] = (3, 3, 3, 1)"},{name:"latent_magnitude",val:": int = 3"},{name:"latent_shift",val:": float = 0.5"},{name:"force_upcast",val:": float = False"},{name:"scaling_factor",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.AutoencoderTiny.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.AutoencoderTiny.out_channels",description:"<strong>out_channels</strong> (<code>int</code>,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.AutoencoderTiny.encoder_block_out_channels",description:`<strong>encoder_block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(64, 64, 64, 64)</code>) &#x2014;
Tuple of integers representing the number of output channels for each encoder block. The length of the
tuple should be equal to the number of encoder blocks.`,name:"encoder_block_out_channels"},{anchor:"diffusers.AutoencoderTiny.decoder_block_out_channels",description:`<strong>decoder_block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(64, 64, 64, 64)</code>) &#x2014;
Tuple of integers representing the number of output channels for each decoder block. The length of the
tuple should be equal to the number of decoder blocks.`,name:"decoder_block_out_channels"},{anchor:"diffusers.AutoencoderTiny.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
Activation function to be used throughout the model.`,name:"act_fn"},{anchor:"diffusers.AutoencoderTiny.latent_channels",description:`<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of channels in the latent representation. The latent space acts as a compressed representation of
the input image.`,name:"latent_channels"},{anchor:"diffusers.AutoencoderTiny.upsampling_scaling_factor",description:`<strong>upsampling_scaling_factor</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Scaling factor for upsampling in the decoder. It determines the size of the output image during the
upsampling process.`,name:"upsampling_scaling_factor"},{anchor:"diffusers.AutoencoderTiny.num_encoder_blocks",description:`<strong>num_encoder_blocks</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(1, 3, 3, 3)</code>) &#x2014;
Tuple of integers representing the number of encoder blocks at each stage of the encoding process. The
length of the tuple should be equal to the number of stages in the encoder. Each stage has a different
number of encoder blocks.`,name:"num_encoder_blocks"},{anchor:"diffusers.AutoencoderTiny.num_decoder_blocks",description:`<strong>num_decoder_blocks</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(3, 3, 3, 1)</code>) &#x2014;
Tuple of integers representing the number of decoder blocks at each stage of the decoding process. The
length of the tuple should be equal to the number of stages in the decoder. Each stage has a different
number of decoder blocks.`,name:"num_decoder_blocks"},{anchor:"diffusers.AutoencoderTiny.latent_magnitude",description:`<strong>latent_magnitude</strong> (<code>float</code>, <em>optional</em>, defaults to 3.0) &#x2014;
Magnitude of the latent representation. This parameter scales the latent representation values to control
the extent of information preservation.`,name:"latent_magnitude"},{anchor:"diffusers.AutoencoderTiny.latent_shift",description:`<strong>latent_shift</strong> (float, <em>optional</em>, defaults to 0.5) &#x2014;
Shift applied to the latent representation. This parameter controls the center of the latent space.`,name:"latent_shift"},{anchor:"diffusers.AutoencoderTiny.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper. For this Autoencoder,
however, no such scaling factor was used, hence the value of 1.0 as the default.`,name:"scaling_factor"},{anchor:"diffusers.AutoencoderTiny.force_upcast",description:`<strong>force_upcast</strong> (<code>bool</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
If enabled it will force the VAE to run in float32 for high image resolution pipelines, such as SD-XL. VAE
can be fine-tuned / trained to a lower range without losing too much precision, in which case
<code>force_upcast</code> can be set to <code>False</code> (see this fp16-friendly
<a href="https://huggingface.co/madebyollin/sdxl-vae-fp16-fix" rel="nofollow">AutoEncoder</a>).`,name:"force_upcast"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L40"}}),Y=new k({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderTiny.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L168"}}),L=new k({props:{name:"disable_tiling",anchor:"diffusers.AutoencoderTiny.disable_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L183"}}),Q=new k({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderTiny.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L161"}}),O=new k({props:{name:"enable_tiling",anchor:"diffusers.AutoencoderTiny.enable_tiling",parameters:[{name:"use_tiling",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L175"}}),H=new k({props:{name:"forward",anchor:"diffusers.AutoencoderTiny.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderTiny.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.AutoencoderTiny.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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L321"}}),K=new k({props:{name:"scale_latents",anchor:"diffusers.AutoencoderTiny.scale_latents",parameters:[{name:"x",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L153"}}),ee=new k({props:{name:"unscale_latents",anchor:"diffusers.AutoencoderTiny.unscale_latents",parameters:[{name:"x",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L157"}}),te=new Ft({}),ne=new k({props:{name:"class diffusers.models.autoencoder_tiny.AutoencoderTinyOutput",anchor:"diffusers.models.autoencoder_tiny.AutoencoderTinyOutput",parameters:[{name:"latents",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.models.autoencoder_tiny.AutoencoderTinyOutput.latents",description:"<strong>latents</strong> (<code>torch.Tensor</code>) &#x2014; Encoded outputs of the <code>Encoder</code>.",name:"latents"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_tiny.py#L28"}}),{c(){w=o("meta"),Me=l(),$=o("h1"),J=o("a"),ce=o("span"),h(G.$$.fragment),Qe=l(),ue=o("span"),Oe=r("Tiny AutoEncoder"),ke=l(),T=o("p"),He=r("Tiny AutoEncoder for Stable Diffusion (TAESD) was introduced in "),X=o("a"),Ke=r("madebyollin/taesd"),et=r(" by Ollin Boer Bohan. It is a tiny distilled version of Stable Diffusion\u2019s VAE that can quickly decode the latents in a "),oe=o("a"),tt=r("StableDiffusionPipeline"),nt=r(" or "),se=o("a"),ot=r("StableDiffusionXLPipeline"),st=r(" almost instantly."),Je=l(),ae=o("p"),at=r("To use with Stable Diffusion v-2.1:"),Ue=l(),h(N.$$.fragment),xe=l(),re=o("p"),rt=r("To use with Stable Diffusion XL 1.0"),Ze=l(),h(C.$$.fragment),Ve=l(),E=o("h2"),U=o("a"),fe=o("span"),h(R.$$.fragment),it=l(),pe=o("span"),lt=r("AutoencoderTiny"),We=l(),u=o("div"),h(P.$$.fragment),dt=l(),me=o("p"),ct=r("A tiny distilled VAE model for encoding images into latents and decoding latent representations into images."),ut=l(),x=o("p"),ie=o("a"),ft=r("AutoencoderTiny"),pt=r(" is a wrapper around the original implementation of "),he=o("code"),mt=r("TAESD"),ht=r("."),gt=l(),q=o("p"),bt=r("This model inherits from "),le=o("a"),yt=r("ModelMixin"),_t=r(`. Check the superclass documentation for its generic methods implemented for
all models (such as downloading or saving).`),vt=l(),Z=o("div"),h(Y.$$.fragment),Tt=l(),F=o("p"),wt=r("Disable sliced VAE decoding. If "),ge=o("code"),$t=r("enable_slicing"),Et=r(` was previously enabled, this method will go back to computing
decoding in one step.`),At=l(),V=o("div"),h(L.$$.fragment),Mt=l(),z=o("p"),kt=r("Disable tiled VAE decoding. If "),be=o("code"),Jt=r("enable_tiling"),Ut=r(` was previously enabled, this method will go back to computing
decoding in one step.`),xt=l(),W=o("div"),h(Q.$$.fragment),Zt=l(),ye=o("p"),Vt=r(`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.`),Wt=l(),I=o("div"),h(O.$$.fragment),It=l(),_e=o("p"),Dt=r(`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`),St=l(),de=o("div"),h(H.$$.fragment),jt=l(),D=o("div"),h(K.$$.fragment),Bt=l(),ve=o("p"),Gt=r("raw latents -> [0, 1]"),Xt=l(),S=o("div"),h(ee.$$.fragment),Nt=l(),Te=o("p"),Ct=r("[0, 1] -> raw latents"),Ie=l(),A=o("h2"),j=o("a"),we=o("span"),h(te.$$.fragment),Rt=l(),$e=o("span"),Pt=r("AutoencoderTinyOutput"),De=l(),M=o("div"),h(ne.$$.fragment),qt=l(),Ee=o("p"),Yt=r("Output of AutoencoderTiny encoding method."),this.h()},l(e){const f=Mn('[data-svelte="svelte-1phssyn"]',document.head);w=s(f,"META",{name:!0,content:!0}),f.forEach(n),Me=d(e),$=s(e,"H1",{class:!0});var je=a($);J=s(je,"A",{id:!0,class:!0,href:!0});var zt=a(J);ce=s(zt,"SPAN",{});var Qt=a(ce);g(G.$$.fragment,Qt),Qt.forEach(n),zt.forEach(n),Qe=d(je),ue=s(je,"SPAN",{});var Ot=a(ue);Oe=i(Ot,"Tiny AutoEncoder"),Ot.forEach(n),je.forEach(n),ke=d(e),T=s(e,"P",{});var B=a(T);He=i(B,"Tiny AutoEncoder for Stable Diffusion (TAESD) was introduced in "),X=s(B,"A",{href:!0,rel:!0});var Ht=a(X);Ke=i(Ht,"madebyollin/taesd"),Ht.forEach(n),et=i(B," by Ollin Boer Bohan. It is a tiny distilled version of Stable Diffusion\u2019s VAE that can quickly decode the latents in a "),oe=s(B,"A",{href:!0});var Kt=a(oe);tt=i(Kt,"StableDiffusionPipeline"),Kt.forEach(n),nt=i(B," or "),se=s(B,"A",{href:!0});var en=a(se);ot=i(en,"StableDiffusionXLPipeline"),en.forEach(n),st=i(B," almost instantly."),B.forEach(n),Je=d(e),ae=s(e,"P",{});var tn=a(ae);at=i(tn,"To use with Stable Diffusion v-2.1:"),tn.forEach(n),Ue=d(e),g(N.$$.fragment,e),xe=d(e),re=s(e,"P",{});var nn=a(re);rt=i(nn,"To use with Stable Diffusion XL 1.0"),nn.forEach(n),Ze=d(e),g(C.$$.fragment,e),Ve=d(e),E=s(e,"H2",{class:!0});var Be=a(E);U=s(Be,"A",{id:!0,class:!0,href:!0});var on=a(U);fe=s(on,"SPAN",{});var sn=a(fe);g(R.$$.fragment,sn),sn.forEach(n),on.forEach(n),it=d(Be),pe=s(Be,"SPAN",{});var an=a(pe);lt=i(an,"AutoencoderTiny"),an.forEach(n),Be.forEach(n),We=d(e),u=s(e,"DIV",{class:!0});var p=a(u);g(P.$$.fragment,p),dt=d(p),me=s(p,"P",{});var rn=a(me);ct=i(rn,"A tiny distilled VAE model for encoding images into latents and decoding latent representations into images."),rn.forEach(n),ut=d(p),x=s(p,"P",{});var Ae=a(x);ie=s(Ae,"A",{href:!0});var ln=a(ie);ft=i(ln,"AutoencoderTiny"),ln.forEach(n),pt=i(Ae," is a wrapper around the original implementation of "),he=s(Ae,"CODE",{});var dn=a(he);mt=i(dn,"TAESD"),dn.forEach(n),ht=i(Ae,"."),Ae.forEach(n),gt=d(p),q=s(p,"P",{});var Ge=a(q);bt=i(Ge,"This model inherits from "),le=s(Ge,"A",{href:!0});var cn=a(le);yt=i(cn,"ModelMixin"),cn.forEach(n),_t=i(Ge,`. Check the superclass documentation for its generic methods implemented for
all models (such as downloading or saving).`),Ge.forEach(n),vt=d(p),Z=s(p,"DIV",{class:!0});var Xe=a(Z);g(Y.$$.fragment,Xe),Tt=d(Xe),F=s(Xe,"P",{});var Ne=a(F);wt=i(Ne,"Disable sliced VAE decoding. If "),ge=s(Ne,"CODE",{});var un=a(ge);$t=i(un,"enable_slicing"),un.forEach(n),Et=i(Ne,` was previously enabled, this method will go back to computing
decoding in one step.`),Ne.forEach(n),Xe.forEach(n),At=d(p),V=s(p,"DIV",{class:!0});var Ce=a(V);g(L.$$.fragment,Ce),Mt=d(Ce),z=s(Ce,"P",{});var Re=a(z);kt=i(Re,"Disable tiled VAE decoding. If "),be=s(Re,"CODE",{});var fn=a(be);Jt=i(fn,"enable_tiling"),fn.forEach(n),Ut=i(Re,` was previously enabled, this method will go back to computing
decoding in one step.`),Re.forEach(n),Ce.forEach(n),xt=d(p),W=s(p,"DIV",{class:!0});var Pe=a(W);g(Q.$$.fragment,Pe),Zt=d(Pe),ye=s(Pe,"P",{});var pn=a(ye);Vt=i(pn,`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.`),pn.forEach(n),Pe.forEach(n),Wt=d(p),I=s(p,"DIV",{class:!0});var qe=a(I);g(O.$$.fragment,qe),It=d(qe),_e=s(qe,"P",{});var mn=a(_e);Dt=i(mn,`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`),mn.forEach(n),qe.forEach(n),St=d(p),de=s(p,"DIV",{class:!0});var hn=a(de);g(H.$$.fragment,hn),hn.forEach(n),jt=d(p),D=s(p,"DIV",{class:!0});var Ye=a(D);g(K.$$.fragment,Ye),Bt=d(Ye),ve=s(Ye,"P",{});var gn=a(ve);Gt=i(gn,"raw latents -> [0, 1]"),gn.forEach(n),Ye.forEach(n),Xt=d(p),S=s(p,"DIV",{class:!0});var Fe=a(S);g(ee.$$.fragment,Fe),Nt=d(Fe),Te=s(Fe,"P",{});var bn=a(Te);Ct=i(bn,"[0, 1] -> raw latents"),bn.forEach(n),Fe.forEach(n),p.forEach(n),Ie=d(e),A=s(e,"H2",{class:!0});var Le=a(A);j=s(Le,"A",{id:!0,class:!0,href:!0});var yn=a(j);we=s(yn,"SPAN",{});var _n=a(we);g(te.$$.fragment,_n),_n.forEach(n),yn.forEach(n),Rt=d(Le),$e=s(Le,"SPAN",{});var vn=a($e);Pt=i(vn,"AutoencoderTinyOutput"),vn.forEach(n),Le.forEach(n),De=d(e),M=s(e,"DIV",{class:!0});var ze=a(M);g(ne.$$.fragment,ze),qt=d(ze),Ee=s(ze,"P",{});var Tn=a(Ee);Yt=i(Tn,"Output of AutoencoderTiny encoding method."),Tn.forEach(n),ze.forEach(n),this.h()},h(){c(w,"name","hf:doc:metadata"),c(w,"content",JSON.stringify(xn)),c(J,"id","tiny-autoencoder"),c(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(J,"href","#tiny-autoencoder"),c($,"class","relative group"),c(X,"href","https://github.com/madebyollin/taesd"),c(X,"rel","nofollow"),c(oe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),c(se,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/stable_diffusion_xl#diffusers.StableDiffusionXLPipeline"),c(U,"id","diffusers.AutoencoderTiny"),c(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(U,"href","#diffusers.AutoencoderTiny"),c(E,"class","relative group"),c(ie,"href","/docs/diffusers/main/en/api/models/autoencoder_tiny#diffusers.AutoencoderTiny"),c(le,"href","/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"id","diffusers.models.autoencoder_tiny.AutoencoderTinyOutput"),c(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(j,"href","#diffusers.models.autoencoder_tiny.AutoencoderTinyOutput"),c(A,"class","relative group"),c(M,"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,f){t(document.head,w),m(e,Me,f),m(e,$,f),t($,J),t(J,ce),b(G,ce,null),t($,Qe),t($,ue),t(ue,Oe),m(e,ke,f),m(e,T,f),t(T,He),t(T,X),t(X,Ke),t(T,et),t(T,oe),t(oe,tt),t(T,nt),t(T,se),t(se,ot),t(T,st),m(e,Je,f),m(e,ae,f),t(ae,at),m(e,Ue,f),b(N,e,f),m(e,xe,f),m(e,re,f),t(re,rt),m(e,Ze,f),b(C,e,f),m(e,Ve,f),m(e,E,f),t(E,U),t(U,fe),b(R,fe,null),t(E,it),t(E,pe),t(pe,lt),m(e,We,f),m(e,u,f),b(P,u,null),t(u,dt),t(u,me),t(me,ct),t(u,ut),t(u,x),t(x,ie),t(ie,ft),t(x,pt),t(x,he),t(he,mt),t(x,ht),t(u,gt),t(u,q),t(q,bt),t(q,le),t(le,yt),t(q,_t),t(u,vt),t(u,Z),b(Y,Z,null),t(Z,Tt),t(Z,F),t(F,wt),t(F,ge),t(ge,$t),t(F,Et),t(u,At),t(u,V),b(L,V,null),t(V,Mt),t(V,z),t(z,kt),t(z,be),t(be,Jt),t(z,Ut),t(u,xt),t(u,W),b(Q,W,null),t(W,Zt),t(W,ye),t(ye,Vt),t(u,Wt),t(u,I),b(O,I,null),t(I,It),t(I,_e),t(_e,Dt),t(u,St),t(u,de),b(H,de,null),t(u,jt),t(u,D),b(K,D,null),t(D,Bt),t(D,ve),t(ve,Gt),t(u,Xt),t(u,S),b(ee,S,null),t(S,Nt),t(S,Te),t(Te,Ct),m(e,Ie,f),m(e,A,f),t(A,j),t(j,we),b(te,we,null),t(A,Rt),t(A,$e),t($e,Pt),m(e,De,f),m(e,M,f),b(ne,M,null),t(M,qt),t(M,Ee),t(Ee,Yt),Se=!0},p:kn,i(e){Se||(y(G.$$.fragment,e),y(N.$$.fragment,e),y(C.$$.fragment,e),y(R.$$.fragment,e),y(P.$$.fragment,e),y(Y.$$.fragment,e),y(L.$$.fragment,e),y(Q.$$.fragment,e),y(O.$$.fragment,e),y(H.$$.fragment,e),y(K.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(ne.$$.fragment,e),Se=!0)},o(e){_(G.$$.fragment,e),_(N.$$.fragment,e),_(C.$$.fragment,e),_(R.$$.fragment,e),_(P.$$.fragment,e),_(Y.$$.fragment,e),_(L.$$.fragment,e),_(Q.$$.fragment,e),_(O.$$.fragment,e),_(H.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),Se=!1},d(e){n(w),e&&n(Me),e&&n($),v(G),e&&n(ke),e&&n(T),e&&n(Je),e&&n(ae),e&&n(Ue),v(N,e),e&&n(xe),e&&n(re),e&&n(Ze),v(C,e),e&&n(Ve),e&&n(E),v(R),e&&n(We),e&&n(u),v(P),v(Y),v(L),v(Q),v(O),v(H),v(K),v(ee),e&&n(Ie),e&&n(A),v(te),e&&n(De),e&&n(M),v(ne)}}}const xn={local:"tiny-autoencoder",sections:[{local:"diffusers.AutoencoderTiny",title:"AutoencoderTiny"},{local:"diffusers.models.autoencoder_tiny.AutoencoderTinyOutput",title:"AutoencoderTinyOutput"}],title:"Tiny AutoEncoder"};function Zn(Lt){return Jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sn extends $n{constructor(w){super();En(this,w,Zn,Un,An,{})}}export{Sn as default,xn as metadata};
