import{S as vr,i as br,s as yr,e as r,k as a,w as m,t as u,M as Dr,c as n,d as i,m as l,a as o,x as g,h as f,b as s,G as t,g as p,y as _,L as wr,q as v,o as b,B as y,v as Mr}from"../../../chunks/vendor-hf-doc-builder.js";import{D as Tt}from"../../../chunks/Docstring-hf-doc-builder.js";import{I as le}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Pr(Ti){let w,Fe,M,A,Me,G,$t,Pe,Et,Je,P,N,xe,Q,Lt,Te,St,Ke,O,It,W,kt,At,Ye,de,Nt,Xe,ue,$e,Ot,Ze,R,Rt,j,qt,Ct,et,x,q,Ee,F,zt,Le,Ut,tt,D,it,Bt,rt,Ht,nt,ot,T,C,Se,J,Vt,Ie,Gt,st,z,ke,$,Ae,Qt,Wt,Ne,jt,Ft,fe,Jt,Kt,K,E,Oe,Y,Yt,Xt,Re,qe,Zt,ei,pe,ti,ii,L,Ce,X,ri,ni,ze,Ue,oi,si,ce,ai,at,S,U,Be,Z,li,He,di,lt,I,B,Ve,ee,ui,Ge,fi,dt,h,te,pi,ie,ci,he,hi,mi,gi,me,re,ut,k,H,Qe,ne,_i,We,vi,ft,c,oe,bi,je,yi,Di,se,wi,ge,Mi,Pi,xi,_e,ae,pt;return G=new le({}),Q=new le({}),F=new le({}),J=new le({}),Z=new le({}),ee=new le({}),te=new Tt({props:{name:"class diffusers.LDMTextToImagePipeline",anchor:"diffusers.LDMTextToImagePipeline",parameters:[{name:"vqvae",val:": typing.Union[diffusers.models.vae.VQModel, diffusers.models.vae.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/pr_1116/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/pr_1116/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/pr_1116/en/api/schedulers#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/pr_1116/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_1116/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L20"}}),re=new Tt({props:{name:"__call__",anchor:"diffusers.LDMTextToImagePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"height",val:": typing.Optional[int] = 256"},{name:"width",val:": typing.Optional[int] = 256"},{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.Optional[torch._C.Generator] = 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 256) &#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 256) &#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;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator</a> to make generation
deterministic.`,name:"generator"},{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/pr_1116/en/api/diffusion_pipeline#diffusers.pipeline_utils.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_1116/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L50",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/pr_1116/en/api/diffusion_pipeline#diffusers.pipeline_utils.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),ne=new le({}),oe=new Tt({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/pr_1116/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/pr_1116/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/pr_1116/en/api/schedulers#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/pr_1116/en/api/schedulers#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.EulerDiscreteScheduler">EulerDiscreteScheduler</a>,
<a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.EulerAncestralDiscreteScheduler">EulerAncestralDiscreteScheduler</a>, <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a>, or <a href="/docs/diffusers/pr_1116/en/api/schedulers#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_1116/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py#L32"}}),ae=new Tt({props:{name:"__call__",anchor:"diffusers.LDMSuperResolutionPipeline.__call__",parameters:[{name:"init_image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{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.Optional[torch._C.Generator] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.LDMSuperResolutionPipeline.__call__.init_image",description:`<strong>init_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:"init_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/pr_1116/en/api/schedulers#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;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator</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/pr_1116/en/api/diffusion_pipeline#diffusers.pipeline_utils.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_1116/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py#L65",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/pr_1116/en/api/diffusion_pipeline#diffusers.pipeline_utils.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),{c(){w=r("meta"),Fe=a(),M=r("h1"),A=r("a"),Me=r("span"),m(G.$$.fragment),$t=a(),Pe=r("span"),Et=u("Latent Diffusion"),Je=a(),P=r("h2"),N=r("a"),xe=r("span"),m(Q.$$.fragment),Lt=a(),Te=r("span"),St=u("Overview"),Ke=a(),O=r("p"),It=u("Latent Diffusion was proposed in "),W=r("a"),kt=u("High-Resolution Image Synthesis with Latent Diffusion Models"),At=u(" by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer."),Ye=a(),de=r("p"),Nt=u("The abstract of the paper is the following:"),Xe=a(),ue=r("p"),$e=r("em"),Ot=u("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=r("p"),Rt=u("The original codebase can be found "),j=r("a"),qt=u("here"),Ct=u("."),et=a(),x=r("h2"),q=r("a"),Ee=r("span"),m(F.$$.fragment),zt=a(),Le=r("span"),Ut=u("Tips:"),tt=a(),D=r("ul"),it=r("li"),Bt=a(),rt=r("li"),Ht=a(),nt=r("li"),ot=a(),T=r("h2"),C=r("a"),Se=r("span"),m(J.$$.fragment),Vt=a(),Ie=r("span"),Gt=u("Available Pipelines:"),st=a(),z=r("table"),ke=r("thead"),$=r("tr"),Ae=r("th"),Qt=u("Pipeline"),Wt=a(),Ne=r("th"),jt=u("Tasks"),Ft=a(),fe=r("th"),Jt=u("Colab"),Kt=a(),K=r("tbody"),E=r("tr"),Oe=r("td"),Y=r("a"),Yt=u("pipeline_latent_diffusion.py"),Xt=a(),Re=r("td"),qe=r("em"),Zt=u("Text-to-Image Generation"),ei=a(),pe=r("td"),ti=u("-"),ii=a(),L=r("tr"),Ce=r("td"),X=r("a"),ri=u("pipeline_latent_diffusion_superresolution.py"),ni=a(),ze=r("td"),Ue=r("em"),oi=u("Super Resolution"),si=a(),ce=r("td"),ai=u("-"),at=a(),S=r("h2"),U=r("a"),Be=r("span"),m(Z.$$.fragment),li=a(),He=r("span"),di=u("Examples:"),lt=a(),I=r("h2"),B=r("a"),Ve=r("span"),m(ee.$$.fragment),ui=a(),Ge=r("span"),fi=u("LDMTextToImagePipeline"),dt=a(),h=r("div"),m(te.$$.fragment),pi=a(),ie=r("p"),ci=u("This model inherits from "),he=r("a"),hi=u("DiffusionPipeline"),mi=u(`. 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=r("div"),m(re.$$.fragment),ut=a(),k=r("h2"),H=r("a"),Qe=r("span"),m(ne.$$.fragment),_i=a(),We=r("span"),vi=u("LDMSuperResolutionPipeline"),ft=a(),c=r("div"),m(oe.$$.fragment),bi=a(),je=r("p"),yi=u("A pipeline for image super-resolution using Latent"),Di=a(),se=r("p"),wi=u("This class inherits from "),ge=r("a"),Mi=u("DiffusionPipeline"),Pi=u(`. 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.)`),xi=a(),_e=r("div"),m(ae.$$.fragment),this.h()},l(e){const d=Dr('[data-svelte="svelte-1phssyn"]',document.head);w=n(d,"META",{name:!0,content:!0}),d.forEach(i),Fe=l(e),M=n(e,"H1",{class:!0});var ct=o(M);A=n(ct,"A",{id:!0,class:!0,href:!0});var $i=o(A);Me=n($i,"SPAN",{});var Ei=o(Me);g(G.$$.fragment,Ei),Ei.forEach(i),$i.forEach(i),$t=l(ct),Pe=n(ct,"SPAN",{});var Li=o(Pe);Et=f(Li,"Latent Diffusion"),Li.forEach(i),ct.forEach(i),Je=l(e),P=n(e,"H2",{class:!0});var ht=o(P);N=n(ht,"A",{id:!0,class:!0,href:!0});var Si=o(N);xe=n(Si,"SPAN",{});var Ii=o(xe);g(Q.$$.fragment,Ii),Ii.forEach(i),Si.forEach(i),Lt=l(ht),Te=n(ht,"SPAN",{});var ki=o(Te);St=f(ki,"Overview"),ki.forEach(i),ht.forEach(i),Ke=l(e),O=n(e,"P",{});var mt=o(O);It=f(mt,"Latent Diffusion was proposed in "),W=n(mt,"A",{href:!0,rel:!0});var Ai=o(W);kt=f(Ai,"High-Resolution Image Synthesis with Latent Diffusion Models"),Ai.forEach(i),At=f(mt," by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj\xF6rn Ommer."),mt.forEach(i),Ye=l(e),de=n(e,"P",{});var Ni=o(de);Nt=f(Ni,"The abstract of the paper is the following:"),Ni.forEach(i),Xe=l(e),ue=n(e,"P",{});var Oi=o(ue);$e=n(Oi,"EM",{});var Ri=o($e);Ot=f(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=n(e,"P",{});var gt=o(R);Rt=f(gt,"The original codebase can be found "),j=n(gt,"A",{href:!0,rel:!0});var qi=o(j);qt=f(qi,"here"),qi.forEach(i),Ct=f(gt,"."),gt.forEach(i),et=l(e),x=n(e,"H2",{class:!0});var _t=o(x);q=n(_t,"A",{id:!0,class:!0,href:!0});var Ci=o(q);Ee=n(Ci,"SPAN",{});var zi=o(Ee);g(F.$$.fragment,zi),zi.forEach(i),Ci.forEach(i),zt=l(_t),Le=n(_t,"SPAN",{});var Ui=o(Le);Ut=f(Ui,"Tips:"),Ui.forEach(i),_t.forEach(i),tt=l(e),D=n(e,"UL",{});var ve=o(D);it=n(ve,"LI",{}),o(it).forEach(i),Bt=l(ve),rt=n(ve,"LI",{}),o(rt).forEach(i),Ht=l(ve),nt=n(ve,"LI",{}),o(nt).forEach(i),ve.forEach(i),ot=l(e),T=n(e,"H2",{class:!0});var vt=o(T);C=n(vt,"A",{id:!0,class:!0,href:!0});var Bi=o(C);Se=n(Bi,"SPAN",{});var Hi=o(Se);g(J.$$.fragment,Hi),Hi.forEach(i),Bi.forEach(i),Vt=l(vt),Ie=n(vt,"SPAN",{});var Vi=o(Ie);Gt=f(Vi,"Available Pipelines:"),Vi.forEach(i),vt.forEach(i),st=l(e),z=n(e,"TABLE",{});var bt=o(z);ke=n(bt,"THEAD",{});var Gi=o(ke);$=n(Gi,"TR",{});var be=o($);Ae=n(be,"TH",{});var Qi=o(Ae);Qt=f(Qi,"Pipeline"),Qi.forEach(i),Wt=l(be),Ne=n(be,"TH",{});var Wi=o(Ne);jt=f(Wi,"Tasks"),Wi.forEach(i),Ft=l(be),fe=n(be,"TH",{align:!0});var ji=o(fe);Jt=f(ji,"Colab"),ji.forEach(i),be.forEach(i),Gi.forEach(i),Kt=l(bt),K=n(bt,"TBODY",{});var yt=o(K);E=n(yt,"TR",{});var ye=o(E);Oe=n(ye,"TD",{});var Fi=o(Oe);Y=n(Fi,"A",{href:!0,rel:!0});var Ji=o(Y);Yt=f(Ji,"pipeline_latent_diffusion.py"),Ji.forEach(i),Fi.forEach(i),Xt=l(ye),Re=n(ye,"TD",{});var Ki=o(Re);qe=n(Ki,"EM",{});var Yi=o(qe);Zt=f(Yi,"Text-to-Image Generation"),Yi.forEach(i),Ki.forEach(i),ei=l(ye),pe=n(ye,"TD",{align:!0});var Xi=o(pe);ti=f(Xi,"-"),Xi.forEach(i),ye.forEach(i),ii=l(yt),L=n(yt,"TR",{});var De=o(L);Ce=n(De,"TD",{});var Zi=o(Ce);X=n(Zi,"A",{href:!0,rel:!0});var er=o(X);ri=f(er,"pipeline_latent_diffusion_superresolution.py"),er.forEach(i),Zi.forEach(i),ni=l(De),ze=n(De,"TD",{});var tr=o(ze);Ue=n(tr,"EM",{});var ir=o(Ue);oi=f(ir,"Super Resolution"),ir.forEach(i),tr.forEach(i),si=l(De),ce=n(De,"TD",{align:!0});var rr=o(ce);ai=f(rr,"-"),rr.forEach(i),De.forEach(i),yt.forEach(i),bt.forEach(i),at=l(e),S=n(e,"H2",{class:!0});var Dt=o(S);U=n(Dt,"A",{id:!0,class:!0,href:!0});var nr=o(U);Be=n(nr,"SPAN",{});var or=o(Be);g(Z.$$.fragment,or),or.forEach(i),nr.forEach(i),li=l(Dt),He=n(Dt,"SPAN",{});var sr=o(He);di=f(sr,"Examples:"),sr.forEach(i),Dt.forEach(i),lt=l(e),I=n(e,"H2",{class:!0});var wt=o(I);B=n(wt,"A",{id:!0,class:!0,href:!0});var ar=o(B);Ve=n(ar,"SPAN",{});var lr=o(Ve);g(ee.$$.fragment,lr),lr.forEach(i),ar.forEach(i),ui=l(wt),Ge=n(wt,"SPAN",{});var dr=o(Ge);fi=f(dr,"LDMTextToImagePipeline"),dr.forEach(i),wt.forEach(i),dt=l(e),h=n(e,"DIV",{class:!0});var we=o(h);g(te.$$.fragment,we),pi=l(we),ie=n(we,"P",{});var Mt=o(ie);ci=f(Mt,"This model inherits from "),he=n(Mt,"A",{href:!0});var ur=o(he);hi=f(ur,"DiffusionPipeline"),ur.forEach(i),mi=f(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(we),me=n(we,"DIV",{class:!0});var fr=o(me);g(re.$$.fragment,fr),fr.forEach(i),we.forEach(i),ut=l(e),k=n(e,"H2",{class:!0});var Pt=o(k);H=n(Pt,"A",{id:!0,class:!0,href:!0});var pr=o(H);Qe=n(pr,"SPAN",{});var cr=o(Qe);g(ne.$$.fragment,cr),cr.forEach(i),pr.forEach(i),_i=l(Pt),We=n(Pt,"SPAN",{});var hr=o(We);vi=f(hr,"LDMSuperResolutionPipeline"),hr.forEach(i),Pt.forEach(i),ft=l(e),c=n(e,"DIV",{class:!0});var V=o(c);g(oe.$$.fragment,V),bi=l(V),je=n(V,"P",{});var mr=o(je);yi=f(mr,"A pipeline for image super-resolution using Latent"),mr.forEach(i),Di=l(V),se=n(V,"P",{});var xt=o(se);wi=f(xt,"This class inherits from "),ge=n(xt,"A",{href:!0});var gr=o(ge);Mi=f(gr,"DiffusionPipeline"),gr.forEach(i),Pi=f(xt,`. 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.)`),xt.forEach(i),xi=l(V),_e=n(V,"DIV",{class:!0});var _r=o(_e);g(ae.$$.fragment,_r),_r.forEach(i),V.forEach(i),this.h()},h(){s(w,"name","hf:doc:metadata"),s(w,"content",JSON.stringify(xr)),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(j,"href","https://github.com/CompVis/latent-diffusion"),s(j,"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(x,"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(T,"class","relative group"),s(fe,"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/pr_1116/en/using-diffusers/loading#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(H,"id","diffusers.LDMSuperResolutionPipeline"),s(H,"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(H,"href","#diffusers.LDMSuperResolutionPipeline"),s(k,"class","relative group"),s(ge,"href","/docs/diffusers/pr_1116/en/using-diffusers/loading#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,w),p(e,Fe,d),p(e,M,d),t(M,A),t(A,Me),_(G,Me,null),t(M,$t),t(M,Pe),t(Pe,Et),p(e,Je,d),p(e,P,d),t(P,N),t(N,xe),_(Q,xe,null),t(P,Lt),t(P,Te),t(Te,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,ue,d),t(ue,$e),t($e,Ot),p(e,Ze,d),p(e,R,d),t(R,Rt),t(R,j),t(j,qt),t(R,Ct),p(e,et,d),p(e,x,d),t(x,q),t(q,Ee),_(F,Ee,null),t(x,zt),t(x,Le),t(Le,Ut),p(e,tt,d),p(e,D,d),t(D,it),t(D,Bt),t(D,rt),t(D,Ht),t(D,nt),p(e,ot,d),p(e,T,d),t(T,C),t(C,Se),_(J,Se,null),t(T,Vt),t(T,Ie),t(Ie,Gt),p(e,st,d),p(e,z,d),t(z,ke),t(ke,$),t($,Ae),t(Ae,Qt),t($,Wt),t($,Ne),t(Ne,jt),t($,Ft),t($,fe),t(fe,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,ri),t(L,ni),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,He),t(He,di),p(e,lt,d),p(e,I,d),t(I,B),t(B,Ve),_(ee,Ve,null),t(I,ui),t(I,Ge),t(Ge,fi),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),_(re,me,null),p(e,ut,d),p(e,k,d),t(k,H),t(H,Qe),_(ne,Qe,null),t(k,_i),t(k,We),t(We,vi),p(e,ft,d),p(e,c,d),_(oe,c,null),t(c,bi),t(c,je),t(je,yi),t(c,Di),t(c,se),t(se,wi),t(se,ge),t(ge,Mi),t(se,Pi),t(c,xi),t(c,_e),_(ae,_e,null),pt=!0},p:wr,i(e){pt||(v(G.$$.fragment,e),v(Q.$$.fragment,e),v(F.$$.fragment,e),v(J.$$.fragment,e),v(Z.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(re.$$.fragment,e),v(ne.$$.fragment,e),v(oe.$$.fragment,e),v(ae.$$.fragment,e),pt=!0)},o(e){b(G.$$.fragment,e),b(Q.$$.fragment,e),b(F.$$.fragment,e),b(J.$$.fragment,e),b(Z.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(re.$$.fragment,e),b(ne.$$.fragment,e),b(oe.$$.fragment,e),b(ae.$$.fragment,e),pt=!1},d(e){i(w),e&&i(Fe),e&&i(M),y(G),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(ue),e&&i(Ze),e&&i(R),e&&i(et),e&&i(x),y(F),e&&i(tt),e&&i(D),e&&i(ot),e&&i(T),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(re),e&&i(ut),e&&i(k),y(ne),e&&i(ft),e&&i(c),y(oe),y(ae)}}}const xr={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 Tr(Ti){return Mr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sr extends vr{constructor(w){super();br(this,w,Tr,Pr,yr,{})}}export{Sr as default,xr as metadata};
