import{S as bn,i as yn,s as wn,e as n,k as a,w as m,t as f,M as Dn,c as r,d as i,m as l,a as o,x as g,h as u,b as s,G as t,g as p,y as _,L as Mn,q as v,o as b,B as y,v as Pn}from"../../../chunks/vendor-hf-doc-builder.js";import{D as xt}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as le}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Tn(xi){let D,je,M,A,Me,V,$t,Pe,Et,Je,P,N,Te,Q,Lt,xe,St,Ke,O,It,W,kt,At,Ye,de,Nt,Xe,fe,$e,Ot,Ze,R,Rt,F,qt,Ct,et,T,q,Ee,j,zt,Le,Ut,tt,w,it,Bt,nt,Gt,rt,ot,x,C,Se,J,Ht,Ie,Vt,st,z,ke,$,Ae,Qt,Wt,Ne,Ft,jt,ue,Jt,Kt,K,E,Oe,Y,Yt,Xt,Re,qe,Zt,ei,pe,ti,ii,L,Ce,X,ni,ri,ze,Ue,oi,si,ce,ai,at,S,U,Be,Z,li,Ge,di,lt,I,B,He,ee,fi,Ve,ui,dt,h,te,pi,ie,ci,he,hi,mi,gi,me,ne,ft,k,G,Qe,re,_i,We,vi,ut,c,oe,bi,Fe,yi,wi,se,Di,ge,Mi,Pi,Ti,_e,ae,pt;return V=new le({}),Q=new le({}),j=new le({}),J=new le({}),Z=new le({}),ee=new le({}),te=new xt({props:{name:"class diffusers.LDMTextToImagePipeline",anchor:"diffusers.LDMTextToImagePipeline",parameters:[{name:"vqvae",val:": typing.Union[diffusers.models.vq_model.VQModel, diffusers.models.autoencoder_kl.AutoencoderKL]"},{name:"bert",val:": PreTrainedModel"},{name:"tokenizer",val:": PreTrainedTokenizer"},{name:"unet",val:": typing.Union[diffusers.models.unet_2d.UNet2DModel, diffusers.models.unet_2d_condition.UNet2DConditionModel]"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"}],parametersDescription:[{anchor:"diffusers.LDMTextToImagePipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.12.0/en/api/models#diffusers.VQModel">VQModel</a>) &#x2014;
Vector-quantized (VQ) Model to encode and decode images to and from latent representations.`,name:"vqvae"},{anchor:"diffusers.LDMTextToImagePipeline.bert",description:`<strong>bert</strong> (<code>LDMBertModel</code>) &#x2014;
Text-encoder model based on <a href="https://huggingface.co/docs/transformers/model_doc/bert" rel="nofollow">BERT</a> architecture.`,name:"bert"},{anchor:"diffusers.LDMTextToImagePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>transformers.BertTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer" rel="nofollow">BertTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.LDMTextToImagePipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.12.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.LDMTextToImagePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.12.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L33"}}),ne=new xt({props:{name:"__call__",anchor:"diffusers.LDMTextToImagePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 1.0"},{name:"eta",val:": typing.Optional[float] = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.LDMTextToImagePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code> at
the, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.LDMTextToImagePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L64",returnDescription:`
<p><code>~pipelines.utils.ImagePipelineOutput</code> if <code>return_dict</code> is
True, otherwise a \`tuple. When returning a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),re=new le({}),oe=new xt({props:{name:"class diffusers.LDMSuperResolutionPipeline",anchor:"diffusers.LDMSuperResolutionPipeline",parameters:[{name:"vqvae",val:": VQModel"},{name:"unet",val:": UNet2DModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler, diffusers.schedulers.scheduling_euler_discrete.EulerDiscreteScheduler, diffusers.schedulers.scheduling_euler_ancestral_discrete.EulerAncestralDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler]"}],parametersDescription:[{anchor:"diffusers.LDMSuperResolutionPipeline.vqvae",description:`<strong>vqvae</strong> (<a href="/docs/diffusers/v0.12.0/en/api/models#diffusers.VQModel">VQModel</a>) &#x2014;
Vector-quantized (VQ) VAE Model to encode and decode images to and from latent representations.`,name:"vqvae"},{anchor:"diffusers.LDMSuperResolutionPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.12.0/en/api/models#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014; U-Net architecture to denoise the encoded image.',name:"unet"},{anchor:"diffusers.LDMSuperResolutionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.12.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latens. Can be one of
<a href="/docs/diffusers/v0.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler">EulerDiscreteScheduler</a>,
<a href="/docs/diffusers/v0.12.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler">EulerAncestralDiscreteScheduler</a>, <a href="/docs/diffusers/v0.12.0/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a>, or <a href="/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py#L33"}}),ae=new xt({props:{name:"__call__",anchor:"diffusers.LDMSuperResolutionPipeline.__call__",parameters:[{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image] = None"},{name:"batch_size",val:": typing.Optional[int] = 1"},{name:"num_inference_steps",val:": typing.Optional[int] = 100"},{name:"eta",val:": typing.Optional[float] = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.Tensor</code> or <code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, that will be used as the starting point for the
process.`,name:"image"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.batch_size",description:`<strong>batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of images to generate.`,name:"batch_size"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.12.0/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py#L66",returnDescription:`
<p><code>~pipelines.utils.ImagePipelineOutput</code> if <code>return_dict</code> is
True, otherwise a \`tuple. When returning a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),{c(){D=n("meta"),je=a(),M=n("h1"),A=n("a"),Me=n("span"),m(V.$$.fragment),$t=a(),Pe=n("span"),Et=f("Latent Diffusion"),Je=a(),P=n("h2"),N=n("a"),Te=n("span"),m(Q.$$.fragment),Lt=a(),xe=n("span"),St=f("Overview"),Ke=a(),O=n("p"),It=f("Latent Diffusion was proposed in "),W=n("a"),kt=f("High-Resolution Image Synthesis with Latent Diffusion Models"),At=f(" by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer."),Ye=a(),de=n("p"),Nt=f("The abstract of the paper is the following:"),Xe=a(),fe=n("p"),$e=n("em"),Ot=f("By decomposing the image formation process into a sequential application of denoising autoencoders, diffusion models (DMs) achieve state-of-the-art synthesis results on image data and beyond. Additionally, their formulation allows for a guiding mechanism to control the image generation process without retraining. However, since these models typically operate directly in pixel space, optimization of powerful DMs often consumes hundreds of GPU days and inference is expensive due to sequential evaluations. To enable DM training on limited computational resources while retaining their quality and flexibility, we apply them in the latent space of powerful pretrained autoencoders. In contrast to previous work, training diffusion models on such a representation allows for the first time to reach a near-optimal point between complexity reduction and detail preservation, greatly boosting visual fidelity. By introducing cross-attention layers into the model architecture, we turn diffusion models into powerful and flexible generators for general conditioning inputs such as text or bounding boxes and high-resolution synthesis becomes possible in a convolutional manner. Our latent diffusion models (LDMs) achieve a new state of the art for image inpainting and highly competitive performance on various tasks, including unconditional image generation, semantic scene synthesis, and super-resolution, while significantly reducing computational requirements compared to pixel-based DMs."),Ze=a(),R=n("p"),Rt=f("The original codebase can be found "),F=n("a"),qt=f("here"),Ct=f("."),et=a(),T=n("h2"),q=n("a"),Ee=n("span"),m(j.$$.fragment),zt=a(),Le=n("span"),Ut=f("Tips:"),tt=a(),w=n("ul"),it=n("li"),Bt=a(),nt=n("li"),Gt=a(),rt=n("li"),ot=a(),x=n("h2"),C=n("a"),Se=n("span"),m(J.$$.fragment),Ht=a(),Ie=n("span"),Vt=f("Available Pipelines:"),st=a(),z=n("table"),ke=n("thead"),$=n("tr"),Ae=n("th"),Qt=f("Pipeline"),Wt=a(),Ne=n("th"),Ft=f("Tasks"),jt=a(),ue=n("th"),Jt=f("Colab"),Kt=a(),K=n("tbody"),E=n("tr"),Oe=n("td"),Y=n("a"),Yt=f("pipeline_latent_diffusion.py"),Xt=a(),Re=n("td"),qe=n("em"),Zt=f("Text-to-Image Generation"),ei=a(),pe=n("td"),ti=f("-"),ii=a(),L=n("tr"),Ce=n("td"),X=n("a"),ni=f("pipeline_latent_diffusion_superresolution.py"),ri=a(),ze=n("td"),Ue=n("em"),oi=f("Super Resolution"),si=a(),ce=n("td"),ai=f("-"),at=a(),S=n("h2"),U=n("a"),Be=n("span"),m(Z.$$.fragment),li=a(),Ge=n("span"),di=f("Examples:"),lt=a(),I=n("h2"),B=n("a"),He=n("span"),m(ee.$$.fragment),fi=a(),Ve=n("span"),ui=f("LDMTextToImagePipeline"),dt=a(),h=n("div"),m(te.$$.fragment),pi=a(),ie=n("p"),ci=f("This model inherits from "),he=n("a"),hi=f("DiffusionPipeline"),mi=f(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),gi=a(),me=n("div"),m(ne.$$.fragment),ft=a(),k=n("h2"),G=n("a"),Qe=n("span"),m(re.$$.fragment),_i=a(),We=n("span"),vi=f("LDMSuperResolutionPipeline"),ut=a(),c=n("div"),m(oe.$$.fragment),bi=a(),Fe=n("p"),yi=f("A pipeline for image super-resolution using Latent"),wi=a(),se=n("p"),Di=f("This class inherits from "),ge=n("a"),Mi=f("DiffusionPipeline"),Pi=f(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Ti=a(),_e=n("div"),m(ae.$$.fragment),this.h()},l(e){const d=Dn('[data-svelte="svelte-1phssyn"]',document.head);D=r(d,"META",{name:!0,content:!0}),d.forEach(i),je=l(e),M=r(e,"H1",{class:!0});var ct=o(M);A=r(ct,"A",{id:!0,class:!0,href:!0});var $i=o(A);Me=r($i,"SPAN",{});var Ei=o(Me);g(V.$$.fragment,Ei),Ei.forEach(i),$i.forEach(i),$t=l(ct),Pe=r(ct,"SPAN",{});var Li=o(Pe);Et=u(Li,"Latent Diffusion"),Li.forEach(i),ct.forEach(i),Je=l(e),P=r(e,"H2",{class:!0});var ht=o(P);N=r(ht,"A",{id:!0,class:!0,href:!0});var Si=o(N);Te=r(Si,"SPAN",{});var Ii=o(Te);g(Q.$$.fragment,Ii),Ii.forEach(i),Si.forEach(i),Lt=l(ht),xe=r(ht,"SPAN",{});var ki=o(xe);St=u(ki,"Overview"),ki.forEach(i),ht.forEach(i),Ke=l(e),O=r(e,"P",{});var mt=o(O);It=u(mt,"Latent Diffusion was proposed in "),W=r(mt,"A",{href:!0,rel:!0});var Ai=o(W);kt=u(Ai,"High-Resolution Image Synthesis with Latent Diffusion Models"),Ai.forEach(i),At=u(mt," by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer."),mt.forEach(i),Ye=l(e),de=r(e,"P",{});var Ni=o(de);Nt=u(Ni,"The abstract of the paper is the following:"),Ni.forEach(i),Xe=l(e),fe=r(e,"P",{});var Oi=o(fe);$e=r(Oi,"EM",{});var Ri=o($e);Ot=u(Ri,"By decomposing the image formation process into a sequential application of denoising autoencoders, diffusion models (DMs) achieve state-of-the-art synthesis results on image data and beyond. Additionally, their formulation allows for a guiding mechanism to control the image generation process without retraining. However, since these models typically operate directly in pixel space, optimization of powerful DMs often consumes hundreds of GPU days and inference is expensive due to sequential evaluations. To enable DM training on limited computational resources while retaining their quality and flexibility, we apply them in the latent space of powerful pretrained autoencoders. In contrast to previous work, training diffusion models on such a representation allows for the first time to reach a near-optimal point between complexity reduction and detail preservation, greatly boosting visual fidelity. By introducing cross-attention layers into the model architecture, we turn diffusion models into powerful and flexible generators for general conditioning inputs such as text or bounding boxes and high-resolution synthesis becomes possible in a convolutional manner. Our latent diffusion models (LDMs) achieve a new state of the art for image inpainting and highly competitive performance on various tasks, including unconditional image generation, semantic scene synthesis, and super-resolution, while significantly reducing computational requirements compared to pixel-based DMs."),Ri.forEach(i),Oi.forEach(i),Ze=l(e),R=r(e,"P",{});var gt=o(R);Rt=u(gt,"The original codebase can be found "),F=r(gt,"A",{href:!0,rel:!0});var qi=o(F);qt=u(qi,"here"),qi.forEach(i),Ct=u(gt,"."),gt.forEach(i),et=l(e),T=r(e,"H2",{class:!0});var _t=o(T);q=r(_t,"A",{id:!0,class:!0,href:!0});var Ci=o(q);Ee=r(Ci,"SPAN",{});var zi=o(Ee);g(j.$$.fragment,zi),zi.forEach(i),Ci.forEach(i),zt=l(_t),Le=r(_t,"SPAN",{});var Ui=o(Le);Ut=u(Ui,"Tips:"),Ui.forEach(i),_t.forEach(i),tt=l(e),w=r(e,"UL",{});var ve=o(w);it=r(ve,"LI",{}),o(it).forEach(i),Bt=l(ve),nt=r(ve,"LI",{}),o(nt).forEach(i),Gt=l(ve),rt=r(ve,"LI",{}),o(rt).forEach(i),ve.forEach(i),ot=l(e),x=r(e,"H2",{class:!0});var vt=o(x);C=r(vt,"A",{id:!0,class:!0,href:!0});var Bi=o(C);Se=r(Bi,"SPAN",{});var Gi=o(Se);g(J.$$.fragment,Gi),Gi.forEach(i),Bi.forEach(i),Ht=l(vt),Ie=r(vt,"SPAN",{});var Hi=o(Ie);Vt=u(Hi,"Available Pipelines:"),Hi.forEach(i),vt.forEach(i),st=l(e),z=r(e,"TABLE",{});var bt=o(z);ke=r(bt,"THEAD",{});var Vi=o(ke);$=r(Vi,"TR",{});var be=o($);Ae=r(be,"TH",{});var Qi=o(Ae);Qt=u(Qi,"Pipeline"),Qi.forEach(i),Wt=l(be),Ne=r(be,"TH",{});var Wi=o(Ne);Ft=u(Wi,"Tasks"),Wi.forEach(i),jt=l(be),ue=r(be,"TH",{align:!0});var Fi=o(ue);Jt=u(Fi,"Colab"),Fi.forEach(i),be.forEach(i),Vi.forEach(i),Kt=l(bt),K=r(bt,"TBODY",{});var yt=o(K);E=r(yt,"TR",{});var ye=o(E);Oe=r(ye,"TD",{});var ji=o(Oe);Y=r(ji,"A",{href:!0,rel:!0});var Ji=o(Y);Yt=u(Ji,"pipeline_latent_diffusion.py"),Ji.forEach(i),ji.forEach(i),Xt=l(ye),Re=r(ye,"TD",{});var Ki=o(Re);qe=r(Ki,"EM",{});var Yi=o(qe);Zt=u(Yi,"Text-to-Image Generation"),Yi.forEach(i),Ki.forEach(i),ei=l(ye),pe=r(ye,"TD",{align:!0});var Xi=o(pe);ti=u(Xi,"-"),Xi.forEach(i),ye.forEach(i),ii=l(yt),L=r(yt,"TR",{});var we=o(L);Ce=r(we,"TD",{});var Zi=o(Ce);X=r(Zi,"A",{href:!0,rel:!0});var en=o(X);ni=u(en,"pipeline_latent_diffusion_superresolution.py"),en.forEach(i),Zi.forEach(i),ri=l(we),ze=r(we,"TD",{});var tn=o(ze);Ue=r(tn,"EM",{});var nn=o(Ue);oi=u(nn,"Super Resolution"),nn.forEach(i),tn.forEach(i),si=l(we),ce=r(we,"TD",{align:!0});var rn=o(ce);ai=u(rn,"-"),rn.forEach(i),we.forEach(i),yt.forEach(i),bt.forEach(i),at=l(e),S=r(e,"H2",{class:!0});var wt=o(S);U=r(wt,"A",{id:!0,class:!0,href:!0});var on=o(U);Be=r(on,"SPAN",{});var sn=o(Be);g(Z.$$.fragment,sn),sn.forEach(i),on.forEach(i),li=l(wt),Ge=r(wt,"SPAN",{});var an=o(Ge);di=u(an,"Examples:"),an.forEach(i),wt.forEach(i),lt=l(e),I=r(e,"H2",{class:!0});var Dt=o(I);B=r(Dt,"A",{id:!0,class:!0,href:!0});var ln=o(B);He=r(ln,"SPAN",{});var dn=o(He);g(ee.$$.fragment,dn),dn.forEach(i),ln.forEach(i),fi=l(Dt),Ve=r(Dt,"SPAN",{});var fn=o(Ve);ui=u(fn,"LDMTextToImagePipeline"),fn.forEach(i),Dt.forEach(i),dt=l(e),h=r(e,"DIV",{class:!0});var De=o(h);g(te.$$.fragment,De),pi=l(De),ie=r(De,"P",{});var Mt=o(ie);ci=u(Mt,"This model inherits from "),he=r(Mt,"A",{href:!0});var un=o(he);hi=u(un,"DiffusionPipeline"),un.forEach(i),mi=u(Mt,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Mt.forEach(i),gi=l(De),me=r(De,"DIV",{class:!0});var pn=o(me);g(ne.$$.fragment,pn),pn.forEach(i),De.forEach(i),ft=l(e),k=r(e,"H2",{class:!0});var Pt=o(k);G=r(Pt,"A",{id:!0,class:!0,href:!0});var cn=o(G);Qe=r(cn,"SPAN",{});var hn=o(Qe);g(re.$$.fragment,hn),hn.forEach(i),cn.forEach(i),_i=l(Pt),We=r(Pt,"SPAN",{});var mn=o(We);vi=u(mn,"LDMSuperResolutionPipeline"),mn.forEach(i),Pt.forEach(i),ut=l(e),c=r(e,"DIV",{class:!0});var H=o(c);g(oe.$$.fragment,H),bi=l(H),Fe=r(H,"P",{});var gn=o(Fe);yi=u(gn,"A pipeline for image super-resolution using Latent"),gn.forEach(i),wi=l(H),se=r(H,"P",{});var Tt=o(se);Di=u(Tt,"This class inherits from "),ge=r(Tt,"A",{href:!0});var _n=o(ge);Mi=u(_n,"DiffusionPipeline"),_n.forEach(i),Pi=u(Tt,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Tt.forEach(i),Ti=l(H),_e=r(H,"DIV",{class:!0});var vn=o(_e);g(ae.$$.fragment,vn),vn.forEach(i),H.forEach(i),this.h()},h(){s(D,"name","hf:doc:metadata"),s(D,"content",JSON.stringify(xn)),s(A,"id","latent-diffusion"),s(A,"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"),s(A,"href","#latent-diffusion"),s(M,"class","relative group"),s(N,"id","overview"),s(N,"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"),s(N,"href","#overview"),s(P,"class","relative group"),s(W,"href","https://arxiv.org/abs/2112.10752"),s(W,"rel","nofollow"),s(F,"href","https://github.com/CompVis/latent-diffusion"),s(F,"rel","nofollow"),s(q,"id","tips"),s(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"),s(q,"href","#tips"),s(T,"class","relative group"),s(C,"id","available-pipelines"),s(C,"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"),s(C,"href","#available-pipelines"),s(x,"class","relative group"),s(ue,"align","center"),s(Y,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py"),s(Y,"rel","nofollow"),s(pe,"align","center"),s(X,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py"),s(X,"rel","nofollow"),s(ce,"align","center"),s(U,"id","examples"),s(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"),s(U,"href","#examples"),s(S,"class","relative group"),s(B,"id","diffusers.LDMTextToImagePipeline"),s(B,"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"),s(B,"href","#diffusers.LDMTextToImagePipeline"),s(I,"class","relative group"),s(he,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),s(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(G,"id","diffusers.LDMSuperResolutionPipeline"),s(G,"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"),s(G,"href","#diffusers.LDMSuperResolutionPipeline"),s(k,"class","relative group"),s(ge,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),s(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),s(c,"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,d){t(document.head,D),p(e,je,d),p(e,M,d),t(M,A),t(A,Me),_(V,Me,null),t(M,$t),t(M,Pe),t(Pe,Et),p(e,Je,d),p(e,P,d),t(P,N),t(N,Te),_(Q,Te,null),t(P,Lt),t(P,xe),t(xe,St),p(e,Ke,d),p(e,O,d),t(O,It),t(O,W),t(W,kt),t(O,At),p(e,Ye,d),p(e,de,d),t(de,Nt),p(e,Xe,d),p(e,fe,d),t(fe,$e),t($e,Ot),p(e,Ze,d),p(e,R,d),t(R,Rt),t(R,F),t(F,qt),t(R,Ct),p(e,et,d),p(e,T,d),t(T,q),t(q,Ee),_(j,Ee,null),t(T,zt),t(T,Le),t(Le,Ut),p(e,tt,d),p(e,w,d),t(w,it),t(w,Bt),t(w,nt),t(w,Gt),t(w,rt),p(e,ot,d),p(e,x,d),t(x,C),t(C,Se),_(J,Se,null),t(x,Ht),t(x,Ie),t(Ie,Vt),p(e,st,d),p(e,z,d),t(z,ke),t(ke,$),t($,Ae),t(Ae,Qt),t($,Wt),t($,Ne),t(Ne,Ft),t($,jt),t($,ue),t(ue,Jt),t(z,Kt),t(z,K),t(K,E),t(E,Oe),t(Oe,Y),t(Y,Yt),t(E,Xt),t(E,Re),t(Re,qe),t(qe,Zt),t(E,ei),t(E,pe),t(pe,ti),t(K,ii),t(K,L),t(L,Ce),t(Ce,X),t(X,ni),t(L,ri),t(L,ze),t(ze,Ue),t(Ue,oi),t(L,si),t(L,ce),t(ce,ai),p(e,at,d),p(e,S,d),t(S,U),t(U,Be),_(Z,Be,null),t(S,li),t(S,Ge),t(Ge,di),p(e,lt,d),p(e,I,d),t(I,B),t(B,He),_(ee,He,null),t(I,fi),t(I,Ve),t(Ve,ui),p(e,dt,d),p(e,h,d),_(te,h,null),t(h,pi),t(h,ie),t(ie,ci),t(ie,he),t(he,hi),t(ie,mi),t(h,gi),t(h,me),_(ne,me,null),p(e,ft,d),p(e,k,d),t(k,G),t(G,Qe),_(re,Qe,null),t(k,_i),t(k,We),t(We,vi),p(e,ut,d),p(e,c,d),_(oe,c,null),t(c,bi),t(c,Fe),t(Fe,yi),t(c,wi),t(c,se),t(se,Di),t(se,ge),t(ge,Mi),t(se,Pi),t(c,Ti),t(c,_e),_(ae,_e,null),pt=!0},p:Mn,i(e){pt||(v(V.$$.fragment,e),v(Q.$$.fragment,e),v(j.$$.fragment,e),v(J.$$.fragment,e),v(Z.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(ne.$$.fragment,e),v(re.$$.fragment,e),v(oe.$$.fragment,e),v(ae.$$.fragment,e),pt=!0)},o(e){b(V.$$.fragment,e),b(Q.$$.fragment,e),b(j.$$.fragment,e),b(J.$$.fragment,e),b(Z.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(ne.$$.fragment,e),b(re.$$.fragment,e),b(oe.$$.fragment,e),b(ae.$$.fragment,e),pt=!1},d(e){i(D),e&&i(je),e&&i(M),y(V),e&&i(Je),e&&i(P),y(Q),e&&i(Ke),e&&i(O),e&&i(Ye),e&&i(de),e&&i(Xe),e&&i(fe),e&&i(Ze),e&&i(R),e&&i(et),e&&i(T),y(j),e&&i(tt),e&&i(w),e&&i(ot),e&&i(x),y(J),e&&i(st),e&&i(z),e&&i(at),e&&i(S),y(Z),e&&i(lt),e&&i(I),y(ee),e&&i(dt),e&&i(h),y(te),y(ne),e&&i(ft),e&&i(k),y(re),e&&i(ut),e&&i(c),y(oe),y(ae)}}}const xn={local:"latent-diffusion",sections:[{local:"overview",title:"Overview"},{local:"tips",title:"Tips:"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"examples",title:"Examples:"},{local:"diffusers.LDMTextToImagePipeline",title:"LDMTextToImagePipeline"},{local:"diffusers.LDMSuperResolutionPipeline",title:"LDMSuperResolutionPipeline"}],title:"Latent Diffusion"};function $n(xi){return Pn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class In extends bn{constructor(D){super();yn(this,D,$n,Tn,wn,{})}}export{In as default,xn as metadata};
