import{S as Pn,i as On,s as Vn,e as r,k as i,w as m,t as d,M as In,c as s,d as o,m as l,a as n,x as h,h as c,b as a,G as e,g as f,y as g,L as zn,q as _,o as v,B as b,v as Mn}from"../../../chunks/vendor-hf-doc-builder.js";import{D as $}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Sn}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ae}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Nn(ys){let K,jt,T,j,et,ie,Po,tt,Oo,Wt,W,Vo,le,Io,zo,Jt,Ue,Mo,Rt,Ge,ot,So,Ut,F,J,rt,de,No,st,jo,Gt,y,Wo,Be,Jo,Ro,Ce,Uo,Go,nt,Bo,Co,Bt,ce,Ct,P,R,at,ue,Xo,it,Zo,Xt,p,fe,Ho,lt,Yo,qo,pe,Qo,Xe,er,tr,or,U,me,rr,he,sr,dt,nr,ar,ir,G,ge,lr,_e,dr,ct,cr,ur,fr,B,ve,pr,ut,mr,hr,C,be,gr,ft,_r,vr,Ze,Ae,br,X,we,Ar,pt,wr,$r,Z,$e,yr,mt,xr,Lr,H,ye,Er,ht,kr,Dr,D,xe,Kr,gt,Tr,Fr,_t,Pr,Zt,O,Y,vt,Le,Or,bt,Vr,Ht,V,Ee,Ir,At,zr,Yt,I,q,wt,ke,Mr,$t,Sr,qt,z,De,Nr,yt,jr,Qt,M,Q,xt,Ke,Wr,Lt,Jr,eo,w,Te,Rr,Et,Ur,Gr,Fe,Br,He,Cr,Xr,Zr,Pe,Hr,Oe,Yr,qr,Qr,kt,es,ts,L,Dt,Ve,os,rs,Kt,Ie,ss,ns,Tt,ze,as,is,Ft,Me,ls,to,S,ee,Pt,Se,ds,Ot,cs,oo,E,Ne,us,Vt,fs,ps,te,je,ms,It,hs,ro,N,oe,zt,We,gs,Mt,_s,so,k,Je,vs,St,bs,As,re,Re,ws,Nt,$s,no;return ie=new ae({}),de=new ae({}),ce=new Sn({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9lbmNvZGVyS0wlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGc3RhYmlsaXR5YWklMkZzZC12YWUtZnQtbXNlLW9yaWdpbmFsJTJGYmxvYiUyRm1haW4lMkZ2YWUtZnQtbXNlLTg0MDAwMC1lbWEtcHJ1bmVkLnNhZmV0ZW5zb3JzJTIyJTIwJTIwJTIzJTIwY2FuJTIwYWxzbyUyMGJlJTIwbG9jYWwlMjBmaWxlJTBBbW9kZWwlMjAlM0QlMjBBdXRvZW5jb2RlcktMLmZyb21fc2luZ2xlX2ZpbGUodXJsKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoencoderKL

url = <span class="hljs-string">&quot;https://huggingface.co/stabilityai/sd-vae-ft-mse-original/blob/main/vae-ft-mse-840000-ema-pruned.safetensors&quot;</span>  <span class="hljs-comment"># can also be local file</span>
model = AutoencoderKL.from_single_file(url)`}}),ue=new ae({}),fe=new $({props:{name:"class diffusers.AutoencoderKL",anchor:"diffusers.AutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"},{name:"force_upcast",val:": float = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.AutoencoderKL.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.AutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;DownEncoderBlock2D&quot;,)</code>) &#x2014;
Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.AutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpDecoderBlock2D&quot;,)</code>) &#x2014;
Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.AutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(64,)</code>) &#x2014;
Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.AutoencoderKL.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.AutoencoderKL.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.AutoencoderKL.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; Sample input size.",name:"sample_size"},{anchor:"diffusers.AutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#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.`,name:"scaling_factor"},{anchor:"diffusers.AutoencoderKL.force_upcast",description:`<strong>force_upcast</strong> (<code>bool</code>, <em>optional</em>, default to <code>True</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 loosing too much precision in which case
<code>force_upcast</code> can be set to <code>False</code> - see: <a href="https://huggingface.co/madebyollin/sdxl-vae-fp16-fix" rel="nofollow">https://huggingface.co/madebyollin/sdxl-vae-fp16-fix</a>`,name:"force_upcast"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L42"}}),me=new $({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderKL.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L159"}}),ge=new $({props:{name:"disable_tiling",anchor:"diffusers.AutoencoderKL.disable_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L145"}}),ve=new $({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderKL.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L152"}}),be=new $({props:{name:"enable_tiling",anchor:"diffusers.AutoencoderKL.enable_tiling",parameters:[{name:"use_tiling",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L137"}}),Ae=new $({props:{name:"forward",anchor:"diffusers.AutoencoderKL.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"sample_posterior",val:": bool = False"},{name:"return_dict",val:": bool = True"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.AutoencoderKL.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.AutoencoderKL.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_kl.py#L391"}}),we=new $({props:{name:"set_attn_processor",anchor:"diffusers.AutoencoderKL.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.XFormersAttnAddedKVProcessor, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.LoRAAttnProcessor2_0, diffusers.models.attention_processor.LoRAAttnAddedKVProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor]]]"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.set_attn_processor.processor",description:`<strong>processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or only <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
for <strong>all</strong> <code>Attention</code> layers.</p>
<p>If <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention
processor. This is strongly recommended when setting trainable attention processors.`,name:"processor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L192"}}),$e=new $({props:{name:"set_default_attn_processor",anchor:"diffusers.AutoencoderKL.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L227"}}),ye=new $({props:{name:"tiled_decode",anchor:"diffusers.AutoencoderKL.tiled_decode",parameters:[{name:"z",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.tiled_decode.z",description:"<strong>z</strong> (<code>torch.FloatTensor</code>) &#x2014; Input batch of latent vectors.",name:"z"},{anchor:"diffusers.AutoencoderKL.tiled_decode.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 <a href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.vae.DecoderOutput">DecoderOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L343",returnDescription:`
<p>If return_dict is True, a <a
  href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.vae.DecoderOutput"
>DecoderOutput</a> is returned, otherwise a plain <code>tuple</code> is
returned.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.vae.DecoderOutput"
>DecoderOutput</a> or <code>tuple</code></p>
`}}),xe=new $({props:{name:"tiled_encode",anchor:"diffusers.AutoencoderKL.tiled_encode",parameters:[{name:"x",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.tiled_encode.x",description:"<strong>x</strong> (<code>torch.FloatTensor</code>) &#x2014; Input batch of images.",name:"x"},{anchor:"diffusers.AutoencoderKL.tiled_encode.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 <a href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.autoencoder_kl.AutoencoderKLOutput">AutoencoderKLOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L289",returnDescription:`
<p>If return_dict is True, a <a
  href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.autoencoder_kl.AutoencoderKLOutput"
>AutoencoderKLOutput</a> is returned, otherwise a plain
<code>tuple</code> is returned.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/models/asymmetricautoencoderkl#diffusers.models.autoencoder_kl.AutoencoderKLOutput"
>AutoencoderKLOutput</a> or <code>tuple</code></p>
`}}),Le=new ae({}),Ee=new $({props:{name:"class diffusers.models.autoencoder_kl.AutoencoderKLOutput",anchor:"diffusers.models.autoencoder_kl.AutoencoderKLOutput",parameters:[{name:"latent_dist",val:": DiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.autoencoder_kl.AutoencoderKLOutput.latent_dist",description:`<strong>latent_dist</strong> (<code>DiagonalGaussianDistribution</code>) &#x2014;
Encoded outputs of <code>Encoder</code> represented as the mean and logvar of <code>DiagonalGaussianDistribution</code>.
<code>DiagonalGaussianDistribution</code> allows for sampling latents from the distribution.`,name:"latent_dist"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L29"}}),ke=new ae({}),De=new $({props:{name:"class diffusers.models.vae.DecoderOutput",anchor:"diffusers.models.vae.DecoderOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.vae.DecoderOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</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/vae.py#L27"}}),Ke=new ae({}),Te=new $({props:{name:"class diffusers.FlaxAutoencoderKL",anchor:"diffusers.FlaxAutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7f7e8da68220>"},{name:"name",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.FlaxAutoencoderKL.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.FlaxAutoencoderKL.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.FlaxAutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(DownEncoderBlock2D)</code>) &#x2014;
Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(UpDecoderBlock2D)</code>) &#x2014;
Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(64,)</code>) &#x2014;
Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <code>2</code>) &#x2014;
Number of ResNet layer for each block.`,name:"layers_per_block"},{anchor:"diffusers.FlaxAutoencoderKL.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>silu</code>) &#x2014;
The activation function to use.`,name:"act_fn"},{anchor:"diffusers.FlaxAutoencoderKL.latent_channels",description:`<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4</code>) &#x2014;
Number of channels in the latent space.`,name:"latent_channels"},{anchor:"diffusers.FlaxAutoencoderKL.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014;
The number of groups for normalization.`,name:"norm_num_groups"},{anchor:"diffusers.FlaxAutoencoderKL.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Sample input size.`,name:"sample_size"},{anchor:"diffusers.FlaxAutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#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.`,name:"scaling_factor"},{anchor:"diffusers.FlaxAutoencoderKL.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to <code>jnp.float32</code>) &#x2014;
The <code>dtype</code> of the parameters.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vae_flax.py#L721"}}),Se=new ae({}),Ne=new $({props:{name:"class diffusers.models.vae_flax.FlaxAutoencoderKLOutput",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput",parameters:[{name:"latent_dist",val:": FlaxDiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.latent_dist",description:`<strong>latent_dist</strong> (<code>FlaxDiagonalGaussianDistribution</code>) &#x2014;
Encoded outputs of <code>Encoder</code> represented as the mean and logvar of <code>FlaxDiagonalGaussianDistribution</code>.
<code>FlaxDiagonalGaussianDistribution</code> allows for sampling latents from the distribution.`,name:"latent_dist"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vae_flax.py#L48"}}),je=new $({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L111"}}),We=new ae({}),Je=new $({props:{name:"class diffusers.models.vae_flax.FlaxDecoderOutput",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput",parameters:[{name:"sample",val:": Array"}],parametersDescription:[{anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.sample",description:`<strong>sample</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
The decoded output sample from the last layer of the model.`,name:"sample"},{anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to <code>jnp.float32</code>) &#x2014;
The <code>dtype</code> of the parameters.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vae_flax.py#L33"}}),Re=new $({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L111"}}),{c(){K=r("meta"),jt=i(),T=r("h1"),j=r("a"),et=r("span"),m(ie.$$.fragment),Po=i(),tt=r("span"),Oo=d("AutoencoderKL"),Wt=i(),W=r("p"),Vo=d("The variational autoencoder (VAE) model with KL loss was introduced in "),le=r("a"),Io=d("Auto-Encoding Variational Bayes"),zo=d(" by Diederik P. Kingma and Max Welling. The model is used in \u{1F917} Diffusers to encode images into latents and to decode latent representations into images."),Jt=i(),Ue=r("p"),Mo=d("The abstract from the paper is:"),Rt=i(),Ge=r("p"),ot=r("em"),So=d("How can we perform efficient inference and learning in directed probabilistic models, in the presence of continuous latent variables with intractable posterior distributions, and large datasets? We introduce a stochastic variational inference and learning algorithm that scales to large datasets and, under some mild differentiability conditions, even works in the intractable case. Our contributions are two-fold. First, we show that a reparameterization of the variational lower bound yields a lower bound estimator that can be straightforwardly optimized using standard stochastic gradient methods. Second, we show that for i.i.d. datasets with continuous latent variables per datapoint, posterior inference can be made especially efficient by fitting an approximate inference model (also called a recognition model) to the intractable posterior using the proposed lower bound estimator. Theoretical advantages are reflected in experimental results."),Ut=i(),F=r("h2"),J=r("a"),rt=r("span"),m(de.$$.fragment),No=i(),st=r("span"),jo=d("Loading from the original format"),Gt=i(),y=r("p"),Wo=d("By default the "),Be=r("a"),Jo=d("AutoencoderKL"),Ro=d(" should be loaded with "),Ce=r("a"),Uo=d("from_pretrained()"),Go=d(`, but it can also be loaded
from the original format using `),nt=r("code"),Bo=d("FromOriginalVAEMixin.from_single_file"),Co=d(" as follows:"),Bt=i(),m(ce.$$.fragment),Ct=i(),P=r("h2"),R=r("a"),at=r("span"),m(ue.$$.fragment),Xo=i(),it=r("span"),Zo=d("AutoencoderKL"),Xt=i(),p=r("div"),m(fe.$$.fragment),Ho=i(),lt=r("p"),Yo=d("A VAE model with KL loss for encoding images into latents and decoding latent representations into images."),qo=i(),pe=r("p"),Qo=d("This model inherits from "),Xe=r("a"),er=d("ModelMixin"),tr=d(`. Check the superclass documentation for it\u2019s generic methods implemented
for all models (such as downloading or saving).`),or=i(),U=r("div"),m(me.$$.fragment),rr=i(),he=r("p"),sr=d("Disable sliced VAE decoding. If "),dt=r("code"),nr=d("enable_slicing"),ar=d(` was previously enabled, this method will go back to computing
decoding in one step.`),ir=i(),G=r("div"),m(ge.$$.fragment),lr=i(),_e=r("p"),dr=d("Disable tiled VAE decoding. If "),ct=r("code"),cr=d("enable_tiling"),ur=d(` was previously enabled, this method will go back to computing
decoding in one step.`),fr=i(),B=r("div"),m(ve.$$.fragment),pr=i(),ut=r("p"),mr=d(`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.`),hr=i(),C=r("div"),m(be.$$.fragment),gr=i(),ft=r("p"),_r=d(`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.`),vr=i(),Ze=r("div"),m(Ae.$$.fragment),br=i(),X=r("div"),m(we.$$.fragment),Ar=i(),pt=r("p"),wr=d("Sets the attention processor to use to compute attention."),$r=i(),Z=r("div"),m($e.$$.fragment),yr=i(),mt=r("p"),xr=d("Disables custom attention processors and sets the default attention implementation."),Lr=i(),H=r("div"),m(ye.$$.fragment),Er=i(),ht=r("p"),kr=d("Decode a batch of images using a tiled decoder."),Dr=i(),D=r("div"),m(xe.$$.fragment),Kr=i(),gt=r("p"),Tr=d("Encode a batch of images using a tiled encoder."),Fr=i(),_t=r("p"),Pr=d(`When this option is enabled, the VAE will split the input tensor into tiles to compute encoding in several
steps. This is useful to keep memory use constant regardless of image size. The end result of tiled encoding is
different from non-tiled encoding because each tile uses a different encoder. To avoid tiling artifacts, the
tiles overlap and are blended together to form a smooth output. You may still see tile-sized changes in the
output, but they should be much less noticeable.`),Zt=i(),O=r("h2"),Y=r("a"),vt=r("span"),m(Le.$$.fragment),Or=i(),bt=r("span"),Vr=d("AutoencoderKLOutput"),Ht=i(),V=r("div"),m(Ee.$$.fragment),Ir=i(),At=r("p"),zr=d("Output of AutoencoderKL encoding method."),Yt=i(),I=r("h2"),q=r("a"),wt=r("span"),m(ke.$$.fragment),Mr=i(),$t=r("span"),Sr=d("DecoderOutput"),qt=i(),z=r("div"),m(De.$$.fragment),Nr=i(),yt=r("p"),jr=d("Output of decoding method."),Qt=i(),M=r("h2"),Q=r("a"),xt=r("span"),m(Ke.$$.fragment),Wr=i(),Lt=r("span"),Jr=d("FlaxAutoencoderKL"),eo=i(),w=r("div"),m(Te.$$.fragment),Rr=i(),Et=r("p"),Ur=d("Flax implementation of a VAE model with KL loss for decoding latent representations."),Gr=i(),Fe=r("p"),Br=d("This model inherits from "),He=r("a"),Cr=d("FlaxModelMixin"),Xr=d(`. Check the superclass documentation for it\u2019s generic methods
implemented for all models (such as downloading or saving).`),Zr=i(),Pe=r("p"),Hr=d("This model is a Flax Linen "),Oe=r("a"),Yr=d("flax.linen.Module"),qr=d(`
subclass. Use it as a regular Flax Linen module and refer to the Flax documentation for all matter related to its
general usage and behavior.`),Qr=i(),kt=r("p"),es=d("Inherent JAX features such as the following are supported:"),ts=i(),L=r("ul"),Dt=r("li"),Ve=r("a"),os=d("Just-In-Time (JIT) compilation"),rs=i(),Kt=r("li"),Ie=r("a"),ss=d("Automatic Differentiation"),ns=i(),Tt=r("li"),ze=r("a"),as=d("Vectorization"),is=i(),Ft=r("li"),Me=r("a"),ls=d("Parallelization"),to=i(),S=r("h2"),ee=r("a"),Pt=r("span"),m(Se.$$.fragment),ds=i(),Ot=r("span"),cs=d("FlaxAutoencoderKLOutput"),oo=i(),E=r("div"),m(Ne.$$.fragment),us=i(),Vt=r("p"),fs=d("Output of AutoencoderKL encoding method."),ps=i(),te=r("div"),m(je.$$.fragment),ms=i(),It=r("p"),hs=d("\u201CReturns a new object replacing the specified fields with new values."),ro=i(),N=r("h2"),oe=r("a"),zt=r("span"),m(We.$$.fragment),gs=i(),Mt=r("span"),_s=d("FlaxDecoderOutput"),so=i(),k=r("div"),m(Je.$$.fragment),vs=i(),St=r("p"),bs=d("Output of decoding method."),As=i(),re=r("div"),m(Re.$$.fragment),ws=i(),Nt=r("p"),$s=d("\u201CReturns a new object replacing the specified fields with new values."),this.h()},l(t){const u=In('[data-svelte="svelte-1phssyn"]',document.head);K=s(u,"META",{name:!0,content:!0}),u.forEach(o),jt=l(t),T=s(t,"H1",{class:!0});var ao=n(T);j=s(ao,"A",{id:!0,class:!0,href:!0});var xs=n(j);et=s(xs,"SPAN",{});var Ls=n(et);h(ie.$$.fragment,Ls),Ls.forEach(o),xs.forEach(o),Po=l(ao),tt=s(ao,"SPAN",{});var Es=n(tt);Oo=c(Es,"AutoencoderKL"),Es.forEach(o),ao.forEach(o),Wt=l(t),W=s(t,"P",{});var io=n(W);Vo=c(io,"The variational autoencoder (VAE) model with KL loss was introduced in "),le=s(io,"A",{href:!0,rel:!0});var ks=n(le);Io=c(ks,"Auto-Encoding Variational Bayes"),ks.forEach(o),zo=c(io," by Diederik P. Kingma and Max Welling. The model is used in \u{1F917} Diffusers to encode images into latents and to decode latent representations into images."),io.forEach(o),Jt=l(t),Ue=s(t,"P",{});var Ds=n(Ue);Mo=c(Ds,"The abstract from the paper is:"),Ds.forEach(o),Rt=l(t),Ge=s(t,"P",{});var Ks=n(Ge);ot=s(Ks,"EM",{});var Ts=n(ot);So=c(Ts,"How can we perform efficient inference and learning in directed probabilistic models, in the presence of continuous latent variables with intractable posterior distributions, and large datasets? We introduce a stochastic variational inference and learning algorithm that scales to large datasets and, under some mild differentiability conditions, even works in the intractable case. Our contributions are two-fold. First, we show that a reparameterization of the variational lower bound yields a lower bound estimator that can be straightforwardly optimized using standard stochastic gradient methods. Second, we show that for i.i.d. datasets with continuous latent variables per datapoint, posterior inference can be made especially efficient by fitting an approximate inference model (also called a recognition model) to the intractable posterior using the proposed lower bound estimator. Theoretical advantages are reflected in experimental results."),Ts.forEach(o),Ks.forEach(o),Ut=l(t),F=s(t,"H2",{class:!0});var lo=n(F);J=s(lo,"A",{id:!0,class:!0,href:!0});var Fs=n(J);rt=s(Fs,"SPAN",{});var Ps=n(rt);h(de.$$.fragment,Ps),Ps.forEach(o),Fs.forEach(o),No=l(lo),st=s(lo,"SPAN",{});var Os=n(st);jo=c(Os,"Loading from the original format"),Os.forEach(o),lo.forEach(o),Gt=l(t),y=s(t,"P",{});var se=n(y);Wo=c(se,"By default the "),Be=s(se,"A",{href:!0});var Vs=n(Be);Jo=c(Vs,"AutoencoderKL"),Vs.forEach(o),Ro=c(se," should be loaded with "),Ce=s(se,"A",{href:!0});var Is=n(Ce);Uo=c(Is,"from_pretrained()"),Is.forEach(o),Go=c(se,`, but it can also be loaded
from the original format using `),nt=s(se,"CODE",{});var zs=n(nt);Bo=c(zs,"FromOriginalVAEMixin.from_single_file"),zs.forEach(o),Co=c(se," as follows:"),se.forEach(o),Bt=l(t),h(ce.$$.fragment,t),Ct=l(t),P=s(t,"H2",{class:!0});var co=n(P);R=s(co,"A",{id:!0,class:!0,href:!0});var Ms=n(R);at=s(Ms,"SPAN",{});var Ss=n(at);h(ue.$$.fragment,Ss),Ss.forEach(o),Ms.forEach(o),Xo=l(co),it=s(co,"SPAN",{});var Ns=n(it);Zo=c(Ns,"AutoencoderKL"),Ns.forEach(o),co.forEach(o),Xt=l(t),p=s(t,"DIV",{class:!0});var A=n(p);h(fe.$$.fragment,A),Ho=l(A),lt=s(A,"P",{});var js=n(lt);Yo=c(js,"A VAE model with KL loss for encoding images into latents and decoding latent representations into images."),js.forEach(o),qo=l(A),pe=s(A,"P",{});var uo=n(pe);Qo=c(uo,"This model inherits from "),Xe=s(uo,"A",{href:!0});var Ws=n(Xe);er=c(Ws,"ModelMixin"),Ws.forEach(o),tr=c(uo,`. Check the superclass documentation for it\u2019s generic methods implemented
for all models (such as downloading or saving).`),uo.forEach(o),or=l(A),U=s(A,"DIV",{class:!0});var fo=n(U);h(me.$$.fragment,fo),rr=l(fo),he=s(fo,"P",{});var po=n(he);sr=c(po,"Disable sliced VAE decoding. If "),dt=s(po,"CODE",{});var Js=n(dt);nr=c(Js,"enable_slicing"),Js.forEach(o),ar=c(po,` was previously enabled, this method will go back to computing
decoding in one step.`),po.forEach(o),fo.forEach(o),ir=l(A),G=s(A,"DIV",{class:!0});var mo=n(G);h(ge.$$.fragment,mo),lr=l(mo),_e=s(mo,"P",{});var ho=n(_e);dr=c(ho,"Disable tiled VAE decoding. If "),ct=s(ho,"CODE",{});var Rs=n(ct);cr=c(Rs,"enable_tiling"),Rs.forEach(o),ur=c(ho,` was previously enabled, this method will go back to computing
decoding in one step.`),ho.forEach(o),mo.forEach(o),fr=l(A),B=s(A,"DIV",{class:!0});var go=n(B);h(ve.$$.fragment,go),pr=l(go),ut=s(go,"P",{});var Us=n(ut);mr=c(Us,`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.`),Us.forEach(o),go.forEach(o),hr=l(A),C=s(A,"DIV",{class:!0});var _o=n(C);h(be.$$.fragment,_o),gr=l(_o),ft=s(_o,"P",{});var Gs=n(ft);_r=c(Gs,`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.`),Gs.forEach(o),_o.forEach(o),vr=l(A),Ze=s(A,"DIV",{class:!0});var Bs=n(Ze);h(Ae.$$.fragment,Bs),Bs.forEach(o),br=l(A),X=s(A,"DIV",{class:!0});var vo=n(X);h(we.$$.fragment,vo),Ar=l(vo),pt=s(vo,"P",{});var Cs=n(pt);wr=c(Cs,"Sets the attention processor to use to compute attention."),Cs.forEach(o),vo.forEach(o),$r=l(A),Z=s(A,"DIV",{class:!0});var bo=n(Z);h($e.$$.fragment,bo),yr=l(bo),mt=s(bo,"P",{});var Xs=n(mt);xr=c(Xs,"Disables custom attention processors and sets the default attention implementation."),Xs.forEach(o),bo.forEach(o),Lr=l(A),H=s(A,"DIV",{class:!0});var Ao=n(H);h(ye.$$.fragment,Ao),Er=l(Ao),ht=s(Ao,"P",{});var Zs=n(ht);kr=c(Zs,"Decode a batch of images using a tiled decoder."),Zs.forEach(o),Ao.forEach(o),Dr=l(A),D=s(A,"DIV",{class:!0});var Ye=n(D);h(xe.$$.fragment,Ye),Kr=l(Ye),gt=s(Ye,"P",{});var Hs=n(gt);Tr=c(Hs,"Encode a batch of images using a tiled encoder."),Hs.forEach(o),Fr=l(Ye),_t=s(Ye,"P",{});var Ys=n(_t);Pr=c(Ys,`When this option is enabled, the VAE will split the input tensor into tiles to compute encoding in several
steps. This is useful to keep memory use constant regardless of image size. The end result of tiled encoding is
different from non-tiled encoding because each tile uses a different encoder. To avoid tiling artifacts, the
tiles overlap and are blended together to form a smooth output. You may still see tile-sized changes in the
output, but they should be much less noticeable.`),Ys.forEach(o),Ye.forEach(o),A.forEach(o),Zt=l(t),O=s(t,"H2",{class:!0});var wo=n(O);Y=s(wo,"A",{id:!0,class:!0,href:!0});var qs=n(Y);vt=s(qs,"SPAN",{});var Qs=n(vt);h(Le.$$.fragment,Qs),Qs.forEach(o),qs.forEach(o),Or=l(wo),bt=s(wo,"SPAN",{});var en=n(bt);Vr=c(en,"AutoencoderKLOutput"),en.forEach(o),wo.forEach(o),Ht=l(t),V=s(t,"DIV",{class:!0});var $o=n(V);h(Ee.$$.fragment,$o),Ir=l($o),At=s($o,"P",{});var tn=n(At);zr=c(tn,"Output of AutoencoderKL encoding method."),tn.forEach(o),$o.forEach(o),Yt=l(t),I=s(t,"H2",{class:!0});var yo=n(I);q=s(yo,"A",{id:!0,class:!0,href:!0});var on=n(q);wt=s(on,"SPAN",{});var rn=n(wt);h(ke.$$.fragment,rn),rn.forEach(o),on.forEach(o),Mr=l(yo),$t=s(yo,"SPAN",{});var sn=n($t);Sr=c(sn,"DecoderOutput"),sn.forEach(o),yo.forEach(o),qt=l(t),z=s(t,"DIV",{class:!0});var xo=n(z);h(De.$$.fragment,xo),Nr=l(xo),yt=s(xo,"P",{});var nn=n(yt);jr=c(nn,"Output of decoding method."),nn.forEach(o),xo.forEach(o),Qt=l(t),M=s(t,"H2",{class:!0});var Lo=n(M);Q=s(Lo,"A",{id:!0,class:!0,href:!0});var an=n(Q);xt=s(an,"SPAN",{});var ln=n(xt);h(Ke.$$.fragment,ln),ln.forEach(o),an.forEach(o),Wr=l(Lo),Lt=s(Lo,"SPAN",{});var dn=n(Lt);Jr=c(dn,"FlaxAutoencoderKL"),dn.forEach(o),Lo.forEach(o),eo=l(t),w=s(t,"DIV",{class:!0});var x=n(w);h(Te.$$.fragment,x),Rr=l(x),Et=s(x,"P",{});var cn=n(Et);Ur=c(cn,"Flax implementation of a VAE model with KL loss for decoding latent representations."),cn.forEach(o),Gr=l(x),Fe=s(x,"P",{});var Eo=n(Fe);Br=c(Eo,"This model inherits from "),He=s(Eo,"A",{href:!0});var un=n(He);Cr=c(un,"FlaxModelMixin"),un.forEach(o),Xr=c(Eo,`. Check the superclass documentation for it\u2019s generic methods
implemented for all models (such as downloading or saving).`),Eo.forEach(o),Zr=l(x),Pe=s(x,"P",{});var ko=n(Pe);Hr=c(ko,"This model is a Flax Linen "),Oe=s(ko,"A",{href:!0,rel:!0});var fn=n(Oe);Yr=c(fn,"flax.linen.Module"),fn.forEach(o),qr=c(ko,`
subclass. Use it as a regular Flax Linen module and refer to the Flax documentation for all matter related to its
general usage and behavior.`),ko.forEach(o),Qr=l(x),kt=s(x,"P",{});var pn=n(kt);es=c(pn,"Inherent JAX features such as the following are supported:"),pn.forEach(o),ts=l(x),L=s(x,"UL",{});var ne=n(L);Dt=s(ne,"LI",{});var mn=n(Dt);Ve=s(mn,"A",{href:!0,rel:!0});var hn=n(Ve);os=c(hn,"Just-In-Time (JIT) compilation"),hn.forEach(o),mn.forEach(o),rs=l(ne),Kt=s(ne,"LI",{});var gn=n(Kt);Ie=s(gn,"A",{href:!0,rel:!0});var _n=n(Ie);ss=c(_n,"Automatic Differentiation"),_n.forEach(o),gn.forEach(o),ns=l(ne),Tt=s(ne,"LI",{});var vn=n(Tt);ze=s(vn,"A",{href:!0,rel:!0});var bn=n(ze);as=c(bn,"Vectorization"),bn.forEach(o),vn.forEach(o),is=l(ne),Ft=s(ne,"LI",{});var An=n(Ft);Me=s(An,"A",{href:!0,rel:!0});var wn=n(Me);ls=c(wn,"Parallelization"),wn.forEach(o),An.forEach(o),ne.forEach(o),x.forEach(o),to=l(t),S=s(t,"H2",{class:!0});var Do=n(S);ee=s(Do,"A",{id:!0,class:!0,href:!0});var $n=n(ee);Pt=s($n,"SPAN",{});var yn=n(Pt);h(Se.$$.fragment,yn),yn.forEach(o),$n.forEach(o),ds=l(Do),Ot=s(Do,"SPAN",{});var xn=n(Ot);cs=c(xn,"FlaxAutoencoderKLOutput"),xn.forEach(o),Do.forEach(o),oo=l(t),E=s(t,"DIV",{class:!0});var qe=n(E);h(Ne.$$.fragment,qe),us=l(qe),Vt=s(qe,"P",{});var Ln=n(Vt);fs=c(Ln,"Output of AutoencoderKL encoding method."),Ln.forEach(o),ps=l(qe),te=s(qe,"DIV",{class:!0});var Ko=n(te);h(je.$$.fragment,Ko),ms=l(Ko),It=s(Ko,"P",{});var En=n(It);hs=c(En,"\u201CReturns a new object replacing the specified fields with new values."),En.forEach(o),Ko.forEach(o),qe.forEach(o),ro=l(t),N=s(t,"H2",{class:!0});var To=n(N);oe=s(To,"A",{id:!0,class:!0,href:!0});var kn=n(oe);zt=s(kn,"SPAN",{});var Dn=n(zt);h(We.$$.fragment,Dn),Dn.forEach(o),kn.forEach(o),gs=l(To),Mt=s(To,"SPAN",{});var Kn=n(Mt);_s=c(Kn,"FlaxDecoderOutput"),Kn.forEach(o),To.forEach(o),so=l(t),k=s(t,"DIV",{class:!0});var Qe=n(k);h(Je.$$.fragment,Qe),vs=l(Qe),St=s(Qe,"P",{});var Tn=n(St);bs=c(Tn,"Output of decoding method."),Tn.forEach(o),As=l(Qe),re=s(Qe,"DIV",{class:!0});var Fo=n(re);h(Re.$$.fragment,Fo),ws=l(Fo),Nt=s(Fo,"P",{});var Fn=n(Nt);$s=c(Fn,"\u201CReturns a new object replacing the specified fields with new values."),Fn.forEach(o),Fo.forEach(o),Qe.forEach(o),this.h()},h(){a(K,"name","hf:doc:metadata"),a(K,"content",JSON.stringify(jn)),a(j,"id","autoencoderkl"),a(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"),a(j,"href","#autoencoderkl"),a(T,"class","relative group"),a(le,"href","https://arxiv.org/abs/1312.6114v11"),a(le,"rel","nofollow"),a(J,"id","loading-from-the-original-format"),a(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"),a(J,"href","#loading-from-the-original-format"),a(F,"class","relative group"),a(Be,"href","/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL"),a(Ce,"href","/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.from_pretrained"),a(R,"id","diffusers.AutoencoderKL"),a(R,"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"),a(R,"href","#diffusers.AutoencoderKL"),a(P,"class","relative group"),a(Xe,"href","/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin"),a(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Y,"id","diffusers.models.autoencoder_kl.AutoencoderKLOutput"),a(Y,"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"),a(Y,"href","#diffusers.models.autoencoder_kl.AutoencoderKLOutput"),a(O,"class","relative group"),a(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(q,"id","diffusers.models.vae.DecoderOutput"),a(q,"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"),a(q,"href","#diffusers.models.vae.DecoderOutput"),a(I,"class","relative group"),a(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Q,"id","diffusers.FlaxAutoencoderKL"),a(Q,"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"),a(Q,"href","#diffusers.FlaxAutoencoderKL"),a(M,"class","relative group"),a(He,"href","/docs/diffusers/main/en/api/models/overview#diffusers.FlaxModelMixin"),a(Oe,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),a(Oe,"rel","nofollow"),a(Ve,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),a(Ve,"rel","nofollow"),a(Ie,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),a(Ie,"rel","nofollow"),a(ze,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),a(ze,"rel","nofollow"),a(Me,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),a(Me,"rel","nofollow"),a(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ee,"id","diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),a(ee,"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"),a(ee,"href","#diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),a(S,"class","relative group"),a(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(oe,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),a(oe,"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"),a(oe,"href","#diffusers.models.vae_flax.FlaxDecoderOutput"),a(N,"class","relative group"),a(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,u){e(document.head,K),f(t,jt,u),f(t,T,u),e(T,j),e(j,et),g(ie,et,null),e(T,Po),e(T,tt),e(tt,Oo),f(t,Wt,u),f(t,W,u),e(W,Vo),e(W,le),e(le,Io),e(W,zo),f(t,Jt,u),f(t,Ue,u),e(Ue,Mo),f(t,Rt,u),f(t,Ge,u),e(Ge,ot),e(ot,So),f(t,Ut,u),f(t,F,u),e(F,J),e(J,rt),g(de,rt,null),e(F,No),e(F,st),e(st,jo),f(t,Gt,u),f(t,y,u),e(y,Wo),e(y,Be),e(Be,Jo),e(y,Ro),e(y,Ce),e(Ce,Uo),e(y,Go),e(y,nt),e(nt,Bo),e(y,Co),f(t,Bt,u),g(ce,t,u),f(t,Ct,u),f(t,P,u),e(P,R),e(R,at),g(ue,at,null),e(P,Xo),e(P,it),e(it,Zo),f(t,Xt,u),f(t,p,u),g(fe,p,null),e(p,Ho),e(p,lt),e(lt,Yo),e(p,qo),e(p,pe),e(pe,Qo),e(pe,Xe),e(Xe,er),e(pe,tr),e(p,or),e(p,U),g(me,U,null),e(U,rr),e(U,he),e(he,sr),e(he,dt),e(dt,nr),e(he,ar),e(p,ir),e(p,G),g(ge,G,null),e(G,lr),e(G,_e),e(_e,dr),e(_e,ct),e(ct,cr),e(_e,ur),e(p,fr),e(p,B),g(ve,B,null),e(B,pr),e(B,ut),e(ut,mr),e(p,hr),e(p,C),g(be,C,null),e(C,gr),e(C,ft),e(ft,_r),e(p,vr),e(p,Ze),g(Ae,Ze,null),e(p,br),e(p,X),g(we,X,null),e(X,Ar),e(X,pt),e(pt,wr),e(p,$r),e(p,Z),g($e,Z,null),e(Z,yr),e(Z,mt),e(mt,xr),e(p,Lr),e(p,H),g(ye,H,null),e(H,Er),e(H,ht),e(ht,kr),e(p,Dr),e(p,D),g(xe,D,null),e(D,Kr),e(D,gt),e(gt,Tr),e(D,Fr),e(D,_t),e(_t,Pr),f(t,Zt,u),f(t,O,u),e(O,Y),e(Y,vt),g(Le,vt,null),e(O,Or),e(O,bt),e(bt,Vr),f(t,Ht,u),f(t,V,u),g(Ee,V,null),e(V,Ir),e(V,At),e(At,zr),f(t,Yt,u),f(t,I,u),e(I,q),e(q,wt),g(ke,wt,null),e(I,Mr),e(I,$t),e($t,Sr),f(t,qt,u),f(t,z,u),g(De,z,null),e(z,Nr),e(z,yt),e(yt,jr),f(t,Qt,u),f(t,M,u),e(M,Q),e(Q,xt),g(Ke,xt,null),e(M,Wr),e(M,Lt),e(Lt,Jr),f(t,eo,u),f(t,w,u),g(Te,w,null),e(w,Rr),e(w,Et),e(Et,Ur),e(w,Gr),e(w,Fe),e(Fe,Br),e(Fe,He),e(He,Cr),e(Fe,Xr),e(w,Zr),e(w,Pe),e(Pe,Hr),e(Pe,Oe),e(Oe,Yr),e(Pe,qr),e(w,Qr),e(w,kt),e(kt,es),e(w,ts),e(w,L),e(L,Dt),e(Dt,Ve),e(Ve,os),e(L,rs),e(L,Kt),e(Kt,Ie),e(Ie,ss),e(L,ns),e(L,Tt),e(Tt,ze),e(ze,as),e(L,is),e(L,Ft),e(Ft,Me),e(Me,ls),f(t,to,u),f(t,S,u),e(S,ee),e(ee,Pt),g(Se,Pt,null),e(S,ds),e(S,Ot),e(Ot,cs),f(t,oo,u),f(t,E,u),g(Ne,E,null),e(E,us),e(E,Vt),e(Vt,fs),e(E,ps),e(E,te),g(je,te,null),e(te,ms),e(te,It),e(It,hs),f(t,ro,u),f(t,N,u),e(N,oe),e(oe,zt),g(We,zt,null),e(N,gs),e(N,Mt),e(Mt,_s),f(t,so,u),f(t,k,u),g(Je,k,null),e(k,vs),e(k,St),e(St,bs),e(k,As),e(k,re),g(Re,re,null),e(re,ws),e(re,Nt),e(Nt,$s),no=!0},p:zn,i(t){no||(_(ie.$$.fragment,t),_(de.$$.fragment,t),_(ce.$$.fragment,t),_(ue.$$.fragment,t),_(fe.$$.fragment,t),_(me.$$.fragment,t),_(ge.$$.fragment,t),_(ve.$$.fragment,t),_(be.$$.fragment,t),_(Ae.$$.fragment,t),_(we.$$.fragment,t),_($e.$$.fragment,t),_(ye.$$.fragment,t),_(xe.$$.fragment,t),_(Le.$$.fragment,t),_(Ee.$$.fragment,t),_(ke.$$.fragment,t),_(De.$$.fragment,t),_(Ke.$$.fragment,t),_(Te.$$.fragment,t),_(Se.$$.fragment,t),_(Ne.$$.fragment,t),_(je.$$.fragment,t),_(We.$$.fragment,t),_(Je.$$.fragment,t),_(Re.$$.fragment,t),no=!0)},o(t){v(ie.$$.fragment,t),v(de.$$.fragment,t),v(ce.$$.fragment,t),v(ue.$$.fragment,t),v(fe.$$.fragment,t),v(me.$$.fragment,t),v(ge.$$.fragment,t),v(ve.$$.fragment,t),v(be.$$.fragment,t),v(Ae.$$.fragment,t),v(we.$$.fragment,t),v($e.$$.fragment,t),v(ye.$$.fragment,t),v(xe.$$.fragment,t),v(Le.$$.fragment,t),v(Ee.$$.fragment,t),v(ke.$$.fragment,t),v(De.$$.fragment,t),v(Ke.$$.fragment,t),v(Te.$$.fragment,t),v(Se.$$.fragment,t),v(Ne.$$.fragment,t),v(je.$$.fragment,t),v(We.$$.fragment,t),v(Je.$$.fragment,t),v(Re.$$.fragment,t),no=!1},d(t){o(K),t&&o(jt),t&&o(T),b(ie),t&&o(Wt),t&&o(W),t&&o(Jt),t&&o(Ue),t&&o(Rt),t&&o(Ge),t&&o(Ut),t&&o(F),b(de),t&&o(Gt),t&&o(y),t&&o(Bt),b(ce,t),t&&o(Ct),t&&o(P),b(ue),t&&o(Xt),t&&o(p),b(fe),b(me),b(ge),b(ve),b(be),b(Ae),b(we),b($e),b(ye),b(xe),t&&o(Zt),t&&o(O),b(Le),t&&o(Ht),t&&o(V),b(Ee),t&&o(Yt),t&&o(I),b(ke),t&&o(qt),t&&o(z),b(De),t&&o(Qt),t&&o(M),b(Ke),t&&o(eo),t&&o(w),b(Te),t&&o(to),t&&o(S),b(Se),t&&o(oo),t&&o(E),b(Ne),b(je),t&&o(ro),t&&o(N),b(We),t&&o(so),t&&o(k),b(Je),b(Re)}}}const jn={local:"autoencoderkl",sections:[{local:"loading-from-the-original-format",title:"Loading from the original format"},{local:"diffusers.AutoencoderKL",title:"AutoencoderKL"},{local:"diffusers.models.autoencoder_kl.AutoencoderKLOutput",title:"AutoencoderKLOutput"},{local:"diffusers.models.vae.DecoderOutput",title:"DecoderOutput"},{local:"diffusers.FlaxAutoencoderKL",title:"FlaxAutoencoderKL"},{local:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput",title:"FlaxAutoencoderKLOutput"},{local:"diffusers.models.vae_flax.FlaxDecoderOutput",title:"FlaxDecoderOutput"}],title:"AutoencoderKL"};function Wn(ys){return Mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bn extends Pn{constructor(K){super();On(this,K,Wn,Nn,Vn,{})}}export{Bn as default,jn as metadata};
