import{S as Un,i as Jn,s as Tn,e as o,k as m,w as v,t as r,M as In,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 J,o as T,B as I,v as Mn,L as nn}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Kt}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as le}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as an}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as en}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as tn}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Dn(S){let s,b,d,c,_,a,f,P,L,Y,D,W,k,re,C,V,pe;return{c(){s=o("p"),b=r("Make sure to check out the Stable Diffusion "),d=o("a"),c=r("Tips"),_=r(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),a=m(),f=o("p"),P=r("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),L=o("a"),Y=r("CompVis"),D=r(", "),W=o("a"),k=r("Runway"),re=r(", and "),C=o("a"),V=r("Stability AI"),pe=r(" Hub organizations!"),this.h()},l(E){s=i(E,"P",{});var x=l(s);b=p(x,"Make sure to check out the Stable Diffusion "),d=i(x,"A",{href:!0});var xe=l(d);c=p(xe,"Tips"),xe.forEach(n),_=p(x," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),x.forEach(n),a=h(E),f=i(E,"P",{});var j=l(f);P=p(j,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),L=i(j,"A",{href:!0,rel:!0});var ce=l(L);Y=p(ce,"CompVis"),ce.forEach(n),D=p(j,", "),W=i(j,"A",{href:!0,rel:!0});var B=l(W);k=p(B,"Runway"),B.forEach(n),re=p(j,", and "),C=i(j,"A",{href:!0,rel:!0});var fe=l(C);V=p(fe,"Stability AI"),fe.forEach(n),pe=p(j," Hub organizations!"),j.forEach(n),this.h()},h(){u(d,"href","overview#tips"),u(L,"href","https://huggingface.co/CompVis"),u(L,"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(E,x){y(E,s,x),e(s,b),e(s,d),e(d,c),e(s,_),y(E,a,x),y(E,f,x),e(f,P),e(f,L),e(L,Y),e(f,D),e(f,W),e(W,k),e(f,re),e(f,C),e(C,V),e(f,pe)},d(E){E&&n(s),E&&n(a),E&&n(f)}}}function xn(S){let s,b,d,c,_;return c=new an({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkxhdGVudFVwc2NhbGVQaXBlbGluZSUyQyUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEElMEFwaXBlbGluZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJDb21wVmlzJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS00JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQXBpcGVsaW5lLnRvKCUyMmN1ZGElMjIpJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFiaWxpdHlhaSUyRnNkLXgyLWxhdGVudC11cHNjYWxlciUyMiUwQXVwc2NhbGVyJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uTGF0ZW50VXBzY2FsZVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEF1cHNjYWxlci50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjBoaWdoJTIwcmVzb2x1dGlvbiUyQyUyMHVucmVhbCUyMGVuZ2luZSUyQyUyMHVsdHJhJTIwcmVhbGlzdGljJTIyJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2gubWFudWFsX3NlZWQoMzMpJTBBJTBBbG93X3Jlc19sYXRlbnRzJTIwJTNEJTIwcGlwZWxpbmUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwb3V0cHV0X3R5cGUlM0QlMjJsYXRlbnQlMjIpLmltYWdlcyUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBpbWFnZSUyMCUzRCUyMHBpcGVsaW5lLmRlY29kZV9sYXRlbnRzKGxvd19yZXNfbGF0ZW50cyklMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lLm51bXB5X3RvX3BpbChpbWFnZSklNUIwJTVEJTBBJTBBaW1hZ2Uuc2F2ZSglMjIuLiUyRmltYWdlcyUyRmExLnBuZyUyMiklMEElMEF1cHNjYWxlZF9pbWFnZSUyMCUzRCUyMHVwc2NhbGVyKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEbG93X3Jlc19sYXRlbnRzJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwJTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0QwJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBJTBBdXBzY2FsZWRfaW1hZ2Uuc2F2ZSglMjIuLiUyRmltYWdlcyUyRmEyLnBuZyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionLatentUpscalePipeline, StableDiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch


<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;stabilityai/sd-x2-latent-upscaler&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>upscaler = StableDiffusionLatentUpscalePipeline.from_pretrained(model_id, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>upscaler.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut high resolution, unreal engine, ultra realistic&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">33</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>low_res_latents = pipeline(prompt, generator=generator, output_type=<span class="hljs-string">&quot;latent&quot;</span>).images

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    image = pipeline.decode_latents(low_res_latents)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipeline.numpy_to_pil(image)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;../images/a1.png&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>upscaled_image = upscaler(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    image=low_res_latents,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">0</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>upscaled_image.save(<span class="hljs-string">&quot;../images/a2.png&quot;</span>)`}}),{c(){s=o("p"),b=r("Examples:"),d=m(),v(c.$$.fragment)},l(a){s=i(a,"P",{});var f=l(s);b=p(f,"Examples:"),f.forEach(n),d=h(a),$(c.$$.fragment,a)},m(a,f){y(a,s,f),e(s,b),y(a,d,f),U(c,a,f),_=!0},p:nn,i(a){_||(J(c.$$.fragment,a),_=!0)},o(a){T(c.$$.fragment,a),_=!1},d(a){a&&n(s),a&&n(d),I(c,a)}}}function En(S){let s,b,d,c,_;return{c(){s=o("p"),b=r("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),d=o("code"),c=r("scaled_dot_product_attention"),_=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(a){s=i(a,"P",{});var f=l(s);b=p(f,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),d=i(f,"CODE",{});var P=l(d);c=p(P,"scaled_dot_product_attention"),P.forEach(n),_=p(f,` (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!`),f.forEach(n)},m(a,f){y(a,s,f),e(s,b),e(s,d),e(d,c),e(s,_)},d(a){a&&n(s)}}}function Sn(S){let s,b,d,c,_;return c=new an({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(){s=o("p"),b=r("Examples:"),d=m(),v(c.$$.fragment)},l(a){s=i(a,"P",{});var f=l(s);b=p(f,"Examples:"),f.forEach(n),d=h(a),$(c.$$.fragment,a)},m(a,f){y(a,s,f),e(s,b),y(a,d,f),U(c,a,f),_=!0},p:nn,i(a){_||(J(c.$$.fragment,a),_=!0)},o(a){T(c.$$.fragment,a),_=!1},d(a){a&&n(s),a&&n(d),I(c,a)}}}function Pn(S){let s,b;return{c(){s=o("p"),b=r(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(d){s=i(d,"P",{});var c=l(s);b=p(c,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),c.forEach(n)},m(d,c){y(d,s,c),e(s,b)},d(d){d&&n(s)}}}function jn(S){let s,b,d,c,_;return c=new an({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(){s=o("p"),b=r("Examples:"),d=m(),v(c.$$.fragment)},l(a){s=i(a,"P",{});var f=l(s);b=p(f,"Examples:"),f.forEach(n),d=h(a),$(c.$$.fragment,a)},m(a,f){y(a,s,f),e(s,b),y(a,d,f),U(c,a,f),_=!0},p:nn,i(a){_||(J(c.$$.fragment,a),_=!0)},o(a){T(c.$$.fragment,a),_=!1},d(a){a&&n(s),a&&n(d),I(c,a)}}}function Zn(S){let s,b,d,c,_,a,f,P,L,Y,D,W,k,re,C,V,pe,E,x,xe,j,ce,B,fe,F,q,je,de,rt,Ze,pt,Ye,w,ue,ct,Ge,ft,dt,me,ut,Ee,mt,ht,gt,R,he,bt,Le,_t,yt,Q,wt,O,ge,vt,X,$t,We,Ut,Jt,ke,Tt,It,Mt,Z,be,Dt,Ce,xt,Et,H,St,K,Pt,ee,_e,jt,ye,Zt,Ve,Gt,Lt,Wt,G,we,kt,ve,Ct,$e,Vt,Bt,Nt,te,Rt,ne,Ft,ae,Ue,Xt,Je,At,Te,zt,Yt,qe,A,se,Be,Ie,qt,Ne,Qt,Qe,z,Me,Ot,Re,Ht,Oe;return a=new en({}),B=new Kt({props:{$$slots:{default:[Dn]},$$scope:{ctx:S}}}),de=new en({}),ue=new le({props:{name:"class diffusers.StableDiffusionLatentUpscalePipeline",anchor:"diffusers.StableDiffusionLatentUpscalePipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": EulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/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.StableDiffusionLatentUpscalePipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/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.StableDiffusionLatentUpscalePipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A <a href="/docs/diffusers/main/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler">EulerDiscreteScheduler</a> to be used in combination with <code>unet</code> to denoise the encoded image latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py#L61"}}),he=new le({props:{name:"__call__",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{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:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image upscaling.`,name:"prompt"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__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. If it&#x2019;s a tensor, it can be either a
latent output from a Stable Diffusion model or an image tensor in the range <code>[-1, 1]</code>. It is considered
a <code>latent</code> if <code>image.shape[1]</code> is <code>4</code>; otherwise, it is considered to be an image representation and
encoded using this pipeline&#x2019;s <code>vae</code> encoder.`,name:"image"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__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.StableDiffusionLatentUpscalePipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py#L256",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/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.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Q=new tn({props:{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.__call__.example",$$slots:{default:[xn]},$$scope:{ctx:S}}}),ge=new le({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:": int = 0"},{name:"device",val:": typing.Union[torch.device, str] = 'cuda'"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1208"}}),be=new le({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.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/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),H=new Kt({props:{warning:!0,$$slots:{default:[En]},$$scope:{ctx:S}}}),K=new tn({props:{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.enable_attention_slicing.example",$$slots:{default:[Sn]},$$scope:{ctx:S}}}),_e=new le({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),we=new le({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.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/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),te=new Kt({props:{warning:!0,$$slots:{default:[Pn]},$$scope:{ctx:S}}}),ne=new tn({props:{anchor:"diffusers.StableDiffusionLatentUpscalePipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[jn]},$$scope:{ctx:S}}}),Ue=new le({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionLatentUpscalePipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),Ie=new en({}),Me=new le({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/main/src/diffusers/pipelines/stable_diffusion/__init__.py#L22"}}),{c(){s=o("meta"),b=m(),d=o("h1"),c=o("a"),_=o("span"),v(a.$$.fragment),f=m(),P=o("span"),L=r("Latent upscaler"),Y=m(),D=o("p"),W=r("The Stable Diffusion latent upscaler model was created by "),k=o("a"),re=r("Katherine Crowson"),C=r(" in collaboration with "),V=o("a"),pe=r("Stability AI"),E=r(". It is used to enhance the output image resolution by a factor of 2 (see this demo "),x=o("a"),xe=r("notebook"),j=r(" for a demonstration of the original implementation)."),ce=m(),v(B.$$.fragment),fe=m(),F=o("h2"),q=o("a"),je=o("span"),v(de.$$.fragment),rt=m(),Ze=o("span"),pt=r("StableDiffusionLatentUpscalePipeline"),Ye=m(),w=o("div"),v(ue.$$.fragment),ct=m(),Ge=o("p"),ft=r("Pipeline for upscaling Stable Diffusion output image resolution by a factor of 2."),dt=m(),me=o("p"),ut=r("This model inherits from "),Ee=o("a"),mt=r("DiffusionPipeline"),ht=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),gt=m(),R=o("div"),v(he.$$.fragment),bt=m(),Le=o("p"),_t=r("The call function to the pipeline for generation."),yt=m(),v(Q.$$.fragment),wt=m(),O=o("div"),v(ge.$$.fragment),vt=m(),X=o("p"),$t=r(`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
`),We=o("code"),Ut=r("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Jt=r("forward"),ke=o("code"),Tt=r("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),It=r("enable_model_cpu_offload`, but performance is lower."),Mt=m(),Z=o("div"),v(be.$$.fragment),Dt=m(),Ce=o("p"),xt=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.`),Et=m(),v(H.$$.fragment),St=m(),v(K.$$.fragment),Pt=m(),ee=o("div"),v(_e.$$.fragment),jt=m(),ye=o("p"),Zt=r("Disable sliced attention computation. If "),Ve=o("code"),Gt=r("enable_attention_slicing"),Lt=r(` was previously called, attention is
computed in one step.`),Wt=m(),G=o("div"),v(we.$$.fragment),kt=m(),ve=o("p"),Ct=r("Enable memory efficient attention from "),$e=o("a"),Vt=r("xFormers"),Bt=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.`),Nt=m(),v(te.$$.fragment),Rt=m(),v(ne.$$.fragment),Ft=m(),ae=o("div"),v(Ue.$$.fragment),Xt=m(),Je=o("p"),At=r("Disable memory efficient attention from "),Te=o("a"),zt=r("xFormers"),Yt=r("."),qe=m(),A=o("h2"),se=o("a"),Be=o("span"),v(Ie.$$.fragment),qt=m(),Ne=o("span"),Qt=r("StableDiffusionPipelineOutput"),Qe=m(),z=o("div"),v(Me.$$.fragment),Ot=m(),Re=o("p"),Ht=r("Output class for Stable Diffusion pipelines."),this.h()},l(t){const g=In('[data-svelte="svelte-1phssyn"]',document.head);s=i(g,"META",{name:!0,content:!0}),g.forEach(n),b=h(t),d=i(t,"H1",{class:!0});var De=l(d);c=i(De,"A",{id:!0,class:!0,href:!0});var Fe=l(c);_=i(Fe,"SPAN",{});var Xe=l(_);$(a.$$.fragment,Xe),Xe.forEach(n),Fe.forEach(n),f=h(De),P=i(De,"SPAN",{});var Ae=l(P);L=p(Ae,"Latent upscaler"),Ae.forEach(n),De.forEach(n),Y=h(t),D=i(t,"P",{});var N=l(D);W=p(N,"The Stable Diffusion latent upscaler model was created by "),k=i(N,"A",{href:!0,rel:!0});var ze=l(k);re=p(ze,"Katherine Crowson"),ze.forEach(n),C=p(N," in collaboration with "),V=i(N,"A",{href:!0,rel:!0});var sn=l(V);pe=p(sn,"Stability AI"),sn.forEach(n),E=p(N,". It is used to enhance the output image resolution by a factor of 2 (see this demo "),x=i(N,"A",{href:!0,rel:!0});var on=l(x);xe=p(on,"notebook"),on.forEach(n),j=p(N," for a demonstration of the original implementation)."),N.forEach(n),ce=h(t),$(B.$$.fragment,t),fe=h(t),F=i(t,"H2",{class:!0});var He=l(F);q=i(He,"A",{id:!0,class:!0,href:!0});var ln=l(q);je=i(ln,"SPAN",{});var rn=l(je);$(de.$$.fragment,rn),rn.forEach(n),ln.forEach(n),rt=h(He),Ze=i(He,"SPAN",{});var pn=l(Ze);pt=p(pn,"StableDiffusionLatentUpscalePipeline"),pn.forEach(n),He.forEach(n),Ye=h(t),w=i(t,"DIV",{class:!0});var M=l(w);$(ue.$$.fragment,M),ct=h(M),Ge=i(M,"P",{});var cn=l(Ge);ft=p(cn,"Pipeline for upscaling Stable Diffusion output image resolution by a factor of 2."),cn.forEach(n),dt=h(M),me=i(M,"P",{});var Ke=l(me);ut=p(Ke,"This model inherits from "),Ee=i(Ke,"A",{href:!0});var fn=l(Ee);mt=p(fn,"DiffusionPipeline"),fn.forEach(n),ht=p(Ke,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Ke.forEach(n),gt=h(M),R=i(M,"DIV",{class:!0});var Se=l(R);$(he.$$.fragment,Se),bt=h(Se),Le=i(Se,"P",{});var dn=l(Le);_t=p(dn,"The call function to the pipeline for generation."),dn.forEach(n),yt=h(Se),$(Q.$$.fragment,Se),Se.forEach(n),wt=h(M),O=i(M,"DIV",{class:!0});var et=l(O);$(ge.$$.fragment,et),vt=h(et),X=i(et,"P",{});var Pe=l(X);$t=p(Pe,`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
`),We=i(Pe,"CODE",{});var un=l(We);Ut=p(un,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),un.forEach(n),Jt=p(Pe,"forward"),ke=i(Pe,"CODE",{});var mn=l(ke);Tt=p(mn,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),mn.forEach(n),It=p(Pe,"enable_model_cpu_offload`, but performance is lower."),Pe.forEach(n),et.forEach(n),Mt=h(M),Z=i(M,"DIV",{class:!0});var oe=l(Z);$(be.$$.fragment,oe),Dt=h(oe),Ce=i(oe,"P",{});var hn=l(Ce);xt=p(hn,`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.`),hn.forEach(n),Et=h(oe),$(H.$$.fragment,oe),St=h(oe),$(K.$$.fragment,oe),oe.forEach(n),Pt=h(M),ee=i(M,"DIV",{class:!0});var tt=l(ee);$(_e.$$.fragment,tt),jt=h(tt),ye=i(tt,"P",{});var nt=l(ye);Zt=p(nt,"Disable sliced attention computation. If "),Ve=i(nt,"CODE",{});var gn=l(Ve);Gt=p(gn,"enable_attention_slicing"),gn.forEach(n),Lt=p(nt,` was previously called, attention is
computed in one step.`),nt.forEach(n),tt.forEach(n),Wt=h(M),G=i(M,"DIV",{class:!0});var ie=l(G);$(we.$$.fragment,ie),kt=h(ie),ve=i(ie,"P",{});var at=l(ve);Ct=p(at,"Enable memory efficient attention from "),$e=i(at,"A",{href:!0,rel:!0});var bn=l($e);Vt=p(bn,"xFormers"),bn.forEach(n),Bt=p(at,`. 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.`),at.forEach(n),Nt=h(ie),$(te.$$.fragment,ie),Rt=h(ie),$(ne.$$.fragment,ie),ie.forEach(n),Ft=h(M),ae=i(M,"DIV",{class:!0});var st=l(ae);$(Ue.$$.fragment,st),Xt=h(st),Je=i(st,"P",{});var ot=l(Je);At=p(ot,"Disable memory efficient attention from "),Te=i(ot,"A",{href:!0,rel:!0});var _n=l(Te);zt=p(_n,"xFormers"),_n.forEach(n),Yt=p(ot,"."),ot.forEach(n),st.forEach(n),M.forEach(n),qe=h(t),A=i(t,"H2",{class:!0});var it=l(A);se=i(it,"A",{id:!0,class:!0,href:!0});var yn=l(se);Be=i(yn,"SPAN",{});var wn=l(Be);$(Ie.$$.fragment,wn),wn.forEach(n),yn.forEach(n),qt=h(it),Ne=i(it,"SPAN",{});var vn=l(Ne);Qt=p(vn,"StableDiffusionPipelineOutput"),vn.forEach(n),it.forEach(n),Qe=h(t),z=i(t,"DIV",{class:!0});var lt=l(z);$(Me.$$.fragment,lt),Ot=h(lt),Re=i(lt,"P",{});var $n=l(Re);Ht=p($n,"Output class for Stable Diffusion pipelines."),$n.forEach(n),lt.forEach(n),this.h()},h(){u(s,"name","hf:doc:metadata"),u(s,"content",JSON.stringify(Gn)),u(c,"id","latent-upscaler"),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","#latent-upscaler"),u(d,"class","relative group"),u(k,"href","https://github.com/crowsonkb/k-diffusion"),u(k,"rel","nofollow"),u(V,"href","https://stability.ai/"),u(V,"rel","nofollow"),u(x,"href","https://colab.research.google.com/drive/1o1qYJcFeywzCIdkfKJy7cTpgZTCM2EI4"),u(x,"rel","nofollow"),u(q,"id","diffusers.StableDiffusionLatentUpscalePipeline"),u(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"),u(q,"href","#diffusers.StableDiffusionLatentUpscalePipeline"),u(F,"class","relative group"),u(Ee,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),u(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(ee,"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(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Te,"href","https://facebookresearch.github.io/xformers/"),u(Te,"rel","nofollow"),u(ae,"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(se,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),u(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"),u(se,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),u(A,"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,s),y(t,b,g),y(t,d,g),e(d,c),e(c,_),U(a,_,null),e(d,f),e(d,P),e(P,L),y(t,Y,g),y(t,D,g),e(D,W),e(D,k),e(k,re),e(D,C),e(D,V),e(V,pe),e(D,E),e(D,x),e(x,xe),e(D,j),y(t,ce,g),U(B,t,g),y(t,fe,g),y(t,F,g),e(F,q),e(q,je),U(de,je,null),e(F,rt),e(F,Ze),e(Ze,pt),y(t,Ye,g),y(t,w,g),U(ue,w,null),e(w,ct),e(w,Ge),e(Ge,ft),e(w,dt),e(w,me),e(me,ut),e(me,Ee),e(Ee,mt),e(me,ht),e(w,gt),e(w,R),U(he,R,null),e(R,bt),e(R,Le),e(Le,_t),e(R,yt),U(Q,R,null),e(w,wt),e(w,O),U(ge,O,null),e(O,vt),e(O,X),e(X,$t),e(X,We),e(We,Ut),e(X,Jt),e(X,ke),e(ke,Tt),e(X,It),e(w,Mt),e(w,Z),U(be,Z,null),e(Z,Dt),e(Z,Ce),e(Ce,xt),e(Z,Et),U(H,Z,null),e(Z,St),U(K,Z,null),e(w,Pt),e(w,ee),U(_e,ee,null),e(ee,jt),e(ee,ye),e(ye,Zt),e(ye,Ve),e(Ve,Gt),e(ye,Lt),e(w,Wt),e(w,G),U(we,G,null),e(G,kt),e(G,ve),e(ve,Ct),e(ve,$e),e($e,Vt),e(ve,Bt),e(G,Nt),U(te,G,null),e(G,Rt),U(ne,G,null),e(w,Ft),e(w,ae),U(Ue,ae,null),e(ae,Xt),e(ae,Je),e(Je,At),e(Je,Te),e(Te,zt),e(Je,Yt),y(t,qe,g),y(t,A,g),e(A,se),e(se,Be),U(Ie,Be,null),e(A,qt),e(A,Ne),e(Ne,Qt),y(t,Qe,g),y(t,z,g),U(Me,z,null),e(z,Ot),e(z,Re),e(Re,Ht),Oe=!0},p(t,[g]){const De={};g&2&&(De.$$scope={dirty:g,ctx:t}),B.$set(De);const Fe={};g&2&&(Fe.$$scope={dirty:g,ctx:t}),Q.$set(Fe);const Xe={};g&2&&(Xe.$$scope={dirty:g,ctx:t}),H.$set(Xe);const Ae={};g&2&&(Ae.$$scope={dirty:g,ctx:t}),K.$set(Ae);const N={};g&2&&(N.$$scope={dirty:g,ctx:t}),te.$set(N);const ze={};g&2&&(ze.$$scope={dirty:g,ctx:t}),ne.$set(ze)},i(t){Oe||(J(a.$$.fragment,t),J(B.$$.fragment,t),J(de.$$.fragment,t),J(ue.$$.fragment,t),J(he.$$.fragment,t),J(Q.$$.fragment,t),J(ge.$$.fragment,t),J(be.$$.fragment,t),J(H.$$.fragment,t),J(K.$$.fragment,t),J(_e.$$.fragment,t),J(we.$$.fragment,t),J(te.$$.fragment,t),J(ne.$$.fragment,t),J(Ue.$$.fragment,t),J(Ie.$$.fragment,t),J(Me.$$.fragment,t),Oe=!0)},o(t){T(a.$$.fragment,t),T(B.$$.fragment,t),T(de.$$.fragment,t),T(ue.$$.fragment,t),T(he.$$.fragment,t),T(Q.$$.fragment,t),T(ge.$$.fragment,t),T(be.$$.fragment,t),T(H.$$.fragment,t),T(K.$$.fragment,t),T(_e.$$.fragment,t),T(we.$$.fragment,t),T(te.$$.fragment,t),T(ne.$$.fragment,t),T(Ue.$$.fragment,t),T(Ie.$$.fragment,t),T(Me.$$.fragment,t),Oe=!1},d(t){n(s),t&&n(b),t&&n(d),I(a),t&&n(Y),t&&n(D),t&&n(ce),I(B,t),t&&n(fe),t&&n(F),I(de),t&&n(Ye),t&&n(w),I(ue),I(he),I(Q),I(ge),I(be),I(H),I(K),I(_e),I(we),I(te),I(ne),I(Ue),t&&n(qe),t&&n(A),I(Ie),t&&n(Qe),t&&n(z),I(Me)}}}const Gn={local:"latent-upscaler",sections:[{local:"diffusers.StableDiffusionLatentUpscalePipeline",title:"StableDiffusionLatentUpscalePipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"}],title:"Latent upscaler"};function Ln(S){return Mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rn extends Un{constructor(s){super();Jn(this,s,Ln,Zn,Tn,{})}}export{Rn as default,Gn as metadata};
