import{S as IC,i as UC,s as EC,e as o,k as c,w as b,t as i,M as jC,c as a,d as t,m as d,a as s,x as v,h as r,b as l,N as U,f as G,G as e,g as u,y,q as w,o as M,B as T,v as ZC,L as Q}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Jl}from"../../../chunks/Tip-hf-doc-builder.js";import{D as Z}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as S}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as F}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Y}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function CC(E){let f,I,_,h,J;return h=new S({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjBvcGVuY3YtcHl0aG9uJTIwdHJhbnNmb3JtZXJzJTIwYWNjZWxlcmF0ZSUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25Db250cm9sTmV0UGlwZWxpbmUlMkMlMjBDb250cm9sTmV0TW9kZWwlMkMlMjBVbmlQQ011bHRpc3RlcFNjaGVkdWxlciUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEElMEFpbXBvcnQlMjBjdjIlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEElMEElMjMlMjBkb3dubG9hZCUyMGFuJTIwaW1hZ2UlMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZoZi5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGaW5wdXRfaW1hZ2VfdmVybWVlci5wbmclMjIlMEEpJTBBaW1hZ2UlM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VbmlQQ011bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWcpJTBBJTIzJTIwcmVtb3ZlJTIwZm9sbG93aW5nJTIwbGluZSUyMGlmJTIweGZvcm1lcnMlMjBpcyUyMG5vdCUyMGluc3RhbGxlZCUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKCklMEElMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBJTIzJTIwZ2VuZXJhdGUlMjBpbWFnZSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLm1hbnVhbF9zZWVkKDApJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCUyMmZ1dHVyaXN0aWMtbG9va2luZyUyMHdvbWFuJTIyJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwaW1hZ2UlM0RjYW5ueV9pbWFnZSUwQSkuaW1hZ2VzJTVCMCU1RA==",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> StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
<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><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/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = np.array(image)

<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 = 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"># load control net and stable diffusion v1-5</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionControlNetPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># speed up diffusion process with faster scheduler and memory optimization</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># remove following line if xformers is not installed</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention()

<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"># generate image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;futuristic-looking woman&quot;</span>, num_inference_steps=<span class="hljs-number">20</span>, generator=generator, image=canny_image
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function $C(E){let f,I,_,h,J;return{c(){f=o("p"),I=i("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=o("code"),h=i("scaled_dot_product_attention"),J=i(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=a(g,"CODE",{});var P=s(_);h=r(P,"scaled_dot_product_attention"),P.forEach(t),J=r(g,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),g.forEach(t)},m(p,g){u(p,f,g),e(f,I),e(f,_),e(_,h),e(f,J)},d(p){p&&t(f)}}}function NC(E){let f,I,_,h,J;return h=new S({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function xC(E){let f,I;return{c(){f=o("p"),I=i(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(_){f=a(_,"P",{});var h=s(f);I=r(h,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),h.forEach(t)},m(_,h){u(_,f,h),e(f,I)},d(_){_&&t(f)}}}function kC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function WC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function GC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("locally:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"locally:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function DC(E){let f,I,_,h,J;return h=new S({props:{code:"JTIzJTIwIXBpcCUyMGluc3RhbGwlMjBvcGVuY3YtcHl0aG9uJTIwdHJhbnNmb3JtZXJzJTIwYWNjZWxlcmF0ZSUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25Db250cm9sTmV0SW1nMkltZ1BpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJ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faW1hZ2UlM0RjYW5ueV9pbWFnZSUyQyUwQSkuaW1hZ2VzJTVCMCU1RA==",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> StableDiffusionControlNetImg2ImgPipeline, ControlNetModel, UniPCMultistepScheduler
<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><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/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>np_image = np.array(image)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load control net and stable diffusion v1-5</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># speed up diffusion process with faster scheduler and memory optimization</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
<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"># generate image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;futuristic-looking woman&quot;</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>    image=image,
<span class="hljs-meta">... </span>    control_image=canny_image,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function SC(E){let f,I,_,h,J;return{c(){f=o("p"),I=i("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=o("code"),h=i("scaled_dot_product_attention"),J=i(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=a(g,"CODE",{});var P=s(_);h=r(P,"scaled_dot_product_attention"),P.forEach(t),J=r(g,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),g.forEach(t)},m(p,g){u(p,f,g),e(f,I),e(f,_),e(_,h),e(f,J)},d(p){p&&t(f)}}}function BC(E){let f,I,_,h,J;return h=new S({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function PC(E){let f,I;return{c(){f=o("p"),I=i(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(_){f=a(_,"P",{});var h=s(f);I=r(h,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),h.forEach(t)},m(_,h){u(_,f,h),e(f,I)},d(_){_&&t(f)}}}function FC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function RC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function VC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("locally:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"locally:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function XC(E){let f,I,_,h,J,p,g,P,Ie,Et,Ue;return{c(){f=o("p"),I=i(`This pipeline can be used both with checkpoints that have been specifically fine-tuned for inpainting, such as
`),_=o("a"),h=i("runwayml/stable-diffusion-inpainting"),J=i(`
as well as default text-to-image stable diffusion checkpoints, such as
`),p=o("a"),g=i("runwayml/stable-diffusion-v1-5"),P=i(`.
Default text-to-image stable diffusion checkpoints might be preferable for controlnets that have been fine-tuned on
those, such as `),Ie=o("a"),Et=i("lllyasviel/control_v11p_sd15_inpaint"),Ue=i("."),this.h()},l(z){f=a(z,"P",{});var L=s(f);I=r(L,`This pipeline can be used both with checkpoints that have been specifically fine-tuned for inpainting, such as
`),_=a(L,"A",{href:!0,rel:!0});var Il=s(_);h=r(Il,"runwayml/stable-diffusion-inpainting"),Il.forEach(t),J=r(L,`
as well as default text-to-image stable diffusion checkpoints, such as
`),p=a(L,"A",{href:!0,rel:!0});var Wo=s(p);g=r(Wo,"runwayml/stable-diffusion-v1-5"),Wo.forEach(t),P=r(L,`.
Default text-to-image stable diffusion checkpoints might be preferable for controlnets that have been fine-tuned on
those, such as `),Ie=a(L,"A",{href:!0,rel:!0});var rt=s(Ie);Et=r(rt,"lllyasviel/control_v11p_sd15_inpaint"),rt.forEach(t),Ue=r(L,"."),L.forEach(t),this.h()},h(){l(_,"href","https://huggingface.co/runwayml/stable-diffusion-inpainting"),l(_,"rel","nofollow"),l(p,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),l(p,"rel","nofollow"),l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ZXJhdG9yJTJDJTBBJTIwJTIwJTIwJTIwZXRhJTNEMS4wJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0Rpbml0X2ltYWdlJTJDJTBBJTIwJTIwJTIwJTIwbWFza19pbWFnZSUzRG1hc2tfaW1hZ2UlMkMlMEElMjAlMjAlMjAlMjBjb250cm9sX2ltYWdlJTNEY29udHJvbF9pbWFnZSUyQyUwQSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># !pip install transformers accelerate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetInpaintPipeline, ControlNetModel, DDIMScheduler
<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>init_image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_inpaint/boy.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = init_image.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_inpaint/boy_mask.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = mask_image.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">make_inpaint_condition</span>(<span class="hljs-params">image, image_mask</span>):
<span class="hljs-meta">... </span>    image = np.array(image.convert(<span class="hljs-string">&quot;RGB&quot;</span>)).astype(np.float32) / <span class="hljs-number">255.0</span>
<span class="hljs-meta">... </span>    image_mask = np.array(image_mask.convert(<span class="hljs-string">&quot;L&quot;</span>)).astype(np.float32) / <span class="hljs-number">255.0</span>

<span class="hljs-meta">... </span>    <span class="hljs-keyword">assert</span> image.shape[<span class="hljs-number">0</span>:<span class="hljs-number">1</span>] == image_mask.shape[<span class="hljs-number">0</span>:<span class="hljs-number">1</span>], <span class="hljs-string">&quot;image and image_mask must have the same image size&quot;</span>
<span class="hljs-meta">... </span>    image[image_mask &gt; <span class="hljs-number">0.5</span>] = -<span class="hljs-number">1.0</span>  <span class="hljs-comment"># set as masked pixel</span>
<span class="hljs-meta">... </span>    image = np.expand_dims(image, <span class="hljs-number">0</span>).transpose(<span class="hljs-number">0</span>, <span class="hljs-number">3</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>)
<span class="hljs-meta">... </span>    image = torch.from_numpy(image)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> image


<span class="hljs-meta">&gt;&gt;&gt; </span>control_image = make_inpaint_condition(init_image, mask_image)

<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet = ControlNetModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lllyasviel/control_v11p_sd15_inpaint&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
<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"># generate image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;a handsome man with ray-ban sunglasses&quot;</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>    eta=<span class="hljs-number">1.0</span>,
<span class="hljs-meta">... </span>    image=init_image,
<span class="hljs-meta">... </span>    mask_image=mask_image,
<span class="hljs-meta">... </span>    control_image=control_image,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function YC(E){let f,I,_,h,J;return{c(){f=o("p"),I=i("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=o("code"),h=i("scaled_dot_product_attention"),J=i(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),_=a(g,"CODE",{});var P=s(_);h=r(P,"scaled_dot_product_attention"),P.forEach(t),J=r(g,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),g.forEach(t)},m(p,g){u(p,f,g),e(f,I),e(f,_),e(_,h),e(f,J)},d(p){p&&t(f)}}}function QC(E){let f,I,_,h,J;return h=new S({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function LC(E){let f,I;return{c(){f=o("p"),I=i(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(_){f=a(_,"P",{});var h=s(f);I=r(h,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),h.forEach(t)},m(_,h){u(_,f,h),e(f,I)},d(_){_&&t(f)}}}function zC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function HC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function qC(E){let f,I,_,h,J;return h=new S({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(){f=o("p"),I=i("locally:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"locally:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function OC(E){let f,I,_,h,J;return h=new S({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJ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kKG91dHB1dF9pbWFnZXMlMkMlMjBudW1fc2FtcGxlcyUyMCUyRiUyRiUyMDQlMkMlMjA0KSUwQW91dHB1dF9pbWFnZXMuc2F2ZSglMjJnZW5lcmF0ZWRfaW1hZ2UucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax
<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> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax.jax_utils <span class="hljs-keyword">import</span> replicate
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax.training.common_utils <span class="hljs-keyword">import</span> shard
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, make_image_grid
<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> FlaxStableDiffusionControlNetPipeline, FlaxControlNetModel


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">create_key</span>(<span class="hljs-params">seed=<span class="hljs-number">0</span></span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> jax.random.PRNGKey(seed)


<span class="hljs-meta">&gt;&gt;&gt; </span>rng = create_key(<span class="hljs-number">0</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># get canny image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>canny_image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/YiYiXu/test-doc-assets/resolve/main/blog_post_cell_10_output_0.jpeg&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompts = <span class="hljs-string">&quot;best quality, extremely detailed&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompts = <span class="hljs-string">&quot;monochrome, lowres, bad anatomy, worst quality, low quality&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load control net and stable diffusion v1-5</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>controlnet, controlnet_params = FlaxControlNetModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, from_pt=<span class="hljs-literal">True</span>, dtype=jnp.float32
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, revision=<span class="hljs-string">&quot;flax&quot;</span>, dtype=jnp.float32
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>params[<span class="hljs-string">&quot;controlnet&quot;</span>] = controlnet_params

<span class="hljs-meta">&gt;&gt;&gt; </span>num_samples = jax.device_count()
<span class="hljs-meta">&gt;&gt;&gt; </span>rng = jax.random.split(rng, jax.device_count())

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_ids = pipe.prepare_text_inputs([prompts] * num_samples)
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt_ids = pipe.prepare_text_inputs([negative_prompts] * num_samples)
<span class="hljs-meta">&gt;&gt;&gt; </span>processed_image = pipe.prepare_image_inputs([canny_image] * num_samples)

<span class="hljs-meta">&gt;&gt;&gt; </span>p_params = replicate(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_ids = shard(prompt_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt_ids = shard(negative_prompt_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>processed_image = shard(processed_image)

<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    prompt_ids=prompt_ids,
<span class="hljs-meta">... </span>    image=processed_image,
<span class="hljs-meta">... </span>    params=p_params,
<span class="hljs-meta">... </span>    prng_seed=rng,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    neg_prompt_ids=negative_prompt_ids,
<span class="hljs-meta">... </span>    jit=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>).images

<span class="hljs-meta">&gt;&gt;&gt; </span>output_images = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-<span class="hljs-number">3</span>:])))
<span class="hljs-meta">&gt;&gt;&gt; </span>output_images = make_image_grid(output_images, num_samples // <span class="hljs-number">4</span>, <span class="hljs-number">4</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>output_images.save(<span class="hljs-string">&quot;generated_image.png&quot;</span>)`}}),{c(){f=o("p"),I=i("Examples:"),_=c(),b(h.$$.fragment)},l(p){f=a(p,"P",{});var g=s(f);I=r(g,"Examples:"),g.forEach(t),_=d(p),v(h.$$.fragment,p)},m(p,g){u(p,f,g),e(f,I),u(p,_,g),y(h,p,g),J=!0},p:Q,i(p){J||(w(h.$$.fragment,p),J=!0)},o(p){M(h.$$.fragment,p),J=!1},d(p){p&&t(f),p&&t(_),T(h,p)}}}function KC(E){let f,I,_,h,J,p,g,P,Ie,Et,Ue,z,L,Il,Wo,rt,mg,bf,Ul,fg,vf,El,oc,ug,yf,jt,hg,Go,gg,_g,wf,Zt,bg,Do,vg,yg,Mf,ct,Ct,ac,So,wg,sc,Mg,Tf,$t,Tg,lc,Jg,Ig,Jf,Nt,ic,rc,cc,Ug,Eg,dc,jl,Bo,jg,Zl,Zg,Cg,If,xt,$g,Po,Ng,xg,Uf,Fo,Ef,Cl,$l,bJ,jf,Ge,kg,pc,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DT,ST,Bm,BT,PT,Pm,FT,RT,VT,ho,fl,XT,Fm,AT,Gu,Ut,go,Rm,ul,YT,Vm,QT,Du,ue,hl,LT,Xm,zT,HT,gl,qT,Qr,OT,KT,eJ,Ve,_l,tJ,Am,nJ,oJ,_o,Su;return p=new F({}),So=new F({}),Fo=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBJTIzJTIwTGV0J3MlMjBsb2FkJTIwdGhlJTIwcG9wdWxhciUyMHZlcm1lZXIlMjBpbWFnZSUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmhmLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZpbnB1dF9pbWFnZV92ZXJtZWVyLnBuZyUyMiUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

<span class="hljs-comment"># Let&#x27;s load the popular vermeer image</span>
image = load_image(
    <span class="hljs-string">&quot;https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png&quot;</span>
)`}}),Ro=new S({props:{code:"cGlwJTIwaW5zdGFsbCUyMG9wZW5jdi1jb250cmliLXB5dGhvbg==",highlighted:'pip <span class="hljs-keyword">install</span> opencv-contrib-python'}}),Vo=new S({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRpZmZ1c2VycyUyMHRyYW5zZm9ybWVycyUyMGdpdCUyQmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmh1Z2dpbmdmYWNlJTJGYWNjZWxlcmF0ZS5naXQ=",highlighted:'pip install diffusers transformers git+https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/huggingface/</span>accelerate.git'}}),Xo=new S({props:{code:"aW1wb3J0JTIwY3YyJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBaW1hZ2UlMjAlM0QlMjBucC5hcnJheShpbWFnZSklMEElMEFsb3dfdGhyZXNob2xkJTIwJTNEJTIwMTAwJTBBaGlnaF90aHJlc2hvbGQlMjAlM0QlMjAyMDAlMEElMEFpbWFnZSUyMCUzRCUyMGN2Mi5DYW5ueShpbWFnZSUyQyUyMGxvd190aHJlc2hvbGQlMkMlMjBoaWdoX3RocmVzaG9sZCklMEFpbWFnZSUyMCUzRCUyMGltYWdlJTVCJTNBJTJDJTIwJTNBJTJDJTIwTm9uZSU1RCUwQWltYWdlJTIwJTNEJTIwbnAuY29uY2F0ZW5hdGUoJTVCaW1hZ2UlMkMlMjBpbWFnZSUyQyUyMGltYWdlJTVEJTJDJTIwYXhpcyUzRDIpJTBBY2FubnlfaW1hZ2UlMjAlM0QlMjBJbWFnZS5mcm9tYXJyYXkoaW1hZ2Up",highlighted:`<span class="hljs-keyword">import</span> cv2
<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

image = np.array(image)

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

image = cv2.Canny(image, low_threshold, high_threshold)
image = image[:, :, <span class="hljs-literal">None</span>]
image = np.concatenate([image, image, image], axis=<span class="hljs-number">2</span>)
canny_image = Image.fromarray(image)`}}),Ao=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBY29udHJvbG5ldCUyMCUzRCUyMENvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGxseWFzdmllbCUyRnNkLWNvbnRyb2xuZXQtY2FubnklMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjBjb250cm9sbmV0JTNEY29udHJvbG5ldCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel
<span class="hljs-keyword">import</span> torch

controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, torch_dtype=torch.float16
)`}}),Yo=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBVbmlQQ011bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWcpJTBBJTBBJTIzJTIwdGhpcyUyMGNvbW1hbmQlMjBsb2FkcyUyMHRoZSUyMGluZGl2aWR1YWwlMjBtb2RlbCUyMGNvbXBvbmVudHMlMjBvbiUyMEdQVSUyMG9uLWRlbWFuZC4lMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniPCMultistepScheduler

pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)

<span class="hljs-comment"># this command loads the individual model components on GPU on-demand.</span>
pipe.enable_model_cpu_offload()`}}),Qo=new S({props:{code:"Z2VuZXJhdG9yJTIwJTNEJTIwdG9yY2gubWFudWFsX3NlZWQoMCklMEElMEFvdXRfaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCUyMmRpc2NvJTIwZGFuY2VyJTIwd2l0aCUyMGNvbG9yZnVsJTIwbGlnaHRzJTIyJTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDIwJTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwaW1hZ2UlM0RjYW5ueV9pbWFnZSUwQSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`generator = torch.manual_seed(<span class="hljs-number">0</span>)

out_image = pipe(
    <span class="hljs-string">&quot;disco dancer with colorful lights&quot;</span>, num_inference_steps=<span class="hljs-number">20</span>, generator=generator, image=canny_image
).images[<span class="hljs-number">0</span>]`}}),Lo=new F({}),zo=new F({}),Ho=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjBjdjIlMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWNhbm55X2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldH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YWdlKQ==",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> cv2
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

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)`}}),qo=new F({}),Ko=new S({props:{code:"ZnJvbSUyMGNvbnRyb2xuZXRfYXV4JTIwaW1wb3J0JTIwT3BlbnBvc2VEZXRlY3RvciUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBb3BlbnBvc2UlMjAlM0QlMjBPcGVucG9zZURldGVjdG9yLmZyb21fcHJldHJhaW5lZCglMjJsbGx5YXN2aWVsJTJGQ29udHJvbE5ldCUyMiklMEElMEFvcGVucG9zZV9pbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGcGVyc29uLnBuZyUyMiUwQSklMEFvcGVucG9zZV9pbWFnZSUyMCUzRCUyMG9wZW5wb3NlKG9wZW5wb3NlX2ltYWdlKQ==",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)`}}),ta=new F({}),na=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUyQyUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTBBaW1wb3J0JTIwdG9yY2glMEElMEFjb250cm9sbmV0JTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwQ29udHJvbE5ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJsbGx5YXN2aWVsJTJGc2QtY29udHJvbG5ldC1vcGVucG9zZSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMkMlMEElMjAlMjAlMjAlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmxsbHlhc3ZpZWwlMkZzZC1jb250cm9sbmV0LWNhbm55JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUyQyUwQSU1RCUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25Db250cm9sTmV0UGlwZWxpbmUuZnJvbV9wcmV0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mF0b3IlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBjb250cm9sbmV0X2NvbmRpdGlvbmluZ19zY2FsZSUzRCU1QjEuMCUyQyUyMDAuOCU1RCUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQSUwQWltYWdlLnNhdmUoJTIyLiUyRm11bHRpX2NvbnRyb2xuZXRfb3V0cHV0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
<span class="hljs-keyword">import</span> torch

controlnet = [
    ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-openpose&quot;</span>, torch_dtype=torch.float16),
    ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, torch_dtype=torch.float16),
]

pipe = StableDiffusionControlNetPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet, torch_dtype=torch.float16
)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)

pipe.enable_xformers_memory_efficient_attention()
pipe.enable_model_cpu_offload()

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.Generator(device=<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">1</span>)

images = [openpose_image, canny_image]

image = pipe(
    prompt,
    images,
    num_inference_steps=<span class="hljs-number">20</span>,
    generator=generator,
    negative_prompt=negative_prompt,
    controlnet_conditioning_scale=[<span class="hljs-number">1.0</span>, <span class="hljs-number">0.8</span>],
).images[<span class="hljs-number">0</span>]

image.save(<span class="hljs-string">&quot;./multi_controlnet_output.png&quot;</span>)`}}),aa=new F({}),ia=new F({}),ra=new F({}),da=new S({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZSUyQyUyMENvbnRyb2xOZXRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBY29udHJvbG5ldCUyMCUzRCUyMENvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGxseWFzdmllbCUyRnNkLWNvbnRyb2xuZXQtY2FubnklMjIpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIlMkMlMjBjb250cm9sbmV0JTNEY29udHJvbG5ldCkudG8oJTBBJTIwJTIwJTIwJTIwJTIyY3VkYSUyMiUwQSklMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTIyJTIyJTJDJTIwaW1hZ2UlM0RjYW5ueV9pbWFnZSUyQyUyMGd1ZXNzX21vZGUlM0RUcnVlJTJDJTIwZ3VpZGFuY2Vfc2NhbGUlM0QzLjApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmd1ZXNzX21vZGVfZ2VuZXJhdGVkLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel
<span class="hljs-keyword">import</span> torch

controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>)
pipe = StableDiffusionControlNetPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, controlnet=controlnet).to(
    <span class="hljs-string">&quot;cuda&quot;</span>
)
image = pipe(<span class="hljs-string">&quot;&quot;</span>, image=canny_image, guess_mode=<span class="hljs-literal">True</span>, guidance_scale=<span class="hljs-number">3.0</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;guess_mode_generated.png&quot;</span>)`}}),pa=new F({}),ua=new F({}),ga=new F({}),Na=new F({}),Qa=new F({}),La=new Z({props:{name:"class diffusers.StableDiffusionControlNetPipeline",anchor:"diffusers.StableDiffusionControlNetPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",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:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionControlNetPipeline.controlnet",description:`<strong>controlnet</strong> (<a href="/docs/diffusers/v0.20.0/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.StableDiffusionControlNetPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionControlNetPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionControlNetPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L93"}}),qa=new Z({props:{name:"__call__",anchor:"diffusers.StableDiffusionControlNetPipeline.__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:"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 = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": 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:"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"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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.StableDiffusionControlNetPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L676",returnDescription:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Jn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetPipeline.__call__.example",$$slots:{default:[CC]},$$scope:{ctx:E}}}),Oa=new Z({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),In=new Jl({props:{warning:!0,$$slots:{default:[$C]},$$scope:{ctx:E}}}),Un=new Y({props:{anchor:"diffusers.StableDiffusionControlNetPipeline.enable_attention_slicing.example",$$slots:{default:[NC]},$$scope:{ctx:E}}}),Ka=new Z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),ts=new Z({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L182"}}),ns=new Z({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L190"}}),as=new Z({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),Cn=new Jl({props:{warning:!0,$$slots:{default:[xC]},$$scope:{ctx:E}}}),$n=new Y({props:{anchor:"diffusers.StableDiffusionControlNetPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[kC]},$$scope:{ctx:E}}}),is=new Z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),ds=new Z({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.StableDiffusionControlNetPipeline.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.20.0/src/diffusers/loaders.py#L634"}}),xn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetPipeline.load_textual_inversion.example",$$slots:{default:[WC]},$$scope:{ctx:E}}}),kn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetPipeline.load_textual_inversion.example-2",$$slots:{default:[GC]},$$scope:{ctx:E}}}),us=new Z({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L207"}}),gs=new Z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionControlNetPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L214"}}),_s=new Z({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet.py#L198"}}),bs=new F({}),vs=new Z({props:{name:"class diffusers.StableDiffusionControlNetImg2ImgPipeline",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",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:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.controlnet",description:`<strong>controlnet</strong> (<a href="/docs/diffusers/v0.20.0/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.StableDiffusionControlNetImg2ImgPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L119"}}),Ms=new Z({props:{name:"__call__",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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:"control_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:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"strength",val:": float = 0.8"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": 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:"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]] = 0.8"},{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"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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 initial image will be used as the starting point for the image generation process. Can also accept
image latents as <code>image</code>, if passing latents directly, it will not be encoded again.`,name:"image"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__call__.control_image",description:`<strong>control_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:"control_image"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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. Note that by default, we use a smaller conditioning scale for inpainting
than for <a href="/docs/diffusers/v0.20.0/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline.__call__"><strong>call</strong>()</a>.`,name:"controlnet_conditioning_scale"},{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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.StableDiffusionControlNetImg2ImgPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L748",returnDescription:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Bn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.__call__.example",$$slots:{default:[DC]},$$scope:{ctx:E}}}),Ts=new Z({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),Pn=new Jl({props:{warning:!0,$$slots:{default:[SC]},$$scope:{ctx:E}}}),Fn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_attention_slicing.example",$$slots:{default:[BC]},$$scope:{ctx:E}}}),Js=new Z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),Us=new Z({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L208"}}),Es=new Z({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L216"}}),Zs=new Z({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),An=new Jl({props:{warning:!0,$$slots:{default:[PC]},$$scope:{ctx:E}}}),Yn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[FC]},$$scope:{ctx:E}}}),Ns=new Z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),Ws=new Z({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.StableDiffusionControlNetImg2ImgPipeline.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.20.0/src/diffusers/loaders.py#L634"}}),Ln=new Y({props:{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.load_textual_inversion.example",$$slots:{default:[RC]},$$scope:{ctx:E}}}),zn=new Y({props:{anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.load_textual_inversion.example-2",$$slots:{default:[VC]},$$scope:{ctx:E}}}),Bs=new Z({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L233"}}),Fs=new Z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L240"}}),Rs=new Z({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetImg2ImgPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py#L224"}}),Vs=new F({}),Xs=new Z({props:{name:"class diffusers.StableDiffusionControlNetInpaintPipeline",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",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:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.controlnet",description:`<strong>controlnet</strong> (<a href="/docs/diffusers/v0.20.0/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.StableDiffusionControlNetInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.20.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.20.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L225"}}),eo=new Jl({props:{$$slots:{default:[XC]},$$scope:{ctx:E}}}),Qs=new Z({props:{name:"__call__",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image] = None"},{name:"mask_image",val:": typing.Union[torch.Tensor, PIL.Image.Image] = None"},{name:"control_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:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"strength",val:": float = 1.0"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": 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:"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]] = 0.5"},{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"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.FloatTensor]</code>, <code>List[PIL.Image.Image]</code>, &#x2014;
<code>List[List[torch.FloatTensor]]</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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 1.) &#x2014;
Conceptually, indicates how much to transform the masked portion of 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 the masked
portion of the reference <code>image</code>.`,name:"strength"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.20.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__call__.controlnet_conditioning_scale",description:`<strong>controlnet_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 0.5) &#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. Note that by default, we use a smaller conditioning scale for inpainting
than for <a href="/docs/diffusers/v0.20.0/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline.__call__"><strong>call</strong>()</a>.`,name:"controlnet_conditioning_scale"},{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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.StableDiffusionControlNetInpaintPipeline.__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"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L948",returnDescription:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/upscale#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.20.0/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),to=new Y({props:{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.__call__.example",$$slots:{default:[AC]},$$scope:{ctx:E}}}),Ls=new Z({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1688"}}),no=new Jl({props:{warning:!0,$$slots:{default:[YC]},$$scope:{ctx:E}}}),oo=new Y({props:{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_attention_slicing.example",$$slots:{default:[QC]},$$scope:{ctx:E}}}),zs=new Z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1728"}}),qs=new Z({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L325"}}),Os=new Z({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L333"}}),el=new Z({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.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.20.0/src/diffusers/pipelines/pipeline_utils.py#L1627"}}),io=new Jl({props:{warning:!0,$$slots:{default:[LC]},$$scope:{ctx:E}}}),ro=new Y({props:{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[zC]},$$scope:{ctx:E}}}),ol=new Z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/pipeline_utils.py#L1662"}}),ll=new Z({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.StableDiffusionControlNetInpaintPipeline.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.20.0/src/diffusers/loaders.py#L634"}}),po=new Y({props:{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.load_textual_inversion.example",$$slots:{default:[HC]},$$scope:{ctx:E}}}),mo=new Y({props:{anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.load_textual_inversion.example-2",$$slots:{default:[qC]},$$scope:{ctx:E}}}),dl=new Z({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L350"}}),ml=new Z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L357"}}),fl=new Z({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionControlNetInpaintPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py#L341"}}),ul=new F({}),hl=new Z({props:{name:"class diffusers.FlaxStableDiffusionControlNetPipeline",anchor:"diffusers.FlaxStableDiffusionControlNetPipeline",parameters:[{name:"vae",val:": FlaxAutoencoderKL"},{name:"text_encoder",val:": FlaxCLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": FlaxUNet2DConditionModel"},{name:"controlnet",val:": FlaxControlNetModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim_flax.FlaxDDIMScheduler, diffusers.schedulers.scheduling_pndm_flax.FlaxPNDMScheduler, diffusers.schedulers.scheduling_lms_discrete_flax.FlaxLMSDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep_flax.FlaxDPMSolverMultistepScheduler]"},{name:"safety_checker",val:": FlaxStableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/autoencoderkl#diffusers.FlaxAutoencoderKL">FlaxAutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>FlaxCLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.FlaxCLIPTextModel" 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.FlaxStableDiffusionControlNetPipeline.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.FlaxStableDiffusionControlNetPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/unet2d-cond#diffusers.FlaxUNet2DConditionModel">FlaxUNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.controlnet",description:`<strong>controlnet</strong> (<a href="/docs/diffusers/v0.20.0/en/api/models/controlnet#diffusers.FlaxControlNetModel">FlaxControlNetModel</a> &#x2014;
Provides additional conditioning to the unet during the denoising process.`,name:"controlnet"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.20.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<code>FlaxDDIMScheduler</code>, <code>FlaxLMSDiscreteScheduler</code>, <code>FlaxPNDMScheduler</code>, or
<code>FlaxDPMSolverMultistepScheduler</code>.`,name:"scheduler"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>FlaxStableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_flax_controlnet.py#L111"}}),_l=new Z({props:{name:"__call__",anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__",parameters:[{name:"prompt_ids",val:": array"},{name:"image",val:": array"},{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"prng_seed",val:": PRNGKeyArray"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": typing.Union[float, array] = 7.5"},{name:"latents",val:": array = None"},{name:"neg_prompt_ids",val:": array = None"},{name:"controlnet_conditioning_scale",val:": typing.Union[float, array] = 1.0"},{name:"return_dict",val:": bool = True"},{name:"jit",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.prompt_ids",description:`<strong>prompt_ids</strong> (<code>jnp.array</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt_ids"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.image",description:`<strong>image</strong> (<code>jnp.array</code>) &#x2014;
Array representing the ControlNet input condition. ControlNet use this input condition to generate
guidance to Unet.`,name:"image"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.params",description:"<strong>params</strong> (<code>Dict</code> or <code>FrozenDict</code>) &#x2014; Dictionary containing the model parameters/weights",name:"params"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.prng_seed",description:"<strong>prng_seed</strong> (<code>jax.random.KeyArray</code> or <code>jax.Array</code>) &#x2014; Array containing random number generator key",name:"prng_seed"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__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.FlaxStableDiffusionControlNetPipeline.__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.FlaxStableDiffusionControlNetPipeline.__call__.latents",description:`<strong>latents</strong> (<code>jnp.array</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.FlaxStableDiffusionControlNetPipeline.__call__.controlnet_conditioning_scale",description:`<strong>controlnet_conditioning_scale</strong> (<code>float</code> or <code>jnp.array</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.`,name:"controlnet_conditioning_scale"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__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.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput">FlaxStableDiffusionPipelineOutput</a> instead of
a plain tuple.`,name:"return_dict"},{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.jit",description:`<strong>jit</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to run <code>pmap</code> versions of the generation and safety scoring functions. NOTE: This argument
exists because <code>__call__</code> is not yet end-to-end pmap-able. It will be removed in a future release.`,name:"jit"}],source:"https://github.com/huggingface/diffusers/blob/v0.20.0/src/diffusers/pipelines/controlnet/pipeline_flax_controlnet.py#L349",returnDescription:`
<p><a
  href="/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"
>FlaxStableDiffusionPipelineOutput</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.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"
>FlaxStableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),_o=new Y({props:{anchor:"diffusers.FlaxStableDiffusionControlNetPipeline.__call__.example",$$slots:{default:[OC]},$$scope:{ctx:E}}}),{c(){f=o("meta"),I=c(),_=o("h1"),h=o("a"),J=o("span"),b(p.$$.fragment),g=c(),P=o("span"),Ie=i("ControlNet"),Et=c(),Ue=o("p"),z=o("a"),L=i("Adding Conditional Control to Text-to-Image Diffusion Models"),Il=i(" by Lvmin Zhang and Maneesh Agrawala."),Wo=c(),rt=o("p"),mg=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."),bf=c(),Ul=o("p"),fg=i("The abstract from the paper is:"),vf=c(),El=o("p"),oc=o("em"),ug=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."),yf=c(),jt=o("p"),hg=i("This model was contributed by "),Go=o("a"),gg=i("takuma104"),_g=i(". \u2764\uFE0F"),wf=c(),Zt=o("p"),bg=i("The original codebase can be found at "),Do=o("a"),vg=i("lllyasviel/ControlNet"),yg=i("."),Mf=c(),ct=o("h2"),Ct=o("a"),ac=o("span"),b(So.$$.fragment),wg=c(),sc=o("span"),Mg=i("Usage example"),Tf=c(),$t=o("p"),Tg=i("In the following we give a simple example of how to use a "),lc=o("em"),Jg=i("ControlNet"),Ig=i(` checkpoint with Diffusers for inference.
The inference pipeline is the same for all pipelines:`),Jf=c(),Nt=o("ul"),ic=o("li"),rc=o("ol"),cc=o("li"),Ug=i("Take an image and run it through a pre-conditioning processor."),Eg=c(),dc=o("li"),jl=o("ol"),Bo=o("li"),jg=i("Run the pre-processed image through the "),Zl=o("a"),Zg=i("StableDiffusionControlNetPipeline"),Cg=i("."),If=c(),xt=o("p"),$g=i("Let\u2019s have a look at a simple example using the "),Po=o("a"),Ng=i("Canny Edge ControlNet"),xg=i("."),Uf=c(),b(Fo.$$.fragment),Ef=c(),Cl=o("p"),$l=o("img"),jf=c(),Ge=o("p"),kg=i("Next, we process the image to get the canny image. This is step "),pc=o("em"),Wg=i("1."),Gg=i(" - running the pre-conditioning processor. The pre-conditioning processor is different for every ControlNet. Please see the model cards of the "),Nl=o("a"),Dg=i("official checkpoints"),Sg=i(" for more information about other models."),Zf=c(),xl=o("p"),Bg=i("First, we need to install opencv:"),Cf=c(),b(Ro.$$.fragment),$f=c(),kl=o("p"),Pg=i("Next, let\u2019s also install all required Hugging Face libraries:"),Nf=c(),b(Vo.$$.fragment),xf=c(),Wl=o("p"),Fg=i("Then we can retrieve the canny edges of the image."),kf=c(),b(Xo.$$.fragment),Wf=c(),Gl=o("p"),Rg=i("Let\u2019s take a look at the processed image."),Gf=c(),Dl=o("p"),Sl=o("img"),Df=c(),kt=o("p"),Vg=i("Now, we load the official "),Bl=o("a"),Xg=i("Stable Diffusion 1.5 Model"),Ag=i(" as well as the ControlNet for canny edges."),Sf=c(),b(Ao.$$.fragment),Bf=c(),Wt=o("p"),Yg=i("To speed-up things and reduce memory, let\u2019s enable model offloading and use the fast "),Pl=o("a"),Qg=i("UniPCMultistepScheduler"),Lg=i("."),Pf=c(),b(Yo.$$.fragment),Ff=c(),Fl=o("p"),zg=i("Finally, we can run the pipeline:"),Rf=c(),b(Qo.$$.fragment),Vf=c(),Rl=o("p"),Hg=i("This should take only around 3-4 seconds on GPU (depending on hardware). The output image then looks as follows:"),Xf=c(),Vl=o("p"),Xl=o("img"),Af=c(),dt=o("p"),mc=o("strong"),qg=i("Note"),Og=i(": To see how to run all other ControlNet checkpoints, please have a look at "),Al=o("a"),Kg=i("ControlNet with Stable Diffusion 1.5"),e_=i("."),Yf=c(),pt=o("h2"),Gt=o("a"),fc=o("span"),b(Lo.$$.fragment),t_=c(),uc=o("span"),n_=i("Combining multiple conditionings"),Qf=c(),Dt=o("p"),o_=i("Multiple ControlNet conditionings can be combined for a single image generation. Pass a list of ControlNets to the pipeline\u2019s constructor and a corresponding list of conditionings to "),hc=o("code"),a_=i("__call__"),s_=i("."),Lf=c(),Yl=o("p"),l_=i("When combining conditionings, it is helpful to mask conditionings such that they do not overlap. In the example, we mask the middle of the canny map where the pose conditioning is located."),zf=c(),St=o("p"),i_=i("It can also be helpful to vary the "),gc=o("code"),r_=i("controlnet_conditioning_scales"),c_=i(" to emphasize one conditioning over the other."),Hf=c(),mt=o("h3"),Bt=o("a"),_c=o("span"),b(zo.$$.fragment),d_=c(),bc=o("span"),p_=i("Canny conditioning"),qf=c(),Ql=o("p"),m_=i("The original image:"),Of=c(),Ll=o("img"),Kf=c(),zl=o("p"),f_=i("Prepare the conditioning:"),eu=c(),b(Ho.$$.fragment),tu=c(),Hl=o("img"),nu=c(),ft=o("h3"),Pt=o("a"),vc=o("span"),b(qo.$$.fragment),u_=c(),yc=o("span"),h_=i("Openpose conditioning"),ou=c(),ql=o("p"),g_=i("The original image:"),au=c(),Oo=o("img"),su=c(),Ol=o("p"),__=i("Prepare the conditioning:"),lu=c(),b(Ko.$$.fragment),iu=c(),ea=o("img"),ru=c(),ut=o("h3"),Ft=o("a"),wc=o("span"),b(ta.$$.fragment),b_=c(),Mc=o("span"),v_=i("Running ControlNet with multiple conditionings"),cu=c(),b(na.$$.fragment),du=c(),oa=o("img"),pu=c(),ht=o("h3"),Rt=o("a"),Tc=o("span"),b(aa.$$.fragment),y_=c(),Jc=o("span"),w_=i("Guess Mode"),mu=c(),De=o("p"),M_=i("Guess Mode is "),sa=o("a"),T_=i("a ControlNet feature that was implemented"),J_=i(" after the publication of "),la=o("a"),I_=i("the paper"),U_=i(". The description states:"),fu=c(),Kl=o("blockquote"),Ic=o("p"),E_=i("In this mode, the ControlNet encoder will try best to recognize the content of the input control map, like depth map, edge map, scribbles, etc, even if you remove all prompts."),uu=c(),gt=o("h4"),Vt=o("a"),Uc=o("span"),b(ia.$$.fragment),j_=c(),Ec=o("span"),Z_=i("The core implementation:"),hu=c(),Se=o("p"),C_=i("It adjusts the scale of the output residuals from ControlNet by a fixed ratio depending on the block depth. The shallowest DownBlock corresponds to "),jc=o("code"),$_=i("0.1"),N_=i(". As the blocks get deeper, the scale increases exponentially, and the scale for the output of the MidBlock becomes "),Zc=o("code"),x_=i("1.0"),k_=i("."),gu=c(),Xt=o("p"),W_=i("Since the core implementation is just this, "),Cc=o("strong"),G_=i("it does not have any impact on prompt conditioning"),D_=i(". While it is common to use it without specifying any prompts, it is also possible to provide prompts if desired."),_u=c(),_t=o("h4"),At=o("a"),$c=o("span"),b(ra.$$.fragment),S_=c(),Nc=o("span"),B_=i("Usage:"),bu=c(),he=o("p"),P_=i("Just specify "),xc=o("code"),F_=i("guess_mode=True"),R_=i(" in the pipe() function. A "),kc=o("code"),V_=i("guidance_scale"),X_=i(" between 3.0 and 5.0 is "),ca=o("a"),A_=i("recommended"),Y_=i("."),vu=c(),b(da.$$.fragment),yu=c(),bt=o("h4"),Yt=o("a"),Wc=o("span"),b(pa.$$.fragment),Q_=c(),Gc=o("span"),L_=i("Output image comparison:"),wu=i(`

Canny Control Example
`),Qt=o("table"),Dc=o("thead"),ma=o("tr"),Sc=o("th"),z_=i("no guess_mode with prompt"),H_=c(),Bc=o("th"),q_=i("guess_mode without prompt"),O_=c(),Pc=o("tbody"),fa=o("tr"),Fc=o("td"),ei=o("a"),ti=o("img"),K_=c(),Rc=o("td"),ni=o("a"),oi=o("img"),Mu=c(),vt=o("h2"),Lt=o("a"),Vc=o("span"),b(ua.$$.fragment),eb=c(),Xc=o("span"),tb=i("Available checkpoints"),Tu=c(),Be=o("p"),nb=i("ControlNet requires a "),Ac=o("em"),ob=i("control image"),ab=i(" in addition to the text-to-image "),Yc=o("em"),sb=i("prompt"),lb=i(`.
Each pretrained model is trained using a different conditioning method that requires different images for conditioning the generated outputs. For example, Canny edge conditioning requires the control image to be the output of a Canny filter, while depth conditioning requires the control image to be a depth map. See the overview and image examples below to know more.`),Ju=c(),zt=o("p"),ib=i("All checkpoints can be found under the authors\u2019 namespace "),ha=o("a"),rb=i("lllyasviel"),cb=i("."),Iu=c(),yt=o("p"),Qc=o("strong"),db=i("13.04.2024 Update"),pb=i(": The author has released improved controlnet checkpoints v1.1 - see "),ai=o("a"),mb=i("here"),fb=i("."),Uu=c(),wt=o("h3"),Ht=o("a"),Lc=o("span"),b(ga.$$.fragment),ub=c(),zc=o("span"),hb=i("ControlNet v1.0"),Eu=c(),qt=o("table"),Hc=o("thead"),Ee=o("tr"),qc=o("th"),gb=i("Model Name"),_b=c(),Oc=o("th"),bb=i("Control Image Overview"),vb=c(),Kc=o("th"),yb=i("Control Image Example"),wb=c(),ed=o("th"),Mb=i("Generated Image Example"),Tb=c(),B=o("tbody"),je=o("tr"),Ot=o("td"),_a=o("a"),Jb=i("lllyasviel/sd-controlnet-canny"),Ib=o("br"),Ub=c(),td=o("em"),Eb=i("Trained with canny edge detection"),jb=c(),nd=o("td"),Zb=i("A monochrome image with white edges on a black background."),Cb=c(),od=o("td"),si=o("a"),Kt=o("img"),$b=c(),ad=o("td"),li=o("a"),ii=o("img"),Nb=c(),Ze=o("tr"),en=o("td"),ba=o("a"),xb=i("lllyasviel/sd-controlnet-depth"),kb=o("br"),Wb=c(),sd=o("em"),Gb=i("Trained with Midas depth estimation"),Db=c(),ld=o("td"),Sb=i("A grayscale image with black representing deep areas and white representing shallow areas."),Bb=c(),id=o("td"),ri=o("a"),ci=o("img"),Pb=c(),rd=o("td"),di=o("a"),pi=o("img"),Fb=c(),Ce=o("tr"),tn=o("td"),va=o("a"),Rb=i("lllyasviel/sd-controlnet-hed"),Vb=o("br"),Xb=c(),cd=o("em"),Ab=i("Trained with HED edge detection (soft edge)"),Yb=c(),dd=o("td"),Qb=i("A monochrome image with white soft edges on a black background."),Lb=c(),pd=o("td"),mi=o("a"),fi=o("img"),zb=c(),md=o("td"),ui=o("a"),hi=o("img"),Hb=c(),$e=o("tr"),nn=o("td"),ya=o("a"),qb=i("lllyasviel/sd-controlnet-mlsd"),Ob=o("br"),Kb=c(),fd=o("em"),ev=i("Trained with M-LSD line detection"),tv=c(),ud=o("td"),nv=i("A monochrome image composed only of white straight lines on a black background."),ov=c(),hd=o("td"),gi=o("a"),_i=o("img"),av=c(),gd=o("td"),bi=o("a"),vi=o("img"),sv=c(),Ne=o("tr"),on=o("td"),wa=o("a"),lv=i("lllyasviel/sd-controlnet-normal"),iv=o("br"),rv=c(),_d=o("em"),cv=i("Trained with normal map"),dv=c(),Ma=o("td"),pv=i("A "),Ta=o("a"),mv=i("normal mapped"),fv=i(" image."),uv=c(),bd=o("td"),yi=o("a"),wi=o("img"),hv=c(),vd=o("td"),Mi=o("a"),Ti=o("img"),gv=c(),xe=o("tr"),an=o("td"),Ja=o("a"),_v=i("lllyasviel/sd-controlnet-openpose"),bv=o("br"),vv=c(),yd=o("em"),yv=i("Trained with OpenPose bone image"),wv=c(),Ia=o("td"),Mv=i("A "),Ua=o("a"),Tv=i("OpenPose bone"),Jv=i(" image."),Iv=c(),wd=o("td"),Ji=o("a"),Ii=o("img"),Uv=c(),Md=o("td"),Ui=o("a"),Ei=o("img"),Ev=c(),ke=o("tr"),sn=o("td"),Ea=o("a"),jv=i("lllyasviel/sd-controlnet-scribble"),Zv=o("br"),Cv=c(),Td=o("em"),$v=i("Trained with human scribbles"),Nv=c(),Jd=o("td"),xv=i("A hand-drawn monochrome image with white outlines on a black background."),kv=c(),Id=o("td"),ji=o("a"),Zi=o("img"),Wv=c(),Ud=o("td"),Ci=o("a"),$i=o("img"),Gv=c(),We=o("tr"),ja=o("td"),Za=o("a"),Dv=i("lllyasviel/sd-controlnet-seg"),Sv=o("br"),Ed=o("em"),Bv=i("Trained with semantic segmentation"),Pv=c(),Ca=o("td"),Fv=i("An "),$a=o("a"),Rv=i("ADE20K"),Vv=i("\u2019s segmentation protocol image."),Xv=c(),jd=o("td"),Ni=o("a"),xi=o("img"),Av=c(),Zd=o("td"),ki=o("a"),Wi=o("img"),ju=c(),Mt=o("h3"),ln=o("a"),Cd=o("span"),b(Na.$$.fragment),Yv=c(),$d=o("span"),Qv=i("ControlNet v1.1"),Zu=c(),rn=o("table"),Nd=o("thead"),H=o("tr"),xd=o("th"),Lv=i("Model Name"),zv=c(),kd=o("th"),Hv=i("Control Image Overview"),qv=c(),Wd=o("th"),Ov=i("Condition Image"),Kv=c(),Gd=o("th"),ey=i("Control Image Example"),ty=c(),Dd=o("th"),ny=i("Generated Image Example"),oy=c(),W=o("tbody"),q=o("tr"),Gi=o("td"),xa=o("a"),ay=i("lllyasviel/control_v11p_sd15_canny"),sy=o("br"),ly=c(),Sd=o("td"),Bd=o("em"),iy=i("Trained with canny edge detection"),ry=c(),Pd=o("td"),cy=i("A monochrome image with white edges on a black background."),dy=c(),Fd=o("td"),Di=o("a"),cn=o("img"),py=c(),Rd=o("td"),Si=o("a"),Bi=o("img"),my=c(),O=o("tr"),Pi=o("td"),ka=o("a"),fy=i("lllyasviel/control_v11e_sd15_ip2p"),uy=o("br"),hy=c(),Vd=o("td"),Xd=o("em"),gy=i("Trained with pixel to pixel instruction"),_y=c(),Ad=o("td"),by=i("No condition ."),vy=c(),Yd=o("td"),Fi=o("a"),dn=o("img"),yy=c(),Qd=o("td"),Ri=o("a"),Vi=o("img"),wy=c(),K=o("tr"),Xi=o("td"),Wa=o("a"),My=i("lllyasviel/control_v11p_sd15_inpaint"),Ty=o("br"),Jy=c(),Ld=o("td"),Iy=i("Trained with image inpainting"),Uy=c(),zd=o("td"),Ey=i("No condition."),jy=c(),Hd=o("td"),Ai=o("a"),pn=o("img"),Zy=c(),qd=o("td"),Yi=o("a"),Qi=o("img"),Cy=c(),ee=o("tr"),Li=o("td"),Ga=o("a"),$y=i("lllyasviel/control_v11p_sd15_mlsd"),Ny=o("br"),xy=c(),Od=o("td"),ky=i("Trained with multi-level line segment detection"),Wy=c(),Kd=o("td"),Gy=i("An image with annotated line segments."),Dy=c(),ep=o("td"),zi=o("a"),mn=o("img"),Sy=c(),tp=o("td"),Hi=o("a"),qi=o("img"),By=c(),te=o("tr"),Oi=o("td"),Da=o("a"),Py=i("lllyasviel/control_v11f1p_sd15_depth"),Fy=o("br"),Ry=c(),np=o("td"),Vy=i("Trained with depth estimation"),Xy=c(),op=o("td"),Ay=i("An image with depth information, usually represented as a grayscale image."),Yy=c(),ap=o("td"),Ki=o("a"),fn=o("img"),Qy=c(),sp=o("td"),er=o("a"),tr=o("img"),Ly=c(),ne=o("tr"),nr=o("td"),Sa=o("a"),zy=i("lllyasviel/control_v11p_sd15_normalbae"),Hy=o("br"),qy=c(),lp=o("td"),Oy=i("Trained with surface normal estimation"),Ky=c(),ip=o("td"),e1=i("An image with surface normal information, usually represented as a color-coded image."),t1=c(),rp=o("td"),or=o("a"),un=o("img"),n1=c(),cp=o("td"),ar=o("a"),sr=o("img"),o1=c(),oe=o("tr"),lr=o("td"),Ba=o("a"),a1=i("lllyasviel/control_v11p_sd15_seg"),s1=o("br"),l1=c(),dp=o("td"),i1=i("Trained with image segmentation"),r1=c(),pp=o("td"),c1=i("An image with segmented regions, usually represented as a color-coded image."),d1=c(),mp=o("td"),ir=o("a"),hn=o("img"),p1=c(),fp=o("td"),rr=o("a"),cr=o("img"),m1=c(),ae=o("tr"),dr=o("td"),Pa=o("a"),f1=i("lllyasviel/control_v11p_sd15_lineart"),u1=o("br"),h1=c(),up=o("td"),g1=i("Trained with line art generation"),_1=c(),hp=o("td"),b1=i("An image with line art, usually black lines on a white background."),v1=c(),gp=o("td"),pr=o("a"),gn=o("img"),y1=c(),_p=o("td"),mr=o("a"),fr=o("img"),w1=c(),se=o("tr"),ur=o("td"),Fa=o("a"),M1=i("lllyasviel/control_v11p_sd15s2_lineart_anime"),T1=o("br"),J1=c(),bp=o("td"),I1=i("Trained with anime line art generation"),U1=c(),vp=o("td"),E1=i("An image with anime-style line art."),j1=c(),yp=o("td"),hr=o("a"),_n=o("img"),Z1=c(),wp=o("td"),gr=o("a"),_r=o("img"),C1=c(),le=o("tr"),br=o("td"),Ra=o("a"),$1=i("lllyasviel/control_v11p_sd15_openpose"),N1=o("br"),x1=c(),Mp=o("td"),k1=i("Trained with human pose estimation"),W1=c(),Tp=o("td"),G1=i("An image with human poses, usually represented as a set of keypoints or skeletons."),D1=c(),Jp=o("td"),vr=o("a"),bn=o("img"),S1=c(),Ip=o("td"),yr=o("a"),wr=o("img"),B1=c(),ie=o("tr"),Mr=o("td"),Va=o("a"),P1=i("lllyasviel/control_v11p_sd15_scribble"),F1=o("br"),R1=c(),Up=o("td"),V1=i("Trained with scribble-based image generation"),X1=c(),Ep=o("td"),A1=i("An image with scribbles, usually random or user-drawn strokes."),Y1=c(),jp=o("td"),Tr=o("a"),vn=o("img"),Q1=c(),Zp=o("td"),Jr=o("a"),Ir=o("img"),L1=c(),re=o("tr"),Ur=o("td"),Xa=o("a"),z1=i("lllyasviel/control_v11p_sd15_softedge"),H1=o("br"),q1=c(),Cp=o("td"),O1=i("Trained with soft edge image generation"),K1=c(),$p=o("td"),ew=i("An image with soft edges, usually to create a more painterly or artistic effect."),tw=c(),Np=o("td"),Er=o("a"),yn=o("img"),nw=c(),xp=o("td"),jr=o("a"),Zr=o("img"),ow=c(),ce=o("tr"),Cr=o("td"),Aa=o("a"),aw=i("lllyasviel/control_v11e_sd15_shuffle"),sw=o("br"),lw=c(),kp=o("td"),iw=i("Trained with image shuffling"),rw=c(),Wp=o("td"),cw=i("An image with shuffled patches or regions."),dw=c(),Gp=o("td"),$r=o("a"),wn=o("img"),pw=c(),Dp=o("td"),Nr=o("a"),xr=o("img"),mw=c(),de=o("tr"),kr=o("td"),Ya=o("a"),fw=i("lllyasviel/control_v11f1e_sd15_tile"),uw=o("br"),hw=c(),Sp=o("td"),gw=i("Trained with image tiling"),_w=c(),Bp=o("td"),bw=i("A blurry image or part of an image ."),vw=c(),Pp=o("td"),Wr=o("a"),Mn=o("img"),yw=c(),Fp=o("td"),Gr=o("a"),Dr=o("img"),Cu=c(),Tt=o("h2"),Tn=o("a"),Rp=o("span"),b(Qa.$$.fragment),ww=c(),Vp=o("span"),Mw=i("StableDiffusionControlNetPipeline"),$u=c(),C=o("div"),b(La.$$.fragment),Tw=c(),Xp=o("p"),Jw=i("Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),Iw=c(),za=o("p"),Uw=i("This model inherits from "),Sr=o("a"),Ew=i("DiffusionPipeline"),jw=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.)`),Zw=c(),Ap=o("p"),Cw=i("In addition the pipeline inherits the following loading methods:"),$w=c(),Yp=o("ul"),Ha=o("li"),Qp=o("em"),Nw=i("Textual-Inversion"),xw=i(": "),Br=o("a"),kw=i("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),Ww=c(),Pe=o("div"),b(qa.$$.fragment),Gw=c(),Lp=o("p"),Dw=i("Function invoked when calling the pipeline for generation."),Sw=c(),b(Jn.$$.fragment),Bw=c(),ge=o("div"),b(Oa.$$.fragment),Pw=c(),zp=o("p"),Fw=i(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Rw=c(),b(In.$$.fragment),Vw=c(),b(Un.$$.fragment),Xw=c(),En=o("div"),b(Ka.$$.fragment),Aw=c(),es=o("p"),Yw=i("Disable sliced attention computation. If "),Hp=o("code"),Qw=i("enable_attention_slicing"),Lw=i(` was previously called, attention is
computed in one step.`),zw=c(),jn=o("div"),b(ts.$$.fragment),Hw=c(),qp=o("p"),qw=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.`),Ow=c(),Zn=o("div"),b(ns.$$.fragment),Kw=c(),os=o("p"),e2=i("Disable sliced VAE decoding. If "),Op=o("code"),t2=i("enable_vae_slicing"),n2=i(` was previously enabled, this method will go back to
computing decoding in one step.`),o2=c(),_e=o("div"),b(as.$$.fragment),a2=c(),ss=o("p"),s2=i("Enable memory efficient attention from "),ls=o("a"),l2=i("xFormers"),i2=i(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),r2=c(),b(Cn.$$.fragment),c2=c(),b($n.$$.fragment),d2=c(),Nn=o("div"),b(is.$$.fragment),p2=c(),rs=o("p"),m2=i("Disable memory efficient attention from "),cs=o("a"),f2=i("xFormers"),u2=i("."),h2=c(),R=o("div"),b(ds.$$.fragment),g2=c(),ps=o("p"),_2=i("Load textual inversion embeddings into the text encoder of "),Pr=o("a"),b2=i("StableDiffusionPipeline"),v2=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),y2=c(),Kp=o("p"),w2=i("Example:"),M2=c(),b(xn.$$.fragment),T2=c(),ms=o("p"),J2=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),fs=o("a"),I2=i("civitAI"),U2=i(") and then load the vector"),E2=c(),b(kn.$$.fragment),j2=c(),Wn=o("div"),b(us.$$.fragment),Z2=c(),hs=o("p"),C2=i("Disable tiled VAE decoding. If "),em=o("code"),$2=i("enable_vae_tiling"),N2=i(` was previously enabled, this method will go back to
computing decoding in one step.`),x2=c(),Gn=o("div"),b(gs.$$.fragment),k2=c(),pe=o("p"),W2=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),tm=o("code"),G2=i("enable_sequential_cpu_offload"),D2=i(", this method moves one whole model at a time to the GPU when its "),nm=o("code"),S2=i("forward"),B2=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),om=o("code"),P2=i("enable_sequential_cpu_offload"),F2=i(", but performance is much better due to the iterative execution of the "),am=o("code"),R2=i("unet"),V2=i("."),X2=c(),Dn=o("div"),b(_s.$$.fragment),A2=c(),sm=o("p"),Y2=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.`),Nu=c(),Jt=o("h2"),Sn=o("a"),lm=o("span"),b(bs.$$.fragment),Q2=c(),im=o("span"),L2=i("StableDiffusionControlNetImg2ImgPipeline"),xu=c(),$=o("div"),b(vs.$$.fragment),z2=c(),rm=o("p"),H2=i("Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),q2=c(),ys=o("p"),O2=i("This model inherits from "),Fr=o("a"),K2=i("DiffusionPipeline"),e0=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.)`),t0=c(),cm=o("p"),n0=i("In addition the pipeline inherits the following loading methods:"),o0=c(),dm=o("ul"),ws=o("li"),pm=o("em"),a0=i("Textual-Inversion"),s0=i(": "),Rr=o("a"),l0=i("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),i0=c(),Fe=o("div"),b(Ms.$$.fragment),r0=c(),mm=o("p"),c0=i("Function invoked when calling the pipeline for generation."),d0=c(),b(Bn.$$.fragment),p0=c(),be=o("div"),b(Ts.$$.fragment),m0=c(),fm=o("p"),f0=i(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),u0=c(),b(Pn.$$.fragment),h0=c(),b(Fn.$$.fragment),g0=c(),Rn=o("div"),b(Js.$$.fragment),_0=c(),Is=o("p"),b0=i("Disable sliced attention computation. If "),um=o("code"),v0=i("enable_attention_slicing"),y0=i(` was previously called, attention is
computed in one step.`),w0=c(),Vn=o("div"),b(Us.$$.fragment),M0=c(),hm=o("p"),T0=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.`),J0=c(),Xn=o("div"),b(Es.$$.fragment),I0=c(),js=o("p"),U0=i("Disable sliced VAE decoding. If "),gm=o("code"),E0=i("enable_vae_slicing"),j0=i(` was previously enabled, this method will go back to
computing decoding in one step.`),Z0=c(),ve=o("div"),b(Zs.$$.fragment),C0=c(),Cs=o("p"),$0=i("Enable memory efficient attention from "),$s=o("a"),N0=i("xFormers"),x0=i(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),k0=c(),b(An.$$.fragment),W0=c(),b(Yn.$$.fragment),G0=c(),Qn=o("div"),b(Ns.$$.fragment),D0=c(),xs=o("p"),S0=i("Disable memory efficient attention from "),ks=o("a"),B0=i("xFormers"),P0=i("."),F0=c(),V=o("div"),b(Ws.$$.fragment),R0=c(),Gs=o("p"),V0=i("Load textual inversion embeddings into the text encoder of "),Vr=o("a"),X0=i("StableDiffusionPipeline"),A0=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Y0=c(),_m=o("p"),Q0=i("Example:"),L0=c(),b(Ln.$$.fragment),z0=c(),Ds=o("p"),H0=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ss=o("a"),q0=i("civitAI"),O0=i(") and then load the vector"),K0=c(),b(zn.$$.fragment),eM=c(),Hn=o("div"),b(Bs.$$.fragment),tM=c(),Ps=o("p"),nM=i("Disable tiled VAE decoding. If "),bm=o("code"),oM=i("enable_vae_tiling"),aM=i(` was previously enabled, this method will go back to
computing decoding in one step.`),sM=c(),qn=o("div"),b(Fs.$$.fragment),lM=c(),me=o("p"),iM=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),vm=o("code"),rM=i("enable_sequential_cpu_offload"),cM=i(", this method moves one whole model at a time to the GPU when its "),ym=o("code"),dM=i("forward"),pM=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),wm=o("code"),mM=i("enable_sequential_cpu_offload"),fM=i(", but performance is much better due to the iterative execution of the "),Mm=o("code"),uM=i("unet"),hM=i("."),gM=c(),On=o("div"),b(Rs.$$.fragment),_M=c(),Tm=o("p"),bM=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.`),ku=c(),It=o("h2"),Kn=o("a"),Jm=o("span"),b(Vs.$$.fragment),vM=c(),Im=o("span"),yM=i("StableDiffusionControlNetInpaintPipeline"),Wu=c(),j=o("div"),b(Xs.$$.fragment),wM=c(),Um=o("p"),MM=i("Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),TM=c(),As=o("p"),JM=i("This model inherits from "),Xr=o("a"),IM=i("DiffusionPipeline"),UM=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.)`),EM=c(),Em=o("p"),jM=i("In addition the pipeline inherits the following loading methods:"),ZM=c(),jm=o("ul"),Ys=o("li"),Zm=o("em"),CM=i("Textual-Inversion"),$M=i(": "),Ar=o("a"),NM=i("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),xM=c(),b(eo.$$.fragment),kM=c(),Re=o("div"),b(Qs.$$.fragment),WM=c(),Cm=o("p"),GM=i("Function invoked when calling the pipeline for generation."),DM=c(),b(to.$$.fragment),SM=c(),ye=o("div"),b(Ls.$$.fragment),BM=c(),$m=o("p"),PM=i(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),FM=c(),b(no.$$.fragment),RM=c(),b(oo.$$.fragment),VM=c(),ao=o("div"),b(zs.$$.fragment),XM=c(),Hs=o("p"),AM=i("Disable sliced attention computation. If "),Nm=o("code"),YM=i("enable_attention_slicing"),QM=i(` was previously called, attention is
computed in one step.`),LM=c(),so=o("div"),b(qs.$$.fragment),zM=c(),xm=o("p"),HM=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.`),qM=c(),lo=o("div"),b(Os.$$.fragment),OM=c(),Ks=o("p"),KM=i("Disable sliced VAE decoding. If "),km=o("code"),eT=i("enable_vae_slicing"),tT=i(` was previously enabled, this method will go back to
computing decoding in one step.`),nT=c(),we=o("div"),b(el.$$.fragment),oT=c(),tl=o("p"),aT=i("Enable memory efficient attention from "),nl=o("a"),sT=i("xFormers"),lT=i(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),iT=c(),b(io.$$.fragment),rT=c(),b(ro.$$.fragment),cT=c(),co=o("div"),b(ol.$$.fragment),dT=c(),al=o("p"),pT=i("Disable memory efficient attention from "),sl=o("a"),mT=i("xFormers"),fT=i("."),uT=c(),X=o("div"),b(ll.$$.fragment),hT=c(),il=o("p"),gT=i("Load textual inversion embeddings into the text encoder of "),Yr=o("a"),_T=i("StableDiffusionPipeline"),bT=i(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),vT=c(),Wm=o("p"),yT=i("Example:"),wT=c(),b(po.$$.fragment),MT=c(),rl=o("p"),TT=i(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),cl=o("a"),JT=i("civitAI"),IT=i(") and then load the vector"),UT=c(),b(mo.$$.fragment),ET=c(),fo=o("div"),b(dl.$$.fragment),jT=c(),pl=o("p"),ZT=i("Disable tiled VAE decoding. If "),Gm=o("code"),CT=i("enable_vae_tiling"),$T=i(` was previously enabled, this method will go back to
computing decoding in one step.`),NT=c(),uo=o("div"),b(ml.$$.fragment),xT=c(),fe=o("p"),kT=i(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Dm=o("code"),WT=i("enable_sequential_cpu_offload"),GT=i(", this method moves one whole model at a time to the GPU when its "),Sm=o("code"),DT=i("forward"),ST=i(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Bm=o("code"),BT=i("enable_sequential_cpu_offload"),PT=i(", but performance is much better due to the iterative execution of the "),Pm=o("code"),FT=i("unet"),RT=i("."),VT=c(),ho=o("div"),b(fl.$$.fragment),XT=c(),Fm=o("p"),AT=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.`),Gu=c(),Ut=o("h2"),go=o("a"),Rm=o("span"),b(ul.$$.fragment),YT=c(),Vm=o("span"),QT=i("FlaxStableDiffusionControlNetPipeline"),Du=c(),ue=o("div"),b(hl.$$.fragment),LT=c(),Xm=o("p"),zT=i("Pipeline for text-to-image generation using Stable Diffusion with ControlNet Guidance."),HT=c(),gl=o("p"),qT=i("This model inherits from "),Qr=o("a"),OT=i("FlaxDiffusionPipeline"),KT=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.)`),eJ=c(),Ve=o("div"),b(_l.$$.fragment),tJ=c(),Am=o("p"),nJ=i("Function invoked when calling the pipeline for generation."),oJ=c(),b(_o.$$.fragment),this.h()},l(n){const m=jC('[data-svelte="svelte-1phssyn"]',document.head);f=a(m,"META",{name:!0,content:!0}),m.forEach(t),I=d(n),_=a(n,"H1",{class:!0});var bl=s(_);h=a(bl,"A",{id:!0,class:!0,href:!0});var Ym=s(h);J=a(Ym,"SPAN",{});var Qm=s(J);v(p.$$.fragment,Qm),Qm.forEach(t),Ym.forEach(t),g=d(bl),P=a(bl,"SPAN",{});var Lm=s(P);Ie=r(Lm,"ControlNet"),Lm.forEach(t),bl.forEach(t),Et=d(n),Ue=a(n,"P",{});var Lr=s(Ue);z=a(Lr,"A",{href:!0,rel:!0});var zm=s(z);L=r(zm,"Adding Conditional Control to Text-to-Image Diffusion Models"),zm.forEach(t),Il=r(Lr," by Lvmin Zhang and Maneesh Agrawala."),Lr.forEach(t),Wo=d(n),rt=a(n,"P",{});var Hm=s(rt);mg=r(Hm,"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."),Hm.forEach(t),bf=d(n),Ul=a(n,"P",{});var qm=s(Ul);fg=r(qm,"The abstract from the paper is:"),qm.forEach(t),vf=d(n),El=a(n,"P",{});var Om=s(El);oc=a(Om,"EM",{});var Km=s(oc);ug=r(Km,"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."),Km.forEach(t),Om.forEach(t),yf=d(n),jt=a(n,"P",{});var vl=s(jt);hg=r(vl,"This model was contributed by "),Go=a(vl,"A",{href:!0,rel:!0});var ef=s(Go);gg=r(ef,"takuma104"),ef.forEach(t),_g=r(vl,". \u2764\uFE0F"),vl.forEach(t),wf=d(n),Zt=a(n,"P",{});var yl=s(Zt);bg=r(yl,"The original codebase can be found at "),Do=a(yl,"A",{href:!0,rel:!0});var tf=s(Do);vg=r(tf,"lllyasviel/ControlNet"),tf.forEach(t),yg=r(yl,"."),yl.forEach(t),Mf=d(n),ct=a(n,"H2",{class:!0});var wl=s(ct);Ct=a(wl,"A",{id:!0,class:!0,href:!0});var nf=s(Ct);ac=a(nf,"SPAN",{});var of=s(ac);v(So.$$.fragment,of),of.forEach(t),nf.forEach(t),wg=d(wl),sc=a(wl,"SPAN",{});var af=s(sc);Mg=r(af,"Usage example"),af.forEach(t),wl.forEach(t),Tf=d(n),$t=a(n,"P",{});var Ml=s($t);Tg=r(Ml,"In the following we give a simple example of how to use a "),lc=a(Ml,"EM",{});var sf=s(lc);Jg=r(sf,"ControlNet"),sf.forEach(t),Ig=r(Ml,` checkpoint with Diffusers for inference.
The inference pipeline is the same for all pipelines:`),Ml.forEach(t),Jf=d(n),Nt=a(n,"UL",{});var Tl=s(Nt);ic=a(Tl,"LI",{});var lf=s(ic);rc=a(lf,"OL",{});var rf=s(rc);cc=a(rf,"LI",{});var bI=s(cc);Ug=r(bI,"Take an image and run it through a pre-conditioning processor."),bI.forEach(t),rf.forEach(t),lf.forEach(t),Eg=d(Tl),dc=a(Tl,"LI",{});var vI=s(dc);jl=a(vI,"OL",{start:!0});var yI=s(jl);Bo=a(yI,"LI",{});var Bu=s(Bo);jg=r(Bu,"Run the pre-processed image through the "),Zl=a(Bu,"A",{href:!0});var wI=s(Zl);Zg=r(wI,"StableDiffusionControlNetPipeline"),wI.forEach(t),Cg=r(Bu,"."),Bu.forEach(t),yI.forEach(t),vI.forEach(t),Tl.forEach(t),If=d(n),xt=a(n,"P",{});var Pu=s(xt);$g=r(Pu,"Let\u2019s have a look at a simple example using the "),Po=a(Pu,"A",{href:!0,rel:!0});var MI=s(Po);Ng=r(MI,"Canny Edge ControlNet"),MI.forEach(t),xg=r(Pu,"."),Pu.forEach(t),Uf=d(n),v(Fo.$$.fragment,n),Ef=d(n),Cl=a(n,"P",{});var TI=s(Cl);$l=a(TI,"IMG",{src:!0,alt:!0}),TI.forEach(t),jf=d(n),Ge=a(n,"P",{});var zr=s(Ge);kg=r(zr,"Next, we process the image to get the canny image. This is step "),pc=a(zr,"EM",{});var JI=s(pc);Wg=r(JI,"1."),JI.forEach(t),Gg=r(zr," - running the pre-conditioning processor. The pre-conditioning processor is different for every ControlNet. Please see the model cards of the "),Nl=a(zr,"A",{href:!0});var II=s(Nl);Dg=r(II,"official checkpoints"),II.forEach(t),Sg=r(zr," for more information about other models."),zr.forEach(t),Zf=d(n),xl=a(n,"P",{});var UI=s(xl);Bg=r(UI,"First, we need to install opencv:"),UI.forEach(t),Cf=d(n),v(Ro.$$.fragment,n),$f=d(n),kl=a(n,"P",{});var EI=s(kl);Pg=r(EI,"Next, let\u2019s also install all required Hugging Face libraries:"),EI.forEach(t),Nf=d(n),v(Vo.$$.fragment,n),xf=d(n),Wl=a(n,"P",{});var jI=s(Wl);Fg=r(jI,"Then we can retrieve the canny edges of the image."),jI.forEach(t),kf=d(n),v(Xo.$$.fragment,n),Wf=d(n),Gl=a(n,"P",{});var ZI=s(Gl);Rg=r(ZI,"Let\u2019s take a look at the processed image."),ZI.forEach(t),Gf=d(n),Dl=a(n,"P",{});var CI=s(Dl);Sl=a(CI,"IMG",{src:!0,alt:!0}),CI.forEach(t),Df=d(n),kt=a(n,"P",{});var Fu=s(kt);Vg=r(Fu,"Now, we load the official "),Bl=a(Fu,"A",{href:!0});var $I=s(Bl);Xg=r($I,"Stable Diffusion 1.5 Model"),$I.forEach(t),Ag=r(Fu," as well as the ControlNet for canny edges."),Fu.forEach(t),Sf=d(n),v(Ao.$$.fragment,n),Bf=d(n),Wt=a(n,"P",{});var Ru=s(Wt);Yg=r(Ru,"To speed-up things and reduce memory, let\u2019s enable model offloading and use the fast "),Pl=a(Ru,"A",{href:!0});var NI=s(Pl);Qg=r(NI,"UniPCMultistepScheduler"),NI.forEach(t),Lg=r(Ru,"."),Ru.forEach(t),Pf=d(n),v(Yo.$$.fragment,n),Ff=d(n),Fl=a(n,"P",{});var xI=s(Fl);zg=r(xI,"Finally, we can run the pipeline:"),xI.forEach(t),Rf=d(n),v(Qo.$$.fragment,n),Vf=d(n),Rl=a(n,"P",{});var kI=s(Rl);Hg=r(kI,"This should take only around 3-4 seconds on GPU (depending on hardware). The output image then looks as follows:"),kI.forEach(t),Xf=d(n),Vl=a(n,"P",{});var WI=s(Vl);Xl=a(WI,"IMG",{src:!0,alt:!0}),WI.forEach(t),Af=d(n),dt=a(n,"P",{});var cf=s(dt);mc=a(cf,"STRONG",{});var GI=s(mc);qg=r(GI,"Note"),GI.forEach(t),Og=r(cf,": To see how to run all other ControlNet checkpoints, please have a look at "),Al=a(cf,"A",{href:!0});var DI=s(Al);Kg=r(DI,"ControlNet with Stable Diffusion 1.5"),DI.forEach(t),e_=r(cf,"."),cf.forEach(t),Yf=d(n),pt=a(n,"H2",{class:!0});var Vu=s(pt);Gt=a(Vu,"A",{id:!0,class:!0,href:!0});var SI=s(Gt);fc=a(SI,"SPAN",{});var BI=s(fc);v(Lo.$$.fragment,BI),BI.forEach(t),SI.forEach(t),t_=d(Vu),uc=a(Vu,"SPAN",{});var PI=s(uc);n_=r(PI,"Combining multiple conditionings"),PI.forEach(t),Vu.forEach(t),Qf=d(n),Dt=a(n,"P",{});var Xu=s(Dt);o_=r(Xu,"Multiple ControlNet conditionings can be combined for a single image generation. Pass a list of ControlNets to the pipeline\u2019s constructor and a corresponding list of conditionings to "),hc=a(Xu,"CODE",{});var FI=s(hc);a_=r(FI,"__call__"),FI.forEach(t),s_=r(Xu,"."),Xu.forEach(t),Lf=d(n),Yl=a(n,"P",{});var RI=s(Yl);l_=r(RI,"When combining conditionings, it is helpful to mask conditionings such that they do not overlap. In the example, we mask the middle of the canny map where the pose conditioning is located."),RI.forEach(t),zf=d(n),St=a(n,"P",{});var Au=s(St);i_=r(Au,"It can also be helpful to vary the "),gc=a(Au,"CODE",{});var VI=s(gc);r_=r(VI,"controlnet_conditioning_scales"),VI.forEach(t),c_=r(Au," to emphasize one conditioning over the other."),Au.forEach(t),Hf=d(n),mt=a(n,"H3",{class:!0});var Yu=s(mt);Bt=a(Yu,"A",{id:!0,class:!0,href:!0});var XI=s(Bt);_c=a(XI,"SPAN",{});var AI=s(_c);v(zo.$$.fragment,AI),AI.forEach(t),XI.forEach(t),d_=d(Yu),bc=a(Yu,"SPAN",{});var YI=s(bc);p_=r(YI,"Canny conditioning"),YI.forEach(t),Yu.forEach(t),qf=d(n),Ql=a(n,"P",{});var QI=s(Ql);m_=r(QI,"The original image:"),QI.forEach(t),Of=d(n),Ll=a(n,"IMG",{src:!0}),Kf=d(n),zl=a(n,"P",{});var LI=s(zl);f_=r(LI,"Prepare the conditioning:"),LI.forEach(t),eu=d(n),v(Ho.$$.fragment,n),tu=d(n),Hl=a(n,"IMG",{src:!0}),nu=d(n),ft=a(n,"H3",{class:!0});var Qu=s(ft);Pt=a(Qu,"A",{id:!0,class:!0,href:!0});var zI=s(Pt);vc=a(zI,"SPAN",{});var HI=s(vc);v(qo.$$.fragment,HI),HI.forEach(t),zI.forEach(t),u_=d(Qu),yc=a(Qu,"SPAN",{});var qI=s(yc);h_=r(qI,"Openpose conditioning"),qI.forEach(t),Qu.forEach(t),ou=d(n),ql=a(n,"P",{});var OI=s(ql);g_=r(OI,"The original image:"),OI.forEach(t),au=d(n),Oo=a(n,"IMG",{src:!0,width:!0}),su=d(n),Ol=a(n,"P",{});var KI=s(Ol);__=r(KI,"Prepare the conditioning:"),KI.forEach(t),lu=d(n),v(Ko.$$.fragment,n),iu=d(n),ea=a(n,"IMG",{src:!0,width:!0}),ru=d(n),ut=a(n,"H3",{class:!0});var Lu=s(ut);Ft=a(Lu,"A",{id:!0,class:!0,href:!0});var eU=s(Ft);wc=a(eU,"SPAN",{});var tU=s(wc);v(ta.$$.fragment,tU),tU.forEach(t),eU.forEach(t),b_=d(Lu),Mc=a(Lu,"SPAN",{});var nU=s(Mc);v_=r(nU,"Running ControlNet with multiple conditionings"),nU.forEach(t),Lu.forEach(t),cu=d(n),v(na.$$.fragment,n),du=d(n),oa=a(n,"IMG",{src:!0,width:!0}),pu=d(n),ht=a(n,"H3",{class:!0});var zu=s(ht);Rt=a(zu,"A",{id:!0,class:!0,href:!0});var oU=s(Rt);Tc=a(oU,"SPAN",{});var aU=s(Tc);v(aa.$$.fragment,aU),aU.forEach(t),oU.forEach(t),y_=d(zu),Jc=a(zu,"SPAN",{});var sU=s(Jc);w_=r(sU,"Guess Mode"),sU.forEach(t),zu.forEach(t),mu=d(n),De=a(n,"P",{});var Hr=s(De);M_=r(Hr,"Guess Mode is "),sa=a(Hr,"A",{href:!0,rel:!0});var lU=s(sa);T_=r(lU,"a ControlNet feature that was implemented"),lU.forEach(t),J_=r(Hr," after the publication of "),la=a(Hr,"A",{href:!0,rel:!0});var iU=s(la);I_=r(iU,"the paper"),iU.forEach(t),U_=r(Hr,". The description states:"),Hr.forEach(t),fu=d(n),Kl=a(n,"BLOCKQUOTE",{});var rU=s(Kl);Ic=a(rU,"P",{});var cU=s(Ic);E_=r(cU,"In this mode, the ControlNet encoder will try best to recognize the content of the input control map, like depth map, edge map, scribbles, etc, even if you remove all prompts."),cU.forEach(t),rU.forEach(t),uu=d(n),gt=a(n,"H4",{class:!0});var Hu=s(gt);Vt=a(Hu,"A",{id:!0,class:!0,href:!0});var dU=s(Vt);Uc=a(dU,"SPAN",{});var pU=s(Uc);v(ia.$$.fragment,pU),pU.forEach(t),dU.forEach(t),j_=d(Hu),Ec=a(Hu,"SPAN",{});var mU=s(Ec);Z_=r(mU,"The core implementation:"),mU.forEach(t),Hu.forEach(t),hu=d(n),Se=a(n,"P",{});var qr=s(Se);C_=r(qr,"It adjusts the scale of the output residuals from ControlNet by a fixed ratio depending on the block depth. The shallowest DownBlock corresponds to "),jc=a(qr,"CODE",{});var fU=s(jc);$_=r(fU,"0.1"),fU.forEach(t),N_=r(qr,". As the blocks get deeper, the scale increases exponentially, and the scale for the output of the MidBlock becomes "),Zc=a(qr,"CODE",{});var uU=s(Zc);x_=r(uU,"1.0"),uU.forEach(t),k_=r(qr,"."),qr.forEach(t),gu=d(n),Xt=a(n,"P",{});var qu=s(Xt);W_=r(qu,"Since the core implementation is just this, "),Cc=a(qu,"STRONG",{});var hU=s(Cc);G_=r(hU,"it does not have any impact on prompt conditioning"),hU.forEach(t),D_=r(qu,". While it is common to use it without specifying any prompts, it is also possible to provide prompts if desired."),qu.forEach(t),_u=d(n),_t=a(n,"H4",{class:!0});var Ou=s(_t);At=a(Ou,"A",{id:!0,class:!0,href:!0});var gU=s(At);$c=a(gU,"SPAN",{});var _U=s($c);v(ra.$$.fragment,_U),_U.forEach(t),gU.forEach(t),S_=d(Ou),Nc=a(Ou,"SPAN",{});var bU=s(Nc);B_=r(bU,"Usage:"),bU.forEach(t),Ou.forEach(t),bu=d(n),he=a(n,"P",{});var bo=s(he);P_=r(bo,"Just specify "),xc=a(bo,"CODE",{});var vU=s(xc);F_=r(vU,"guess_mode=True"),vU.forEach(t),R_=r(bo," in the pipe() function. A "),kc=a(bo,"CODE",{});var yU=s(kc);V_=r(yU,"guidance_scale"),yU.forEach(t),X_=r(bo," between 3.0 and 5.0 is "),ca=a(bo,"A",{href:!0,rel:!0});var wU=s(ca);A_=r(wU,"recommended"),wU.forEach(t),Y_=r(bo,"."),bo.forEach(t),vu=d(n),v(da.$$.fragment,n),yu=d(n),bt=a(n,"H4",{class:!0});var Ku=s(bt);Yt=a(Ku,"A",{id:!0,class:!0,href:!0});var MU=s(Yt);Wc=a(MU,"SPAN",{});var TU=s(Wc);v(pa.$$.fragment,TU),TU.forEach(t),MU.forEach(t),Q_=d(Ku),Gc=a(Ku,"SPAN",{});var JU=s(Gc);L_=r(JU,"Output image comparison:"),JU.forEach(t),Ku.forEach(t),wu=r(n,`

