import{S as gn,i as hn,s as _n,e as a,k as u,w,t as c,M as bn,c as i,d as n,m as g,a as r,x as $,h as d,b as m,G as e,g as y,y as U,q as x,o as T,B as S,v as yn,L as Yt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Rt}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as ie}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Ot}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as zt}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function vn(J){let o,_,f,l,b,s,p,j,W,z,D,G,N,re,F,A,le;return{c(){o=a("p"),_=c("Make sure to check out the Stable Diffusion "),f=a("a"),l=c("Tips"),b=c(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),s=u(),p=a("p"),j=c("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),W=a("a"),z=c("CompVis"),D=c(", "),G=a("a"),N=c("Runway"),re=c(", and "),F=a("a"),A=c("Stability AI"),le=c(" Hub organizations!"),this.h()},l(P){o=i(P,"P",{});var M=r(o);_=d(M,"Make sure to check out the Stable Diffusion "),f=i(M,"A",{href:!0});var De=r(f);l=d(De,"Tips"),De.forEach(n),b=d(M," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),M.forEach(n),s=g(P),p=i(P,"P",{});var k=r(p);j=d(k,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),W=i(k,"A",{href:!0,rel:!0});var pe=r(W);z=d(pe,"CompVis"),pe.forEach(n),D=d(k,", "),G=i(k,"A",{href:!0,rel:!0});var C=r(G);N=d(C,"Runway"),C.forEach(n),re=d(k,", and "),F=i(k,"A",{href:!0,rel:!0});var ce=r(F);A=d(ce,"Stability AI"),ce.forEach(n),le=d(k," Hub organizations!"),k.forEach(n),this.h()},h(){m(f,"href","overview#tips"),m(W,"href","https://huggingface.co/CompVis"),m(W,"rel","nofollow"),m(G,"href","https://huggingface.co/runwayml"),m(G,"rel","nofollow"),m(F,"href","https://huggingface.co/stabilityai"),m(F,"rel","nofollow")},m(P,M){y(P,o,M),e(o,_),e(o,f),e(f,l),e(o,b),y(P,s,M),y(P,p,M),e(p,j),e(p,W),e(W,z),e(p,D),e(p,G),e(G,N),e(p,re),e(p,F),e(F,A),e(p,le)},d(P){P&&n(o),P&&n(s),P&&n(p)}}}function wn(J){let o,_,f,l,b;return l=new Ot({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwaW8lMjBpbXBvcnQlMjBCeXRlc0lPJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblVwc2NhbGVQaXBlbGluZSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBJTIzJTIwbG9hZCUyMG1vZGVsJTIwYW5kJTIwc2NoZWR1bGVyJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teDQtdXBzY2FsZXIlMjIlMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblVwc2NhbGVQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMjByZXZpc2lvbiUzRCUyMmZwMTYlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBcGlwZWxpbmUlMjAlM0QlMjBwaXBlbGluZS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMGxldCdzJTIwZG93bmxvYWQlMjBhbiUyMCUyMGltYWdlJTBBdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaGYtaW50ZXJuYWwtdGVzdGluZyUyRmRpZmZ1c2Vycy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnNkMi11cHNjYWxlJTJGbG93X3Jlc19jYXQucG5nJTIyJTBBcmVzcG9uc2UlMjAlM0QlMjByZXF1ZXN0cy5nZXQodXJsKSUwQWxvd19yZXNfaW1nJTIwJTNEJTIwSW1hZ2Uub3BlbihCeXRlc0lPKHJlc3BvbnNlLmNvbnRlbnQpKS5jb252ZXJ0KCUyMlJHQiUyMiklMEFsb3dfcmVzX2ltZyUyMCUzRCUyMGxvd19yZXNfaW1nLnJlc2l6ZSgoMTI4JTJDJTIwMTI4KSklMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwd2hpdGUlMjBjYXQlMjIlMEElMEF1cHNjYWxlZF9pbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCUzRHByb21wdCUyQyUyMGltYWdlJTNEbG93X3Jlc19pbWcpLmltYWdlcyU1QjAlNUQlMEF1cHNjYWxlZF9pbWFnZS5zYXZlKCUyMnVwc2FtcGxlZF9jYXQucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionUpscalePipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model and scheduler</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;stabilityai/stable-diffusion-x4-upscaler&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionUpscalePipeline.from_pretrained(
<span class="hljs-meta">... </span>    model_id, revision=<span class="hljs-string">&quot;fp16&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s download an  image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd2-upscale/low_res_cat.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>response = requests.get(url)
<span class="hljs-meta">&gt;&gt;&gt; </span>low_res_img = Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>low_res_img = low_res_img.resize((<span class="hljs-number">128</span>, <span class="hljs-number">128</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a white cat&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>upscaled_image = pipeline(prompt=prompt, image=low_res_img).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>upscaled_image.save(<span class="hljs-string">&quot;upsampled_cat.png&quot;</span>)`}}),{c(){o=a("p"),_=c("Examples:"),f=u(),w(l.$$.fragment)},l(s){o=i(s,"P",{});var p=r(o);_=d(p,"Examples:"),p.forEach(n),f=g(s),$(l.$$.fragment,s)},m(s,p){y(s,o,p),e(o,_),y(s,f,p),U(l,s,p),b=!0},p:Yt,i(s){b||(x(l.$$.fragment,s),b=!0)},o(s){T(l.$$.fragment,s),b=!1},d(s){s&&n(o),s&&n(f),S(l,s)}}}function $n(J){let o,_,f,l,b;return{c(){o=a("p"),_=c("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=a("code"),l=c("scaled_dot_product_attention"),b=c(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(s){o=i(s,"P",{});var p=r(o);_=d(p,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=i(p,"CODE",{});var j=r(f);l=d(j,"scaled_dot_product_attention"),j.forEach(n),b=d(p,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),p.forEach(n)},m(s,p){y(s,o,p),e(o,_),e(o,f),e(f,l),e(o,b)},d(s){s&&n(o)}}}function Un(J){let o,_,f,l,b;return l=new Ot({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){o=a("p"),_=c("Examples:"),f=u(),w(l.$$.fragment)},l(s){o=i(s,"P",{});var p=r(o);_=d(p,"Examples:"),p.forEach(n),f=g(s),$(l.$$.fragment,s)},m(s,p){y(s,o,p),e(o,_),y(s,f,p),U(l,s,p),b=!0},p:Yt,i(s){b||(x(l.$$.fragment,s),b=!0)},o(s){T(l.$$.fragment,s),b=!1},d(s){s&&n(o),s&&n(f),S(l,s)}}}function xn(J){let o,_;return{c(){o=a("p"),_=c(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(f){o=i(f,"P",{});var l=r(o);_=d(l,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),l.forEach(n)},m(f,l){y(f,o,l),e(o,_)},d(f){f&&n(o)}}}function Tn(J){let o,_,f,l,b;return l=new Ot({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){o=a("p"),_=c("Examples:"),f=u(),w(l.$$.fragment)},l(s){o=i(s,"P",{});var p=r(o);_=d(p,"Examples:"),p.forEach(n),f=g(s),$(l.$$.fragment,s)},m(s,p){y(s,o,p),e(o,_),y(s,f,p),U(l,s,p),b=!0},p:Yt,i(s){b||(x(l.$$.fragment,s),b=!0)},o(s){T(l.$$.fragment,s),b=!1},d(s){s&&n(o),s&&n(f),S(l,s)}}}function Sn(J){let o,_,f,l,b,s,p,j,W,z,D,G,N,re,F,A,le,P,M,De,k,pe,C,ce,L,Q,Je,de,at,je,it,Ve,v,fe,rt,ke,lt,pt,me,ct,Me,dt,ft,mt,X,ue,ut,Ze,gt,ht,Y,_t,Z,ge,bt,Ee,yt,vt,O,wt,q,$t,H,he,Ut,_e,xt,We,Tt,St,It,E,be,Dt,ye,Mt,ve,Pt,Jt,jt,K,kt,ee,Zt,te,we,Et,$e,Wt,Ue,Gt,Nt,Ft,ne,xe,At,Ge,Ct,Re,V,se,Ne,Te,Bt,Fe,Xt,ze,R,Se,Lt,Ae,Vt,Qe;return s=new zt({}),C=new Rt({props:{$$slots:{default:[vn]},$$scope:{ctx:J}}}),de=new zt({}),fe=new ie({props:{name:"class diffusers.StableDiffusionUpscalePipeline",anchor:"diffusers.StableDiffusionUpscalePipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"low_res_scheduler",val:": DDPMScheduler"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": typing.Optional[typing.Any] = None"},{name:"feature_extractor",val:": typing.Optional[transformers.models.clip.image_processing_clip.CLIPImageProcessor] = None"},{name:"watermarker",val:": typing.Optional[typing.Any] = None"},{name:"max_noise_level",val:": int = 350"}],parametersDescription:[{anchor:"diffusers.StableDiffusionUpscalePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionUpscalePipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionUpscalePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionUpscalePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionUpscalePipeline.low_res_scheduler",description:`<strong>low_res_scheduler</strong> (<a href="/docs/diffusers/v0.21.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler used to add initial noise to the low resolution conditioning image. It must be an instance of
<a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>.`,name:"low_res_scheduler"},{anchor:"diffusers.StableDiffusionUpscalePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.21.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.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L70"}}),ue=new ie({props:{name:"__call__",anchor:"diffusers.StableDiffusionUpscalePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"num_inference_steps",val:": int = 75"},{name:"guidance_scale",val:": float = 9.0"},{name:"noise_level",val:": int = 20"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": 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:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.FloatTensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code> or tensor representing an image batch to be upscaled.`,name:"image"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__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.StableDiffusionUpscalePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__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 is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__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 generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.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/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L500",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Y=new Qt({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.example",$$slots:{default:[wn]},$$scope:{ctx:J}}}),ge=new ie({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionUpscalePipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),O=new Rt({props:{warning:!0,$$slots:{default:[$n]},$$scope:{ctx:J}}}),q=new Qt({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_attention_slicing.example",$$slots:{default:[Un]},$$scope:{ctx:J}}}),he=new ie({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),be=new ie({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionUpscalePipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),K=new Rt({props:{warning:!0,$$slots:{default:[xn]},$$scope:{ctx:J}}}),ee=new Qt({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Tn]},$$scope:{ctx:J}}}),we=new ie({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),xe=new ie({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionUpscalePipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L194"}}),Te=new zt({}),Se=new ie({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L15"}}),{c(){o=a("meta"),_=u(),f=a("h1"),l=a("a"),b=a("span"),w(s.$$.fragment),p=u(),j=a("span"),W=c("Super-resolution"),z=u(),D=a("p"),G=c("The Stable Diffusion upscaler diffusion model was created by the researchers and engineers from "),N=a("a"),re=c("CompVis"),F=c(", "),A=a("a"),le=c("Stability AI"),P=c(", and "),M=a("a"),De=c("LAION"),k=c(". It is used to enhance the resolution of input images by a factor of 4."),pe=u(),w(C.$$.fragment),ce=u(),L=a("h2"),Q=a("a"),Je=a("span"),w(de.$$.fragment),at=u(),je=a("span"),it=c("StableDiffusionUpscalePipeline"),Ve=u(),v=a("div"),w(fe.$$.fragment),rt=u(),ke=a("p"),lt=c("Pipeline for text-guided image super-resolution using Stable Diffusion 2."),pt=u(),me=a("p"),ct=c("This model inherits from "),Me=a("a"),dt=c("DiffusionPipeline"),ft=c(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),mt=u(),X=a("div"),w(ue.$$.fragment),ut=u(),Ze=a("p"),gt=c("The call function to the pipeline for generation."),ht=u(),w(Y.$$.fragment),_t=u(),Z=a("div"),w(ge.$$.fragment),bt=u(),Ee=a("p"),yt=c(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),vt=u(),w(O.$$.fragment),wt=u(),w(q.$$.fragment),$t=u(),H=a("div"),w(he.$$.fragment),Ut=u(),_e=a("p"),xt=c("Disable sliced attention computation. If "),We=a("code"),Tt=c("enable_attention_slicing"),St=c(` was previously called, attention is
computed in one step.`),It=u(),E=a("div"),w(be.$$.fragment),Dt=u(),ye=a("p"),Mt=c("Enable memory efficient attention from "),ve=a("a"),Pt=c("xFormers"),Jt=c(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),jt=u(),w(K.$$.fragment),kt=u(),w(ee.$$.fragment),Zt=u(),te=a("div"),w(we.$$.fragment),Et=u(),$e=a("p"),Wt=c("Disable memory efficient attention from "),Ue=a("a"),Gt=c("xFormers"),Nt=c("."),Ft=u(),ne=a("div"),w(xe.$$.fragment),At=u(),Ge=a("p"),Ct=c("Encodes the prompt into text encoder hidden states."),Re=u(),V=a("h2"),se=a("a"),Ne=a("span"),w(Te.$$.fragment),Bt=u(),Fe=a("span"),Xt=c("StableDiffusionPipelineOutput"),ze=u(),R=a("div"),w(Se.$$.fragment),Lt=u(),Ae=a("p"),Vt=c("Output class for Stable Diffusion pipelines."),this.h()},l(t){const h=bn('[data-svelte="svelte-1phssyn"]',document.head);o=i(h,"META",{name:!0,content:!0}),h.forEach(n),_=g(t),f=i(t,"H1",{class:!0});var Ie=r(f);l=i(Ie,"A",{id:!0,class:!0,href:!0});var Ce=r(l);b=i(Ce,"SPAN",{});var Be=r(b);$(s.$$.fragment,Be),Be.forEach(n),Ce.forEach(n),p=g(Ie),j=i(Ie,"SPAN",{});var Xe=r(j);W=d(Xe,"Super-resolution"),Xe.forEach(n),Ie.forEach(n),z=g(t),D=i(t,"P",{});var B=r(D);G=d(B,"The Stable Diffusion upscaler diffusion model was created by the researchers and engineers from "),N=i(B,"A",{href:!0,rel:!0});var Le=r(N);re=d(Le,"CompVis"),Le.forEach(n),F=d(B,", "),A=i(B,"A",{href:!0,rel:!0});var qt=r(A);le=d(qt,"Stability AI"),qt.forEach(n),P=d(B,", and "),M=i(B,"A",{href:!0,rel:!0});var Ht=r(M);De=d(Ht,"LAION"),Ht.forEach(n),k=d(B,". It is used to enhance the resolution of input images by a factor of 4."),B.forEach(n),pe=g(t),$(C.$$.fragment,t),ce=g(t),L=i(t,"H2",{class:!0});var Ye=r(L);Q=i(Ye,"A",{id:!0,class:!0,href:!0});var Kt=r(Q);Je=i(Kt,"SPAN",{});var en=r(Je);$(de.$$.fragment,en),en.forEach(n),Kt.forEach(n),at=g(Ye),je=i(Ye,"SPAN",{});var tn=r(je);it=d(tn,"StableDiffusionUpscalePipeline"),tn.forEach(n),Ye.forEach(n),Ve=g(t),v=i(t,"DIV",{class:!0});var I=r(v);$(fe.$$.fragment,I),rt=g(I),ke=i(I,"P",{});var nn=r(ke);lt=d(nn,"Pipeline for text-guided image super-resolution using Stable Diffusion 2."),nn.forEach(n),pt=g(I),me=i(I,"P",{});var Oe=r(me);ct=d(Oe,"This model inherits from "),Me=i(Oe,"A",{href:!0});var sn=r(Me);dt=d(sn,"DiffusionPipeline"),sn.forEach(n),ft=d(Oe,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Oe.forEach(n),mt=g(I),X=i(I,"DIV",{class:!0});var Pe=r(X);$(ue.$$.fragment,Pe),ut=g(Pe),Ze=i(Pe,"P",{});var on=r(Ze);gt=d(on,"The call function to the pipeline for generation."),on.forEach(n),ht=g(Pe),$(Y.$$.fragment,Pe),Pe.forEach(n),_t=g(I),Z=i(I,"DIV",{class:!0});var oe=r(Z);$(ge.$$.fragment,oe),bt=g(oe),Ee=i(oe,"P",{});var an=r(Ee);yt=d(an,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),an.forEach(n),vt=g(oe),$(O.$$.fragment,oe),wt=g(oe),$(q.$$.fragment,oe),oe.forEach(n),$t=g(I),H=i(I,"DIV",{class:!0});var qe=r(H);$(he.$$.fragment,qe),Ut=g(qe),_e=i(qe,"P",{});var He=r(_e);xt=d(He,"Disable sliced attention computation. If "),We=i(He,"CODE",{});var rn=r(We);Tt=d(rn,"enable_attention_slicing"),rn.forEach(n),St=d(He,` was previously called, attention is
computed in one step.`),He.forEach(n),qe.forEach(n),It=g(I),E=i(I,"DIV",{class:!0});var ae=r(E);$(be.$$.fragment,ae),Dt=g(ae),ye=i(ae,"P",{});var Ke=r(ye);Mt=d(Ke,"Enable memory efficient attention from "),ve=i(Ke,"A",{href:!0,rel:!0});var ln=r(ve);Pt=d(ln,"xFormers"),ln.forEach(n),Jt=d(Ke,`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),Ke.forEach(n),jt=g(ae),$(K.$$.fragment,ae),kt=g(ae),$(ee.$$.fragment,ae),ae.forEach(n),Zt=g(I),te=i(I,"DIV",{class:!0});var et=r(te);$(we.$$.fragment,et),Et=g(et),$e=i(et,"P",{});var tt=r($e);Wt=d(tt,"Disable memory efficient attention from "),Ue=i(tt,"A",{href:!0,rel:!0});var pn=r(Ue);Gt=d(pn,"xFormers"),pn.forEach(n),Nt=d(tt,"."),tt.forEach(n),et.forEach(n),Ft=g(I),ne=i(I,"DIV",{class:!0});var nt=r(ne);$(xe.$$.fragment,nt),At=g(nt),Ge=i(nt,"P",{});var cn=r(Ge);Ct=d(cn,"Encodes the prompt into text encoder hidden states."),cn.forEach(n),nt.forEach(n),I.forEach(n),Re=g(t),V=i(t,"H2",{class:!0});var st=r(V);se=i(st,"A",{id:!0,class:!0,href:!0});var dn=r(se);Ne=i(dn,"SPAN",{});var fn=r(Ne);$(Te.$$.fragment,fn),fn.forEach(n),dn.forEach(n),Bt=g(st),Fe=i(st,"SPAN",{});var mn=r(Fe);Xt=d(mn,"StableDiffusionPipelineOutput"),mn.forEach(n),st.forEach(n),ze=g(t),R=i(t,"DIV",{class:!0});var ot=r(R);$(Se.$$.fragment,ot),Lt=g(ot),Ae=i(ot,"P",{});var un=r(Ae);Vt=d(un,"Output class for Stable Diffusion pipelines."),un.forEach(n),ot.forEach(n),this.h()},h(){m(o,"name","hf:doc:metadata"),m(o,"content",JSON.stringify(In)),m(l,"id","superresolution"),m(l,"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"),m(l,"href","#superresolution"),m(f,"class","relative group"),m(N,"href","https://github.com/CompVis"),m(N,"rel","nofollow"),m(A,"href","https://stability.ai/"),m(A,"rel","nofollow"),m(M,"href","https://laion.ai/"),m(M,"rel","nofollow"),m(Q,"id","diffusers.StableDiffusionUpscalePipeline"),m(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"),m(Q,"href","#diffusers.StableDiffusionUpscalePipeline"),m(L,"class","relative group"),m(Me,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ve,"href","https://facebookresearch.github.io/xformers/"),m(ve,"rel","nofollow"),m(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ue,"href","https://facebookresearch.github.io/xformers/"),m(Ue,"rel","nofollow"),m(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(se,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),m(se,"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"),m(se,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),m(V,"class","relative group"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,h){e(document.head,o),y(t,_,h),y(t,f,h),e(f,l),e(l,b),U(s,b,null),e(f,p),e(f,j),e(j,W),y(t,z,h),y(t,D,h),e(D,G),e(D,N),e(N,re),e(D,F),e(D,A),e(A,le),e(D,P),e(D,M),e(M,De),e(D,k),y(t,pe,h),U(C,t,h),y(t,ce,h),y(t,L,h),e(L,Q),e(Q,Je),U(de,Je,null),e(L,at),e(L,je),e(je,it),y(t,Ve,h),y(t,v,h),U(fe,v,null),e(v,rt),e(v,ke),e(ke,lt),e(v,pt),e(v,me),e(me,ct),e(me,Me),e(Me,dt),e(me,ft),e(v,mt),e(v,X),U(ue,X,null),e(X,ut),e(X,Ze),e(Ze,gt),e(X,ht),U(Y,X,null),e(v,_t),e(v,Z),U(ge,Z,null),e(Z,bt),e(Z,Ee),e(Ee,yt),e(Z,vt),U(O,Z,null),e(Z,wt),U(q,Z,null),e(v,$t),e(v,H),U(he,H,null),e(H,Ut),e(H,_e),e(_e,xt),e(_e,We),e(We,Tt),e(_e,St),e(v,It),e(v,E),U(be,E,null),e(E,Dt),e(E,ye),e(ye,Mt),e(ye,ve),e(ve,Pt),e(ye,Jt),e(E,jt),U(K,E,null),e(E,kt),U(ee,E,null),e(v,Zt),e(v,te),U(we,te,null),e(te,Et),e(te,$e),e($e,Wt),e($e,Ue),e(Ue,Gt),e($e,Nt),e(v,Ft),e(v,ne),U(xe,ne,null),e(ne,At),e(ne,Ge),e(Ge,Ct),y(t,Re,h),y(t,V,h),e(V,se),e(se,Ne),U(Te,Ne,null),e(V,Bt),e(V,Fe),e(Fe,Xt),y(t,ze,h),y(t,R,h),U(Se,R,null),e(R,Lt),e(R,Ae),e(Ae,Vt),Qe=!0},p(t,[h]){const Ie={};h&2&&(Ie.$$scope={dirty:h,ctx:t}),C.$set(Ie);const Ce={};h&2&&(Ce.$$scope={dirty:h,ctx:t}),Y.$set(Ce);const Be={};h&2&&(Be.$$scope={dirty:h,ctx:t}),O.$set(Be);const Xe={};h&2&&(Xe.$$scope={dirty:h,ctx:t}),q.$set(Xe);const B={};h&2&&(B.$$scope={dirty:h,ctx:t}),K.$set(B);const Le={};h&2&&(Le.$$scope={dirty:h,ctx:t}),ee.$set(Le)},i(t){Qe||(x(s.$$.fragment,t),x(C.$$.fragment,t),x(de.$$.fragment,t),x(fe.$$.fragment,t),x(ue.$$.fragment,t),x(Y.$$.fragment,t),x(ge.$$.fragment,t),x(O.$$.fragment,t),x(q.$$.fragment,t),x(he.$$.fragment,t),x(be.$$.fragment,t),x(K.$$.fragment,t),x(ee.$$.fragment,t),x(we.$$.fragment,t),x(xe.$$.fragment,t),x(Te.$$.fragment,t),x(Se.$$.fragment,t),Qe=!0)},o(t){T(s.$$.fragment,t),T(C.$$.fragment,t),T(de.$$.fragment,t),T(fe.$$.fragment,t),T(ue.$$.fragment,t),T(Y.$$.fragment,t),T(ge.$$.fragment,t),T(O.$$.fragment,t),T(q.$$.fragment,t),T(he.$$.fragment,t),T(be.$$.fragment,t),T(K.$$.fragment,t),T(ee.$$.fragment,t),T(we.$$.fragment,t),T(xe.$$.fragment,t),T(Te.$$.fragment,t),T(Se.$$.fragment,t),Qe=!1},d(t){n(o),t&&n(_),t&&n(f),S(s),t&&n(z),t&&n(D),t&&n(pe),S(C,t),t&&n(ce),t&&n(L),S(de),t&&n(Ve),t&&n(v),S(fe),S(ue),S(Y),S(ge),S(O),S(q),S(he),S(be),S(K),S(ee),S(we),S(xe),t&&n(Re),t&&n(V),S(Te),t&&n(ze),t&&n(R),S(Se)}}}const In={local:"superresolution",sections:[{local:"diffusers.StableDiffusionUpscalePipeline",title:"StableDiffusionUpscalePipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"}],title:"Super-resolution"};function Dn(J){return yn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class En extends gn{constructor(o){super();hn(this,o,Dn,Sn,_n,{})}}export{En as default,In as metadata};
