import{S as Na,i as Ga,s as Aa,e as n,k as p,w as x,t as s,M as Fa,c as a,d as t,m as f,a as i,x as M,h as r,b as g,G as e,g as $,y as T,q as P,o as S,B as E,v as Ra,L as Ot}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as zt}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as R}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Kt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as La}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ht}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ba(J){let l,y,c,m,w;return m=new Kt({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(){l=n("p"),y=s("Examples:"),c=p(),x(m.$$.fragment)},l(d){l=a(d,"P",{});var h=i(l);y=r(h,"Examples:"),h.forEach(t),c=f(d),M(m.$$.fragment,d)},m(d,h){$(d,l,h),e(l,y),$(d,c,h),T(m,d,h),w=!0},p:Ot,i(d){w||(P(m.$$.fragment,d),w=!0)},o(d){S(m.$$.fragment,d),w=!1},d(d){d&&t(l),d&&t(c),E(m,d)}}}function Xa(J){let l,y,c,m,w;return m=new Kt({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(){l=n("p"),y=s("Examples:"),c=p(),x(m.$$.fragment)},l(d){l=a(d,"P",{});var h=i(l);y=r(h,"Examples:"),h.forEach(t),c=f(d),M(m.$$.fragment,d)},m(d,h){$(d,l,h),e(l,y),$(d,c,h),T(m,d,h),w=!0},p:Ot,i(d){w||(P(m.$$.fragment,d),w=!0)},o(d){S(m.$$.fragment,d),w=!1},d(d){d&&t(l),d&&t(c),E(m,d)}}}function qa(J){let l,y;return{c(){l=n("p"),y=s("This function is experimental and might change in the future.")},l(c){l=a(c,"P",{});var m=i(l);y=r(m,"This function is experimental and might change in the future."),m.forEach(t)},m(c,m){$(c,l,m),e(l,y)},d(c){c&&t(l)}}}function Va(J){let l,y,c,m,w,d,h,I;return{c(){l=n("p"),y=s("It is required to be logged in ("),c=n("code"),m=s("huggingface-cli login"),w=s(") when you want to use private or "),d=n("a"),h=s(`gated
models`),I=s("."),this.h()},l(u){l=a(u,"P",{});var _=i(l);y=r(_,"It is required to be logged in ("),c=a(_,"CODE",{});var U=i(c);m=r(U,"huggingface-cli login"),U.forEach(t),w=r(_,") when you want to use private or "),d=a(_,"A",{href:!0,rel:!0});var W=i(d);h=r(W,`gated
models`),W.forEach(t),I=r(_,"."),_.forEach(t),this.h()},h(){g(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),g(d,"rel","nofollow")},m(u,_){$(u,l,_),e(l,y),e(l,c),e(c,m),e(l,w),e(l,d),e(d,h),e(l,I)},d(u){u&&t(l)}}}function Ya(J){let l,y,c,m,w,d,h,I;return h=new Kt({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(){l=n("p"),y=s("To load a textual inversion embedding vector in "),c=n("code"),m=s("diffusers"),w=s(" format:"),d=p(),x(h.$$.fragment)},l(u){l=a(u,"P",{});var _=i(l);y=r(_,"To load a textual inversion embedding vector in "),c=a(_,"CODE",{});var U=i(c);m=r(U,"diffusers"),U.forEach(t),w=r(_," format:"),_.forEach(t),d=f(u),M(h.$$.fragment,u)},m(u,_){$(u,l,_),e(l,y),e(l,c),e(c,m),e(l,w),$(u,d,_),T(h,u,_),I=!0},p:Ot,i(u){I||(P(h.$$.fragment,u),I=!0)},o(u){S(h.$$.fragment,u),I=!1},d(u){u&&t(l),u&&t(d),E(h,u)}}}function Qa(J){let l,y,c,m,w,d,h,I;return h=new Kt({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(){l=n("p"),y=s("e.g. from "),c=n("a"),m=s("civitAI"),w=s(" and then load the vector locally:"),d=p(),x(h.$$.fragment),this.h()},l(u){l=a(u,"P",{});var _=i(l);y=r(_,"e.g. from "),c=a(_,"A",{href:!0,rel:!0});var U=i(c);m=r(U,"civitAI"),U.forEach(t),w=r(_," and then load the vector locally:"),_.forEach(t),d=f(u),M(h.$$.fragment,u),this.h()},h(){g(c,"href","https://civitai.com/models/3036?modelVersionId=9857"),g(c,"rel","nofollow")},m(u,_){$(u,l,_),e(l,y),e(l,c),e(c,m),e(l,w),$(u,d,_),T(h,u,_),I=!0},p:Ot,i(u){I||(P(h.$$.fragment,u),I=!0)},o(u){S(h.$$.fragment,u),I=!1},d(u){u&&t(l),u&&t(d),E(h,u)}}}function za(J){let l,y,c,m,w;return{c(){l=n("p"),y=s("We support loading A1111 formatted LoRA checkpoints in a limited capacity."),c=p(),m=n("p"),w=s("This function is experimental and might change in the future.")},l(d){l=a(d,"P",{});var h=i(l);y=r(h,"We support loading A1111 formatted LoRA checkpoints in a limited capacity."),h.forEach(t),c=f(d),m=a(d,"P",{});var I=i(m);w=r(I,"This function is experimental and might change in the future."),I.forEach(t)},m(d,h){$(d,l,h),e(l,y),$(d,c,h),$(d,m,h),e(m,w)},d(d){d&&t(l),d&&t(c),d&&t(m)}}}function Ha(J){let l,y,c,m,w,d,h,I;return{c(){l=n("p"),y=s("It is required to be logged in ("),c=n("code"),m=s("huggingface-cli login"),w=s(") when you want to use private or "),d=n("a"),h=s(`gated
models`),I=s("."),this.h()},l(u){l=a(u,"P",{});var _=i(l);y=r(_,"It is required to be logged in ("),c=a(_,"CODE",{});var U=i(c);m=r(U,"huggingface-cli login"),U.forEach(t),w=r(_,") when you want to use private or "),d=a(_,"A",{href:!0,rel:!0});var W=i(d);h=r(W,`gated
models`),W.forEach(t),I=r(_,"."),_.forEach(t),this.h()},h(){g(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),g(d,"rel","nofollow")},m(u,_){$(u,l,_),e(l,y),e(l,c),e(c,m),e(l,w),e(l,d),e(d,h),e(l,I)},d(u){u&&t(l)}}}function Oa(J){let l,y,c,m,w,d,h,I,u,_,U,W,Qe,se,eo,ze,to,St,j,oo,re,no,ao,le,io,so,de,ro,lo,ce,co,po,Et,B,We,fo,mo,He,ho,uo,Ut,je,go,kt,Ce,pe,Oe,_o,bo,fe,vo,Jt,Le,yo,Zt,Ne,me,Ke,wo,Do,he,$o,Wt,v,ue,Io,et,xo,Mo,ge,To,Ge,Po,So,Eo,tt,Uo,ko,_e,be,ot,Jo,Zo,Ae,Wo,jo,ve,nt,Co,Lo,Fe,No,Go,at,Ao,Fo,it,ye,st,Ro,Bo,Re,Xo,qo,N,we,Vo,rt,Yo,Qo,V,zo,G,De,Ho,lt,Oo,Ko,dt,en,tn,Y,$e,on,Ie,nn,ct,an,sn,rn,C,xe,ln,pt,dn,cn,ft,pn,fn,mt,mn,hn,Q,un,z,Me,gn,ht,_n,bn,k,Te,vn,X,yn,ut,wn,Dn,gt,$n,In,xn,H,Mn,O,Tn,_t,Pn,Sn,K,En,bt,Un,kn,ee,Jn,L,Pe,Zn,q,Wn,Be,jn,Cn,Se,vt,Ln,Nn,Gn,te,An,oe,Fn,ne,Ee,Rn,yt,Bn,Xn,ae,Ue,qn,ke,Vn,wt,Yn,Qn,jt;return d=new La({}),se=new La({}),ue=new R({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.17.0/en/api/models#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. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.17.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.17.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.17.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.17.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.17.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L65"}}),we=new R({props:{name:"__call__",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image, numpy.ndarray, typing.List[torch.FloatTensor], typing.List[PIL.Image.Image], typing.List[numpy.ndarray]] = None"},{name:"depth_map",val:": typing.Optional[torch.FloatTensor] = None"},{name:"strength",val:": float = 0.8"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 7.5"},{name:"negative_prompt",val:": typing.Union[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 the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,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, that will be used as the starting point for the
process. 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 that will be used as additional conditioning for the image generation process. If not
defined, it will automatically predicts the depth via <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;
Conceptually, indicates how much to transform the reference <code>image</code>. Must be between 0 and 1. <code>image</code>
will be used as a starting point, adding more noise to it the larger 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 will
be maximum and the denoising process will run for the full number of iterations specified in
<code>num_inference_steps</code>. A value of 1, therefore, 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 will be 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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.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 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.__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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.17.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.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, <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.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.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.17.0/en/api/pipelines/stable_diffusion/overview#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 will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.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 will be called. If not specified, the callback will be
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 under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L531",returnDescription:`
<p><a
  href="/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),V=new Ht({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.example",$$slots:{default:[Ba]},$$scope:{ctx:J}}}),De=new R({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.17.0/src/diffusers/pipelines/pipeline_utils.py#L1492"}}),$e=new R({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/pipelines/pipeline_utils.py#L1508"}}),xe=new R({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.17.0/src/diffusers/pipelines/pipeline_utils.py#L1434"}}),Q=new Ht({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Xa]},$$scope:{ctx:J}}}),Me=new R({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/pipelines/pipeline_utils.py#L1466"}}),Te=new R({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code> or <code>List[str or os.PathLike]</code> or <code>Dict</code> or <code>List[Dict]</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like
<code>&quot;sd-concepts-library/low-poly-hd-logos-icons&quot;</code>.</li>
<li>A path to a <em>directory</em> containing textual inversion weights, e.g.
<code>./my_text_inversion_directory/</code>.</li>
<li>A path to a <em>file</em> containing textual inversion weights, e.g. <code>./my_text_inversions.pt</code>.</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>
<p>Or a list of those elements.`,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 in two cases:</p>
<ul>
<li>The saved textual inversion file is in <code>diffusers</code> 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 &#x201C;Automatic1111&#x201D; form.</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 in which a downloaded pretrained model configuration should be cached if the
standard cache should not be 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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,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, e.g., <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(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be 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;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/loaders.py#L482"}}),H=new zt({props:{warning:!0,$$slots:{default:[qa]},$$scope:{ctx:J}}}),O=new zt({props:{$$slots:{default:[Va]},$$scope:{ctx:J}}}),K=new Ht({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example",$$slots:{default:[Ya]},$$scope:{ctx:J}}}),ee=new Ht({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[Qa]},$$scope:{ctx:J}}}),Pe=new R({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;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</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_or_dict"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.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_lora_weights.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.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, e.g., <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_lora_weights.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/loaders.py#L781"}}),te=new zt({props:{warning:!0,$$slots:{default:[za]},$$scope:{ctx:J}}}),oe=new zt({props:{$$slots:{default:[Ha]},$$scope:{ctx:J}}}),Ee=new R({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 = False"}],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 which to save. 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 UNet. Specifying this helps to make the
serialization process easier and cleaner. Values can be both LoRA torch.nn.Modules layers or torch
weights.`,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] or </code>Dict[str, torch.Tensor]<code>) -- State dict of the LoRA layers corresponding to the </code>text_encoder<code>. Since the </code>text_encoder<code>comes from</code>transformers`, we cannot rejig it. That is why we have to explicitly pass the text encoder LoRA state\ndict. Values can be both LoRA torch.nn.Modules layers or torch weights.",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 when in distributed training like
TPUs and 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 on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/loaders.py#L1201"}}),Ue=new R({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.17.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L140"}}),{c(){l=n("meta"),y=p(),c=n("h1"),m=n("a"),w=n("span"),x(d.$$.fragment),h=p(),I=n("span"),u=s("Depth-to-Image Generation"),_=p(),U=n("h2"),W=n("a"),Qe=n("span"),x(se.$$.fragment),eo=p(),ze=n("span"),to=s("StableDiffusionDepth2ImgPipeline"),St=p(),j=n("p"),oo=s("The depth-guided stable diffusion model was created by the researchers and engineers from "),re=n("a"),no=s("CompVis"),ao=s(", "),le=n("a"),io=s("Stability AI"),so=s(", and "),de=n("a"),ro=s("LAION"),lo=s(", as part of Stable Diffusion 2.0. It uses "),ce=n("a"),co=s("MiDas"),po=s(" to infer depth based on an image."),Et=p(),B=n("p"),We=n("a"),fo=s("StableDiffusionDepth2ImgPipeline"),mo=s(" lets you pass a text prompt and an initial image to condition the generation of new images as well as a "),He=n("code"),ho=s("depth_map"),uo=s(" to preserve the images\u2019 structure."),Ut=p(),je=n("p"),go=s("The original codebase can be found here:"),kt=p(),Ce=n("ul"),pe=n("li"),Oe=n("em"),_o=s("Stable Diffusion v2"),bo=s(": "),fe=n("a"),vo=s("Stability-AI/stablediffusion"),Jt=p(),Le=n("p"),yo=s("Available Checkpoints are:"),Zt=p(),Ne=n("ul"),me=n("li"),Ke=n("em"),wo=s("stable-diffusion-2-depth"),Do=s(": "),he=n("a"),$o=s("stabilityai/stable-diffusion-2-depth"),Wt=p(),v=n("div"),x(ue.$$.fragment),Io=p(),et=n("p"),xo=s("Pipeline for text-guided image to image generation using Stable Diffusion."),Mo=p(),ge=n("p"),To=s("This model inherits from "),Ge=n("a"),Po=s("DiffusionPipeline"),So=s(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Eo=p(),tt=n("p"),Uo=s("In addition the pipeline inherits the following loading methods:"),ko=p(),_e=n("ul"),be=n("li"),ot=n("em"),Jo=s("Textual-Inversion"),Zo=s(": "),Ae=n("a"),Wo=s("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),jo=p(),ve=n("li"),nt=n("em"),Co=s("LoRA"),Lo=s(": "),Fe=n("a"),No=s("loaders.LoraLoaderMixin.load_lora_weights()"),Go=p(),at=n("p"),Ao=s("as well as the following saving methods:"),Fo=p(),it=n("ul"),ye=n("li"),st=n("em"),Ro=s("LoRA"),Bo=s(": "),Re=n("a"),Xo=s("loaders.LoraLoaderMixin.save_lora_weights()"),qo=p(),N=n("div"),x(we.$$.fragment),Vo=p(),rt=n("p"),Yo=s("Function invoked when calling the pipeline for generation."),Qo=p(),x(V.$$.fragment),zo=p(),G=n("div"),x(De.$$.fragment),Ho=p(),lt=n("p"),Oo=s("Enable sliced attention computation."),Ko=p(),dt=n("p"),en=s(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),tn=p(),Y=n("div"),x($e.$$.fragment),on=p(),Ie=n("p"),nn=s("Disable sliced attention computation. If "),ct=n("code"),an=s("enable_attention_slicing"),sn=s(` was previously invoked, this method will go
back to computing attention in one step.`),rn=p(),C=n("div"),x(xe.$$.fragment),ln=p(),pt=n("p"),dn=s("Enable memory efficient attention as implemented in xformers."),cn=p(),ft=n("p"),pn=s(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),fn=p(),mt=n("p"),mn=s(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),hn=p(),x(Q.$$.fragment),un=p(),z=n("div"),x(Me.$$.fragment),gn=p(),ht=n("p"),_n=s("Disable memory efficient attention as implemented in xformers."),bn=p(),k=n("div"),x(Te.$$.fragment),vn=p(),X=n("p"),yn=s("Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),ut=n("code"),wn=s("diffusers"),Dn=s(` and
`),gt=n("code"),$n=s("Automatic1111"),In=s(" formats are supported (see example below)."),xn=p(),x(H.$$.fragment),Mn=p(),x(O.$$.fragment),Tn=p(),_t=n("p"),Pn=s("Example:"),Sn=p(),x(K.$$.fragment),En=p(),bt=n("p"),Un=s("To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),kn=p(),x(ee.$$.fragment),Jn=p(),L=n("div"),x(Pe.$$.fragment),Zn=p(),q=n("p"),Wn=s("Load pretrained attention processor layers (such as LoRA) into "),Be=n("a"),jn=s("UNet2DConditionModel"),Cn=s(` and
`),Se=n("a"),vt=n("code"),Ln=s("CLIPTextModel"),Nn=s(")."),Gn=p(),x(te.$$.fragment),An=p(),x(oe.$$.fragment),Fn=p(),ne=n("div"),x(Ee.$$.fragment),Rn=p(),yt=n("p"),Bn=s("Save the LoRA parameters corresponding to the UNet and the text encoder."),Xn=p(),ae=n("div"),x(Ue.$$.fragment),qn=p(),ke=n("p"),Vn=s(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),wt=n("code"),Yn=s("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Qn=s("forward` method called."),this.h()},l(o){const b=Fa('[data-svelte="svelte-1phssyn"]',document.head);l=a(b,"META",{name:!0,content:!0}),b.forEach(t),y=f(o),c=a(o,"H1",{class:!0});var Je=i(c);m=a(Je,"A",{id:!0,class:!0,href:!0});var Dt=i(m);w=a(Dt,"SPAN",{});var $t=i(w);M(d.$$.fragment,$t),$t.forEach(t),Dt.forEach(t),h=f(Je),I=a(Je,"SPAN",{});var It=i(I);u=r(It,"Depth-to-Image Generation"),It.forEach(t),Je.forEach(t),_=f(o),U=a(o,"H2",{class:!0});var Ze=i(U);W=a(Ze,"A",{id:!0,class:!0,href:!0});var xt=i(W);Qe=a(xt,"SPAN",{});var Mt=i(Qe);M(se.$$.fragment,Mt),Mt.forEach(t),xt.forEach(t),eo=f(Ze),ze=a(Ze,"SPAN",{});var Tt=i(ze);to=r(Tt,"StableDiffusionDepth2ImgPipeline"),Tt.forEach(t),Ze.forEach(t),St=f(o),j=a(o,"P",{});var A=i(j);oo=r(A,"The depth-guided stable diffusion model was created by the researchers and engineers from "),re=a(A,"A",{href:!0,rel:!0});var zn=i(re);no=r(zn,"CompVis"),zn.forEach(t),ao=r(A,", "),le=a(A,"A",{href:!0,rel:!0});var Hn=i(le);io=r(Hn,"Stability AI"),Hn.forEach(t),so=r(A,", and "),de=a(A,"A",{href:!0,rel:!0});var On=i(de);ro=r(On,"LAION"),On.forEach(t),lo=r(A,", as part of Stable Diffusion 2.0. It uses "),ce=a(A,"A",{href:!0,rel:!0});var Kn=i(ce);co=r(Kn,"MiDas"),Kn.forEach(t),po=r(A," to infer depth based on an image."),A.forEach(t),Et=f(o),B=a(o,"P",{});var Pt=i(B);We=a(Pt,"A",{href:!0});var ea=i(We);fo=r(ea,"StableDiffusionDepth2ImgPipeline"),ea.forEach(t),mo=r(Pt," lets you pass a text prompt and an initial image to condition the generation of new images as well as a "),He=a(Pt,"CODE",{});var ta=i(He);ho=r(ta,"depth_map"),ta.forEach(t),uo=r(Pt," to preserve the images\u2019 structure."),Pt.forEach(t),Ut=f(o),je=a(o,"P",{});var oa=i(je);go=r(oa,"The original codebase can be found here:"),oa.forEach(t),kt=f(o),Ce=a(o,"UL",{});var na=i(Ce);pe=a(na,"LI",{});var Ct=i(pe);Oe=a(Ct,"EM",{});var aa=i(Oe);_o=r(aa,"Stable Diffusion v2"),aa.forEach(t),bo=r(Ct,": "),fe=a(Ct,"A",{href:!0,rel:!0});var ia=i(fe);vo=r(ia,"Stability-AI/stablediffusion"),ia.forEach(t),Ct.forEach(t),na.forEach(t),Jt=f(o),Le=a(o,"P",{});var sa=i(Le);yo=r(sa,"Available Checkpoints are:"),sa.forEach(t),Zt=f(o),Ne=a(o,"UL",{});var ra=i(Ne);me=a(ra,"LI",{});var Lt=i(me);Ke=a(Lt,"EM",{});var la=i(Ke);wo=r(la,"stable-diffusion-2-depth"),la.forEach(t),Do=r(Lt,": "),he=a(Lt,"A",{href:!0,rel:!0});var da=i(he);$o=r(da,"stabilityai/stable-diffusion-2-depth"),da.forEach(t),Lt.forEach(t),ra.forEach(t),Wt=f(o),v=a(o,"DIV",{class:!0});var D=i(v);M(ue.$$.fragment,D),Io=f(D),et=a(D,"P",{});var ca=i(et);xo=r(ca,"Pipeline for text-guided image to image generation using Stable Diffusion."),ca.forEach(t),Mo=f(D),ge=a(D,"P",{});var Nt=i(ge);To=r(Nt,"This model inherits from "),Ge=a(Nt,"A",{href:!0});var pa=i(Ge);Po=r(pa,"DiffusionPipeline"),pa.forEach(t),So=r(Nt,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Nt.forEach(t),Eo=f(D),tt=a(D,"P",{});var fa=i(tt);Uo=r(fa,"In addition the pipeline inherits the following loading methods:"),fa.forEach(t),ko=f(D),_e=a(D,"UL",{});var Gt=i(_e);be=a(Gt,"LI",{});var At=i(be);ot=a(At,"EM",{});var ma=i(ot);Jo=r(ma,"Textual-Inversion"),ma.forEach(t),Zo=r(At,": "),Ae=a(At,"A",{href:!0});var ha=i(Ae);Wo=r(ha,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),ha.forEach(t),At.forEach(t),jo=f(Gt),ve=a(Gt,"LI",{});var Ft=i(ve);nt=a(Ft,"EM",{});var ua=i(nt);Co=r(ua,"LoRA"),ua.forEach(t),Lo=r(Ft,": "),Fe=a(Ft,"A",{href:!0});var ga=i(Fe);No=r(ga,"loaders.LoraLoaderMixin.load_lora_weights()"),ga.forEach(t),Ft.forEach(t),Gt.forEach(t),Go=f(D),at=a(D,"P",{});var _a=i(at);Ao=r(_a,"as well as the following saving methods:"),_a.forEach(t),Fo=f(D),it=a(D,"UL",{});var ba=i(it);ye=a(ba,"LI",{});var Rt=i(ye);st=a(Rt,"EM",{});var va=i(st);Ro=r(va,"LoRA"),va.forEach(t),Bo=r(Rt,": "),Re=a(Rt,"A",{href:!0});var ya=i(Re);Xo=r(ya,"loaders.LoraLoaderMixin.save_lora_weights()"),ya.forEach(t),Rt.forEach(t),ba.forEach(t),qo=f(D),N=a(D,"DIV",{class:!0});var Xe=i(N);M(we.$$.fragment,Xe),Vo=f(Xe),rt=a(Xe,"P",{});var wa=i(rt);Yo=r(wa,"Function invoked when calling the pipeline for generation."),wa.forEach(t),Qo=f(Xe),M(V.$$.fragment,Xe),Xe.forEach(t),zo=f(D),G=a(D,"DIV",{class:!0});var qe=i(G);M(De.$$.fragment,qe),Ho=f(qe),lt=a(qe,"P",{});var Da=i(lt);Oo=r(Da,"Enable sliced attention computation."),Da.forEach(t),Ko=f(qe),dt=a(qe,"P",{});var $a=i(dt);en=r($a,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),$a.forEach(t),qe.forEach(t),tn=f(D),Y=a(D,"DIV",{class:!0});var Bt=i(Y);M($e.$$.fragment,Bt),on=f(Bt),Ie=a(Bt,"P",{});var Xt=i(Ie);nn=r(Xt,"Disable sliced attention computation. If "),ct=a(Xt,"CODE",{});var Ia=i(ct);an=r(Ia,"enable_attention_slicing"),Ia.forEach(t),sn=r(Xt,` was previously invoked, this method will go
back to computing attention in one step.`),Xt.forEach(t),Bt.forEach(t),rn=f(D),C=a(D,"DIV",{class:!0});var F=i(C);M(xe.$$.fragment,F),ln=f(F),pt=a(F,"P",{});var xa=i(pt);dn=r(xa,"Enable memory efficient attention as implemented in xformers."),xa.forEach(t),cn=f(F),ft=a(F,"P",{});var Ma=i(ft);pn=r(Ma,`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Ma.forEach(t),fn=f(F),mt=a(F,"P",{});var Ta=i(mt);mn=r(Ta,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),Ta.forEach(t),hn=f(F),M(Q.$$.fragment,F),F.forEach(t),un=f(D),z=a(D,"DIV",{class:!0});var qt=i(z);M(Me.$$.fragment,qt),gn=f(qt),ht=a(qt,"P",{});var Pa=i(ht);_n=r(Pa,"Disable memory efficient attention as implemented in xformers."),Pa.forEach(t),qt.forEach(t),bn=f(D),k=a(D,"DIV",{class:!0});var Z=i(k);M(Te.$$.fragment,Z),vn=f(Z),X=a(Z,"P",{});var Ve=i(X);yn=r(Ve,"Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),ut=a(Ve,"CODE",{});var Sa=i(ut);wn=r(Sa,"diffusers"),Sa.forEach(t),Dn=r(Ve,` and
`),gt=a(Ve,"CODE",{});var Ea=i(gt);$n=r(Ea,"Automatic1111"),Ea.forEach(t),In=r(Ve," formats are supported (see example below)."),Ve.forEach(t),xn=f(Z),M(H.$$.fragment,Z),Mn=f(Z),M(O.$$.fragment,Z),Tn=f(Z),_t=a(Z,"P",{});var Ua=i(_t);Pn=r(Ua,"Example:"),Ua.forEach(t),Sn=f(Z),M(K.$$.fragment,Z),En=f(Z),bt=a(Z,"P",{});var ka=i(bt);Un=r(ka,"To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),ka.forEach(t),kn=f(Z),M(ee.$$.fragment,Z),Z.forEach(t),Jn=f(D),L=a(D,"DIV",{class:!0});var ie=i(L);M(Pe.$$.fragment,ie),Zn=f(ie),q=a(ie,"P",{});var Ye=i(q);Wn=r(Ye,"Load pretrained attention processor layers (such as LoRA) into "),Be=a(Ye,"A",{href:!0});var Ja=i(Be);jn=r(Ja,"UNet2DConditionModel"),Ja.forEach(t),Cn=r(Ye,` and
`),Se=a(Ye,"A",{href:!0,rel:!0});var Za=i(Se);vt=a(Za,"CODE",{});var Wa=i(vt);Ln=r(Wa,"CLIPTextModel"),Wa.forEach(t),Za.forEach(t),Nn=r(Ye,")."),Ye.forEach(t),Gn=f(ie),M(te.$$.fragment,ie),An=f(ie),M(oe.$$.fragment,ie),ie.forEach(t),Fn=f(D),ne=a(D,"DIV",{class:!0});var Vt=i(ne);M(Ee.$$.fragment,Vt),Rn=f(Vt),yt=a(Vt,"P",{});var ja=i(yt);Bn=r(ja,"Save the LoRA parameters corresponding to the UNet and the text encoder."),ja.forEach(t),Vt.forEach(t),Xn=f(D),ae=a(D,"DIV",{class:!0});var Yt=i(ae);M(Ue.$$.fragment,Yt),qn=f(Yt),ke=a(Yt,"P",{});var Qt=i(ke);Vn=r(Qt,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),wt=a(Qt,"CODE",{});var Ca=i(wt);Yn=r(Ca,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Ca.forEach(t),Qn=r(Qt,"forward` method called."),Qt.forEach(t),Yt.forEach(t),D.forEach(t),this.h()},h(){g(l,"name","hf:doc:metadata"),g(l,"content",JSON.stringify(Ka)),g(m,"id","depthtoimage-generation"),g(m,"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"),g(m,"href","#depthtoimage-generation"),g(c,"class","relative group"),g(W,"id","diffusers.StableDiffusionDepth2ImgPipeline"),g(W,"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"),g(W,"href","#diffusers.StableDiffusionDepth2ImgPipeline"),g(U,"class","relative group"),g(re,"href","https://github.com/CompVis"),g(re,"rel","nofollow"),g(le,"href","https://stability.ai/"),g(le,"rel","nofollow"),g(de,"href","https://laion.ai/"),g(de,"rel","nofollow"),g(ce,"href","https://github.com/isl-org/MiDaS"),g(ce,"rel","nofollow"),g(We,"href","/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline"),g(fe,"href","https://github.com/Stability-AI/stablediffusion#depth-conditional-stable-diffusion"),g(fe,"rel","nofollow"),g(he,"href","https://huggingface.co/stabilityai/stable-diffusion-2-depth"),g(he,"rel","nofollow"),g(Ge,"href","/docs/diffusers/v0.17.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),g(Ae,"href","/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.load_textual_inversion"),g(Fe,"href","/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.load_lora_weights"),g(Re,"href","/docs/diffusers/v0.17.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.save_lora_weights"),g(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Be,"href","/docs/diffusers/v0.17.0/en/api/models#diffusers.UNet2DConditionModel"),g(Se,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),g(Se,"rel","nofollow"),g(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(v,"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,l),$(o,y,b),$(o,c,b),e(c,m),e(m,w),T(d,w,null),e(c,h),e(c,I),e(I,u),$(o,_,b),$(o,U,b),e(U,W),e(W,Qe),T(se,Qe,null),e(U,eo),e(U,ze),e(ze,to),$(o,St,b),$(o,j,b),e(j,oo),e(j,re),e(re,no),e(j,ao),e(j,le),e(le,io),e(j,so),e(j,de),e(de,ro),e(j,lo),e(j,ce),e(ce,co),e(j,po),$(o,Et,b),$(o,B,b),e(B,We),e(We,fo),e(B,mo),e(B,He),e(He,ho),e(B,uo),$(o,Ut,b),$(o,je,b),e(je,go),$(o,kt,b),$(o,Ce,b),e(Ce,pe),e(pe,Oe),e(Oe,_o),e(pe,bo),e(pe,fe),e(fe,vo),$(o,Jt,b),$(o,Le,b),e(Le,yo),$(o,Zt,b),$(o,Ne,b),e(Ne,me),e(me,Ke),e(Ke,wo),e(me,Do),e(me,he),e(he,$o),$(o,Wt,b),$(o,v,b),T(ue,v,null),e(v,Io),e(v,et),e(et,xo),e(v,Mo),e(v,ge),e(ge,To),e(ge,Ge),e(Ge,Po),e(ge,So),e(v,Eo),e(v,tt),e(tt,Uo),e(v,ko),e(v,_e),e(_e,be),e(be,ot),e(ot,Jo),e(be,Zo),e(be,Ae),e(Ae,Wo),e(_e,jo),e(_e,ve),e(ve,nt),e(nt,Co),e(ve,Lo),e(ve,Fe),e(Fe,No),e(v,Go),e(v,at),e(at,Ao),e(v,Fo),e(v,it),e(it,ye),e(ye,st),e(st,Ro),e(ye,Bo),e(ye,Re),e(Re,Xo),e(v,qo),e(v,N),T(we,N,null),e(N,Vo),e(N,rt),e(rt,Yo),e(N,Qo),T(V,N,null),e(v,zo),e(v,G),T(De,G,null),e(G,Ho),e(G,lt),e(lt,Oo),e(G,Ko),e(G,dt),e(dt,en),e(v,tn),e(v,Y),T($e,Y,null),e(Y,on),e(Y,Ie),e(Ie,nn),e(Ie,ct),e(ct,an),e(Ie,sn),e(v,rn),e(v,C),T(xe,C,null),e(C,ln),e(C,pt),e(pt,dn),e(C,cn),e(C,ft),e(ft,pn),e(C,fn),e(C,mt),e(mt,mn),e(C,hn),T(Q,C,null),e(v,un),e(v,z),T(Me,z,null),e(z,gn),e(z,ht),e(ht,_n),e(v,bn),e(v,k),T(Te,k,null),e(k,vn),e(k,X),e(X,yn),e(X,ut),e(ut,wn),e(X,Dn),e(X,gt),e(gt,$n),e(X,In),e(k,xn),T(H,k,null),e(k,Mn),T(O,k,null),e(k,Tn),e(k,_t),e(_t,Pn),e(k,Sn),T(K,k,null),e(k,En),e(k,bt),e(bt,Un),e(k,kn),T(ee,k,null),e(v,Jn),e(v,L),T(Pe,L,null),e(L,Zn),e(L,q),e(q,Wn),e(q,Be),e(Be,jn),e(q,Cn),e(q,Se),e(Se,vt),e(vt,Ln),e(q,Nn),e(L,Gn),T(te,L,null),e(L,An),T(oe,L,null),e(v,Fn),e(v,ne),T(Ee,ne,null),e(ne,Rn),e(ne,yt),e(yt,Bn),e(v,Xn),e(v,ae),T(Ue,ae,null),e(ae,qn),e(ae,ke),e(ke,Vn),e(ke,wt),e(wt,Yn),e(ke,Qn),jt=!0},p(o,[b]){const Je={};b&2&&(Je.$$scope={dirty:b,ctx:o}),V.$set(Je);const Dt={};b&2&&(Dt.$$scope={dirty:b,ctx:o}),Q.$set(Dt);const $t={};b&2&&($t.$$scope={dirty:b,ctx:o}),H.$set($t);const It={};b&2&&(It.$$scope={dirty:b,ctx:o}),O.$set(It);const Ze={};b&2&&(Ze.$$scope={dirty:b,ctx:o}),K.$set(Ze);const xt={};b&2&&(xt.$$scope={dirty:b,ctx:o}),ee.$set(xt);const Mt={};b&2&&(Mt.$$scope={dirty:b,ctx:o}),te.$set(Mt);const Tt={};b&2&&(Tt.$$scope={dirty:b,ctx:o}),oe.$set(Tt)},i(o){jt||(P(d.$$.fragment,o),P(se.$$.fragment,o),P(ue.$$.fragment,o),P(we.$$.fragment,o),P(V.$$.fragment,o),P(De.$$.fragment,o),P($e.$$.fragment,o),P(xe.$$.fragment,o),P(Q.$$.fragment,o),P(Me.$$.fragment,o),P(Te.$$.fragment,o),P(H.$$.fragment,o),P(O.$$.fragment,o),P(K.$$.fragment,o),P(ee.$$.fragment,o),P(Pe.$$.fragment,o),P(te.$$.fragment,o),P(oe.$$.fragment,o),P(Ee.$$.fragment,o),P(Ue.$$.fragment,o),jt=!0)},o(o){S(d.$$.fragment,o),S(se.$$.fragment,o),S(ue.$$.fragment,o),S(we.$$.fragment,o),S(V.$$.fragment,o),S(De.$$.fragment,o),S($e.$$.fragment,o),S(xe.$$.fragment,o),S(Q.$$.fragment,o),S(Me.$$.fragment,o),S(Te.$$.fragment,o),S(H.$$.fragment,o),S(O.$$.fragment,o),S(K.$$.fragment,o),S(ee.$$.fragment,o),S(Pe.$$.fragment,o),S(te.$$.fragment,o),S(oe.$$.fragment,o),S(Ee.$$.fragment,o),S(Ue.$$.fragment,o),jt=!1},d(o){t(l),o&&t(y),o&&t(c),E(d),o&&t(_),o&&t(U),E(se),o&&t(St),o&&t(j),o&&t(Et),o&&t(B),o&&t(Ut),o&&t(je),o&&t(kt),o&&t(Ce),o&&t(Jt),o&&t(Le),o&&t(Zt),o&&t(Ne),o&&t(Wt),o&&t(v),E(ue),E(we),E(V),E(De),E($e),E(xe),E(Q),E(Me),E(Te),E(H),E(O),E(K),E(ee),E(Pe),E(te),E(oe),E(Ee),E(Ue)}}}const Ka={local:"depthtoimage-generation",sections:[{local:"diffusers.StableDiffusionDepth2ImgPipeline",title:"StableDiffusionDepth2ImgPipeline"}],title:"Depth-to-Image Generation"};function ei(J){return Ra(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ri extends Na{constructor(l){super();Ga(this,l,ei,Oa,Aa,{})}}export{ri as default,Ka as metadata};
