import{S as yy,i as vy,s as wy,e as o,k as i,w as b,t as l,M as Ty,c as n,d as a,m as r,a as s,x as y,h as p,b as d,N as Z,f as zn,G as e,g as f,y as v,q as w,o as T,B as M,v as My,L as qn}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Ep}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as S}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as G}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ie}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Hn}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ey(D){let h,E,g,u,U;return u=new G({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25BZGFwdGVyUGlwZWxpbmUlMkMlMjBUMklBZGFwdGVyJTBBJTBBaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmNvbG9yX3JlZi5wbmclMjIlMEEpJTBBJTBBY29sb3JfcGFsZXR0ZSUyMCUzRCUyMGltYWdlLnJlc2l6ZSgoOCUyQyUyMDgpKSUwQWNvbG9yX3BhbGV0dGUlMjAlM0QlMjBjb2xvcl9wYWxldHRlLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSUyQyUyMHJlc2FtcGxlJTNESW1hZ2UuUmVzYW1wbGluZy5ORUFSRVNUKSUwQSUwQWFkYXB0ZXIlMjAlM0QlMjBUMklBZGFwdGVyLmZyb21fcHJldHJhaW5lZCglMjJUZW5jZW50QVJDJTJGdDJpYWRhcHRlcl9jb2xvcl9zZDE0djElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXIlM0RhZGFwdGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFvdXRfaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCUyMkF0JTIwbmlnaHQlMkMlMjBnbG93aW5nJTIwY3ViZXMlMjBpbiUyMGZyb250JTIwb2YlMjB0aGUlMjBiZWFjaCUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEY29sb3JfcGFsZXR0ZSUyQyUwQSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<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.utils <span class="hljs-keyword">import</span> load_image
<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> StableDiffusionAdapterPipeline, T2IAdapter

<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>color_palette = image.resize((<span class="hljs-number">8</span>, <span class="hljs-number">8</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>color_palette = color_palette.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>), resample=Image.Resampling.NEAREST)

<span class="hljs-meta">&gt;&gt;&gt; </span>adapter = T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_color_sd14v1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionAdapterPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
<span class="hljs-meta">... </span>    adapter=adapter,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>out_image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;At night, glowing cubes in front of the beach&quot;</span>,
<span class="hljs-meta">... </span>    image=color_palette,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Uy(D){let h,E,g,u,U;return{c(){h=o("p"),E=l("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=o("code"),u=l("scaled_dot_product_attention"),U=l(` (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(m){h=n(m,"P",{});var _=s(h);E=p(_,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=n(_,"CODE",{});var N=s(g);u=p(N,"scaled_dot_product_attention"),N.forEach(a),U=p(_,` (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!`),_.forEach(a)},m(m,_){f(m,h,_),e(h,E),e(h,g),e(g,u),e(h,U)},d(m){m&&a(h)}}}function Jy(D){let h,E,g,u,U;return u=new G({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(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Ay(D){let h,E;return{c(){h=o("p"),E=l(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(g){h=n(g,"P",{});var u=s(h);E=p(u,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),u.forEach(a)},m(g,u){f(g,h,u),e(h,E)},d(g){g&&a(h)}}}function Iy(D){let h,E,g,u,U;return u=new G({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(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function $y(D){let h,E,g,u,U;return u=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVDJJQWRhcHRlciUyQyUyMFN0YWJsZURpZmZ1c2lvblhMQWRhcHRlclBpcGVsaW5lJTJDJTIwRERQTVNjaGVkdWxlciUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBc2tldGNoX2ltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGQWRhcHRlciUyRnQyaWFkYXB0ZXIlMkZyZXNvbHZlJTJGbWFpbiUyRnNrZXRjaC5wbmclMjIpLmNvbnZlcnQoJTIyTCUyMiklMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi14bC1iYXNlLTEuMCUyMiUwQSUwQWFkYXB0ZXIlMjAlM0QlMjBUMklBZGFwdGVyLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJBZGFwdGVyJTJGdDJpYWRhcHRlciUyMiUyQyUwQSUyMCUyMCUyMCUyMHN1YmZvbGRlciUzRCUyMnNrZXRjaF9zZHhsXzEuMCUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXJfdHlwZSUzRCUyMmZ1bGxfYWRhcHRlcl94bCUyMiUyQyUwQSklMEFzY2hlZHVsZXIlMjAlM0QlMjBERFBNU2NoZWR1bGVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHN1YmZvbGRlciUzRCUyMnNjaGVkdWxlciUyMiklMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uWExBZGFwdGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTIwYWRhcHRlciUzRGFkYXB0ZXIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUyQyUyMHNjaGVkdWxlciUzRHNjaGVkdWxlciUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg0MiklMEFza2V0Y2hfaW1hZ2Vfb3V0JTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjBpbiUyMHJlYWwlMjB3b3JsZCUyQyUyMGhpZ2glMjBxdWFsaXR5JTIyJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEJTIyZXh0cmElMjBkaWdpdCUyQyUyMGZld2VyJTIwZGlnaXRzJTJDJTIwY3JvcHBlZCUyQyUyMHdvcnN0JTIwcXVhbGl0eSUyQyUyMGxvdyUyMHF1YWxpdHklMjIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZSUzRHNrZXRjaF9pbWFnZSUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENy41JTJDJTBBKS5pbWFnZXMlNUIwJTVE",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> T2IAdapter, StableDiffusionXLAdapterPipeline, DDPMScheduler
<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>sketch_image = load_image(<span class="hljs-string">&quot;https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png&quot;</span>).convert(<span class="hljs-string">&quot;L&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>adapter = T2IAdapter.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Adapter/t2iadapter&quot;</span>,
<span class="hljs-meta">... </span>    subfolder=<span class="hljs-string">&quot;sketch_sdxl_1.0&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    adapter_type=<span class="hljs-string">&quot;full_adapter_xl&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = DDPMScheduler.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
<span class="hljs-meta">... </span>    model_id, adapter=adapter, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>, scheduler=scheduler
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>generator = torch.manual_seed(<span class="hljs-number">42</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sketch_image_out = pipe(
<span class="hljs-meta">... </span>    prompt=<span class="hljs-string">&quot;a photo of a dog in real world, high quality&quot;</span>,
<span class="hljs-meta">... </span>    negative_prompt=<span class="hljs-string">&quot;extra digit, fewer digits, cropped, worst quality, low quality&quot;</span>,
<span class="hljs-meta">... </span>    image=sketch_image,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">7.5</span>,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function xy(D){let h,E,g,u,U;return{c(){h=o("p"),E=l("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=o("code"),u=l("scaled_dot_product_attention"),U=l(` (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(m){h=n(m,"P",{});var _=s(h);E=p(_,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=n(_,"CODE",{});var N=s(g);u=p(N,"scaled_dot_product_attention"),N.forEach(a),U=p(_,` (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!`),_.forEach(a)},m(m,_){f(m,h,_),e(h,E),e(h,g),e(g,u),e(h,U)},d(m){m&&a(h)}}}function ky(D){let h,E,g,u,U;return u=new G({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(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Dy(D){let h,E;return{c(){h=o("p"),E=l(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(g){h=n(g,"P",{});var u=s(h);E=p(u,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),u.forEach(a)},m(g,u){f(g,h,u),e(h,E)},d(g){g&&a(h)}}}function Zy(D){let h,E,g,u,U;return u=new G({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(){h=o("p"),E=l("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=p(_,"Examples:"),_.forEach(a),g=r(m),y(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),v(u,m,_),U=!0},p:qn,i(m){U||(w(u.$$.fragment,m),U=!0)},o(m){T(u.$$.fragment,m),U=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Sy(D){let h,E,g,u,U,m,_,N,Up,ar,ce,Ee,On,Vt,Jp,Kn,Ap,or,Qt,Yt,Ip,$p,nr,Po,xp,sr,Co,kp,ir,Ro,es,Dp,rr,Ue,Zp,zt,Sp,Gp,lr,fe,Je,ts,Ht,jp,as,Pp,pr,Ae,os,me,ns,Cp,Rp,ss,Wp,Xp,Wo,Np,Bp,qt,he,is,Ot,Fp,Lp,rs,ls,Vp,Qp,Xo,Yp,zp,ue,ps,Kt,Hp,qp,ds,cs,Op,Kp,No,ed,dr,ge,Ie,fs,ea,td,ms,ad,cr,$e,od,hs,nd,sd,fr,xe,ta,id,us,rd,ld,pd,B,dd,gs,cd,fd,_s,md,hd,Bo,ud,gd,mr,ke,_d,aa,bd,yd,hr,oa,ur,Fo,Lo,Cu,gr,Vo,vd,_r,na,br,Qo,wd,yr,Yo,zo,Ru,vr,Ho,Td,wr,sa,Tr,qo,Md,Mr,ia,Er,Oo,Ko,Wu,Ur,_e,De,bs,ra,Ed,ys,Ud,Jr,Ze,Jd,vs,Ad,Id,Ar,Se,la,$d,ws,xd,kd,Dd,F,Zd,Ts,Sd,Gd,Ms,jd,Pd,en,Cd,Rd,Ir,Ge,Wd,pa,Xd,Nd,$r,da,xr,tn,an,Xu,kr,on,Bd,Dr,ca,Zr,nn,Fd,Sr,fa,Gr,sn,rn,Nu,jr,be,je,Es,ma,Ld,Us,Vd,Pr,Pe,Qd,ha,Yd,zd,Cr,ye,Ce,Js,ua,Hd,As,qd,Rr,Re,Is,L,$s,Od,Kd,xs,ec,tc,ks,ac,oc,Ds,nc,sc,A,V,We,ga,ic,rc,lc,Zs,pc,dc,Ss,cc,fc,Gs,ln,Xe,Bu,mc,js,pn,dn,Fu,hc,Q,Ne,_a,uc,gc,_c,Ps,bc,yc,Cs,vc,wc,Rs,cn,Be,Lu,Tc,Ws,fn,mn,Vu,Mc,Y,Fe,ba,Ec,Uc,Jc,ya,Ac,va,Ic,$c,xc,Xs,kc,Dc,Ns,hn,Le,Qu,Zc,Bs,un,gn,Yu,Sc,z,Ve,wa,Gc,jc,Pc,Fs,Cc,Rc,Ls,Wc,Xc,Vs,_n,bn,zu,Nc,Qs,yn,vn,Hu,Bc,H,Qe,Ta,Fc,Lc,Vc,Ys,Qc,Yc,Ma,zc,Ea,Hc,qc,Oc,zs,wn,Tn,qu,Kc,Hs,Mn,En,Ou,ef,q,Ye,Ua,tf,af,of,qs,nf,sf,Ja,rf,Aa,lf,pf,df,Os,Un,Jn,Ku,cf,Ks,An,In,eg,ff,O,Ia,$a,mf,hf,ei,uf,gf,xa,_f,ka,bf,yf,vf,ti,$n,xn,tg,wf,ai,kn,Dn,ag,Tf,K,oi,Da,Mf,Ef,Wr,Uf,Xr,Jf,Nr,Af,ee,ni,Za,If,$f,Br,xf,Fr,kf,Lr,Df,te,si,Sa,Zf,Sf,Vr,Gf,Qr,jf,Yr,Pf,ae,ii,Ga,Cf,Rf,zr,Wf,Hr,Xf,qr,Nf,oe,ri,ja,Bf,Ff,Or,Lf,Kr,Vf,el,Qf,ne,li,Pa,Yf,zf,tl,Hf,al,qf,ol,Of,se,pi,Ca,Kf,em,nl,tm,sl,am,il,rl,ve,ze,di,Ra,om,ci,nm,ll,Wa,fi,sm,im,pl,Zn,rm,dl,Xa,cl,Sn,lm,fl,He,Gn,og,pm,jn,ng,ml,Na,mi,dm,cm,hl,Ba,hi,fm,mm,ul,Fa,gl,Pn,Cn,sg,_l,we,qe,ui,La,hm,gi,um,bl,Oe,gm,Va,_m,bm,yl,Te,Ke,_i,Qa,ym,bi,vm,vl,I,Ya,wm,Rn,Tm,za,Mm,Em,Ha,Um,Wn,Jm,Am,Im,re,qa,$m,yi,xm,km,et,Dm,C,Oa,Zm,vi,Sm,Gm,tt,jm,at,Pm,ot,Ka,Cm,eo,Rm,wi,Wm,Xm,Nm,nt,to,Bm,Ti,Fm,Lm,st,ao,Vm,oo,Qm,Mi,Ym,zm,Hm,R,no,qm,so,Om,io,Km,eh,th,it,ah,rt,oh,lt,ro,nh,lo,sh,po,ih,rh,lh,pt,co,ph,j,dh,Ei,ch,fh,Ui,mh,hh,Ji,uh,gh,Ai,_h,bh,yh,dt,fo,vh,Ii,wh,wl,Me,ct,$i,mo,Th,xi,Mh,Tl,J,ho,Eh,Xn,Uh,uo,Jh,Ah,go,Ih,Nn,$h,xh,kh,le,_o,Dh,ki,Zh,Sh,ft,Gh,W,bo,jh,Di,Ph,Ch,mt,Rh,ht,Wh,ut,yo,Xh,vo,Nh,Zi,Bh,Fh,Lh,gt,wo,Vh,Si,Qh,Yh,_t,To,zh,Mo,Hh,Gi,qh,Oh,Kh,X,Eo,eu,Uo,tu,Jo,au,ou,nu,bt,su,yt,iu,vt,Ao,ru,Io,lu,$o,pu,du,cu,wt,xo,fu,ko,mu,ji,hu,uu,gu,Tt,Do,_u,P,bu,Pi,yu,vu,Ci,wu,Tu,Ri,Mu,Eu,Wi,Uu,Ju,Au,Mt,Zo,Iu,Xi,$u,xu,Et,So,ku,Ni,Du,Ml;return m=new ie({}),Vt=new ie({}),Ht=new ie({}),ea=new ie({}),oa=new G({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGY29sb3JfcmVmLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>)`}}),na=new G({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBY29sb3JfcGFsZXR0ZSUyMCUzRCUyMGltYWdlLnJlc2l6ZSgoOCUyQyUyMDgpKSUwQWNvbG9yX3BhbGV0dGUlMjAlM0QlMjBjb2xvcl9wYWxldHRlLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSUyQyUyMHJlc2FtcGxlJTNESW1hZ2UuUmVzYW1wbGluZy5ORUFSRVNUKQ==",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

color_palette = image.resize((<span class="hljs-number">8</span>, <span class="hljs-number">8</span>))
color_palette = color_palette.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>), resample=Image.Resampling.NEAREST)`}}),sa=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQWRhcHRlclBpcGVsaW5lJTJDJTIwVDJJQWRhcHRlciUwQSUwQWFkYXB0ZXIlMjAlM0QlMjBUMklBZGFwdGVyLmZyb21fcHJldHJhaW5lZCglMjJUZW5jZW50QVJDJTJGdDJpYWRhcHRlcl9jb2xvcl9zZDE0djElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXIlM0RhZGFwdGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGUudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, T2IAdapter

adapter = T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_color_sd14v1&quot;</span>, torch_dtype=torch.float16)
pipe = StableDiffusionAdapterPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    adapter=adapter,
    torch_dtype=torch.float16,
)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),ia=new G({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg3KSUwQSUwQW91dF9pbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIyQXQlMjBuaWdodCUyQyUyMGdsb3dpbmclMjBjdWJlcyUyMGluJTIwZnJvbnQlMjBvZiUyMHRoZSUyMGJlYWNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0Rjb2xvcl9wYWxldHRlJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-comment"># fix the random seed, so you will get the same result as the example</span>
generator = torch.manual_seed(<span class="hljs-number">7</span>)

out_image = pipe(
    <span class="hljs-string">&quot;At night, glowing cubes in front of the beach&quot;</span>,
    image=color_palette,
    generator=generator,
).images[<span class="hljs-number">0</span>]`}}),ra=new ie({}),da=new G({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFza2V0Y2hfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZBZGFwdGVyJTJGdDJpYWRhcHRlciUyRnJlc29sdmUlMkZtYWluJTJGc2tldGNoLnBuZyUyMikuY29udmVydCglMjJMJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

sketch_image = load_image(<span class="hljs-string">&quot;https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png&quot;</span>).convert(<span class="hljs-string">&quot;L&quot;</span>)`}}),ca=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwKCUwQSUyMCUyMCUyMCUyMFQySUFkYXB0ZXIlMkMlMEElMjAlMjAlMjAlMjBTdGFibGVEaWZmdXNpb25YTEFkYXB0ZXJQaXBlbGluZSUyQyUwQSUyMCUyMCUyMCUyMEREUE1TY2hlZHVsZXIlMEEpJTBBZnJvbSUyMGRpZmZ1c2Vycy5tb2RlbHMudW5ldF8yZF9jb25kaXRpb24lMjBpbXBvcnQlMjBVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTBBYWRhcHRlciUyMCUzRCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMkFkYXB0ZXIlMkZ0MmlhZGFwdGVyJTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIyc2tldGNoX3NkeGxfMS4wJTIyJTJDdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwYWRhcHRlcl90eXBlJTNEJTIyZnVsbF9hZGFwdGVyX3hsJTIyKSUwQXNjaGVkdWxlciUyMCUzRCUyMEREUE1TY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkJTJDJTIwc3ViZm9sZGVyJTNEJTIyc2NoZWR1bGVyJTIyKSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25YTEFkYXB0ZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMjBhZGFwdGVyJTNEYWRhcHRlciUyQyUyMHNhZmV0eV9jaGVja2VyJTNETm9uZSUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUyMHZhcmlhbnQlM0QlMjJmcDE2JTIyJTJDJTIwc2NoZWR1bGVyJTNEc2NoZWR1bGVyJTBBKSUwQSUwQXBpcGUudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
    T2IAdapter,
    StableDiffusionXLAdapterPipeline,
    DDPMScheduler
)
<span class="hljs-keyword">from</span> diffusers.models.unet_2d_condition <span class="hljs-keyword">import</span> UNet2DConditionModel

model_id = <span class="hljs-string">&quot;stabilityai/stable-diffusion-xl-base-1.0&quot;</span>
adapter = T2IAdapter.from_pretrained(<span class="hljs-string">&quot;Adapter/t2iadapter&quot;</span>, subfolder=<span class="hljs-string">&quot;sketch_sdxl_1.0&quot;</span>,torch_dtype=torch.float16, adapter_type=<span class="hljs-string">&quot;full_adapter_xl&quot;</span>)
scheduler = DDPMScheduler.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)

pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
    model_id, adapter=adapter, safety_checker=<span class="hljs-literal">None</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>, scheduler=scheduler
)

pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),fa=new G({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoKS5tYW51YWxfc2VlZCg0MiklMEElMEFza2V0Y2hfaW1hZ2Vfb3V0JTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjBpbiUyMHJlYWwlMjB3b3JsZCUyQyUyMGhpZ2glMjBxdWFsaXR5JTIyJTJDJTIwJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEJTIyZXh0cmElMjBkaWdpdCUyQyUyMGZld2VyJTIwZGlnaXRzJTJDJTIwY3JvcHBlZCUyQyUyMHdvcnN0JTIwcXVhbGl0eSUyQyUyMGxvdyUyMHF1YWxpdHklMjIlMkMlMjAlMEElMjAlMjAlMjAlMjBpbWFnZSUzRHNrZXRjaF9pbWFnZSUyQyUyMCUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUyMCUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENy41JTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-comment"># fix the random seed, so you will get the same result as the example</span>
generator = torch.Generator().manual_seed(<span class="hljs-number">42</span>)

sketch_image_out = pipe(
    prompt=<span class="hljs-string">&quot;a photo of a dog in real world, high quality&quot;</span>, 
    negative_prompt=<span class="hljs-string">&quot;extra digit, fewer digits, cropped, worst quality, low quality&quot;</span>, 
    image=sketch_image, 
    generator=generator, 
    guidance_scale=<span class="hljs-number">7.5</span>
).images[<span class="hljs-number">0</span>]`}}),ma=new ie({}),ua=new ie({}),Ra=new ie({}),Xa=new G({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWNvbmRfa2V5cG9zZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGa2V5cG9zZV9zYW1wbGVfaW5wdXQucG5nJTIyJTBBKSUwQWNvbmRfZGVwdGglMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmRlcHRoX3NhbXBsZV9pbnB1dC5wbmclMjIlMEEpJTBBY29uZCUyMCUzRCUyMCU1QiU1QmNvbmRfa2V5cG9zZSUyQyUyMGNvbmRfZGVwdGglNUQlNUQlMEElMEFwcm9tcHQlMjAlM0QlMjAlNUIlMjJBJTIwbWFuJTIwd2Fsa2luZyUyMGluJTIwYW4lMjBvZmZpY2UlMjByb29tJTIwd2l0aCUyMGElMjBuaWNlJTIwdmlldyUyMiU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

cond_keypose = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png&quot;</span>
)
cond_depth = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png&quot;</span>
)
cond = [[cond_keypose, cond_depth]]

prompt = [<span class="hljs-string">&quot;A man walking in an office room with a nice view&quot;</span>]`}}),Fa=new G({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZSUyQyUyME11bHRpQWRhcHRlciUwQSUwQWFkYXB0ZXJzJTIwJTNEJTIwTXVsdGlBZGFwdGVyKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2tleXBvc2Vfc2QxNHYxJTIyKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2RlcHRoX3NkMTR2MSUyMiklMkMlMEElMjAlMjAlMjAlMjAlNUQlMEEpJTBBYWRhcHRlcnMlMjAlM0QlMjBhZGFwdGVycy50byh0b3JjaC5mbG9hdDE2KSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25BZGFwdGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyJTNEYWRhcHRlcnMlMkMlMEEpJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBjb25kJTJDJTIwYWRhcHRlcl9jb25kaXRpb25pbmdfc2NhbGUlM0QlNUIwLjglMkMlMjAwLjglNUQp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, MultiAdapter

adapters = MultiAdapter(
    [
        T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_keypose_sd14v1&quot;</span>),
        T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_depth_sd14v1&quot;</span>),
    ]
)
adapters = adapters.to(torch.float16)

pipe = StableDiffusionAdapterPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    torch_dtype=torch.float16,
    adapter=adapters,
)

images = pipe(prompt, cond, adapter_conditioning_scale=[<span class="hljs-number">0.8</span>, <span class="hljs-number">0.8</span>])`}}),La=new ie({}),Qa=new ie({}),Ya=new S({props:{name:"class diffusers.StableDiffusionAdapterPipeline",anchor:"diffusers.StableDiffusionAdapterPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"adapter",val:": typing.Union[diffusers.models.adapter.T2IAdapter, diffusers.models.adapter.MultiAdapter, typing.List[diffusers.models.adapter.T2IAdapter]]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"adapter_weights",val:": typing.Optional[typing.List[float]] = None"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionAdapterPipeline.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.StableDiffusionAdapterPipeline.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.StableDiffusionAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionAdapterPipeline.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.StableDiffusionAdapterPipeline.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/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L120"}}),qa=new S({props:{name:"__call__",anchor:"diffusers.StableDiffusionAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = 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:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.FloatTensor]</code> or <code>List[PIL.Image.Image]</code> or <code>List[List[PIL.Image.Image]]</code>) &#x2014;
The Adapter input condition. Adapter uses this input condition to generate guidance to Unet. If the
type is specified as <code>Torch.FloatTensor</code>, it is passed to Adapter as is. PIL.Image.Image\` can also be
accepted as an image. The control image is automatically resized to fit the output image.`,name:"image"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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. 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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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 <code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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.StableDiffusionAdapterPipeline.__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>AttnProcessor</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.StableDiffusionAdapterPipeline.__call__.adapter_conditioning_scale",description:`<strong>adapter_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The outputs of the adapter are multiplied by <code>adapter_conditioning_scale</code> before they are added to the
residual in the original unet. If multiple adapters are specified in init, you can set the
corresponding scale as a list.`,name:"adapter_conditioning_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L587",returnDescription:`
<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> 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><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> or <code>tuple</code></p>
`}}),et=new Hn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[Ey]},$$scope:{ctx:D}}}),Oa=new S({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),tt=new Ep({props:{warning:!0,$$slots:{default:[Uy]},$$scope:{ctx:D}}}),at=new Hn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Jy]},$$scope:{ctx:D}}}),Ka=new S({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),to=new S({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L205"}}),ao=new S({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L213"}}),no=new S({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),it=new Ep({props:{warning:!0,$$slots:{default:[Ay]},$$scope:{ctx:D}}}),rt=new Hn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Iy]},$$scope:{ctx:D}}}),ro=new S({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),co=new S({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L220"}}),fo=new S({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L280"}}),mo=new ie({}),ho=new S({props:{name:"class diffusers.StableDiffusionXLAdapterPipeline",anchor:"diffusers.StableDiffusionXLAdapterPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"text_encoder_2",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"tokenizer_2",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"adapter",val:": typing.Union[diffusers.models.adapter.T2IAdapter, diffusers.models.adapter.MultiAdapter, typing.List[diffusers.models.adapter.T2IAdapter]]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"force_zeros_for_empty_prompt",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.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.StableDiffusionXLAdapterPipeline.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.StableDiffusionXLAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.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.StableDiffusionXLAdapterPipeline.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/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L125"}}),_o=new S({props:{name:"__call__",anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"denoising_end",val:": typing.Optional[float] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to the <code>tokenizer_2</code> and <code>text_encoder_2</code>. If not defined, <code>prompt</code> is
used in both text-encoders`,name:"prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.FloatTensor]</code> or <code>List[PIL.Image.Image]</code> or <code>List[List[PIL.Image.Image]]</code>) &#x2014;
The Adapter input condition. Adapter uses this input condition to generate guidance to Unet. If the
type is specified as <code>Torch.FloatTensor</code>, it is passed to Adapter as is. PIL.Image.Image\` can also be
accepted as an image. The control image is automatically resized to fit the output image.`,name:"image"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.denoising_end",description:`<strong>denoising_end</strong> (<code>float</code>, <em>optional</em>) &#x2014;
When specified, determines the fraction (between 0.0 and 1.0) of the total denoising process to be
completed before it is intentionally prematurely terminated. As a result, the returned sample will
still retain a substantial amount of noise as determined by the discrete timesteps selected by the
scheduler. The denoising_end parameter should ideally be utilized when this pipeline forms a part of a
&#x201C;Mixture of Denoisers&#x201D; multi-pipeline setup, as elaborated in <a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_xl#refining-the-image-output" rel="nofollow"><strong>Refining the Image
Output</strong></a>`,name:"denoising_end"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) &#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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in both text-encoders`,name:"negative_prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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 <code>~pipelines.stable_diffusion_xl.StableDiffusionAdapterPipelineOutput</code>
instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__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.StableDiffusionXLAdapterPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.7) &#x2014;
Guidance rescale factor proposed by <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a> <code>guidance_scale</code> is defined as <code>&#x3C6;</code> in equation 16. of
<a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are Flawed</a>.
Guidance rescale factor should fix overexposure when using zero terminal SNR.`,name:"guidance_rescale"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.original_size",description:`<strong>original_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
If <code>original_size</code> is not the same as <code>target_size</code> the image will appear to be down- or upsampled.
<code>original_size</code> defaults to <code>(width, height)</code> if not specified. Part of SDXL&#x2019;s micro-conditioning as
explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"original_size"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.crops_coords_top_left",description:`<strong>crops_coords_top_left</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (0, 0)) &#x2014;
<code>crops_coords_top_left</code> can be used to generate an image that appears to be &#x201C;cropped&#x201D; from the position
<code>crops_coords_top_left</code> downwards. Favorable, well-centered images are usually achieved by setting
<code>crops_coords_top_left</code> to (0, 0). Part of SDXL&#x2019;s micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"crops_coords_top_left"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.target_size",description:`<strong>target_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
For most cases, <code>target_size</code> should be set to the desired height and width of the generated image. If
not specified it will default to <code>(width, height)</code>. Part of SDXL&#x2019;s micro-conditioning as explained in
section 2.2 of <a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"target_size"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.adapter_conditioning_scale",description:`<strong>adapter_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The outputs of the adapter are multiplied by <code>adapter_conditioning_scale</code> before they are added to the
residual in the original unet. If multiple adapters are specified in init, you can set the
corresponding scale as a list.`,name:"adapter_conditioning_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L620",returnDescription:`
<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> if <code>return_dict</code> is True, otherwise a
<code>tuple</code>. When returning a tuple, the first element is a list with the generated images.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> or <code>tuple</code></p>
`}}),ft=new Hn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[$y]},$$scope:{ctx:D}}}),bo=new S({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),mt=new Ep({props:{warning:!0,$$slots:{default:[xy]},$$scope:{ctx:D}}}),ht=new Hn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[ky]},$$scope:{ctx:D}}}),yo=new S({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),wo=new S({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L190"}}),To=new S({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L198"}}),Eo=new S({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),bt=new Ep({props:{warning:!0,$$slots:{default:[Dy]},$$scope:{ctx:D}}}),yt=new Hn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Zy]},$$scope:{ctx:D}}}),Ao=new S({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),xo=new S({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L215"}}),Do=new S({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L223"}}),Zo=new S({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L206"}}),So=new S({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt",parameters:[{name:"prompt",val:": str"},{name:"prompt_2",val:": typing.Optional[str] = None"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": typing.Optional[str] = None"},{name:"negative_prompt_2",val:": typing.Optional[str] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to the <code>tokenizer_2</code> and <code>text_encoder_2</code>. If not defined, <code>prompt</code> is
used in both text-encoders
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in both text-encoders`,name:"negative_prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L254"}}),{c(){h=o("meta"),E=i(),g=o("h1"),u=o("a"),U=o("span"),b(m.$$.fragment),_=i(),N=o("span"),Up=l("Text-to-Image Generation with Adapter Conditioning"),ar=i(),ce=o("h2"),Ee=o("a"),On=o("span"),b(Vt.$$.fragment),Jp=i(),Kn=o("span"),Ap=l("Overview"),or=i(),Qt=o("p"),Yt=o("a"),Ip=l("T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),$p=l(" by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),nr=i(),Po=o("p"),xp=l("Using the pretrained models 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."),sr=i(),Co=o("p"),kp=l("The abstract of the paper is the following:"),ir=i(),Ro=o("p"),es=o("em"),Dp=l("The incredible generative ability of large-scale text-to-image (T2I) models has demonstrated strong power of learning complex structures and meaningful semantics. However, relying solely on text prompts cannot fully take advantage of the knowledge learned by the model, especially when flexible and accurate structure control is needed. In this paper, we aim to \u201Cdig out\u201D the capabilities that T2I models have implicitly learned, and then explicitly use them to control the generation more granularly. Specifically, we propose to learn simple and small T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, and achieve rich control and editing effects. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications."),rr=i(),Ue=o("p"),Zp=l("This model was contributed by the community contributor "),zt=o("a"),Sp=l("HimariO"),Gp=l(" \u2764\uFE0F ."),lr=i(),fe=o("h2"),Je=o("a"),ts=o("span"),b(Ht.$$.fragment),jp=i(),as=o("span"),Pp=l("Available Pipelines:"),pr=i(),Ae=o("table"),os=o("thead"),me=o("tr"),ns=o("th"),Cp=l("Pipeline"),Rp=i(),ss=o("th"),Wp=l("Tasks"),Xp=i(),Wo=o("th"),Np=l("Demo"),Bp=i(),qt=o("tbody"),he=o("tr"),is=o("td"),Ot=o("a"),Fp=l("StableDiffusionAdapterPipeline"),Lp=i(),rs=o("td"),ls=o("em"),Vp=l("Text-to-Image Generation with T2I-Adapter Conditioning"),Qp=i(),Xo=o("td"),Yp=l("-"),zp=i(),ue=o("tr"),ps=o("td"),Kt=o("a"),Hp=l("StableDiffusionXLAdapterPipeline"),qp=i(),ds=o("td"),cs=o("em"),Op=l("Text-to-Image Generation with T2I-Adapter Conditioning on StableDiffusion-XL"),Kp=i(),No=o("td"),ed=l("-"),dr=i(),ge=o("h2"),Ie=o("a"),fs=o("span"),b(ea.$$.fragment),td=i(),ms=o("span"),ad=l("Usage example with the base model of StableDiffusion-1.4/1.5"),cr=i(),$e=o("p"),od=l("In the following we give a simple example of how to use a "),hs=o("em"),nd=l("T2IAdapter"),sd=l(` checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`),fr=i(),xe=o("ol"),ta=o("li"),id=l("Images are first converted into the appropriate "),us=o("em"),rd=l("control image"),ld=l(" format."),pd=i(),B=o("li"),dd=l("The "),gs=o("em"),cd=l("control image"),fd=l(" and "),_s=o("em"),md=l("prompt"),hd=l(" are passed to the "),Bo=o("a"),ud=l("StableDiffusionAdapterPipeline"),gd=l("."),mr=i(),ke=o("p"),_d=l("Let\u2019s have a look at a simple example using the "),aa=o("a"),bd=l("Color Adapter"),yd=l("."),hr=i(),b(oa.$$.fragment),ur=i(),Fo=o("p"),Lo=o("img"),gr=i(),Vo=o("p"),vd=l("Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),_r=i(),b(na.$$.fragment),br=i(),Qo=o("p"),wd=l("Let\u2019s take a look at the processed image."),yr=i(),Yo=o("p"),zo=o("img"),vr=i(),Ho=o("p"),Td=l("Next, create the adapter pipeline"),wr=i(),b(sa.$$.fragment),Tr=i(),qo=o("p"),Md=l("Finally, pass the prompt and control image to the pipeline"),Mr=i(),b(ia.$$.fragment),Er=i(),Oo=o("p"),Ko=o("img"),Ur=i(),_e=o("h2"),De=o("a"),bs=o("span"),b(ra.$$.fragment),Ed=i(),ys=o("span"),Ud=l("Usage example with the base model of StableDiffusion-XL"),Jr=i(),Ze=o("p"),Jd=l("In the following we give a simple example of how to use a "),vs=o("em"),Ad=l("T2IAdapter"),Id=l(` checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`),Ar=i(),Se=o("ol"),la=o("li"),$d=l("Images are first downloaded into the appropriate "),ws=o("em"),xd=l("control image"),kd=l(" format."),Dd=i(),F=o("li"),Zd=l("The "),Ts=o("em"),Sd=l("control image"),Gd=l(" and "),Ms=o("em"),jd=l("prompt"),Pd=l(" are passed to the "),en=o("a"),Cd=l("StableDiffusionXLAdapterPipeline"),Rd=l("."),Ir=i(),Ge=o("p"),Wd=l("Let\u2019s have a look at a simple example using the "),pa=o("a"),Xd=l("Sketch Adapter"),Nd=l("."),$r=i(),b(da.$$.fragment),xr=i(),tn=o("p"),an=o("img"),kr=i(),on=o("p"),Bd=l("Then, create the adapter pipeline"),Dr=i(),b(ca.$$.fragment),Zr=i(),nn=o("p"),Fd=l("Finally, pass the prompt and control image to the pipeline"),Sr=i(),b(fa.$$.fragment),Gr=i(),sn=o("p"),rn=o("img"),jr=i(),be=o("h2"),je=o("a"),Es=o("span"),b(ma.$$.fragment),Ld=i(),Us=o("span"),Vd=l("Available checkpoints"),Pr=i(),Pe=o("p"),Qd=l("Non-diffusers checkpoints can be found under "),ha=o("a"),Yd=l("TencentARC/T2I-Adapter"),zd=l("."),Cr=i(),ye=o("h3"),Ce=o("a"),Js=o("span"),b(ua.$$.fragment),Hd=i(),As=o("span"),qd=l("T2I-Adapter with Stable Diffusion 1.4"),Rr=i(),Re=o("table"),Is=o("thead"),L=o("tr"),$s=o("th"),Od=l("Model Name"),Kd=i(),xs=o("th"),ec=l("Control Image Overview"),tc=i(),ks=o("th"),ac=l("Control Image Example"),oc=i(),Ds=o("th"),nc=l("Generated Image Example"),sc=i(),A=o("tbody"),V=o("tr"),We=o("td"),ga=o("a"),ic=l("TencentARC/t2iadapter_color_sd14v1"),rc=o("br"),lc=i(),Zs=o("em"),pc=l("Trained with spatial color palette"),dc=i(),Ss=o("td"),cc=l("A image with 8x8 color palette."),fc=i(),Gs=o("td"),ln=o("a"),Xe=o("img"),mc=i(),js=o("td"),pn=o("a"),dn=o("img"),hc=i(),Q=o("tr"),Ne=o("td"),_a=o("a"),uc=l("TencentARC/t2iadapter_canny_sd14v1"),gc=o("br"),_c=i(),Ps=o("em"),bc=l("Trained with canny edge detection"),yc=i(),Cs=o("td"),vc=l("A monochrome image with white edges on a black background."),wc=i(),Rs=o("td"),cn=o("a"),Be=o("img"),Tc=i(),Ws=o("td"),fn=o("a"),mn=o("img"),Mc=i(),Y=o("tr"),Fe=o("td"),ba=o("a"),Ec=l("TencentARC/t2iadapter_sketch_sd14v1"),Uc=o("br"),Jc=i(),ya=o("em"),Ac=l("Trained with "),va=o("a"),Ic=l("PidiNet"),$c=l(" edge detection"),xc=i(),Xs=o("td"),kc=l("A hand-drawn monochrome image with white outlines on a black background."),Dc=i(),Ns=o("td"),hn=o("a"),Le=o("img"),Zc=i(),Bs=o("td"),un=o("a"),gn=o("img"),Sc=i(),z=o("tr"),Ve=o("td"),wa=o("a"),Gc=l("TencentARC/t2iadapter_depth_sd14v1"),jc=o("br"),Pc=i(),Fs=o("em"),Cc=l("Trained with Midas depth estimation"),Rc=i(),Ls=o("td"),Wc=l("A grayscale image with black representing deep areas and white representing shallow areas."),Xc=i(),Vs=o("td"),_n=o("a"),bn=o("img"),Nc=i(),Qs=o("td"),yn=o("a"),vn=o("img"),Bc=i(),H=o("tr"),Qe=o("td"),Ta=o("a"),Fc=l("TencentARC/t2iadapter_openpose_sd14v1"),Lc=o("br"),Vc=i(),Ys=o("em"),Qc=l("Trained with OpenPose bone image"),Yc=i(),Ma=o("td"),zc=l("A "),Ea=o("a"),Hc=l("OpenPose bone"),qc=l(" image."),Oc=i(),zs=o("td"),wn=o("a"),Tn=o("img"),Kc=i(),Hs=o("td"),Mn=o("a"),En=o("img"),ef=i(),q=o("tr"),Ye=o("td"),Ua=o("a"),tf=l("TencentARC/t2iadapter_keypose_sd14v1"),af=o("br"),of=i(),qs=o("em"),nf=l("Trained with mmpose skeleton image"),sf=i(),Ja=o("td"),rf=l("A "),Aa=o("a"),lf=l("mmpose skeleton"),pf=l(" image."),df=i(),Os=o("td"),Un=o("a"),Jn=o("img"),cf=i(),Ks=o("td"),An=o("a"),In=o("img"),ff=i(),O=o("tr"),Ia=o("td"),$a=o("a"),mf=l("TencentARC/t2iadapter_seg_sd14v1"),hf=o("br"),ei=o("em"),uf=l("Trained with semantic segmentation"),gf=i(),xa=o("td"),_f=l("An "),ka=o("a"),bf=l("custom"),yf=l(" segmentation protocol image."),vf=i(),ti=o("td"),$n=o("a"),xn=o("img"),wf=i(),ai=o("td"),kn=o("a"),Dn=o("img"),Tf=i(),K=o("tr"),oi=o("td"),Da=o("a"),Mf=l("TencentARC/t2iadapter_canny_sd15v2"),Ef=i(),Wr=o("td"),Uf=i(),Xr=o("td"),Jf=i(),Nr=o("td"),Af=i(),ee=o("tr"),ni=o("td"),Za=o("a"),If=l("TencentARC/t2iadapter_depth_sd15v2"),$f=i(),Br=o("td"),xf=i(),Fr=o("td"),kf=i(),Lr=o("td"),Df=i(),te=o("tr"),si=o("td"),Sa=o("a"),Zf=l("TencentARC/t2iadapter_sketch_sd15v2"),Sf=i(),Vr=o("td"),Gf=i(),Qr=o("td"),jf=i(),Yr=o("td"),Pf=i(),ae=o("tr"),ii=o("td"),Ga=o("a"),Cf=l("TencentARC/t2iadapter_zoedepth_sd15v1"),Rf=i(),zr=o("td"),Wf=i(),Hr=o("td"),Xf=i(),qr=o("td"),Nf=i(),oe=o("tr"),ri=o("td"),ja=o("a"),Bf=l("Adapter/t2iadapter, subfolder=\u2018sketch_sdxl_1.0\u2019"),Ff=i(),Or=o("td"),Lf=i(),Kr=o("td"),Vf=i(),el=o("td"),Qf=i(),ne=o("tr"),li=o("td"),Pa=o("a"),Yf=l("Adapter/t2iadapter, subfolder=\u2018canny_sdxl_1.0\u2019"),zf=i(),tl=o("td"),Hf=i(),al=o("td"),qf=i(),ol=o("td"),Of=i(),se=o("tr"),pi=o("td"),Ca=o("a"),Kf=l("Adapter/t2iadapter, subfolder=\u2018openpose_sdxl_1.0\u2019"),em=i(),nl=o("td"),tm=i(),sl=o("td"),am=i(),il=o("td"),rl=i(),ve=o("h2"),ze=o("a"),di=o("span"),b(Ra.$$.fragment),om=i(),ci=o("span"),nm=l("Combining multiple adapters"),ll=i(),Wa=o("p"),fi=o("code"),sm=l("MultiAdapter"),im=l(" can be used for applying multiple conditionings at once."),pl=i(),Zn=o("p"),rm=l("Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),dl=i(),b(Xa.$$.fragment),cl=i(),Sn=o("p"),lm=l("The two control images look as such:"),fl=i(),He=o("p"),Gn=o("img"),pm=i(),jn=o("img"),ml=i(),Na=o("p"),mi=o("code"),dm=l("MultiAdapter"),cm=l(" combines keypose and depth adapters."),hl=i(),Ba=o("p"),hi=o("code"),fm=l("adapter_conditioning_scale"),mm=l(" balances the relative influence of the different adapters."),ul=i(),b(Fa.$$.fragment),gl=i(),Pn=o("p"),Cn=o("img"),_l=i(),we=o("h2"),qe=o("a"),ui=o("span"),b(La.$$.fragment),hm=i(),gi=o("span"),um=l("T2I Adapter vs ControlNet"),bl=i(),Oe=o("p"),gm=l("T2I-Adapter is similar to "),Va=o("a"),_m=l("ControlNet"),bm=l(`.
T2i-Adapter uses a smaller auxiliary network which is only run once for the entire diffusion process.
However, T2I-Adapter performs slightly worse than ControlNet.`),yl=i(),Te=o("h2"),Ke=o("a"),_i=o("span"),b(Qa.$$.fragment),ym=i(),bi=o("span"),vm=l("StableDiffusionAdapterPipeline"),vl=i(),I=o("div"),b(Ya.$$.fragment),wm=i(),Rn=o("p"),Tm=l(`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),za=o("a"),Mm=l("https://arxiv.org/abs/2302.08453"),Em=i(),Ha=o("p"),Um=l("This model inherits from "),Wn=o("a"),Jm=l("DiffusionPipeline"),Am=l(`. 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.)`),Im=i(),re=o("div"),b(qa.$$.fragment),$m=i(),yi=o("p"),xm=l("Function invoked when calling the pipeline for generation."),km=i(),b(et.$$.fragment),Dm=i(),C=o("div"),b(Oa.$$.fragment),Zm=i(),vi=o("p"),Sm=l(`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.`),Gm=i(),b(tt.$$.fragment),jm=i(),b(at.$$.fragment),Pm=i(),ot=o("div"),b(Ka.$$.fragment),Cm=i(),eo=o("p"),Rm=l("Disable sliced attention computation. If "),wi=o("code"),Wm=l("enable_attention_slicing"),Xm=l(` was previously called, attention is
computed in one step.`),Nm=i(),nt=o("div"),b(to.$$.fragment),Bm=i(),Ti=o("p"),Fm=l(`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.`),Lm=i(),st=o("div"),b(ao.$$.fragment),Vm=i(),oo=o("p"),Qm=l("Disable sliced VAE decoding. If "),Mi=o("code"),Ym=l("enable_vae_slicing"),zm=l(` was previously enabled, this method will go back to
computing decoding in one step.`),Hm=i(),R=o("div"),b(no.$$.fragment),qm=i(),so=o("p"),Om=l("Enable memory efficient attention from "),io=o("a"),Km=l("xFormers"),eh=l(`. 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.`),th=i(),b(it.$$.fragment),ah=i(),b(rt.$$.fragment),oh=i(),lt=o("div"),b(ro.$$.fragment),nh=i(),lo=o("p"),sh=l("Disable memory efficient attention from "),po=o("a"),ih=l("xFormers"),rh=l("."),lh=i(),pt=o("div"),b(co.$$.fragment),ph=i(),j=o("p"),dh=l(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Ei=o("code"),ch=l("enable_sequential_cpu_offload"),fh=l(", this method moves one whole model at a time to the GPU when its "),Ui=o("code"),mh=l("forward"),hh=l(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ji=o("code"),uh=l("enable_sequential_cpu_offload"),gh=l(", but performance is much better due to the iterative execution of the "),Ai=o("code"),_h=l("unet"),bh=l("."),yh=i(),dt=o("div"),b(fo.$$.fragment),vh=i(),Ii=o("p"),wh=l("Encodes the prompt into text encoder hidden states."),wl=i(),Me=o("h2"),ct=o("a"),$i=o("span"),b(mo.$$.fragment),Th=i(),xi=o("span"),Mh=l("StableDiffusionXLAdapterPipeline"),Tl=i(),J=o("div"),b(ho.$$.fragment),Eh=i(),Xn=o("p"),Uh=l(`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),uo=o("a"),Jh=l("https://arxiv.org/abs/2302.08453"),Ah=i(),go=o("p"),Ih=l("This model inherits from "),Nn=o("a"),$h=l("DiffusionPipeline"),xh=l(`. 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.)`),kh=i(),le=o("div"),b(_o.$$.fragment),Dh=i(),ki=o("p"),Zh=l("Function invoked when calling the pipeline for generation."),Sh=i(),b(ft.$$.fragment),Gh=i(),W=o("div"),b(bo.$$.fragment),jh=i(),Di=o("p"),Ph=l(`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.`),Ch=i(),b(mt.$$.fragment),Rh=i(),b(ht.$$.fragment),Wh=i(),ut=o("div"),b(yo.$$.fragment),Xh=i(),vo=o("p"),Nh=l("Disable sliced attention computation. If "),Zi=o("code"),Bh=l("enable_attention_slicing"),Fh=l(` was previously called, attention is
computed in one step.`),Lh=i(),gt=o("div"),b(wo.$$.fragment),Vh=i(),Si=o("p"),Qh=l(`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.`),Yh=i(),_t=o("div"),b(To.$$.fragment),zh=i(),Mo=o("p"),Hh=l("Disable sliced VAE decoding. If "),Gi=o("code"),qh=l("enable_vae_slicing"),Oh=l(` was previously enabled, this method will go back to
computing decoding in one step.`),Kh=i(),X=o("div"),b(Eo.$$.fragment),eu=i(),Uo=o("p"),tu=l("Enable memory efficient attention from "),Jo=o("a"),au=l("xFormers"),ou=l(`. 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.`),nu=i(),b(bt.$$.fragment),su=i(),b(yt.$$.fragment),iu=i(),vt=o("div"),b(Ao.$$.fragment),ru=i(),Io=o("p"),lu=l("Disable memory efficient attention from "),$o=o("a"),pu=l("xFormers"),du=l("."),cu=i(),wt=o("div"),b(xo.$$.fragment),fu=i(),ko=o("p"),mu=l("Disable tiled VAE decoding. If "),ji=o("code"),hu=l("enable_vae_tiling"),uu=l(` was previously enabled, this method will go back to
computing decoding in one step.`),gu=i(),Tt=o("div"),b(Do.$$.fragment),_u=i(),P=o("p"),bu=l(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Pi=o("code"),yu=l("enable_sequential_cpu_offload"),vu=l(", this method moves one whole model at a time to the GPU when its "),Ci=o("code"),wu=l("forward"),Tu=l(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ri=o("code"),Mu=l("enable_sequential_cpu_offload"),Eu=l(", but performance is much better due to the iterative execution of the "),Wi=o("code"),Uu=l("unet"),Ju=l("."),Au=i(),Mt=o("div"),b(Zo.$$.fragment),Iu=i(),Xi=o("p"),$u=l(`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.`),xu=i(),Et=o("div"),b(So.$$.fragment),ku=i(),Ni=o("p"),Du=l("Encodes the prompt into text encoder hidden states."),this.h()},l(t){const c=Ty('[data-svelte="svelte-1phssyn"]',document.head);h=n(c,"META",{name:!0,content:!0}),c.forEach(a),E=r(t),g=n(t,"H1",{class:!0});var Go=s(g);u=n(Go,"A",{id:!0,class:!0,href:!0});var Bi=s(u);U=n(Bi,"SPAN",{});var Fi=s(U);y(m.$$.fragment,Fi),Fi.forEach(a),Bi.forEach(a),_=r(Go),N=n(Go,"SPAN",{});var Li=s(N);Up=p(Li,"Text-to-Image Generation with Adapter Conditioning"),Li.forEach(a),Go.forEach(a),ar=r(t),ce=n(t,"H2",{class:!0});var jo=s(ce);Ee=n(jo,"A",{id:!0,class:!0,href:!0});var Vi=s(Ee);On=n(Vi,"SPAN",{});var Qi=s(On);y(Vt.$$.fragment,Qi),Qi.forEach(a),Vi.forEach(a),Jp=r(jo),Kn=n(jo,"SPAN",{});var Yi=s(Kn);Ap=p(Yi,"Overview"),Yi.forEach(a),jo.forEach(a),or=r(t),Qt=n(t,"P",{});var Bn=s(Qt);Yt=n(Bn,"A",{href:!0,rel:!0});var zi=s(Yt);Ip=p(zi,"T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),zi.forEach(a),$p=p(Bn," by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),Bn.forEach(a),nr=r(t),Po=n(t,"P",{});var ig=s(Po);xp=p(ig,"Using the pretrained models 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."),ig.forEach(a),sr=r(t),Co=n(t,"P",{});var rg=s(Co);kp=p(rg,"The abstract of the paper is the following:"),rg.forEach(a),ir=r(t),Ro=n(t,"P",{});var lg=s(Ro);es=n(lg,"EM",{});var pg=s(es);Dp=p(pg,"The incredible generative ability of large-scale text-to-image (T2I) models has demonstrated strong power of learning complex structures and meaningful semantics. However, relying solely on text prompts cannot fully take advantage of the knowledge learned by the model, especially when flexible and accurate structure control is needed. In this paper, we aim to \u201Cdig out\u201D the capabilities that T2I models have implicitly learned, and then explicitly use them to control the generation more granularly. Specifically, we propose to learn simple and small T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, and achieve rich control and editing effects. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications."),pg.forEach(a),lg.forEach(a),rr=r(t),Ue=n(t,"P",{});var El=s(Ue);Zp=p(El,"This model was contributed by the community contributor "),zt=n(El,"A",{href:!0,rel:!0});var dg=s(zt);Sp=p(dg,"HimariO"),dg.forEach(a),Gp=p(El," \u2764\uFE0F ."),El.forEach(a),lr=r(t),fe=n(t,"H2",{class:!0});var Ul=s(fe);Je=n(Ul,"A",{id:!0,class:!0,href:!0});var cg=s(Je);ts=n(cg,"SPAN",{});var fg=s(ts);y(Ht.$$.fragment,fg),fg.forEach(a),cg.forEach(a),jp=r(Ul),as=n(Ul,"SPAN",{});var mg=s(as);Pp=p(mg,"Available Pipelines:"),mg.forEach(a),Ul.forEach(a),pr=r(t),Ae=n(t,"TABLE",{});var Jl=s(Ae);os=n(Jl,"THEAD",{});var hg=s(os);me=n(hg,"TR",{});var Fn=s(me);ns=n(Fn,"TH",{});var ug=s(ns);Cp=p(ug,"Pipeline"),ug.forEach(a),Rp=r(Fn),ss=n(Fn,"TH",{});var gg=s(ss);Wp=p(gg,"Tasks"),gg.forEach(a),Xp=r(Fn),Wo=n(Fn,"TH",{align:!0});var _g=s(Wo);Np=p(_g,"Demo"),_g.forEach(a),Fn.forEach(a),hg.forEach(a),Bp=r(Jl),qt=n(Jl,"TBODY",{});var Al=s(qt);he=n(Al,"TR",{});var Ln=s(he);is=n(Ln,"TD",{});var bg=s(is);Ot=n(bg,"A",{href:!0,rel:!0});var yg=s(Ot);Fp=p(yg,"StableDiffusionAdapterPipeline"),yg.forEach(a),bg.forEach(a),Lp=r(Ln),rs=n(Ln,"TD",{});var vg=s(rs);ls=n(vg,"EM",{});var wg=s(ls);Vp=p(wg,"Text-to-Image Generation with T2I-Adapter Conditioning"),wg.forEach(a),vg.forEach(a),Qp=r(Ln),Xo=n(Ln,"TD",{align:!0});var Tg=s(Xo);Yp=p(Tg,"-"),Tg.forEach(a),Ln.forEach(a),zp=r(Al),ue=n(Al,"TR",{});var Vn=s(ue);ps=n(Vn,"TD",{});var Mg=s(ps);Kt=n(Mg,"A",{href:!0,rel:!0});var Eg=s(Kt);Hp=p(Eg,"StableDiffusionXLAdapterPipeline"),Eg.forEach(a),Mg.forEach(a),qp=r(Vn),ds=n(Vn,"TD",{});var Ug=s(ds);cs=n(Ug,"EM",{});var Jg=s(cs);Op=p(Jg,"Text-to-Image Generation with T2I-Adapter Conditioning on StableDiffusion-XL"),Jg.forEach(a),Ug.forEach(a),Kp=r(Vn),No=n(Vn,"TD",{align:!0});var Ag=s(No);ed=p(Ag,"-"),Ag.forEach(a),Vn.forEach(a),Al.forEach(a),Jl.forEach(a),dr=r(t),ge=n(t,"H2",{class:!0});var Il=s(ge);Ie=n(Il,"A",{id:!0,class:!0,href:!0});var Ig=s(Ie);fs=n(Ig,"SPAN",{});var $g=s(fs);y(ea.$$.fragment,$g),$g.forEach(a),Ig.forEach(a),td=r(Il),ms=n(Il,"SPAN",{});var xg=s(ms);ad=p(xg,"Usage example with the base model of StableDiffusion-1.4/1.5"),xg.forEach(a),Il.forEach(a),cr=r(t),$e=n(t,"P",{});var $l=s($e);od=p($l,"In the following we give a simple example of how to use a "),hs=n($l,"EM",{});var kg=s(hs);nd=p(kg,"T2IAdapter"),kg.forEach(a),sd=p($l,` checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`),$l.forEach(a),fr=r(t),xe=n(t,"OL",{});var xl=s(xe);ta=n(xl,"LI",{});var kl=s(ta);id=p(kl,"Images are first converted into the appropriate "),us=n(kl,"EM",{});var Dg=s(us);rd=p(Dg,"control image"),Dg.forEach(a),ld=p(kl," format."),kl.forEach(a),pd=r(xl),B=n(xl,"LI",{});var Ut=s(B);dd=p(Ut,"The "),gs=n(Ut,"EM",{});var Zg=s(gs);cd=p(Zg,"control image"),Zg.forEach(a),fd=p(Ut," and "),_s=n(Ut,"EM",{});var Sg=s(_s);md=p(Sg,"prompt"),Sg.forEach(a),hd=p(Ut," are passed to the "),Bo=n(Ut,"A",{href:!0});var Gg=s(Bo);ud=p(Gg,"StableDiffusionAdapterPipeline"),Gg.forEach(a),gd=p(Ut,"."),Ut.forEach(a),xl.forEach(a),mr=r(t),ke=n(t,"P",{});var Dl=s(ke);_d=p(Dl,"Let\u2019s have a look at a simple example using the "),aa=n(Dl,"A",{href:!0,rel:!0});var jg=s(aa);bd=p(jg,"Color Adapter"),jg.forEach(a),yd=p(Dl,"."),Dl.forEach(a),hr=r(t),y(oa.$$.fragment,t),ur=r(t),Fo=n(t,"P",{});var Pg=s(Fo);Lo=n(Pg,"IMG",{src:!0,alt:!0}),Pg.forEach(a),gr=r(t),Vo=n(t,"P",{});var Cg=s(Vo);vd=p(Cg,"Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),Cg.forEach(a),_r=r(t),y(na.$$.fragment,t),br=r(t),Qo=n(t,"P",{});var Rg=s(Qo);wd=p(Rg,"Let\u2019s take a look at the processed image."),Rg.forEach(a),yr=r(t),Yo=n(t,"P",{});var Wg=s(Yo);zo=n(Wg,"IMG",{src:!0,alt:!0}),Wg.forEach(a),vr=r(t),Ho=n(t,"P",{});var Xg=s(Ho);Td=p(Xg,"Next, create the adapter pipeline"),Xg.forEach(a),wr=r(t),y(sa.$$.fragment,t),Tr=r(t),qo=n(t,"P",{});var Ng=s(qo);Md=p(Ng,"Finally, pass the prompt and control image to the pipeline"),Ng.forEach(a),Mr=r(t),y(ia.$$.fragment,t),Er=r(t),Oo=n(t,"P",{});var Bg=s(Oo);Ko=n(Bg,"IMG",{src:!0,alt:!0}),Bg.forEach(a),Ur=r(t),_e=n(t,"H2",{class:!0});var Zl=s(_e);De=n(Zl,"A",{id:!0,class:!0,href:!0});var Fg=s(De);bs=n(Fg,"SPAN",{});var Lg=s(bs);y(ra.$$.fragment,Lg),Lg.forEach(a),Fg.forEach(a),Ed=r(Zl),ys=n(Zl,"SPAN",{});var Vg=s(ys);Ud=p(Vg,"Usage example with the base model of StableDiffusion-XL"),Vg.forEach(a),Zl.forEach(a),Jr=r(t),Ze=n(t,"P",{});var Sl=s(Ze);Jd=p(Sl,"In the following we give a simple example of how to use a "),vs=n(Sl,"EM",{});var Qg=s(vs);Ad=p(Qg,"T2IAdapter"),Qg.forEach(a),Id=p(Sl,` checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`),Sl.forEach(a),Ar=r(t),Se=n(t,"OL",{});var Gl=s(Se);la=n(Gl,"LI",{});var jl=s(la);$d=p(jl,"Images are first downloaded into the appropriate "),ws=n(jl,"EM",{});var Yg=s(ws);xd=p(Yg,"control image"),Yg.forEach(a),kd=p(jl," format."),jl.forEach(a),Dd=r(Gl),F=n(Gl,"LI",{});var Jt=s(F);Zd=p(Jt,"The "),Ts=n(Jt,"EM",{});var zg=s(Ts);Sd=p(zg,"control image"),zg.forEach(a),Gd=p(Jt," and "),Ms=n(Jt,"EM",{});var Hg=s(Ms);jd=p(Hg,"prompt"),Hg.forEach(a),Pd=p(Jt," are passed to the "),en=n(Jt,"A",{href:!0});var qg=s(en);Cd=p(qg,"StableDiffusionXLAdapterPipeline"),qg.forEach(a),Rd=p(Jt,"."),Jt.forEach(a),Gl.forEach(a),Ir=r(t),Ge=n(t,"P",{});var Pl=s(Ge);Wd=p(Pl,"Let\u2019s have a look at a simple example using the "),pa=n(Pl,"A",{href:!0,rel:!0});var Og=s(pa);Xd=p(Og,"Sketch Adapter"),Og.forEach(a),Nd=p(Pl,"."),Pl.forEach(a),$r=r(t),y(da.$$.fragment,t),xr=r(t),tn=n(t,"P",{});var Kg=s(tn);an=n(Kg,"IMG",{src:!0,alt:!0}),Kg.forEach(a),kr=r(t),on=n(t,"P",{});var e_=s(on);Bd=p(e_,"Then, create the adapter pipeline"),e_.forEach(a),Dr=r(t),y(ca.$$.fragment,t),Zr=r(t),nn=n(t,"P",{});var t_=s(nn);Fd=p(t_,"Finally, pass the prompt and control image to the pipeline"),t_.forEach(a),Sr=r(t),y(fa.$$.fragment,t),Gr=r(t),sn=n(t,"P",{});var a_=s(sn);rn=n(a_,"IMG",{src:!0,alt:!0}),a_.forEach(a),jr=r(t),be=n(t,"H2",{class:!0});var Cl=s(be);je=n(Cl,"A",{id:!0,class:!0,href:!0});var o_=s(je);Es=n(o_,"SPAN",{});var n_=s(Es);y(ma.$$.fragment,n_),n_.forEach(a),o_.forEach(a),Ld=r(Cl),Us=n(Cl,"SPAN",{});var s_=s(Us);Vd=p(s_,"Available checkpoints"),s_.forEach(a),Cl.forEach(a),Pr=r(t),Pe=n(t,"P",{});var Rl=s(Pe);Qd=p(Rl,"Non-diffusers checkpoints can be found under "),ha=n(Rl,"A",{href:!0,rel:!0});var i_=s(ha);Yd=p(i_,"TencentARC/T2I-Adapter"),i_.forEach(a),zd=p(Rl,"."),Rl.forEach(a),Cr=r(t),ye=n(t,"H3",{class:!0});var Wl=s(ye);Ce=n(Wl,"A",{id:!0,class:!0,href:!0});var r_=s(Ce);Js=n(r_,"SPAN",{});var l_=s(Js);y(ua.$$.fragment,l_),l_.forEach(a),r_.forEach(a),Hd=r(Wl),As=n(Wl,"SPAN",{});var p_=s(As);qd=p(p_,"T2I-Adapter with Stable Diffusion 1.4"),p_.forEach(a),Wl.forEach(a),Rr=r(t),Re=n(t,"TABLE",{});var Xl=s(Re);Is=n(Xl,"THEAD",{});var d_=s(Is);L=n(d_,"TR",{});var At=s(L);$s=n(At,"TH",{});var c_=s($s);Od=p(c_,"Model Name"),c_.forEach(a),Kd=r(At),xs=n(At,"TH",{});var f_=s(xs);ec=p(f_,"Control Image Overview"),f_.forEach(a),tc=r(At),ks=n(At,"TH",{});var m_=s(ks);ac=p(m_,"Control Image Example"),m_.forEach(a),oc=r(At),Ds=n(At,"TH",{});var h_=s(Ds);nc=p(h_,"Generated Image Example"),h_.forEach(a),At.forEach(a),d_.forEach(a),sc=r(Xl),A=n(Xl,"TBODY",{});var $=s(A);V=n($,"TR",{});var It=s(V);We=n(It,"TD",{});var Hi=s(We);ga=n(Hi,"A",{href:!0,rel:!0});var u_=s(ga);ic=p(u_,"TencentARC/t2iadapter_color_sd14v1"),u_.forEach(a),rc=n(Hi,"BR",{}),lc=r(Hi),Zs=n(Hi,"EM",{});var g_=s(Zs);pc=p(g_,"Trained with spatial color palette"),g_.forEach(a),Hi.forEach(a),dc=r(It),Ss=n(It,"TD",{});var __=s(Ss);cc=p(__,"A image with 8x8 color palette."),__.forEach(a),fc=r(It),Gs=n(It,"TD",{});var b_=s(Gs);ln=n(b_,"A",{href:!0});var y_=s(ln);Xe=n(y_,"IMG",{width:!0,style:!0,src:!0}),y_.forEach(a),b_.forEach(a),mc=r(It),js=n(It,"TD",{});var v_=s(js);pn=n(v_,"A",{href:!0});var w_=s(pn);dn=n(w_,"IMG",{width:!0,src:!0}),w_.forEach(a),v_.forEach(a),It.forEach(a),hc=r($),Q=n($,"TR",{});var $t=s(Q);Ne=n($t,"TD",{});var qi=s(Ne);_a=n(qi,"A",{href:!0,rel:!0});var T_=s(_a);uc=p(T_,"TencentARC/t2iadapter_canny_sd14v1"),T_.forEach(a),gc=n(qi,"BR",{}),_c=r(qi),Ps=n(qi,"EM",{});var M_=s(Ps);bc=p(M_,"Trained with canny edge detection"),M_.forEach(a),qi.forEach(a),yc=r($t),Cs=n($t,"TD",{});var E_=s(Cs);vc=p(E_,"A monochrome image with white edges on a black background."),E_.forEach(a),wc=r($t),Rs=n($t,"TD",{});var U_=s(Rs);cn=n(U_,"A",{href:!0});var J_=s(cn);Be=n(J_,"IMG",{width:!0,style:!0,src:!0}),J_.forEach(a),U_.forEach(a),Tc=r($t),Ws=n($t,"TD",{});var A_=s(Ws);fn=n(A_,"A",{href:!0});var I_=s(fn);mn=n(I_,"IMG",{width:!0,src:!0}),I_.forEach(a),A_.forEach(a),$t.forEach(a),Mc=r($),Y=n($,"TR",{});var xt=s(Y);Fe=n(xt,"TD",{});var Oi=s(Fe);ba=n(Oi,"A",{href:!0,rel:!0});var $_=s(ba);Ec=p($_,"TencentARC/t2iadapter_sketch_sd14v1"),$_.forEach(a),Uc=n(Oi,"BR",{}),Jc=r(Oi),ya=n(Oi,"EM",{});var Nl=s(ya);Ac=p(Nl,"Trained with "),va=n(Nl,"A",{href:!0,rel:!0});var x_=s(va);Ic=p(x_,"PidiNet"),x_.forEach(a),$c=p(Nl," edge detection"),Nl.forEach(a),Oi.forEach(a),xc=r(xt),Xs=n(xt,"TD",{});var k_=s(Xs);kc=p(k_,"A hand-drawn monochrome image with white outlines on a black background."),k_.forEach(a),Dc=r(xt),Ns=n(xt,"TD",{});var D_=s(Ns);hn=n(D_,"A",{href:!0});var Z_=s(hn);Le=n(Z_,"IMG",{width:!0,style:!0,src:!0}),Z_.forEach(a),D_.forEach(a),Zc=r(xt),Bs=n(xt,"TD",{});var S_=s(Bs);un=n(S_,"A",{href:!0});var G_=s(un);gn=n(G_,"IMG",{width:!0,src:!0}),G_.forEach(a),S_.forEach(a),xt.forEach(a),Sc=r($),z=n($,"TR",{});var kt=s(z);Ve=n(kt,"TD",{});var Ki=s(Ve);wa=n(Ki,"A",{href:!0,rel:!0});var j_=s(wa);Gc=p(j_,"TencentARC/t2iadapter_depth_sd14v1"),j_.forEach(a),jc=n(Ki,"BR",{}),Pc=r(Ki),Fs=n(Ki,"EM",{});var P_=s(Fs);Cc=p(P_,"Trained with Midas depth estimation"),P_.forEach(a),Ki.forEach(a),Rc=r(kt),Ls=n(kt,"TD",{});var C_=s(Ls);Wc=p(C_,"A grayscale image with black representing deep areas and white representing shallow areas."),C_.forEach(a),Xc=r(kt),Vs=n(kt,"TD",{});var R_=s(Vs);_n=n(R_,"A",{href:!0});var W_=s(_n);bn=n(W_,"IMG",{width:!0,src:!0}),W_.forEach(a),R_.forEach(a),Nc=r(kt),Qs=n(kt,"TD",{});var X_=s(Qs);yn=n(X_,"A",{href:!0});var N_=s(yn);vn=n(N_,"IMG",{width:!0,src:!0}),N_.forEach(a),X_.forEach(a),kt.forEach(a),Bc=r($),H=n($,"TR",{});var Dt=s(H);Qe=n(Dt,"TD",{});var er=s(Qe);Ta=n(er,"A",{href:!0,rel:!0});var B_=s(Ta);Fc=p(B_,"TencentARC/t2iadapter_openpose_sd14v1"),B_.forEach(a),Lc=n(er,"BR",{}),Vc=r(er),Ys=n(er,"EM",{});var F_=s(Ys);Qc=p(F_,"Trained with OpenPose bone image"),F_.forEach(a),er.forEach(a),Yc=r(Dt),Ma=n(Dt,"TD",{});var Bl=s(Ma);zc=p(Bl,"A "),Ea=n(Bl,"A",{href:!0,rel:!0});var L_=s(Ea);Hc=p(L_,"OpenPose bone"),L_.forEach(a),qc=p(Bl," image."),Bl.forEach(a),Oc=r(Dt),zs=n(Dt,"TD",{});var V_=s(zs);wn=n(V_,"A",{href:!0});var Q_=s(wn);Tn=n(Q_,"IMG",{width:!0,src:!0}),Q_.forEach(a),V_.forEach(a),Kc=r(Dt),Hs=n(Dt,"TD",{});var Y_=s(Hs);Mn=n(Y_,"A",{href:!0});var z_=s(Mn);En=n(z_,"IMG",{width:!0,src:!0}),z_.forEach(a),Y_.forEach(a),Dt.forEach(a),ef=r($),q=n($,"TR",{});var Zt=s(q);Ye=n(Zt,"TD",{});var tr=s(Ye);Ua=n(tr,"A",{href:!0,rel:!0});var H_=s(Ua);tf=p(H_,"TencentARC/t2iadapter_keypose_sd14v1"),H_.forEach(a),af=n(tr,"BR",{}),of=r(tr),qs=n(tr,"EM",{});var q_=s(qs);nf=p(q_,"Trained with mmpose skeleton image"),q_.forEach(a),tr.forEach(a),sf=r(Zt),Ja=n(Zt,"TD",{});var Fl=s(Ja);rf=p(Fl,"A "),Aa=n(Fl,"A",{href:!0,rel:!0});var O_=s(Aa);lf=p(O_,"mmpose skeleton"),O_.forEach(a),pf=p(Fl," image."),Fl.forEach(a),df=r(Zt),Os=n(Zt,"TD",{});var K_=s(Os);Un=n(K_,"A",{href:!0});var eb=s(Un);Jn=n(eb,"IMG",{width:!0,src:!0}),eb.forEach(a),K_.forEach(a),cf=r(Zt),Ks=n(Zt,"TD",{});var tb=s(Ks);An=n(tb,"A",{href:!0});var ab=s(An);In=n(ab,"IMG",{width:!0,src:!0}),ab.forEach(a),tb.forEach(a),Zt.forEach(a),ff=r($),O=n($,"TR",{});var St=s(O);Ia=n(St,"TD",{});var Ll=s(Ia);$a=n(Ll,"A",{href:!0,rel:!0});var ob=s($a);mf=p(ob,"TencentARC/t2iadapter_seg_sd14v1"),ob.forEach(a),hf=n(Ll,"BR",{}),ei=n(Ll,"EM",{});var nb=s(ei);uf=p(nb,"Trained with semantic segmentation"),nb.forEach(a),Ll.forEach(a),gf=r(St),xa=n(St,"TD",{});var Vl=s(xa);_f=p(Vl,"An "),ka=n(Vl,"A",{href:!0,rel:!0});var sb=s(ka);bf=p(sb,"custom"),sb.forEach(a),yf=p(Vl," segmentation protocol image."),Vl.forEach(a),vf=r(St),ti=n(St,"TD",{});var ib=s(ti);$n=n(ib,"A",{href:!0});var rb=s($n);xn=n(rb,"IMG",{width:!0,src:!0}),rb.forEach(a),ib.forEach(a),wf=r(St),ai=n(St,"TD",{});var lb=s(ai);kn=n(lb,"A",{href:!0});var pb=s(kn);Dn=n(pb,"IMG",{width:!0,src:!0}),pb.forEach(a),lb.forEach(a),St.forEach(a),Tf=r($),K=n($,"TR",{});var Gt=s(K);oi=n(Gt,"TD",{});var db=s(oi);Da=n(db,"A",{href:!0,rel:!0});var cb=s(Da);Mf=p(cb,"TencentARC/t2iadapter_canny_sd15v2"),cb.forEach(a),db.forEach(a),Ef=r(Gt),Wr=n(Gt,"TD",{}),s(Wr).forEach(a),Uf=r(Gt),Xr=n(Gt,"TD",{}),s(Xr).forEach(a),Jf=r(Gt),Nr=n(Gt,"TD",{}),s(Nr).forEach(a),Gt.forEach(a),Af=r($),ee=n($,"TR",{});var jt=s(ee);ni=n(jt,"TD",{});var fb=s(ni);Za=n(fb,"A",{href:!0,rel:!0});var mb=s(Za);If=p(mb,"TencentARC/t2iadapter_depth_sd15v2"),mb.forEach(a),fb.forEach(a),$f=r(jt),Br=n(jt,"TD",{}),s(Br).forEach(a),xf=r(jt),Fr=n(jt,"TD",{}),s(Fr).forEach(a),kf=r(jt),Lr=n(jt,"TD",{}),s(Lr).forEach(a),jt.forEach(a),Df=r($),te=n($,"TR",{});var Pt=s(te);si=n(Pt,"TD",{});var hb=s(si);Sa=n(hb,"A",{href:!0,rel:!0});var ub=s(Sa);Zf=p(ub,"TencentARC/t2iadapter_sketch_sd15v2"),ub.forEach(a),hb.forEach(a),Sf=r(Pt),Vr=n(Pt,"TD",{}),s(Vr).forEach(a),Gf=r(Pt),Qr=n(Pt,"TD",{}),s(Qr).forEach(a),jf=r(Pt),Yr=n(Pt,"TD",{}),s(Yr).forEach(a),Pt.forEach(a),Pf=r($),ae=n($,"TR",{});var Ct=s(ae);ii=n(Ct,"TD",{});var gb=s(ii);Ga=n(gb,"A",{href:!0,rel:!0});var _b=s(Ga);Cf=p(_b,"TencentARC/t2iadapter_zoedepth_sd15v1"),_b.forEach(a),gb.forEach(a),Rf=r(Ct),zr=n(Ct,"TD",{}),s(zr).forEach(a),Wf=r(Ct),Hr=n(Ct,"TD",{}),s(Hr).forEach(a),Xf=r(Ct),qr=n(Ct,"TD",{}),s(qr).forEach(a),Ct.forEach(a),Nf=r($),oe=n($,"TR",{});var Rt=s(oe);ri=n(Rt,"TD",{});var bb=s(ri);ja=n(bb,"A",{href:!0,rel:!0});var yb=s(ja);Bf=p(yb,"Adapter/t2iadapter, subfolder=\u2018sketch_sdxl_1.0\u2019"),yb.forEach(a),bb.forEach(a),Ff=r(Rt),Or=n(Rt,"TD",{}),s(Or).forEach(a),Lf=r(Rt),Kr=n(Rt,"TD",{}),s(Kr).forEach(a),Vf=r(Rt),el=n(Rt,"TD",{}),s(el).forEach(a),Rt.forEach(a),Qf=r($),ne=n($,"TR",{});var Wt=s(ne);li=n(Wt,"TD",{});var vb=s(li);Pa=n(vb,"A",{href:!0,rel:!0});var wb=s(Pa);Yf=p(wb,"Adapter/t2iadapter, subfolder=\u2018canny_sdxl_1.0\u2019"),wb.forEach(a),vb.forEach(a),zf=r(Wt),tl=n(Wt,"TD",{}),s(tl).forEach(a),Hf=r(Wt),al=n(Wt,"TD",{}),s(al).forEach(a),qf=r(Wt),ol=n(Wt,"TD",{}),s(ol).forEach(a),Wt.forEach(a),Of=r($),se=n($,"TR",{});var Xt=s(se);pi=n(Xt,"TD",{});var Tb=s(pi);Ca=n(Tb,"A",{href:!0,rel:!0});var Mb=s(Ca);Kf=p(Mb,"Adapter/t2iadapter, subfolder=\u2018openpose_sdxl_1.0\u2019"),Mb.forEach(a),Tb.forEach(a),em=r(Xt),nl=n(Xt,"TD",{}),s(nl).forEach(a),tm=r(Xt),sl=n(Xt,"TD",{}),s(sl).forEach(a),am=r(Xt),il=n(Xt,"TD",{}),s(il).forEach(a),Xt.forEach(a),$.forEach(a),Xl.forEach(a),rl=r(t),ve=n(t,"H2",{class:!0});var Ql=s(ve);ze=n(Ql,"A",{id:!0,class:!0,href:!0});var Eb=s(ze);di=n(Eb,"SPAN",{});var Ub=s(di);y(Ra.$$.fragment,Ub),Ub.forEach(a),Eb.forEach(a),om=r(Ql),ci=n(Ql,"SPAN",{});var Jb=s(ci);nm=p(Jb,"Combining multiple adapters"),Jb.forEach(a),Ql.forEach(a),ll=r(t),Wa=n(t,"P",{});var Zu=s(Wa);fi=n(Zu,"CODE",{});var Ab=s(fi);sm=p(Ab,"MultiAdapter"),Ab.forEach(a),im=p(Zu," can be used for applying multiple conditionings at once."),Zu.forEach(a),pl=r(t),Zn=n(t,"P",{});var Ib=s(Zn);rm=p(Ib,"Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),Ib.forEach(a),dl=r(t),y(Xa.$$.fragment,t),cl=r(t),Sn=n(t,"P",{});var $b=s(Sn);lm=p($b,"The two control images look as such:"),$b.forEach(a),fl=r(t),He=n(t,"P",{});var Yl=s(He);Gn=n(Yl,"IMG",{src:!0,alt:!0}),pm=r(Yl),jn=n(Yl,"IMG",{src:!0,alt:!0}),Yl.forEach(a),ml=r(t),Na=n(t,"P",{});var Su=s(Na);mi=n(Su,"CODE",{});var xb=s(mi);dm=p(xb,"MultiAdapter"),xb.forEach(a),cm=p(Su," combines keypose and depth adapters."),Su.forEach(a),hl=r(t),Ba=n(t,"P",{});var Gu=s(Ba);hi=n(Gu,"CODE",{});var kb=s(hi);fm=p(kb,"adapter_conditioning_scale"),kb.forEach(a),mm=p(Gu," balances the relative influence of the different adapters."),Gu.forEach(a),ul=r(t),y(Fa.$$.fragment,t),gl=r(t),Pn=n(t,"P",{});var Db=s(Pn);Cn=n(Db,"IMG",{src:!0,alt:!0}),Db.forEach(a),_l=r(t),we=n(t,"H2",{class:!0});var zl=s(we);qe=n(zl,"A",{id:!0,class:!0,href:!0});var Zb=s(qe);ui=n(Zb,"SPAN",{});var Sb=s(ui);y(La.$$.fragment,Sb),Sb.forEach(a),Zb.forEach(a),hm=r(zl),gi=n(zl,"SPAN",{});var Gb=s(gi);um=p(Gb,"T2I Adapter vs ControlNet"),Gb.forEach(a),zl.forEach(a),bl=r(t),Oe=n(t,"P",{});var Hl=s(Oe);gm=p(Hl,"T2I-Adapter is similar to "),Va=n(Hl,"A",{href:!0,rel:!0});var jb=s(Va);_m=p(jb,"ControlNet"),jb.forEach(a),bm=p(Hl,`.
T2i-Adapter uses a smaller auxiliary network which is only run once for the entire diffusion process.
However, T2I-Adapter performs slightly worse than ControlNet.`),Hl.forEach(a),yl=r(t),Te=n(t,"H2",{class:!0});var ql=s(Te);Ke=n(ql,"A",{id:!0,class:!0,href:!0});var Pb=s(Ke);_i=n(Pb,"SPAN",{});var Cb=s(_i);y(Qa.$$.fragment,Cb),Cb.forEach(a),Pb.forEach(a),ym=r(ql),bi=n(ql,"SPAN",{});var Rb=s(bi);vm=p(Rb,"StableDiffusionAdapterPipeline"),Rb.forEach(a),ql.forEach(a),vl=r(t),I=n(t,"DIV",{class:!0});var k=s(I);y(Ya.$$.fragment,k),wm=r(k),Rn=n(k,"P",{});var ju=s(Rn);Tm=p(ju,`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),za=n(ju,"A",{href:!0,rel:!0});var Wb=s(za);Mm=p(Wb,"https://arxiv.org/abs/2302.08453"),Wb.forEach(a),ju.forEach(a),Em=r(k),Ha=n(k,"P",{});var Ol=s(Ha);Um=p(Ol,"This model inherits from "),Wn=n(Ol,"A",{href:!0});var Xb=s(Wn);Jm=p(Xb,"DiffusionPipeline"),Xb.forEach(a),Am=p(Ol,`. 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.)`),Ol.forEach(a),Im=r(k),re=n(k,"DIV",{class:!0});var Qn=s(re);y(qa.$$.fragment,Qn),$m=r(Qn),yi=n(Qn,"P",{});var Nb=s(yi);xm=p(Nb,"Function invoked when calling the pipeline for generation."),Nb.forEach(a),km=r(Qn),y(et.$$.fragment,Qn),Qn.forEach(a),Dm=r(k),C=n(k,"DIV",{class:!0});var Nt=s(C);y(Oa.$$.fragment,Nt),Zm=r(Nt),vi=n(Nt,"P",{});var Bb=s(vi);Sm=p(Bb,`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.`),Bb.forEach(a),Gm=r(Nt),y(tt.$$.fragment,Nt),jm=r(Nt),y(at.$$.fragment,Nt),Nt.forEach(a),Pm=r(k),ot=n(k,"DIV",{class:!0});var Kl=s(ot);y(Ka.$$.fragment,Kl),Cm=r(Kl),eo=n(Kl,"P",{});var ep=s(eo);Rm=p(ep,"Disable sliced attention computation. If "),wi=n(ep,"CODE",{});var Fb=s(wi);Wm=p(Fb,"enable_attention_slicing"),Fb.forEach(a),Xm=p(ep,` was previously called, attention is
computed in one step.`),ep.forEach(a),Kl.forEach(a),Nm=r(k),nt=n(k,"DIV",{class:!0});var tp=s(nt);y(to.$$.fragment,tp),Bm=r(tp),Ti=n(tp,"P",{});var Lb=s(Ti);Fm=p(Lb,`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.`),Lb.forEach(a),tp.forEach(a),Lm=r(k),st=n(k,"DIV",{class:!0});var ap=s(st);y(ao.$$.fragment,ap),Vm=r(ap),oo=n(ap,"P",{});var op=s(oo);Qm=p(op,"Disable sliced VAE decoding. If "),Mi=n(op,"CODE",{});var Vb=s(Mi);Ym=p(Vb,"enable_vae_slicing"),Vb.forEach(a),zm=p(op,` was previously enabled, this method will go back to
computing decoding in one step.`),op.forEach(a),ap.forEach(a),Hm=r(k),R=n(k,"DIV",{class:!0});var Bt=s(R);y(no.$$.fragment,Bt),qm=r(Bt),so=n(Bt,"P",{});var np=s(so);Om=p(np,"Enable memory efficient attention from "),io=n(np,"A",{href:!0,rel:!0});var Qb=s(io);Km=p(Qb,"xFormers"),Qb.forEach(a),eh=p(np,`. 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.`),np.forEach(a),th=r(Bt),y(it.$$.fragment,Bt),ah=r(Bt),y(rt.$$.fragment,Bt),Bt.forEach(a),oh=r(k),lt=n(k,"DIV",{class:!0});var sp=s(lt);y(ro.$$.fragment,sp),nh=r(sp),lo=n(sp,"P",{});var ip=s(lo);sh=p(ip,"Disable memory efficient attention from "),po=n(ip,"A",{href:!0,rel:!0});var Yb=s(po);ih=p(Yb,"xFormers"),Yb.forEach(a),rh=p(ip,"."),ip.forEach(a),sp.forEach(a),lh=r(k),pt=n(k,"DIV",{class:!0});var rp=s(pt);y(co.$$.fragment,rp),ph=r(rp),j=n(rp,"P",{});var pe=s(j);dh=p(pe,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Ei=n(pe,"CODE",{});var zb=s(Ei);ch=p(zb,"enable_sequential_cpu_offload"),zb.forEach(a),fh=p(pe,", this method moves one whole model at a time to the GPU when its "),Ui=n(pe,"CODE",{});var Hb=s(Ui);mh=p(Hb,"forward"),Hb.forEach(a),hh=p(pe,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ji=n(pe,"CODE",{});var qb=s(Ji);uh=p(qb,"enable_sequential_cpu_offload"),qb.forEach(a),gh=p(pe,", but performance is much better due to the iterative execution of the "),Ai=n(pe,"CODE",{});var Ob=s(Ai);_h=p(Ob,"unet"),Ob.forEach(a),bh=p(pe,"."),pe.forEach(a),rp.forEach(a),yh=r(k),dt=n(k,"DIV",{class:!0});var lp=s(dt);y(fo.$$.fragment,lp),vh=r(lp),Ii=n(lp,"P",{});var Kb=s(Ii);wh=p(Kb,"Encodes the prompt into text encoder hidden states."),Kb.forEach(a),lp.forEach(a),k.forEach(a),wl=r(t),Me=n(t,"H2",{class:!0});var pp=s(Me);ct=n(pp,"A",{id:!0,class:!0,href:!0});var ey=s(ct);$i=n(ey,"SPAN",{});var ty=s($i);y(mo.$$.fragment,ty),ty.forEach(a),ey.forEach(a),Th=r(pp),xi=n(pp,"SPAN",{});var ay=s(xi);Mh=p(ay,"StableDiffusionXLAdapterPipeline"),ay.forEach(a),pp.forEach(a),Tl=r(t),J=n(t,"DIV",{class:!0});var x=s(J);y(ho.$$.fragment,x),Eh=r(x),Xn=n(x,"P",{});var Pu=s(Xn);Uh=p(Pu,`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),uo=n(Pu,"A",{href:!0,rel:!0});var oy=s(uo);Jh=p(oy,"https://arxiv.org/abs/2302.08453"),oy.forEach(a),Pu.forEach(a),Ah=r(x),go=n(x,"P",{});var dp=s(go);Ih=p(dp,"This model inherits from "),Nn=n(dp,"A",{href:!0});var ny=s(Nn);$h=p(ny,"DiffusionPipeline"),ny.forEach(a),xh=p(dp,`. 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.)`),dp.forEach(a),kh=r(x),le=n(x,"DIV",{class:!0});var Yn=s(le);y(_o.$$.fragment,Yn),Dh=r(Yn),ki=n(Yn,"P",{});var sy=s(ki);Zh=p(sy,"Function invoked when calling the pipeline for generation."),sy.forEach(a),Sh=r(Yn),y(ft.$$.fragment,Yn),Yn.forEach(a),Gh=r(x),W=n(x,"DIV",{class:!0});var Ft=s(W);y(bo.$$.fragment,Ft),jh=r(Ft),Di=n(Ft,"P",{});var iy=s(Di);Ph=p(iy,`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.`),iy.forEach(a),Ch=r(Ft),y(mt.$$.fragment,Ft),Rh=r(Ft),y(ht.$$.fragment,Ft),Ft.forEach(a),Wh=r(x),ut=n(x,"DIV",{class:!0});var cp=s(ut);y(yo.$$.fragment,cp),Xh=r(cp),vo=n(cp,"P",{});var fp=s(vo);Nh=p(fp,"Disable sliced attention computation. If "),Zi=n(fp,"CODE",{});var ry=s(Zi);Bh=p(ry,"enable_attention_slicing"),ry.forEach(a),Fh=p(fp,` was previously called, attention is
computed in one step.`),fp.forEach(a),cp.forEach(a),Lh=r(x),gt=n(x,"DIV",{class:!0});var mp=s(gt);y(wo.$$.fragment,mp),Vh=r(mp),Si=n(mp,"P",{});var ly=s(Si);Qh=p(ly,`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.`),ly.forEach(a),mp.forEach(a),Yh=r(x),_t=n(x,"DIV",{class:!0});var hp=s(_t);y(To.$$.fragment,hp),zh=r(hp),Mo=n(hp,"P",{});var up=s(Mo);Hh=p(up,"Disable sliced VAE decoding. If "),Gi=n(up,"CODE",{});var py=s(Gi);qh=p(py,"enable_vae_slicing"),py.forEach(a),Oh=p(up,` was previously enabled, this method will go back to
computing decoding in one step.`),up.forEach(a),hp.forEach(a),Kh=r(x),X=n(x,"DIV",{class:!0});var Lt=s(X);y(Eo.$$.fragment,Lt),eu=r(Lt),Uo=n(Lt,"P",{});var gp=s(Uo);tu=p(gp,"Enable memory efficient attention from "),Jo=n(gp,"A",{href:!0,rel:!0});var dy=s(Jo);au=p(dy,"xFormers"),dy.forEach(a),ou=p(gp,`. 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.`),gp.forEach(a),nu=r(Lt),y(bt.$$.fragment,Lt),su=r(Lt),y(yt.$$.fragment,Lt),Lt.forEach(a),iu=r(x),vt=n(x,"DIV",{class:!0});var _p=s(vt);y(Ao.$$.fragment,_p),ru=r(_p),Io=n(_p,"P",{});var bp=s(Io);lu=p(bp,"Disable memory efficient attention from "),$o=n(bp,"A",{href:!0,rel:!0});var cy=s($o);pu=p(cy,"xFormers"),cy.forEach(a),du=p(bp,"."),bp.forEach(a),_p.forEach(a),cu=r(x),wt=n(x,"DIV",{class:!0});var yp=s(wt);y(xo.$$.fragment,yp),fu=r(yp),ko=n(yp,"P",{});var vp=s(ko);mu=p(vp,"Disable tiled VAE decoding. If "),ji=n(vp,"CODE",{});var fy=s(ji);hu=p(fy,"enable_vae_tiling"),fy.forEach(a),uu=p(vp,` was previously enabled, this method will go back to
computing decoding in one step.`),vp.forEach(a),yp.forEach(a),gu=r(x),Tt=n(x,"DIV",{class:!0});var wp=s(Tt);y(Do.$$.fragment,wp),_u=r(wp),P=n(wp,"P",{});var de=s(P);bu=p(de,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Pi=n(de,"CODE",{});var my=s(Pi);yu=p(my,"enable_sequential_cpu_offload"),my.forEach(a),vu=p(de,", this method moves one whole model at a time to the GPU when its "),Ci=n(de,"CODE",{});var hy=s(Ci);wu=p(hy,"forward"),hy.forEach(a),Tu=p(de,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Ri=n(de,"CODE",{});var uy=s(Ri);Mu=p(uy,"enable_sequential_cpu_offload"),uy.forEach(a),Eu=p(de,", but performance is much better due to the iterative execution of the "),Wi=n(de,"CODE",{});var gy=s(Wi);Uu=p(gy,"unet"),gy.forEach(a),Ju=p(de,"."),de.forEach(a),wp.forEach(a),Au=r(x),Mt=n(x,"DIV",{class:!0});var Tp=s(Mt);y(Zo.$$.fragment,Tp),Iu=r(Tp),Xi=n(Tp,"P",{});var _y=s(Xi);$u=p(_y,`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.`),_y.forEach(a),Tp.forEach(a),xu=r(x),Et=n(x,"DIV",{class:!0});var Mp=s(Et);y(So.$$.fragment,Mp),ku=r(Mp),Ni=n(Mp,"P",{});var by=s(Ni);Du=p(by,"Encodes the prompt into text encoder hidden states."),by.forEach(a),Mp.forEach(a),x.forEach(a),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(Gy)),d(u,"id","texttoimage-generation-with-adapter-conditioning"),d(u,"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"),d(u,"href","#texttoimage-generation-with-adapter-conditioning"),d(g,"class","relative group"),d(Ee,"id","overview"),d(Ee,"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"),d(Ee,"href","#overview"),d(ce,"class","relative group"),d(Yt,"href","https://arxiv.org/abs/2302.08453"),d(Yt,"rel","nofollow"),d(zt,"href","https://github.com/HimariO"),d(zt,"rel","nofollow"),d(Je,"id","available-pipelines"),d(Je,"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"),d(Je,"href","#available-pipelines"),d(fe,"class","relative group"),d(Wo,"align","center"),d(Ot,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_adapter.py"),d(Ot,"rel","nofollow"),d(Xo,"align","center"),d(Kt,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_xl_adapter.py"),d(Kt,"rel","nofollow"),d(No,"align","center"),d(Ie,"id","usage-example-with-the-base-model-of-stablediffusion1415"),d(Ie,"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"),d(Ie,"href","#usage-example-with-the-base-model-of-stablediffusion1415"),d(ge,"class","relative group"),d(Bo,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionAdapterPipeline"),d(aa,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),d(aa,"rel","nofollow"),Z(Lo.src,Cu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png")||d(Lo,"src",Cu),d(Lo,"alt","img"),Z(zo.src,Ru="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png")||d(zo,"src",Ru),d(zo,"alt","img"),Z(Ko.src,Wu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png")||d(Ko,"src",Wu),d(Ko,"alt","img"),d(De,"id","usage-example-with-the-base-model-of-stablediffusionxl"),d(De,"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"),d(De,"href","#usage-example-with-the-base-model-of-stablediffusionxl"),d(_e,"class","relative group"),d(en,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionXLAdapterPipeline"),d(pa,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0"),d(pa,"rel","nofollow"),Z(an.src,Xu="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png")||d(an,"src",Xu),d(an,"alt","img"),Z(rn.src,Nu="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch_output.png")||d(rn,"src",Nu),d(rn,"alt","img"),d(je,"id","available-checkpoints"),d(je,"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"),d(je,"href","#available-checkpoints"),d(be,"class","relative group"),d(ha,"href","https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models"),d(ha,"rel","nofollow"),d(Ce,"id","t2iadapter-with-stable-diffusion-14"),d(Ce,"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"),d(Ce,"href","#t2iadapter-with-stable-diffusion-14"),d(ye,"class","relative group"),d(ga,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),d(ga,"rel","nofollow"),d(Xe,"width","64"),zn(Xe,"margin","0"),zn(Xe,"padding","0"),Z(Xe.src,Bu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png")||d(Xe,"src",Bu),d(ln,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png"),d(dn,"width","64"),Z(dn.src,Fu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png")||d(dn,"src",Fu),d(pn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png"),d(_a,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd14v1"),d(_a,"rel","nofollow"),d(Be,"width","64"),zn(Be,"margin","0"),zn(Be,"padding","0"),Z(Be.src,Lu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png")||d(Be,"src",Lu),d(cn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png"),d(mn,"width","64"),Z(mn.src,Vu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png")||d(mn,"src",Vu),d(fn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png"),d(ba,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd14v1"),d(ba,"rel","nofollow"),d(va,"href","https://github.com/zhuoinoulu/pidinet"),d(va,"rel","nofollow"),d(Le,"width","64"),zn(Le,"margin","0"),zn(Le,"padding","0"),Z(Le.src,Qu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png")||d(Le,"src",Qu),d(hn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png"),d(gn,"width","64"),Z(gn.src,Yu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png")||d(gn,"src",Yu),d(un,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png"),d(wa,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd14v1"),d(wa,"rel","nofollow"),d(bn,"width","64"),Z(bn.src,zu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||d(bn,"src",zu),d(_n,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png"),d(vn,"width","64"),Z(vn.src,Hu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png")||d(vn,"src",Hu),d(yn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png"),d(Ta,"href","https://huggingface.co/TencentARC/t2iadapter_openpose_sd14v1"),d(Ta,"rel","nofollow"),d(Ea,"href","https://github.com/CMU-Perceptual-Computing-Lab/openpose"),d(Ea,"rel","nofollow"),d(Tn,"width","64"),Z(Tn.src,qu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png")||d(Tn,"src",qu),d(wn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png"),d(En,"width","64"),Z(En.src,Ou="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png")||d(En,"src",Ou),d(Mn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png"),d(Ua,"href","https://huggingface.co/TencentARC/t2iadapter_keypose_sd14v1"),d(Ua,"rel","nofollow"),d(Aa,"href","https://github.com/open-mmlab/mmpose"),d(Aa,"rel","nofollow"),d(Jn,"width","64"),Z(Jn.src,Ku="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||d(Jn,"src",Ku),d(Un,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png"),d(In,"width","64"),Z(In.src,eg="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png")||d(In,"src",eg),d(An,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png"),d($a,"href","https://huggingface.co/TencentARC/t2iadapter_seg_sd14v1"),d($a,"rel","nofollow"),d(ka,"href","https://github.com/TencentARC/T2I-Adapter/discussions/25"),d(ka,"rel","nofollow"),d(xn,"width","64"),Z(xn.src,tg="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png")||d(xn,"src",tg),d($n,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png"),d(Dn,"width","64"),Z(Dn.src,ag="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png")||d(Dn,"src",ag),d(kn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png"),d(Da,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd15v2"),d(Da,"rel","nofollow"),d(Za,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd15v2"),d(Za,"rel","nofollow"),d(Sa,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd15v2"),d(Sa,"rel","nofollow"),d(Ga,"href","https://huggingface.co/TencentARC/t2iadapter_zoedepth_sd15v1"),d(Ga,"rel","nofollow"),d(ja,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0"),d(ja,"rel","nofollow"),d(Pa,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/canny_sdxl_1.0"),d(Pa,"rel","nofollow"),d(Ca,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/openpose_sdxl_1.0"),d(Ca,"rel","nofollow"),d(ze,"id","combining-multiple-adapters"),d(ze,"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"),d(ze,"href","#combining-multiple-adapters"),d(ve,"class","relative group"),Z(Gn.src,og="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||d(Gn,"src",og),d(Gn,"alt","img"),Z(jn.src,ng="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||d(jn,"src",ng),d(jn,"alt","img"),Z(Cn.src,sg="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png")||d(Cn,"src",sg),d(Cn,"alt","img"),d(qe,"id","t2i-adapter-vs-controlnet"),d(qe,"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"),d(qe,"href","#t2i-adapter-vs-controlnet"),d(we,"class","relative group"),d(Va,"href","https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet"),d(Va,"rel","nofollow"),d(Ke,"id","diffusers.StableDiffusionAdapterPipeline"),d(Ke,"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"),d(Ke,"href","#diffusers.StableDiffusionAdapterPipeline"),d(Te,"class","relative group"),d(za,"href","https://arxiv.org/abs/2302.08453"),d(za,"rel","nofollow"),d(Wn,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),d(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(io,"href","https://facebookresearch.github.io/xformers/"),d(io,"rel","nofollow"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(po,"href","https://facebookresearch.github.io/xformers/"),d(po,"rel","nofollow"),d(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ct,"id","diffusers.StableDiffusionXLAdapterPipeline"),d(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"),d(ct,"href","#diffusers.StableDiffusionXLAdapterPipeline"),d(Me,"class","relative group"),d(uo,"href","https://arxiv.org/abs/2302.08453"),d(uo,"rel","nofollow"),d(Nn,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jo,"href","https://facebookresearch.github.io/xformers/"),d(Jo,"rel","nofollow"),d(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($o,"href","https://facebookresearch.github.io/xformers/"),d($o,"rel","nofollow"),d(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,c){e(document.head,h),f(t,E,c),f(t,g,c),e(g,u),e(u,U),v(m,U,null),e(g,_),e(g,N),e(N,Up),f(t,ar,c),f(t,ce,c),e(ce,Ee),e(Ee,On),v(Vt,On,null),e(ce,Jp),e(ce,Kn),e(Kn,Ap),f(t,or,c),f(t,Qt,c),e(Qt,Yt),e(Yt,Ip),e(Qt,$p),f(t,nr,c),f(t,Po,c),e(Po,xp),f(t,sr,c),f(t,Co,c),e(Co,kp),f(t,ir,c),f(t,Ro,c),e(Ro,es),e(es,Dp),f(t,rr,c),f(t,Ue,c),e(Ue,Zp),e(Ue,zt),e(zt,Sp),e(Ue,Gp),f(t,lr,c),f(t,fe,c),e(fe,Je),e(Je,ts),v(Ht,ts,null),e(fe,jp),e(fe,as),e(as,Pp),f(t,pr,c),f(t,Ae,c),e(Ae,os),e(os,me),e(me,ns),e(ns,Cp),e(me,Rp),e(me,ss),e(ss,Wp),e(me,Xp),e(me,Wo),e(Wo,Np),e(Ae,Bp),e(Ae,qt),e(qt,he),e(he,is),e(is,Ot),e(Ot,Fp),e(he,Lp),e(he,rs),e(rs,ls),e(ls,Vp),e(he,Qp),e(he,Xo),e(Xo,Yp),e(qt,zp),e(qt,ue),e(ue,ps),e(ps,Kt),e(Kt,Hp),e(ue,qp),e(ue,ds),e(ds,cs),e(cs,Op),e(ue,Kp),e(ue,No),e(No,ed),f(t,dr,c),f(t,ge,c),e(ge,Ie),e(Ie,fs),v(ea,fs,null),e(ge,td),e(ge,ms),e(ms,ad),f(t,cr,c),f(t,$e,c),e($e,od),e($e,hs),e(hs,nd),e($e,sd),f(t,fr,c),f(t,xe,c),e(xe,ta),e(ta,id),e(ta,us),e(us,rd),e(ta,ld),e(xe,pd),e(xe,B),e(B,dd),e(B,gs),e(gs,cd),e(B,fd),e(B,_s),e(_s,md),e(B,hd),e(B,Bo),e(Bo,ud),e(B,gd),f(t,mr,c),f(t,ke,c),e(ke,_d),e(ke,aa),e(aa,bd),e(ke,yd),f(t,hr,c),v(oa,t,c),f(t,ur,c),f(t,Fo,c),e(Fo,Lo),f(t,gr,c),f(t,Vo,c),e(Vo,vd),f(t,_r,c),v(na,t,c),f(t,br,c),f(t,Qo,c),e(Qo,wd),f(t,yr,c),f(t,Yo,c),e(Yo,zo),f(t,vr,c),f(t,Ho,c),e(Ho,Td),f(t,wr,c),v(sa,t,c),f(t,Tr,c),f(t,qo,c),e(qo,Md),f(t,Mr,c),v(ia,t,c),f(t,Er,c),f(t,Oo,c),e(Oo,Ko),f(t,Ur,c),f(t,_e,c),e(_e,De),e(De,bs),v(ra,bs,null),e(_e,Ed),e(_e,ys),e(ys,Ud),f(t,Jr,c),f(t,Ze,c),e(Ze,Jd),e(Ze,vs),e(vs,Ad),e(Ze,Id),f(t,Ar,c),f(t,Se,c),e(Se,la),e(la,$d),e(la,ws),e(ws,xd),e(la,kd),e(Se,Dd),e(Se,F),e(F,Zd),e(F,Ts),e(Ts,Sd),e(F,Gd),e(F,Ms),e(Ms,jd),e(F,Pd),e(F,en),e(en,Cd),e(F,Rd),f(t,Ir,c),f(t,Ge,c),e(Ge,Wd),e(Ge,pa),e(pa,Xd),e(Ge,Nd),f(t,$r,c),v(da,t,c),f(t,xr,c),f(t,tn,c),e(tn,an),f(t,kr,c),f(t,on,c),e(on,Bd),f(t,Dr,c),v(ca,t,c),f(t,Zr,c),f(t,nn,c),e(nn,Fd),f(t,Sr,c),v(fa,t,c),f(t,Gr,c),f(t,sn,c),e(sn,rn),f(t,jr,c),f(t,be,c),e(be,je),e(je,Es),v(ma,Es,null),e(be,Ld),e(be,Us),e(Us,Vd),f(t,Pr,c),f(t,Pe,c),e(Pe,Qd),e(Pe,ha),e(ha,Yd),e(Pe,zd),f(t,Cr,c),f(t,ye,c),e(ye,Ce),e(Ce,Js),v(ua,Js,null),e(ye,Hd),e(ye,As),e(As,qd),f(t,Rr,c),f(t,Re,c),e(Re,Is),e(Is,L),e(L,$s),e($s,Od),e(L,Kd),e(L,xs),e(xs,ec),e(L,tc),e(L,ks),e(ks,ac),e(L,oc),e(L,Ds),e(Ds,nc),e(Re,sc),e(Re,A),e(A,V),e(V,We),e(We,ga),e(ga,ic),e(We,rc),e(We,lc),e(We,Zs),e(Zs,pc),e(V,dc),e(V,Ss),e(Ss,cc),e(V,fc),e(V,Gs),e(Gs,ln),e(ln,Xe),e(V,mc),e(V,js),e(js,pn),e(pn,dn),e(A,hc),e(A,Q),e(Q,Ne),e(Ne,_a),e(_a,uc),e(Ne,gc),e(Ne,_c),e(Ne,Ps),e(Ps,bc),e(Q,yc),e(Q,Cs),e(Cs,vc),e(Q,wc),e(Q,Rs),e(Rs,cn),e(cn,Be),e(Q,Tc),e(Q,Ws),e(Ws,fn),e(fn,mn),e(A,Mc),e(A,Y),e(Y,Fe),e(Fe,ba),e(ba,Ec),e(Fe,Uc),e(Fe,Jc),e(Fe,ya),e(ya,Ac),e(ya,va),e(va,Ic),e(ya,$c),e(Y,xc),e(Y,Xs),e(Xs,kc),e(Y,Dc),e(Y,Ns),e(Ns,hn),e(hn,Le),e(Y,Zc),e(Y,Bs),e(Bs,un),e(un,gn),e(A,Sc),e(A,z),e(z,Ve),e(Ve,wa),e(wa,Gc),e(Ve,jc),e(Ve,Pc),e(Ve,Fs),e(Fs,Cc),e(z,Rc),e(z,Ls),e(Ls,Wc),e(z,Xc),e(z,Vs),e(Vs,_n),e(_n,bn),e(z,Nc),e(z,Qs),e(Qs,yn),e(yn,vn),e(A,Bc),e(A,H),e(H,Qe),e(Qe,Ta),e(Ta,Fc),e(Qe,Lc),e(Qe,Vc),e(Qe,Ys),e(Ys,Qc),e(H,Yc),e(H,Ma),e(Ma,zc),e(Ma,Ea),e(Ea,Hc),e(Ma,qc),e(H,Oc),e(H,zs),e(zs,wn),e(wn,Tn),e(H,Kc),e(H,Hs),e(Hs,Mn),e(Mn,En),e(A,ef),e(A,q),e(q,Ye),e(Ye,Ua),e(Ua,tf),e(Ye,af),e(Ye,of),e(Ye,qs),e(qs,nf),e(q,sf),e(q,Ja),e(Ja,rf),e(Ja,Aa),e(Aa,lf),e(Ja,pf),e(q,df),e(q,Os),e(Os,Un),e(Un,Jn),e(q,cf),e(q,Ks),e(Ks,An),e(An,In),e(A,ff),e(A,O),e(O,Ia),e(Ia,$a),e($a,mf),e(Ia,hf),e(Ia,ei),e(ei,uf),e(O,gf),e(O,xa),e(xa,_f),e(xa,ka),e(ka,bf),e(xa,yf),e(O,vf),e(O,ti),e(ti,$n),e($n,xn),e(O,wf),e(O,ai),e(ai,kn),e(kn,Dn),e(A,Tf),e(A,K),e(K,oi),e(oi,Da),e(Da,Mf),e(K,Ef),e(K,Wr),e(K,Uf),e(K,Xr),e(K,Jf),e(K,Nr),e(A,Af),e(A,ee),e(ee,ni),e(ni,Za),e(Za,If),e(ee,$f),e(ee,Br),e(ee,xf),e(ee,Fr),e(ee,kf),e(ee,Lr),e(A,Df),e(A,te),e(te,si),e(si,Sa),e(Sa,Zf),e(te,Sf),e(te,Vr),e(te,Gf),e(te,Qr),e(te,jf),e(te,Yr),e(A,Pf),e(A,ae),e(ae,ii),e(ii,Ga),e(Ga,Cf),e(ae,Rf),e(ae,zr),e(ae,Wf),e(ae,Hr),e(ae,Xf),e(ae,qr),e(A,Nf),e(A,oe),e(oe,ri),e(ri,ja),e(ja,Bf),e(oe,Ff),e(oe,Or),e(oe,Lf),e(oe,Kr),e(oe,Vf),e(oe,el),e(A,Qf),e(A,ne),e(ne,li),e(li,Pa),e(Pa,Yf),e(ne,zf),e(ne,tl),e(ne,Hf),e(ne,al),e(ne,qf),e(ne,ol),e(A,Of),e(A,se),e(se,pi),e(pi,Ca),e(Ca,Kf),e(se,em),e(se,nl),e(se,tm),e(se,sl),e(se,am),e(se,il),f(t,rl,c),f(t,ve,c),e(ve,ze),e(ze,di),v(Ra,di,null),e(ve,om),e(ve,ci),e(ci,nm),f(t,ll,c),f(t,Wa,c),e(Wa,fi),e(fi,sm),e(Wa,im),f(t,pl,c),f(t,Zn,c),e(Zn,rm),f(t,dl,c),v(Xa,t,c),f(t,cl,c),f(t,Sn,c),e(Sn,lm),f(t,fl,c),f(t,He,c),e(He,Gn),e(He,pm),e(He,jn),f(t,ml,c),f(t,Na,c),e(Na,mi),e(mi,dm),e(Na,cm),f(t,hl,c),f(t,Ba,c),e(Ba,hi),e(hi,fm),e(Ba,mm),f(t,ul,c),v(Fa,t,c),f(t,gl,c),f(t,Pn,c),e(Pn,Cn),f(t,_l,c),f(t,we,c),e(we,qe),e(qe,ui),v(La,ui,null),e(we,hm),e(we,gi),e(gi,um),f(t,bl,c),f(t,Oe,c),e(Oe,gm),e(Oe,Va),e(Va,_m),e(Oe,bm),f(t,yl,c),f(t,Te,c),e(Te,Ke),e(Ke,_i),v(Qa,_i,null),e(Te,ym),e(Te,bi),e(bi,vm),f(t,vl,c),f(t,I,c),v(Ya,I,null),e(I,wm),e(I,Rn),e(Rn,Tm),e(Rn,za),e(za,Mm),e(I,Em),e(I,Ha),e(Ha,Um),e(Ha,Wn),e(Wn,Jm),e(Ha,Am),e(I,Im),e(I,re),v(qa,re,null),e(re,$m),e(re,yi),e(yi,xm),e(re,km),v(et,re,null),e(I,Dm),e(I,C),v(Oa,C,null),e(C,Zm),e(C,vi),e(vi,Sm),e(C,Gm),v(tt,C,null),e(C,jm),v(at,C,null),e(I,Pm),e(I,ot),v(Ka,ot,null),e(ot,Cm),e(ot,eo),e(eo,Rm),e(eo,wi),e(wi,Wm),e(eo,Xm),e(I,Nm),e(I,nt),v(to,nt,null),e(nt,Bm),e(nt,Ti),e(Ti,Fm),e(I,Lm),e(I,st),v(ao,st,null),e(st,Vm),e(st,oo),e(oo,Qm),e(oo,Mi),e(Mi,Ym),e(oo,zm),e(I,Hm),e(I,R),v(no,R,null),e(R,qm),e(R,so),e(so,Om),e(so,io),e(io,Km),e(so,eh),e(R,th),v(it,R,null),e(R,ah),v(rt,R,null),e(I,oh),e(I,lt),v(ro,lt,null),e(lt,nh),e(lt,lo),e(lo,sh),e(lo,po),e(po,ih),e(lo,rh),e(I,lh),e(I,pt),v(co,pt,null),e(pt,ph),e(pt,j),e(j,dh),e(j,Ei),e(Ei,ch),e(j,fh),e(j,Ui),e(Ui,mh),e(j,hh),e(j,Ji),e(Ji,uh),e(j,gh),e(j,Ai),e(Ai,_h),e(j,bh),e(I,yh),e(I,dt),v(fo,dt,null),e(dt,vh),e(dt,Ii),e(Ii,wh),f(t,wl,c),f(t,Me,c),e(Me,ct),e(ct,$i),v(mo,$i,null),e(Me,Th),e(Me,xi),e(xi,Mh),f(t,Tl,c),f(t,J,c),v(ho,J,null),e(J,Eh),e(J,Xn),e(Xn,Uh),e(Xn,uo),e(uo,Jh),e(J,Ah),e(J,go),e(go,Ih),e(go,Nn),e(Nn,$h),e(go,xh),e(J,kh),e(J,le),v(_o,le,null),e(le,Dh),e(le,ki),e(ki,Zh),e(le,Sh),v(ft,le,null),e(J,Gh),e(J,W),v(bo,W,null),e(W,jh),e(W,Di),e(Di,Ph),e(W,Ch),v(mt,W,null),e(W,Rh),v(ht,W,null),e(J,Wh),e(J,ut),v(yo,ut,null),e(ut,Xh),e(ut,vo),e(vo,Nh),e(vo,Zi),e(Zi,Bh),e(vo,Fh),e(J,Lh),e(J,gt),v(wo,gt,null),e(gt,Vh),e(gt,Si),e(Si,Qh),e(J,Yh),e(J,_t),v(To,_t,null),e(_t,zh),e(_t,Mo),e(Mo,Hh),e(Mo,Gi),e(Gi,qh),e(Mo,Oh),e(J,Kh),e(J,X),v(Eo,X,null),e(X,eu),e(X,Uo),e(Uo,tu),e(Uo,Jo),e(Jo,au),e(Uo,ou),e(X,nu),v(bt,X,null),e(X,su),v(yt,X,null),e(J,iu),e(J,vt),v(Ao,vt,null),e(vt,ru),e(vt,Io),e(Io,lu),e(Io,$o),e($o,pu),e(Io,du),e(J,cu),e(J,wt),v(xo,wt,null),e(wt,fu),e(wt,ko),e(ko,mu),e(ko,ji),e(ji,hu),e(ko,uu),e(J,gu),e(J,Tt),v(Do,Tt,null),e(Tt,_u),e(Tt,P),e(P,bu),e(P,Pi),e(Pi,yu),e(P,vu),e(P,Ci),e(Ci,wu),e(P,Tu),e(P,Ri),e(Ri,Mu),e(P,Eu),e(P,Wi),e(Wi,Uu),e(P,Ju),e(J,Au),e(J,Mt),v(Zo,Mt,null),e(Mt,Iu),e(Mt,Xi),e(Xi,$u),e(J,xu),e(J,Et),v(So,Et,null),e(Et,ku),e(Et,Ni),e(Ni,Du),Ml=!0},p(t,[c]){const Go={};c&2&&(Go.$$scope={dirty:c,ctx:t}),et.$set(Go);const Bi={};c&2&&(Bi.$$scope={dirty:c,ctx:t}),tt.$set(Bi);const Fi={};c&2&&(Fi.$$scope={dirty:c,ctx:t}),at.$set(Fi);const Li={};c&2&&(Li.$$scope={dirty:c,ctx:t}),it.$set(Li);const jo={};c&2&&(jo.$$scope={dirty:c,ctx:t}),rt.$set(jo);const Vi={};c&2&&(Vi.$$scope={dirty:c,ctx:t}),ft.$set(Vi);const Qi={};c&2&&(Qi.$$scope={dirty:c,ctx:t}),mt.$set(Qi);const Yi={};c&2&&(Yi.$$scope={dirty:c,ctx:t}),ht.$set(Yi);const Bn={};c&2&&(Bn.$$scope={dirty:c,ctx:t}),bt.$set(Bn);const zi={};c&2&&(zi.$$scope={dirty:c,ctx:t}),yt.$set(zi)},i(t){Ml||(w(m.$$.fragment,t),w(Vt.$$.fragment,t),w(Ht.$$.fragment,t),w(ea.$$.fragment,t),w(oa.$$.fragment,t),w(na.$$.fragment,t),w(sa.$$.fragment,t),w(ia.$$.fragment,t),w(ra.$$.fragment,t),w(da.$$.fragment,t),w(ca.$$.fragment,t),w(fa.$$.fragment,t),w(ma.$$.fragment,t),w(ua.$$.fragment,t),w(Ra.$$.fragment,t),w(Xa.$$.fragment,t),w(Fa.$$.fragment,t),w(La.$$.fragment,t),w(Qa.$$.fragment,t),w(Ya.$$.fragment,t),w(qa.$$.fragment,t),w(et.$$.fragment,t),w(Oa.$$.fragment,t),w(tt.$$.fragment,t),w(at.$$.fragment,t),w(Ka.$$.fragment,t),w(to.$$.fragment,t),w(ao.$$.fragment,t),w(no.$$.fragment,t),w(it.$$.fragment,t),w(rt.$$.fragment,t),w(ro.$$.fragment,t),w(co.$$.fragment,t),w(fo.$$.fragment,t),w(mo.$$.fragment,t),w(ho.$$.fragment,t),w(_o.$$.fragment,t),w(ft.$$.fragment,t),w(bo.$$.fragment,t),w(mt.$$.fragment,t),w(ht.$$.fragment,t),w(yo.$$.fragment,t),w(wo.$$.fragment,t),w(To.$$.fragment,t),w(Eo.$$.fragment,t),w(bt.$$.fragment,t),w(yt.$$.fragment,t),w(Ao.$$.fragment,t),w(xo.$$.fragment,t),w(Do.$$.fragment,t),w(Zo.$$.fragment,t),w(So.$$.fragment,t),Ml=!0)},o(t){T(m.$$.fragment,t),T(Vt.$$.fragment,t),T(Ht.$$.fragment,t),T(ea.$$.fragment,t),T(oa.$$.fragment,t),T(na.$$.fragment,t),T(sa.$$.fragment,t),T(ia.$$.fragment,t),T(ra.$$.fragment,t),T(da.$$.fragment,t),T(ca.$$.fragment,t),T(fa.$$.fragment,t),T(ma.$$.fragment,t),T(ua.$$.fragment,t),T(Ra.$$.fragment,t),T(Xa.$$.fragment,t),T(Fa.$$.fragment,t),T(La.$$.fragment,t),T(Qa.$$.fragment,t),T(Ya.$$.fragment,t),T(qa.$$.fragment,t),T(et.$$.fragment,t),T(Oa.$$.fragment,t),T(tt.$$.fragment,t),T(at.$$.fragment,t),T(Ka.$$.fragment,t),T(to.$$.fragment,t),T(ao.$$.fragment,t),T(no.$$.fragment,t),T(it.$$.fragment,t),T(rt.$$.fragment,t),T(ro.$$.fragment,t),T(co.$$.fragment,t),T(fo.$$.fragment,t),T(mo.$$.fragment,t),T(ho.$$.fragment,t),T(_o.$$.fragment,t),T(ft.$$.fragment,t),T(bo.$$.fragment,t),T(mt.$$.fragment,t),T(ht.$$.fragment,t),T(yo.$$.fragment,t),T(wo.$$.fragment,t),T(To.$$.fragment,t),T(Eo.$$.fragment,t),T(bt.$$.fragment,t),T(yt.$$.fragment,t),T(Ao.$$.fragment,t),T(xo.$$.fragment,t),T(Do.$$.fragment,t),T(Zo.$$.fragment,t),T(So.$$.fragment,t),Ml=!1},d(t){a(h),t&&a(E),t&&a(g),M(m),t&&a(ar),t&&a(ce),M(Vt),t&&a(or),t&&a(Qt),t&&a(nr),t&&a(Po),t&&a(sr),t&&a(Co),t&&a(ir),t&&a(Ro),t&&a(rr),t&&a(Ue),t&&a(lr),t&&a(fe),M(Ht),t&&a(pr),t&&a(Ae),t&&a(dr),t&&a(ge),M(ea),t&&a(cr),t&&a($e),t&&a(fr),t&&a(xe),t&&a(mr),t&&a(ke),t&&a(hr),M(oa,t),t&&a(ur),t&&a(Fo),t&&a(gr),t&&a(Vo),t&&a(_r),M(na,t),t&&a(br),t&&a(Qo),t&&a(yr),t&&a(Yo),t&&a(vr),t&&a(Ho),t&&a(wr),M(sa,t),t&&a(Tr),t&&a(qo),t&&a(Mr),M(ia,t),t&&a(Er),t&&a(Oo),t&&a(Ur),t&&a(_e),M(ra),t&&a(Jr),t&&a(Ze),t&&a(Ar),t&&a(Se),t&&a(Ir),t&&a(Ge),t&&a($r),M(da,t),t&&a(xr),t&&a(tn),t&&a(kr),t&&a(on),t&&a(Dr),M(ca,t),t&&a(Zr),t&&a(nn),t&&a(Sr),M(fa,t),t&&a(Gr),t&&a(sn),t&&a(jr),t&&a(be),M(ma),t&&a(Pr),t&&a(Pe),t&&a(Cr),t&&a(ye),M(ua),t&&a(Rr),t&&a(Re),t&&a(rl),t&&a(ve),M(Ra),t&&a(ll),t&&a(Wa),t&&a(pl),t&&a(Zn),t&&a(dl),M(Xa,t),t&&a(cl),t&&a(Sn),t&&a(fl),t&&a(He),t&&a(ml),t&&a(Na),t&&a(hl),t&&a(Ba),t&&a(ul),M(Fa,t),t&&a(gl),t&&a(Pn),t&&a(_l),t&&a(we),M(La),t&&a(bl),t&&a(Oe),t&&a(yl),t&&a(Te),M(Qa),t&&a(vl),t&&a(I),M(Ya),M(qa),M(et),M(Oa),M(tt),M(at),M(Ka),M(to),M(ao),M(no),M(it),M(rt),M(ro),M(co),M(fo),t&&a(wl),t&&a(Me),M(mo),t&&a(Tl),t&&a(J),M(ho),M(_o),M(ft),M(bo),M(mt),M(ht),M(yo),M(wo),M(To),M(Eo),M(bt),M(yt),M(Ao),M(xo),M(Do),M(Zo),M(So)}}}const Gy={local:"texttoimage-generation-with-adapter-conditioning",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"usage-example-with-the-base-model-of-stablediffusion1415",title:"Usage example with the base model of StableDiffusion-1.4/1.5"},{local:"usage-example-with-the-base-model-of-stablediffusionxl",title:"Usage example with the base model of StableDiffusion-XL"},{local:"available-checkpoints",sections:[{local:"t2iadapter-with-stable-diffusion-14",title:"T2I-Adapter with Stable Diffusion 1.4"}],title:"Available checkpoints"},{local:"combining-multiple-adapters",title:"Combining multiple adapters"},{local:"t2i-adapter-vs-controlnet",title:"T2I Adapter vs ControlNet"},{local:"diffusers.StableDiffusionAdapterPipeline",title:"StableDiffusionAdapterPipeline"},{local:"diffusers.StableDiffusionXLAdapterPipeline",title:"StableDiffusionXLAdapterPipeline"}],title:"Text-to-Image Generation with Adapter Conditioning"};function jy(D){return My(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class By extends yy{constructor(h){super();vy(this,h,jy,Sy,wy,{})}}export{By as default,Gy as metadata};
