import{S as is,i as ls,s as rs,e as s,k as p,w as U,t as i,M as cs,c as a,d as n,m as d,a as o,x as $,h as l,b as c,G as e,g as _,y as x,q as P,o as M,B as S,v as ps,L as as}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as ds}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as V}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as os}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ns}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ss}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function fs(G){let f,y,h,u,w;return u=new os({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(){f=s("p"),y=i("Examples:"),h=p(),U(u.$$.fragment)},l(r){f=a(r,"P",{});var v=o(f);y=l(v,"Examples:"),v.forEach(n),h=d(r),$(u.$$.fragment,r)},m(r,v){_(r,f,v),e(f,y),_(r,h,v),x(u,r,v),w=!0},p:as,i(r){w||(P(u.$$.fragment,r),w=!0)},o(r){M(u.$$.fragment,r),w=!1},d(r){r&&n(f),r&&n(h),S(u,r)}}}function us(G){let f,y;return{c(){f=s("p"),y=i(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(h){f=a(h,"P",{});var u=o(f);y=l(u,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),u.forEach(n)},m(h,u){_(h,f,u),e(f,y)},d(h){h&&n(f)}}}function ms(G){let f,y,h,u,w;return u=new os({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(){f=s("p"),y=i("Examples:"),h=p(),U(u.$$.fragment)},l(r){f=a(r,"P",{});var v=o(f);y=l(v,"Examples:"),v.forEach(n),h=d(r),$(u.$$.fragment,r)},m(r,v){_(r,f,v),e(f,y),_(r,h,v),x(u,r,v),w=!0},p:as,i(r){w||(P(u.$$.fragment,r),w=!0)},o(r){M(u.$$.fragment,r),w=!1},d(r){r&&n(f),r&&n(h),S(u,r)}}}function hs(G){let f,y,h,u,w,r,v,Pe,ct,Xe,W,C,Me,z,pt,Se,dt,Ae,D,ft,q,ut,mt,Q,ht,gt,O,_t,bt,_e,vt,yt,Re,be,wt,Ve,ve,Y,De,Ut,$t,H,xt,ze,ye,Pt,qe,we,K,Ie,Mt,St,ee,Dt,Qe,g,te,It,Te,Tt,Et,ne,jt,Ue,kt,Zt,Jt,E,se,Wt,Ee,Gt,Ct,N,Nt,j,ae,Ft,je,Bt,Lt,ke,Xt,At,F,oe,Rt,ie,Vt,Ze,zt,qt,Qt,I,le,Ot,re,Yt,ce,Ht,Kt,en,Je,tn,nn,B,sn,L,an,X,pe,on,de,ln,fe,rn,cn,pn,A,ue,dn,T,fn,We,un,mn,Ge,hn,gn,Ce,_n,bn,Ne,vn,yn,wn,R,me,Un,he,$n,Fe,xn,Pn,Oe;return r=new ns({}),z=new ns({}),te=new V({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.18.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. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionUpscalePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionUpscalePipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.18.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture 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.18.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler used to add initial noise to the low res conditioning image. It must be an instance of
<a href="/docs/diffusers/v0.18.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.18.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.18.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.18.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.18.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L68"}}),se=new V({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 the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,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 which will 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;
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>,
usually at the expense of lower image quality.`,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 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.__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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.18.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.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 will ge 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, <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.__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, <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.__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.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.18.0/en/api/pipelines/stable_diffusion/overview#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 will be called every <code>callback_steps</code> steps during inference. The function will be
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 will be called. If not specified, the callback will be
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 under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L504",returnDescription:`
<p><a
  href="/docs/diffusers/v0.18.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.18.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),N=new ss({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.__call__.example",$$slots:{default:[fs]},$$scope:{ctx:G}}}),ae=new V({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.18.0/src/diffusers/pipelines/pipeline_utils.py#L1461"}}),oe=new V({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/pipeline_utils.py#L1477"}}),le=new V({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.18.0/src/diffusers/pipelines/pipeline_utils.py#L1399"}}),B=new ds({props:{warning:!0,$$slots:{default:[us]},$$scope:{ctx:G}}}),L=new ss({props:{anchor:"diffusers.StableDiffusionUpscalePipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[ms]},$$scope:{ctx:G}}}),pe=new V({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionUpscalePipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/pipeline_utils.py#L1435"}}),ue=new V({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.18.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L160"}}),me=new V({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionUpscalePipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py#L143"}}),{c(){f=s("meta"),y=p(),h=s("h1"),u=s("a"),w=s("span"),U(r.$$.fragment),v=p(),Pe=s("span"),ct=i("Super-Resolution"),Xe=p(),W=s("h2"),C=s("a"),Me=s("span"),U(z.$$.fragment),pt=p(),Se=s("span"),dt=i("StableDiffusionUpscalePipeline"),Ae=p(),D=s("p"),ft=i("The upscaler diffusion model was created by the researchers and engineers from "),q=s("a"),ut=i("CompVis"),mt=i(", "),Q=s("a"),ht=i("Stability AI"),gt=i(", and "),O=s("a"),_t=i("LAION"),bt=i(", as part of Stable Diffusion 2.0. "),_e=s("a"),vt=i("StableDiffusionUpscalePipeline"),yt=i(" can be used to enhance the resolution of input images by a factor of 4."),Re=p(),be=s("p"),wt=i("The original codebase can be found here:"),Ve=p(),ve=s("ul"),Y=s("li"),De=s("em"),Ut=i("Stable Diffusion v2"),$t=i(": "),H=s("a"),xt=i("Stability-AI/stablediffusion"),ze=p(),ye=s("p"),Pt=i("Available Checkpoints are:"),qe=p(),we=s("ul"),K=s("li"),Ie=s("em"),Mt=i("stabilityai/stable-diffusion-x4-upscaler (x4 resolution resolution)"),St=i(": "),ee=s("a"),Dt=i("stable-diffusion-x4-upscaler"),Qe=p(),g=s("div"),U(te.$$.fragment),It=p(),Te=s("p"),Tt=i("Pipeline for text-guided image super-resolution using Stable Diffusion 2."),Et=p(),ne=s("p"),jt=i("This model inherits from "),Ue=s("a"),kt=i("DiffusionPipeline"),Zt=i(`. 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.)`),Jt=p(),E=s("div"),U(se.$$.fragment),Wt=p(),Ee=s("p"),Gt=i("Function invoked when calling the pipeline for generation."),Ct=p(),U(N.$$.fragment),Nt=p(),j=s("div"),U(ae.$$.fragment),Ft=p(),je=s("p"),Bt=i("Enable sliced attention computation."),Lt=p(),ke=s("p"),Xt=i(`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful to save some memory in exchange for a small speed decrease.`),At=p(),F=s("div"),U(oe.$$.fragment),Rt=p(),ie=s("p"),Vt=i("Disable sliced attention computation. If "),Ze=s("code"),zt=i("enable_attention_slicing"),qt=i(` was previously called, attention is
computed in one step.`),Qt=p(),I=s("div"),U(le.$$.fragment),Ot=p(),re=s("p"),Yt=i("Enable memory efficient attention from "),ce=s("a"),Ht=i("xFormers"),Kt=i("."),en=p(),Je=s("p"),tn=i(`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.`),nn=p(),U(B.$$.fragment),sn=p(),U(L.$$.fragment),an=p(),X=s("div"),U(pe.$$.fragment),on=p(),de=s("p"),ln=i("Disable memory efficient attention from "),fe=s("a"),rn=i("xFormers"),cn=i("."),pn=p(),A=s("div"),U(ue.$$.fragment),dn=p(),T=s("p"),fn=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),We=s("code"),un=i("enable_sequential_cpu_offload"),mn=i(", this method moves one whole model at a time to the GPU when its "),Ge=s("code"),hn=i("forward"),gn=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ce=s("code"),_n=i("enable_sequential_cpu_offload"),bn=i(", but performance is much better due to the iterative execution of the "),Ne=s("code"),vn=i("unet"),yn=i("."),wn=p(),R=s("div"),U(me.$$.fragment),Un=p(),he=s("p"),$n=i(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Fe=s("code"),xn=i("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Pn=i("forward` method called."),this.h()},l(t){const m=cs('[data-svelte="svelte-1phssyn"]',document.head);f=a(m,"META",{name:!0,content:!0}),m.forEach(n),y=d(t),h=a(t,"H1",{class:!0});var ge=o(h);u=a(ge,"A",{id:!0,class:!0,href:!0});var Be=o(u);w=a(Be,"SPAN",{});var Le=o(w);$(r.$$.fragment,Le),Le.forEach(n),Be.forEach(n),v=d(ge),Pe=a(ge,"SPAN",{});var Mn=o(Pe);ct=l(Mn,"Super-Resolution"),Mn.forEach(n),ge.forEach(n),Xe=d(t),W=a(t,"H2",{class:!0});var Ye=o(W);C=a(Ye,"A",{id:!0,class:!0,href:!0});var Sn=o(C);Me=a(Sn,"SPAN",{});var Dn=o(Me);$(z.$$.fragment,Dn),Dn.forEach(n),Sn.forEach(n),pt=d(Ye),Se=a(Ye,"SPAN",{});var In=o(Se);dt=l(In,"StableDiffusionUpscalePipeline"),In.forEach(n),Ye.forEach(n),Ae=d(t),D=a(t,"P",{});var k=o(D);ft=l(k,"The upscaler diffusion model was created by the researchers and engineers from "),q=a(k,"A",{href:!0,rel:!0});var Tn=o(q);ut=l(Tn,"CompVis"),Tn.forEach(n),mt=l(k,", "),Q=a(k,"A",{href:!0,rel:!0});var En=o(Q);ht=l(En,"Stability AI"),En.forEach(n),gt=l(k,", and "),O=a(k,"A",{href:!0,rel:!0});var jn=o(O);_t=l(jn,"LAION"),jn.forEach(n),bt=l(k,", as part of Stable Diffusion 2.0. "),_e=a(k,"A",{href:!0});var kn=o(_e);vt=l(kn,"StableDiffusionUpscalePipeline"),kn.forEach(n),yt=l(k," can be used to enhance the resolution of input images by a factor of 4."),k.forEach(n),Re=d(t),be=a(t,"P",{});var Zn=o(be);wt=l(Zn,"The original codebase can be found here:"),Zn.forEach(n),Ve=d(t),ve=a(t,"UL",{});var Jn=o(ve);Y=a(Jn,"LI",{});var He=o(Y);De=a(He,"EM",{});var Wn=o(De);Ut=l(Wn,"Stable Diffusion v2"),Wn.forEach(n),$t=l(He,": "),H=a(He,"A",{href:!0,rel:!0});var Gn=o(H);xt=l(Gn,"Stability-AI/stablediffusion"),Gn.forEach(n),He.forEach(n),Jn.forEach(n),ze=d(t),ye=a(t,"P",{});var Cn=o(ye);Pt=l(Cn,"Available Checkpoints are:"),Cn.forEach(n),qe=d(t),we=a(t,"UL",{});var Nn=o(we);K=a(Nn,"LI",{});var Ke=o(K);Ie=a(Ke,"EM",{});var Fn=o(Ie);Mt=l(Fn,"stabilityai/stable-diffusion-x4-upscaler (x4 resolution resolution)"),Fn.forEach(n),St=l(Ke,": "),ee=a(Ke,"A",{href:!0,rel:!0});var Bn=o(ee);Dt=l(Bn,"stable-diffusion-x4-upscaler"),Bn.forEach(n),Ke.forEach(n),Nn.forEach(n),Qe=d(t),g=a(t,"DIV",{class:!0});var b=o(g);$(te.$$.fragment,b),It=d(b),Te=a(b,"P",{});var Ln=o(Te);Tt=l(Ln,"Pipeline for text-guided image super-resolution using Stable Diffusion 2."),Ln.forEach(n),Et=d(b),ne=a(b,"P",{});var et=o(ne);jt=l(et,"This model inherits from "),Ue=a(et,"A",{href:!0});var Xn=o(Ue);kt=l(Xn,"DiffusionPipeline"),Xn.forEach(n),Zt=l(et,`. 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.)`),et.forEach(n),Jt=d(b),E=a(b,"DIV",{class:!0});var $e=o(E);$(se.$$.fragment,$e),Wt=d($e),Ee=a($e,"P",{});var An=o(Ee);Gt=l(An,"Function invoked when calling the pipeline for generation."),An.forEach(n),Ct=d($e),$(N.$$.fragment,$e),$e.forEach(n),Nt=d(b),j=a(b,"DIV",{class:!0});var xe=o(j);$(ae.$$.fragment,xe),Ft=d(xe),je=a(xe,"P",{});var Rn=o(je);Bt=l(Rn,"Enable sliced attention computation."),Rn.forEach(n),Lt=d(xe),ke=a(xe,"P",{});var Vn=o(ke);Xt=l(Vn,`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful to save some memory in exchange for a small speed decrease.`),Vn.forEach(n),xe.forEach(n),At=d(b),F=a(b,"DIV",{class:!0});var tt=o(F);$(oe.$$.fragment,tt),Rt=d(tt),ie=a(tt,"P",{});var nt=o(ie);Vt=l(nt,"Disable sliced attention computation. If "),Ze=a(nt,"CODE",{});var zn=o(Ze);zt=l(zn,"enable_attention_slicing"),zn.forEach(n),qt=l(nt,` was previously called, attention is
computed in one step.`),nt.forEach(n),tt.forEach(n),Qt=d(b),I=a(b,"DIV",{class:!0});var Z=o(I);$(le.$$.fragment,Z),Ot=d(Z),re=a(Z,"P",{});var st=o(re);Yt=l(st,"Enable memory efficient attention from "),ce=a(st,"A",{href:!0,rel:!0});var qn=o(ce);Ht=l(qn,"xFormers"),qn.forEach(n),Kt=l(st,"."),st.forEach(n),en=d(Z),Je=a(Z,"P",{});var Qn=o(Je);tn=l(Qn,`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.`),Qn.forEach(n),nn=d(Z),$(B.$$.fragment,Z),sn=d(Z),$(L.$$.fragment,Z),Z.forEach(n),an=d(b),X=a(b,"DIV",{class:!0});var at=o(X);$(pe.$$.fragment,at),on=d(at),de=a(at,"P",{});var ot=o(de);ln=l(ot,"Disable memory efficient attention from "),fe=a(ot,"A",{href:!0,rel:!0});var On=o(fe);rn=l(On,"xFormers"),On.forEach(n),cn=l(ot,"."),ot.forEach(n),at.forEach(n),pn=d(b),A=a(b,"DIV",{class:!0});var it=o(A);$(ue.$$.fragment,it),dn=d(it),T=a(it,"P",{});var J=o(T);fn=l(J,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),We=a(J,"CODE",{});var Yn=o(We);un=l(Yn,"enable_sequential_cpu_offload"),Yn.forEach(n),mn=l(J,", this method moves one whole model at a time to the GPU when its "),Ge=a(J,"CODE",{});var Hn=o(Ge);hn=l(Hn,"forward"),Hn.forEach(n),gn=l(J,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ce=a(J,"CODE",{});var Kn=o(Ce);_n=l(Kn,"enable_sequential_cpu_offload"),Kn.forEach(n),bn=l(J,", but performance is much better due to the iterative execution of the "),Ne=a(J,"CODE",{});var es=o(Ne);vn=l(es,"unet"),es.forEach(n),yn=l(J,"."),J.forEach(n),it.forEach(n),wn=d(b),R=a(b,"DIV",{class:!0});var lt=o(R);$(me.$$.fragment,lt),Un=d(lt),he=a(lt,"P",{});var rt=o(he);$n=l(rt,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Fe=a(rt,"CODE",{});var ts=o(Fe);xn=l(ts,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),ts.forEach(n),Pn=l(rt,"forward` method called."),rt.forEach(n),lt.forEach(n),b.forEach(n),this.h()},h(){c(f,"name","hf:doc:metadata"),c(f,"content",JSON.stringify(gs)),c(u,"id","superresolution"),c(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"),c(u,"href","#superresolution"),c(h,"class","relative group"),c(C,"id","diffusers.StableDiffusionUpscalePipeline"),c(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"),c(C,"href","#diffusers.StableDiffusionUpscalePipeline"),c(W,"class","relative group"),c(q,"href","https://github.com/CompVis"),c(q,"rel","nofollow"),c(Q,"href","https://stability.ai/"),c(Q,"rel","nofollow"),c(O,"href","https://laion.ai/"),c(O,"rel","nofollow"),c(_e,"href","/docs/diffusers/v0.18.0/en/api/pipelines/stable_diffusion/upscale#diffusers.StableDiffusionUpscalePipeline"),c(H,"href","https://github.com/Stability-AI/stablediffusion#image-upscaling-with-stable-diffusion"),c(H,"rel","nofollow"),c(ee,"href","https://huggingface.co/stabilityai/stable-diffusion-x4-upscaler"),c(ee,"rel","nofollow"),c(Ue,"href","/docs/diffusers/v0.18.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ce,"href","https://facebookresearch.github.io/xformers/"),c(ce,"rel","nofollow"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(fe,"href","https://facebookresearch.github.io/xformers/"),c(fe,"rel","nofollow"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(g,"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,m){e(document.head,f),_(t,y,m),_(t,h,m),e(h,u),e(u,w),x(r,w,null),e(h,v),e(h,Pe),e(Pe,ct),_(t,Xe,m),_(t,W,m),e(W,C),e(C,Me),x(z,Me,null),e(W,pt),e(W,Se),e(Se,dt),_(t,Ae,m),_(t,D,m),e(D,ft),e(D,q),e(q,ut),e(D,mt),e(D,Q),e(Q,ht),e(D,gt),e(D,O),e(O,_t),e(D,bt),e(D,_e),e(_e,vt),e(D,yt),_(t,Re,m),_(t,be,m),e(be,wt),_(t,Ve,m),_(t,ve,m),e(ve,Y),e(Y,De),e(De,Ut),e(Y,$t),e(Y,H),e(H,xt),_(t,ze,m),_(t,ye,m),e(ye,Pt),_(t,qe,m),_(t,we,m),e(we,K),e(K,Ie),e(Ie,Mt),e(K,St),e(K,ee),e(ee,Dt),_(t,Qe,m),_(t,g,m),x(te,g,null),e(g,It),e(g,Te),e(Te,Tt),e(g,Et),e(g,ne),e(ne,jt),e(ne,Ue),e(Ue,kt),e(ne,Zt),e(g,Jt),e(g,E),x(se,E,null),e(E,Wt),e(E,Ee),e(Ee,Gt),e(E,Ct),x(N,E,null),e(g,Nt),e(g,j),x(ae,j,null),e(j,Ft),e(j,je),e(je,Bt),e(j,Lt),e(j,ke),e(ke,Xt),e(g,At),e(g,F),x(oe,F,null),e(F,Rt),e(F,ie),e(ie,Vt),e(ie,Ze),e(Ze,zt),e(ie,qt),e(g,Qt),e(g,I),x(le,I,null),e(I,Ot),e(I,re),e(re,Yt),e(re,ce),e(ce,Ht),e(re,Kt),e(I,en),e(I,Je),e(Je,tn),e(I,nn),x(B,I,null),e(I,sn),x(L,I,null),e(g,an),e(g,X),x(pe,X,null),e(X,on),e(X,de),e(de,ln),e(de,fe),e(fe,rn),e(de,cn),e(g,pn),e(g,A),x(ue,A,null),e(A,dn),e(A,T),e(T,fn),e(T,We),e(We,un),e(T,mn),e(T,Ge),e(Ge,hn),e(T,gn),e(T,Ce),e(Ce,_n),e(T,bn),e(T,Ne),e(Ne,vn),e(T,yn),e(g,wn),e(g,R),x(me,R,null),e(R,Un),e(R,he),e(he,$n),e(he,Fe),e(Fe,xn),e(he,Pn),Oe=!0},p(t,[m]){const ge={};m&2&&(ge.$$scope={dirty:m,ctx:t}),N.$set(ge);const Be={};m&2&&(Be.$$scope={dirty:m,ctx:t}),B.$set(Be);const Le={};m&2&&(Le.$$scope={dirty:m,ctx:t}),L.$set(Le)},i(t){Oe||(P(r.$$.fragment,t),P(z.$$.fragment,t),P(te.$$.fragment,t),P(se.$$.fragment,t),P(N.$$.fragment,t),P(ae.$$.fragment,t),P(oe.$$.fragment,t),P(le.$$.fragment,t),P(B.$$.fragment,t),P(L.$$.fragment,t),P(pe.$$.fragment,t),P(ue.$$.fragment,t),P(me.$$.fragment,t),Oe=!0)},o(t){M(r.$$.fragment,t),M(z.$$.fragment,t),M(te.$$.fragment,t),M(se.$$.fragment,t),M(N.$$.fragment,t),M(ae.$$.fragment,t),M(oe.$$.fragment,t),M(le.$$.fragment,t),M(B.$$.fragment,t),M(L.$$.fragment,t),M(pe.$$.fragment,t),M(ue.$$.fragment,t),M(me.$$.fragment,t),Oe=!1},d(t){n(f),t&&n(y),t&&n(h),S(r),t&&n(Xe),t&&n(W),S(z),t&&n(Ae),t&&n(D),t&&n(Re),t&&n(be),t&&n(Ve),t&&n(ve),t&&n(ze),t&&n(ye),t&&n(qe),t&&n(we),t&&n(Qe),t&&n(g),S(te),S(se),S(N),S(ae),S(oe),S(le),S(B),S(L),S(pe),S(ue),S(me)}}}const gs={local:"superresolution",sections:[{local:"diffusers.StableDiffusionUpscalePipeline",title:"StableDiffusionUpscalePipeline"}],title:"Super-Resolution"};function _s(G){return ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends is{constructor(f){super();ls(this,f,_s,hs,rs,{})}}export{xs as default,gs as metadata};
