import{S as Wa,i as La,s as Ga,e as n,k as d,w as D,t as s,M as Ca,c as a,d as t,m as c,a as i,x,h as r,b as p,G as e,g as v,y as I,q as M,o as $,B as T,v as Na,L as Yt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Fa}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as L}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Qt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ja}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Vt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Aa(E){let m,w,h,f,y;return f=new Qt({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(){m=n("p"),w=s("Examples:"),h=d(),D(f.$$.fragment)},l(l){m=a(l,"P",{});var b=i(m);w=r(b,"Examples:"),b.forEach(t),h=c(l),x(f.$$.fragment,l)},m(l,b){v(l,m,b),e(m,w),v(l,h,b),I(f,l,b),y=!0},p:Yt,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){$(f.$$.fragment,l),y=!1},d(l){l&&t(m),l&&t(h),T(f,l)}}}function Ra(E){let m,w;return{c(){m=n("p"),w=s(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(h){m=a(h,"P",{});var f=i(m);w=r(f,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),f.forEach(t)},m(h,f){v(h,m,f),e(m,w)},d(h){h&&t(m)}}}function Ba(E){let m,w,h,f,y;return f=new Qt({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(){m=n("p"),w=s("Examples:"),h=d(),D(f.$$.fragment)},l(l){m=a(l,"P",{});var b=i(m);w=r(b,"Examples:"),b.forEach(t),h=c(l),x(f.$$.fragment,l)},m(l,b){v(l,m,b),e(m,w),v(l,h,b),I(f,l,b),y=!0},p:Yt,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){$(f.$$.fragment,l),y=!1},d(l){l&&t(m),l&&t(h),T(f,l)}}}function Xa(E){let m,w,h,f,y;return f=new Qt({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(){m=n("p"),w=s("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h=d(),D(f.$$.fragment)},l(l){m=a(l,"P",{});var b=i(m);w=r(b,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),b.forEach(t),h=c(l),x(f.$$.fragment,l)},m(l,b){v(l,m,b),e(m,w),v(l,h,b),I(f,l,b),y=!0},p:Yt,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){$(f.$$.fragment,l),y=!1},d(l){l&&t(m),l&&t(h),T(f,l)}}}function qa(E){let m,w,h,f,y;return f=new Qt({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(){m=n("p"),w=s("locally:"),h=d(),D(f.$$.fragment)},l(l){m=a(l,"P",{});var b=i(m);w=r(b,"locally:"),b.forEach(t),h=c(l),x(f.$$.fragment,l)},m(l,b){v(l,m,b),e(m,w),v(l,h,b),I(f,l,b),y=!0},p:Yt,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){$(f.$$.fragment,l),y=!1},d(l){l&&t(m),l&&t(h),T(f,l)}}}function Va(E){let m,w,h,f,y,l,b,Ye,zt,yt,G,F,Qe,O,Ht,ze,Ot,wt,P,Kt,K,eo,to,ee,oo,no,te,ao,io,oe,so,ro,Dt,C,Ze,lo,co,He,po,fo,xt,je,mo,It,We,ne,Oe,uo,ho,ae,go,Mt,Le,_o,$t,Ge,ie,Ke,bo,vo,se,yo,Tt,u,re,wo,et,Do,xo,le,Io,Ce,Mo,$o,To,tt,So,Po,de,ce,ot,Uo,Eo,Ne,ko,Jo,pe,nt,Zo,jo,Fe,Wo,Lo,at,Go,Co,it,fe,st,No,Fo,Ae,Ao,Ro,J,me,Bo,rt,Xo,qo,A,Vo,Z,ue,Yo,lt,Qo,zo,dt,Ho,Oo,R,he,Ko,ge,en,ct,tn,on,nn,U,_e,an,be,sn,ve,rn,ln,dn,pt,cn,pn,B,fn,X,mn,q,ye,un,we,hn,De,gn,_n,bn,S,xe,vn,Ie,yn,Re,wn,Dn,xn,ft,In,Mn,V,$n,Me,Tn,$e,Sn,Pn,Un,Y,En,Q,Te,kn,N,Jn,Be,Zn,jn,Se,mt,Wn,Ln,Gn,z,Pe,Cn,ut,Nn,Fn,H,Ue,An,Ee,Rn,ht,Bn,Xn,St;return l=new ja({}),O=new ja({}),re=new L({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.18.2/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. 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.18.2/en/api/models/unet2d-cond#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.18.2/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.18.2/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.18.2/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.18.2/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L65"}}),me=new L({props:{name:"__call__",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image, numpy.ndarray, typing.List[torch.FloatTensor], typing.List[PIL.Image.Image], typing.List[numpy.ndarray]] = None"},{name:"depth_map",val:": typing.Optional[torch.FloatTensor] = None"},{name:"strength",val:": float = 0.8"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 7.5"},{name:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": typing.Optional[float] = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide 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.18.2/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.18.2/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.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L531",returnDescription:`
<p><a
  href="/docs/diffusers/v0.18.2/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.18.2/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),A=new Vt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.__call__.example",$$slots:{default:[Aa]},$$scope:{ctx:E}}}),ue=new L({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.18.2/src/diffusers/pipelines/pipeline_utils.py#L1470"}}),he=new L({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1486"}}),_e=new L({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.18.2/src/diffusers/pipelines/pipeline_utils.py#L1408"}}),B=new Fa({props:{warning:!0,$$slots:{default:[Ra]},$$scope:{ctx:E}}}),X=new Vt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ba]},$$scope:{ctx:E}}}),ye=new L({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1444"}}),xe=new L({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code> or <code>List[str or os.PathLike]</code> or <code>Dict</code> or <code>List[Dict]</code>) &#x2014;
Can be either one of the following or a list of them:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>sd-concepts-library/low-poly-hd-logos-icons</code>) of a
pretrained model hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_text_inversion_directory/</code>) containing the textual
inversion weights.</li>
<li>A path to a <em>file</em> (for example <code>./my_text_inversions.pt</code>) containing textual inversion weights.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.token",description:`<strong>token</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Override the token to use for the textual inversion weights. If <code>pretrained_model_name_or_path</code> is a
list, then <code>token</code> must also be a list of equal length.`,name:"token"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of a custom weight file. This should be used when:</p>
<ul>
<li>The saved textual inversion file is in &#x1F917; Diffusers format, but was saved under a specific weight
name such as <code>text_inv.bin</code>.</li>
<li>The saved textual inversion file is in the Automatic1111 format.</li>
</ul>`,name:"weight_name"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L469"}}),V=new Vt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example",$$slots:{default:[Xa]},$$scope:{ctx:E}}}),Y=new Vt({props:{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[qa]},$$scope:{ctx:E}}}),Te=new L({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> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/v0.18.2/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</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 where a downloaded pretrained model configuration is cached if the standard cache
is not 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 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_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, 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_lora_weights.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_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>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,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, a commit id, or 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;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L746"}}),Pe=new L({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 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 UNet.`,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`. Must explicitly pass the text\nencoder LoRA state dict because it comes &#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"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L1150"}}),Ue=new L({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.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py#L140"}}),{c(){m=n("meta"),w=d(),h=n("h1"),f=n("a"),y=n("span"),D(l.$$.fragment),b=d(),Ye=n("span"),zt=s("Depth-to-Image Generation"),yt=d(),G=n("h2"),F=n("a"),Qe=n("span"),D(O.$$.fragment),Ht=d(),ze=n("span"),Ot=s("StableDiffusionDepth2ImgPipeline"),wt=d(),P=n("p"),Kt=s("The depth-guided stable diffusion model was created by the researchers and engineers from "),K=n("a"),eo=s("CompVis"),to=s(", "),ee=n("a"),oo=s("Stability AI"),no=s(", and "),te=n("a"),ao=s("LAION"),io=s(", as part of Stable Diffusion 2.0. It uses "),oe=n("a"),so=s("MiDas"),ro=s(" to infer depth based on an image."),Dt=d(),C=n("p"),Ze=n("a"),lo=s("StableDiffusionDepth2ImgPipeline"),co=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"),po=s("depth_map"),fo=s(" to preserve the images\u2019 structure."),xt=d(),je=n("p"),mo=s("The original codebase can be found here:"),It=d(),We=n("ul"),ne=n("li"),Oe=n("em"),uo=s("Stable Diffusion v2"),ho=s(": "),ae=n("a"),go=s("Stability-AI/stablediffusion"),Mt=d(),Le=n("p"),_o=s("Available Checkpoints are:"),$t=d(),Ge=n("ul"),ie=n("li"),Ke=n("em"),bo=s("stable-diffusion-2-depth"),vo=s(": "),se=n("a"),yo=s("stabilityai/stable-diffusion-2-depth"),Tt=d(),u=n("div"),D(re.$$.fragment),wo=d(),et=n("p"),Do=s("Pipeline for text-guided image to image generation using Stable Diffusion."),xo=d(),le=n("p"),Io=s("This model inherits from "),Ce=n("a"),Mo=s("DiffusionPipeline"),$o=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.)`),To=d(),tt=n("p"),So=s("In addition the pipeline inherits the following loading methods:"),Po=d(),de=n("ul"),ce=n("li"),ot=n("em"),Uo=s("Textual-Inversion"),Eo=s(": "),Ne=n("a"),ko=s("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),Jo=d(),pe=n("li"),nt=n("em"),Zo=s("LoRA"),jo=s(": "),Fe=n("a"),Wo=s("loaders.LoraLoaderMixin.load_lora_weights()"),Lo=d(),at=n("p"),Go=s("as well as the following saving methods:"),Co=d(),it=n("ul"),fe=n("li"),st=n("em"),No=s("LoRA"),Fo=s(": "),Ae=n("a"),Ao=s("loaders.LoraLoaderMixin.save_lora_weights()"),Ro=d(),J=n("div"),D(me.$$.fragment),Bo=d(),rt=n("p"),Xo=s("Function invoked when calling the pipeline for generation."),qo=d(),D(A.$$.fragment),Vo=d(),Z=n("div"),D(ue.$$.fragment),Yo=d(),lt=n("p"),Qo=s("Enable sliced attention computation."),zo=d(),dt=n("p"),Ho=s(`When this option is enabled, the attention module splits 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.`),Oo=d(),R=n("div"),D(he.$$.fragment),Ko=d(),ge=n("p"),en=s("Disable sliced attention computation. If "),ct=n("code"),tn=s("enable_attention_slicing"),on=s(` was previously called, attention is
computed in one step.`),nn=d(),U=n("div"),D(_e.$$.fragment),an=d(),be=n("p"),sn=s("Enable memory efficient attention from "),ve=n("a"),rn=s("xFormers"),ln=s("."),dn=d(),pt=n("p"),cn=s(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up during
inference. Speed up during training is not guaranteed.`),pn=d(),D(B.$$.fragment),fn=d(),D(X.$$.fragment),mn=d(),q=n("div"),D(ye.$$.fragment),un=d(),we=n("p"),hn=s("Disable memory efficient attention from "),De=n("a"),gn=s("xFormers"),_n=s("."),bn=d(),S=n("div"),D(xe.$$.fragment),vn=d(),Ie=n("p"),yn=s("Load textual inversion embeddings into the text encoder of "),Re=n("a"),wn=s("StableDiffusionPipeline"),Dn=s(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),xn=d(),ft=n("p"),In=s("Example:"),Mn=d(),D(V.$$.fragment),$n=d(),Me=n("p"),Tn=s(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),$e=n("a"),Sn=s("civitAI"),Pn=s(") and then load the vector"),Un=d(),D(Y.$$.fragment),En=d(),Q=n("div"),D(Te.$$.fragment),kn=d(),N=n("p"),Jn=s("Load pretrained LoRA attention processor layers into "),Be=n("a"),Zn=s("UNet2DConditionModel"),jn=s(` and
`),Se=n("a"),mt=n("code"),Wn=s("CLIPTextModel"),Ln=s("."),Gn=d(),z=n("div"),D(Pe.$$.fragment),Cn=d(),ut=n("p"),Nn=s("Save the LoRA parameters corresponding to the UNet and text encoder."),Fn=d(),H=n("div"),D(Ue.$$.fragment),An=d(),Ee=n("p"),Rn=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
`),ht=n("code"),Bn=s("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Xn=s("forward` method called."),this.h()},l(o){const g=Ca('[data-svelte="svelte-1phssyn"]',document.head);m=a(g,"META",{name:!0,content:!0}),g.forEach(t),w=c(o),h=a(o,"H1",{class:!0});var ke=i(h);f=a(ke,"A",{id:!0,class:!0,href:!0});var gt=i(f);y=a(gt,"SPAN",{});var _t=i(y);x(l.$$.fragment,_t),_t.forEach(t),gt.forEach(t),b=c(ke),Ye=a(ke,"SPAN",{});var bt=i(Ye);zt=r(bt,"Depth-to-Image Generation"),bt.forEach(t),ke.forEach(t),yt=c(o),G=a(o,"H2",{class:!0});var Je=i(G);F=a(Je,"A",{id:!0,class:!0,href:!0});var qn=i(F);Qe=a(qn,"SPAN",{});var Vn=i(Qe);x(O.$$.fragment,Vn),Vn.forEach(t),qn.forEach(t),Ht=c(Je),ze=a(Je,"SPAN",{});var Yn=i(ze);Ot=r(Yn,"StableDiffusionDepth2ImgPipeline"),Yn.forEach(t),Je.forEach(t),wt=c(o),P=a(o,"P",{});var j=i(P);Kt=r(j,"The depth-guided stable diffusion model was created by the researchers and engineers from "),K=a(j,"A",{href:!0,rel:!0});var Qn=i(K);eo=r(Qn,"CompVis"),Qn.forEach(t),to=r(j,", "),ee=a(j,"A",{href:!0,rel:!0});var zn=i(ee);oo=r(zn,"Stability AI"),zn.forEach(t),no=r(j,", and "),te=a(j,"A",{href:!0,rel:!0});var Hn=i(te);ao=r(Hn,"LAION"),Hn.forEach(t),io=r(j,", as part of Stable Diffusion 2.0. It uses "),oe=a(j,"A",{href:!0,rel:!0});var On=i(oe);so=r(On,"MiDas"),On.forEach(t),ro=r(j," to infer depth based on an image."),j.forEach(t),Dt=c(o),C=a(o,"P",{});var vt=i(C);Ze=a(vt,"A",{href:!0});var Kn=i(Ze);lo=r(Kn,"StableDiffusionDepth2ImgPipeline"),Kn.forEach(t),co=r(vt," lets you pass a text prompt and an initial image to condition the generation of new images as well as a "),He=a(vt,"CODE",{});var ea=i(He);po=r(ea,"depth_map"),ea.forEach(t),fo=r(vt," to preserve the images\u2019 structure."),vt.forEach(t),xt=c(o),je=a(o,"P",{});var ta=i(je);mo=r(ta,"The original codebase can be found here:"),ta.forEach(t),It=c(o),We=a(o,"UL",{});var oa=i(We);ne=a(oa,"LI",{});var Pt=i(ne);Oe=a(Pt,"EM",{});var na=i(Oe);uo=r(na,"Stable Diffusion v2"),na.forEach(t),ho=r(Pt,": "),ae=a(Pt,"A",{href:!0,rel:!0});var aa=i(ae);go=r(aa,"Stability-AI/stablediffusion"),aa.forEach(t),Pt.forEach(t),oa.forEach(t),Mt=c(o),Le=a(o,"P",{});var ia=i(Le);_o=r(ia,"Available Checkpoints are:"),ia.forEach(t),$t=c(o),Ge=a(o,"UL",{});var sa=i(Ge);ie=a(sa,"LI",{});var Ut=i(ie);Ke=a(Ut,"EM",{});var ra=i(Ke);bo=r(ra,"stable-diffusion-2-depth"),ra.forEach(t),vo=r(Ut,": "),se=a(Ut,"A",{href:!0,rel:!0});var la=i(se);yo=r(la,"stabilityai/stable-diffusion-2-depth"),la.forEach(t),Ut.forEach(t),sa.forEach(t),Tt=c(o),u=a(o,"DIV",{class:!0});var _=i(u);x(re.$$.fragment,_),wo=c(_),et=a(_,"P",{});var da=i(et);Do=r(da,"Pipeline for text-guided image to image generation using Stable Diffusion."),da.forEach(t),xo=c(_),le=a(_,"P",{});var Et=i(le);Io=r(Et,"This model inherits from "),Ce=a(Et,"A",{href:!0});var ca=i(Ce);Mo=r(ca,"DiffusionPipeline"),ca.forEach(t),$o=r(Et,`. 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.)`),Et.forEach(t),To=c(_),tt=a(_,"P",{});var pa=i(tt);So=r(pa,"In addition the pipeline inherits the following loading methods:"),pa.forEach(t),Po=c(_),de=a(_,"UL",{});var kt=i(de);ce=a(kt,"LI",{});var Jt=i(ce);ot=a(Jt,"EM",{});var fa=i(ot);Uo=r(fa,"Textual-Inversion"),fa.forEach(t),Eo=r(Jt,": "),Ne=a(Jt,"A",{href:!0});var ma=i(Ne);ko=r(ma,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),ma.forEach(t),Jt.forEach(t),Jo=c(kt),pe=a(kt,"LI",{});var Zt=i(pe);nt=a(Zt,"EM",{});var ua=i(nt);Zo=r(ua,"LoRA"),ua.forEach(t),jo=r(Zt,": "),Fe=a(Zt,"A",{href:!0});var ha=i(Fe);Wo=r(ha,"loaders.LoraLoaderMixin.load_lora_weights()"),ha.forEach(t),Zt.forEach(t),kt.forEach(t),Lo=c(_),at=a(_,"P",{});var ga=i(at);Go=r(ga,"as well as the following saving methods:"),ga.forEach(t),Co=c(_),it=a(_,"UL",{});var _a=i(it);fe=a(_a,"LI",{});var jt=i(fe);st=a(jt,"EM",{});var ba=i(st);No=r(ba,"LoRA"),ba.forEach(t),Fo=r(jt,": "),Ae=a(jt,"A",{href:!0});var va=i(Ae);Ao=r(va,"loaders.LoraLoaderMixin.save_lora_weights()"),va.forEach(t),jt.forEach(t),_a.forEach(t),Ro=c(_),J=a(_,"DIV",{class:!0});var Xe=i(J);x(me.$$.fragment,Xe),Bo=c(Xe),rt=a(Xe,"P",{});var ya=i(rt);Xo=r(ya,"Function invoked when calling the pipeline for generation."),ya.forEach(t),qo=c(Xe),x(A.$$.fragment,Xe),Xe.forEach(t),Vo=c(_),Z=a(_,"DIV",{class:!0});var qe=i(Z);x(ue.$$.fragment,qe),Yo=c(qe),lt=a(qe,"P",{});var wa=i(lt);Qo=r(wa,"Enable sliced attention computation."),wa.forEach(t),zo=c(qe),dt=a(qe,"P",{});var Da=i(dt);Ho=r(Da,`When this option is enabled, the attention module splits 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.`),Da.forEach(t),qe.forEach(t),Oo=c(_),R=a(_,"DIV",{class:!0});var Wt=i(R);x(he.$$.fragment,Wt),Ko=c(Wt),ge=a(Wt,"P",{});var Lt=i(ge);en=r(Lt,"Disable sliced attention computation. If "),ct=a(Lt,"CODE",{});var xa=i(ct);tn=r(xa,"enable_attention_slicing"),xa.forEach(t),on=r(Lt,` was previously called, attention is
computed in one step.`),Lt.forEach(t),Wt.forEach(t),nn=c(_),U=a(_,"DIV",{class:!0});var W=i(U);x(_e.$$.fragment,W),an=c(W),be=a(W,"P",{});var Gt=i(be);sn=r(Gt,"Enable memory efficient attention from "),ve=a(Gt,"A",{href:!0,rel:!0});var Ia=i(ve);rn=r(Ia,"xFormers"),Ia.forEach(t),ln=r(Gt,"."),Gt.forEach(t),dn=c(W),pt=a(W,"P",{});var Ma=i(pt);cn=r(Ma,`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.`),Ma.forEach(t),pn=c(W),x(B.$$.fragment,W),fn=c(W),x(X.$$.fragment,W),W.forEach(t),mn=c(_),q=a(_,"DIV",{class:!0});var Ct=i(q);x(ye.$$.fragment,Ct),un=c(Ct),we=a(Ct,"P",{});var Nt=i(we);hn=r(Nt,"Disable memory efficient attention from "),De=a(Nt,"A",{href:!0,rel:!0});var $a=i(De);gn=r($a,"xFormers"),$a.forEach(t),_n=r(Nt,"."),Nt.forEach(t),Ct.forEach(t),bn=c(_),S=a(_,"DIV",{class:!0});var k=i(S);x(xe.$$.fragment,k),vn=c(k),Ie=a(k,"P",{});var Ft=i(Ie);yn=r(Ft,"Load textual inversion embeddings into the text encoder of "),Re=a(Ft,"A",{href:!0});var Ta=i(Re);wn=r(Ta,"StableDiffusionPipeline"),Ta.forEach(t),Dn=r(Ft,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Ft.forEach(t),xn=c(k),ft=a(k,"P",{});var Sa=i(ft);In=r(Sa,"Example:"),Sa.forEach(t),Mn=c(k),x(V.$$.fragment,k),$n=c(k),Me=a(k,"P",{});var At=i(Me);Tn=r(At,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),$e=a(At,"A",{href:!0,rel:!0});var Pa=i($e);Sn=r(Pa,"civitAI"),Pa.forEach(t),Pn=r(At,") and then load the vector"),At.forEach(t),Un=c(k),x(Y.$$.fragment,k),k.forEach(t),En=c(_),Q=a(_,"DIV",{class:!0});var Rt=i(Q);x(Te.$$.fragment,Rt),kn=c(Rt),N=a(Rt,"P",{});var Ve=i(N);Jn=r(Ve,"Load pretrained LoRA attention processor layers into "),Be=a(Ve,"A",{href:!0});var Ua=i(Be);Zn=r(Ua,"UNet2DConditionModel"),Ua.forEach(t),jn=r(Ve,` and
`),Se=a(Ve,"A",{href:!0,rel:!0});var Ea=i(Se);mt=a(Ea,"CODE",{});var ka=i(mt);Wn=r(ka,"CLIPTextModel"),ka.forEach(t),Ea.forEach(t),Ln=r(Ve,"."),Ve.forEach(t),Rt.forEach(t),Gn=c(_),z=a(_,"DIV",{class:!0});var Bt=i(z);x(Pe.$$.fragment,Bt),Cn=c(Bt),ut=a(Bt,"P",{});var Ja=i(ut);Nn=r(Ja,"Save the LoRA parameters corresponding to the UNet and text encoder."),Ja.forEach(t),Bt.forEach(t),Fn=c(_),H=a(_,"DIV",{class:!0});var Xt=i(H);x(Ue.$$.fragment,Xt),An=c(Xt),Ee=a(Xt,"P",{});var qt=i(Ee);Rn=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
`),ht=a(qt,"CODE",{});var Za=i(ht);Bn=r(Za,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Za.forEach(t),Xn=r(qt,"forward` method called."),qt.forEach(t),Xt.forEach(t),_.forEach(t),this.h()},h(){p(m,"name","hf:doc:metadata"),p(m,"content",JSON.stringify(Ya)),p(f,"id","depthtoimage-generation"),p(f,"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"),p(f,"href","#depthtoimage-generation"),p(h,"class","relative group"),p(F,"id","diffusers.StableDiffusionDepth2ImgPipeline"),p(F,"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"),p(F,"href","#diffusers.StableDiffusionDepth2ImgPipeline"),p(G,"class","relative group"),p(K,"href","https://github.com/CompVis"),p(K,"rel","nofollow"),p(ee,"href","https://stability.ai/"),p(ee,"rel","nofollow"),p(te,"href","https://laion.ai/"),p(te,"rel","nofollow"),p(oe,"href","https://github.com/isl-org/MiDaS"),p(oe,"rel","nofollow"),p(Ze,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline"),p(ae,"href","https://github.com/Stability-AI/stablediffusion#depth-conditional-stable-diffusion"),p(ae,"rel","nofollow"),p(se,"href","https://huggingface.co/stabilityai/stable-diffusion-2-depth"),p(se,"rel","nofollow"),p(Ce,"href","/docs/diffusers/v0.18.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),p(Ne,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),p(Fe,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),p(Ae,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),p(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ve,"href","https://facebookresearch.github.io/xformers/"),p(ve,"rel","nofollow"),p(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(De,"href","https://facebookresearch.github.io/xformers/"),p(De,"rel","nofollow"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Re,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),p($e,"href","https://civitai.com/models/3036?modelVersionId=9857"),p($e,"rel","nofollow"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Be,"href","/docs/diffusers/v0.18.2/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),p(Se,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),p(Se,"rel","nofollow"),p(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(u,"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,g){e(document.head,m),v(o,w,g),v(o,h,g),e(h,f),e(f,y),I(l,y,null),e(h,b),e(h,Ye),e(Ye,zt),v(o,yt,g),v(o,G,g),e(G,F),e(F,Qe),I(O,Qe,null),e(G,Ht),e(G,ze),e(ze,Ot),v(o,wt,g),v(o,P,g),e(P,Kt),e(P,K),e(K,eo),e(P,to),e(P,ee),e(ee,oo),e(P,no),e(P,te),e(te,ao),e(P,io),e(P,oe),e(oe,so),e(P,ro),v(o,Dt,g),v(o,C,g),e(C,Ze),e(Ze,lo),e(C,co),e(C,He),e(He,po),e(C,fo),v(o,xt,g),v(o,je,g),e(je,mo),v(o,It,g),v(o,We,g),e(We,ne),e(ne,Oe),e(Oe,uo),e(ne,ho),e(ne,ae),e(ae,go),v(o,Mt,g),v(o,Le,g),e(Le,_o),v(o,$t,g),v(o,Ge,g),e(Ge,ie),e(ie,Ke),e(Ke,bo),e(ie,vo),e(ie,se),e(se,yo),v(o,Tt,g),v(o,u,g),I(re,u,null),e(u,wo),e(u,et),e(et,Do),e(u,xo),e(u,le),e(le,Io),e(le,Ce),e(Ce,Mo),e(le,$o),e(u,To),e(u,tt),e(tt,So),e(u,Po),e(u,de),e(de,ce),e(ce,ot),e(ot,Uo),e(ce,Eo),e(ce,Ne),e(Ne,ko),e(de,Jo),e(de,pe),e(pe,nt),e(nt,Zo),e(pe,jo),e(pe,Fe),e(Fe,Wo),e(u,Lo),e(u,at),e(at,Go),e(u,Co),e(u,it),e(it,fe),e(fe,st),e(st,No),e(fe,Fo),e(fe,Ae),e(Ae,Ao),e(u,Ro),e(u,J),I(me,J,null),e(J,Bo),e(J,rt),e(rt,Xo),e(J,qo),I(A,J,null),e(u,Vo),e(u,Z),I(ue,Z,null),e(Z,Yo),e(Z,lt),e(lt,Qo),e(Z,zo),e(Z,dt),e(dt,Ho),e(u,Oo),e(u,R),I(he,R,null),e(R,Ko),e(R,ge),e(ge,en),e(ge,ct),e(ct,tn),e(ge,on),e(u,nn),e(u,U),I(_e,U,null),e(U,an),e(U,be),e(be,sn),e(be,ve),e(ve,rn),e(be,ln),e(U,dn),e(U,pt),e(pt,cn),e(U,pn),I(B,U,null),e(U,fn),I(X,U,null),e(u,mn),e(u,q),I(ye,q,null),e(q,un),e(q,we),e(we,hn),e(we,De),e(De,gn),e(we,_n),e(u,bn),e(u,S),I(xe,S,null),e(S,vn),e(S,Ie),e(Ie,yn),e(Ie,Re),e(Re,wn),e(Ie,Dn),e(S,xn),e(S,ft),e(ft,In),e(S,Mn),I(V,S,null),e(S,$n),e(S,Me),e(Me,Tn),e(Me,$e),e($e,Sn),e(Me,Pn),e(S,Un),I(Y,S,null),e(u,En),e(u,Q),I(Te,Q,null),e(Q,kn),e(Q,N),e(N,Jn),e(N,Be),e(Be,Zn),e(N,jn),e(N,Se),e(Se,mt),e(mt,Wn),e(N,Ln),e(u,Gn),e(u,z),I(Pe,z,null),e(z,Cn),e(z,ut),e(ut,Nn),e(u,Fn),e(u,H),I(Ue,H,null),e(H,An),e(H,Ee),e(Ee,Rn),e(Ee,ht),e(ht,Bn),e(Ee,Xn),St=!0},p(o,[g]){const ke={};g&2&&(ke.$$scope={dirty:g,ctx:o}),A.$set(ke);const gt={};g&2&&(gt.$$scope={dirty:g,ctx:o}),B.$set(gt);const _t={};g&2&&(_t.$$scope={dirty:g,ctx:o}),X.$set(_t);const bt={};g&2&&(bt.$$scope={dirty:g,ctx:o}),V.$set(bt);const Je={};g&2&&(Je.$$scope={dirty:g,ctx:o}),Y.$set(Je)},i(o){St||(M(l.$$.fragment,o),M(O.$$.fragment,o),M(re.$$.fragment,o),M(me.$$.fragment,o),M(A.$$.fragment,o),M(ue.$$.fragment,o),M(he.$$.fragment,o),M(_e.$$.fragment,o),M(B.$$.fragment,o),M(X.$$.fragment,o),M(ye.$$.fragment,o),M(xe.$$.fragment,o),M(V.$$.fragment,o),M(Y.$$.fragment,o),M(Te.$$.fragment,o),M(Pe.$$.fragment,o),M(Ue.$$.fragment,o),St=!0)},o(o){$(l.$$.fragment,o),$(O.$$.fragment,o),$(re.$$.fragment,o),$(me.$$.fragment,o),$(A.$$.fragment,o),$(ue.$$.fragment,o),$(he.$$.fragment,o),$(_e.$$.fragment,o),$(B.$$.fragment,o),$(X.$$.fragment,o),$(ye.$$.fragment,o),$(xe.$$.fragment,o),$(V.$$.fragment,o),$(Y.$$.fragment,o),$(Te.$$.fragment,o),$(Pe.$$.fragment,o),$(Ue.$$.fragment,o),St=!1},d(o){t(m),o&&t(w),o&&t(h),T(l),o&&t(yt),o&&t(G),T(O),o&&t(wt),o&&t(P),o&&t(Dt),o&&t(C),o&&t(xt),o&&t(je),o&&t(It),o&&t(We),o&&t(Mt),o&&t(Le),o&&t($t),o&&t(Ge),o&&t(Tt),o&&t(u),T(re),T(me),T(A),T(ue),T(he),T(_e),T(B),T(X),T(ye),T(xe),T(V),T(Y),T(Te),T(Pe),T(Ue)}}}const Ya={local:"depthtoimage-generation",sections:[{local:"diffusers.StableDiffusionDepth2ImgPipeline",title:"StableDiffusionDepth2ImgPipeline"}],title:"Depth-to-Image Generation"};function Qa(E){return Na(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oi extends Wa{constructor(m){super();La(this,m,Qa,Va,Ga,{})}}export{oi as default,Ya as metadata};
