import{S as li,i as ri,s as pi,e as n,k as d,w as h,t as i,M as di,c as s,d as o,m as c,a,x as _,h as l,b as p,N as ct,G as t,g as m,y as b,q as y,o as v,B as w,v as ci,L as mi}from"../../../chunks/vendor-hf-doc-builder.js";import{D as K}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Gt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Rs}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as fi}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ui(Bt){let M,W,J,T,N;return T=new Gt({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjBvcGVuY3YtcHl0aG9uJTIwdHJhbnNmb3JtZXJzJTIwYWNjZWxlcmF0ZSUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25YTENvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUyQyUyMEF1dG9lbmNvZGVyS0wlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBaW1wb3J0JTIwY3YyJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYWVyaWFsJTIwdmlldyUyQyUyMGElMjBmdXR1cmlzdGljJTIwcmVzZWFyY2glMjBjb21wbGV4JTIwaW4lMjBhJTIwYnJpZ2h0JTIwZm9nZ3klMjBqdW5nbGUlMkMlMjBoYXJkJTIwbGlnaHRpbmclMjIlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlMjJsb3clMjBxdWFsaXR5JTJDJTIwYmFkJTIwcXVhbGl0eSUyQyUyMHNrZXRjaGVzJTIyJTBBJTBBJTIzJTIwZG93bmxvYWQlMjBhbiUyMGltYWdlJTBBaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaGYuY28lMkZkYXRhc2V0cyUyRmhmLWludGVybmFsLXRlc3RpbmclMkZkaWZmdXNlcnMtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZzZF9jb250cm9sbmV0JTJGaGYtbG9nby5wbmclMjIlMEEpJTBBJTBBJTIzJTIwaW5pdGlhbGl6ZSUyMHRoZSUyMG1vZGVscyUyMGFuZCUyMHBpcGVsaW5lJTBBY29udHJvbG5ldF9jb25kaXRpb25pbmdfc2NhbGUlMjAlM0QlMjAwLjUlMjAlMjAlMjMlMjByZWNvbW1lbmRlZCUyMGZvciUyMGdvb2QlMjBnZW5lcmFsaXphdGlvbiUwQWNvbnRyb2xuZXQlMjAlM0QlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmRpZmZ1c2VycyUyRmNvbnRyb2xuZXQtY2Fubnktc2R4bC0xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBdmFlJTIwJTNEJTIwQXV0b2VuY29kZXJLTC5mcm9tX3ByZXRyYWluZWQoJTIybWFkZWJ5b2xsaW4lMkZzZHhsLXZhZS1mcDE2LWZpeCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExDb250cm9sTmV0UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUyQyUyMGNvbnRyb2xuZXQlM0Rjb250cm9sbmV0JTJDJTIwdmFlJTNEdmFlJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEElMjMlMjBnZXQlMjBjYW5ueSUyMGltYWdlJTBBaW1hZ2UlMjAlM0QlMjBucC5hcnJheShpbWFnZSklMEFpbWFnZSUyMCUzRCUyMGN2Mi5DYW5ueShpbWFnZSUyQyUyMDEwMCUyQyUyMDIwMCklMEFpbWFnZSUyMCUzRCUyMGltYWdlJTVCJTNBJTJDJTIwJTNBJTJDJTIwTm9uZSU1RCUwQWltYWdlJTIwJTNEJTIwbnAuY29uY2F0ZW5hdGUoJTVCaW1hZ2UlMkMlMjBpbWFnZSUyQyUyMGltYWdlJTVEJTJDJTIwYXhpcyUzRDIpJTBBY2FubnlfaW1hZ2UlMjAlM0QlMjBJbWFnZS5mcm9tYXJyYXkoaW1hZ2UpJTBBJTBBJTIzJTIwZ2VuZXJhdGUlMjBpbWFnZSUwQWltYWdlJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlMkMlMjBjb250cm9sbmV0X2NvbmRpdGlvbmluZ19zY2FsZSUzRGNvbnRyb2xuZXRfY29uZGl0aW9uaW5nX3NjYWxlJTJDJTIwaW1hZ2UlM0RjYW5ueV9pbWFnZSUwQSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># !pip install opencv-python transformers accelerate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLControlNetPipeline, ControlNetModel, AutoencoderKL
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<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> cv2
<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>prompt = <span class="hljs-string">&quot;aerial view, a futuristic research complex in a bright foggy jungle, hard lighting&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;low quality, bad quality, sketches&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># download an image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://hf.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd_controlnet/hf-logo.png&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># initialize the models and pipeline</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet_conditioning_scale = <span class="hljs-number">0.5</span>  <span class="hljs-comment"># recommended for good generalization</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet = ControlNetModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;diffusers/controlnet-canny-sdxl-1.0&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKL.from_pretrained(<span class="hljs-string">&quot;madebyollin/sdxl-vae-fp16-fix&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, controlnet=controlnet, vae=vae, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># get canny image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = np.array(image)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = cv2.Canny(image, <span class="hljs-number">100</span>, <span class="hljs-number">200</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = image[:, :, <span class="hljs-literal">None</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = np.concatenate([image, image, image], axis=<span class="hljs-number">2</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>canny_image = Image.fromarray(image)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># generate image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    prompt, controlnet_conditioning_scale=controlnet_conditioning_scale, image=canny_image
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){M=n("p"),W=i("Examples:"),J=d(),h(T.$$.fragment)},l(g){M=s(g,"P",{});var U=a(M);W=l(U,"Examples:"),U.forEach(o),J=c(g),_(T.$$.fragment,g)},m(g,U){m(g,M,U),t(M,W),m(g,J,U),b(T,g,U),N=!0},p:mi,i(g){N||(y(T.$$.fragment,g),N=!0)},o(g){v(T.$$.fragment,g),N=!1},d(g){g&&o(M),g&&o(J),w(T,g)}}}function gi(Bt){let M,W,J,T,N,g,U,mt,Yo,Vt,ee,te,$o,zo,Ft,We,Ro,Yt,De,Ao,$t,Pe,ft,Qo,zt,D,Ho,Ge,qo,Oo,Rt,P,Ko,oe,en,tn,At,x,ut,ne,on,nn,gt,se,sn,an,ht,ae,ln,rn,_t,ie,pn,Qt,G,dn,le,cn,mn,Ht,Be,fn,qt,re,As,Ot,Ve,un,Kt,E,B,bt,pe,gn,yt,hn,eo,V,_n,vt,bn,yn,to,F,wt,vn,wn,de,Mn,ce,Mt,Tn,Jn,oo,Fe,Cn,no,Ye,xn,so,me,ao,L,fe,$e,Qs,Nn,ze,Un,In,ue,Re,Hs,jn,Ae,Zn,io,Qe,En,lo,ge,ro,X,he,He,qs,Ln,qe,Xn,Sn,_e,Oe,Os,kn,Ke,Wn,po,I,Dn,et,Pn,Gn,tt,Bn,Vn,co,be,mo,ot,Fn,fo,ye,uo,ve,nt,Ks,go,S,Y,Tt,we,Yn,Jt,$n,ho,f,Me,zn,Ct,Rn,An,Te,Qn,st,Hn,qn,On,xt,Kn,es,k,Je,Nt,ts,os,at,ns,ss,Ce,Ut,as,is,it,ls,rs,xe,It,ps,ds,lt,cs,ms,j,Ne,fs,jt,us,gs,$,hs,z,Ue,_s,Ie,bs,Zt,ys,vs,ws,R,je,Ms,Ze,Ts,Et,Js,Cs,xs,A,Ee,Ns,C,Us,Lt,Is,js,Xt,Zs,Es,St,Ls,Xs,kt,Ss,ks,Ws,Q,Le,Ds,Wt,Ps,Gs,H,Xe,Bs,Dt,Vs,Fs,q,Se,Ys,Pt,$s,_o;return g=new Rs({}),pe=new Rs({}),me=new Gt({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMjAlMEFpbXBvcnQlMjBjdjIlMEElMEFjYW5ueV9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGbGFuZHNjYXBlLnBuZyUyMiUwQSklMEFjYW5ueV9pbWFnZSUyMCUzRCUyMG5wLmFycmF5KGNhbm55X2ltYWdlKSUwQSUwQWxvd190aHJlc2hvbGQlMjAlM0QlMjAxMDAlMEFoaWdoX3RocmVzaG9sZCUyMCUzRCUyMDIwMCUwQSUwQWNhbm55X2ltYWdlJTIwJTNEJTIwY3YyLkNhbm55KGNhbm55X2ltYWdlJTJDJTIwbG93X3RocmVzaG9sZCUyQyUyMGhpZ2hfdGhyZXNob2xkKSUwQSUwQSUyMyUyMHplcm8lMjBvdXQlMjBtaWRkbGUlMjBjb2x1bW5zJTIwb2YlMjBpbWFnZSUyMHdoZXJlJTIwcG9zZSUyMHdpbGwlMjBiZSUyMG92ZXJsYXllZCUwQXplcm9fc3RhcnQlMjAlM0QlMjBjYW5ueV9pbWFnZS5zaGFwZSU1QjElNUQlMjAlMkYlMkYlMjA0JTBBemVyb19lbmQlMjAlM0QlMjB6ZXJvX3N0YXJ0JTIwJTJCJTIwY2FubnlfaW1hZ2Uuc2hhcGUlNUIxJTVEJTIwJTJGJTJGJTIwMiUwQWNhbm55X2ltYWdlJTVCJTNBJTJDJTIwemVyb19zdGFydCUzQXplcm9fZW5kJTVEJTIwJTNEJTIwMCUwQSUwQWNhbm55X2ltYWdlJTIwJTNEJTIwY2FubnlfaW1hZ2UlNUIlM0ElMkMlMjAlM0ElMkMlMjBOb25lJTVEJTBBY2FubnlfaW1hZ2UlMjAlM0QlMjBucC5jb25jYXRlbmF0ZSglNUJjYW5ueV9pbWFnZSUyQyUyMGNhbm55X2ltYWdlJTJDJTIwY2FubnlfaW1hZ2UlNUQlMkMlMjBheGlzJTNEMiklMEFjYW5ueV9pbWFnZSUyMCUzRCUyMEltYWdlLmZyb21hcnJheShjYW5ueV9pbWFnZSkucmVzaXplKCgxMDI0JTJDJTIwMTAyNCkp",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np 
<span class="hljs-keyword">import</span> cv2

canny_image = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/landscape.png&quot;</span>
)
canny_image = np.array(canny_image)

low_threshold = <span class="hljs-number">100</span>
high_threshold = <span class="hljs-number">200</span>

canny_image = cv2.Canny(canny_image, low_threshold, high_threshold)

<span class="hljs-comment"># zero out middle columns of image where pose will be overlayed</span>
zero_start = canny_image.shape[<span class="hljs-number">1</span>] // <span class="hljs-number">4</span>
zero_end = zero_start + canny_image.shape[<span class="hljs-number">1</span>] // <span class="hljs-number">2</span>
canny_image[:, zero_start:zero_end] = <span class="hljs-number">0</span>

canny_image = canny_image[:, :, <span class="hljs-literal">None</span>]
canny_image = np.concatenate([canny_image, canny_image, canny_image], axis=<span class="hljs-number">2</span>)
canny_image = Image.fromarray(canny_image).resize((<span class="hljs-number">1024</span>, <span class="hljs-number">1024</span>))`}}),ge=new Gt({props:{code:"ZnJvbSUyMGNvbnRyb2xuZXRfYXV4JTIwaW1wb3J0JTIwT3BlbnBvc2VEZXRlY3RvciUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBb3BlbnBvc2UlMjAlM0QlMjBPcGVucG9zZURldGVjdG9yLmZyb21fcHJldHJhaW5lZCglMjJsbGx5YXN2aWVsJTJGQ29udHJvbE5ldCUyMiklMEElMEFvcGVucG9zZV9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGcGVyc29uLnBuZyUyMiUwQSklMEFvcGVucG9zZV9pbWFnZSUyMCUzRCUyMG9wZW5wb3NlKG9wZW5wb3NlX2ltYWdlKS5yZXNpemUoKDEwMjQlMkMlMjAxMDI0KSk=",highlighted:`<span class="hljs-keyword">from</span> controlnet_aux <span class="hljs-keyword">import</span> OpenposeDetector
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

openpose = OpenposeDetector.from_pretrained(<span class="hljs-string">&quot;lllyasviel/ControlNet&quot;</span>)

openpose_image = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png&quot;</span>
)
openpose_image = openpose(openpose_image).resize((<span class="hljs-number">1024</span>, <span class="hljs-number">1024</span>))`}}),be=new Gt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblhMQ29udHJvbE5ldFBpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJTJDJTIwQXV0b2VuY29kZXJLTCUyQyUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBaW1wb3J0JTIwdG9yY2glMEElMEFjb250cm9sbmV0cyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMENvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydGhpYmF1ZCUyRmNvbnRyb2xuZXQtb3BlbnBvc2Utc2R4bC0xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTBBJTIwJTIwJTIwJTIwKSUyQyUwQSUyMCUyMCUyMCUyMENvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZGlmZnVzZXJzJTJGY29udHJvbG5ldC1jYW5ueS1zZHhsLTEuMCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTJDJTBBJTVEJTBBJTBBdmFlJTIwJTNEJTIwQXV0b2VuY29kZXJLTC5mcm9tX3ByZXRyYWluZWQoJTIybWFkZWJ5b2xsaW4lMkZzZHhsLXZhZS1mcDE2LWZpeCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMQ29udHJvbE5ldFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMjBjb250cm9sbmV0JTNEY29udHJvbG5ldHMlMkMlMjB2YWUlM0R2YWUlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB1c2Vfc2FmZXRlbnNvcnMlM0RUcnVlJTBBKSUwQXBpcGUuc2NoZWR1bGVyJTIwJTNEJTIwVW5pUENNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZS5zY2hlZHVsZXIuY29uZmlnKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionXLControlNetPipeline, ControlNetModel, AutoencoderKL, UniPCMultistepScheduler
<span class="hljs-keyword">import</span> torch

controlnets = [
    ControlNetModel.from_pretrained(
        <span class="hljs-string">&quot;thibaud/controlnet-openpose-sdxl-1.0&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
    ),
    ControlNetModel.from_pretrained(<span class="hljs-string">&quot;diffusers/controlnet-canny-sdxl-1.0&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>),
]

vae = AutoencoderKL.from_pretrained(<span class="hljs-string">&quot;madebyollin/sdxl-vae-fp16-fix&quot;</span>, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>)
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
    <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>, controlnet=controlnets, vae=vae, torch_dtype=torch.float16, use_safetensors=<span class="hljs-literal">True</span>
)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()`}}),ye=new Gt({props:{code:"cHJvbXB0JTIwJTNEJTIwJTIyYSUyMGdpYW50JTIwc3RhbmRpbmclMjBpbiUyMGElMjBmYW50YXN5JTIwbGFuZHNjYXBlJTJDJTIwYmVzdCUyMHF1YWxpdHklMjIlMEFuZWdhdGl2ZV9wcm9tcHQlMjAlM0QlMjAlMjJtb25vY2hyb21lJTJDJTIwbG93cmVzJTJDJTIwYmFkJTIwYW5hdG9teSUyQyUyMHdvcnN0JTIwcXVhbGl0eSUyQyUyMGxvdyUyMHF1YWxpdHklMjIlMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCgxKSUwQSUwQWltYWdlcyUyMCUzRCUyMCU1Qm9wZW5wb3NlX2ltYWdlJTJDJTIwY2FubnlfaW1hZ2UlNUQlMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEaW1hZ2VzJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDI1JTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEbmVnYXRpdmVfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ltYWdlc19wZXJfcHJvbXB0JTNEMyUyQyUwQSUyMCUyMCUyMCUyMGNvbnRyb2xuZXRfY29uZGl0aW9uaW5nX3NjYWxlJTNEJTVCMS4wJTJDJTIwMC44JTVEJTJDJTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`prompt = <span class="hljs-string">&quot;a giant standing in a fantasy landscape, best quality&quot;</span>
negative_prompt = <span class="hljs-string">&quot;monochrome, lowres, bad anatomy, worst quality, low quality&quot;</span>

generator = torch.manual_seed(<span class="hljs-number">1</span>)

images = [openpose_image, canny_image]

images = pipe(
    prompt,
    image=images,
    num_inference_steps=<span class="hljs-number">25</span>,
    generator=generator,
    negative_prompt=negative_prompt,
    num_images_per_prompt=<span class="hljs-number">3</span>,
    controlnet_conditioning_scale=[<span class="hljs-number">1.0</span>, <span class="hljs-number">0.8</span>],
).images[<span class="hljs-number">0</span>]`}}),we=new Rs({}),Me=new K({props:{name:"class diffusers.StableDiffusionXLControlNetPipeline",anchor:"diffusers.StableDiffusionXLControlNetPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"text_encoder_2",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"tokenizer_2",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"controlnet",val:": typing.Union[diffusers.models.controlnet.ControlNetModel, typing.List[diffusers.models.controlnet.ControlNetModel], typing.Tuple[diffusers.models.controlnet.ControlNetModel], diffusers.pipelines.controlnet.multicontrolnet.MultiControlNetModel]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"force_zeros_for_empty_prompt",val:": bool = True"},{name:"add_watermarker",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLControlNetPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.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.StableDiffusionXLControlNetPipeline.text_encoder_2",description:`<strong>text_encoder_2</strong> (<code> CLIPTextModelWithProjection</code>) &#x2014;
Second frozen text-encoder. Stable Diffusion XL uses the text and pool portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithProjection" rel="nofollow">CLIP</a>,
specifically the
<a href="https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k" rel="nofollow">laion/CLIP-ViT-bigG-14-laion2B-39B-b160k</a>
variant.`,name:"text_encoder_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.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.StableDiffusionXLControlNetPipeline.tokenizer_2",description:`<strong>tokenizer_2</strong> (<code>CLIPTokenizer</code>) &#x2014;
Second 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_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.controlnet",description:`<strong>controlnet</strong> (<a href="/docs/diffusers/main/en/api/models/controlnet#diffusers.ControlNetModel">ControlNetModel</a> or <code>List[ControlNetModel]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple ControlNets
as a list, the outputs from each ControlNet are added together to create one combined additional
conditioning.`,name:"controlnet"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.force_zeros_for_empty_prompt",description:`<strong>force_zeros_for_empty_prompt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>&quot;True&quot;</code>) &#x2014;
Whether the negative prompt embeddings shall always be set to 0. Also see the config of
<code>stabilityai/stable-diffusion-xl-base-1-0</code>.`,name:"force_zeros_for_empty_prompt"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.add_watermarker",description:`<strong>add_watermarker</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to use the <a href="https://github.com/ShieldMnt/invisible-watermark/" rel="nofollow">invisible_watermark</a> library to
watermark output images. If not defined, it will default to <code>True</code> if the package is installed, otherwise
no watermarker will be used.`,name:"add_watermarker"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L105"}}),Ne=new K({props:{name:"__call__",anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_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"},{name:"controlnet_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"guess_mode",val:": bool = False"},{name:"control_guidance_start",val:": typing.Union[float, typing.List[float]] = 0.0"},{name:"control_guidance_end",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"original_size",val:": typing.Tuple[int, int] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"target_size",val:": typing.Tuple[int, int] = None"},{name:"negative_original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"negative_target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__call__.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to the <code>tokenizer_2</code> and <code>text_encoder_2</code>. If not defined, <code>prompt</code> is
used in both text-encoders`,name:"prompt_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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>, <code>List[np.ndarray]</code>, &#x2014;
<code>List[List[torch.FloatTensor]]</code>, <code>List[List[np.ndarray]]</code> or <code>List[List[PIL.Image.Image]]</code>):
The ControlNet input condition. ControlNet uses this input condition to generate guidance to Unet. If
the type is specified as <code>Torch.FloatTensor</code>, it is passed to ControlNet as is. <code>PIL.Image.Image</code> can
also be accepted as an image. The dimensions of the output image defaults to <code>image</code>&#x2019;s dimensions. If
height and/or width are passed, <code>image</code> is resized according to them. If multiple ControlNets are
specified in init, images must be passed as a list such that each element of the list can be correctly
batched for input to a single controlnet.`,name:"image"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__call__.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in both text-encoders`,name:"negative_prompt_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[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.StableDiffusionXLControlNetPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__call__.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__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.StableDiffusionXLControlNetPipeline.__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/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.controlnet_conditioning_scale",description:`<strong>controlnet_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The outputs of the controlnet are multiplied by <code>controlnet_conditioning_scale</code> before they are added
to the residual in the original unet. If multiple ControlNets are specified in init, you can set the
corresponding scale as a list.`,name:"controlnet_conditioning_scale"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.guess_mode",description:`<strong>guess_mode</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
In this mode, the ControlNet encoder will try best to recognize the content of the input image even if
you remove all prompts. The <code>guidance_scale</code> between 3.0 and 5.0 is recommended.`,name:"guess_mode"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.control_guidance_start",description:`<strong>control_guidance_start</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The percentage of total steps at which the controlnet starts applying.`,name:"control_guidance_start"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.control_guidance_end",description:`<strong>control_guidance_end</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The percentage of total steps at which the controlnet stops applying.`,name:"control_guidance_end"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.original_size",description:`<strong>original_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
If <code>original_size</code> is not the same as <code>target_size</code> the image will appear to be down- or upsampled.
<code>original_size</code> defaults to <code>(width, height)</code> if not specified. Part of SDXL&#x2019;s micro-conditioning as
explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"original_size"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.crops_coords_top_left",description:`<strong>crops_coords_top_left</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (0, 0)) &#x2014;
<code>crops_coords_top_left</code> can be used to generate an image that appears to be &#x201C;cropped&#x201D; from the position
<code>crops_coords_top_left</code> downwards. Favorable, well-centered images are usually achieved by setting
<code>crops_coords_top_left</code> to (0, 0). Part of SDXL&#x2019;s micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"crops_coords_top_left"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.target_size",description:`<strong>target_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
For most cases, <code>target_size</code> should be set to the desired height and width of the generated image. If
not specified it will default to <code>(width, height)</code>. Part of SDXL&#x2019;s micro-conditioning as explained in
section 2.2 of <a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"target_size"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.negative_original_size",description:`<strong>negative_original_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
To negatively condition the generation process based on a specific image resolution. Part of SDXL&#x2019;s
micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_original_size"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.negative_crops_coords_top_left",description:`<strong>negative_crops_coords_top_left</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (0, 0)) &#x2014;
To negatively condition the generation process based on a specific crop coordinates. Part of SDXL&#x2019;s
micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_crops_coords_top_left"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.negative_target_size",description:`<strong>negative_target_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
To negatively condition the generation process based on a target image resolution. It should be as same
as the <code>target_size</code> for most cases. Part of SDXL&#x2019;s micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_target_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L762",returnDescription:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple</code>
containing the output images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),$=new fi({props:{anchor:"diffusers.StableDiffusionXLControlNetPipeline.__call__.example",$$slots:{default:[ui]},$$scope:{ctx:Bt}}}),Ue=new K({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionXLControlNetPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L206"}}),je=new K({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionXLControlNetPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L223"}}),Ee=new K({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionXLControlNetPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L230"}}),Le=new K({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionXLControlNetPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L198"}}),Xe=new K({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionXLControlNetPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L214"}}),Se=new K({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt",parameters:[{name:"prompt",val:": str"},{name:"prompt_2",val:": typing.Optional[str] = None"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": typing.Optional[str] = None"},{name:"negative_prompt_2",val:": typing.Optional[str] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to the <code>tokenizer_2</code> and <code>text_encoder_2</code>. If not defined, <code>prompt</code> is
used in both text-encoders
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in both text-encoders`,name:"negative_prompt_2"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLControlNetPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py#L263"}}),{c(){M=n("meta"),W=d(),J=n("h1"),T=n("a"),N=n("span"),h(g.$$.fragment),U=d(),mt=n("span"),Yo=i("ControlNet with Stable Diffusion XL"),Vt=d(),ee=n("p"),te=n("a"),$o=i("Adding Conditional Control to Text-to-Image Diffusion Models"),zo=i(" by Lvmin Zhang and Maneesh Agrawala."),Ft=d(),We=n("p"),Ro=i("Using a pretrained model, we can provide control images (for example, a depth map) to control Stable Diffusion text-to-image generation so that it follows the structure of the depth image and fills in the details."),Yt=d(),De=n("p"),Ao=i("The abstract from the paper is:"),$t=d(),Pe=n("p"),ft=n("em"),Qo=i("We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions. The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k). Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices. Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data. We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc. This may enrich the methods to control large diffusion models and further facilitate related applications."),zt=d(),D=n("p"),Ho=i("We provide support using ControlNets with "),Ge=n("a"),qo=i("Stable Diffusion XL"),Oo=i(" (SDXL)."),Rt=d(),P=n("p"),Ko=i("You can find numerous SDXL ControlNet checkpoints from "),oe=n("a"),en=i("this link"),tn=i(". There are some smaller ControlNet checkpoints too:"),At=d(),x=n("ul"),ut=n("li"),ne=n("a"),on=i("controlnet-canny-sdxl-1.0-small"),nn=d(),gt=n("li"),se=n("a"),sn=i("controlnet-canny-sdxl-1.0-mid"),an=d(),ht=n("li"),ae=n("a"),ln=i("controlnet-depth-sdxl-1.0-small"),rn=d(),_t=n("li"),ie=n("a"),pn=i("controlnet-depth-sdxl-1.0-mid"),Qt=d(),G=n("p"),dn=i("We also encourage you to train custom ControlNets; we provide a "),le=n("a"),cn=i("training script"),mn=i(" for this."),Ht=d(),Be=n("p"),fn=i("You can find some results below:"),qt=d(),re=n("img"),Ot=d(),Ve=n("p"),un=i("\u{1F6A8} At the time of this writing, many of these SDXL ControlNet checkpoints are experimental and there is a lot of room for improvement. We encourage our users to provide feedback. \u{1F6A8}"),Kt=d(),E=n("h2"),B=n("a"),bt=n("span"),h(pe.$$.fragment),gn=d(),yt=n("span"),hn=i("MultiControlNet"),eo=d(),V=n("p"),_n=i("You can compose multiple ControlNet conditionings from different image inputs to create a "),vt=n("em"),bn=i("MultiControlNet"),yn=i(". To get better results, it is often helpful to:"),to=d(),F=n("ol"),wt=n("li"),vn=i("mask conditionings such that they don\u2019t overlap (for example, mask the area of a canny image where the pose conditioning is located)"),wn=d(),de=n("li"),Mn=i("experiment with the "),ce=n("a"),Mt=n("code"),Tn=i("controlnet_conditioning_scale"),Jn=i(" parameter to determine how much weight to assign to each conditioning input"),oo=d(),Fe=n("p"),Cn=i("In this example, you\u2019ll combine a canny image and a human pose estimation image to generate a new image."),no=d(),Ye=n("p"),xn=i("Prepare the canny image conditioning:"),so=d(),h(me.$$.fragment),ao=d(),L=n("div"),fe=n("div"),$e=n("img"),Nn=d(),ze=n("figcaption"),Un=i("original image"),In=d(),ue=n("div"),Re=n("img"),jn=d(),Ae=n("figcaption"),Zn=i("canny image"),io=d(),Qe=n("p"),En=i("Prepare the human pose estimation conditioning:"),lo=d(),h(ge.$$.fragment),ro=d(),X=n("div"),he=n("div"),He=n("img"),Ln=d(),qe=n("figcaption"),Xn=i("original image"),Sn=d(),_e=n("div"),Oe=n("img"),kn=d(),Ke=n("figcaption"),Wn=i("human pose image"),po=d(),I=n("p"),Dn=i("Load a list of ControlNet models that correspond to each conditioning, and pass them to the "),et=n("a"),Pn=i("StableDiffusionXLControlNetPipeline"),Gn=i(". Use the faster "),tt=n("a"),Bn=i("UniPCMultistepScheduler"),Vn=i(" and nable model offloading to reduce memory usage."),co=d(),h(be.$$.fragment),mo=d(),ot=n("p"),Fn=i("Now you can pass your prompt (an optional negative prompt if you\u2019re using one), canny image, and pose image to the pipeline:"),fo=d(),h(ye.$$.fragment),uo=d(),ve=n("div"),nt=n("img"),go=d(),S=n("h2"),Y=n("a"),Tt=n("span"),h(we.$$.fragment),Yn=d(),Jt=n("span"),$n=i("StableDiffusionXLControlNetPipeline"),ho=d(),f=n("div"),h(Me.$$.fragment),zn=d(),Ct=n("p"),Rn=i("Pipeline for text-to-image generation using Stable Diffusion XL with ControlNet guidance."),An=d(),Te=n("p"),Qn=i("This model inherits from "),st=n("a"),Hn=i("DiffusionPipeline"),qn=i(`. 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.)`),On=d(),xt=n("p"),Kn=i("In addition the pipeline inherits the following loading methods:"),es=d(),k=n("ul"),Je=n("li"),Nt=n("em"),ts=i("Textual-Inversion"),os=i(": "),at=n("a"),ns=i("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),ss=d(),Ce=n("li"),Ut=n("em"),as=i("LoRA"),is=i(": "),it=n("a"),ls=i("loaders.LoraLoaderMixin.load_lora_weights()"),rs=d(),xe=n("li"),It=n("em"),ps=i("Ckpt"),ds=i(": "),lt=n("a"),cs=i("loaders.FromSingleFileMixin.from_single_file()"),ms=d(),j=n("div"),h(Ne.$$.fragment),fs=d(),jt=n("p"),us=i("Function invoked when calling the pipeline for generation."),gs=d(),h($.$$.fragment),hs=d(),z=n("div"),h(Ue.$$.fragment),_s=d(),Ie=n("p"),bs=i("Disable sliced VAE decoding. If "),Zt=n("code"),ys=i("enable_vae_slicing"),vs=i(` was previously enabled, this method will go back to
computing decoding in one step.`),ws=d(),R=n("div"),h(je.$$.fragment),Ms=d(),Ze=n("p"),Ts=i("Disable tiled VAE decoding. If "),Et=n("code"),Js=i("enable_vae_tiling"),Cs=i(` was previously enabled, this method will go back to
computing decoding in one step.`),xs=d(),A=n("div"),h(Ee.$$.fragment),Ns=d(),C=n("p"),Us=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Lt=n("code"),Is=i("enable_sequential_cpu_offload"),js=i(", this method moves one whole model at a time to the GPU when its "),Xt=n("code"),Zs=i("forward"),Es=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),St=n("code"),Ls=i("enable_sequential_cpu_offload"),Xs=i(", but performance is much better due to the iterative execution of the "),kt=n("code"),Ss=i("unet"),ks=i("."),Ws=d(),Q=n("div"),h(Le.$$.fragment),Ds=d(),Wt=n("p"),Ps=i(`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),Gs=d(),H=n("div"),h(Xe.$$.fragment),Bs=d(),Dt=n("p"),Vs=i(`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`),Fs=d(),q=n("div"),h(Se.$$.fragment),Ys=d(),Pt=n("p"),$s=i("Encodes the prompt into text encoder hidden states."),this.h()},l(e){const r=di('[data-svelte="svelte-1phssyn"]',document.head);M=s(r,"META",{name:!0,content:!0}),r.forEach(o),W=c(e),J=s(e,"H1",{class:!0});var ke=a(J);T=s(ke,"A",{id:!0,class:!0,href:!0});var ea=a(T);N=s(ea,"SPAN",{});var ta=a(N);_(g.$$.fragment,ta),ta.forEach(o),ea.forEach(o),U=c(ke),mt=s(ke,"SPAN",{});var oa=a(mt);Yo=l(oa,"ControlNet with Stable Diffusion XL"),oa.forEach(o),ke.forEach(o),Vt=c(e),ee=s(e,"P",{});var zs=a(ee);te=s(zs,"A",{href:!0,rel:!0});var na=a(te);$o=l(na,"Adding Conditional Control to Text-to-Image Diffusion Models"),na.forEach(o),zo=l(zs," by Lvmin Zhang and Maneesh Agrawala."),zs.forEach(o),Ft=c(e),We=s(e,"P",{});var sa=a(We);Ro=l(sa,"Using a pretrained model, we can provide control images (for example, a depth map) to control Stable Diffusion text-to-image generation so that it follows the structure of the depth image and fills in the details."),sa.forEach(o),Yt=c(e),De=s(e,"P",{});var aa=a(De);Ao=l(aa,"The abstract from the paper is:"),aa.forEach(o),$t=c(e),Pe=s(e,"P",{});var ia=a(Pe);ft=s(ia,"EM",{});var la=a(ft);Qo=l(la,"We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions. The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k). Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices. Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data. We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc. This may enrich the methods to control large diffusion models and further facilitate related applications."),la.forEach(o),ia.forEach(o),zt=c(e),D=s(e,"P",{});var bo=a(D);Ho=l(bo,"We provide support using ControlNets with "),Ge=s(bo,"A",{href:!0});var ra=a(Ge);qo=l(ra,"Stable Diffusion XL"),ra.forEach(o),Oo=l(bo," (SDXL)."),bo.forEach(o),Rt=c(e),P=s(e,"P",{});var yo=a(P);Ko=l(yo,"You can find numerous SDXL ControlNet checkpoints from "),oe=s(yo,"A",{href:!0,rel:!0});var pa=a(oe);en=l(pa,"this link"),pa.forEach(o),tn=l(yo,". There are some smaller ControlNet checkpoints too:"),yo.forEach(o),At=c(e),x=s(e,"UL",{});var O=a(x);ut=s(O,"LI",{});var da=a(ut);ne=s(da,"A",{href:!0,rel:!0});var ca=a(ne);on=l(ca,"controlnet-canny-sdxl-1.0-small"),ca.forEach(o),da.forEach(o),nn=c(O),gt=s(O,"LI",{});var ma=a(gt);se=s(ma,"A",{href:!0,rel:!0});var fa=a(se);sn=l(fa,"controlnet-canny-sdxl-1.0-mid"),fa.forEach(o),ma.forEach(o),an=c(O),ht=s(O,"LI",{});var ua=a(ht);ae=s(ua,"A",{href:!0,rel:!0});var ga=a(ae);ln=l(ga,"controlnet-depth-sdxl-1.0-small"),ga.forEach(o),ua.forEach(o),rn=c(O),_t=s(O,"LI",{});var ha=a(_t);ie=s(ha,"A",{href:!0,rel:!0});var _a=a(ie);pn=l(_a,"controlnet-depth-sdxl-1.0-mid"),_a.forEach(o),ha.forEach(o),O.forEach(o),Qt=c(e),G=s(e,"P",{});var vo=a(G);dn=l(vo,"We also encourage you to train custom ControlNets; we provide a "),le=s(vo,"A",{href:!0,rel:!0});var ba=a(le);cn=l(ba,"training script"),ba.forEach(o),mn=l(vo," for this."),vo.forEach(o),Ht=c(e),Be=s(e,"P",{});var ya=a(Be);fn=l(ya,"You can find some results below:"),ya.forEach(o),qt=c(e),re=s(e,"IMG",{src:!0,width:!0}),Ot=c(e),Ve=s(e,"P",{});var va=a(Ve);un=l(va,"\u{1F6A8} At the time of this writing, many of these SDXL ControlNet checkpoints are experimental and there is a lot of room for improvement. We encourage our users to provide feedback. \u{1F6A8}"),va.forEach(o),Kt=c(e),E=s(e,"H2",{class:!0});var wo=a(E);B=s(wo,"A",{id:!0,class:!0,href:!0});var wa=a(B);bt=s(wa,"SPAN",{});var Ma=a(bt);_(pe.$$.fragment,Ma),Ma.forEach(o),wa.forEach(o),gn=c(wo),yt=s(wo,"SPAN",{});var Ta=a(yt);hn=l(Ta,"MultiControlNet"),Ta.forEach(o),wo.forEach(o),eo=c(e),V=s(e,"P",{});var Mo=a(V);_n=l(Mo,"You can compose multiple ControlNet conditionings from different image inputs to create a "),vt=s(Mo,"EM",{});var Ja=a(vt);bn=l(Ja,"MultiControlNet"),Ja.forEach(o),yn=l(Mo,". To get better results, it is often helpful to:"),Mo.forEach(o),to=c(e),F=s(e,"OL",{});var To=a(F);wt=s(To,"LI",{});var Ca=a(wt);vn=l(Ca,"mask conditionings such that they don\u2019t overlap (for example, mask the area of a canny image where the pose conditioning is located)"),Ca.forEach(o),wn=c(To),de=s(To,"LI",{});var Jo=a(de);Mn=l(Jo,"experiment with the "),ce=s(Jo,"A",{href:!0,rel:!0});var xa=a(ce);Mt=s(xa,"CODE",{});var Na=a(Mt);Tn=l(Na,"controlnet_conditioning_scale"),Na.forEach(o),xa.forEach(o),Jn=l(Jo," parameter to determine how much weight to assign to each conditioning input"),Jo.forEach(o),To.forEach(o),oo=c(e),Fe=s(e,"P",{});var Ua=a(Fe);Cn=l(Ua,"In this example, you\u2019ll combine a canny image and a human pose estimation image to generate a new image."),Ua.forEach(o),no=c(e),Ye=s(e,"P",{});var Ia=a(Ye);xn=l(Ia,"Prepare the canny image conditioning:"),Ia.forEach(o),so=c(e),_(me.$$.fragment,e),ao=c(e),L=s(e,"DIV",{class:!0});var Co=a(L);fe=s(Co,"DIV",{});var xo=a(fe);$e=s(xo,"IMG",{class:!0,src:!0}),Nn=c(xo),ze=s(xo,"FIGCAPTION",{class:!0});var ja=a(ze);Un=l(ja,"original image"),ja.forEach(o),xo.forEach(o),In=c(Co),ue=s(Co,"DIV",{});var No=a(ue);Re=s(No,"IMG",{class:!0,src:!0}),jn=c(No),Ae=s(No,"FIGCAPTION",{class:!0});var Za=a(Ae);Zn=l(Za,"canny image"),Za.forEach(o),No.forEach(o),Co.forEach(o),io=c(e),Qe=s(e,"P",{});var Ea=a(Qe);En=l(Ea,"Prepare the human pose estimation conditioning:"),Ea.forEach(o),lo=c(e),_(ge.$$.fragment,e),ro=c(e),X=s(e,"DIV",{class:!0});var Uo=a(X);he=s(Uo,"DIV",{});var Io=a(he);He=s(Io,"IMG",{class:!0,src:!0}),Ln=c(Io),qe=s(Io,"FIGCAPTION",{class:!0});var La=a(qe);Xn=l(La,"original image"),La.forEach(o),Io.forEach(o),Sn=c(Uo),_e=s(Uo,"DIV",{});var jo=a(_e);Oe=s(jo,"IMG",{class:!0,src:!0}),kn=c(jo),Ke=s(jo,"FIGCAPTION",{class:!0});var Xa=a(Ke);Wn=l(Xa,"human pose image"),Xa.forEach(o),jo.forEach(o),Uo.forEach(o),po=c(e),I=s(e,"P",{});var rt=a(I);Dn=l(rt,"Load a list of ControlNet models that correspond to each conditioning, and pass them to the "),et=s(rt,"A",{href:!0});var Sa=a(et);Pn=l(Sa,"StableDiffusionXLControlNetPipeline"),Sa.forEach(o),Gn=l(rt,". Use the faster "),tt=s(rt,"A",{href:!0});var ka=a(tt);Bn=l(ka,"UniPCMultistepScheduler"),ka.forEach(o),Vn=l(rt," and nable model offloading to reduce memory usage."),rt.forEach(o),co=c(e),_(be.$$.fragment,e),mo=c(e),ot=s(e,"P",{});var Wa=a(ot);Fn=l(Wa,"Now you can pass your prompt (an optional negative prompt if you\u2019re using one), canny image, and pose image to the pipeline:"),Wa.forEach(o),fo=c(e),_(ye.$$.fragment,e),uo=c(e),ve=s(e,"DIV",{class:!0});var Da=a(ve);nt=s(Da,"IMG",{class:!0,src:!0}),Da.forEach(o),go=c(e),S=s(e,"H2",{class:!0});var Zo=a(S);Y=s(Zo,"A",{id:!0,class:!0,href:!0});var Pa=a(Y);Tt=s(Pa,"SPAN",{});var Ga=a(Tt);_(we.$$.fragment,Ga),Ga.forEach(o),Pa.forEach(o),Yn=c(Zo),Jt=s(Zo,"SPAN",{});var Ba=a(Jt);$n=l(Ba,"StableDiffusionXLControlNetPipeline"),Ba.forEach(o),Zo.forEach(o),ho=c(e),f=s(e,"DIV",{class:!0});var u=a(f);_(Me.$$.fragment,u),zn=c(u),Ct=s(u,"P",{});var Va=a(Ct);Rn=l(Va,"Pipeline for text-to-image generation using Stable Diffusion XL with ControlNet guidance."),Va.forEach(o),An=c(u),Te=s(u,"P",{});var Eo=a(Te);Qn=l(Eo,"This model inherits from "),st=s(Eo,"A",{href:!0});var Fa=a(st);Hn=l(Fa,"DiffusionPipeline"),Fa.forEach(o),qn=l(Eo,`. 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.forEach(o),On=c(u),xt=s(u,"P",{});var Ya=a(xt);Kn=l(Ya,"In addition the pipeline inherits the following loading methods:"),Ya.forEach(o),es=c(u),k=s(u,"UL",{});var pt=a(k);Je=s(pt,"LI",{});var Lo=a(Je);Nt=s(Lo,"EM",{});var $a=a(Nt);ts=l($a,"Textual-Inversion"),$a.forEach(o),os=l(Lo,": "),at=s(Lo,"A",{href:!0});var za=a(at);ns=l(za,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),za.forEach(o),Lo.forEach(o),ss=c(pt),Ce=s(pt,"LI",{});var Xo=a(Ce);Ut=s(Xo,"EM",{});var Ra=a(Ut);as=l(Ra,"LoRA"),Ra.forEach(o),is=l(Xo,": "),it=s(Xo,"A",{href:!0});var Aa=a(it);ls=l(Aa,"loaders.LoraLoaderMixin.load_lora_weights()"),Aa.forEach(o),Xo.forEach(o),rs=c(pt),xe=s(pt,"LI",{});var So=a(xe);It=s(So,"EM",{});var Qa=a(It);ps=l(Qa,"Ckpt"),Qa.forEach(o),ds=l(So,": "),lt=s(So,"A",{href:!0});var Ha=a(lt);cs=l(Ha,"loaders.FromSingleFileMixin.from_single_file()"),Ha.forEach(o),So.forEach(o),pt.forEach(o),ms=c(u),j=s(u,"DIV",{class:!0});var dt=a(j);_(Ne.$$.fragment,dt),fs=c(dt),jt=s(dt,"P",{});var qa=a(jt);us=l(qa,"Function invoked when calling the pipeline for generation."),qa.forEach(o),gs=c(dt),_($.$$.fragment,dt),dt.forEach(o),hs=c(u),z=s(u,"DIV",{class:!0});var ko=a(z);_(Ue.$$.fragment,ko),_s=c(ko),Ie=s(ko,"P",{});var Wo=a(Ie);bs=l(Wo,"Disable sliced VAE decoding. If "),Zt=s(Wo,"CODE",{});var Oa=a(Zt);ys=l(Oa,"enable_vae_slicing"),Oa.forEach(o),vs=l(Wo,` was previously enabled, this method will go back to
computing decoding in one step.`),Wo.forEach(o),ko.forEach(o),ws=c(u),R=s(u,"DIV",{class:!0});var Do=a(R);_(je.$$.fragment,Do),Ms=c(Do),Ze=s(Do,"P",{});var Po=a(Ze);Ts=l(Po,"Disable tiled VAE decoding. If "),Et=s(Po,"CODE",{});var Ka=a(Et);Js=l(Ka,"enable_vae_tiling"),Ka.forEach(o),Cs=l(Po,` was previously enabled, this method will go back to
computing decoding in one step.`),Po.forEach(o),Do.forEach(o),xs=c(u),A=s(u,"DIV",{class:!0});var Go=a(A);_(Ee.$$.fragment,Go),Ns=c(Go),C=s(Go,"P",{});var Z=a(C);Us=l(Z,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Lt=s(Z,"CODE",{});var ei=a(Lt);Is=l(ei,"enable_sequential_cpu_offload"),ei.forEach(o),js=l(Z,", this method moves one whole model at a time to the GPU when its "),Xt=s(Z,"CODE",{});var ti=a(Xt);Zs=l(ti,"forward"),ti.forEach(o),Es=l(Z,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),St=s(Z,"CODE",{});var oi=a(St);Ls=l(oi,"enable_sequential_cpu_offload"),oi.forEach(o),Xs=l(Z,", but performance is much better due to the iterative execution of the "),kt=s(Z,"CODE",{});var ni=a(kt);Ss=l(ni,"unet"),ni.forEach(o),ks=l(Z,"."),Z.forEach(o),Go.forEach(o),Ws=c(u),Q=s(u,"DIV",{class:!0});var Bo=a(Q);_(Le.$$.fragment,Bo),Ds=c(Bo),Wt=s(Bo,"P",{});var si=a(Wt);Ps=l(si,`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),si.forEach(o),Bo.forEach(o),Gs=c(u),H=s(u,"DIV",{class:!0});var Vo=a(H);_(Xe.$$.fragment,Vo),Bs=c(Vo),Dt=s(Vo,"P",{});var ai=a(Dt);Vs=l(ai,`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`),ai.forEach(o),Vo.forEach(o),Fs=c(u),q=s(u,"DIV",{class:!0});var Fo=a(q);_(Se.$$.fragment,Fo),Ys=c(Fo),Pt=s(Fo,"P",{});var ii=a(Pt);$s=l(ii,"Encodes the prompt into text encoder hidden states."),ii.forEach(o),Fo.forEach(o),u.forEach(o),this.h()},h(){p(M,"name","hf:doc:metadata"),p(M,"content",JSON.stringify(hi)),p(T,"id","controlnet-with-stable-diffusion-xl"),p(T,"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(T,"href","#controlnet-with-stable-diffusion-xl"),p(J,"class","relative group"),p(te,"href","https://huggingface.co/papers/2302.05543"),p(te,"rel","nofollow"),p(Ge,"href","./stable_diffusion/stable_diffusion_xl.md"),p(oe,"href","https://huggingface.co/models?other=stable-diffusion-xl&other=controlnet"),p(oe,"rel","nofollow"),p(ne,"href","https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0-small"),p(ne,"rel","nofollow"),p(se,"href","https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0-mid"),p(se,"rel","nofollow"),p(ae,"href","https://huggingface.co/diffusers/controlnet-depth-sdxl-1.0-small"),p(ae,"rel","nofollow"),p(ie,"href","https://huggingface.co/diffusers/controlnet-depth-sdxl-1.0-mid"),p(ie,"rel","nofollow"),p(le,"href","https://github.com/huggingface/diffusers/blob/main/examples/controlnet/README_sdxl.md"),p(le,"rel","nofollow"),ct(re.src,As="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/sd_xl/sdxl_controlnet_canny_grid.png")||p(re,"src",As),p(re,"width","600"),p(B,"id","multicontrolnet"),p(B,"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(B,"href","#multicontrolnet"),p(E,"class","relative group"),p(ce,"href","https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline.__call__.controlnet_conditioning_scale"),p(ce,"rel","nofollow"),p($e,"class","rounded-xl"),ct($e.src,Qs="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/landscape.png")||p($e,"src",Qs),p(ze,"class","mt-2 text-center text-sm text-gray-500"),p(Re,"class","rounded-xl"),ct(Re.src,Hs="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/controlnet/landscape_canny_masked.png")||p(Re,"src",Hs),p(Ae,"class","mt-2 text-center text-sm text-gray-500"),p(L,"class","flex gap-4"),p(He,"class","rounded-xl"),ct(He.src,qs="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png")||p(He,"src",qs),p(qe,"class","mt-2 text-center text-sm text-gray-500"),p(Oe,"class","rounded-xl"),ct(Oe.src,Os="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/controlnet/person_pose.png")||p(Oe,"src",Os),p(Ke,"class","mt-2 text-center text-sm text-gray-500"),p(X,"class","flex gap-4"),p(et,"href","/docs/diffusers/main/en/api/pipelines/controlnet_sdxl#diffusers.StableDiffusionXLControlNetPipeline"),p(tt,"href","/docs/diffusers/main/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler"),p(nt,"class","rounded-xl"),ct(nt.src,Ks="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/multicontrolnet.png")||p(nt,"src",Ks),p(ve,"class","flex justify-center"),p(Y,"id","diffusers.StableDiffusionXLControlNetPipeline"),p(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Y,"href","#diffusers.StableDiffusionXLControlNetPipeline"),p(S,"class","relative group"),p(st,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(at,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),p(it,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),p(lt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),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(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){t(document.head,M),m(e,W,r),m(e,J,r),t(J,T),t(T,N),b(g,N,null),t(J,U),t(J,mt),t(mt,Yo),m(e,Vt,r),m(e,ee,r),t(ee,te),t(te,$o),t(ee,zo),m(e,Ft,r),m(e,We,r),t(We,Ro),m(e,Yt,r),m(e,De,r),t(De,Ao),m(e,$t,r),m(e,Pe,r),t(Pe,ft),t(ft,Qo),m(e,zt,r),m(e,D,r),t(D,Ho),t(D,Ge),t(Ge,qo),t(D,Oo),m(e,Rt,r),m(e,P,r),t(P,Ko),t(P,oe),t(oe,en),t(P,tn),m(e,At,r),m(e,x,r),t(x,ut),t(ut,ne),t(ne,on),t(x,nn),t(x,gt),t(gt,se),t(se,sn),t(x,an),t(x,ht),t(ht,ae),t(ae,ln),t(x,rn),t(x,_t),t(_t,ie),t(ie,pn),m(e,Qt,r),m(e,G,r),t(G,dn),t(G,le),t(le,cn),t(G,mn),m(e,Ht,r),m(e,Be,r),t(Be,fn),m(e,qt,r),m(e,re,r),m(e,Ot,r),m(e,Ve,r),t(Ve,un),m(e,Kt,r),m(e,E,r),t(E,B),t(B,bt),b(pe,bt,null),t(E,gn),t(E,yt),t(yt,hn),m(e,eo,r),m(e,V,r),t(V,_n),t(V,vt),t(vt,bn),t(V,yn),m(e,to,r),m(e,F,r),t(F,wt),t(wt,vn),t(F,wn),t(F,de),t(de,Mn),t(de,ce),t(ce,Mt),t(Mt,Tn),t(de,Jn),m(e,oo,r),m(e,Fe,r),t(Fe,Cn),m(e,no,r),m(e,Ye,r),t(Ye,xn),m(e,so,r),b(me,e,r),m(e,ao,r),m(e,L,r),t(L,fe),t(fe,$e),t(fe,Nn),t(fe,ze),t(ze,Un),t(L,In),t(L,ue),t(ue,Re),t(ue,jn),t(ue,Ae),t(Ae,Zn),m(e,io,r),m(e,Qe,r),t(Qe,En),m(e,lo,r),b(ge,e,r),m(e,ro,r),m(e,X,r),t(X,he),t(he,He),t(he,Ln),t(he,qe),t(qe,Xn),t(X,Sn),t(X,_e),t(_e,Oe),t(_e,kn),t(_e,Ke),t(Ke,Wn),m(e,po,r),m(e,I,r),t(I,Dn),t(I,et),t(et,Pn),t(I,Gn),t(I,tt),t(tt,Bn),t(I,Vn),m(e,co,r),b(be,e,r),m(e,mo,r),m(e,ot,r),t(ot,Fn),m(e,fo,r),b(ye,e,r),m(e,uo,r),m(e,ve,r),t(ve,nt),m(e,go,r),m(e,S,r),t(S,Y),t(Y,Tt),b(we,Tt,null),t(S,Yn),t(S,Jt),t(Jt,$n),m(e,ho,r),m(e,f,r),b(Me,f,null),t(f,zn),t(f,Ct),t(Ct,Rn),t(f,An),t(f,Te),t(Te,Qn),t(Te,st),t(st,Hn),t(Te,qn),t(f,On),t(f,xt),t(xt,Kn),t(f,es),t(f,k),t(k,Je),t(Je,Nt),t(Nt,ts),t(Je,os),t(Je,at),t(at,ns),t(k,ss),t(k,Ce),t(Ce,Ut),t(Ut,as),t(Ce,is),t(Ce,it),t(it,ls),t(k,rs),t(k,xe),t(xe,It),t(It,ps),t(xe,ds),t(xe,lt),t(lt,cs),t(f,ms),t(f,j),b(Ne,j,null),t(j,fs),t(j,jt),t(jt,us),t(j,gs),b($,j,null),t(f,hs),t(f,z),b(Ue,z,null),t(z,_s),t(z,Ie),t(Ie,bs),t(Ie,Zt),t(Zt,ys),t(Ie,vs),t(f,ws),t(f,R),b(je,R,null),t(R,Ms),t(R,Ze),t(Ze,Ts),t(Ze,Et),t(Et,Js),t(Ze,Cs),t(f,xs),t(f,A),b(Ee,A,null),t(A,Ns),t(A,C),t(C,Us),t(C,Lt),t(Lt,Is),t(C,js),t(C,Xt),t(Xt,Zs),t(C,Es),t(C,St),t(St,Ls),t(C,Xs),t(C,kt),t(kt,Ss),t(C,ks),t(f,Ws),t(f,Q),b(Le,Q,null),t(Q,Ds),t(Q,Wt),t(Wt,Ps),t(f,Gs),t(f,H),b(Xe,H,null),t(H,Bs),t(H,Dt),t(Dt,Vs),t(f,Fs),t(f,q),b(Se,q,null),t(q,Ys),t(q,Pt),t(Pt,$s),_o=!0},p(e,[r]){const ke={};r&2&&(ke.$$scope={dirty:r,ctx:e}),$.$set(ke)},i(e){_o||(y(g.$$.fragment,e),y(pe.$$.fragment,e),y(me.$$.fragment,e),y(ge.$$.fragment,e),y(be.$$.fragment,e),y(ye.$$.fragment,e),y(we.$$.fragment,e),y(Me.$$.fragment,e),y(Ne.$$.fragment,e),y($.$$.fragment,e),y(Ue.$$.fragment,e),y(je.$$.fragment,e),y(Ee.$$.fragment,e),y(Le.$$.fragment,e),y(Xe.$$.fragment,e),y(Se.$$.fragment,e),_o=!0)},o(e){v(g.$$.fragment,e),v(pe.$$.fragment,e),v(me.$$.fragment,e),v(ge.$$.fragment,e),v(be.$$.fragment,e),v(ye.$$.fragment,e),v(we.$$.fragment,e),v(Me.$$.fragment,e),v(Ne.$$.fragment,e),v($.$$.fragment,e),v(Ue.$$.fragment,e),v(je.$$.fragment,e),v(Ee.$$.fragment,e),v(Le.$$.fragment,e),v(Xe.$$.fragment,e),v(Se.$$.fragment,e),_o=!1},d(e){o(M),e&&o(W),e&&o(J),w(g),e&&o(Vt),e&&o(ee),e&&o(Ft),e&&o(We),e&&o(Yt),e&&o(De),e&&o($t),e&&o(Pe),e&&o(zt),e&&o(D),e&&o(Rt),e&&o(P),e&&o(At),e&&o(x),e&&o(Qt),e&&o(G),e&&o(Ht),e&&o(Be),e&&o(qt),e&&o(re),e&&o(Ot),e&&o(Ve),e&&o(Kt),e&&o(E),w(pe),e&&o(eo),e&&o(V),e&&o(to),e&&o(F),e&&o(oo),e&&o(Fe),e&&o(no),e&&o(Ye),e&&o(so),w(me,e),e&&o(ao),e&&o(L),e&&o(io),e&&o(Qe),e&&o(lo),w(ge,e),e&&o(ro),e&&o(X),e&&o(po),e&&o(I),e&&o(co),w(be,e),e&&o(mo),e&&o(ot),e&&o(fo),w(ye,e),e&&o(uo),e&&o(ve),e&&o(go),e&&o(S),w(we),e&&o(ho),e&&o(f),w(Me),w(Ne),w($),w(Ue),w(je),w(Ee),w(Le),w(Xe),w(Se)}}}const hi={local:"controlnet-with-stable-diffusion-xl",sections:[{local:"multicontrolnet",title:"MultiControlNet"},{local:"diffusers.StableDiffusionXLControlNetPipeline",title:"StableDiffusionXLControlNetPipeline"}],title:"ControlNet with Stable Diffusion XL"};function _i(Bt){return ci(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ti extends li{constructor(M){super();ri(this,M,_i,gi,pi,{})}}export{Ti as default,hi as metadata};
