import{S as Sn,i as xn,s as Pn,e as o,k as m,w as v,t as r,M as Dn,c as i,d as n,m as h,a as l,x as $,h as p,b as u,G as e,g as y,y as U,q as T,o as M,B as I,v as Jn,L as on}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as nn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as re}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as ln}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as sn}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as an}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function jn(J){let a,_,f,c,b,s,d,j,G,Q,x,W,N,pe,C,F,ce;return{c(){a=o("p"),_=r("Make sure to check out the Stable Diffusion "),f=o("a"),c=r("Tips"),b=r(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),s=m(),d=o("p"),j=r("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),G=o("a"),Q=r("CompVis"),x=r(", "),W=o("a"),N=r("Runway"),pe=r(", and "),C=o("a"),F=r("Stability AI"),ce=r(" Hub organizations!"),this.h()},l(D){a=i(D,"P",{});var P=l(a);_=p(P,"Make sure to check out the Stable Diffusion "),f=i(P,"A",{href:!0});var De=l(f);c=p(De,"Tips"),De.forEach(n),b=p(P," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),P.forEach(n),s=h(D),d=i(D,"P",{});var E=l(d);j=p(E,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),G=i(E,"A",{href:!0,rel:!0});var de=l(G);Q=p(de,"CompVis"),de.forEach(n),x=p(E,", "),W=i(E,"A",{href:!0,rel:!0});var B=l(W);N=p(B,"Runway"),B.forEach(n),pe=p(E,", and "),C=i(E,"A",{href:!0,rel:!0});var fe=l(C);F=p(fe,"Stability AI"),fe.forEach(n),ce=p(E," Hub organizations!"),E.forEach(n),this.h()},h(){u(f,"href","overview#tips"),u(G,"href","https://huggingface.co/CompVis"),u(G,"rel","nofollow"),u(W,"href","https://huggingface.co/runwayml"),u(W,"rel","nofollow"),u(C,"href","https://huggingface.co/stabilityai"),u(C,"rel","nofollow")},m(D,P){y(D,a,P),e(a,_),e(a,f),e(f,c),e(a,b),y(D,s,P),y(D,d,P),e(d,j),e(d,G),e(G,Q),e(d,x),e(d,W),e(W,N),e(d,pe),e(d,C),e(C,F),e(d,ce)},d(D){D&&n(a),D&&n(s),D&&n(d)}}}function En(J){let a,_,f,c,b;return c=new ln({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(){a=o("p"),_=r("Examples:"),f=m(),v(c.$$.fragment)},l(s){a=i(s,"P",{});var d=l(a);_=p(d,"Examples:"),d.forEach(n),f=h(s),$(c.$$.fragment,s)},m(s,d){y(s,a,d),e(a,_),y(s,f,d),U(c,s,d),b=!0},p:on,i(s){b||(T(c.$$.fragment,s),b=!0)},o(s){M(c.$$.fragment,s),b=!1},d(s){s&&n(a),s&&n(f),I(c,s)}}}function kn(J){let a,_,f,c,b;return{c(){a=o("p"),_=r("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=o("code"),c=r("scaled_dot_product_attention"),b=r(` (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){a=i(s,"P",{});var d=l(a);_=p(d,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=i(d,"CODE",{});var j=l(f);c=p(j,"scaled_dot_product_attention"),j.forEach(n),b=p(d,` (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!`),d.forEach(n)},m(s,d){y(s,a,d),e(a,_),e(a,f),e(f,c),e(a,b)},d(s){s&&n(a)}}}function Zn(J){let a,_,f,c,b;return c=new ln({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(){a=o("p"),_=r("Examples:"),f=m(),v(c.$$.fragment)},l(s){a=i(s,"P",{});var d=l(a);_=p(d,"Examples:"),d.forEach(n),f=h(s),$(c.$$.fragment,s)},m(s,d){y(s,a,d),e(a,_),y(s,f,d),U(c,s,d),b=!0},p:on,i(s){b||(T(c.$$.fragment,s),b=!0)},o(s){M(c.$$.fragment,s),b=!1},d(s){s&&n(a),s&&n(f),I(c,s)}}}function Gn(J){let a,_;return{c(){a=o("p"),_=r(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(f){a=i(f,"P",{});var c=l(a);_=p(c,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),c.forEach(n)},m(f,c){y(f,a,c),e(a,_)},d(f){f&&n(a)}}}function Wn(J){let a,_,f,c,b;return c=new ln({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(){a=o("p"),_=r("Examples:"),f=m(),v(c.$$.fragment)},l(s){a=i(s,"P",{});var d=l(a);_=p(d,"Examples:"),d.forEach(n),f=h(s),$(c.$$.fragment,s)},m(s,d){y(s,a,d),e(a,_),y(s,f,d),U(c,s,d),b=!0},p:on,i(s){b||(T(c.$$.fragment,s),b=!0)},o(s){M(c.$$.fragment,s),b=!1},d(s){s&&n(a),s&&n(f),I(c,s)}}}function Nn(J){let a,_,f,c,b,s,d,j,G,Q,x,W,N,pe,C,F,ce,D,P,De,E,de,B,fe,V,Y,Ee,ue,pt,ke,ct,Ye,w,me,dt,Ze,ft,ut,he,mt,Je,ht,gt,_t,L,ge,bt,Ge,yt,wt,O,vt,k,_e,$t,We,Ut,Tt,q,Mt,H,It,K,be,St,ye,xt,Ne,Pt,Dt,Jt,Z,we,jt,ve,Et,$e,kt,Zt,Gt,ee,Wt,te,Nt,ne,Ue,Ct,Te,Ft,Me,Bt,At,Xt,se,Ie,Lt,A,Vt,Ce,Rt,zt,Fe,Qt,Yt,Be,Ot,qt,Oe,R,ae,Ae,Se,Ht,Xe,Kt,qe,z,xe,en,Le,tn,He;return s=new sn({}),B=new nn({props:{$$slots:{default:[jn]},$$scope:{ctx:J}}}),ue=new sn({}),me=new re({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.20.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> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) &#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> (<a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionUpscalePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.20.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.20.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.20.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.20.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.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L68"}}),ge=new re({props:{name:"__call__",anchor:"diffusers.StableDiffusionUpscalePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image, numpy.ndarray, typing.List[torch.FloatTensor], typing.List[PIL.Image.Image], typing.List[numpy.ndarray]] = 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[typing.List[str], 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.20.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.20.0/en/api/pipelines/stable_diffusion/upscale#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.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L495",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),O=new an({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.example",$$slots:{default:[En]},$$scope:{ctx:J}}}),_e=new re({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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),q=new nn({props:{warning:!0,$$slots:{default:[kn]},$$scope:{ctx:J}}}),H=new an({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_attention_slicing.example",$$slots:{default:[Zn]},$$scope:{ctx:J}}}),be=new re({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),we=new re({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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),ee=new nn({props:{warning:!0,$$slots:{default:[Gn]},$$scope:{ctx:J}}}),te=new an({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Wn]},$$scope:{ctx:J}}}),Ue=new re({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),Ie=new re({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionUpscalePipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L141"}}),Se=new sn({}),xe=new re({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.20.0/src/diffusers/pipelines/stable_diffusion/__init__.py#L22"}}),{c(){a=o("meta"),_=m(),f=o("h1"),c=o("a"),b=o("span"),v(s.$$.fragment),d=m(),j=o("span"),G=r("Super-resolution"),Q=m(),x=o("p"),W=r("The Stable Diffusion upscaler diffusion model was created by the researchers and engineers from "),N=o("a"),pe=r("CompVis"),C=r(", "),F=o("a"),ce=r("Stability AI"),D=r(", and "),P=o("a"),De=r("LAION"),E=r(". It is used to enhance the resolution of input images by a factor of 4."),de=m(),v(B.$$.fragment),fe=m(),V=o("h2"),Y=o("a"),Ee=o("span"),v(ue.$$.fragment),pt=m(),ke=o("span"),ct=r("StableDiffusionUpscalePipeline"),Ye=m(),w=o("div"),v(me.$$.fragment),dt=m(),Ze=o("p"),ft=r("Pipeline for text-guided image super-resolution using Stable Diffusion 2."),ut=m(),he=o("p"),mt=r("This model inherits from "),Je=o("a"),ht=r("DiffusionPipeline"),gt=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),_t=m(),L=o("div"),v(ge.$$.fragment),bt=m(),Ge=o("p"),yt=r("The call function to the pipeline for generation."),wt=m(),v(O.$$.fragment),vt=m(),k=o("div"),v(_e.$$.fragment),$t=m(),We=o("p"),Ut=r(`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.`),Tt=m(),v(q.$$.fragment),Mt=m(),v(H.$$.fragment),It=m(),K=o("div"),v(be.$$.fragment),St=m(),ye=o("p"),xt=r("Disable sliced attention computation. If "),Ne=o("code"),Pt=r("enable_attention_slicing"),Dt=r(` was previously called, attention is
computed in one step.`),Jt=m(),Z=o("div"),v(we.$$.fragment),jt=m(),ve=o("p"),Et=r("Enable memory efficient attention from "),$e=o("a"),kt=r("xFormers"),Zt=r(`. 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.`),Gt=m(),v(ee.$$.fragment),Wt=m(),v(te.$$.fragment),Nt=m(),ne=o("div"),v(Ue.$$.fragment),Ct=m(),Te=o("p"),Ft=r("Disable memory efficient attention from "),Me=o("a"),Bt=r("xFormers"),At=r("."),Xt=m(),se=o("div"),v(Ie.$$.fragment),Lt=m(),A=o("p"),Vt=r(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),Ce=o("code"),Rt=r("forward"),zt=r(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Fe=o("code"),Qt=r("enable_sequential_cpu_offload"),Yt=r(`, but performance is much better due to the
iterative execution of the `),Be=o("code"),Ot=r("unet"),qt=r("."),Oe=m(),R=o("h2"),ae=o("a"),Ae=o("span"),v(Se.$$.fragment),Ht=m(),Xe=o("span"),Kt=r("StableDiffusionPipelineOutput"),qe=m(),z=o("div"),v(xe.$$.fragment),en=m(),Le=o("p"),tn=r("Output class for Stable Diffusion pipelines."),this.h()},l(t){const g=Dn('[data-svelte="svelte-1phssyn"]',document.head);a=i(g,"META",{name:!0,content:!0}),g.forEach(n),_=h(t),f=i(t,"H1",{class:!0});var Pe=l(f);c=i(Pe,"A",{id:!0,class:!0,href:!0});var Ve=l(c);b=i(Ve,"SPAN",{});var Re=l(b);$(s.$$.fragment,Re),Re.forEach(n),Ve.forEach(n),d=h(Pe),j=i(Pe,"SPAN",{});var ze=l(j);G=p(ze,"Super-resolution"),ze.forEach(n),Pe.forEach(n),Q=h(t),x=i(t,"P",{});var X=l(x);W=p(X,"The Stable Diffusion upscaler diffusion model was created by the researchers and engineers from "),N=i(X,"A",{href:!0,rel:!0});var Qe=l(N);pe=p(Qe,"CompVis"),Qe.forEach(n),C=p(X,", "),F=i(X,"A",{href:!0,rel:!0});var rn=l(F);ce=p(rn,"Stability AI"),rn.forEach(n),D=p(X,", and "),P=i(X,"A",{href:!0,rel:!0});var pn=l(P);De=p(pn,"LAION"),pn.forEach(n),E=p(X,". It is used to enhance the resolution of input images by a factor of 4."),X.forEach(n),de=h(t),$(B.$$.fragment,t),fe=h(t),V=i(t,"H2",{class:!0});var Ke=l(V);Y=i(Ke,"A",{id:!0,class:!0,href:!0});var cn=l(Y);Ee=i(cn,"SPAN",{});var dn=l(Ee);$(ue.$$.fragment,dn),dn.forEach(n),cn.forEach(n),pt=h(Ke),ke=i(Ke,"SPAN",{});var fn=l(ke);ct=p(fn,"StableDiffusionUpscalePipeline"),fn.forEach(n),Ke.forEach(n),Ye=h(t),w=i(t,"DIV",{class:!0});var S=l(w);$(me.$$.fragment,S),dt=h(S),Ze=i(S,"P",{});var un=l(Ze);ft=p(un,"Pipeline for text-guided image super-resolution using Stable Diffusion 2."),un.forEach(n),ut=h(S),he=i(S,"P",{});var et=l(he);mt=p(et,"This model inherits from "),Je=i(et,"A",{href:!0});var mn=l(Je);ht=p(mn,"DiffusionPipeline"),mn.forEach(n),gt=p(et,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),et.forEach(n),_t=h(S),L=i(S,"DIV",{class:!0});var je=l(L);$(ge.$$.fragment,je),bt=h(je),Ge=i(je,"P",{});var hn=l(Ge);yt=p(hn,"The call function to the pipeline for generation."),hn.forEach(n),wt=h(je),$(O.$$.fragment,je),je.forEach(n),vt=h(S),k=i(S,"DIV",{class:!0});var oe=l(k);$(_e.$$.fragment,oe),$t=h(oe),We=i(oe,"P",{});var gn=l(We);Ut=p(gn,`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.`),gn.forEach(n),Tt=h(oe),$(q.$$.fragment,oe),Mt=h(oe),$(H.$$.fragment,oe),oe.forEach(n),It=h(S),K=i(S,"DIV",{class:!0});var tt=l(K);$(be.$$.fragment,tt),St=h(tt),ye=i(tt,"P",{});var nt=l(ye);xt=p(nt,"Disable sliced attention computation. If "),Ne=i(nt,"CODE",{});var _n=l(Ne);Pt=p(_n,"enable_attention_slicing"),_n.forEach(n),Dt=p(nt,` was previously called, attention is
computed in one step.`),nt.forEach(n),tt.forEach(n),Jt=h(S),Z=i(S,"DIV",{class:!0});var ie=l(Z);$(we.$$.fragment,ie),jt=h(ie),ve=i(ie,"P",{});var st=l(ve);Et=p(st,"Enable memory efficient attention from "),$e=i(st,"A",{href:!0,rel:!0});var bn=l($e);kt=p(bn,"xFormers"),bn.forEach(n),Zt=p(st,`. 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.`),st.forEach(n),Gt=h(ie),$(ee.$$.fragment,ie),Wt=h(ie),$(te.$$.fragment,ie),ie.forEach(n),Nt=h(S),ne=i(S,"DIV",{class:!0});var at=l(ne);$(Ue.$$.fragment,at),Ct=h(at),Te=i(at,"P",{});var ot=l(Te);Ft=p(ot,"Disable memory efficient attention from "),Me=i(ot,"A",{href:!0,rel:!0});var yn=l(Me);Bt=p(yn,"xFormers"),yn.forEach(n),At=p(ot,"."),ot.forEach(n),at.forEach(n),Xt=h(S),se=i(S,"DIV",{class:!0});var it=l(se);$(Ie.$$.fragment,it),Lt=h(it),A=i(it,"P",{});var le=l(A);Vt=p(le,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),Ce=i(le,"CODE",{});var wn=l(Ce);Rt=p(wn,"forward"),wn.forEach(n),zt=p(le,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),Fe=i(le,"CODE",{});var vn=l(Fe);Qt=p(vn,"enable_sequential_cpu_offload"),vn.forEach(n),Yt=p(le,`, but performance is much better due to the
iterative execution of the `),Be=i(le,"CODE",{});var $n=l(Be);Ot=p($n,"unet"),$n.forEach(n),qt=p(le,"."),le.forEach(n),it.forEach(n),S.forEach(n),Oe=h(t),R=i(t,"H2",{class:!0});var lt=l(R);ae=i(lt,"A",{id:!0,class:!0,href:!0});var Un=l(ae);Ae=i(Un,"SPAN",{});var Tn=l(Ae);$(Se.$$.fragment,Tn),Tn.forEach(n),Un.forEach(n),Ht=h(lt),Xe=i(lt,"SPAN",{});var Mn=l(Xe);Kt=p(Mn,"StableDiffusionPipelineOutput"),Mn.forEach(n),lt.forEach(n),qe=h(t),z=i(t,"DIV",{class:!0});var rt=l(z);$(xe.$$.fragment,rt),en=h(rt),Le=i(rt,"P",{});var In=l(Le);tn=p(In,"Output class for Stable Diffusion pipelines."),In.forEach(n),rt.forEach(n),this.h()},h(){u(a,"name","hf:doc:metadata"),u(a,"content",JSON.stringify(Cn)),u(c,"id","superresolution"),u(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"),u(c,"href","#superresolution"),u(f,"class","relative group"),u(N,"href","https://github.com/CompVis"),u(N,"rel","nofollow"),u(F,"href","https://stability.ai/"),u(F,"rel","nofollow"),u(P,"href","https://laion.ai/"),u(P,"rel","nofollow"),u(Y,"id","diffusers.StableDiffusionUpscalePipeline"),u(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Y,"href","#diffusers.StableDiffusionUpscalePipeline"),u(V,"class","relative group"),u(Je,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u($e,"href","https://facebookresearch.github.io/xformers/"),u($e,"rel","nofollow"),u(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Me,"href","https://facebookresearch.github.io/xformers/"),u(Me,"rel","nofollow"),u(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ae,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),u(ae,"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"),u(ae,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),u(R,"class","relative group"),u(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(t,g){e(document.head,a),y(t,_,g),y(t,f,g),e(f,c),e(c,b),U(s,b,null),e(f,d),e(f,j),e(j,G),y(t,Q,g),y(t,x,g),e(x,W),e(x,N),e(N,pe),e(x,C),e(x,F),e(F,ce),e(x,D),e(x,P),e(P,De),e(x,E),y(t,de,g),U(B,t,g),y(t,fe,g),y(t,V,g),e(V,Y),e(Y,Ee),U(ue,Ee,null),e(V,pt),e(V,ke),e(ke,ct),y(t,Ye,g),y(t,w,g),U(me,w,null),e(w,dt),e(w,Ze),e(Ze,ft),e(w,ut),e(w,he),e(he,mt),e(he,Je),e(Je,ht),e(he,gt),e(w,_t),e(w,L),U(ge,L,null),e(L,bt),e(L,Ge),e(Ge,yt),e(L,wt),U(O,L,null),e(w,vt),e(w,k),U(_e,k,null),e(k,$t),e(k,We),e(We,Ut),e(k,Tt),U(q,k,null),e(k,Mt),U(H,k,null),e(w,It),e(w,K),U(be,K,null),e(K,St),e(K,ye),e(ye,xt),e(ye,Ne),e(Ne,Pt),e(ye,Dt),e(w,Jt),e(w,Z),U(we,Z,null),e(Z,jt),e(Z,ve),e(ve,Et),e(ve,$e),e($e,kt),e(ve,Zt),e(Z,Gt),U(ee,Z,null),e(Z,Wt),U(te,Z,null),e(w,Nt),e(w,ne),U(Ue,ne,null),e(ne,Ct),e(ne,Te),e(Te,Ft),e(Te,Me),e(Me,Bt),e(Te,At),e(w,Xt),e(w,se),U(Ie,se,null),e(se,Lt),e(se,A),e(A,Vt),e(A,Ce),e(Ce,Rt),e(A,zt),e(A,Fe),e(Fe,Qt),e(A,Yt),e(A,Be),e(Be,Ot),e(A,qt),y(t,Oe,g),y(t,R,g),e(R,ae),e(ae,Ae),U(Se,Ae,null),e(R,Ht),e(R,Xe),e(Xe,Kt),y(t,qe,g),y(t,z,g),U(xe,z,null),e(z,en),e(z,Le),e(Le,tn),He=!0},p(t,[g]){const Pe={};g&2&&(Pe.$$scope={dirty:g,ctx:t}),B.$set(Pe);const Ve={};g&2&&(Ve.$$scope={dirty:g,ctx:t}),O.$set(Ve);const Re={};g&2&&(Re.$$scope={dirty:g,ctx:t}),q.$set(Re);const ze={};g&2&&(ze.$$scope={dirty:g,ctx:t}),H.$set(ze);const X={};g&2&&(X.$$scope={dirty:g,ctx:t}),ee.$set(X);const Qe={};g&2&&(Qe.$$scope={dirty:g,ctx:t}),te.$set(Qe)},i(t){He||(T(s.$$.fragment,t),T(B.$$.fragment,t),T(ue.$$.fragment,t),T(me.$$.fragment,t),T(ge.$$.fragment,t),T(O.$$.fragment,t),T(_e.$$.fragment,t),T(q.$$.fragment,t),T(H.$$.fragment,t),T(be.$$.fragment,t),T(we.$$.fragment,t),T(ee.$$.fragment,t),T(te.$$.fragment,t),T(Ue.$$.fragment,t),T(Ie.$$.fragment,t),T(Se.$$.fragment,t),T(xe.$$.fragment,t),He=!0)},o(t){M(s.$$.fragment,t),M(B.$$.fragment,t),M(ue.$$.fragment,t),M(me.$$.fragment,t),M(ge.$$.fragment,t),M(O.$$.fragment,t),M(_e.$$.fragment,t),M(q.$$.fragment,t),M(H.$$.fragment,t),M(be.$$.fragment,t),M(we.$$.fragment,t),M(ee.$$.fragment,t),M(te.$$.fragment,t),M(Ue.$$.fragment,t),M(Ie.$$.fragment,t),M(Se.$$.fragment,t),M(xe.$$.fragment,t),He=!1},d(t){n(a),t&&n(_),t&&n(f),I(s),t&&n(Q),t&&n(x),t&&n(de),I(B,t),t&&n(fe),t&&n(V),I(ue),t&&n(Ye),t&&n(w),I(me),I(ge),I(O),I(_e),I(q),I(H),I(be),I(we),I(ee),I(te),I(Ue),I(Ie),t&&n(Oe),t&&n(R),I(Se),t&&n(qe),t&&n(z),I(xe)}}}const Cn={local:"superresolution",sections:[{local:"diffusers.StableDiffusionUpscalePipeline",title:"StableDiffusionUpscalePipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"}],title:"Super-resolution"};function Fn(J){return Jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zn extends Sn{constructor(a){super();xn(this,a,Fn,Nn,Pn,{})}}export{zn as default,Cn as metadata};
