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 Ea,L as kt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Yn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as Q}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Zt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qn}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ut}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ua(S){let d,_,u,p,g,n,c,j,C,ne,U,A,R,ve,B,z,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"),U=i(", "),A=a("a"),R=i("Runway"),ve=i(", and "),B=a("a"),z=i("Stability AI"),we=i(" Hub organizations!"),this.h()},l(E){d=s(E,"P",{});var k=l(d);_=r(k,"Make sure to check out the Stable Diffusion "),u=s(k,"A",{href:!0});var X=l(u);p=r(X,"Tips"),X.forEach(t),g=r(k," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),k.forEach(t),n=m(E),c=s(E,"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),U=r(Z,", "),A=s(Z,"A",{href:!0,rel:!0});var V=l(A);R=r(V,"Runway"),V.forEach(t),ve=r(Z,", and "),B=s(Z,"A",{href:!0,rel:!0});var ae=l(B);z=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(E,k){w(E,d,k),e(d,_),e(d,u),e(u,p),e(d,g),w(E,n,k),w(E,c,k),e(c,j),e(c,C),e(C,ne),e(c,U),e(c,A),e(A,R),e(c,ve),e(c,B),e(B,z),e(c,we)},d(E){E&&t(d),E&&t(n),E&&t(c)}}}function ka(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:kt,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:kt,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 Ga(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:kt,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 Na(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:kt,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:kt,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,U,A,R,ve,B,z,we,E,k,X,Z,W,V,ae,De,Kt,dt,eo,jt,y,$e,to,pt,oo,no,xe,ao,Qe,so,io,ro,ct,lo,po,H,qe,ze,co,fo,mo,He,Oe,uo,ho,go,Ke,et,_o,bo,yo,q,Ie,vo,ft,wo,Do,se,$o,G,Te,xo,mt,Io,To,ie,Mo,re,So,le,Me,Po,Se,Jo,ut,Eo,Uo,ko,N,Pe,Zo,Je,jo,Ee,Wo,Go,No,de,Lo,pe,Fo,ce,Ue,Co,ke,Ao,Ze,Ro,Bo,Xo,P,je,Vo,We,Yo,tt,Qo,qo,zo,ht,Ho,Oo,fe,Ko,Ge,en,Ne,tn,on,nn,me,an,J,Le,sn,Y,rn,gt,ln,dn,_t,pn,cn,bt,fn,mn,un,Fe,hn,yt,gn,_n,bn,Ce,yn,ot,vn,wn,Dn,O,$n,nt,xn,In,vt,Tn,Mn,Sn,K,Pn,at,Jn,En,wt,Un,kn,Zn,ue,Ae,jn,Dt,Wn,Gn,he,Re,Nn,$t,Ln,Wt,ee,ge,xt,Be,Fn,It,Cn,Gt,te,Xe,An,Tt,Rn,Nt;return n=new Qn({}),X=new Yn({props:{$$slots:{default:[Ua]},$$scope:{ctx:S}}}),De=new Qn({}),$e=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/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIPTextModel</a>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L65"}}),Ie=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[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[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/main/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/main/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/main/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/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),se=new Ut({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.example",$$slots:{default:[ka]},$$scope:{ctx:S}}}),Te=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/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),ie=new Yn({props:{warning:!0,$$slots:{default:[Za]},$$scope:{ctx:S}}}),re=new Ut({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_attention_slicing.example",$$slots:{default:[ja]},$$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/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),Pe=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/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),de=new Yn({props:{warning:!0,$$slots:{default:[Wa]},$$scope:{ctx:S}}}),pe=new Ut({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ga]},$$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/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),je=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[typing.List[str], 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/main/src/diffusers/loaders.py#L656"}}),fe=new Ut({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example",$$slots:{default:[Na]},$$scope:{ctx:S}}}),me=new Ut({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[La]},$$scope:{ctx:S}}}),Le=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/main/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/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py#L928"}}),Ae=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/main/src/diffusers/loaders.py#L1534"}}),Re=new Q({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/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L168"}}),Be=new Qn({}),Xe=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/main/src/diffusers/pipelines/stable_diffusion/__init__.py#L22"}}),{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(),U=a("p"),A=i("The Stable Diffusion model can also infer depth based on an image using "),R=a("a"),ve=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 "),z=a("code"),we=i("depth_map"),E=i(" to preserve the image structure."),k=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(),y=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 "),Qe=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(),H=a("ul"),qe=a("li"),ze=a("a"),co=i("load_textual_inversion()"),fo=i(" for loading textual inversion embeddings"),mo=f(),He=a("li"),Oe=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"),yo=f(),q=a("div"),D(Ie.$$.fragment),vo=f(),ft=a("p"),wo=i("The call function to the pipeline for generation."),Do=f(),D(se.$$.fragment),$o=f(),G=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"),Eo=i("enable_attention_slicing"),Uo=i(` was previously called, attention is
computed in one step.`),ko=f(),N=a("div"),D(Pe.$$.fragment),Zo=f(),Je=a("p"),jo=i("Enable memory efficient attention from "),Ee=a("a"),Wo=i("xFormers"),Go=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.`),No=f(),D(de.$$.fragment),Lo=f(),D(pe.$$.fragment),Fo=f(),ce=a("div"),D(Ue.$$.fragment),Co=f(),ke=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"),Qo=i("StableDiffusionPipeline"),qo=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),zo=f(),ht=a("p"),Ho=i("Example:"),Oo=f(),D(fe.$$.fragment),Ko=f(),Ge=a("p"),en=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ne=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 "),yt=a("code"),gn=i("self.lora_state_dict"),_n=i("."),bn=f(),Ce=a("p"),yn=i("See "),ot=a("a"),vn=i("lora_state_dict()"),wn=i(" for more details on how the state dict is loaded."),Dn=f(),O=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
`),vt=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()"),En=i(` for more details on how the state dict is loaded
into `),wt=a("code"),Un=i("self.text_encoder"),kn=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."),Gn=f(),he=a("div"),D(Re.$$.fragment),Nn=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"),Gt=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),U=s(o,"P",{});var oe=l(U);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);ve=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 "),z=s(oe,"CODE",{});var Et=l(z);we=r(Et,"depth_map"),Et.forEach(t),E=r(oe," to preserve the image structure."),oe.forEach(t),k=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 zn=l(ae);$(De.$$.fragment,zn),zn.forEach(t),qn.forEach(t),Kt=m(Ye),dt=s(Ye,"SPAN",{});var Hn=l(dt);eo=r(Hn,"StableDiffusionDepth2ImgPipeline"),Hn.forEach(t),Ye.forEach(t),jt=m(o),y=s(o,"DIV",{class:!0});var v=l(y);$($e.$$.fragment,v),to=m(v),pt=s(v,"P",{});var On=l(pt);oo=r(On,"Pipeline for text-guided depth-based image-to-image generation using Stable Diffusion."),On.forEach(t),no=m(v),xe=s(v,"P",{});var Lt=l(xe);ao=r(Lt,"This model inherits from "),Qe=s(Lt,"A",{href:!0});var Kn=l(Qe);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(v),ct=s(v,"P",{});var ea=l(ct);lo=r(ea,"The pipeline also inherits the following loading methods:"),ea.forEach(t),po=m(v),H=s(v,"UL",{});var st=l(H);qe=s(st,"LI",{});var Bn=l(qe);ze=s(Bn,"A",{href:!0});var ta=l(ze);co=r(ta,"load_textual_inversion()"),ta.forEach(t),fo=r(Bn," for loading textual inversion embeddings"),Bn.forEach(t),mo=m(st),He=s(st,"LI",{});var Xn=l(He);Oe=s(Xn,"A",{href:!0});var oa=l(Oe);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),yo=m(v),q=s(v,"DIV",{class:!0});var it=l(q);$(Ie.$$.fragment,it),vo=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(v),G=s(v,"DIV",{class:!0});var _e=l(G);$(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(v),le=s(v,"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);Eo=r(ia,"enable_attention_slicing"),ia.forEach(t),Uo=r(Ct,` was previously called, attention is
computed in one step.`),Ct.forEach(t),Ft.forEach(t),ko=m(v),N=s(v,"DIV",{class:!0});var be=l(N);$(Pe.$$.fragment,be),Zo=m(be),Je=s(be,"P",{});var At=l(Je);jo=r(At,"Enable memory efficient attention from "),Ee=s(At,"A",{href:!0,rel:!0});var ra=l(Ee);Wo=r(ra,"xFormers"),ra.forEach(t),Go=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),No=m(be),$(de.$$.fragment,be),Lo=m(be),$(pe.$$.fragment,be),be.forEach(t),Fo=m(v),ce=s(v,"DIV",{class:!0});var Rt=l(ce);$(Ue.$$.fragment,Rt),Co=m(Rt),ke=s(Rt,"P",{});var Bt=l(ke);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(v),P=s(v,"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);Qo=r(da,"StableDiffusionPipeline"),da.forEach(t),qo=r(Xt,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Xt.forEach(t),zo=m(L),ht=s(L,"P",{});var pa=l(ht);Ho=r(pa,"Example:"),pa.forEach(t),Oo=m(L),$(fe.$$.fragment,L),Ko=m(L),Ge=s(L,"P",{});var Vt=l(Ge);en=r(Vt,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ne=s(Vt,"A",{href:!0,rel:!0});var ca=l(Ne);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(v),J=s(v,"DIV",{class:!0});var F=l(J);$(Le.$$.fragment,F),sn=m(F),Y=s(F,"P",{});var ye=l(Y);rn=r(ye,"Load LoRA weights specified in "),gt=s(ye,"CODE",{});var fa=l(gt);ln=r(fa,"pretrained_model_name_or_path_or_dict"),fa.forEach(t),dn=r(ye," into "),_t=s(ye,"CODE",{});var ma=l(_t);pn=r(ma,"self.unet"),ma.forEach(t),cn=r(ye,` and
`),bt=s(ye,"CODE",{});var ua=l(bt);fn=r(ua,"self.text_encoder"),ua.forEach(t),mn=r(ye,"."),ye.forEach(t),un=m(F),Fe=s(F,"P",{});var Yt=l(Fe);hn=r(Yt,"All kwargs are forwarded to "),yt=s(Yt,"CODE",{});var ha=l(yt);gn=r(ha,"self.lora_state_dict"),ha.forEach(t),_n=r(Yt,"."),Yt.forEach(t),bn=m(F),Ce=s(F,"P",{});var Qt=l(Ce);yn=r(Qt,"See "),ot=s(Qt,"A",{href:!0});var ga=l(ot);vn=r(ga,"lora_state_dict()"),ga.forEach(t),wn=r(Qt," for more details on how the state dict is loaded."),Qt.forEach(t),Dn=m(F),O=s(F,"P",{});var rt=l(O);$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
`),vt=s(rt,"CODE",{});var ba=l(vt);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 ya=l(at);Jn=r(ya,"load_lora_into_text_encoder()"),ya.forEach(t),En=r(lt,` for more details on how the state dict is loaded
into `),wt=s(lt,"CODE",{});var va=l(wt);Un=r(va,"self.text_encoder"),va.forEach(t),kn=r(lt,"."),lt.forEach(t),F.forEach(t),Zn=m(v),ue=s(v,"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),Gn=m(v),he=s(v,"DIV",{class:!0});var zt=l(he);$(Re.$$.fragment,zt),Nn=m(zt),$t=s(zt,"P",{});var Da=l($t);Ln=r(Da,"Encodes the prompt into text encoder hidden states."),Da.forEach(t),zt.forEach(t),v.forEach(t),Wt=m(o),ee=s(o,"H2",{class:!0});var Ht=l(ee);ge=s(Ht,"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(Ht),It=s(Ht,"SPAN",{});var Ia=l(It);Cn=r(Ia,"StableDiffusionPipelineOutput"),Ia.forEach(t),Ht.forEach(t),Gt=m(o),te=s(o,"DIV",{class:!0});var Ot=l(te);$(Xe.$$.fragment,Ot),An=m(Ot),Tt=s(Ot,"P",{});var Ta=l(Tt);Rn=r(Ta,"Output class for Stable Diffusion pipelines."),Ta.forEach(t),Ot.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(Qe,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(ze,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),h(Oe,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),h(et,"href","/docs/diffusers/main/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(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(Ee,"href","https://facebookresearch.github.io/xformers/"),h(Ee,"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(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/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),h(Ne,"href","https://civitai.com/models/3036?modelVersionId=9857"),h(Ne,"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/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),h(nt,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),h(at,"href","/docs/diffusers/main/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(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(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,U,b),e(U,A),e(U,R),e(R,ve),e(U,B),e(U,z),e(z,we),e(U,E),w(o,k,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,y,b),x($e,y,null),e(y,to),e(y,pt),e(pt,oo),e(y,no),e(y,xe),e(xe,ao),e(xe,Qe),e(Qe,so),e(xe,io),e(y,ro),e(y,ct),e(ct,lo),e(y,po),e(y,H),e(H,qe),e(qe,ze),e(ze,co),e(qe,fo),e(H,mo),e(H,He),e(He,Oe),e(Oe,uo),e(He,ho),e(H,go),e(H,Ke),e(Ke,et),e(et,_o),e(Ke,bo),e(y,yo),e(y,q),x(Ie,q,null),e(q,vo),e(q,ft),e(ft,wo),e(q,Do),x(se,q,null),e(y,$o),e(y,G),x(Te,G,null),e(G,xo),e(G,mt),e(mt,Io),e(G,To),x(ie,G,null),e(G,Mo),x(re,G,null),e(y,So),e(y,le),x(Me,le,null),e(le,Po),e(le,Se),e(Se,Jo),e(Se,ut),e(ut,Eo),e(Se,Uo),e(y,ko),e(y,N),x(Pe,N,null),e(N,Zo),e(N,Je),e(Je,jo),e(Je,Ee),e(Ee,Wo),e(Je,Go),e(N,No),x(de,N,null),e(N,Lo),x(pe,N,null),e(y,Fo),e(y,ce),x(Ue,ce,null),e(ce,Co),e(ce,ke),e(ke,Ao),e(ke,Ze),e(Ze,Ro),e(ke,Bo),e(y,Xo),e(y,P),x(je,P,null),e(P,Vo),e(P,We),e(We,Yo),e(We,tt),e(tt,Qo),e(We,qo),e(P,zo),e(P,ht),e(ht,Ho),e(P,Oo),x(fe,P,null),e(P,Ko),e(P,Ge),e(Ge,en),e(Ge,Ne),e(Ne,tn),e(Ge,on),e(P,nn),x(me,P,null),e(y,an),e(y,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,yt),e(yt,gn),e(Fe,_n),e(J,bn),e(J,Ce),e(Ce,yn),e(Ce,ot),e(ot,vn),e(Ce,wn),e(J,Dn),e(J,O),e(O,$n),e(O,nt),e(nt,xn),e(O,In),e(O,vt),e(vt,Tn),e(O,Mn),e(J,Sn),e(J,K),e(K,Pn),e(K,at),e(at,Jn),e(K,En),e(K,wt),e(wt,Un),e(K,kn),e(y,Zn),e(y,ue),x(Ae,ue,null),e(ue,jn),e(ue,Dt),e(Dt,Wn),e(y,Gn),e(y,he),x(Re,he,null),e(he,Nn),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,Gt,b),w(o,te,b),x(Xe,te,null),e(te,An),e(te,Tt),e(Tt,Rn),Nt=!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 Et={};b&2&&(Et.$$scope={dirty:b,ctx:o}),fe.$set(Et);const Ye={};b&2&&(Ye.$$scope={dirty:b,ctx:o}),me.$set(Ye)},i(o){Nt||(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(Ue.$$.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),Nt=!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(Ue.$$.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),Nt=!1},d(o){t(d),o&&t(_),o&&t(u),M(n),o&&t(ne),o&&t(U),o&&t(k),M(X,o),o&&t(Z),o&&t(W),M(De),o&&t(jt),o&&t(y),M($e),M(Ie),M(se),M(Te),M(ie),M(re),M(Me),M(Pe),M(de),M(pe),M(Ue),M(je),M(fe),M(me),M(Le),M(Ae),M(Re),o&&t(Wt),o&&t(ee),M(Be),o&&t(Gt),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 Ea(()=>{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};
