import{S as Ma,i as Sa,s as Pa,e as a,k as f,w as D,t as i,M as Ja,c as s,d as t,m,a as l,x as $,h as r,b as h,G as e,g as w,y as x,q as I,o as T,B as M,v as ka,L as Ut}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Yn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Zt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as zn}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Et}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ea(S){let d,_,u,p,g,n,c,j,C,ne,E,A,R,ye,B,q,we;return{c(){d=a("p"),_=i("Make sure to check out the Stable Diffusion "),u=a("a"),p=i("Tips"),g=i(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),n=f(),c=a("p"),j=i("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),C=a("a"),ne=i("CompVis"),E=i(", "),A=a("a"),R=i("Runway"),ye=i(", and "),B=a("a"),q=i("Stability AI"),we=i(" Hub organizations!"),this.h()},l(k){d=s(k,"P",{});var U=l(d);_=r(U,"Make sure to check out the Stable Diffusion "),u=s(U,"A",{href:!0});var X=l(u);p=r(X,"Tips"),X.forEach(t),g=r(U," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),U.forEach(t),n=m(k),c=s(k,"P",{});var Z=l(c);j=r(Z,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),C=s(Z,"A",{href:!0,rel:!0});var W=l(C);ne=r(W,"CompVis"),W.forEach(t),E=r(Z,", "),A=s(Z,"A",{href:!0,rel:!0});var V=l(A);R=r(V,"Runway"),V.forEach(t),ye=r(Z,", and "),B=s(Z,"A",{href:!0,rel:!0});var ae=l(B);q=r(ae,"Stability AI"),ae.forEach(t),we=r(Z," Hub organizations!"),Z.forEach(t),this.h()},h(){h(u,"href","overview#tips"),h(C,"href","https://huggingface.co/CompVis"),h(C,"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(k,U){w(k,d,U),e(d,_),e(d,u),e(u,p),e(d,g),w(k,n,U),w(k,c,U),e(c,j),e(c,C),e(C,ne),e(c,E),e(c,A),e(A,R),e(c,ye),e(c,B),e(B,q),e(c,we)},d(k){k&&t(d),k&&t(n),k&&t(c)}}}function Ua(S){let d,_,u,p,g;return p=new Zt({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=a("p"),_=i("Examples:"),u=f(),D(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);_=r(c,"Examples:"),c.forEach(t),u=m(n),$(p.$$.fragment,n)},m(n,c){w(n,d,c),e(d,_),w(n,u,c),x(p,n,c),g=!0},p:Ut,i(n){g||(I(p.$$.fragment,n),g=!0)},o(n){T(p.$$.fragment,n),g=!1},d(n){n&&t(d),n&&t(u),M(p,n)}}}function Za(S){let d,_,u,p,g;return{c(){d=a("p"),_=i("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),u=a("code"),p=i("scaled_dot_product_attention"),g=i(` (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(n){d=s(n,"P",{});var c=l(d);_=r(c,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),u=s(c,"CODE",{});var j=l(u);p=r(j,"scaled_dot_product_attention"),j.forEach(t),g=r(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(n,c){w(n,d,c),e(d,_),e(d,u),e(u,p),e(d,g)},d(n){n&&t(d)}}}function ja(S){let d,_,u,p,g;return p=new Zt({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=a("p"),_=i("Examples:"),u=f(),D(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);_=r(c,"Examples:"),c.forEach(t),u=m(n),$(p.$$.fragment,n)},m(n,c){w(n,d,c),e(d,_),w(n,u,c),x(p,n,c),g=!0},p:Ut,i(n){g||(I(p.$$.fragment,n),g=!0)},o(n){T(p.$$.fragment,n),g=!1},d(n){n&&t(d),n&&t(u),M(p,n)}}}function Wa(S){let d,_;return{c(){d=a("p"),_=i(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(u){d=s(u,"P",{});var p=l(d);_=r(p,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),p.forEach(t)},m(u,p){w(u,d,p),e(d,_)},d(u){u&&t(d)}}}function Na(S){let d,_,u,p,g;return p=new Zt({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=a("p"),_=i("Examples:"),u=f(),D(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);_=r(c,"Examples:"),c.forEach(t),u=m(n),$(p.$$.fragment,n)},m(n,c){w(n,d,c),e(d,_),w(n,u,c),x(p,n,c),g=!0},p:Ut,i(n){g||(I(p.$$.fragment,n),g=!0)},o(n){T(p.$$.fragment,n),g=!1},d(n){n&&t(d),n&&t(u),M(p,n)}}}function Ga(S){let d,_,u,p,g;return p=new Zt({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=a("p"),_=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),u=f(),D(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);_=r(c,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),c.forEach(t),u=m(n),$(p.$$.fragment,n)},m(n,c){w(n,d,c),e(d,_),w(n,u,c),x(p,n,c),g=!0},p:Ut,i(n){g||(I(p.$$.fragment,n),g=!0)},o(n){T(p.$$.fragment,n),g=!1},d(n){n&&t(d),n&&t(u),M(p,n)}}}function La(S){let d,_,u,p,g;return p=new Zt({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=a("p"),_=i("locally:"),u=f(),D(p.$$.fragment)},l(n){d=s(n,"P",{});var c=l(d);_=r(c,"locally:"),c.forEach(t),u=m(n),$(p.$$.fragment,n)},m(n,c){w(n,d,c),e(d,_),w(n,u,c),x(p,n,c),g=!0},p:Ut,i(n){g||(I(p.$$.fragment,n),g=!0)},o(n){T(p.$$.fragment,n),g=!1},d(n){n&&t(d),n&&t(u),M(p,n)}}}function Fa(S){let d,_,u,p,g,n,c,j,C,ne,E,A,R,ye,B,q,we,k,U,X,Z,W,V,ae,De,Kt,dt,eo,jt,v,$e,to,pt,oo,no,xe,ao,ze,so,io,ro,ct,lo,po,O,Qe,qe,co,fo,mo,Oe,He,uo,ho,go,Ke,et,_o,bo,vo,Q,Ie,yo,ft,wo,Do,se,$o,N,Te,xo,mt,Io,To,ie,Mo,re,So,le,Me,Po,Se,Jo,ut,ko,Eo,Uo,G,Pe,Zo,Je,jo,ke,Wo,No,Go,de,Lo,pe,Fo,ce,Ee,Co,Ue,Ao,Ze,Ro,Bo,Xo,P,je,Vo,We,Yo,tt,zo,Qo,qo,ht,Oo,Ho,fe,Ko,Ne,en,Ge,tn,on,nn,me,an,J,Le,sn,Y,rn,gt,ln,dn,_t,pn,cn,bt,fn,mn,un,Fe,hn,vt,gn,_n,bn,Ce,vn,ot,yn,wn,Dn,H,$n,nt,xn,In,yt,Tn,Mn,Sn,K,Pn,at,Jn,kn,wt,En,Un,Zn,ue,Ae,jn,Dt,Wn,Nn,he,Re,Gn,$t,Ln,Wt,ee,ge,xt,Be,Fn,It,Cn,Nt,te,Xe,An,Tt,Rn,Gt;return n=new zn({}),X=new Yn({props:{$$slots:{default:[Ea]},$$scope:{ctx:S}}}),De=new zn({}),$e=new z({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.21.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.21.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L63"}}),Ie=new z({props:{name:"__call__",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"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[str, typing.List[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.21.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.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.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.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L524",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),se=new Et({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.example",$$slots:{default:[Ua]},$$scope:{ctx:S}}}),Te=new z({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.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),ie=new Yn({props:{warning:!0,$$slots:{default:[Za]},$$scope:{ctx:S}}}),re=new Et({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_attention_slicing.example",$$slots:{default:[ja]},$$scope:{ctx:S}}}),Me=new z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),Pe=new z({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.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),de=new Yn({props:{warning:!0,$$slots:{default:[Wa]},$$scope:{ctx:S}}}),pe=new Et({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Na]},$$scope:{ctx:S}}}),Ee=new z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),je=new z({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:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"text_encoder",val:": typing.Optional[transformers.modeling_utils.PreTrainedModel] = 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.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>, <em>optional</em>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).
If not specified, function will take self.tokenizer.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>, <em>optional</em>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text. If not specified, function will take self.tokenizer.`,name:"tokenizer"},{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.21.0/src/diffusers/loaders.py#L687"}}),fe=new Et({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example",$$slots:{default:[Ga]},$$scope:{ctx:S}}}),me=new Et({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[La]},$$scope:{ctx:S}}}),Le=new z({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.21.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.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L991"}}),Ae=new z({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.21.0/src/diffusers/loaders.py#L1623"}}),Re=new z({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L167"}}),Be=new zn({}),Xe=new z({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L15"}}),{c(){d=a("meta"),_=f(),u=a("h1"),p=a("a"),g=a("span"),D(n.$$.fragment),c=f(),j=a("span"),C=i("Depth-to-image"),ne=f(),E=a("p"),A=i("The Stable Diffusion model can also infer depth based on an image using "),R=a("a"),ye=i("MiDas"),B=i(". This allows you to pass a text prompt and an initial image to condition the generation of new images as well as a "),q=a("code"),we=i("depth_map"),k=i(" to preserve the image structure."),U=f(),D(X.$$.fragment),Z=f(),W=a("h2"),V=a("a"),ae=a("span"),D(De.$$.fragment),Kt=f(),dt=a("span"),eo=i("StableDiffusionDepth2ImgPipeline"),jt=f(),v=a("div"),D($e.$$.fragment),to=f(),pt=a("p"),oo=i("Pipeline for text-guided depth-based image-to-image generation using Stable Diffusion."),no=f(),xe=a("p"),ao=i("This model inherits from "),ze=a("a"),so=i("DiffusionPipeline"),io=i(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ro=f(),ct=a("p"),lo=i("The pipeline also inherits the following loading methods:"),po=f(),O=a("ul"),Qe=a("li"),qe=a("a"),co=i("load_textual_inversion()"),fo=i(" for loading textual inversion embeddings"),mo=f(),Oe=a("li"),He=a("a"),uo=i("load_lora_weights()"),ho=i(" for loading LoRA weights"),go=f(),Ke=a("li"),et=a("a"),_o=i("save_lora_weights()"),bo=i(" for saving LoRA weights"),vo=f(),Q=a("div"),D(Ie.$$.fragment),yo=f(),ft=a("p"),wo=i("The call function to the pipeline for generation."),Do=f(),D(se.$$.fragment),$o=f(),N=a("div"),D(Te.$$.fragment),xo=f(),mt=a("p"),Io=i(`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.`),To=f(),D(ie.$$.fragment),Mo=f(),D(re.$$.fragment),So=f(),le=a("div"),D(Me.$$.fragment),Po=f(),Se=a("p"),Jo=i("Disable sliced attention computation. If "),ut=a("code"),ko=i("enable_attention_slicing"),Eo=i(` was previously called, attention is
computed in one step.`),Uo=f(),G=a("div"),D(Pe.$$.fragment),Zo=f(),Je=a("p"),jo=i("Enable memory efficient attention from "),ke=a("a"),Wo=i("xFormers"),No=i(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),Go=f(),D(de.$$.fragment),Lo=f(),D(pe.$$.fragment),Fo=f(),ce=a("div"),D(Ee.$$.fragment),Co=f(),Ue=a("p"),Ao=i("Disable memory efficient attention from "),Ze=a("a"),Ro=i("xFormers"),Bo=i("."),Xo=f(),P=a("div"),D(je.$$.fragment),Vo=f(),We=a("p"),Yo=i("Load textual inversion embeddings into the text encoder of "),tt=a("a"),zo=i("StableDiffusionPipeline"),Qo=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),qo=f(),ht=a("p"),Oo=i("Example:"),Ho=f(),D(fe.$$.fragment),Ko=f(),Ne=a("p"),en=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ge=a("a"),tn=i("civitAI"),on=i(") and then load the vector"),nn=f(),D(me.$$.fragment),an=f(),J=a("div"),D(Le.$$.fragment),sn=f(),Y=a("p"),rn=i("Load LoRA weights specified in "),gt=a("code"),ln=i("pretrained_model_name_or_path_or_dict"),dn=i(" into "),_t=a("code"),pn=i("self.unet"),cn=i(` and
`),bt=a("code"),fn=i("self.text_encoder"),mn=i("."),un=f(),Fe=a("p"),hn=i("All kwargs are forwarded to "),vt=a("code"),gn=i("self.lora_state_dict"),_n=i("."),bn=f(),Ce=a("p"),vn=i("See "),ot=a("a"),yn=i("lora_state_dict()"),wn=i(" for more details on how the state dict is loaded."),Dn=f(),H=a("p"),$n=i("See "),nt=a("a"),xn=i("load_lora_into_unet()"),In=i(` for more details on how the state dict is loaded into
`),yt=a("code"),Tn=i("self.unet"),Mn=i("."),Sn=f(),K=a("p"),Pn=i("See "),at=a("a"),Jn=i("load_lora_into_text_encoder()"),kn=i(` for more details on how the state dict is loaded
into `),wt=a("code"),En=i("self.text_encoder"),Un=i("."),Zn=f(),ue=a("div"),D(Ae.$$.fragment),jn=f(),Dt=a("p"),Wn=i("Save the LoRA parameters corresponding to the UNet and text encoder."),Nn=f(),he=a("div"),D(Re.$$.fragment),Gn=f(),$t=a("p"),Ln=i("Encodes the prompt into text encoder hidden states."),Wt=f(),ee=a("h2"),ge=a("a"),xt=a("span"),D(Be.$$.fragment),Fn=f(),It=a("span"),Cn=i("StableDiffusionPipelineOutput"),Nt=f(),te=a("div"),D(Xe.$$.fragment),An=f(),Tt=a("p"),Rn=i("Output class for Stable Diffusion pipelines."),this.h()},l(o){const b=Ja('[data-svelte="svelte-1phssyn"]',document.head);d=s(b,"META",{name:!0,content:!0}),b.forEach(t),_=m(o),u=s(o,"H1",{class:!0});var Ve=l(u);p=s(Ve,"A",{id:!0,class:!0,href:!0});var Mt=l(p);g=s(Mt,"SPAN",{});var St=l(g);$(n.$$.fragment,St),St.forEach(t),Mt.forEach(t),c=m(Ve),j=s(Ve,"SPAN",{});var Pt=l(j);C=r(Pt,"Depth-to-image"),Pt.forEach(t),Ve.forEach(t),ne=m(o),E=s(o,"P",{});var oe=l(E);A=r(oe,"The Stable Diffusion model can also infer depth based on an image using "),R=s(oe,"A",{href:!0,rel:!0});var Jt=l(R);ye=r(Jt,"MiDas"),Jt.forEach(t),B=r(oe,". This allows you to pass a text prompt and an initial image to condition the generation of new images as well as a "),q=s(oe,"CODE",{});var kt=l(q);we=r(kt,"depth_map"),kt.forEach(t),k=r(oe," to preserve the image structure."),oe.forEach(t),U=m(o),$(X.$$.fragment,o),Z=m(o),W=s(o,"H2",{class:!0});var Ye=l(W);V=s(Ye,"A",{id:!0,class:!0,href:!0});var Qn=l(V);ae=s(Qn,"SPAN",{});var qn=l(ae);$(De.$$.fragment,qn),qn.forEach(t),Qn.forEach(t),Kt=m(Ye),dt=s(Ye,"SPAN",{});var On=l(dt);eo=r(On,"StableDiffusionDepth2ImgPipeline"),On.forEach(t),Ye.forEach(t),jt=m(o),v=s(o,"DIV",{class:!0});var y=l(v);$($e.$$.fragment,y),to=m(y),pt=s(y,"P",{});var Hn=l(pt);oo=r(Hn,"Pipeline for text-guided depth-based image-to-image generation using Stable Diffusion."),Hn.forEach(t),no=m(y),xe=s(y,"P",{});var Lt=l(xe);ao=r(Lt,"This model inherits from "),ze=s(Lt,"A",{href:!0});var Kn=l(ze);so=r(Kn,"DiffusionPipeline"),Kn.forEach(t),io=r(Lt,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Lt.forEach(t),ro=m(y),ct=s(y,"P",{});var ea=l(ct);lo=r(ea,"The pipeline also inherits the following loading methods:"),ea.forEach(t),po=m(y),O=s(y,"UL",{});var st=l(O);Qe=s(st,"LI",{});var Bn=l(Qe);qe=s(Bn,"A",{href:!0});var ta=l(qe);co=r(ta,"load_textual_inversion()"),ta.forEach(t),fo=r(Bn," for loading textual inversion embeddings"),Bn.forEach(t),mo=m(st),Oe=s(st,"LI",{});var Xn=l(Oe);He=s(Xn,"A",{href:!0});var oa=l(He);uo=r(oa,"load_lora_weights()"),oa.forEach(t),ho=r(Xn," for loading LoRA weights"),Xn.forEach(t),go=m(st),Ke=s(st,"LI",{});var Vn=l(Ke);et=s(Vn,"A",{href:!0});var na=l(et);_o=r(na,"save_lora_weights()"),na.forEach(t),bo=r(Vn," for saving LoRA weights"),Vn.forEach(t),st.forEach(t),vo=m(y),Q=s(y,"DIV",{class:!0});var it=l(Q);$(Ie.$$.fragment,it),yo=m(it),ft=s(it,"P",{});var aa=l(ft);wo=r(aa,"The call function to the pipeline for generation."),aa.forEach(t),Do=m(it),$(se.$$.fragment,it),it.forEach(t),$o=m(y),N=s(y,"DIV",{class:!0});var _e=l(N);$(Te.$$.fragment,_e),xo=m(_e),mt=s(_e,"P",{});var sa=l(mt);Io=r(sa,`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.`),sa.forEach(t),To=m(_e),$(ie.$$.fragment,_e),Mo=m(_e),$(re.$$.fragment,_e),_e.forEach(t),So=m(y),le=s(y,"DIV",{class:!0});var Ft=l(le);$(Me.$$.fragment,Ft),Po=m(Ft),Se=s(Ft,"P",{});var Ct=l(Se);Jo=r(Ct,"Disable sliced attention computation. If "),ut=s(Ct,"CODE",{});var ia=l(ut);ko=r(ia,"enable_attention_slicing"),ia.forEach(t),Eo=r(Ct,` was previously called, attention is
computed in one step.`),Ct.forEach(t),Ft.forEach(t),Uo=m(y),G=s(y,"DIV",{class:!0});var be=l(G);$(Pe.$$.fragment,be),Zo=m(be),Je=s(be,"P",{});var At=l(Je);jo=r(At,"Enable memory efficient attention from "),ke=s(At,"A",{href:!0,rel:!0});var ra=l(ke);Wo=r(ra,"xFormers"),ra.forEach(t),No=r(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(t),Go=m(be),$(de.$$.fragment,be),Lo=m(be),$(pe.$$.fragment,be),be.forEach(t),Fo=m(y),ce=s(y,"DIV",{class:!0});var Rt=l(ce);$(Ee.$$.fragment,Rt),Co=m(Rt),Ue=s(Rt,"P",{});var Bt=l(Ue);Ao=r(Bt,"Disable memory efficient attention from "),Ze=s(Bt,"A",{href:!0,rel:!0});var la=l(Ze);Ro=r(la,"xFormers"),la.forEach(t),Bo=r(Bt,"."),Bt.forEach(t),Rt.forEach(t),Xo=m(y),P=s(y,"DIV",{class:!0});var L=l(P);$(je.$$.fragment,L),Vo=m(L),We=s(L,"P",{});var Xt=l(We);Yo=r(Xt,"Load textual inversion embeddings into the text encoder of "),tt=s(Xt,"A",{href:!0});var da=l(tt);zo=r(da,"StableDiffusionPipeline"),da.forEach(t),Qo=r(Xt,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Xt.forEach(t),qo=m(L),ht=s(L,"P",{});var pa=l(ht);Oo=r(pa,"Example:"),pa.forEach(t),Ho=m(L),$(fe.$$.fragment,L),Ko=m(L),Ne=s(L,"P",{});var Vt=l(Ne);en=r(Vt,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ge=s(Vt,"A",{href:!0,rel:!0});var ca=l(Ge);tn=r(ca,"civitAI"),ca.forEach(t),on=r(Vt,") and then load the vector"),Vt.forEach(t),nn=m(L),$(me.$$.fragment,L),L.forEach(t),an=m(y),J=s(y,"DIV",{class:!0});var F=l(J);$(Le.$$.fragment,F),sn=m(F),Y=s(F,"P",{});var ve=l(Y);rn=r(ve,"Load LoRA weights specified in "),gt=s(ve,"CODE",{});var fa=l(gt);ln=r(fa,"pretrained_model_name_or_path_or_dict"),fa.forEach(t),dn=r(ve," into "),_t=s(ve,"CODE",{});var ma=l(_t);pn=r(ma,"self.unet"),ma.forEach(t),cn=r(ve,` and
`),bt=s(ve,"CODE",{});var ua=l(bt);fn=r(ua,"self.text_encoder"),ua.forEach(t),mn=r(ve,"."),ve.forEach(t),un=m(F),Fe=s(F,"P",{});var Yt=l(Fe);hn=r(Yt,"All kwargs are forwarded to "),vt=s(Yt,"CODE",{});var ha=l(vt);gn=r(ha,"self.lora_state_dict"),ha.forEach(t),_n=r(Yt,"."),Yt.forEach(t),bn=m(F),Ce=s(F,"P",{});var zt=l(Ce);vn=r(zt,"See "),ot=s(zt,"A",{href:!0});var ga=l(ot);yn=r(ga,"lora_state_dict()"),ga.forEach(t),wn=r(zt," for more details on how the state dict is loaded."),zt.forEach(t),Dn=m(F),H=s(F,"P",{});var rt=l(H);$n=r(rt,"See "),nt=s(rt,"A",{href:!0});var _a=l(nt);xn=r(_a,"load_lora_into_unet()"),_a.forEach(t),In=r(rt,` for more details on how the state dict is loaded into
`),yt=s(rt,"CODE",{});var ba=l(yt);Tn=r(ba,"self.unet"),ba.forEach(t),Mn=r(rt,"."),rt.forEach(t),Sn=m(F),K=s(F,"P",{});var lt=l(K);Pn=r(lt,"See "),at=s(lt,"A",{href:!0});var va=l(at);Jn=r(va,"load_lora_into_text_encoder()"),va.forEach(t),kn=r(lt,` for more details on how the state dict is loaded
into `),wt=s(lt,"CODE",{});var ya=l(wt);En=r(ya,"self.text_encoder"),ya.forEach(t),Un=r(lt,"."),lt.forEach(t),F.forEach(t),Zn=m(y),ue=s(y,"DIV",{class:!0});var Qt=l(ue);$(Ae.$$.fragment,Qt),jn=m(Qt),Dt=s(Qt,"P",{});var wa=l(Dt);Wn=r(wa,"Save the LoRA parameters corresponding to the UNet and text encoder."),wa.forEach(t),Qt.forEach(t),Nn=m(y),he=s(y,"DIV",{class:!0});var qt=l(he);$(Re.$$.fragment,qt),Gn=m(qt),$t=s(qt,"P",{});var Da=l($t);Ln=r(Da,"Encodes the prompt into text encoder hidden states."),Da.forEach(t),qt.forEach(t),y.forEach(t),Wt=m(o),ee=s(o,"H2",{class:!0});var Ot=l(ee);ge=s(Ot,"A",{id:!0,class:!0,href:!0});var $a=l(ge);xt=s($a,"SPAN",{});var xa=l(xt);$(Be.$$.fragment,xa),xa.forEach(t),$a.forEach(t),Fn=m(Ot),It=s(Ot,"SPAN",{});var Ia=l(It);Cn=r(Ia,"StableDiffusionPipelineOutput"),Ia.forEach(t),Ot.forEach(t),Nt=m(o),te=s(o,"DIV",{class:!0});var Ht=l(te);$(Xe.$$.fragment,Ht),An=m(Ht),Tt=s(Ht,"P",{});var Ta=l(Tt);Rn=r(Ta,"Output class for Stable Diffusion pipelines."),Ta.forEach(t),Ht.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(Ca)),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(u,"class","relative group"),h(R,"href","https://github.com/isl-org/MiDaS"),h(R,"rel","nofollow"),h(V,"id","diffusers.StableDiffusionDepth2ImgPipeline"),h(V,"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(V,"href","#diffusers.StableDiffusionDepth2ImgPipeline"),h(W,"class","relative group"),h(ze,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(qe,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),h(He,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),h(et,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.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(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(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(ke,"href","https://facebookresearch.github.io/xformers/"),h(ke,"rel","nofollow"),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(Ze,"href","https://facebookresearch.github.io/xformers/"),h(Ze,"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(tt,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),h(Ge,"href","https://civitai.com/models/3036?modelVersionId=9857"),h(Ge,"rel","nofollow"),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(ot,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),h(nt,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),h(at,"href","/docs/diffusers/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),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(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(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ge,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),h(ge,"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(ge,"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(o,b){e(document.head,d),w(o,_,b),w(o,u,b),e(u,p),e(p,g),x(n,g,null),e(u,c),e(u,j),e(j,C),w(o,ne,b),w(o,E,b),e(E,A),e(E,R),e(R,ye),e(E,B),e(E,q),e(q,we),e(E,k),w(o,U,b),x(X,o,b),w(o,Z,b),w(o,W,b),e(W,V),e(V,ae),x(De,ae,null),e(W,Kt),e(W,dt),e(dt,eo),w(o,jt,b),w(o,v,b),x($e,v,null),e(v,to),e(v,pt),e(pt,oo),e(v,no),e(v,xe),e(xe,ao),e(xe,ze),e(ze,so),e(xe,io),e(v,ro),e(v,ct),e(ct,lo),e(v,po),e(v,O),e(O,Qe),e(Qe,qe),e(qe,co),e(Qe,fo),e(O,mo),e(O,Oe),e(Oe,He),e(He,uo),e(Oe,ho),e(O,go),e(O,Ke),e(Ke,et),e(et,_o),e(Ke,bo),e(v,vo),e(v,Q),x(Ie,Q,null),e(Q,yo),e(Q,ft),e(ft,wo),e(Q,Do),x(se,Q,null),e(v,$o),e(v,N),x(Te,N,null),e(N,xo),e(N,mt),e(mt,Io),e(N,To),x(ie,N,null),e(N,Mo),x(re,N,null),e(v,So),e(v,le),x(Me,le,null),e(le,Po),e(le,Se),e(Se,Jo),e(Se,ut),e(ut,ko),e(Se,Eo),e(v,Uo),e(v,G),x(Pe,G,null),e(G,Zo),e(G,Je),e(Je,jo),e(Je,ke),e(ke,Wo),e(Je,No),e(G,Go),x(de,G,null),e(G,Lo),x(pe,G,null),e(v,Fo),e(v,ce),x(Ee,ce,null),e(ce,Co),e(ce,Ue),e(Ue,Ao),e(Ue,Ze),e(Ze,Ro),e(Ue,Bo),e(v,Xo),e(v,P),x(je,P,null),e(P,Vo),e(P,We),e(We,Yo),e(We,tt),e(tt,zo),e(We,Qo),e(P,qo),e(P,ht),e(ht,Oo),e(P,Ho),x(fe,P,null),e(P,Ko),e(P,Ne),e(Ne,en),e(Ne,Ge),e(Ge,tn),e(Ne,on),e(P,nn),x(me,P,null),e(v,an),e(v,J),x(Le,J,null),e(J,sn),e(J,Y),e(Y,rn),e(Y,gt),e(gt,ln),e(Y,dn),e(Y,_t),e(_t,pn),e(Y,cn),e(Y,bt),e(bt,fn),e(Y,mn),e(J,un),e(J,Fe),e(Fe,hn),e(Fe,vt),e(vt,gn),e(Fe,_n),e(J,bn),e(J,Ce),e(Ce,vn),e(Ce,ot),e(ot,yn),e(Ce,wn),e(J,Dn),e(J,H),e(H,$n),e(H,nt),e(nt,xn),e(H,In),e(H,yt),e(yt,Tn),e(H,Mn),e(J,Sn),e(J,K),e(K,Pn),e(K,at),e(at,Jn),e(K,kn),e(K,wt),e(wt,En),e(K,Un),e(v,Zn),e(v,ue),x(Ae,ue,null),e(ue,jn),e(ue,Dt),e(Dt,Wn),e(v,Nn),e(v,he),x(Re,he,null),e(he,Gn),e(he,$t),e($t,Ln),w(o,Wt,b),w(o,ee,b),e(ee,ge),e(ge,xt),x(Be,xt,null),e(ee,Fn),e(ee,It),e(It,Cn),w(o,Nt,b),w(o,te,b),x(Xe,te,null),e(te,An),e(te,Tt),e(Tt,Rn),Gt=!0},p(o,[b]){const Ve={};b&2&&(Ve.$$scope={dirty:b,ctx:o}),X.$set(Ve);const Mt={};b&2&&(Mt.$$scope={dirty:b,ctx:o}),se.$set(Mt);const St={};b&2&&(St.$$scope={dirty:b,ctx:o}),ie.$set(St);const Pt={};b&2&&(Pt.$$scope={dirty:b,ctx:o}),re.$set(Pt);const oe={};b&2&&(oe.$$scope={dirty:b,ctx:o}),de.$set(oe);const Jt={};b&2&&(Jt.$$scope={dirty:b,ctx:o}),pe.$set(Jt);const kt={};b&2&&(kt.$$scope={dirty:b,ctx:o}),fe.$set(kt);const Ye={};b&2&&(Ye.$$scope={dirty:b,ctx:o}),me.$set(Ye)},i(o){Gt||(I(n.$$.fragment,o),I(X.$$.fragment,o),I(De.$$.fragment,o),I($e.$$.fragment,o),I(Ie.$$.fragment,o),I(se.$$.fragment,o),I(Te.$$.fragment,o),I(ie.$$.fragment,o),I(re.$$.fragment,o),I(Me.$$.fragment,o),I(Pe.$$.fragment,o),I(de.$$.fragment,o),I(pe.$$.fragment,o),I(Ee.$$.fragment,o),I(je.$$.fragment,o),I(fe.$$.fragment,o),I(me.$$.fragment,o),I(Le.$$.fragment,o),I(Ae.$$.fragment,o),I(Re.$$.fragment,o),I(Be.$$.fragment,o),I(Xe.$$.fragment,o),Gt=!0)},o(o){T(n.$$.fragment,o),T(X.$$.fragment,o),T(De.$$.fragment,o),T($e.$$.fragment,o),T(Ie.$$.fragment,o),T(se.$$.fragment,o),T(Te.$$.fragment,o),T(ie.$$.fragment,o),T(re.$$.fragment,o),T(Me.$$.fragment,o),T(Pe.$$.fragment,o),T(de.$$.fragment,o),T(pe.$$.fragment,o),T(Ee.$$.fragment,o),T(je.$$.fragment,o),T(fe.$$.fragment,o),T(me.$$.fragment,o),T(Le.$$.fragment,o),T(Ae.$$.fragment,o),T(Re.$$.fragment,o),T(Be.$$.fragment,o),T(Xe.$$.fragment,o),Gt=!1},d(o){t(d),o&&t(_),o&&t(u),M(n),o&&t(ne),o&&t(E),o&&t(U),M(X,o),o&&t(Z),o&&t(W),M(De),o&&t(jt),o&&t(v),M($e),M(Ie),M(se),M(Te),M(ie),M(re),M(Me),M(Pe),M(de),M(pe),M(Ee),M(je),M(fe),M(me),M(Le),M(Ae),M(Re),o&&t(Wt),o&&t(ee),M(Be),o&&t(Nt),o&&t(te),M(Xe)}}}const Ca={local:"depthtoimage",sections:[{local:"diffusers.StableDiffusionDepth2ImgPipeline",title:"StableDiffusionDepth2ImgPipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"}],title:"Depth-to-image"};function Aa(S){return ka(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qa extends Ma{constructor(d){super();Sa(this,d,Aa,Fa,Pa,{})}}export{Qa as default,Ca as metadata};