Canny Control Example
`),Qt=a(n,"TABLE",{});var eh=s(Qt);Dc=a(eh,"THEAD",{});var IU=s(Dc);ma=a(IU,"TR",{});var th=s(ma);Sc=a(th,"TH",{});var UU=s(Sc);z_=r(UU,"no guess_mode with prompt"),UU.forEach(t),H_=d(th),Bc=a(th,"TH",{});var EU=s(Bc);q_=r(EU,"guess_mode without prompt"),EU.forEach(t),th.forEach(t),IU.forEach(t),O_=d(eh),Pc=a(eh,"TBODY",{});var jU=s(Pc);fa=a(jU,"TR",{});var nh=s(fa);Fc=a(nh,"TD",{});var ZU=s(Fc);ei=a(ZU,"A",{href:!0});var CU=s(ei);ti=a(CU,"IMG",{width:!0,src:!0}),CU.forEach(t),ZU.forEach(t),K_=d(nh),Rc=a(nh,"TD",{});var $U=s(Rc);ni=a($U,"A",{href:!0});var NU=s(ni);oi=a(NU,"IMG",{width:!0,src:!0}),NU.forEach(t),$U.forEach(t),nh.forEach(t),jU.forEach(t),eh.forEach(t),Mu=d(n),vt=a(n,"H2",{class:!0});var oh=s(vt);Lt=a(oh,"A",{id:!0,class:!0,href:!0});var xU=s(Lt);Vc=a(xU,"SPAN",{});var kU=s(Vc);v(ua.$$.fragment,kU),kU.forEach(t),xU.forEach(t),eb=d(oh),Xc=a(oh,"SPAN",{});var WU=s(Xc);tb=r(WU,"Available checkpoints"),WU.forEach(t),oh.forEach(t),Tu=d(n),Be=a(n,"P",{});var Or=s(Be);nb=r(Or,"ControlNet requires a "),Ac=a(Or,"EM",{});var GU=s(Ac);ob=r(GU,"control image"),GU.forEach(t),ab=r(Or," in addition to the text-to-image "),Yc=a(Or,"EM",{});var DU=s(Yc);sb=r(DU,"prompt"),DU.forEach(t),lb=r(Or,`.
Each pretrained model is trained using a different conditioning method that requires different images for conditioning the generated outputs. For example, Canny edge conditioning requires the control image to be the output of a Canny filter, while depth conditioning requires the control image to be a depth map. See the overview and image examples below to know more.`),Or.forEach(t),Ju=d(n),zt=a(n,"P",{});var ah=s(zt);ib=r(ah,"All checkpoints can be found under the authors\u2019 namespace "),ha=a(ah,"A",{href:!0,rel:!0});var SU=s(ha);rb=r(SU,"lllyasviel"),SU.forEach(t),cb=r(ah,"."),ah.forEach(t),Iu=d(n),yt=a(n,"P",{});var df=s(yt);Qc=a(df,"STRONG",{});var BU=s(Qc);db=r(BU,"13.04.2024 Update"),BU.forEach(t),pb=r(df,": The author has released improved controlnet checkpoints v1.1 - see "),ai=a(df,"A",{href:!0});var PU=s(ai);mb=r(PU,"here"),PU.forEach(t),fb=r(df,"."),df.forEach(t),Uu=d(n),wt=a(n,"H3",{class:!0});var sh=s(wt);Ht=a(sh,"A",{id:!0,class:!0,href:!0});var FU=s(Ht);Lc=a(FU,"SPAN",{});var RU=s(Lc);v(ga.$$.fragment,RU),RU.forEach(t),FU.forEach(t),ub=d(sh),zc=a(sh,"SPAN",{});var VU=s(zc);hb=r(VU,"ControlNet v1.0"),VU.forEach(t),sh.forEach(t),Eu=d(n),qt=a(n,"TABLE",{});var lh=s(qt);Hc=a(lh,"THEAD",{});var XU=s(Hc);Ee=a(XU,"TR",{});var vo=s(Ee);qc=a(vo,"TH",{});var AU=s(qc);gb=r(AU,"Model Name"),AU.forEach(t),_b=d(vo),Oc=a(vo,"TH",{});var YU=s(Oc);bb=r(YU,"Control Image Overview"),YU.forEach(t),vb=d(vo),Kc=a(vo,"TH",{});var QU=s(Kc);yb=r(QU,"Control Image Example"),QU.forEach(t),wb=d(vo),ed=a(vo,"TH",{});var LU=s(ed);Mb=r(LU,"Generated Image Example"),LU.forEach(t),vo.forEach(t),XU.forEach(t),Tb=d(lh),B=a(lh,"TBODY",{});var A=s(B);je=a(A,"TR",{});var yo=s(je);Ot=a(yo,"TD",{});var pf=s(Ot);_a=a(pf,"A",{href:!0,rel:!0});var zU=s(_a);Jb=r(zU,"lllyasviel/sd-controlnet-canny"),zU.forEach(t),Ib=a(pf,"BR",{}),Ub=d(pf),td=a(pf,"EM",{});var HU=s(td);Eb=r(HU,"Trained with canny edge detection"),HU.forEach(t),pf.forEach(t),jb=d(yo),nd=a(yo,"TD",{});var qU=s(nd);Zb=r(qU,"A monochrome image with white edges on a black background."),qU.forEach(t),Cb=d(yo),od=a(yo,"TD",{});var OU=s(od);si=a(OU,"A",{href:!0});var KU=s(si);Kt=a(KU,"IMG",{width:!0,style:!0,src:!0}),KU.forEach(t),OU.forEach(t),$b=d(yo),ad=a(yo,"TD",{});var eE=s(ad);li=a(eE,"A",{href:!0});var tE=s(li);ii=a(tE,"IMG",{width:!0,src:!0}),tE.forEach(t),eE.forEach(t),yo.forEach(t),Nb=d(A),Ze=a(A,"TR",{});var wo=s(Ze);en=a(wo,"TD",{});var mf=s(en);ba=a(mf,"A",{href:!0,rel:!0});var nE=s(ba);xb=r(nE,"lllyasviel/sd-controlnet-depth"),nE.forEach(t),kb=a(mf,"BR",{}),Wb=d(mf),sd=a(mf,"EM",{});var oE=s(sd);Gb=r(oE,"Trained with Midas depth estimation"),oE.forEach(t),mf.forEach(t),Db=d(wo),ld=a(wo,"TD",{});var aE=s(ld);Sb=r(aE,"A grayscale image with black representing deep areas and white representing shallow areas."),aE.forEach(t),Bb=d(wo),id=a(wo,"TD",{});var sE=s(id);ri=a(sE,"A",{href:!0});var lE=s(ri);ci=a(lE,"IMG",{width:!0,src:!0}),lE.forEach(t),sE.forEach(t),Pb=d(wo),rd=a(wo,"TD",{});var iE=s(rd);di=a(iE,"A",{href:!0});var rE=s(di);pi=a(rE,"IMG",{width:!0,src:!0}),rE.forEach(t),iE.forEach(t),wo.forEach(t),Fb=d(A),Ce=a(A,"TR",{});var Mo=s(Ce);tn=a(Mo,"TD",{});var ff=s(tn);va=a(ff,"A",{href:!0,rel:!0});var cE=s(va);Rb=r(cE,"lllyasviel/sd-controlnet-hed"),cE.forEach(t),Vb=a(ff,"BR",{}),Xb=d(ff),cd=a(ff,"EM",{});var dE=s(cd);Ab=r(dE,"Trained with HED edge detection (soft edge)"),dE.forEach(t),ff.forEach(t),Yb=d(Mo),dd=a(Mo,"TD",{});var pE=s(dd);Qb=r(pE,"A monochrome image with white soft edges on a black background."),pE.forEach(t),Lb=d(Mo),pd=a(Mo,"TD",{});var mE=s(pd);mi=a(mE,"A",{href:!0});var fE=s(mi);fi=a(fE,"IMG",{width:!0,src:!0}),fE.forEach(t),mE.forEach(t),zb=d(Mo),md=a(Mo,"TD",{});var uE=s(md);ui=a(uE,"A",{href:!0});var hE=s(ui);hi=a(hE,"IMG",{width:!0,src:!0}),hE.forEach(t),uE.forEach(t),Mo.forEach(t),Hb=d(A),$e=a(A,"TR",{});var To=s($e);nn=a(To,"TD",{});var uf=s(nn);ya=a(uf,"A",{href:!0,rel:!0});var gE=s(ya);qb=r(gE,"lllyasviel/sd-controlnet-mlsd"),gE.forEach(t),Ob=a(uf,"BR",{}),Kb=d(uf),fd=a(uf,"EM",{});var _E=s(fd);ev=r(_E,"Trained with M-LSD line detection"),_E.forEach(t),uf.forEach(t),tv=d(To),ud=a(To,"TD",{});var bE=s(ud);nv=r(bE,"A monochrome image composed only of white straight lines on a black background."),bE.forEach(t),ov=d(To),hd=a(To,"TD",{});var vE=s(hd);gi=a(vE,"A",{href:!0});var yE=s(gi);_i=a(yE,"IMG",{width:!0,src:!0}),yE.forEach(t),vE.forEach(t),av=d(To),gd=a(To,"TD",{});var wE=s(gd);bi=a(wE,"A",{href:!0});var ME=s(bi);vi=a(ME,"IMG",{width:!0,src:!0}),ME.forEach(t),wE.forEach(t),To.forEach(t),sv=d(A),Ne=a(A,"TR",{});var Jo=s(Ne);on=a(Jo,"TD",{});var hf=s(on);wa=a(hf,"A",{href:!0,rel:!0});var TE=s(wa);lv=r(TE,"lllyasviel/sd-controlnet-normal"),TE.forEach(t),iv=a(hf,"BR",{}),rv=d(hf),_d=a(hf,"EM",{});var JE=s(_d);cv=r(JE,"Trained with normal map"),JE.forEach(t),hf.forEach(t),dv=d(Jo),Ma=a(Jo,"TD",{});var ih=s(Ma);pv=r(ih,"A "),Ta=a(ih,"A",{href:!0,rel:!0});var IE=s(Ta);mv=r(IE,"normal mapped"),IE.forEach(t),fv=r(ih," image."),ih.forEach(t),uv=d(Jo),bd=a(Jo,"TD",{});var UE=s(bd);yi=a(UE,"A",{href:!0});var EE=s(yi);wi=a(EE,"IMG",{width:!0,src:!0}),EE.forEach(t),UE.forEach(t),hv=d(Jo),vd=a(Jo,"TD",{});var jE=s(vd);Mi=a(jE,"A",{href:!0});var ZE=s(Mi);Ti=a(ZE,"IMG",{width:!0,src:!0}),ZE.forEach(t),jE.forEach(t),Jo.forEach(t),gv=d(A),xe=a(A,"TR",{});var Io=s(xe);an=a(Io,"TD",{});var gf=s(an);Ja=a(gf,"A",{href:!0,rel:!0});var CE=s(Ja);_v=r(CE,"lllyasviel/sd-controlnet-openpose"),CE.forEach(t),bv=a(gf,"BR",{}),vv=d(gf),yd=a(gf,"EM",{});var $E=s(yd);yv=r($E,"Trained with OpenPose bone image"),$E.forEach(t),gf.forEach(t),wv=d(Io),Ia=a(Io,"TD",{});var rh=s(Ia);Mv=r(rh,"A "),Ua=a(rh,"A",{href:!0,rel:!0});var NE=s(Ua);Tv=r(NE,"OpenPose bone"),NE.forEach(t),Jv=r(rh," image."),rh.forEach(t),Iv=d(Io),wd=a(Io,"TD",{});var xE=s(wd);Ji=a(xE,"A",{href:!0});var kE=s(Ji);Ii=a(kE,"IMG",{width:!0,src:!0}),kE.forEach(t),xE.forEach(t),Uv=d(Io),Md=a(Io,"TD",{});var WE=s(Md);Ui=a(WE,"A",{href:!0});var GE=s(Ui);Ei=a(GE,"IMG",{width:!0,src:!0}),GE.forEach(t),WE.forEach(t),Io.forEach(t),Ev=d(A),ke=a(A,"TR",{});var Uo=s(ke);sn=a(Uo,"TD",{});var _f=s(sn);Ea=a(_f,"A",{href:!0,rel:!0});var DE=s(Ea);jv=r(DE,"lllyasviel/sd-controlnet-scribble"),DE.forEach(t),Zv=a(_f,"BR",{}),Cv=d(_f),Td=a(_f,"EM",{});var SE=s(Td);$v=r(SE,"Trained with human scribbles"),SE.forEach(t),_f.forEach(t),Nv=d(Uo),Jd=a(Uo,"TD",{});var BE=s(Jd);xv=r(BE,"A hand-drawn monochrome image with white outlines on a black background."),BE.forEach(t),kv=d(Uo),Id=a(Uo,"TD",{});var PE=s(Id);ji=a(PE,"A",{href:!0});var FE=s(ji);Zi=a(FE,"IMG",{width:!0,src:!0}),FE.forEach(t),PE.forEach(t),Wv=d(Uo),Ud=a(Uo,"TD",{});var RE=s(Ud);Ci=a(RE,"A",{href:!0});var VE=s(Ci);$i=a(VE,"IMG",{width:!0,src:!0}),VE.forEach(t),RE.forEach(t),Uo.forEach(t),Gv=d(A),We=a(A,"TR",{});var Eo=s(We);ja=a(Eo,"TD",{});var ch=s(ja);Za=a(ch,"A",{href:!0,rel:!0});var XE=s(Za);Dv=r(XE,"lllyasviel/sd-controlnet-seg"),XE.forEach(t),Sv=a(ch,"BR",{}),Ed=a(ch,"EM",{});var AE=s(Ed);Bv=r(AE,"Trained with semantic segmentation"),AE.forEach(t),ch.forEach(t),Pv=d(Eo),Ca=a(Eo,"TD",{});var dh=s(Ca);Fv=r(dh,"An "),$a=a(dh,"A",{href:!0,rel:!0});var YE=s($a);Rv=r(YE,"ADE20K"),YE.forEach(t),Vv=r(dh,"\u2019s segmentation protocol image."),dh.forEach(t),Xv=d(Eo),jd=a(Eo,"TD",{});var QE=s(jd);Ni=a(QE,"A",{href:!0});var LE=s(Ni);xi=a(LE,"IMG",{width:!0,src:!0}),LE.forEach(t),QE.forEach(t),Av=d(Eo),Zd=a(Eo,"TD",{});var zE=s(Zd);ki=a(zE,"A",{href:!0});var HE=s(ki);Wi=a(HE,"IMG",{width:!0,src:!0}),HE.forEach(t),zE.forEach(t),Eo.forEach(t),A.forEach(t),lh.forEach(t),ju=d(n),Mt=a(n,"H3",{class:!0});var ph=s(Mt);ln=a(ph,"A",{id:!0,class:!0,href:!0});var qE=s(ln);Cd=a(qE,"SPAN",{});var OE=s(Cd);v(Na.$$.fragment,OE),OE.forEach(t),qE.forEach(t),Yv=d(ph),$d=a(ph,"SPAN",{});var KE=s($d);Qv=r(KE,"ControlNet v1.1"),KE.forEach(t),ph.forEach(t),Zu=d(n),rn=a(n,"TABLE",{});var mh=s(rn);Nd=a(mh,"THEAD",{});var ej=s(Nd);H=a(ej,"TR",{});var Xe=s(H);xd=a(Xe,"TH",{});var tj=s(xd);Lv=r(tj,"Model Name"),tj.forEach(t),zv=d(Xe),kd=a(Xe,"TH",{});var nj=s(kd);Hv=r(nj,"Control Image Overview"),nj.forEach(t),qv=d(Xe),Wd=a(Xe,"TH",{});var oj=s(Wd);Ov=r(oj,"Condition Image"),oj.forEach(t),Kv=d(Xe),Gd=a(Xe,"TH",{});var aj=s(Gd);ey=r(aj,"Control Image Example"),aj.forEach(t),ty=d(Xe),Dd=a(Xe,"TH",{});var sj=s(Dd);ny=r(sj,"Generated Image Example"),sj.forEach(t),Xe.forEach(t),ej.forEach(t),oy=d(mh),W=a(mh,"TBODY",{});var D=s(W);q=a(D,"TR",{});var Ae=s(q);Gi=a(Ae,"TD",{});var aJ=s(Gi);xa=a(aJ,"A",{href:!0,rel:!0});var lj=s(xa);ay=r(lj,"lllyasviel/control_v11p_sd15_canny"),lj.forEach(t),sy=a(aJ,"BR",{}),aJ.forEach(t),ly=d(Ae),Sd=a(Ae,"TD",{});var ij=s(Sd);Bd=a(ij,"EM",{});var rj=s(Bd);iy=r(rj,"Trained with canny edge detection"),rj.forEach(t),ij.forEach(t),ry=d(Ae),Pd=a(Ae,"TD",{});var cj=s(Pd);cy=r(cj,"A monochrome image with white edges on a black background."),cj.forEach(t),dy=d(Ae),Fd=a(Ae,"TD",{});var dj=s(Fd);Di=a(dj,"A",{href:!0});var pj=s(Di);cn=a(pj,"IMG",{width:!0,style:!0,src:!0}),pj.forEach(t),dj.forEach(t),py=d(Ae),Rd=a(Ae,"TD",{});var mj=s(Rd);Si=a(mj,"A",{href:!0});var fj=s(Si);Bi=a(fj,"IMG",{width:!0,src:!0}),fj.forEach(t),mj.forEach(t),Ae.forEach(t),my=d(D),O=a(D,"TR",{});var Ye=s(O);Pi=a(Ye,"TD",{});var sJ=s(Pi);ka=a(sJ,"A",{href:!0,rel:!0});var uj=s(ka);fy=r(uj,"lllyasviel/control_v11e_sd15_ip2p"),uj.forEach(t),uy=a(sJ,"BR",{}),sJ.forEach(t),hy=d(Ye),Vd=a(Ye,"TD",{});var hj=s(Vd);Xd=a(hj,"EM",{});var gj=s(Xd);gy=r(gj,"Trained with pixel to pixel instruction"),gj.forEach(t),hj.forEach(t),_y=d(Ye),Ad=a(Ye,"TD",{});var _j=s(Ad);by=r(_j,"No condition ."),_j.forEach(t),vy=d(Ye),Yd=a(Ye,"TD",{});var bj=s(Yd);Fi=a(bj,"A",{href:!0});var vj=s(Fi);dn=a(vj,"IMG",{width:!0,style:!0,src:!0}),vj.forEach(t),bj.forEach(t),yy=d(Ye),Qd=a(Ye,"TD",{});var yj=s(Qd);Ri=a(yj,"A",{href:!0});var wj=s(Ri);Vi=a(wj,"IMG",{width:!0,src:!0}),wj.forEach(t),yj.forEach(t),Ye.forEach(t),wy=d(D),K=a(D,"TR",{});var Qe=s(K);Xi=a(Qe,"TD",{});var lJ=s(Xi);Wa=a(lJ,"A",{href:!0,rel:!0});var Mj=s(Wa);My=r(Mj,"lllyasviel/control_v11p_sd15_inpaint"),Mj.forEach(t),Ty=a(lJ,"BR",{}),lJ.forEach(t),Jy=d(Qe),Ld=a(Qe,"TD",{});var Tj=s(Ld);Iy=r(Tj,"Trained with image inpainting"),Tj.forEach(t),Uy=d(Qe),zd=a(Qe,"TD",{});var Jj=s(zd);Ey=r(Jj,"No condition."),Jj.forEach(t),jy=d(Qe),Hd=a(Qe,"TD",{});var Ij=s(Hd);Ai=a(Ij,"A",{href:!0});var Uj=s(Ai);pn=a(Uj,"IMG",{width:!0,style:!0,src:!0}),Uj.forEach(t),Ij.forEach(t),Zy=d(Qe),qd=a(Qe,"TD",{});var Ej=s(qd);Yi=a(Ej,"A",{href:!0});var jj=s(Yi);Qi=a(jj,"IMG",{width:!0,src:!0}),jj.forEach(t),Ej.forEach(t),Qe.forEach(t),Cy=d(D),ee=a(D,"TR",{});var Le=s(ee);Li=a(Le,"TD",{});var iJ=s(Li);Ga=a(iJ,"A",{href:!0,rel:!0});var Zj=s(Ga);$y=r(Zj,"lllyasviel/control_v11p_sd15_mlsd"),Zj.forEach(t),Ny=a(iJ,"BR",{}),iJ.forEach(t),xy=d(Le),Od=a(Le,"TD",{});var Cj=s(Od);ky=r(Cj,"Trained with multi-level line segment detection"),Cj.forEach(t),Wy=d(Le),Kd=a(Le,"TD",{});var $j=s(Kd);Gy=r($j,"An image with annotated line segments."),$j.forEach(t),Dy=d(Le),ep=a(Le,"TD",{});var Nj=s(ep);zi=a(Nj,"A",{href:!0});var xj=s(zi);mn=a(xj,"IMG",{width:!0,style:!0,src:!0}),xj.forEach(t),Nj.forEach(t),Sy=d(Le),tp=a(Le,"TD",{});var kj=s(tp);Hi=a(kj,"A",{href:!0});var Wj=s(Hi);qi=a(Wj,"IMG",{width:!0,src:!0}),Wj.forEach(t),kj.forEach(t),Le.forEach(t),By=d(D),te=a(D,"TR",{});var ze=s(te);Oi=a(ze,"TD",{});var rJ=s(Oi);Da=a(rJ,"A",{href:!0,rel:!0});var Gj=s(Da);Py=r(Gj,"lllyasviel/control_v11f1p_sd15_depth"),Gj.forEach(t),Fy=a(rJ,"BR",{}),rJ.forEach(t),Ry=d(ze),np=a(ze,"TD",{});var Dj=s(np);Vy=r(Dj,"Trained with depth estimation"),Dj.forEach(t),Xy=d(ze),op=a(ze,"TD",{});var Sj=s(op);Ay=r(Sj,"An image with depth information, usually represented as a grayscale image."),Sj.forEach(t),Yy=d(ze),ap=a(ze,"TD",{});var Bj=s(ap);Ki=a(Bj,"A",{href:!0});var Pj=s(Ki);fn=a(Pj,"IMG",{width:!0,style:!0,src:!0}),Pj.forEach(t),Bj.forEach(t),Qy=d(ze),sp=a(ze,"TD",{});var Fj=s(sp);er=a(Fj,"A",{href:!0});var Rj=s(er);tr=a(Rj,"IMG",{width:!0,src:!0}),Rj.forEach(t),Fj.forEach(t),ze.forEach(t),Ly=d(D),ne=a(D,"TR",{});var He=s(ne);nr=a(He,"TD",{});var cJ=s(nr);Sa=a(cJ,"A",{href:!0,rel:!0});var Vj=s(Sa);zy=r(Vj,"lllyasviel/control_v11p_sd15_normalbae"),Vj.forEach(t),Hy=a(cJ,"BR",{}),cJ.forEach(t),qy=d(He),lp=a(He,"TD",{});var Xj=s(lp);Oy=r(Xj,"Trained with surface normal estimation"),Xj.forEach(t),Ky=d(He),ip=a(He,"TD",{});var Aj=s(ip);e1=r(Aj,"An image with surface normal information, usually represented as a color-coded image."),Aj.forEach(t),t1=d(He),rp=a(He,"TD",{});var Yj=s(rp);or=a(Yj,"A",{href:!0});var Qj=s(or);un=a(Qj,"IMG",{width:!0,style:!0,src:!0}),Qj.forEach(t),Yj.forEach(t),n1=d(He),cp=a(He,"TD",{});var Lj=s(cp);ar=a(Lj,"A",{href:!0});var zj=s(ar);sr=a(zj,"IMG",{width:!0,src:!0}),zj.forEach(t),Lj.forEach(t),He.forEach(t),o1=d(D),oe=a(D,"TR",{});var qe=s(oe);lr=a(qe,"TD",{});var dJ=s(lr);Ba=a(dJ,"A",{href:!0,rel:!0});var Hj=s(Ba);a1=r(Hj,"lllyasviel/control_v11p_sd15_seg"),Hj.forEach(t),s1=a(dJ,"BR",{}),dJ.forEach(t),l1=d(qe),dp=a(qe,"TD",{});var qj=s(dp);i1=r(qj,"Trained with image segmentation"),qj.forEach(t),r1=d(qe),pp=a(qe,"TD",{});var Oj=s(pp);c1=r(Oj,"An image with segmented regions, usually represented as a color-coded image."),Oj.forEach(t),d1=d(qe),mp=a(qe,"TD",{});var Kj=s(mp);ir=a(Kj,"A",{href:!0});var e5=s(ir);hn=a(e5,"IMG",{width:!0,style:!0,src:!0}),e5.forEach(t),Kj.forEach(t),p1=d(qe),fp=a(qe,"TD",{});var t5=s(fp);rr=a(t5,"A",{href:!0});var n5=s(rr);cr=a(n5,"IMG",{width:!0,src:!0}),n5.forEach(t),t5.forEach(t),qe.forEach(t),m1=d(D),ae=a(D,"TR",{});var Oe=s(ae);dr=a(Oe,"TD",{});var pJ=s(dr);Pa=a(pJ,"A",{href:!0,rel:!0});var o5=s(Pa);f1=r(o5,"lllyasviel/control_v11p_sd15_lineart"),o5.forEach(t),u1=a(pJ,"BR",{}),pJ.forEach(t),h1=d(Oe),up=a(Oe,"TD",{});var a5=s(up);g1=r(a5,"Trained with line art generation"),a5.forEach(t),_1=d(Oe),hp=a(Oe,"TD",{});var s5=s(hp);b1=r(s5,"An image with line art, usually black lines on a white background."),s5.forEach(t),v1=d(Oe),gp=a(Oe,"TD",{});var l5=s(gp);pr=a(l5,"A",{href:!0});var i5=s(pr);gn=a(i5,"IMG",{width:!0,style:!0,src:!0}),i5.forEach(t),l5.forEach(t),y1=d(Oe),_p=a(Oe,"TD",{});var r5=s(_p);mr=a(r5,"A",{href:!0});var c5=s(mr);fr=a(c5,"IMG",{width:!0,src:!0}),c5.forEach(t),r5.forEach(t),Oe.forEach(t),w1=d(D),se=a(D,"TR",{});var Ke=s(se);ur=a(Ke,"TD",{});var mJ=s(ur);Fa=a(mJ,"A",{href:!0,rel:!0});var d5=s(Fa);M1=r(d5,"lllyasviel/control_v11p_sd15s2_lineart_anime"),d5.forEach(t),T1=a(mJ,"BR",{}),mJ.forEach(t),J1=d(Ke),bp=a(Ke,"TD",{});var p5=s(bp);I1=r(p5,"Trained with anime line art generation"),p5.forEach(t),U1=d(Ke),vp=a(Ke,"TD",{});var m5=s(vp);E1=r(m5,"An image with anime-style line art."),m5.forEach(t),j1=d(Ke),yp=a(Ke,"TD",{});var f5=s(yp);hr=a(f5,"A",{href:!0});var u5=s(hr);_n=a(u5,"IMG",{width:!0,style:!0,src:!0}),u5.forEach(t),f5.forEach(t),Z1=d(Ke),wp=a(Ke,"TD",{});var h5=s(wp);gr=a(h5,"A",{href:!0});var g5=s(gr);_r=a(g5,"IMG",{width:!0,src:!0}),g5.forEach(t),h5.forEach(t),Ke.forEach(t),C1=d(D),le=a(D,"TR",{});var et=s(le);br=a(et,"TD",{});var fJ=s(br);Ra=a(fJ,"A",{href:!0,rel:!0});var _5=s(Ra);$1=r(_5,"lllyasviel/control_v11p_sd15_openpose"),_5.forEach(t),N1=a(fJ,"BR",{}),fJ.forEach(t),x1=d(et),Mp=a(et,"TD",{});var b5=s(Mp);k1=r(b5,"Trained with human pose estimation"),b5.forEach(t),W1=d(et),Tp=a(et,"TD",{});var v5=s(Tp);G1=r(v5,"An image with human poses, usually represented as a set of keypoints or skeletons."),v5.forEach(t),D1=d(et),Jp=a(et,"TD",{});var y5=s(Jp);vr=a(y5,"A",{href:!0});var w5=s(vr);bn=a(w5,"IMG",{width:!0,style:!0,src:!0}),w5.forEach(t),y5.forEach(t),S1=d(et),Ip=a(et,"TD",{});var M5=s(Ip);yr=a(M5,"A",{href:!0});var T5=s(yr);wr=a(T5,"IMG",{width:!0,src:!0}),T5.forEach(t),M5.forEach(t),et.forEach(t),B1=d(D),ie=a(D,"TR",{});var tt=s(ie);Mr=a(tt,"TD",{});var uJ=s(Mr);Va=a(uJ,"A",{href:!0,rel:!0});var J5=s(Va);P1=r(J5,"lllyasviel/control_v11p_sd15_scribble"),J5.forEach(t),F1=a(uJ,"BR",{}),uJ.forEach(t),R1=d(tt),Up=a(tt,"TD",{});var I5=s(Up);V1=r(I5,"Trained with scribble-based image generation"),I5.forEach(t),X1=d(tt),Ep=a(tt,"TD",{});var U5=s(Ep);A1=r(U5,"An image with scribbles, usually random or user-drawn strokes."),U5.forEach(t),Y1=d(tt),jp=a(tt,"TD",{});var E5=s(jp);Tr=a(E5,"A",{href:!0});var j5=s(Tr);vn=a(j5,"IMG",{width:!0,style:!0,src:!0}),j5.forEach(t),E5.forEach(t),Q1=d(tt),Zp=a(tt,"TD",{});var Z5=s(Zp);Jr=a(Z5,"A",{href:!0});var C5=s(Jr);Ir=a(C5,"IMG",{width:!0,src:!0}),C5.forEach(t),Z5.forEach(t),tt.forEach(t),L1=d(D),re=a(D,"TR",{});var nt=s(re);Ur=a(nt,"TD",{});var hJ=s(Ur);Xa=a(hJ,"A",{href:!0,rel:!0});var $5=s(Xa);z1=r($5,"lllyasviel/control_v11p_sd15_softedge"),$5.forEach(t),H1=a(hJ,"BR",{}),hJ.forEach(t),q1=d(nt),Cp=a(nt,"TD",{});var N5=s(Cp);O1=r(N5,"Trained with soft edge image generation"),N5.forEach(t),K1=d(nt),$p=a(nt,"TD",{});var x5=s($p);ew=r(x5,"An image with soft edges, usually to create a more painterly or artistic effect."),x5.forEach(t),tw=d(nt),Np=a(nt,"TD",{});var k5=s(Np);Er=a(k5,"A",{href:!0});var W5=s(Er);yn=a(W5,"IMG",{width:!0,style:!0,src:!0}),W5.forEach(t),k5.forEach(t),nw=d(nt),xp=a(nt,"TD",{});var G5=s(xp);jr=a(G5,"A",{href:!0});var D5=s(jr);Zr=a(D5,"IMG",{width:!0,src:!0}),D5.forEach(t),G5.forEach(t),nt.forEach(t),ow=d(D),ce=a(D,"TR",{});var ot=s(ce);Cr=a(ot,"TD",{});var gJ=s(Cr);Aa=a(gJ,"A",{href:!0,rel:!0});var S5=s(Aa);aw=r(S5,"lllyasviel/control_v11e_sd15_shuffle"),S5.forEach(t),sw=a(gJ,"BR",{}),gJ.forEach(t),lw=d(ot),kp=a(ot,"TD",{});var B5=s(kp);iw=r(B5,"Trained with image shuffling"),B5.forEach(t),rw=d(ot),Wp=a(ot,"TD",{});var P5=s(Wp);cw=r(P5,"An image with shuffled patches or regions."),P5.forEach(t),dw=d(ot),Gp=a(ot,"TD",{});var F5=s(Gp);$r=a(F5,"A",{href:!0});var R5=s($r);wn=a(R5,"IMG",{width:!0,style:!0,src:!0}),R5.forEach(t),F5.forEach(t),pw=d(ot),Dp=a(ot,"TD",{});var V5=s(Dp);Nr=a(V5,"A",{href:!0});var X5=s(Nr);xr=a(X5,"IMG",{width:!0,src:!0}),X5.forEach(t),V5.forEach(t),ot.forEach(t),mw=d(D),de=a(D,"TR",{});var at=s(de);kr=a(at,"TD",{});var _J=s(kr);Ya=a(_J,"A",{href:!0,rel:!0});var A5=s(Ya);fw=r(A5,"lllyasviel/control_v11f1e_sd15_tile"),A5.forEach(t),uw=a(_J,"BR",{}),_J.forEach(t),hw=d(at),Sp=a(at,"TD",{});var Y5=s(Sp);gw=r(Y5,"Trained with image tiling"),Y5.forEach(t),_w=d(at),Bp=a(at,"TD",{});var Q5=s(Bp);bw=r(Q5,"A blurry image or part of an image ."),Q5.forEach(t),vw=d(at),Pp=a(at,"TD",{});var L5=s(Pp);Wr=a(L5,"A",{href:!0});var z5=s(Wr);Mn=a(z5,"IMG",{width:!0,style:!0,src:!0}),z5.forEach(t),L5.forEach(t),yw=d(at),Fp=a(at,"TD",{});var H5=s(Fp);Gr=a(H5,"A",{href:!0});var q5=s(Gr);Dr=a(q5,"IMG",{width:!0,src:!0}),q5.forEach(t),H5.forEach(t),at.forEach(t),D.forEach(t),mh.forEach(t),Cu=d(n),Tt=a(n,"H2",{class:!0});var fh=s(Tt);Tn=a(fh,"A",{id:!0,class:!0,href:!0});var O5=s(Tn);Rp=a(O5,"SPAN",{});var K5=s(Rp);v(Qa.$$.fragment,K5),K5.forEach(t),O5.forEach(t),ww=d(fh),Vp=a(fh,"SPAN",{});var eZ=s(Vp);Mw=r(eZ,"StableDiffusionControlNetPipeline"),eZ.forEach(t),fh.forEach(t),$u=d(n),C=a(n,"DIV",{class:!0});var x=s(C);v(La.$$.fragment,x),Tw=d(x),Xp=a(x,"P",{});var tZ=s(Xp);Jw=r(tZ,"Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),tZ.forEach(t),Iw=d(x),za=a(x,"P",{});var uh=s(za);Uw=r(uh,"This model inherits from "),Sr=a(uh,"A",{href:!0});var nZ=s(Sr);Ew=r(nZ,"DiffusionPipeline"),nZ.forEach(t),jw=r(uh,`. 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.)`),uh.forEach(t),Zw=d(x),Ap=a(x,"P",{});var oZ=s(Ap);Cw=r(oZ,"In addition the pipeline inherits the following loading methods:"),oZ.forEach(t),$w=d(x),Yp=a(x,"UL",{});var aZ=s(Yp);Ha=a(aZ,"LI",{});var hh=s(Ha);Qp=a(hh,"EM",{});var sZ=s(Qp);Nw=r(sZ,"Textual-Inversion"),sZ.forEach(t),xw=r(hh,": "),Br=a(hh,"A",{href:!0});var lZ=s(Br);kw=r(lZ,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),lZ.forEach(t),hh.forEach(t),aZ.forEach(t),Ww=d(x),Pe=a(x,"DIV",{class:!0});var Kr=s(Pe);v(qa.$$.fragment,Kr),Gw=d(Kr),Lp=a(Kr,"P",{});var iZ=s(Lp);Dw=r(iZ,"Function invoked when calling the pipeline for generation."),iZ.forEach(t),Sw=d(Kr),v(Jn.$$.fragment,Kr),Kr.forEach(t),Bw=d(x),ge=a(x,"DIV",{class:!0});var jo=s(ge);v(Oa.$$.fragment,jo),Pw=d(jo),zp=a(jo,"P",{});var rZ=s(zp);Fw=r(rZ,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),rZ.forEach(t),Rw=d(jo),v(In.$$.fragment,jo),Vw=d(jo),v(Un.$$.fragment,jo),jo.forEach(t),Xw=d(x),En=a(x,"DIV",{class:!0});var gh=s(En);v(Ka.$$.fragment,gh),Aw=d(gh),es=a(gh,"P",{});var _h=s(es);Yw=r(_h,"Disable sliced attention computation. If "),Hp=a(_h,"CODE",{});var cZ=s(Hp);Qw=r(cZ,"enable_attention_slicing"),cZ.forEach(t),Lw=r(_h,` was previously called, attention is
computed in one step.`),_h.forEach(t),gh.forEach(t),zw=d(x),jn=a(x,"DIV",{class:!0});var bh=s(jn);v(ts.$$.fragment,bh),Hw=d(bh),qp=a(bh,"P",{});var dZ=s(qp);qw=r(dZ,`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.`),dZ.forEach(t),bh.forEach(t),Ow=d(x),Zn=a(x,"DIV",{class:!0});var vh=s(Zn);v(ns.$$.fragment,vh),Kw=d(vh),os=a(vh,"P",{});var yh=s(os);e2=r(yh,"Disable sliced VAE decoding. If "),Op=a(yh,"CODE",{});var pZ=s(Op);t2=r(pZ,"enable_vae_slicing"),pZ.forEach(t),n2=r(yh,` was previously enabled, this method will go back to
computing decoding in one step.`),yh.forEach(t),vh.forEach(t),o2=d(x),_e=a(x,"DIV",{class:!0});var Zo=s(_e);v(as.$$.fragment,Zo),a2=d(Zo),ss=a(Zo,"P",{});var wh=s(ss);s2=r(wh,"Enable memory efficient attention from "),ls=a(wh,"A",{href:!0,rel:!0});var mZ=s(ls);l2=r(mZ,"xFormers"),mZ.forEach(t),i2=r(wh,`. 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.`),wh.forEach(t),r2=d(Zo),v(Cn.$$.fragment,Zo),c2=d(Zo),v($n.$$.fragment,Zo),Zo.forEach(t),d2=d(x),Nn=a(x,"DIV",{class:!0});var Mh=s(Nn);v(is.$$.fragment,Mh),p2=d(Mh),rs=a(Mh,"P",{});var Th=s(rs);m2=r(Th,"Disable memory efficient attention from "),cs=a(Th,"A",{href:!0,rel:!0});var fZ=s(cs);f2=r(fZ,"xFormers"),fZ.forEach(t),u2=r(Th,"."),Th.forEach(t),Mh.forEach(t),h2=d(x),R=a(x,"DIV",{class:!0});var Me=s(R);v(ds.$$.fragment,Me),g2=d(Me),ps=a(Me,"P",{});var Jh=s(ps);_2=r(Jh,"Load textual inversion embeddings into the text encoder of "),Pr=a(Jh,"A",{href:!0});var uZ=s(Pr);b2=r(uZ,"StableDiffusionPipeline"),uZ.forEach(t),v2=r(Jh,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Jh.forEach(t),y2=d(Me),Kp=a(Me,"P",{});var hZ=s(Kp);w2=r(hZ,"Example:"),hZ.forEach(t),M2=d(Me),v(xn.$$.fragment,Me),T2=d(Me),ms=a(Me,"P",{});var Ih=s(ms);J2=r(Ih,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),fs=a(Ih,"A",{href:!0,rel:!0});var gZ=s(fs);I2=r(gZ,"civitAI"),gZ.forEach(t),U2=r(Ih,") and then load the vector"),Ih.forEach(t),E2=d(Me),v(kn.$$.fragment,Me),Me.forEach(t),j2=d(x),Wn=a(x,"DIV",{class:!0});var Uh=s(Wn);v(us.$$.fragment,Uh),Z2=d(Uh),hs=a(Uh,"P",{});var Eh=s(hs);C2=r(Eh,"Disable tiled VAE decoding. If "),em=a(Eh,"CODE",{});var _Z=s(em);$2=r(_Z,"enable_vae_tiling"),_Z.forEach(t),N2=r(Eh,` was previously enabled, this method will go back to
computing decoding in one step.`),Eh.forEach(t),Uh.forEach(t),x2=d(x),Gn=a(x,"DIV",{class:!0});var jh=s(Gn);v(gs.$$.fragment,jh),k2=d(jh),pe=a(jh,"P",{});var st=s(pe);W2=r(st,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),tm=a(st,"CODE",{});var bZ=s(tm);G2=r(bZ,"enable_sequential_cpu_offload"),bZ.forEach(t),D2=r(st,", this method moves one whole model at a time to the GPU when its "),nm=a(st,"CODE",{});var vZ=s(nm);S2=r(vZ,"forward"),vZ.forEach(t),B2=r(st,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),om=a(st,"CODE",{});var yZ=s(om);P2=r(yZ,"enable_sequential_cpu_offload"),yZ.forEach(t),F2=r(st,", but performance is much better due to the iterative execution of the "),am=a(st,"CODE",{});var wZ=s(am);R2=r(wZ,"unet"),wZ.forEach(t),V2=r(st,"."),st.forEach(t),jh.forEach(t),X2=d(x),Dn=a(x,"DIV",{class:!0});var Zh=s(Dn);v(_s.$$.fragment,Zh),A2=d(Zh),sm=a(Zh,"P",{});var MZ=s(sm);Y2=r(MZ,`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.`),MZ.forEach(t),Zh.forEach(t),x.forEach(t),Nu=d(n),Jt=a(n,"H2",{class:!0});var Ch=s(Jt);Sn=a(Ch,"A",{id:!0,class:!0,href:!0});var TZ=s(Sn);lm=a(TZ,"SPAN",{});var JZ=s(lm);v(bs.$$.fragment,JZ),JZ.forEach(t),TZ.forEach(t),Q2=d(Ch),im=a(Ch,"SPAN",{});var IZ=s(im);L2=r(IZ,"StableDiffusionControlNetImg2ImgPipeline"),IZ.forEach(t),Ch.forEach(t),xu=d(n),$=a(n,"DIV",{class:!0});var k=s($);v(vs.$$.fragment,k),z2=d(k),rm=a(k,"P",{});var UZ=s(rm);H2=r(UZ,"Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),UZ.forEach(t),q2=d(k),ys=a(k,"P",{});var $h=s(ys);O2=r($h,"This model inherits from "),Fr=a($h,"A",{href:!0});var EZ=s(Fr);K2=r(EZ,"DiffusionPipeline"),EZ.forEach(t),e0=r($h,`. 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.)`),$h.forEach(t),t0=d(k),cm=a(k,"P",{});var jZ=s(cm);n0=r(jZ,"In addition the pipeline inherits the following loading methods:"),jZ.forEach(t),o0=d(k),dm=a(k,"UL",{});var ZZ=s(dm);ws=a(ZZ,"LI",{});var Nh=s(ws);pm=a(Nh,"EM",{});var CZ=s(pm);a0=r(CZ,"Textual-Inversion"),CZ.forEach(t),s0=r(Nh,": "),Rr=a(Nh,"A",{href:!0});var $Z=s(Rr);l0=r($Z,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),$Z.forEach(t),Nh.forEach(t),ZZ.forEach(t),i0=d(k),Fe=a(k,"DIV",{class:!0});var ec=s(Fe);v(Ms.$$.fragment,ec),r0=d(ec),mm=a(ec,"P",{});var NZ=s(mm);c0=r(NZ,"Function invoked when calling the pipeline for generation."),NZ.forEach(t),d0=d(ec),v(Bn.$$.fragment,ec),ec.forEach(t),p0=d(k),be=a(k,"DIV",{class:!0});var Co=s(be);v(Ts.$$.fragment,Co),m0=d(Co),fm=a(Co,"P",{});var xZ=s(fm);f0=r(xZ,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),xZ.forEach(t),u0=d(Co),v(Pn.$$.fragment,Co),h0=d(Co),v(Fn.$$.fragment,Co),Co.forEach(t),g0=d(k),Rn=a(k,"DIV",{class:!0});var xh=s(Rn);v(Js.$$.fragment,xh),_0=d(xh),Is=a(xh,"P",{});var kh=s(Is);b0=r(kh,"Disable sliced attention computation. If "),um=a(kh,"CODE",{});var kZ=s(um);v0=r(kZ,"enable_attention_slicing"),kZ.forEach(t),y0=r(kh,` was previously called, attention is
computed in one step.`),kh.forEach(t),xh.forEach(t),w0=d(k),Vn=a(k,"DIV",{class:!0});var Wh=s(Vn);v(Us.$$.fragment,Wh),M0=d(Wh),hm=a(Wh,"P",{});var WZ=s(hm);T0=r(WZ,`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.`),WZ.forEach(t),Wh.forEach(t),J0=d(k),Xn=a(k,"DIV",{class:!0});var Gh=s(Xn);v(Es.$$.fragment,Gh),I0=d(Gh),js=a(Gh,"P",{});var Dh=s(js);U0=r(Dh,"Disable sliced VAE decoding. If "),gm=a(Dh,"CODE",{});var GZ=s(gm);E0=r(GZ,"enable_vae_slicing"),GZ.forEach(t),j0=r(Dh,` was previously enabled, this method will go back to
computing decoding in one step.`),Dh.forEach(t),Gh.forEach(t),Z0=d(k),ve=a(k,"DIV",{class:!0});var $o=s(ve);v(Zs.$$.fragment,$o),C0=d($o),Cs=a($o,"P",{});var Sh=s(Cs);$0=r(Sh,"Enable memory efficient attention from "),$s=a(Sh,"A",{href:!0,rel:!0});var DZ=s($s);N0=r(DZ,"xFormers"),DZ.forEach(t),x0=r(Sh,`. 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.`),Sh.forEach(t),k0=d($o),v(An.$$.fragment,$o),W0=d($o),v(Yn.$$.fragment,$o),$o.forEach(t),G0=d(k),Qn=a(k,"DIV",{class:!0});var Bh=s(Qn);v(Ns.$$.fragment,Bh),D0=d(Bh),xs=a(Bh,"P",{});var Ph=s(xs);S0=r(Ph,"Disable memory efficient attention from "),ks=a(Ph,"A",{href:!0,rel:!0});var SZ=s(ks);B0=r(SZ,"xFormers"),SZ.forEach(t),P0=r(Ph,"."),Ph.forEach(t),Bh.forEach(t),F0=d(k),V=a(k,"DIV",{class:!0});var Te=s(V);v(Ws.$$.fragment,Te),R0=d(Te),Gs=a(Te,"P",{});var Fh=s(Gs);V0=r(Fh,"Load textual inversion embeddings into the text encoder of "),Vr=a(Fh,"A",{href:!0});var BZ=s(Vr);X0=r(BZ,"StableDiffusionPipeline"),BZ.forEach(t),A0=r(Fh,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Fh.forEach(t),Y0=d(Te),_m=a(Te,"P",{});var PZ=s(_m);Q0=r(PZ,"Example:"),PZ.forEach(t),L0=d(Te),v(Ln.$$.fragment,Te),z0=d(Te),Ds=a(Te,"P",{});var Rh=s(Ds);H0=r(Rh,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ss=a(Rh,"A",{href:!0,rel:!0});var FZ=s(Ss);q0=r(FZ,"civitAI"),FZ.forEach(t),O0=r(Rh,") and then load the vector"),Rh.forEach(t),K0=d(Te),v(zn.$$.fragment,Te),Te.forEach(t),eM=d(k),Hn=a(k,"DIV",{class:!0});var Vh=s(Hn);v(Bs.$$.fragment,Vh),tM=d(Vh),Ps=a(Vh,"P",{});var Xh=s(Ps);nM=r(Xh,"Disable tiled VAE decoding. If "),bm=a(Xh,"CODE",{});var RZ=s(bm);oM=r(RZ,"enable_vae_tiling"),RZ.forEach(t),aM=r(Xh,` was previously enabled, this method will go back to
computing decoding in one step.`),Xh.forEach(t),Vh.forEach(t),sM=d(k),qn=a(k,"DIV",{class:!0});var Ah=s(qn);v(Fs.$$.fragment,Ah),lM=d(Ah),me=a(Ah,"P",{});var lt=s(me);iM=r(lt,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),vm=a(lt,"CODE",{});var VZ=s(vm);rM=r(VZ,"enable_sequential_cpu_offload"),VZ.forEach(t),cM=r(lt,", this method moves one whole model at a time to the GPU when its "),ym=a(lt,"CODE",{});var XZ=s(ym);dM=r(XZ,"forward"),XZ.forEach(t),pM=r(lt,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),wm=a(lt,"CODE",{});var AZ=s(wm);mM=r(AZ,"enable_sequential_cpu_offload"),AZ.forEach(t),fM=r(lt,", but performance is much better due to the iterative execution of the "),Mm=a(lt,"CODE",{});var YZ=s(Mm);uM=r(YZ,"unet"),YZ.forEach(t),hM=r(lt,"."),lt.forEach(t),Ah.forEach(t),gM=d(k),On=a(k,"DIV",{class:!0});var Yh=s(On);v(Rs.$$.fragment,Yh),_M=d(Yh),Tm=a(Yh,"P",{});var QZ=s(Tm);bM=r(QZ,`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.`),QZ.forEach(t),Yh.forEach(t),k.forEach(t),ku=d(n),It=a(n,"H2",{class:!0});var Qh=s(It);Kn=a(Qh,"A",{id:!0,class:!0,href:!0});var LZ=s(Kn);Jm=a(LZ,"SPAN",{});var zZ=s(Jm);v(Vs.$$.fragment,zZ),zZ.forEach(t),LZ.forEach(t),vM=d(Qh),Im=a(Qh,"SPAN",{});var HZ=s(Im);yM=r(HZ,"StableDiffusionControlNetInpaintPipeline"),HZ.forEach(t),Qh.forEach(t),Wu=d(n),j=a(n,"DIV",{class:!0});var N=s(j);v(Xs.$$.fragment,N),wM=d(N),Um=a(N,"P",{});var qZ=s(Um);MM=r(qZ,"Pipeline for text-to-image generation using Stable Diffusion with ControlNet guidance."),qZ.forEach(t),TM=d(N),As=a(N,"P",{});var Lh=s(As);JM=r(Lh,"This model inherits from "),Xr=a(Lh,"A",{href:!0});var OZ=s(Xr);IM=r(OZ,"DiffusionPipeline"),OZ.forEach(t),UM=r(Lh,`. 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.)`),Lh.forEach(t),EM=d(N),Em=a(N,"P",{});var KZ=s(Em);jM=r(KZ,"In addition the pipeline inherits the following loading methods:"),KZ.forEach(t),ZM=d(N),jm=a(N,"UL",{});var eC=s(jm);Ys=a(eC,"LI",{});var zh=s(Ys);Zm=a(zh,"EM",{});var tC=s(Zm);CM=r(tC,"Textual-Inversion"),tC.forEach(t),$M=r(zh,": "),Ar=a(zh,"A",{href:!0});var nC=s(Ar);NM=r(nC,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),nC.forEach(t),zh.forEach(t),eC.forEach(t),xM=d(N),v(eo.$$.fragment,N),kM=d(N),Re=a(N,"DIV",{class:!0});var tc=s(Re);v(Qs.$$.fragment,tc),WM=d(tc),Cm=a(tc,"P",{});var oC=s(Cm);GM=r(oC,"Function invoked when calling the pipeline for generation."),oC.forEach(t),DM=d(tc),v(to.$$.fragment,tc),tc.forEach(t),SM=d(N),ye=a(N,"DIV",{class:!0});var No=s(ye);v(Ls.$$.fragment,No),BM=d(No),$m=a(No,"P",{});var aC=s($m);PM=r(aC,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),aC.forEach(t),FM=d(No),v(no.$$.fragment,No),RM=d(No),v(oo.$$.fragment,No),No.forEach(t),VM=d(N),ao=a(N,"DIV",{class:!0});var Hh=s(ao);v(zs.$$.fragment,Hh),XM=d(Hh),Hs=a(Hh,"P",{});var qh=s(Hs);AM=r(qh,"Disable sliced attention computation. If "),Nm=a(qh,"CODE",{});var sC=s(Nm);YM=r(sC,"enable_attention_slicing"),sC.forEach(t),QM=r(qh,` was previously called, attention is
computed in one step.`),qh.forEach(t),Hh.forEach(t),LM=d(N),so=a(N,"DIV",{class:!0});var Oh=s(so);v(qs.$$.fragment,Oh),zM=d(Oh),xm=a(Oh,"P",{});var lC=s(xm);HM=r(lC,`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.`),lC.forEach(t),Oh.forEach(t),qM=d(N),lo=a(N,"DIV",{class:!0});var Kh=s(lo);v(Os.$$.fragment,Kh),OM=d(Kh),Ks=a(Kh,"P",{});var eg=s(Ks);KM=r(eg,"Disable sliced VAE decoding. If "),km=a(eg,"CODE",{});var iC=s(km);eT=r(iC,"enable_vae_slicing"),iC.forEach(t),tT=r(eg,` was previously enabled, this method will go back to
computing decoding in one step.`),eg.forEach(t),Kh.forEach(t),nT=d(N),we=a(N,"DIV",{class:!0});var xo=s(we);v(el.$$.fragment,xo),oT=d(xo),tl=a(xo,"P",{});var tg=s(tl);aT=r(tg,"Enable memory efficient attention from "),nl=a(tg,"A",{href:!0,rel:!0});var rC=s(nl);sT=r(rC,"xFormers"),rC.forEach(t),lT=r(tg,`. 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.`),tg.forEach(t),iT=d(xo),v(io.$$.fragment,xo),rT=d(xo),v(ro.$$.fragment,xo),xo.forEach(t),cT=d(N),co=a(N,"DIV",{class:!0});var ng=s(co);v(ol.$$.fragment,ng),dT=d(ng),al=a(ng,"P",{});var og=s(al);pT=r(og,"Disable memory efficient attention from "),sl=a(og,"A",{href:!0,rel:!0});var cC=s(sl);mT=r(cC,"xFormers"),cC.forEach(t),fT=r(og,"."),og.forEach(t),ng.forEach(t),uT=d(N),X=a(N,"DIV",{class:!0});var Je=s(X);v(ll.$$.fragment,Je),hT=d(Je),il=a(Je,"P",{});var ag=s(il);gT=r(ag,"Load textual inversion embeddings into the text encoder of "),Yr=a(ag,"A",{href:!0});var dC=s(Yr);_T=r(dC,"StableDiffusionPipeline"),dC.forEach(t),bT=r(ag,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),ag.forEach(t),vT=d(Je),Wm=a(Je,"P",{});var pC=s(Wm);yT=r(pC,"Example:"),pC.forEach(t),wT=d(Je),v(po.$$.fragment,Je),MT=d(Je),rl=a(Je,"P",{});var sg=s(rl);TT=r(sg,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),cl=a(sg,"A",{href:!0,rel:!0});var mC=s(cl);JT=r(mC,"civitAI"),mC.forEach(t),IT=r(sg,") and then load the vector"),sg.forEach(t),UT=d(Je),v(mo.$$.fragment,Je),Je.forEach(t),ET=d(N),fo=a(N,"DIV",{class:!0});var lg=s(fo);v(dl.$$.fragment,lg),jT=d(lg),pl=a(lg,"P",{});var ig=s(pl);ZT=r(ig,"Disable tiled VAE decoding. If "),Gm=a(ig,"CODE",{});var fC=s(Gm);CT=r(fC,"enable_vae_tiling"),fC.forEach(t),$T=r(ig,` was previously enabled, this method will go back to
computing decoding in one step.`),ig.forEach(t),lg.forEach(t),NT=d(N),uo=a(N,"DIV",{class:!0});var rg=s(uo);v(ml.$$.fragment,rg),xT=d(rg),fe=a(rg,"P",{});var it=s(fe);kT=r(it,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Dm=a(it,"CODE",{});var uC=s(Dm);WT=r(uC,"enable_sequential_cpu_offload"),uC.forEach(t),GT=r(it,", this method moves one whole model at a time to the GPU when its "),Sm=a(it,"CODE",{});var hC=s(Sm);DT=r(hC,"forward"),hC.forEach(t),ST=r(it,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Bm=a(it,"CODE",{});var gC=s(Bm);BT=r(gC,"enable_sequential_cpu_offload"),gC.forEach(t),PT=r(it,", but performance is much better due to the iterative execution of the "),Pm=a(it,"CODE",{});var _C=s(Pm);FT=r(_C,"unet"),_C.forEach(t),RT=r(it,"."),it.forEach(t),rg.forEach(t),VT=d(N),ho=a(N,"DIV",{class:!0});var cg=s(ho);v(fl.$$.fragment,cg),XT=d(cg),Fm=a(cg,"P",{});var bC=s(Fm);AT=r(bC,`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.`),bC.forEach(t),cg.forEach(t),N.forEach(t),Gu=d(n),Ut=a(n,"H2",{class:!0});var dg=s(Ut);go=a(dg,"A",{id:!0,class:!0,href:!0});var vC=s(go);Rm=a(vC,"SPAN",{});var yC=s(Rm);v(ul.$$.fragment,yC),yC.forEach(t),vC.forEach(t),YT=d(dg),Vm=a(dg,"SPAN",{});var wC=s(Vm);QT=r(wC,"FlaxStableDiffusionControlNetPipeline"),wC.forEach(t),dg.forEach(t),Du=d(n),ue=a(n,"DIV",{class:!0});var ko=s(ue);v(hl.$$.fragment,ko),LT=d(ko),Xm=a(ko,"P",{});var MC=s(Xm);zT=r(MC,"Pipeline for text-to-image generation using Stable Diffusion with ControlNet Guidance."),MC.forEach(t),HT=d(ko),gl=a(ko,"P",{});var pg=s(gl);qT=r(pg,"This model inherits from "),Qr=a(pg,"A",{href:!0});var TC=s(Qr);OT=r(TC,"FlaxDiffusionPipeline"),TC.forEach(t),KT=r(pg,`. 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.)`),pg.forEach(t),eJ=d(ko),Ve=a(ko,"DIV",{class:!0});var nc=s(Ve);v(_l.$$.fragment,nc),tJ=d(nc),Am=a(nc,"P",{});var JC=s(Am);nJ=r(JC,"Function invoked when calling the pipeline for generation."),JC.forEach(t),oJ=d(nc),v(_o.$$.fragment,nc),nc.forEach(t),ko.forEach(t),this.h()},h(){l(f,"name","hf:doc:metadata"),l(f,"content",JSON.stringify(e$)),l(h,"id","controlnet"),l(h,"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"),l(h,"href","#controlnet"),l(_,"class","relative group"),l(z,"href","https://huggingface.co/papers/2302.05543"),l(z,"rel","nofollow"),l(Go,"href","https://huggingface.co/takuma104"),l(Go,"rel","nofollow"),l(Do,"href","https://github.com/lllyasviel/ControlNet"),l(Do,"rel","nofollow"),l(Ct,"id","usage-example"),l(Ct,"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"),l(Ct,"href","#usage-example"),l(ct,"class","relative group"),l(Zl,"href","/docs/diffusers/v0.20.0/en/api/pipelines/controlnet#diffusers.StableDiffusionControlNetPipeline"),l(jl,"start","2"),l(Po,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),l(Po,"rel","nofollow"),U($l.src,bJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png")||l($l,"src",bJ),l($l,"alt","img"),l(Nl,"href","#controlnet-with-stable-diffusion-1.5"),U(Sl.src,vJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/vermeer_canny_edged.png")||l(Sl,"src",vJ),l(Sl,"alt","img"),l(Bl,"href","runwayml/stable-diffusion-v1-5"),l(Pl,"href","/docs/diffusers/v0.20.0/en/api/schedulers/unipc#diffusers.UniPCMultistepScheduler"),U(Xl.src,yJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/vermeer_disco_dancing.png")||l(Xl,"src",yJ),l(Xl,"alt","img"),l(Al,"href","#controlnet-with-stable-diffusion-1.5"),l(Gt,"id","combining-multiple-conditionings"),l(Gt,"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"),l(Gt,"href","#combining-multiple-conditionings"),l(pt,"class","relative group"),l(Bt,"id","canny-conditioning"),l(Bt,"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"),l(Bt,"href","#canny-conditioning"),l(mt,"class","relative group"),U(Ll.src,wJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/landscape.png")||l(Ll,"src",wJ),U(Hl.src,MJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/controlnet/landscape_canny_masked.png")||l(Hl,"src",MJ),l(Pt,"id","openpose-conditioning"),l(Pt,"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"),l(Pt,"href","#openpose-conditioning"),l(ft,"class","relative group"),U(Oo.src,TJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/person.png")||l(Oo,"src",TJ),l(Oo,"width","600"),U(ea.src,JJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/controlnet/person_pose.png")||l(ea,"src",JJ),l(ea,"width","600"),l(Ft,"id","running-controlnet-with-multiple-conditionings"),l(Ft,"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"),l(Ft,"href","#running-controlnet-with-multiple-conditionings"),l(ut,"class","relative group"),U(oa.src,IJ="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/blog/controlnet/multi_controlnet_output.png")||l(oa,"src",IJ),l(oa,"width","600"),l(Rt,"id","guess-mode"),l(Rt,"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"),l(Rt,"href","#guess-mode"),l(ht,"class","relative group"),l(sa,"href","https://github.com/lllyasviel/ControlNet#guess-mode--non-prompt-mode"),l(sa,"rel","nofollow"),l(la,"href","https://arxiv.org/abs/2302.05543"),l(la,"rel","nofollow"),l(Vt,"id","the-core-implementation"),l(Vt,"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"),l(Vt,"href","#the-core-implementation"),l(gt,"class","relative group"),l(At,"id","usage"),l(At,"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"),l(At,"href","#usage"),l(_t,"class","relative group"),l(ca,"href","https://github.com/lllyasviel/ControlNet#guess-mode--non-prompt-mode"),l(ca,"rel","nofollow"),l(Yt,"id","output-image-comparison"),l(Yt,"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"),l(Yt,"href","#output-image-comparison"),l(bt,"class","relative group"),l(ti,"width","128"),U(ti.src,UJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare_guess_mode/output_images/diffusers/output_bird_canny_0.png")||l(ti,"src",UJ),l(ei,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare_guess_mode/output_images/diffusers/output_bird_canny_0.png"),l(oi,"width","128"),U(oi.src,EJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare_guess_mode/output_images/diffusers/output_bird_canny_0_gm.png")||l(oi,"src",EJ),l(ni,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare_guess_mode/output_images/diffusers/output_bird_canny_0_gm.png"),l(Lt,"id","available-checkpoints"),l(Lt,"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"),l(Lt,"href","#available-checkpoints"),l(vt,"class","relative group"),l(ha,"href","https://huggingface.co/lllyasviel"),l(ha,"rel","nofollow"),l(ai,"href","#controlnet-v1.1"),l(Ht,"id","controlnet-v10"),l(Ht,"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"),l(Ht,"href","#controlnet-v10"),l(wt,"class","relative group"),l(_a,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),l(_a,"rel","nofollow"),l(Kt,"width","64"),G(Kt,"margin","0"),G(Kt,"padding","0"),U(Kt.src,jJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_bird_canny.png")||l(Kt,"src",jJ),l(si,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_bird_canny.png"),l(ii,"width","64"),U(ii.src,ZJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_canny_1.png")||l(ii,"src",ZJ),l(li,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_canny_1.png"),l(ba,"href","https://huggingface.co/lllyasviel/sd-controlnet-depth"),l(ba,"rel","nofollow"),l(ci,"width","64"),U(ci.src,CJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_vermeer_depth.png")||l(ci,"src",CJ),l(ri,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_vermeer_depth.png"),l(pi,"width","64"),U(pi.src,$J="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_depth_2.png")||l(pi,"src",$J),l(di,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_depth_2.png"),l(va,"href","https://huggingface.co/lllyasviel/sd-controlnet-hed"),l(va,"rel","nofollow"),l(fi,"width","64"),U(fi.src,NJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_bird_hed.png")||l(fi,"src",NJ),l(mi,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_bird_hed.png"),l(hi,"width","64"),U(hi.src,xJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_hed_1.png")||l(hi,"src",xJ),l(ui,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_hed_1.png"),l(ya,"href","https://huggingface.co/lllyasviel/sd-controlnet-mlsd"),l(ya,"rel","nofollow"),l(_i,"width","64"),U(_i.src,kJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_room_mlsd.png")||l(_i,"src",kJ),l(gi,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_room_mlsd.png"),l(vi,"width","64"),U(vi.src,WJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_mlsd_0.png")||l(vi,"src",WJ),l(bi,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_mlsd_0.png"),l(wa,"href","https://huggingface.co/lllyasviel/sd-controlnet-normal"),l(wa,"rel","nofollow"),l(Ta,"href","https://en.wikipedia.org/wiki/Normal_mapping"),l(Ta,"rel","nofollow"),l(wi,"width","64"),U(wi.src,GJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_human_normal.png")||l(wi,"src",GJ),l(yi,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_human_normal.png"),l(Ti,"width","64"),U(Ti.src,DJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_normal_1.png")||l(Ti,"src",DJ),l(Mi,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_normal_1.png"),l(Ja,"href","https://huggingface.co/lllyasviel/sd-controlnet_openpose"),l(Ja,"rel","nofollow"),l(Ua,"href","https://github.com/CMU-Perceptual-Computing-Lab/openpose"),l(Ua,"rel","nofollow"),l(Ii,"width","64"),U(Ii.src,SJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_human_openpose.png")||l(Ii,"src",SJ),l(Ji,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_human_openpose.png"),l(Ei,"width","64"),U(Ei.src,BJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_openpose_0.png")||l(Ei,"src",BJ),l(Ui,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_openpose_0.png"),l(Ea,"href","https://huggingface.co/lllyasviel/sd-controlnet_scribble"),l(Ea,"rel","nofollow"),l(Zi,"width","64"),U(Zi.src,PJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_vermeer_scribble.png")||l(Zi,"src",PJ),l(ji,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_vermeer_scribble.png"),l($i,"width","64"),U($i.src,FJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_scribble_0.png")||l($i,"src",FJ),l(Ci,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_scribble_0.png"),l(Za,"href","https://huggingface.co/lllyasviel/sd-controlnet_seg"),l(Za,"rel","nofollow"),l($a,"href","https://groups.csail.mit.edu/vision/datasets/ADE20K/"),l($a,"rel","nofollow"),l(xi,"width","64"),U(xi.src,RJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_room_seg.png")||l(xi,"src",RJ),l(Ni,"href","https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_room_seg.png"),l(Wi,"width","64"),U(Wi.src,VJ="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_seg_1.png")||l(Wi,"src",VJ),l(ki,"href","https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_seg_1.png"),l(ln,"id","controlnet-v11"),l(ln,"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"),l(ln,"href","#controlnet-v11"),l(Mt,"class","relative group"),l(xa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_canny"),l(xa,"rel","nofollow"),l(cn,"width","64"),G(cn,"margin","0"),G(cn,"padding","0"),U(cn.src,XJ="https://huggingface.co/lllyasviel/control_v11p_sd15_canny/resolve/main/images/control.png")||l(cn,"src",XJ),l(Di,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_canny/resolve/main/images/control.png"),l(Bi,"width","64"),U(Bi.src,AJ="https://huggingface.co/lllyasviel/control_v11p_sd15_canny/resolve/main/images/image_out.png")||l(Bi,"src",AJ),l(Si,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_canny/resolve/main/images/image_out.png"),l(ka,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_ip2p"),l(ka,"rel","nofollow"),l(dn,"width","64"),G(dn,"margin","0"),G(dn,"padding","0"),U(dn.src,YJ="https://huggingface.co/lllyasviel/control_v11e_sd15_ip2p/resolve/main/images/control.png")||l(dn,"src",YJ),l(Fi,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_ip2p/resolve/main/images/control.png"),l(Vi,"width","64"),U(Vi.src,QJ="https://huggingface.co/lllyasviel/control_v11e_sd15_ip2p/resolve/main/images/image_out.png")||l(Vi,"src",QJ),l(Ri,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_ip2p/resolve/main/images/image_out.png"),l(Wa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint"),l(Wa,"rel","nofollow"),l(pn,"width","64"),G(pn,"margin","0"),G(pn,"padding","0"),U(pn.src,LJ="https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint/resolve/main/images/control.png")||l(pn,"src",LJ),l(Ai,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint/resolve/main/images/control.png"),l(Qi,"width","64"),U(Qi.src,zJ="https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint/resolve/main/images/output.png")||l(Qi,"src",zJ),l(Yi,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_inpaint/resolve/main/images/output.png"),l(Ga,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_mlsd"),l(Ga,"rel","nofollow"),l(mn,"width","64"),G(mn,"margin","0"),G(mn,"padding","0"),U(mn.src,HJ="https://huggingface.co/lllyasviel/control_v11p_sd15_mlsd/resolve/main/images/control.png")||l(mn,"src",HJ),l(zi,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_mlsd/resolve/main/images/control.png"),l(qi,"width","64"),U(qi.src,qJ="https://huggingface.co/lllyasviel/control_v11p_sd15_mlsd/resolve/main/images/image_out.png")||l(qi,"src",qJ),l(Hi,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_mlsd/resolve/main/images/image_out.png"),l(Da,"href","https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth"),l(Da,"rel","nofollow"),l(fn,"width","64"),G(fn,"margin","0"),G(fn,"padding","0"),U(fn.src,OJ="https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/resolve/main/images/control.png")||l(fn,"src",OJ),l(Ki,"href","https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/resolve/main/images/control.png"),l(tr,"width","64"),U(tr.src,KJ="https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/resolve/main/images/image_out.png")||l(tr,"src",KJ),l(er,"href","https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/resolve/main/images/image_out.png"),l(Sa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_normalbae"),l(Sa,"rel","nofollow"),l(un,"width","64"),G(un,"margin","0"),G(un,"padding","0"),U(un.src,eI="https://huggingface.co/lllyasviel/control_v11p_sd15_normalbae/resolve/main/images/control.png")||l(un,"src",eI),l(or,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_normalbae/resolve/main/images/control.png"),l(sr,"width","64"),U(sr.src,tI="https://huggingface.co/lllyasviel/control_v11p_sd15_normalbae/resolve/main/images/image_out.png")||l(sr,"src",tI),l(ar,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_normalbae/resolve/main/images/image_out.png"),l(Ba,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_seg"),l(Ba,"rel","nofollow"),l(hn,"width","64"),G(hn,"margin","0"),G(hn,"padding","0"),U(hn.src,nI="https://huggingface.co/lllyasviel/control_v11p_sd15_seg/resolve/main/images/control.png")||l(hn,"src",nI),l(ir,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_seg/resolve/main/images/control.png"),l(cr,"width","64"),U(cr.src,oI="https://huggingface.co/lllyasviel/control_v11p_sd15_seg/resolve/main/images/image_out.png")||l(cr,"src",oI),l(rr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_seg/resolve/main/images/image_out.png"),l(Pa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_lineart"),l(Pa,"rel","nofollow"),l(gn,"width","64"),G(gn,"margin","0"),G(gn,"padding","0"),U(gn.src,aI="https://huggingface.co/lllyasviel/control_v11p_sd15_lineart/resolve/main/images/control.png")||l(gn,"src",aI),l(pr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_lineart/resolve/main/images/control.png"),l(fr,"width","64"),U(fr.src,sI="https://huggingface.co/lllyasviel/control_v11p_sd15_lineart/resolve/main/images/image_out.png")||l(fr,"src",sI),l(mr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_lineart/resolve/main/images/image_out.png"),l(Fa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime"),l(Fa,"rel","nofollow"),l(_n,"width","64"),G(_n,"margin","0"),G(_n,"padding","0"),U(_n.src,lI="https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime/resolve/main/images/control.png")||l(_n,"src",lI),l(hr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime/resolve/main/images/control.png"),l(_r,"width","64"),U(_r.src,iI="https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime/resolve/main/images/image_out.png")||l(_r,"src",iI),l(gr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime/resolve/main/images/image_out.png"),l(Ra,"href","https://huggingface.co/lllyasviel/control_v11p_sd15s2_lineart_anime"),l(Ra,"rel","nofollow"),l(bn,"width","64"),G(bn,"margin","0"),G(bn,"padding","0"),U(bn.src,rI="https://huggingface.co/lllyasviel/control_v11p_sd15_openpose/resolve/main/images/control.png")||l(bn,"src",rI),l(vr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_openpose/resolve/main/images/control.png"),l(wr,"width","64"),U(wr.src,cI="https://huggingface.co/lllyasviel/control_v11p_sd15_openpose/resolve/main/images/image_out.png")||l(wr,"src",cI),l(yr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_openpose/resolve/main/images/image_out.png"),l(Va,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_scribble"),l(Va,"rel","nofollow"),l(vn,"width","64"),G(vn,"margin","0"),G(vn,"padding","0"),U(vn.src,dI="https://huggingface.co/lllyasviel/control_v11p_sd15_scribble/resolve/main/images/control.png")||l(vn,"src",dI),l(Tr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_scribble/resolve/main/images/control.png"),l(Ir,"width","64"),U(Ir.src,pI="https://huggingface.co/lllyasviel/control_v11p_sd15_scribble/resolve/main/images/image_out.png")||l(Ir,"src",pI),l(Jr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_scribble/resolve/main/images/image_out.png"),l(Xa,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_softedge"),l(Xa,"rel","nofollow"),l(yn,"width","64"),G(yn,"margin","0"),G(yn,"padding","0"),U(yn.src,mI="https://huggingface.co/lllyasviel/control_v11p_sd15_softedge/resolve/main/images/control.png")||l(yn,"src",mI),l(Er,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_softedge/resolve/main/images/control.png"),l(Zr,"width","64"),U(Zr.src,fI="https://huggingface.co/lllyasviel/control_v11p_sd15_softedge/resolve/main/images/image_out.png")||l(Zr,"src",fI),l(jr,"href","https://huggingface.co/lllyasviel/control_v11p_sd15_softedge/resolve/main/images/image_out.png"),l(Aa,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle"),l(Aa,"rel","nofollow"),l(wn,"width","64"),G(wn,"margin","0"),G(wn,"padding","0"),U(wn.src,uI="https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle/resolve/main/images/control.png")||l(wn,"src",uI),l($r,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle/resolve/main/images/control.png"),l(xr,"width","64"),U(xr.src,hI="https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle/resolve/main/images/image_out.png")||l(xr,"src",hI),l(Nr,"href","https://huggingface.co/lllyasviel/control_v11e_sd15_shuffle/resolve/main/images/image_out.png"),l(Ya,"href","https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile"),l(Ya,"rel","nofollow"),l(Mn,"width","64"),G(Mn,"margin","0"),G(Mn,"padding","0"),U(Mn.src,gI="https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile/resolve/main/images/original.png")||l(Mn,"src",gI),l(Wr,"href","https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile/resolve/main/images/original.png"),l(Dr,"width","64"),U(Dr.src,_I="https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile/resolve/main/images/output.png")||l(Dr,"src",_I),l(Gr,"href","https://huggingface.co/lllyasviel/control_v11f1e_sd15_tile/resolve/main/images/output.png"),l(Tn,"id","diffusers.StableDiffusionControlNetPipeline"),l(Tn,"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"),l(Tn,"href","#diffusers.StableDiffusionControlNetPipeline"),l(Tt,"class","relative group"),l(Sr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),l(Br,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),l(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(En,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ls,"href","https://facebookresearch.github.io/xformers/"),l(ls,"rel","nofollow"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(cs,"href","https://facebookresearch.github.io/xformers/"),l(cs,"rel","nofollow"),l(Nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),l(fs,"href","https://civitai.com/models/3036?modelVersionId=9857"),l(fs,"rel","nofollow"),l(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Wn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Sn,"id","diffusers.StableDiffusionControlNetImg2ImgPipeline"),l(Sn,"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"),l(Sn,"href","#diffusers.StableDiffusionControlNetImg2ImgPipeline"),l(Jt,"class","relative group"),l(Fr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),l(Rr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),l(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Rn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($s,"href","https://facebookresearch.github.io/xformers/"),l($s,"rel","nofollow"),l(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ks,"href","https://facebookresearch.github.io/xformers/"),l(ks,"rel","nofollow"),l(Qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),l(Ss,"href","https://civitai.com/models/3036?modelVersionId=9857"),l(Ss,"rel","nofollow"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(On,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Kn,"id","diffusers.StableDiffusionControlNetInpaintPipeline"),l(Kn,"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"),l(Kn,"href","#diffusers.StableDiffusionControlNetInpaintPipeline"),l(It,"class","relative group"),l(Xr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),l(Ar,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),l(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(nl,"href","https://facebookresearch.github.io/xformers/"),l(nl,"rel","nofollow"),l(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(sl,"href","https://facebookresearch.github.io/xformers/"),l(sl,"rel","nofollow"),l(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Yr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),l(cl,"href","https://civitai.com/models/3036?modelVersionId=9857"),l(cl,"rel","nofollow"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(go,"id","diffusers.FlaxStableDiffusionControlNetPipeline"),l(go,"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"),l(go,"href","#diffusers.FlaxStableDiffusionControlNetPipeline"),l(Ut,"class","relative group"),l(Qr,"href","/docs/diffusers/v0.20.0/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline"),l(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,m){e(document.head,f),u(n,I,m),u(n,_,m),e(_,h),e(h,J),y(p,J,null),e(_,g),e(_,P),e(P,Ie),u(n,Et,m),u(n,Ue,m),e(Ue,z),e(z,L),e(Ue,Il),u(n,Wo,m),u(n,rt,m),e(rt,mg),u(n,bf,m),u(n,Ul,m),e(Ul,fg),u(n,vf,m),u(n,El,m),e(El,oc),e(oc,ug),u(n,yf,m),u(n,jt,m),e(jt,hg),e(jt,Go),e(Go,gg),e(jt,_g),u(n,wf,m),u(n,Zt,m),e(Zt,bg),e(Zt,Do),e(Do,vg),e(Zt,yg),u(n,Mf,m),u(n,ct,m),e(ct,Ct),e(Ct,ac),y(So,ac,null),e(ct,wg),e(ct,sc),e(sc,Mg),u(n,Tf,m),u(n,$t,m),e($t,Tg),e($t,lc),e(lc,Jg),e($t,Ig),u(n,Jf,m),u(n,Nt,m),e(Nt,ic),e(ic,rc),e(rc,cc),e(cc,Ug),e(Nt,Eg),e(Nt,dc),e(dc,jl),e(jl,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bc),e(bc,p_),u(n,qf,m),u(n,Ql,m),e(Ql,m_),u(n,Of,m),u(n,Ll,m),u(n,Kf,m),u(n,zl,m),e(zl,f_),u(n,eu,m),y(Ho,n,m),u(n,tu,m),u(n,Hl,m),u(n,nu,m),u(n,ft,m),e(ft,Pt),e(Pt,vc),y(qo,vc,null),e(ft,u_),e(ft,yc),e(yc,h_),u(n,ou,m),u(n,ql,m),e(ql,g_),u(n,au,m),u(n,Oo,m),u(n,su,m),u(n,Ol,m),e(Ol,__),u(n,lu,m),y(Ko,n,m),u(n,iu,m),u(n,ea,m),u(n,ru,m),u(n,ut,m),e(ut,Ft),e(Ft,wc),y(ta,wc,null),e(ut,b_),e(ut,Mc),e(Mc,v_),u(n,cu,m),y(na,n,m),u(n,du,m),u(n,oa,m),u(n,pu,m),u(n,ht,m),e(ht,Rt),e(Rt,Tc),y(aa,Tc,null),e(ht,y_),e(ht,Jc),e(Jc,w_),u(n,mu,m),u(n,De,m),e(De,M_),e(De,sa),e(sa,T_),e(De,J_),e(De,la),e(la,I_),e(De,U_),u(n,fu,m),u(n,Kl,m),e(Kl,Ic),e(Ic,E_),u(n,uu,m),u(n,gt,m),e(gt,Vt),e(Vt,Uc),y(ia,Uc,null),e(gt,j_),e(gt,Ec),e(Ec,Z_),u(n,hu,m),u(n,Se,m),e(Se,C_),e(Se,jc),e(jc,$_),e(Se,N_),e(Se,Zc),e(Zc,x_),e(Se,k_),u(n,gu,m),u(n,Xt,m),e(Xt,W_),e(Xt,Cc),e(Cc,G_),e(Xt,D_),u(n,_u,m),u(n,_t,m),e(_t,At),e(At,$c),y(ra,$c,null),e(_t,S_),e(_t,Nc),e(Nc,B_),u(n,bu,m),u(n,he,m),e(he,P_),e(he,xc),e(xc,F_),e(he,R_),e(he,kc),e(kc,V_),e(he,X_),e(he,ca),e(ca,A_),e(he,Y_),u(n,vu,m),y(da,n,m),u(n,yu,m),u(n,bt,m),e(bt,Yt),e(Yt,Wc),y(pa,Wc,null),e(bt,Q_),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,Yy),e(te,ap),e(ap,Ki),e(Ki,fn),e(te,Qy),e(te,sp),e(sp,er),e(er,tr),e(W,Ly),e(W,ne),e(ne,nr),e(nr,Sa),e(Sa,zy),e(nr,Hy),e(ne,qy),e(ne,lp),e(lp,Oy),e(ne,Ky),e(ne,ip),e(ip,e1),e(ne,t1),e(ne,rp),e(rp,or),e(or,un),e(ne,n1),e(ne,cp),e(cp,ar),e(ar,sr),e(W,o1),e(W,oe),e(oe,lr),e(lr,Ba),e(Ba,a1),e(lr,s1),e(oe,l1),e(oe,dp),e(dp,i1),e(oe,r1),e(oe,pp),e(pp,c1),e(oe,d1),e(oe,mp),e(mp,ir),e(ir,hn),e(oe,p1),e(oe,fp),e(fp,rr),e(rr,cr),e(W,m1),e(W,ae),e(ae,dr),e(dr,Pa),e(Pa,f1),e(dr,u1),e(ae,h1),e(ae,up),e(up,g1),e(ae,_1),e(ae,hp),e(hp,b1),e(ae,v1),e(ae,gp),e(gp,pr),e(pr,gn),e(ae,y1),e(ae,_p),e(_p,mr),e(mr,fr),e(W,w1),e(W,se),e(se,ur),e(ur,Fa),e(Fa,M1),e(ur,T1),e(se,J1),e(se,bp),e(bp,I1),e(se,U1),e(se,vp),e(vp,E1),e(se,j1),e(se,yp),e(yp,hr),e(hr,_n),e(se,Z1),e(se,wp),e(wp,gr),e(gr,_r),e(W,C1),e(W,le),e(le,br),e(br,Ra),e(Ra,$1),e(br,N1),e(le,x1),e(le,Mp),e(Mp,k1),e(le,W1),e(le,Tp),e(Tp,G1),e(le,D1),e(le,Jp),e(Jp,vr),e(vr,bn),e(le,S1),e(le,Ip),e(Ip,yr),e(yr,wr),e(W,B1),e(W,ie),e(ie,Mr),e(Mr,Va),e(Va,P1),e(Mr,F1),e(ie,R1),e(ie,Up),e(Up,V1),e(ie,X1),e(ie,Ep),e(Ep,A1),e(ie,Y1),e(ie,jp),e(jp,Tr),e(Tr,vn),e(ie,Q1),e(ie,Zp),e(Zp,Jr),e(Jr,Ir),e(W,L1),e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n,Hw),e(jn,qp),e(qp,qw),e(C,Ow),e(C,Zn),y(ns,Zn,null),e(Zn,Kw),e(Zn,os),e(os,e2),e(os,Op),e(Op,t2),e(os,n2),e(C,o2),e(C,_e),y(as,_e,null),e(_e,a2),e(_e,ss),e(ss,s2),e(ss,ls),e(ls,l2),e(ss,i2),e(_e,r2),y(Cn,_e,null),e(_e,c2),y($n,_e,null),e(C,d2),e(C,Nn),y(is,Nn,null),e(Nn,p2),e(Nn,rs),e(rs,m2),e(rs,cs),e(cs,f2),e(rs,u2),e(C,h2),e(C,R),y(ds,R,null),e(R,g2),e(R,ps),e(ps,_2),e(ps,Pr),e(Pr,b2),e(ps,v2),e(R,y2),e(R,Kp),e(Kp,w2),e(R,M2),y(xn,R,null),e(R,T2),e(R,ms),e(ms,J2),e(ms,fs),e(fs,I2),e(ms,U2),e(R,E2),y(kn,R,null),e(C,j2),e(C,Wn),y(us,Wn,null),e(Wn,Z2),e(Wn,hs),e(hs,C2),e(hs,em),e(em,$2),e(hs,N2),e(C,x2),e(C,Gn),y(gs,Gn,null),e(Gn,k2),e(Gn,pe),e(pe,W2),e(pe,tm),e(tm,G2),e(pe,D2),e(pe,nm),e(nm,S2),e(pe,B2),e(pe,om),e(om,P2),e(pe,F2),e(pe,am),e(am,R2),e(pe,V2),e(C,X2),e(C,Dn),y(_s,Dn,null),e(Dn,A2),e(Dn,sm),e(sm,Y2),u(n,Nu,m),u(n,Jt,m),e(Jt,Sn),e(Sn,lm),y(bs,lm,null),e(Jt,Q2),e(Jt,im),e(im,L2),u(n,xu,m),u(n,$,m),y(vs,$,null),e($,z2),e($,rm),e(rm,H2),e($,q2),e($,ys),e(ys,O2),e(ys,Fr),e(Fr,K2),e(ys,e0),e($,t0),e($,cm),e(cm,n0),e($,o0),e($,dm),e(dm,ws),e(ws,pm),e(pm,a0),e(ws,s0),e(ws,Rr),e(Rr,l0),e($,i0),e($,Fe),y(Ms,Fe,null),e(Fe,r0),e(Fe,mm),e(mm,c0),e(Fe,d0),y(Bn,Fe,null),e($,p0),e($,be),y(Ts,be,null),e(be,m0),e(be,fm),e(fm,f0),e(be,u0),y(Pn,be,null),e(be,h0),y(Fn,be,null),e($,g0),e($,Rn),y(Js,Rn,null),e(Rn,_0),e(Rn,Is),e(Is,b0),e(Is,um),e(um,v0),e(Is,y0),e($,w0),e($,Vn),y(Us,Vn,null),e(Vn,M0),e(Vn,hm),e(hm,T0),e($,J0),e($,Xn),y(Es,Xn,null),e(Xn,I0),e(Xn,js),e(js,U0),e(js,gm),e(gm,E0),e(js,j0),e($,Z0),e($,ve),y(Zs,ve,null),e(ve,C0),e(ve,Cs),e(Cs,$0),e(Cs,$s),e($s,N0),e(Cs,x0),e(ve,k0),y(An,ve,null),e(ve,W0),y(Yn,ve,null),e($,G0),e($,Qn),y(Ns,Qn,null),e(Qn,D0),e(Qn,xs),e(xs,S0),e(xs,ks),e(ks,B0),e(xs,P0),e($,F0),e($,V),y(Ws,V,null),e(V,R0),e(V,Gs),e(Gs,V0),e(Gs,Vr),e(Vr,X0),e(Gs,A0),e(V,Y0),e(V,_m),e(_m,Q0),e(V,L0),y(Ln,V,null),e(V,z0),e(V,Ds),e(Ds,H0),e(Ds,Ss),e(Ss,q0),e(Ds,O0),e(V,K0),y(zn,V,null),e($,eM),e($,Hn),y(Bs,Hn,null),e(Hn,tM),e(Hn,Ps),e(Ps,nM),e(Ps,bm),e(bm,oM),e(Ps,aM),e($,sM),e($,qn),y(Fs,qn,null),e(qn,lM),e(qn,me),e(me,iM),e(me,vm),e(vm,rM),e(me,cM),e(me,ym),e(ym,dM),e(me,pM),e(me,wm),e(wm,mM),e(me,fM),e(me,Mm),e(Mm,uM),e(me,hM),e($,gM),e($,On),y(Rs,On,null),e(On,_M),e(On,Tm),e(Tm,bM),u(n,ku,m),u(n,It,m),e(It,Kn),e(Kn,Jm),y(Vs,Jm,null),e(It,vM),e(It,Im),e(Im,yM),u(n,Wu,m),u(n,j,m),y(Xs,j,null),e(j,wM),e(j,Um),e(Um,MM),e(j,TM),e(j,As),e(As,JM),e(As,Xr),e(Xr,IM),e(As,UM),e(j,EM),e(j,Em),e(Em,jM),e(j,ZM),e(j,jm),e(jm,Ys),e(Ys,Zm),e(Zm,CM),e(Ys,$M),e(Ys,Ar),e(Ar,NM),e(j,xM),y(eo,j,null),e(j,kM),e(j,Re),y(Qs,Re,null),e(Re,WM),e(Re,Cm),e(Cm,GM),e(Re,DM),y(to,Re,null),e(j,SM),e(j,ye),y(Ls,ye,null),e(ye,BM),e(ye,$m),e($m,PM),e(ye,FM),y(no,ye,null),e(ye,RM),y(oo,ye,null),e(j,VM),e(j,ao),y(zs,ao,null),e(ao,XM),e(ao,Hs),e(Hs,AM),e(Hs,Nm),e(Nm,YM),e(Hs,QM),e(j,LM),e(j,so),y(qs,so,null),e(so,zM),e(so,xm),e(xm,HM),e(j,qM),e(j,lo),y(Os,lo,null),e(lo,OM),e(lo,Ks),e(Ks,KM),e(Ks,km),e(km,eT),e(Ks,tT),e(j,nT),e(j,we),y(el,we,null),e(we,oT),e(we,tl),e(tl,aT),e(tl,nl),e(nl,sT),e(tl,lT),e(we,iT),y(io,we,null),e(we,rT),y(ro,we,null),e(j,cT),e(j,co),y(ol,co,null),e(co,dT),e(co,al),e(al,pT),e(al,sl),e(sl,mT),e(al,fT),e(j,uT),e(j,X),y(ll,X,null),e(X,hT),e(X,il),e(il,gT),e(il,Yr),e(Yr,_T),e(il,bT),e(X,vT),e(X,Wm),e(Wm,yT),e(X,wT),y(po,X,null),e(X,MT),e(X,rl),e(rl,TT),e(rl,cl),e(cl,JT),e(rl,IT),e(X,UT),y(mo,X,null),e(j,ET),e(j,fo),y(dl,fo,null),e(fo,jT),e(fo,pl),e(pl,ZT),e(pl,Gm),e(Gm,CT),e(pl,$T),e(j,NT),e(j,uo),y(ml,uo,null),e(uo,xT),e(uo,fe),e(fe,kT),e(fe,Dm),e(Dm,WT),e(fe,GT),e(fe,Sm),e(Sm,DT),e(fe,ST),e(fe,Bm),e(Bm,BT),e(fe,PT),e(fe,Pm),e(Pm,FT),e(fe,RT),e(j,VT),e(j,ho),y(fl,ho,null),e(ho,XT),e(ho,Fm),e(Fm,AT),u(n,Gu,m),u(n,Ut,m),e(Ut,go),e(go,Rm),y(ul,Rm,null),e(Ut,YT),e(Ut,Vm),e(Vm,QT),u(n,Du,m),u(n,ue,m),y(hl,ue,null),e(ue,LT),e(ue,Xm),e(Xm,zT),e(ue,HT),e(ue,gl),e(gl,qT),e(gl,Qr),e(Qr,OT),e(gl,KT),e(ue,eJ),e(ue,Ve),y(_l,Ve,null),e(Ve,tJ),e(Ve,Am),e(Am,nJ),e(Ve,oJ),y(_o,Ve,null),Su=!0},p(n,[m]){const bl={};m&2&&(bl.$$scope={dirty:m,ctx:n}),Jn.$set(bl);const Ym={};m&2&&(Ym.$$scope={dirty:m,ctx:n}),In.$set(Ym);const Qm={};m&2&&(Qm.$$scope={dirty:m,ctx:n}),Un.$set(Qm);const Lm={};m&2&&(Lm.$$scope={dirty:m,ctx:n}),Cn.$set(Lm);const Lr={};m&2&&(Lr.$$scope={dirty:m,ctx:n}),$n.$set(Lr);const zm={};m&2&&(zm.$$scope={dirty:m,ctx:n}),xn.$set(zm);const Hm={};m&2&&(Hm.$$scope={dirty:m,ctx:n}),kn.$set(Hm);const qm={};m&2&&(qm.$$scope={dirty:m,ctx:n}),Bn.$set(qm);const Om={};m&2&&(Om.$$scope={dirty:m,ctx:n}),Pn.$set(Om);const Km={};m&2&&(Km.$$scope={dirty:m,ctx:n}),Fn.$set(Km);const vl={};m&2&&(vl.$$scope={dirty:m,ctx:n}),An.$set(vl);const ef={};m&2&&(ef.$$scope={dirty:m,ctx:n}),Yn.$set(ef);const yl={};m&2&&(yl.$$scope={dirty:m,ctx:n}),Ln.$set(yl);const tf={};m&2&&(tf.$$scope={dirty:m,ctx:n}),zn.$set(tf);const wl={};m&2&&(wl.$$scope={dirty:m,ctx:n}),eo.$set(wl);const nf={};m&2&&(nf.$$scope={dirty:m,ctx:n}),to.$set(nf);const of={};m&2&&(of.$$scope={dirty:m,ctx:n}),no.$set(of);const af={};m&2&&(af.$$scope={dirty:m,ctx:n}),oo.$set(af);const Ml={};m&2&&(Ml.$$scope={dirty:m,ctx:n}),io.$set(Ml);const sf={};m&2&&(sf.$$scope={dirty:m,ctx:n}),ro.$set(sf);const Tl={};m&2&&(Tl.$$scope={dirty:m,ctx:n}),po.$set(Tl);const lf={};m&2&&(lf.$$scope={dirty:m,ctx:n}),mo.$set(lf);const rf={};m&2&&(rf.$$scope={dirty:m,ctx:n}),_o.$set(rf)},i(n){Su||(w(p.$$.fragment,n),w(So.$$.fragment,n),w(Fo.$$.fragment,n),w(Ro.$$.fragment,n),w(Vo.$$.fragment,n),w(Xo.$$.fragment,n),w(Ao.$$.fragment,n),w(Yo.$$.fragment,n),w(Qo.$$.fragment,n),w(Lo.$$.fragment,n),w(zo.$$.fragment,n),w(Ho.$$.fragment,n),w(qo.$$.fragment,n),w(Ko.$$.fragment,n),w(ta.$$.fragment,n),w(na.$$.fragment,n),w(aa.$$.fragment,n),w(ia.$$.fragment,n),w(ra.$$.fragment,n),w(da.$$.fragment,n),w(pa.$$.fragment,n),w(ua.$$.fragment,n),w(ga.$$.fragment,n),w(Na.$$.fragment,n),w(Qa.$$.fragment,n),w(La.$$.fragment,n),w(qa.$$.fragment,n),w(Jn.$$.fragment,n),w(Oa.$$.fragment,n),w(In.$$.fragment,n),w(Un.$$.fragment,n),w(Ka.$$.fragment,n),w(ts.$$.fragment,n),w(ns.$$.fragment,n),w(as.$$.fragment,n),w(Cn.$$.fragment,n),w($n.$$.fragment,n),w(is.$$.fragment,n),w(ds.$$.fragment,n),w(xn.$$.fragment,n),w(kn.$$.fragment,n),w(us.$$.fragment,n),w(gs.$$.fragment,n),w(_s.$$.fragment,n),w(bs.$$.fragment,n),w(vs.$$.fragment,n),w(Ms.$$.fragment,n),w(Bn.$$.fragment,n),w(Ts.$$.fragment,n),w(Pn.$$.fragment,n),w(Fn.$$.fragment,n),w(Js.$$.fragment,n),w(Us.$$.fragment,n),w(Es.$$.fragment,n),w(Zs.$$.fragment,n),w(An.$$.fragment,n),w(Yn.$$.fragment,n),w(Ns.$$.fragment,n),w(Ws.$$.fragment,n),w(Ln.$$.fragment,n),w(zn.$$.fragment,n),w(Bs.$$.fragment,n),w(Fs.$$.fragment,n),w(Rs.$$.fragment,n),w(Vs.$$.fragment,n),w(Xs.$$.fragment,n),w(eo.$$.fragment,n),w(Qs.$$.fragment,n),w(to.$$.fragment,n),w(Ls.$$.fragment,n),w(no.$$.fragment,n),w(oo.$$.fragment,n),w(zs.$$.fragment,n),w(qs.$$.fragment,n),w(Os.$$.fragment,n),w(el.$$.fragment,n),w(io.$$.fragment,n),w(ro.$$.fragment,n),w(ol.$$.fragment,n),w(ll.$$.fragment,n),w(po.$$.fragment,n),w(mo.$$.fragment,n),w(dl.$$.fragment,n),w(ml.$$.fragment,n),w(fl.$$.fragment,n),w(ul.$$.fragment,n),w(hl.$$.fragment,n),w(_l.$$.fragment,n),w(_o.$$.fragment,n),Su=!0)},o(n){M(p.$$.fragment,n),M(So.$$.fragment,n),M(Fo.$$.fragment,n),M(Ro.$$.fragment,n),M(Vo.$$.fragment,n),M(Xo.$$.fragment,n),M(Ao.$$.fragment,n),M(Yo.$$.fragment,n),M(Qo.$$.fragment,n),M(Lo.$$.fragment,n),M(zo.$$.fragment,n),M(Ho.$$.fragment,n),M(qo.$$.fragment,n),M(Ko.$$.fragment,n),M(ta.$$.fragment,n),M(na.$$.fragment,n),M(aa.$$.fragment,n),M(ia.$$.fragment,n),M(ra.$$.fragment,n),M(da.$$.fragment,n),M(pa.$$.fragment,n),M(ua.$$.fragment,n),M(ga.$$.fragment,n),M(Na.$$.fragment,n),M(Qa.$$.fragment,n),M(La.$$.fragment,n),M(qa.$$.fragment,n),M(Jn.$$.fragment,n),M(Oa.$$.fragment,n),M(In.$$.fragment,n),M(Un.$$.fragment,n),M(Ka.$$.fragment,n),M(ts.$$.fragment,n),M(ns.$$.fragment,n),M(as.$$.fragment,n),M(Cn.$$.fragment,n),M($n.$$.fragment,n),M(is.$$.fragment,n),M(ds.$$.fragment,n),M(xn.$$.fragment,n),M(kn.$$.fragment,n),M(us.$$.fragment,n),M(gs.$$.fragment,n),M(_s.$$.fragment,n),M(bs.$$.fragment,n),M(vs.$$.fragment,n),M(Ms.$$.fragment,n),M(Bn.$$.fragment,n),M(Ts.$$.fragment,n),M(Pn.$$.fragment,n),M(Fn.$$.fragment,n),M(Js.$$.fragment,n),M(Us.$$.fragment,n),M(Es.$$.fragment,n),M(Zs.$$.fragment,n),M(An.$$.fragment,n),M(Yn.$$.fragment,n),M(Ns.$$.fragment,n),M(Ws.$$.fragment,n),M(Ln.$$.fragment,n),M(zn.$$.fragment,n),M(Bs.$$.fragment,n),M(Fs.$$.fragment,n),M(Rs.$$.fragment,n),M(Vs.$$.fragment,n),M(Xs.$$.fragment,n),M(eo.$$.fragment,n),M(Qs.$$.fragment,n),M(to.$$.fragment,n),M(Ls.$$.fragment,n),M(no.$$.fragment,n),M(oo.$$.fragment,n),M(zs.$$.fragment,n),M(qs.$$.fragment,n),M(Os.$$.fragment,n),M(el.$$.fragment,n),M(io.$$.fragment,n),M(ro.$$.fragment,n),M(ol.$$.fragment,n),M(ll.$$.fragment,n),M(po.$$.fragment,n),M(mo.$$.fragment,n),M(dl.$$.fragment,n),M(ml.$$.fragment,n),M(fl.$$.fragment,n),M(ul.$$.fragment,n),M(hl.$$.fragment,n),M(_l.$$.fragment,n),M(_o.$$.fragment,n),Su=!1},d(n){t(f),n&&t(I),n&&t(_),T(p),n&&t(Et),n&&t(Ue),n&&t(Wo),n&&t(rt),n&&t(bf),n&&t(Ul),n&&t(vf),n&&t(El),n&&t(yf),n&&t(jt),n&&t(wf),n&&t(Zt),n&&t(Mf),n&&t(ct),T(So),n&&t(Tf),n&&t($t),n&&t(Jf),n&&t(Nt),n&&t(If),n&&t(xt),n&&t(Uf),T(Fo,n),n&&t(Ef),n&&t(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C),T(La),T(qa),T(Jn),T(Oa),T(In),T(Un),T(Ka),T(ts),T(ns),T(as),T(Cn),T($n),T(is),T(ds),T(xn),T(kn),T(us),T(gs),T(_s),n&&t(Nu),n&&t(Jt),T(bs),n&&t(xu),n&&t($),T(vs),T(Ms),T(Bn),T(Ts),T(Pn),T(Fn),T(Js),T(Us),T(Es),T(Zs),T(An),T(Yn),T(Ns),T(Ws),T(Ln),T(zn),T(Bs),T(Fs),T(Rs),n&&t(ku),n&&t(It),T(Vs),n&&t(Wu),n&&t(j),T(Xs),T(eo),T(Qs),T(to),T(Ls),T(no),T(oo),T(zs),T(qs),T(Os),T(el),T(io),T(ro),T(ol),T(ll),T(po),T(mo),T(dl),T(ml),T(fl),n&&t(Gu),n&&t(Ut),T(ul),n&&t(Du),n&&t(ue),T(hl),T(_l),T(_o)}}}const e$={local:"controlnet",sections:[{local:"usage-example",title:"Usage example"},{local:"combining-multiple-conditionings",sections:[{local:"canny-conditioning",title:"Canny conditioning"},{local:"openpose-conditioning",title:"Openpose conditioning"},{local:"running-controlnet-with-multiple-conditionings",title:"Running ControlNet with multiple conditionings"},{local:"guess-mode",sections:[{local:"the-core-implementation",title:"The core implementation:"},{local:"usage",title:"Usage:"},{local:"output-image-comparison",title:"Output image comparison:"}],title:"Guess Mode"}],title:"Combining multiple conditionings"},{local:"available-checkpoints",sections:[{local:"controlnet-v10",title:"ControlNet v1.0"},{local:"controlnet-v11",title:"ControlNet v1.1"}],title:"Available checkpoints"},{local:"diffusers.StableDiffusionControlNetPipeline",title:"StableDiffusionControlNetPipeline"},{local:"diffusers.StableDiffusionControlNetImg2ImgPipeline",title:"StableDiffusionControlNetImg2ImgPipeline"},{local:"diffusers.StableDiffusionControlNetInpaintPipeline",title:"StableDiffusionControlNetInpaintPipeline"},{local:"diffusers.FlaxStableDiffusionControlNetPipeline",title:"FlaxStableDiffusionControlNetPipeline"}],title:"ControlNet"};function t$(E){return ZC(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class r$ extends IC{constructor(f){super();UC(this,f,t$,KC,EC,{})}}export{r$ as default,e$ as metadata};
