import{S as ys,i as vs,s as ws,e as i,k as m,w as D,t as s,M as Ds,c as r,d as t,m as u,a as l,x as $,h as a,b as h,G as e,g as v,y as x,q as I,o as M,B as T,v as $s,L as Pt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Cn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as q}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Ut}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Fn}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Jt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xs(S){let d,_,f,p,g,o,c,j,F,ne,E,A,R,ye,B,z,ve;return{c(){d=i("p"),_=s("Make sure to check out the Stable Diffusion "),f=i("a"),p=s("Tips"),g=s(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),o=m(),c=i("p"),j=s("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),F=i("a"),ne=s("CompVis"),E=s(", "),A=i("a"),R=s("Runway"),ye=s(", and "),B=i("a"),z=s("Stability AI"),ve=s(" Hub organizations!"),this.h()},l(U){d=r(U,"P",{});var k=l(d);_=a(k,"Make sure to check out the Stable Diffusion "),f=r(k,"A",{href:!0});var X=l(f);p=a(X,"Tips"),X.forEach(t),g=a(k," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),k.forEach(t),o=u(U),c=r(U,"P",{});var Z=l(c);j=a(Z,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),F=r(Z,"A",{href:!0,rel:!0});var W=l(F);ne=a(W,"CompVis"),W.forEach(t),E=a(Z,", "),A=r(Z,"A",{href:!0,rel:!0});var Y=l(A);R=a(Y,"Runway"),Y.forEach(t),ye=a(Z,", and "),B=r(Z,"A",{href:!0,rel:!0});var se=l(B);z=a(se,"Stability AI"),se.forEach(t),ve=a(Z," Hub organizations!"),Z.forEach(t),this.h()},h(){h(f,"href","overview#tips"),h(F,"href","https://huggingface.co/CompVis"),h(F,"rel","nofollow"),h(A,"href","https://huggingface.co/runwayml"),h(A,"rel","nofollow"),h(B,"href","https://huggingface.co/stabilityai"),h(B,"rel","nofollow")},m(U,k){v(U,d,k),e(d,_),e(d,f),e(f,p),e(d,g),v(U,o,k),v(U,c,k),e(c,j),e(c,F),e(F,ne),e(c,E),e(c,A),e(A,R),e(c,ye),e(c,B),e(B,z),e(c,ve)},d(U){U&&t(d),U&&t(o),U&&t(c)}}}function Is(S){let d,_,f,p,g;return p=new Ut({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25EZXB0aDJJbWdQaXBlbGluZSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25EZXB0aDJJbWdQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItZGVwdGglMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbml0X2ltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQXByb21wdCUyMCUzRCUyMCUyMnR3byUyMHRpZ2VycyUyMiUwQW5fcHJvcG10JTIwJTNEJTIwJTIyYmFkJTJDJTIwZGVmb3JtZWQlMkMlMjB1Z2x5JTJDJTIwYmFkJTIwYW5vdG9teSUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlM0Rwcm9tcHQlMkMlMjBpbWFnZSUzRGluaXRfaW1hZ2UlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuX3Byb3BtdCUyQyUyMHN0cmVuZ3RoJTNEMC43KS5pbWFnZXMlNUIwJTVE",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">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> diffusers <span class="hljs-keyword">import</span> StableDiffusionDepth2ImgPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionDepth2ImgPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-depth&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;two tigers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>n_propmt = <span class="hljs-string">&quot;bad, deformed, ugly, bad anotomy&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt=prompt, image=init_image, negative_prompt=n_propmt, strength=<span class="hljs-number">0.7</span>).images[<span class="hljs-number">0</span>]`}}),{c(){d=i("p"),_=s("Examples:"),f=m(),D(p.$$.fragment)},l(o){d=r(o,"P",{});var c=l(d);_=a(c,"Examples:"),c.forEach(t),f=u(o),$(p.$$.fragment,o)},m(o,c){v(o,d,c),e(d,_),v(o,f,c),x(p,o,c),g=!0},p:Pt,i(o){g||(I(p.$$.fragment,o),g=!0)},o(o){M(p.$$.fragment,o),g=!1},d(o){o&&t(d),o&&t(f),T(p,o)}}}function Ms(S){let d,_,f,p,g;return{c(){d=i("p"),_=s("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=i("code"),p=s("scaled_dot_product_attention"),g=s(` (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(o){d=r(o,"P",{});var c=l(d);_=a(c,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),f=r(c,"CODE",{});var j=l(f);p=a(j,"scaled_dot_product_attention"),j.forEach(t),g=a(c,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),c.forEach(t)},m(o,c){v(o,d,c),e(d,_),e(d,f),e(f,p),e(d,g)},d(o){o&&t(d)}}}function Ts(S){let d,_,f,p,g;return p=new Ut({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(){d=i("p"),_=s("Examples:"),f=m(),D(p.$$.fragment)},l(o){d=r(o,"P",{});var c=l(d);_=a(c,"Examples:"),c.forEach(t),f=u(o),$(p.$$.fragment,o)},m(o,c){v(o,d,c),e(d,_),v(o,f,c),x(p,o,c),g=!0},p:Pt,i(o){g||(I(p.$$.fragment,o),g=!0)},o(o){M(p.$$.fragment,o),g=!1},d(o){o&&t(d),o&&t(f),T(p,o)}}}function Ss(S){let d,_;return{c(){d=i("p"),_=s(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(f){d=r(f,"P",{});var p=l(d);_=a(p,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),p.forEach(t)},m(f,p){v(f,d,p),e(d,_)},d(f){f&&t(d)}}}function Js(S){let d,_,f,p,g;return p=new Ut({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(){d=i("p"),_=s("Examples:"),f=m(),D(p.$$.fragment)},l(o){d=r(o,"P",{});var c=l(d);_=a(c,"Examples:"),c.forEach(t),f=u(o),$(p.$$.fragment,o)},m(o,c){v(o,d,c),e(d,_),v(o,f,c),x(p,o,c),g=!0},p:Pt,i(o){g||(I(p.$$.fragment,o),g=!0)},o(o){M(p.$$.fragment,o),g=!1},d(o){o&&t(d),o&&t(f),T(p,o)}}}function Ps(S){let d,_,f,p,g;return p=new Ut({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyc2QtY29uY2VwdHMtbGlicmFyeSUyRmNhdC10b3klMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMCUzQ2NhdC10b3klM0UlMjBiYWNrcGFjayUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNhdC1iYWNrcGFjay5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/cat-toy&quot;</span>)

prompt = <span class="hljs-string">&quot;A &lt;cat-toy&gt; backpack&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cat-backpack.png&quot;</span>)`}}),{c(){d=i("p"),_=s("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),f=m(),D(p.$$.fragment)},l(o){d=r(o,"P",{});var c=l(d);_=a(c,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),c.forEach(t),f=u(o),$(p.$$.fragment,o)},m(o,c){v(o,d,c),e(d,_),v(o,f,c),x(p,o,c),g=!0},p:Pt,i(o){g||(I(p.$$.fragment,o),g=!0)},o(o){M(p.$$.fragment,o),g=!1},d(o){o&&t(d),o&&t(f),T(p,o)}}}function Us(S){let d,_,f,p,g;return p=new Ut({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyLiUyRmNoYXJ0dXJuZXJ2Mi5wdCUyMiUyQyUyMHRva2VuJTNEJTIyY2hhcnR1cm5lcnYyJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmNoYXJ0dXJuZXJ2MiUyQyUyMG11bHRpcGxlJTIwdmlld3MlMjBvZiUyMHRoZSUyMHNhbWUlMjBjaGFyYWN0ZXIlMjBpbiUyMHRoZSUyMHNhbWUlMjBvdXRmaXQlMkMlMjBhJTIwY2hhcmFjdGVyJTIwdHVybmFyb3VuZCUyMG9mJTIwYSUyMHdvbWFuJTIwd2VhcmluZyUyMGElMjBibGFjayUyMGphY2tldCUyMGFuZCUyMHJlZCUyMHNoaXJ0JTJDJTIwYmVzdCUyMHF1YWxpdHklMkMlMjBpbnRyaWNhdGUlMjBkZXRhaWxzLiUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNoYXJhY3Rlci5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;./charturnerv2.pt&quot;</span>, token=<span class="hljs-string">&quot;charturnerv2&quot;</span>)

prompt = <span class="hljs-string">&quot;charturnerv2, multiple views of the same character in the same outfit, a character turnaround of a woman wearing a black jacket and red shirt, best quality, intricate details.&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;character.png&quot;</span>)`}}),{c(){d=i("p"),_=s("locally:"),f=m(),D(p.$$.fragment)},l(o){d=r(o,"P",{});var c=l(d);_=a(c,"locally:"),c.forEach(t),f=u(o),$(p.$$.fragment,o)},m(o,c){v(o,d,c),e(d,_),v(o,f,c),x(p,o,c),g=!0},p:Pt,i(o){g||(I(p.$$.fragment,o),g=!0)},o(o){M(p.$$.fragment,o),g=!1},d(o){o&&t(d),o&&t(f),T(p,o)}}}function Es(S){let d,_,f,p,g,o,c,j,F,ne,E,A,R,ye,B,z,ve,U,k,X,Z,W,Y,se,we,qt,rt,zt,Et,y,De,Ht,lt,Ot,Kt,$e,eo,Ye,to,oo,no,dt,so,ao,H,Ve,Qe,io,ro,lo,qe,ze,po,co,fo,He,Oe,mo,uo,ho,Q,xe,go,pt,_o,bo,ae,yo,G,Ie,vo,ct,wo,Do,ie,$o,re,xo,le,Me,Io,Te,Mo,ft,To,So,Jo,N,Se,Po,Je,Uo,Pe,Eo,ko,Zo,de,jo,pe,Wo,ce,Ue,Go,Ee,No,ke,Lo,Co,Fo,J,Ze,Ao,je,Ro,Ke,Bo,Xo,Yo,mt,Vo,Qo,fe,qo,We,zo,Ge,Ho,Oo,Ko,me,en,P,Ne,tn,V,on,ut,nn,sn,ht,an,rn,gt,ln,dn,pn,Le,cn,_t,fn,mn,un,Ce,hn,et,gn,_n,bn,O,yn,tt,vn,wn,bt,Dn,$n,xn,K,In,ot,Mn,Tn,yt,Sn,Jn,Pn,ue,Fe,Un,vt,En,kt,ee,he,wt,Ae,kn,Dt,Zn,Zt,te,Re,jn,$t,Wn,jt;return o=new Fn({}),X=new Cn({props:{$$slots:{default:[xs]},$$scope:{ctx:S}}}),we=new Fn({}),De=new q({props:{name:"class diffusers.StableDiffusionDepth2ImgPipeline",anchor:"diffusers.StableDiffusionDepth2ImgPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"depth_estimator",val:": DPTForDepthEstimation"},{name:"feature_extractor",val:": DPTFeatureExtractor"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.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.StableDiffusionDepth2ImgPipeline.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.StableDiffusionDepth2ImgPipeline.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.StableDiffusionDepth2ImgPipeline.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.StableDiffusionDepth2ImgPipeline.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_depth2img.py#L65"}}),xe=new q({props:{name:"__call__",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__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:"depth_map",val:": typing.Optional[torch.FloatTensor] = None"},{name:"strength",val:": float = 0.8"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 7.5"},{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:": typing.Optional[float] = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = 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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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 used as the starting point. Can accept image
latents as <code>image</code> only if <code>depth_map</code> is not <code>None</code>.`,name:"image"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.depth_map",description:`<strong>depth_map</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Depth prediction to be used as additional conditioning for the image generation process. If not
defined, it automatically predicts the depth with <code>self.depth_estimator</code>.`,name:"depth_map"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
Indicates extent to transform the reference <code>image</code>. Must be between 0 and 1. <code>image</code> is used as a
starting point and more noise is added the higher the <code>strength</code>. The number of denoising steps depends
on the amount of noise initially added. When <code>strength</code> is 1, added noise is maximum and the denoising
process runs for the full number of iterations specified in <code>num_inference_steps</code>. A value of 1
essentially ignores <code>image</code>.`,name:"strength"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__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. This parameter is modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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.StableDiffusionDepth2ImgPipeline.__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_depth2img.py#L498",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.</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>
`}}),ae=new Jt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.example",$$slots:{default:[Is]},$$scope:{ctx:S}}}),Ie=new q({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.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"}}),ie=new Cn({props:{warning:!0,$$slots:{default:[Ms]},$$scope:{ctx:S}}}),re=new Jt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_attention_slicing.example",$$slots:{default:[Ts]},$$scope:{ctx:S}}}),Me=new q({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),Se=new q({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.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"}}),de=new Cn({props:{warning:!0,$$slots:{default:[Ss]},$$scope:{ctx:S}}}),pe=new Jt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Js]},$$scope:{ctx:S}}}),Ue=new q({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),Ze=new q({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code> or <code>List[str or os.PathLike]</code> or <code>Dict</code> or <code>List[Dict]</code>) &#x2014;
Can be either one of the following or a list of them:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>sd-concepts-library/low-poly-hd-logos-icons</code>) of a
pretrained model hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_text_inversion_directory/</code>) containing the textual
inversion weights.</li>
<li>A path to a <em>file</em> (for example <code>./my_text_inversions.pt</code>) containing textual inversion weights.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.token",description:`<strong>token</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Override the token to use for the textual inversion weights. If <code>pretrained_model_name_or_path</code> is a
list, then <code>token</code> must also be a list of equal length.`,name:"token"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of a custom weight file. This should be used when:</p>
<ul>
<li>The saved textual inversion file is in &#x1F917; Diffusers format, but was saved under a specific weight
name such as <code>text_inv.bin</code>.</li>
<li>The saved textual inversion file is in the Automatic1111 format.</li>
</ul>`,name:"weight_name"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/loaders.py#L634"}}),fe=new Jt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example",$$slots:{default:[Ps]},$$scope:{ctx:S}}}),me=new Jt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[Us]},$$scope:{ctx:S}}}),Ne=new q({props:{name:"load_lora_weights",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
See <a href="/docs/diffusers/v0.20.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
See <a href="/docs/diffusers/v0.20.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/loaders.py#L906"}}),Fe=new q({props:{name:"save_lora_weights",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"unet_lora_layers",val:": typing.Dict[str, typing.Union[torch.nn.modules.module.Module, torch.Tensor]] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save LoRA parameters to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text
encoder LoRA state dict because it comes from &#x1F917; Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/loaders.py#L1410"}}),Ae=new Fn({}),Re=new q({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(){d=i("meta"),_=m(),f=i("h1"),p=i("a"),g=i("span"),D(o.$$.fragment),c=m(),j=i("span"),F=s("Depth-to-image"),ne=m(),E=i("p"),A=s("The Stable Diffusion model can also infer depth based on an image using "),R=i("a"),ye=s("MiDas"),B=s(". This allows you to pass a text prompt and an initial image to condition the generation of new images as well as a "),z=i("code"),ve=s("depth_map"),U=s(" to preserve the image structure."),k=m(),D(X.$$.fragment),Z=m(),W=i("h2"),Y=i("a"),se=i("span"),D(we.$$.fragment),qt=m(),rt=i("span"),zt=s("StableDiffusionDepth2ImgPipeline"),Et=m(),y=i("div"),D(De.$$.fragment),Ht=m(),lt=i("p"),Ot=s("Pipeline for text-guided depth-based image-to-image generation using Stable Diffusion."),Kt=m(),$e=i("p"),eo=s("This model inherits from "),Ye=i("a"),to=s("DiffusionPipeline"),oo=s(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),no=m(),dt=i("p"),so=s("The pipeline also inherits the following loading methods:"),ao=m(),H=i("ul"),Ve=i("li"),Qe=i("a"),io=s("load_textual_inversion()"),ro=s(" for loading textual inversion embeddings"),lo=m(),qe=i("li"),ze=i("a"),po=s("load_lora_weights()"),co=s(" for loading LoRA weights"),fo=m(),He=i("li"),Oe=i("a"),mo=s("save_lora_weights()"),uo=s(" for saving LoRA weights"),ho=m(),Q=i("div"),D(xe.$$.fragment),go=m(),pt=i("p"),_o=s("The call function to the pipeline for generation."),bo=m(),D(ae.$$.fragment),yo=m(),G=i("div"),D(Ie.$$.fragment),vo=m(),ct=i("p"),wo=s(`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.`),Do=m(),D(ie.$$.fragment),$o=m(),D(re.$$.fragment),xo=m(),le=i("div"),D(Me.$$.fragment),Io=m(),Te=i("p"),Mo=s("Disable sliced attention computation. If "),ft=i("code"),To=s("enable_attention_slicing"),So=s(` was previously called, attention is
computed in one step.`),Jo=m(),N=i("div"),D(Se.$$.fragment),Po=m(),Je=i("p"),Uo=s("Enable memory efficient attention from "),Pe=i("a"),Eo=s("xFormers"),ko=s(`. 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.`),Zo=m(),D(de.$$.fragment),jo=m(),D(pe.$$.fragment),Wo=m(),ce=i("div"),D(Ue.$$.fragment),Go=m(),Ee=i("p"),No=s("Disable memory efficient attention from "),ke=i("a"),Lo=s("xFormers"),Co=s("."),Fo=m(),J=i("div"),D(Ze.$$.fragment),Ao=m(),je=i("p"),Ro=s("Load textual inversion embeddings into the text encoder of "),Ke=i("a"),Bo=s("StableDiffusionPipeline"),Xo=s(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Yo=m(),mt=i("p"),Vo=s("Example:"),Qo=m(),D(fe.$$.fragment),qo=m(),We=i("p"),zo=s(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ge=i("a"),Ho=s("civitAI"),Oo=s(") and then load the vector"),Ko=m(),D(me.$$.fragment),en=m(),P=i("div"),D(Ne.$$.fragment),tn=m(),V=i("p"),on=s("Load LoRA weights specified in "),ut=i("code"),nn=s("pretrained_model_name_or_path_or_dict"),sn=s(" into "),ht=i("code"),an=s("self.unet"),rn=s(` and
`),gt=i("code"),ln=s("self.text_encoder"),dn=s("."),pn=m(),Le=i("p"),cn=s("All kwargs are forwarded to "),_t=i("code"),fn=s("self.lora_state_dict"),mn=s("."),un=m(),Ce=i("p"),hn=s("See "),et=i("a"),gn=s("lora_state_dict()"),_n=s(" for more details on how the state dict is loaded."),bn=m(),O=i("p"),yn=s("See "),tt=i("a"),vn=s("load_lora_into_unet()"),wn=s(` for more details on how the state dict is loaded into
`),bt=i("code"),Dn=s("self.unet"),$n=s("."),xn=m(),K=i("p"),In=s("See "),ot=i("a"),Mn=s("load_lora_into_text_encoder()"),Tn=s(` for more details on how the state dict is loaded
into `),yt=i("code"),Sn=s("self.text_encoder"),Jn=s("."),Pn=m(),ue=i("div"),D(Fe.$$.fragment),Un=m(),vt=i("p"),En=s("Save the LoRA parameters corresponding to the UNet and text encoder."),kt=m(),ee=i("h2"),he=i("a"),wt=i("span"),D(Ae.$$.fragment),kn=m(),Dt=i("span"),Zn=s("StableDiffusionPipelineOutput"),Zt=m(),te=i("div"),D(Re.$$.fragment),jn=m(),$t=i("p"),Wn=s("Output class for Stable Diffusion pipelines."),this.h()},l(n){const b=Ds('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(t),_=u(n),f=r(n,"H1",{class:!0});var Be=l(f);p=r(Be,"A",{id:!0,class:!0,href:!0});var xt=l(p);g=r(xt,"SPAN",{});var It=l(g);$(o.$$.fragment,It),It.forEach(t),xt.forEach(t),c=u(Be),j=r(Be,"SPAN",{});var Mt=l(j);F=a(Mt,"Depth-to-image"),Mt.forEach(t),Be.forEach(t),ne=u(n),E=r(n,"P",{});var oe=l(E);A=a(oe,"The Stable Diffusion model can also infer depth based on an image using "),R=r(oe,"A",{href:!0,rel:!0});var Tt=l(R);ye=a(Tt,"MiDas"),Tt.forEach(t),B=a(oe,". This allows you to pass a text prompt and an initial image to condition the generation of new images as well as a "),z=r(oe,"CODE",{});var St=l(z);ve=a(St,"depth_map"),St.forEach(t),U=a(oe," to preserve the image structure."),oe.forEach(t),k=u(n),$(X.$$.fragment,n),Z=u(n),W=r(n,"H2",{class:!0});var Xe=l(W);Y=r(Xe,"A",{id:!0,class:!0,href:!0});var An=l(Y);se=r(An,"SPAN",{});var Rn=l(se);$(we.$$.fragment,Rn),Rn.forEach(t),An.forEach(t),qt=u(Xe),rt=r(Xe,"SPAN",{});var Bn=l(rt);zt=a(Bn,"StableDiffusionDepth2ImgPipeline"),Bn.forEach(t),Xe.forEach(t),Et=u(n),y=r(n,"DIV",{class:!0});var w=l(y);$(De.$$.fragment,w),Ht=u(w),lt=r(w,"P",{});var Xn=l(lt);Ot=a(Xn,"Pipeline for text-guided depth-based image-to-image generation using Stable Diffusion."),Xn.forEach(t),Kt=u(w),$e=r(w,"P",{});var Wt=l($e);eo=a(Wt,"This model inherits from "),Ye=r(Wt,"A",{href:!0});var Yn=l(Ye);to=a(Yn,"DiffusionPipeline"),Yn.forEach(t),oo=a(Wt,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Wt.forEach(t),no=u(w),dt=r(w,"P",{});var Vn=l(dt);so=a(Vn,"The pipeline also inherits the following loading methods:"),Vn.forEach(t),ao=u(w),H=r(w,"UL",{});var nt=l(H);Ve=r(nt,"LI",{});var Gn=l(Ve);Qe=r(Gn,"A",{href:!0});var Qn=l(Qe);io=a(Qn,"load_textual_inversion()"),Qn.forEach(t),ro=a(Gn," for loading textual inversion embeddings"),Gn.forEach(t),lo=u(nt),qe=r(nt,"LI",{});var Nn=l(qe);ze=r(Nn,"A",{href:!0});var qn=l(ze);po=a(qn,"load_lora_weights()"),qn.forEach(t),co=a(Nn," for loading LoRA weights"),Nn.forEach(t),fo=u(nt),He=r(nt,"LI",{});var Ln=l(He);Oe=r(Ln,"A",{href:!0});var zn=l(Oe);mo=a(zn,"save_lora_weights()"),zn.forEach(t),uo=a(Ln," for saving LoRA weights"),Ln.forEach(t),nt.forEach(t),ho=u(w),Q=r(w,"DIV",{class:!0});var st=l(Q);$(xe.$$.fragment,st),go=u(st),pt=r(st,"P",{});var Hn=l(pt);_o=a(Hn,"The call function to the pipeline for generation."),Hn.forEach(t),bo=u(st),$(ae.$$.fragment,st),st.forEach(t),yo=u(w),G=r(w,"DIV",{class:!0});var ge=l(G);$(Ie.$$.fragment,ge),vo=u(ge),ct=r(ge,"P",{});var On=l(ct);wo=a(On,`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.`),On.forEach(t),Do=u(ge),$(ie.$$.fragment,ge),$o=u(ge),$(re.$$.fragment,ge),ge.forEach(t),xo=u(w),le=r(w,"DIV",{class:!0});var Gt=l(le);$(Me.$$.fragment,Gt),Io=u(Gt),Te=r(Gt,"P",{});var Nt=l(Te);Mo=a(Nt,"Disable sliced attention computation. If "),ft=r(Nt,"CODE",{});var Kn=l(ft);To=a(Kn,"enable_attention_slicing"),Kn.forEach(t),So=a(Nt,` was previously called, attention is
computed in one step.`),Nt.forEach(t),Gt.forEach(t),Jo=u(w),N=r(w,"DIV",{class:!0});var _e=l(N);$(Se.$$.fragment,_e),Po=u(_e),Je=r(_e,"P",{});var Lt=l(Je);Uo=a(Lt,"Enable memory efficient attention from "),Pe=r(Lt,"A",{href:!0,rel:!0});var es=l(Pe);Eo=a(es,"xFormers"),es.forEach(t),ko=a(Lt,`. 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.`),Lt.forEach(t),Zo=u(_e),$(de.$$.fragment,_e),jo=u(_e),$(pe.$$.fragment,_e),_e.forEach(t),Wo=u(w),ce=r(w,"DIV",{class:!0});var Ct=l(ce);$(Ue.$$.fragment,Ct),Go=u(Ct),Ee=r(Ct,"P",{});var Ft=l(Ee);No=a(Ft,"Disable memory efficient attention from "),ke=r(Ft,"A",{href:!0,rel:!0});var ts=l(ke);Lo=a(ts,"xFormers"),ts.forEach(t),Co=a(Ft,"."),Ft.forEach(t),Ct.forEach(t),Fo=u(w),J=r(w,"DIV",{class:!0});var L=l(J);$(Ze.$$.fragment,L),Ao=u(L),je=r(L,"P",{});var At=l(je);Ro=a(At,"Load textual inversion embeddings into the text encoder of "),Ke=r(At,"A",{href:!0});var os=l(Ke);Bo=a(os,"StableDiffusionPipeline"),os.forEach(t),Xo=a(At,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),At.forEach(t),Yo=u(L),mt=r(L,"P",{});var ns=l(mt);Vo=a(ns,"Example:"),ns.forEach(t),Qo=u(L),$(fe.$$.fragment,L),qo=u(L),We=r(L,"P",{});var Rt=l(We);zo=a(Rt,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ge=r(Rt,"A",{href:!0,rel:!0});var ss=l(Ge);Ho=a(ss,"civitAI"),ss.forEach(t),Oo=a(Rt,") and then load the vector"),Rt.forEach(t),Ko=u(L),$(me.$$.fragment,L),L.forEach(t),en=u(w),P=r(w,"DIV",{class:!0});var C=l(P);$(Ne.$$.fragment,C),tn=u(C),V=r(C,"P",{});var be=l(V);on=a(be,"Load LoRA weights specified in "),ut=r(be,"CODE",{});var as=l(ut);nn=a(as,"pretrained_model_name_or_path_or_dict"),as.forEach(t),sn=a(be," into "),ht=r(be,"CODE",{});var is=l(ht);an=a(is,"self.unet"),is.forEach(t),rn=a(be,` and
`),gt=r(be,"CODE",{});var rs=l(gt);ln=a(rs,"self.text_encoder"),rs.forEach(t),dn=a(be,"."),be.forEach(t),pn=u(C),Le=r(C,"P",{});var Bt=l(Le);cn=a(Bt,"All kwargs are forwarded to "),_t=r(Bt,"CODE",{});var ls=l(_t);fn=a(ls,"self.lora_state_dict"),ls.forEach(t),mn=a(Bt,"."),Bt.forEach(t),un=u(C),Ce=r(C,"P",{});var Xt=l(Ce);hn=a(Xt,"See "),et=r(Xt,"A",{href:!0});var ds=l(et);gn=a(ds,"lora_state_dict()"),ds.forEach(t),_n=a(Xt," for more details on how the state dict is loaded."),Xt.forEach(t),bn=u(C),O=r(C,"P",{});var at=l(O);yn=a(at,"See "),tt=r(at,"A",{href:!0});var ps=l(tt);vn=a(ps,"load_lora_into_unet()"),ps.forEach(t),wn=a(at,` for more details on how the state dict is loaded into
`),bt=r(at,"CODE",{});var cs=l(bt);Dn=a(cs,"self.unet"),cs.forEach(t),$n=a(at,"."),at.forEach(t),xn=u(C),K=r(C,"P",{});var it=l(K);In=a(it,"See "),ot=r(it,"A",{href:!0});var fs=l(ot);Mn=a(fs,"load_lora_into_text_encoder()"),fs.forEach(t),Tn=a(it,` for more details on how the state dict is loaded
into `),yt=r(it,"CODE",{});var ms=l(yt);Sn=a(ms,"self.text_encoder"),ms.forEach(t),Jn=a(it,"."),it.forEach(t),C.forEach(t),Pn=u(w),ue=r(w,"DIV",{class:!0});var Yt=l(ue);$(Fe.$$.fragment,Yt),Un=u(Yt),vt=r(Yt,"P",{});var us=l(vt);En=a(us,"Save the LoRA parameters corresponding to the UNet and text encoder."),us.forEach(t),Yt.forEach(t),w.forEach(t),kt=u(n),ee=r(n,"H2",{class:!0});var Vt=l(ee);he=r(Vt,"A",{id:!0,class:!0,href:!0});var hs=l(he);wt=r(hs,"SPAN",{});var gs=l(wt);$(Ae.$$.fragment,gs),gs.forEach(t),hs.forEach(t),kn=u(Vt),Dt=r(Vt,"SPAN",{});var _s=l(Dt);Zn=a(_s,"StableDiffusionPipelineOutput"),_s.forEach(t),Vt.forEach(t),Zt=u(n),te=r(n,"DIV",{class:!0});var Qt=l(te);$(Re.$$.fragment,Qt),jn=u(Qt),$t=r(Qt,"P",{});var bs=l($t);Wn=a(bs,"Output class for Stable Diffusion pipelines."),bs.forEach(t),Qt.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(ks)),h(p,"id","depthtoimage"),h(p,"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"),h(p,"href","#depthtoimage"),h(f,"class","relative group"),h(R,"href","https://github.com/isl-org/MiDaS"),h(R,"rel","nofollow"),h(Y,"id","diffusers.StableDiffusionDepth2ImgPipeline"),h(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"),h(Y,"href","#diffusers.StableDiffusionDepth2ImgPipeline"),h(W,"class","relative group"),h(Ye,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(Qe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),h(ze,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),h(Oe,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),h(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Pe,"href","https://facebookresearch.github.io/xformers/"),h(Pe,"rel","nofollow"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ke,"href","https://facebookresearch.github.io/xformers/"),h(ke,"rel","nofollow"),h(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ke,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),h(Ge,"href","https://civitai.com/models/3036?modelVersionId=9857"),h(Ge,"rel","nofollow"),h(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(et,"href","/docs/diffusers/v0.20.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),h(tt,"href","/docs/diffusers/v0.20.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),h(ot,"href","/docs/diffusers/v0.20.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),h(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(he,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),h(he,"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"),h(he,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),h(ee,"class","relative group"),h(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,b){e(document.head,d),v(n,_,b),v(n,f,b),e(f,p),e(p,g),x(o,g,null),e(f,c),e(f,j),e(j,F),v(n,ne,b),v(n,E,b),e(E,A),e(E,R),e(R,ye),e(E,B),e(E,z),e(z,ve),e(E,U),v(n,k,b),x(X,n,b),v(n,Z,b),v(n,W,b),e(W,Y),e(Y,se),x(we,se,null),e(W,qt),e(W,rt),e(rt,zt),v(n,Et,b),v(n,y,b),x(De,y,null),e(y,Ht),e(y,lt),e(lt,Ot),e(y,Kt),e(y,$e),e($e,eo),e($e,Ye),e(Ye,to),e($e,oo),e(y,no),e(y,dt),e(dt,so),e(y,ao),e(y,H),e(H,Ve),e(Ve,Qe),e(Qe,io),e(Ve,ro),e(H,lo),e(H,qe),e(qe,ze),e(ze,po),e(qe,co),e(H,fo),e(H,He),e(He,Oe),e(Oe,mo),e(He,uo),e(y,ho),e(y,Q),x(xe,Q,null),e(Q,go),e(Q,pt),e(pt,_o),e(Q,bo),x(ae,Q,null),e(y,yo),e(y,G),x(Ie,G,null),e(G,vo),e(G,ct),e(ct,wo),e(G,Do),x(ie,G,null),e(G,$o),x(re,G,null),e(y,xo),e(y,le),x(Me,le,null),e(le,Io),e(le,Te),e(Te,Mo),e(Te,ft),e(ft,To),e(Te,So),e(y,Jo),e(y,N),x(Se,N,null),e(N,Po),e(N,Je),e(Je,Uo),e(Je,Pe),e(Pe,Eo),e(Je,ko),e(N,Zo),x(de,N,null),e(N,jo),x(pe,N,null),e(y,Wo),e(y,ce),x(Ue,ce,null),e(ce,Go),e(ce,Ee),e(Ee,No),e(Ee,ke),e(ke,Lo),e(Ee,Co),e(y,Fo),e(y,J),x(Ze,J,null),e(J,Ao),e(J,je),e(je,Ro),e(je,Ke),e(Ke,Bo),e(je,Xo),e(J,Yo),e(J,mt),e(mt,Vo),e(J,Qo),x(fe,J,null),e(J,qo),e(J,We),e(We,zo),e(We,Ge),e(Ge,Ho),e(We,Oo),e(J,Ko),x(me,J,null),e(y,en),e(y,P),x(Ne,P,null),e(P,tn),e(P,V),e(V,on),e(V,ut),e(ut,nn),e(V,sn),e(V,ht),e(ht,an),e(V,rn),e(V,gt),e(gt,ln),e(V,dn),e(P,pn),e(P,Le),e(Le,cn),e(Le,_t),e(_t,fn),e(Le,mn),e(P,un),e(P,Ce),e(Ce,hn),e(Ce,et),e(et,gn),e(Ce,_n),e(P,bn),e(P,O),e(O,yn),e(O,tt),e(tt,vn),e(O,wn),e(O,bt),e(bt,Dn),e(O,$n),e(P,xn),e(P,K),e(K,In),e(K,ot),e(ot,Mn),e(K,Tn),e(K,yt),e(yt,Sn),e(K,Jn),e(y,Pn),e(y,ue),x(Fe,ue,null),e(ue,Un),e(ue,vt),e(vt,En),v(n,kt,b),v(n,ee,b),e(ee,he),e(he,wt),x(Ae,wt,null),e(ee,kn),e(ee,Dt),e(Dt,Zn),v(n,Zt,b),v(n,te,b),x(Re,te,null),e(te,jn),e(te,$t),e($t,Wn),jt=!0},p(n,[b]){const Be={};b&2&&(Be.$$scope={dirty:b,ctx:n}),X.$set(Be);const xt={};b&2&&(xt.$$scope={dirty:b,ctx:n}),ae.$set(xt);const It={};b&2&&(It.$$scope={dirty:b,ctx:n}),ie.$set(It);const Mt={};b&2&&(Mt.$$scope={dirty:b,ctx:n}),re.$set(Mt);const oe={};b&2&&(oe.$$scope={dirty:b,ctx:n}),de.$set(oe);const Tt={};b&2&&(Tt.$$scope={dirty:b,ctx:n}),pe.$set(Tt);const St={};b&2&&(St.$$scope={dirty:b,ctx:n}),fe.$set(St);const Xe={};b&2&&(Xe.$$scope={dirty:b,ctx:n}),me.$set(Xe)},i(n){jt||(I(o.$$.fragment,n),I(X.$$.fragment,n),I(we.$$.fragment,n),I(De.$$.fragment,n),I(xe.$$.fragment,n),I(ae.$$.fragment,n),I(Ie.$$.fragment,n),I(ie.$$.fragment,n),I(re.$$.fragment,n),I(Me.$$.fragment,n),I(Se.$$.fragment,n),I(de.$$.fragment,n),I(pe.$$.fragment,n),I(Ue.$$.fragment,n),I(Ze.$$.fragment,n),I(fe.$$.fragment,n),I(me.$$.fragment,n),I(Ne.$$.fragment,n),I(Fe.$$.fragment,n),I(Ae.$$.fragment,n),I(Re.$$.fragment,n),jt=!0)},o(n){M(o.$$.fragment,n),M(X.$$.fragment,n),M(we.$$.fragment,n),M(De.$$.fragment,n),M(xe.$$.fragment,n),M(ae.$$.fragment,n),M(Ie.$$.fragment,n),M(ie.$$.fragment,n),M(re.$$.fragment,n),M(Me.$$.fragment,n),M(Se.$$.fragment,n),M(de.$$.fragment,n),M(pe.$$.fragment,n),M(Ue.$$.fragment,n),M(Ze.$$.fragment,n),M(fe.$$.fragment,n),M(me.$$.fragment,n),M(Ne.$$.fragment,n),M(Fe.$$.fragment,n),M(Ae.$$.fragment,n),M(Re.$$.fragment,n),jt=!1},d(n){t(d),n&&t(_),n&&t(f),T(o),n&&t(ne),n&&t(E),n&&t(k),T(X,n),n&&t(Z),n&&t(W),T(we),n&&t(Et),n&&t(y),T(De),T(xe),T(ae),T(Ie),T(ie),T(re),T(Me),T(Se),T(de),T(pe),T(Ue),T(Ze),T(fe),T(me),T(Ne),T(Fe),n&&t(kt),n&&t(ee),T(Ae),n&&t(Zt),n&&t(te),T(Re)}}}const ks={local:"depthtoimage",sections:[{local:"diffusers.StableDiffusionDepth2ImgPipeline",title:"StableDiffusionDepth2ImgPipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"}],title:"Depth-to-image"};function Zs(S){return $s(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fs extends ys{constructor(d){super();vs(this,d,Zs,Es,ws,{})}}export{Fs as default,ks as metadata};
