import{S as Jb,i as Ub,s as Ab,e as o,k as i,w as b,t as p,M as Ib,c as n,d as a,m as r,a as s,x as v,h as d,b as l,N as D,f as Wn,G as e,g as f,y,q as w,o as T,B as M,v as $b,L as Bn}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as ip}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as S}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as j}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ne}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Nn}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function kb(k){let h,E,g,u,J;return{c(){h=o("p"),E=p("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=o("code"),u=p("scaled_dot_product_attention"),J=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!`)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=n(_,"CODE",{});var X=s(g);u=d(X,"scaled_dot_product_attention"),X.forEach(a),J=d(_,` (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,J)},d(m){m&&a(h)}}}function Zb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Db(k){let h,E;return{c(){h=o("p"),E=p(`\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=d(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 Sb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function jb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Gb(k){let h,E,g,u,J;return{c(){h=o("p"),E=p("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=o("code"),u=p("scaled_dot_product_attention"),J=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!`)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=n(_,"CODE",{});var X=s(g);u=d(X,"scaled_dot_product_attention"),X.forEach(a),J=d(_,` (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,J)},d(m){m&&a(h)}}}function Pb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Cb(k){let h,E;return{c(){h=o("p"),E=p(`\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=d(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 Rb(k){let h,E,g,u,J;return u=new j({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=p("Examples:"),g=i(),b(u.$$.fragment)},l(m){h=n(m,"P",{});var _=s(h);E=d(_,"Examples:"),_.forEach(a),g=r(m),v(u.$$.fragment,m)},m(m,_){f(m,h,_),e(h,E),f(m,g,_),y(u,m,_),J=!0},p:Bn,i(m){J||(w(u.$$.fragment,m),J=!0)},o(m){T(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),M(u,m)}}}function Xb(k){let h,E,g,u,J,m,_,X,rp,Xi,re,ye,Fn,Xt,lp,Ln,pp,Wi,Wt,Nt,dp,cp,Ni,$o,fp,Bi,xo,mp,Fi,ko,Vn,hp,Li,we,up,Bt,gp,_p,Vi,le,Te,Qn,Ft,bp,Yn,vp,Qi,Me,zn,pe,Hn,yp,wp,qn,Tp,Mp,Zo,Ep,Jp,Lt,de,On,Vt,Up,Ap,Kn,es,Ip,$p,Do,xp,kp,ce,ts,Qt,Zp,Dp,as,os,Sp,jp,So,Gp,Yi,fe,Ee,ns,Yt,Pp,ss,Cp,zi,Je,Rp,is,Xp,Wp,Hi,Ue,zt,Np,rs,Bp,Fp,Lp,W,Vp,ls,Qp,Yp,ps,zp,Hp,jo,qp,Op,qi,Ae,Kp,Ht,ed,td,Oi,qt,Ki,Go,Po,Oh,er,Co,ad,tr,Ot,ar,Ro,od,or,Xo,Wo,Kh,nr,No,nd,sr,Kt,ir,Bo,sd,rr,ea,lr,Fo,Lo,eu,pr,me,Ie,ds,ta,id,cs,rd,dr,$e,ld,fs,pd,dd,cr,xe,aa,cd,ms,fd,md,hd,N,ud,hs,gd,_d,us,bd,vd,Vo,yd,wd,fr,ke,Td,oa,Md,Ed,mr,na,hr,Qo,Yo,tu,ur,zo,Jd,gr,sa,_r,Ho,Ud,br,ia,vr,qo,Oo,au,yr,he,Ze,gs,ra,Ad,_s,Id,wr,De,$d,la,xd,kd,Tr,ue,Se,bs,pa,Zd,vs,Dd,Mr,je,ys,B,ws,Sd,jd,Ts,Gd,Pd,Ms,Cd,Rd,Es,Xd,Wd,U,F,Ge,da,Nd,Bd,Fd,Js,Ld,Vd,Us,Qd,Yd,As,Ko,Pe,ou,zd,Is,en,tn,nu,Hd,L,Ce,ca,qd,Od,Kd,$s,ec,tc,xs,ac,oc,ks,an,Re,su,nc,Zs,on,nn,iu,sc,V,Xe,fa,ic,rc,lc,ma,pc,ha,dc,cc,fc,Ds,mc,hc,Ss,sn,We,ru,uc,js,rn,ln,lu,gc,Q,Ne,ua,_c,bc,vc,Gs,yc,wc,Ps,Tc,Mc,Cs,pn,dn,pu,Ec,Rs,cn,fn,du,Jc,Y,Be,ga,Uc,Ac,Ic,Xs,$c,xc,_a,kc,ba,Zc,Dc,Sc,Ws,mn,hn,cu,jc,Ns,un,gn,fu,Gc,z,Fe,va,Pc,Cc,Rc,Bs,Xc,Wc,ya,Nc,wa,Bc,Fc,Lc,Fs,_n,bn,mu,Vc,Ls,vn,yn,hu,Qc,H,Ta,Ma,Yc,zc,Vs,Hc,qc,Ea,Oc,Ja,Kc,ef,tf,Qs,wn,Tn,uu,af,Ys,Mn,En,gu,of,q,zs,Ua,nf,sf,Er,rf,Jr,lf,Ur,pf,O,Hs,Aa,df,cf,Ar,ff,Ir,mf,$r,hf,K,qs,Ia,uf,gf,xr,_f,kr,bf,Zr,vf,ee,Os,$a,yf,wf,Dr,Tf,Sr,Mf,jr,Ef,te,Ks,xa,Jf,Uf,Gr,Af,Pr,If,Cr,$f,ae,ei,ka,xf,kf,Rr,Zf,Xr,Df,Wr,Sf,oe,ti,Za,jf,Gf,Nr,Pf,Br,Cf,Fr,Lr,ge,Le,ai,Da,Rf,oi,Xf,Vr,Sa,ni,Wf,Nf,Qr,Jn,Bf,Yr,ja,zr,Un,Ff,Hr,Ve,An,_u,Lf,In,bu,qr,Ga,si,Vf,Qf,Or,Pa,ii,Yf,zf,Kr,Ca,el,$n,xn,vu,tl,_e,Qe,ri,Ra,Hf,li,qf,al,Ye,Of,Xa,Kf,em,ol,be,ze,pi,Wa,tm,di,am,nl,$,Na,om,kn,nm,Ba,sm,im,Fa,rm,Zn,lm,pm,dm,se,La,cm,ci,fm,mm,He,hm,G,Va,um,fi,gm,_m,qe,bm,Oe,vm,Ke,Qa,ym,Ya,wm,mi,Tm,Mm,Em,et,za,Jm,hi,Um,Am,tt,Ha,Im,qa,$m,ui,xm,km,Zm,P,Oa,Dm,Ka,Sm,eo,jm,Gm,Pm,at,Cm,ot,Rm,nt,to,Xm,ao,Wm,oo,Nm,Bm,Fm,st,no,Lm,gi,Vm,sl,ve,it,_i,so,Qm,bi,Ym,il,A,io,zm,Dn,Hm,ro,qm,Om,lo,Km,Sn,eh,th,ah,ie,po,oh,vi,nh,sh,rt,ih,C,co,rh,yi,lh,ph,lt,dh,pt,ch,dt,fo,fh,mo,mh,wi,hh,uh,gh,ct,ho,_h,Ti,bh,vh,ft,uo,yh,go,wh,Mi,Th,Mh,Eh,R,_o,Jh,bo,Uh,vo,Ah,Ih,$h,mt,xh,ht,kh,ut,yo,Zh,wo,Dh,To,Sh,jh,Gh,gt,Mo,Ph,Eo,Ch,Ei,Rh,Xh,Wh,_t,Jo,Nh,Ji,Bh,Fh,bt,Uo,Lh,Ui,Vh,rl;return m=new ne({}),Xt=new ne({}),Ft=new ne({}),Yt=new ne({}),qt=new j({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>)`}}),Ot=new j({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)`}}),Kt=new j({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>)`}}),ea=new j({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>]`}}),ta=new ne({}),na=new j({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>)`}}),sa=new j({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>)`}}),ia=new j({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>]`}}),ra=new ne({}),pa=new ne({}),Da=new ne({}),ja=new j({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>]`}}),Ca=new j({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>])`}}),Ra=new ne({}),Wa=new ne({}),Na=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/v0.21.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.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/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.21.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/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/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L118"}}),La=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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L559",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>
`}}),He=new Nn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[xb]},$$scope:{ctx:k}}}),Va=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),qe=new ip({props:{warning:!0,$$slots:{default:[kb]},$$scope:{ctx:k}}}),Oe=new Nn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Zb]},$$scope:{ctx:k}}}),Qa=new S({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),za=new S({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L204"}}),Ha=new S({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L212"}}),Oa=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),at=new ip({props:{warning:!0,$$slots:{default:[Db]},$$scope:{ctx:k}}}),ot=new Nn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Sb]},$$scope:{ctx:k}}}),to=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),no=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/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L251"}}),so=new ne({}),io=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/v0.21.0/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.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/v0.21.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.21.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/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/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L124"}}),po=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:"negative_original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"negative_target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"adapter_conditioning_factor",val:": 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. Anything below 512 pixels won&#x2019;t work well for
<a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0" rel="nofollow">stabilityai/stable-diffusion-xl-base-1.0</a>
and checkpoints that are not specifically fine-tuned on low resolutions.`,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. Anything below 512 pixels won&#x2019;t work well for
<a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0" rel="nofollow">stabilityai/stable-diffusion-xl-base-1.0</a>
and checkpoints that are not specifically fine-tuned on low resolutions.`,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/v0.21.0/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>.
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__.negative_original_size",description:`<strong>negative_original_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
To negatively condition the generation process based on a specific image resolution. Part of SDXL&#x2019;s
micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_original_size"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_crops_coords_top_left",description:`<strong>negative_crops_coords_top_left</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (0, 0)) &#x2014;
To negatively condition the generation process based on a specific crop coordinates. Part of SDXL&#x2019;s
micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_crops_coords_top_left"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_target_size",description:`<strong>negative_target_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
To negatively condition the generation process based on a target image resolution. It should be as same
as the <code>target_size</code> for most cases. Part of SDXL&#x2019;s micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>. For more
information, refer to this issue thread: <a href="https://github.com/huggingface/diffusers/issues/4208" rel="nofollow">https://github.com/huggingface/diffusers/issues/4208</a>.`,name:"negative_target_size"},{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"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.adapter_conditioning_factor",description:`<strong>adapter_conditioning_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The fraction of timesteps for which adapter should be applied. If <code>adapter_conditioning_factor</code> is
<code>0.0</code>, adapter is not applied at all. If <code>adapter_conditioning_factor</code> is <code>1.0</code>, adapter is applied for
all timesteps. If <code>adapter_conditioning_factor</code> is <code>0.5</code>, adapter is applied for half of the timesteps.`,name:"adapter_conditioning_factor"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L595",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>
`}}),rt=new Nn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[jb]},$$scope:{ctx:k}}}),co=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),lt=new ip({props:{warning:!0,$$slots:{default:[Gb]},$$scope:{ctx:k}}}),pt=new Nn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Pb]},$$scope:{ctx:k}}}),fo=new S({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),ho=new S({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L192"}}),uo=new S({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L200"}}),_o=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),mt=new ip({props:{warning:!0,$$slots:{default:[Cb]},$$scope:{ctx:k}}}),ht=new Nn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Rb]},$$scope:{ctx:k}}}),yo=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/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),Mo=new S({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L217"}}),Jo=new S({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L208"}}),Uo=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/v0.21.0/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L225"}}),{c(){h=o("meta"),E=i(),g=o("h1"),u=o("a"),J=o("span"),b(m.$$.fragment),_=i(),X=o("span"),rp=p("Text-to-Image Generation with Adapter Conditioning"),Xi=i(),re=o("h2"),ye=o("a"),Fn=o("span"),b(Xt.$$.fragment),lp=i(),Ln=o("span"),pp=p("Overview"),Wi=i(),Wt=o("p"),Nt=o("a"),dp=p("T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),cp=p(" by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),Ni=i(),$o=o("p"),fp=p("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."),Bi=i(),xo=o("p"),mp=p("The abstract of the paper is the following:"),Fi=i(),ko=o("p"),Vn=o("em"),hp=p("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."),Li=i(),we=o("p"),up=p("This model was contributed by the community contributor "),Bt=o("a"),gp=p("HimariO"),_p=p(" \u2764\uFE0F ."),Vi=i(),le=o("h2"),Te=o("a"),Qn=o("span"),b(Ft.$$.fragment),bp=i(),Yn=o("span"),vp=p("Available Pipelines:"),Qi=i(),Me=o("table"),zn=o("thead"),pe=o("tr"),Hn=o("th"),yp=p("Pipeline"),wp=i(),qn=o("th"),Tp=p("Tasks"),Mp=i(),Zo=o("th"),Ep=p("Demo"),Jp=i(),Lt=o("tbody"),de=o("tr"),On=o("td"),Vt=o("a"),Up=p("StableDiffusionAdapterPipeline"),Ap=i(),Kn=o("td"),es=o("em"),Ip=p("Text-to-Image Generation with T2I-Adapter Conditioning"),$p=i(),Do=o("td"),xp=p("-"),kp=i(),ce=o("tr"),ts=o("td"),Qt=o("a"),Zp=p("StableDiffusionXLAdapterPipeline"),Dp=i(),as=o("td"),os=o("em"),Sp=p("Text-to-Image Generation with T2I-Adapter Conditioning on StableDiffusion-XL"),jp=i(),So=o("td"),Gp=p("-"),Yi=i(),fe=o("h2"),Ee=o("a"),ns=o("span"),b(Yt.$$.fragment),Pp=i(),ss=o("span"),Cp=p("Usage example with the base model of StableDiffusion-1.4/1.5"),zi=i(),Je=o("p"),Rp=p("In the following we give a simple example of how to use a "),is=o("em"),Xp=p("T2IAdapter"),Wp=p(` checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`),Hi=i(),Ue=o("ol"),zt=o("li"),Np=p("Images are first converted into the appropriate "),rs=o("em"),Bp=p("control image"),Fp=p(" format."),Lp=i(),W=o("li"),Vp=p("The "),ls=o("em"),Qp=p("control image"),Yp=p(" and "),ps=o("em"),zp=p("prompt"),Hp=p(" are passed to the "),jo=o("a"),qp=p("StableDiffusionAdapterPipeline"),Op=p("."),qi=i(),Ae=o("p"),Kp=p("Let\u2019s have a look at a simple example using the "),Ht=o("a"),ed=p("Color Adapter"),td=p("."),Oi=i(),b(qt.$$.fragment),Ki=i(),Go=o("p"),Po=o("img"),er=i(),Co=o("p"),ad=p("Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),tr=i(),b(Ot.$$.fragment),ar=i(),Ro=o("p"),od=p("Let\u2019s take a look at the processed image."),or=i(),Xo=o("p"),Wo=o("img"),nr=i(),No=o("p"),nd=p("Next, create the adapter pipeline"),sr=i(),b(Kt.$$.fragment),ir=i(),Bo=o("p"),sd=p("Finally, pass the prompt and control image to the pipeline"),rr=i(),b(ea.$$.fragment),lr=i(),Fo=o("p"),Lo=o("img"),pr=i(),me=o("h2"),Ie=o("a"),ds=o("span"),b(ta.$$.fragment),id=i(),cs=o("span"),rd=p("Usage example with the base model of StableDiffusion-XL"),dr=i(),$e=o("p"),ld=p("In the following we give a simple example of how to use a "),fs=o("em"),pd=p("T2IAdapter"),dd=p(` checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`),cr=i(),xe=o("ol"),aa=o("li"),cd=p("Images are first downloaded into the appropriate "),ms=o("em"),fd=p("control image"),md=p(" format."),hd=i(),N=o("li"),ud=p("The "),hs=o("em"),gd=p("control image"),_d=p(" and "),us=o("em"),bd=p("prompt"),vd=p(" are passed to the "),Vo=o("a"),yd=p("StableDiffusionXLAdapterPipeline"),wd=p("."),fr=i(),ke=o("p"),Td=p("Let\u2019s have a look at a simple example using the "),oa=o("a"),Md=p("Sketch Adapter"),Ed=p("."),mr=i(),b(na.$$.fragment),hr=i(),Qo=o("p"),Yo=o("img"),ur=i(),zo=o("p"),Jd=p("Then, create the adapter pipeline"),gr=i(),b(sa.$$.fragment),_r=i(),Ho=o("p"),Ud=p("Finally, pass the prompt and control image to the pipeline"),br=i(),b(ia.$$.fragment),vr=i(),qo=o("p"),Oo=o("img"),yr=i(),he=o("h2"),Ze=o("a"),gs=o("span"),b(ra.$$.fragment),Ad=i(),_s=o("span"),Id=p("Available checkpoints"),wr=i(),De=o("p"),$d=p("Non-diffusers checkpoints can be found under "),la=o("a"),xd=p("TencentARC/T2I-Adapter"),kd=p("."),Tr=i(),ue=o("h3"),Se=o("a"),bs=o("span"),b(pa.$$.fragment),Zd=i(),vs=o("span"),Dd=p("T2I-Adapter with Stable Diffusion 1.4"),Mr=i(),je=o("table"),ys=o("thead"),B=o("tr"),ws=o("th"),Sd=p("Model Name"),jd=i(),Ts=o("th"),Gd=p("Control Image Overview"),Pd=i(),Ms=o("th"),Cd=p("Control Image Example"),Rd=i(),Es=o("th"),Xd=p("Generated Image Example"),Wd=i(),U=o("tbody"),F=o("tr"),Ge=o("td"),da=o("a"),Nd=p("TencentARC/t2iadapter_color_sd14v1"),Bd=o("br"),Fd=i(),Js=o("em"),Ld=p("Trained with spatial color palette"),Vd=i(),Us=o("td"),Qd=p("A image with 8x8 color palette."),Yd=i(),As=o("td"),Ko=o("a"),Pe=o("img"),zd=i(),Is=o("td"),en=o("a"),tn=o("img"),Hd=i(),L=o("tr"),Ce=o("td"),ca=o("a"),qd=p("TencentARC/t2iadapter_canny_sd14v1"),Od=o("br"),Kd=i(),$s=o("em"),ec=p("Trained with canny edge detection"),tc=i(),xs=o("td"),ac=p("A monochrome image with white edges on a black background."),oc=i(),ks=o("td"),an=o("a"),Re=o("img"),nc=i(),Zs=o("td"),on=o("a"),nn=o("img"),sc=i(),V=o("tr"),Xe=o("td"),fa=o("a"),ic=p("TencentARC/t2iadapter_sketch_sd14v1"),rc=o("br"),lc=i(),ma=o("em"),pc=p("Trained with "),ha=o("a"),dc=p("PidiNet"),cc=p(" edge detection"),fc=i(),Ds=o("td"),mc=p("A hand-drawn monochrome image with white outlines on a black background."),hc=i(),Ss=o("td"),sn=o("a"),We=o("img"),uc=i(),js=o("td"),rn=o("a"),ln=o("img"),gc=i(),Q=o("tr"),Ne=o("td"),ua=o("a"),_c=p("TencentARC/t2iadapter_depth_sd14v1"),bc=o("br"),vc=i(),Gs=o("em"),yc=p("Trained with Midas depth estimation"),wc=i(),Ps=o("td"),Tc=p("A grayscale image with black representing deep areas and white representing shallow areas."),Mc=i(),Cs=o("td"),pn=o("a"),dn=o("img"),Ec=i(),Rs=o("td"),cn=o("a"),fn=o("img"),Jc=i(),Y=o("tr"),Be=o("td"),ga=o("a"),Uc=p("TencentARC/t2iadapter_openpose_sd14v1"),Ac=o("br"),Ic=i(),Xs=o("em"),$c=p("Trained with OpenPose bone image"),xc=i(),_a=o("td"),kc=p("A "),ba=o("a"),Zc=p("OpenPose bone"),Dc=p(" image."),Sc=i(),Ws=o("td"),mn=o("a"),hn=o("img"),jc=i(),Ns=o("td"),un=o("a"),gn=o("img"),Gc=i(),z=o("tr"),Fe=o("td"),va=o("a"),Pc=p("TencentARC/t2iadapter_keypose_sd14v1"),Cc=o("br"),Rc=i(),Bs=o("em"),Xc=p("Trained with mmpose skeleton image"),Wc=i(),ya=o("td"),Nc=p("A "),wa=o("a"),Bc=p("mmpose skeleton"),Fc=p(" image."),Lc=i(),Fs=o("td"),_n=o("a"),bn=o("img"),Vc=i(),Ls=o("td"),vn=o("a"),yn=o("img"),Qc=i(),H=o("tr"),Ta=o("td"),Ma=o("a"),Yc=p("TencentARC/t2iadapter_seg_sd14v1"),zc=o("br"),Vs=o("em"),Hc=p("Trained with semantic segmentation"),qc=i(),Ea=o("td"),Oc=p("An "),Ja=o("a"),Kc=p("custom"),ef=p(" segmentation protocol image."),tf=i(),Qs=o("td"),wn=o("a"),Tn=o("img"),af=i(),Ys=o("td"),Mn=o("a"),En=o("img"),of=i(),q=o("tr"),zs=o("td"),Ua=o("a"),nf=p("TencentARC/t2iadapter_canny_sd15v2"),sf=i(),Er=o("td"),rf=i(),Jr=o("td"),lf=i(),Ur=o("td"),pf=i(),O=o("tr"),Hs=o("td"),Aa=o("a"),df=p("TencentARC/t2iadapter_depth_sd15v2"),cf=i(),Ar=o("td"),ff=i(),Ir=o("td"),mf=i(),$r=o("td"),hf=i(),K=o("tr"),qs=o("td"),Ia=o("a"),uf=p("TencentARC/t2iadapter_sketch_sd15v2"),gf=i(),xr=o("td"),_f=i(),kr=o("td"),bf=i(),Zr=o("td"),vf=i(),ee=o("tr"),Os=o("td"),$a=o("a"),yf=p("TencentARC/t2iadapter_zoedepth_sd15v1"),wf=i(),Dr=o("td"),Tf=i(),Sr=o("td"),Mf=i(),jr=o("td"),Ef=i(),te=o("tr"),Ks=o("td"),xa=o("a"),Jf=p("Adapter/t2iadapter, subfolder=\u2018sketch_sdxl_1.0\u2019"),Uf=i(),Gr=o("td"),Af=i(),Pr=o("td"),If=i(),Cr=o("td"),$f=i(),ae=o("tr"),ei=o("td"),ka=o("a"),xf=p("Adapter/t2iadapter, subfolder=\u2018canny_sdxl_1.0\u2019"),kf=i(),Rr=o("td"),Zf=i(),Xr=o("td"),Df=i(),Wr=o("td"),Sf=i(),oe=o("tr"),ti=o("td"),Za=o("a"),jf=p("Adapter/t2iadapter, subfolder=\u2018openpose_sdxl_1.0\u2019"),Gf=i(),Nr=o("td"),Pf=i(),Br=o("td"),Cf=i(),Fr=o("td"),Lr=i(),ge=o("h2"),Le=o("a"),ai=o("span"),b(Da.$$.fragment),Rf=i(),oi=o("span"),Xf=p("Combining multiple adapters"),Vr=i(),Sa=o("p"),ni=o("code"),Wf=p("MultiAdapter"),Nf=p(" can be used for applying multiple conditionings at once."),Qr=i(),Jn=o("p"),Bf=p("Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),Yr=i(),b(ja.$$.fragment),zr=i(),Un=o("p"),Ff=p("The two control images look as such:"),Hr=i(),Ve=o("p"),An=o("img"),Lf=i(),In=o("img"),qr=i(),Ga=o("p"),si=o("code"),Vf=p("MultiAdapter"),Qf=p(" combines keypose and depth adapters."),Or=i(),Pa=o("p"),ii=o("code"),Yf=p("adapter_conditioning_scale"),zf=p(" balances the relative influence of the different adapters."),Kr=i(),b(Ca.$$.fragment),el=i(),$n=o("p"),xn=o("img"),tl=i(),_e=o("h2"),Qe=o("a"),ri=o("span"),b(Ra.$$.fragment),Hf=i(),li=o("span"),qf=p("T2I Adapter vs ControlNet"),al=i(),Ye=o("p"),Of=p("T2I-Adapter is similar to "),Xa=o("a"),Kf=p("ControlNet"),em=p(`.
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.`),ol=i(),be=o("h2"),ze=o("a"),pi=o("span"),b(Wa.$$.fragment),tm=i(),di=o("span"),am=p("StableDiffusionAdapterPipeline"),nl=i(),$=o("div"),b(Na.$$.fragment),om=i(),kn=o("p"),nm=p(`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),Ba=o("a"),sm=p("https://arxiv.org/abs/2302.08453"),im=i(),Fa=o("p"),rm=p("This model inherits from "),Zn=o("a"),lm=p("DiffusionPipeline"),pm=p(`. 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.)`),dm=i(),se=o("div"),b(La.$$.fragment),cm=i(),ci=o("p"),fm=p("Function invoked when calling the pipeline for generation."),mm=i(),b(He.$$.fragment),hm=i(),G=o("div"),b(Va.$$.fragment),um=i(),fi=o("p"),gm=p(`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.`),_m=i(),b(qe.$$.fragment),bm=i(),b(Oe.$$.fragment),vm=i(),Ke=o("div"),b(Qa.$$.fragment),ym=i(),Ya=o("p"),wm=p("Disable sliced attention computation. If "),mi=o("code"),Tm=p("enable_attention_slicing"),Mm=p(` was previously called, attention is
computed in one step.`),Em=i(),et=o("div"),b(za.$$.fragment),Jm=i(),hi=o("p"),Um=p(`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.`),Am=i(),tt=o("div"),b(Ha.$$.fragment),Im=i(),qa=o("p"),$m=p("Disable sliced VAE decoding. If "),ui=o("code"),xm=p("enable_vae_slicing"),km=p(` was previously enabled, this method will go back to
computing decoding in one step.`),Zm=i(),P=o("div"),b(Oa.$$.fragment),Dm=i(),Ka=o("p"),Sm=p("Enable memory efficient attention from "),eo=o("a"),jm=p("xFormers"),Gm=p(`. 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.`),Pm=i(),b(at.$$.fragment),Cm=i(),b(ot.$$.fragment),Rm=i(),nt=o("div"),b(to.$$.fragment),Xm=i(),ao=o("p"),Wm=p("Disable memory efficient attention from "),oo=o("a"),Nm=p("xFormers"),Bm=p("."),Fm=i(),st=o("div"),b(no.$$.fragment),Lm=i(),gi=o("p"),Vm=p("Encodes the prompt into text encoder hidden states."),sl=i(),ve=o("h2"),it=o("a"),_i=o("span"),b(so.$$.fragment),Qm=i(),bi=o("span"),Ym=p("StableDiffusionXLAdapterPipeline"),il=i(),A=o("div"),b(io.$$.fragment),zm=i(),Dn=o("p"),Hm=p(`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),ro=o("a"),qm=p("https://arxiv.org/abs/2302.08453"),Om=i(),lo=o("p"),Km=p("This model inherits from "),Sn=o("a"),eh=p("DiffusionPipeline"),th=p(`. 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.)`),ah=i(),ie=o("div"),b(po.$$.fragment),oh=i(),vi=o("p"),nh=p("Function invoked when calling the pipeline for generation."),sh=i(),b(rt.$$.fragment),ih=i(),C=o("div"),b(co.$$.fragment),rh=i(),yi=o("p"),lh=p(`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.`),ph=i(),b(lt.$$.fragment),dh=i(),b(pt.$$.fragment),ch=i(),dt=o("div"),b(fo.$$.fragment),fh=i(),mo=o("p"),mh=p("Disable sliced attention computation. If "),wi=o("code"),hh=p("enable_attention_slicing"),uh=p(` was previously called, attention is
computed in one step.`),gh=i(),ct=o("div"),b(ho.$$.fragment),_h=i(),Ti=o("p"),bh=p(`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.`),vh=i(),ft=o("div"),b(uo.$$.fragment),yh=i(),go=o("p"),wh=p("Disable sliced VAE decoding. If "),Mi=o("code"),Th=p("enable_vae_slicing"),Mh=p(` was previously enabled, this method will go back to
computing decoding in one step.`),Eh=i(),R=o("div"),b(_o.$$.fragment),Jh=i(),bo=o("p"),Uh=p("Enable memory efficient attention from "),vo=o("a"),Ah=p("xFormers"),Ih=p(`. 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.`),$h=i(),b(mt.$$.fragment),xh=i(),b(ht.$$.fragment),kh=i(),ut=o("div"),b(yo.$$.fragment),Zh=i(),wo=o("p"),Dh=p("Disable memory efficient attention from "),To=o("a"),Sh=p("xFormers"),jh=p("."),Gh=i(),gt=o("div"),b(Mo.$$.fragment),Ph=i(),Eo=o("p"),Ch=p("Disable tiled VAE decoding. If "),Ei=o("code"),Rh=p("enable_vae_tiling"),Xh=p(` was previously enabled, this method will go back to
computing decoding in one step.`),Wh=i(),_t=o("div"),b(Jo.$$.fragment),Nh=i(),Ji=o("p"),Bh=p(`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.`),Fh=i(),bt=o("div"),b(Uo.$$.fragment),Lh=i(),Ui=o("p"),Vh=p("Encodes the prompt into text encoder hidden states."),this.h()},l(t){const c=Ib('[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 Ao=s(g);u=n(Ao,"A",{id:!0,class:!0,href:!0});var Ai=s(u);J=n(Ai,"SPAN",{});var Ii=s(J);v(m.$$.fragment,Ii),Ii.forEach(a),Ai.forEach(a),_=r(Ao),X=n(Ao,"SPAN",{});var $i=s(X);rp=d($i,"Text-to-Image Generation with Adapter Conditioning"),$i.forEach(a),Ao.forEach(a),Xi=r(t),re=n(t,"H2",{class:!0});var Io=s(re);ye=n(Io,"A",{id:!0,class:!0,href:!0});var xi=s(ye);Fn=n(xi,"SPAN",{});var ki=s(Fn);v(Xt.$$.fragment,ki),ki.forEach(a),xi.forEach(a),lp=r(Io),Ln=n(Io,"SPAN",{});var Zi=s(Ln);pp=d(Zi,"Overview"),Zi.forEach(a),Io.forEach(a),Wi=r(t),Wt=n(t,"P",{});var jn=s(Wt);Nt=n(jn,"A",{href:!0,rel:!0});var Di=s(Nt);dp=d(Di,"T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),Di.forEach(a),cp=d(jn," by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),jn.forEach(a),Ni=r(t),$o=n(t,"P",{});var yu=s($o);fp=d(yu,"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."),yu.forEach(a),Bi=r(t),xo=n(t,"P",{});var wu=s(xo);mp=d(wu,"The abstract of the paper is the following:"),wu.forEach(a),Fi=r(t),ko=n(t,"P",{});var Tu=s(ko);Vn=n(Tu,"EM",{});var Mu=s(Vn);hp=d(Mu,"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."),Mu.forEach(a),Tu.forEach(a),Li=r(t),we=n(t,"P",{});var ll=s(we);up=d(ll,"This model was contributed by the community contributor "),Bt=n(ll,"A",{href:!0,rel:!0});var Eu=s(Bt);gp=d(Eu,"HimariO"),Eu.forEach(a),_p=d(ll," \u2764\uFE0F ."),ll.forEach(a),Vi=r(t),le=n(t,"H2",{class:!0});var pl=s(le);Te=n(pl,"A",{id:!0,class:!0,href:!0});var Ju=s(Te);Qn=n(Ju,"SPAN",{});var Uu=s(Qn);v(Ft.$$.fragment,Uu),Uu.forEach(a),Ju.forEach(a),bp=r(pl),Yn=n(pl,"SPAN",{});var Au=s(Yn);vp=d(Au,"Available Pipelines:"),Au.forEach(a),pl.forEach(a),Qi=r(t),Me=n(t,"TABLE",{});var dl=s(Me);zn=n(dl,"THEAD",{});var Iu=s(zn);pe=n(Iu,"TR",{});var Gn=s(pe);Hn=n(Gn,"TH",{});var $u=s(Hn);yp=d($u,"Pipeline"),$u.forEach(a),wp=r(Gn),qn=n(Gn,"TH",{});var xu=s(qn);Tp=d(xu,"Tasks"),xu.forEach(a),Mp=r(Gn),Zo=n(Gn,"TH",{align:!0});var ku=s(Zo);Ep=d(ku,"Demo"),ku.forEach(a),Gn.forEach(a),Iu.forEach(a),Jp=r(dl),Lt=n(dl,"TBODY",{});var cl=s(Lt);de=n(cl,"TR",{});var Pn=s(de);On=n(Pn,"TD",{});var Zu=s(On);Vt=n(Zu,"A",{href:!0,rel:!0});var Du=s(Vt);Up=d(Du,"StableDiffusionAdapterPipeline"),Du.forEach(a),Zu.forEach(a),Ap=r(Pn),Kn=n(Pn,"TD",{});var Su=s(Kn);es=n(Su,"EM",{});var ju=s(es);Ip=d(ju,"Text-to-Image Generation with T2I-Adapter Conditioning"),ju.forEach(a),Su.forEach(a),$p=r(Pn),Do=n(Pn,"TD",{align:!0});var Gu=s(Do);xp=d(Gu,"-"),Gu.forEach(a),Pn.forEach(a),kp=r(cl),ce=n(cl,"TR",{});var Cn=s(ce);ts=n(Cn,"TD",{});var Pu=s(ts);Qt=n(Pu,"A",{href:!0,rel:!0});var Cu=s(Qt);Zp=d(Cu,"StableDiffusionXLAdapterPipeline"),Cu.forEach(a),Pu.forEach(a),Dp=r(Cn),as=n(Cn,"TD",{});var Ru=s(as);os=n(Ru,"EM",{});var Xu=s(os);Sp=d(Xu,"Text-to-Image Generation with T2I-Adapter Conditioning on StableDiffusion-XL"),Xu.forEach(a),Ru.forEach(a),jp=r(Cn),So=n(Cn,"TD",{align:!0});var Wu=s(So);Gp=d(Wu,"-"),Wu.forEach(a),Cn.forEach(a),cl.forEach(a),dl.forEach(a),Yi=r(t),fe=n(t,"H2",{class:!0});var fl=s(fe);Ee=n(fl,"A",{id:!0,class:!0,href:!0});var Nu=s(Ee);ns=n(Nu,"SPAN",{});var Bu=s(ns);v(Yt.$$.fragment,Bu),Bu.forEach(a),Nu.forEach(a),Pp=r(fl),ss=n(fl,"SPAN",{});var Fu=s(ss);Cp=d(Fu,"Usage example with the base model of StableDiffusion-1.4/1.5"),Fu.forEach(a),fl.forEach(a),zi=r(t),Je=n(t,"P",{});var ml=s(Je);Rp=d(ml,"In the following we give a simple example of how to use a "),is=n(ml,"EM",{});var Lu=s(is);Xp=d(Lu,"T2IAdapter"),Lu.forEach(a),Wp=d(ml,` checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`),ml.forEach(a),Hi=r(t),Ue=n(t,"OL",{});var hl=s(Ue);zt=n(hl,"LI",{});var ul=s(zt);Np=d(ul,"Images are first converted into the appropriate "),rs=n(ul,"EM",{});var Vu=s(rs);Bp=d(Vu,"control image"),Vu.forEach(a),Fp=d(ul," format."),ul.forEach(a),Lp=r(hl),W=n(hl,"LI",{});var vt=s(W);Vp=d(vt,"The "),ls=n(vt,"EM",{});var Qu=s(ls);Qp=d(Qu,"control image"),Qu.forEach(a),Yp=d(vt," and "),ps=n(vt,"EM",{});var Yu=s(ps);zp=d(Yu,"prompt"),Yu.forEach(a),Hp=d(vt," are passed to the "),jo=n(vt,"A",{href:!0});var zu=s(jo);qp=d(zu,"StableDiffusionAdapterPipeline"),zu.forEach(a),Op=d(vt,"."),vt.forEach(a),hl.forEach(a),qi=r(t),Ae=n(t,"P",{});var gl=s(Ae);Kp=d(gl,"Let\u2019s have a look at a simple example using the "),Ht=n(gl,"A",{href:!0,rel:!0});var Hu=s(Ht);ed=d(Hu,"Color Adapter"),Hu.forEach(a),td=d(gl,"."),gl.forEach(a),Oi=r(t),v(qt.$$.fragment,t),Ki=r(t),Go=n(t,"P",{});var qu=s(Go);Po=n(qu,"IMG",{src:!0,alt:!0}),qu.forEach(a),er=r(t),Co=n(t,"P",{});var Ou=s(Co);ad=d(Ou,"Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),Ou.forEach(a),tr=r(t),v(Ot.$$.fragment,t),ar=r(t),Ro=n(t,"P",{});var Ku=s(Ro);od=d(Ku,"Let\u2019s take a look at the processed image."),Ku.forEach(a),or=r(t),Xo=n(t,"P",{});var eg=s(Xo);Wo=n(eg,"IMG",{src:!0,alt:!0}),eg.forEach(a),nr=r(t),No=n(t,"P",{});var tg=s(No);nd=d(tg,"Next, create the adapter pipeline"),tg.forEach(a),sr=r(t),v(Kt.$$.fragment,t),ir=r(t),Bo=n(t,"P",{});var ag=s(Bo);sd=d(ag,"Finally, pass the prompt and control image to the pipeline"),ag.forEach(a),rr=r(t),v(ea.$$.fragment,t),lr=r(t),Fo=n(t,"P",{});var og=s(Fo);Lo=n(og,"IMG",{src:!0,alt:!0}),og.forEach(a),pr=r(t),me=n(t,"H2",{class:!0});var _l=s(me);Ie=n(_l,"A",{id:!0,class:!0,href:!0});var ng=s(Ie);ds=n(ng,"SPAN",{});var sg=s(ds);v(ta.$$.fragment,sg),sg.forEach(a),ng.forEach(a),id=r(_l),cs=n(_l,"SPAN",{});var ig=s(cs);rd=d(ig,"Usage example with the base model of StableDiffusion-XL"),ig.forEach(a),_l.forEach(a),dr=r(t),$e=n(t,"P",{});var bl=s($e);ld=d(bl,"In the following we give a simple example of how to use a "),fs=n(bl,"EM",{});var rg=s(fs);pd=d(rg,"T2IAdapter"),rg.forEach(a),dd=d(bl,` checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`),bl.forEach(a),cr=r(t),xe=n(t,"OL",{});var vl=s(xe);aa=n(vl,"LI",{});var yl=s(aa);cd=d(yl,"Images are first downloaded into the appropriate "),ms=n(yl,"EM",{});var lg=s(ms);fd=d(lg,"control image"),lg.forEach(a),md=d(yl," format."),yl.forEach(a),hd=r(vl),N=n(vl,"LI",{});var yt=s(N);ud=d(yt,"The "),hs=n(yt,"EM",{});var pg=s(hs);gd=d(pg,"control image"),pg.forEach(a),_d=d(yt," and "),us=n(yt,"EM",{});var dg=s(us);bd=d(dg,"prompt"),dg.forEach(a),vd=d(yt," are passed to the "),Vo=n(yt,"A",{href:!0});var cg=s(Vo);yd=d(cg,"StableDiffusionXLAdapterPipeline"),cg.forEach(a),wd=d(yt,"."),yt.forEach(a),vl.forEach(a),fr=r(t),ke=n(t,"P",{});var wl=s(ke);Td=d(wl,"Let\u2019s have a look at a simple example using the "),oa=n(wl,"A",{href:!0,rel:!0});var fg=s(oa);Md=d(fg,"Sketch Adapter"),fg.forEach(a),Ed=d(wl,"."),wl.forEach(a),mr=r(t),v(na.$$.fragment,t),hr=r(t),Qo=n(t,"P",{});var mg=s(Qo);Yo=n(mg,"IMG",{src:!0,alt:!0}),mg.forEach(a),ur=r(t),zo=n(t,"P",{});var hg=s(zo);Jd=d(hg,"Then, create the adapter pipeline"),hg.forEach(a),gr=r(t),v(sa.$$.fragment,t),_r=r(t),Ho=n(t,"P",{});var ug=s(Ho);Ud=d(ug,"Finally, pass the prompt and control image to the pipeline"),ug.forEach(a),br=r(t),v(ia.$$.fragment,t),vr=r(t),qo=n(t,"P",{});var gg=s(qo);Oo=n(gg,"IMG",{src:!0,alt:!0}),gg.forEach(a),yr=r(t),he=n(t,"H2",{class:!0});var Tl=s(he);Ze=n(Tl,"A",{id:!0,class:!0,href:!0});var _g=s(Ze);gs=n(_g,"SPAN",{});var bg=s(gs);v(ra.$$.fragment,bg),bg.forEach(a),_g.forEach(a),Ad=r(Tl),_s=n(Tl,"SPAN",{});var vg=s(_s);Id=d(vg,"Available checkpoints"),vg.forEach(a),Tl.forEach(a),wr=r(t),De=n(t,"P",{});var Ml=s(De);$d=d(Ml,"Non-diffusers checkpoints can be found under "),la=n(Ml,"A",{href:!0,rel:!0});var yg=s(la);xd=d(yg,"TencentARC/T2I-Adapter"),yg.forEach(a),kd=d(Ml,"."),Ml.forEach(a),Tr=r(t),ue=n(t,"H3",{class:!0});var El=s(ue);Se=n(El,"A",{id:!0,class:!0,href:!0});var wg=s(Se);bs=n(wg,"SPAN",{});var Tg=s(bs);v(pa.$$.fragment,Tg),Tg.forEach(a),wg.forEach(a),Zd=r(El),vs=n(El,"SPAN",{});var Mg=s(vs);Dd=d(Mg,"T2I-Adapter with Stable Diffusion 1.4"),Mg.forEach(a),El.forEach(a),Mr=r(t),je=n(t,"TABLE",{});var Jl=s(je);ys=n(Jl,"THEAD",{});var Eg=s(ys);B=n(Eg,"TR",{});var wt=s(B);ws=n(wt,"TH",{});var Jg=s(ws);Sd=d(Jg,"Model Name"),Jg.forEach(a),jd=r(wt),Ts=n(wt,"TH",{});var Ug=s(Ts);Gd=d(Ug,"Control Image Overview"),Ug.forEach(a),Pd=r(wt),Ms=n(wt,"TH",{});var Ag=s(Ms);Cd=d(Ag,"Control Image Example"),Ag.forEach(a),Rd=r(wt),Es=n(wt,"TH",{});var Ig=s(Es);Xd=d(Ig,"Generated Image Example"),Ig.forEach(a),wt.forEach(a),Eg.forEach(a),Wd=r(Jl),U=n(Jl,"TBODY",{});var I=s(U);F=n(I,"TR",{});var Tt=s(F);Ge=n(Tt,"TD",{});var Si=s(Ge);da=n(Si,"A",{href:!0,rel:!0});var $g=s(da);Nd=d($g,"TencentARC/t2iadapter_color_sd14v1"),$g.forEach(a),Bd=n(Si,"BR",{}),Fd=r(Si),Js=n(Si,"EM",{});var xg=s(Js);Ld=d(xg,"Trained with spatial color palette"),xg.forEach(a),Si.forEach(a),Vd=r(Tt),Us=n(Tt,"TD",{});var kg=s(Us);Qd=d(kg,"A image with 8x8 color palette."),kg.forEach(a),Yd=r(Tt),As=n(Tt,"TD",{});var Zg=s(As);Ko=n(Zg,"A",{href:!0});var Dg=s(Ko);Pe=n(Dg,"IMG",{width:!0,style:!0,src:!0}),Dg.forEach(a),Zg.forEach(a),zd=r(Tt),Is=n(Tt,"TD",{});var Sg=s(Is);en=n(Sg,"A",{href:!0});var jg=s(en);tn=n(jg,"IMG",{width:!0,src:!0}),jg.forEach(a),Sg.forEach(a),Tt.forEach(a),Hd=r(I),L=n(I,"TR",{});var Mt=s(L);Ce=n(Mt,"TD",{});var ji=s(Ce);ca=n(ji,"A",{href:!0,rel:!0});var Gg=s(ca);qd=d(Gg,"TencentARC/t2iadapter_canny_sd14v1"),Gg.forEach(a),Od=n(ji,"BR",{}),Kd=r(ji),$s=n(ji,"EM",{});var Pg=s($s);ec=d(Pg,"Trained with canny edge detection"),Pg.forEach(a),ji.forEach(a),tc=r(Mt),xs=n(Mt,"TD",{});var Cg=s(xs);ac=d(Cg,"A monochrome image with white edges on a black background."),Cg.forEach(a),oc=r(Mt),ks=n(Mt,"TD",{});var Rg=s(ks);an=n(Rg,"A",{href:!0});var Xg=s(an);Re=n(Xg,"IMG",{width:!0,style:!0,src:!0}),Xg.forEach(a),Rg.forEach(a),nc=r(Mt),Zs=n(Mt,"TD",{});var Wg=s(Zs);on=n(Wg,"A",{href:!0});var Ng=s(on);nn=n(Ng,"IMG",{width:!0,src:!0}),Ng.forEach(a),Wg.forEach(a),Mt.forEach(a),sc=r(I),V=n(I,"TR",{});var Et=s(V);Xe=n(Et,"TD",{});var Gi=s(Xe);fa=n(Gi,"A",{href:!0,rel:!0});var Bg=s(fa);ic=d(Bg,"TencentARC/t2iadapter_sketch_sd14v1"),Bg.forEach(a),rc=n(Gi,"BR",{}),lc=r(Gi),ma=n(Gi,"EM",{});var Ul=s(ma);pc=d(Ul,"Trained with "),ha=n(Ul,"A",{href:!0,rel:!0});var Fg=s(ha);dc=d(Fg,"PidiNet"),Fg.forEach(a),cc=d(Ul," edge detection"),Ul.forEach(a),Gi.forEach(a),fc=r(Et),Ds=n(Et,"TD",{});var Lg=s(Ds);mc=d(Lg,"A hand-drawn monochrome image with white outlines on a black background."),Lg.forEach(a),hc=r(Et),Ss=n(Et,"TD",{});var Vg=s(Ss);sn=n(Vg,"A",{href:!0});var Qg=s(sn);We=n(Qg,"IMG",{width:!0,style:!0,src:!0}),Qg.forEach(a),Vg.forEach(a),uc=r(Et),js=n(Et,"TD",{});var Yg=s(js);rn=n(Yg,"A",{href:!0});var zg=s(rn);ln=n(zg,"IMG",{width:!0,src:!0}),zg.forEach(a),Yg.forEach(a),Et.forEach(a),gc=r(I),Q=n(I,"TR",{});var Jt=s(Q);Ne=n(Jt,"TD",{});var Pi=s(Ne);ua=n(Pi,"A",{href:!0,rel:!0});var Hg=s(ua);_c=d(Hg,"TencentARC/t2iadapter_depth_sd14v1"),Hg.forEach(a),bc=n(Pi,"BR",{}),vc=r(Pi),Gs=n(Pi,"EM",{});var qg=s(Gs);yc=d(qg,"Trained with Midas depth estimation"),qg.forEach(a),Pi.forEach(a),wc=r(Jt),Ps=n(Jt,"TD",{});var Og=s(Ps);Tc=d(Og,"A grayscale image with black representing deep areas and white representing shallow areas."),Og.forEach(a),Mc=r(Jt),Cs=n(Jt,"TD",{});var Kg=s(Cs);pn=n(Kg,"A",{href:!0});var e_=s(pn);dn=n(e_,"IMG",{width:!0,src:!0}),e_.forEach(a),Kg.forEach(a),Ec=r(Jt),Rs=n(Jt,"TD",{});var t_=s(Rs);cn=n(t_,"A",{href:!0});var a_=s(cn);fn=n(a_,"IMG",{width:!0,src:!0}),a_.forEach(a),t_.forEach(a),Jt.forEach(a),Jc=r(I),Y=n(I,"TR",{});var Ut=s(Y);Be=n(Ut,"TD",{});var Ci=s(Be);ga=n(Ci,"A",{href:!0,rel:!0});var o_=s(ga);Uc=d(o_,"TencentARC/t2iadapter_openpose_sd14v1"),o_.forEach(a),Ac=n(Ci,"BR",{}),Ic=r(Ci),Xs=n(Ci,"EM",{});var n_=s(Xs);$c=d(n_,"Trained with OpenPose bone image"),n_.forEach(a),Ci.forEach(a),xc=r(Ut),_a=n(Ut,"TD",{});var Al=s(_a);kc=d(Al,"A "),ba=n(Al,"A",{href:!0,rel:!0});var s_=s(ba);Zc=d(s_,"OpenPose bone"),s_.forEach(a),Dc=d(Al," image."),Al.forEach(a),Sc=r(Ut),Ws=n(Ut,"TD",{});var i_=s(Ws);mn=n(i_,"A",{href:!0});var r_=s(mn);hn=n(r_,"IMG",{width:!0,src:!0}),r_.forEach(a),i_.forEach(a),jc=r(Ut),Ns=n(Ut,"TD",{});var l_=s(Ns);un=n(l_,"A",{href:!0});var p_=s(un);gn=n(p_,"IMG",{width:!0,src:!0}),p_.forEach(a),l_.forEach(a),Ut.forEach(a),Gc=r(I),z=n(I,"TR",{});var At=s(z);Fe=n(At,"TD",{});var Ri=s(Fe);va=n(Ri,"A",{href:!0,rel:!0});var d_=s(va);Pc=d(d_,"TencentARC/t2iadapter_keypose_sd14v1"),d_.forEach(a),Cc=n(Ri,"BR",{}),Rc=r(Ri),Bs=n(Ri,"EM",{});var c_=s(Bs);Xc=d(c_,"Trained with mmpose skeleton image"),c_.forEach(a),Ri.forEach(a),Wc=r(At),ya=n(At,"TD",{});var Il=s(ya);Nc=d(Il,"A "),wa=n(Il,"A",{href:!0,rel:!0});var f_=s(wa);Bc=d(f_,"mmpose skeleton"),f_.forEach(a),Fc=d(Il," image."),Il.forEach(a),Lc=r(At),Fs=n(At,"TD",{});var m_=s(Fs);_n=n(m_,"A",{href:!0});var h_=s(_n);bn=n(h_,"IMG",{width:!0,src:!0}),h_.forEach(a),m_.forEach(a),Vc=r(At),Ls=n(At,"TD",{});var u_=s(Ls);vn=n(u_,"A",{href:!0});var g_=s(vn);yn=n(g_,"IMG",{width:!0,src:!0}),g_.forEach(a),u_.forEach(a),At.forEach(a),Qc=r(I),H=n(I,"TR",{});var It=s(H);Ta=n(It,"TD",{});var $l=s(Ta);Ma=n($l,"A",{href:!0,rel:!0});var __=s(Ma);Yc=d(__,"TencentARC/t2iadapter_seg_sd14v1"),__.forEach(a),zc=n($l,"BR",{}),Vs=n($l,"EM",{});var b_=s(Vs);Hc=d(b_,"Trained with semantic segmentation"),b_.forEach(a),$l.forEach(a),qc=r(It),Ea=n(It,"TD",{});var xl=s(Ea);Oc=d(xl,"An "),Ja=n(xl,"A",{href:!0,rel:!0});var v_=s(Ja);Kc=d(v_,"custom"),v_.forEach(a),ef=d(xl," segmentation protocol image."),xl.forEach(a),tf=r(It),Qs=n(It,"TD",{});var y_=s(Qs);wn=n(y_,"A",{href:!0});var w_=s(wn);Tn=n(w_,"IMG",{width:!0,src:!0}),w_.forEach(a),y_.forEach(a),af=r(It),Ys=n(It,"TD",{});var T_=s(Ys);Mn=n(T_,"A",{href:!0});var M_=s(Mn);En=n(M_,"IMG",{width:!0,src:!0}),M_.forEach(a),T_.forEach(a),It.forEach(a),of=r(I),q=n(I,"TR",{});var $t=s(q);zs=n($t,"TD",{});var E_=s(zs);Ua=n(E_,"A",{href:!0,rel:!0});var J_=s(Ua);nf=d(J_,"TencentARC/t2iadapter_canny_sd15v2"),J_.forEach(a),E_.forEach(a),sf=r($t),Er=n($t,"TD",{}),s(Er).forEach(a),rf=r($t),Jr=n($t,"TD",{}),s(Jr).forEach(a),lf=r($t),Ur=n($t,"TD",{}),s(Ur).forEach(a),$t.forEach(a),pf=r(I),O=n(I,"TR",{});var xt=s(O);Hs=n(xt,"TD",{});var U_=s(Hs);Aa=n(U_,"A",{href:!0,rel:!0});var A_=s(Aa);df=d(A_,"TencentARC/t2iadapter_depth_sd15v2"),A_.forEach(a),U_.forEach(a),cf=r(xt),Ar=n(xt,"TD",{}),s(Ar).forEach(a),ff=r(xt),Ir=n(xt,"TD",{}),s(Ir).forEach(a),mf=r(xt),$r=n(xt,"TD",{}),s($r).forEach(a),xt.forEach(a),hf=r(I),K=n(I,"TR",{});var kt=s(K);qs=n(kt,"TD",{});var I_=s(qs);Ia=n(I_,"A",{href:!0,rel:!0});var $_=s(Ia);uf=d($_,"TencentARC/t2iadapter_sketch_sd15v2"),$_.forEach(a),I_.forEach(a),gf=r(kt),xr=n(kt,"TD",{}),s(xr).forEach(a),_f=r(kt),kr=n(kt,"TD",{}),s(kr).forEach(a),bf=r(kt),Zr=n(kt,"TD",{}),s(Zr).forEach(a),kt.forEach(a),vf=r(I),ee=n(I,"TR",{});var Zt=s(ee);Os=n(Zt,"TD",{});var x_=s(Os);$a=n(x_,"A",{href:!0,rel:!0});var k_=s($a);yf=d(k_,"TencentARC/t2iadapter_zoedepth_sd15v1"),k_.forEach(a),x_.forEach(a),wf=r(Zt),Dr=n(Zt,"TD",{}),s(Dr).forEach(a),Tf=r(Zt),Sr=n(Zt,"TD",{}),s(Sr).forEach(a),Mf=r(Zt),jr=n(Zt,"TD",{}),s(jr).forEach(a),Zt.forEach(a),Ef=r(I),te=n(I,"TR",{});var Dt=s(te);Ks=n(Dt,"TD",{});var Z_=s(Ks);xa=n(Z_,"A",{href:!0,rel:!0});var D_=s(xa);Jf=d(D_,"Adapter/t2iadapter, subfolder=\u2018sketch_sdxl_1.0\u2019"),D_.forEach(a),Z_.forEach(a),Uf=r(Dt),Gr=n(Dt,"TD",{}),s(Gr).forEach(a),Af=r(Dt),Pr=n(Dt,"TD",{}),s(Pr).forEach(a),If=r(Dt),Cr=n(Dt,"TD",{}),s(Cr).forEach(a),Dt.forEach(a),$f=r(I),ae=n(I,"TR",{});var St=s(ae);ei=n(St,"TD",{});var S_=s(ei);ka=n(S_,"A",{href:!0,rel:!0});var j_=s(ka);xf=d(j_,"Adapter/t2iadapter, subfolder=\u2018canny_sdxl_1.0\u2019"),j_.forEach(a),S_.forEach(a),kf=r(St),Rr=n(St,"TD",{}),s(Rr).forEach(a),Zf=r(St),Xr=n(St,"TD",{}),s(Xr).forEach(a),Df=r(St),Wr=n(St,"TD",{}),s(Wr).forEach(a),St.forEach(a),Sf=r(I),oe=n(I,"TR",{});var jt=s(oe);ti=n(jt,"TD",{});var G_=s(ti);Za=n(G_,"A",{href:!0,rel:!0});var P_=s(Za);jf=d(P_,"Adapter/t2iadapter, subfolder=\u2018openpose_sdxl_1.0\u2019"),P_.forEach(a),G_.forEach(a),Gf=r(jt),Nr=n(jt,"TD",{}),s(Nr).forEach(a),Pf=r(jt),Br=n(jt,"TD",{}),s(Br).forEach(a),Cf=r(jt),Fr=n(jt,"TD",{}),s(Fr).forEach(a),jt.forEach(a),I.forEach(a),Jl.forEach(a),Lr=r(t),ge=n(t,"H2",{class:!0});var kl=s(ge);Le=n(kl,"A",{id:!0,class:!0,href:!0});var C_=s(Le);ai=n(C_,"SPAN",{});var R_=s(ai);v(Da.$$.fragment,R_),R_.forEach(a),C_.forEach(a),Rf=r(kl),oi=n(kl,"SPAN",{});var X_=s(oi);Xf=d(X_,"Combining multiple adapters"),X_.forEach(a),kl.forEach(a),Vr=r(t),Sa=n(t,"P",{});var Qh=s(Sa);ni=n(Qh,"CODE",{});var W_=s(ni);Wf=d(W_,"MultiAdapter"),W_.forEach(a),Nf=d(Qh," can be used for applying multiple conditionings at once."),Qh.forEach(a),Qr=r(t),Jn=n(t,"P",{});var N_=s(Jn);Bf=d(N_,"Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),N_.forEach(a),Yr=r(t),v(ja.$$.fragment,t),zr=r(t),Un=n(t,"P",{});var B_=s(Un);Ff=d(B_,"The two control images look as such:"),B_.forEach(a),Hr=r(t),Ve=n(t,"P",{});var Zl=s(Ve);An=n(Zl,"IMG",{src:!0,alt:!0}),Lf=r(Zl),In=n(Zl,"IMG",{src:!0,alt:!0}),Zl.forEach(a),qr=r(t),Ga=n(t,"P",{});var Yh=s(Ga);si=n(Yh,"CODE",{});var F_=s(si);Vf=d(F_,"MultiAdapter"),F_.forEach(a),Qf=d(Yh," combines keypose and depth adapters."),Yh.forEach(a),Or=r(t),Pa=n(t,"P",{});var zh=s(Pa);ii=n(zh,"CODE",{});var L_=s(ii);Yf=d(L_,"adapter_conditioning_scale"),L_.forEach(a),zf=d(zh," balances the relative influence of the different adapters."),zh.forEach(a),Kr=r(t),v(Ca.$$.fragment,t),el=r(t),$n=n(t,"P",{});var V_=s($n);xn=n(V_,"IMG",{src:!0,alt:!0}),V_.forEach(a),tl=r(t),_e=n(t,"H2",{class:!0});var Dl=s(_e);Qe=n(Dl,"A",{id:!0,class:!0,href:!0});var Q_=s(Qe);ri=n(Q_,"SPAN",{});var Y_=s(ri);v(Ra.$$.fragment,Y_),Y_.forEach(a),Q_.forEach(a),Hf=r(Dl),li=n(Dl,"SPAN",{});var z_=s(li);qf=d(z_,"T2I Adapter vs ControlNet"),z_.forEach(a),Dl.forEach(a),al=r(t),Ye=n(t,"P",{});var Sl=s(Ye);Of=d(Sl,"T2I-Adapter is similar to "),Xa=n(Sl,"A",{href:!0,rel:!0});var H_=s(Xa);Kf=d(H_,"ControlNet"),H_.forEach(a),em=d(Sl,`.
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.`),Sl.forEach(a),ol=r(t),be=n(t,"H2",{class:!0});var jl=s(be);ze=n(jl,"A",{id:!0,class:!0,href:!0});var q_=s(ze);pi=n(q_,"SPAN",{});var O_=s(pi);v(Wa.$$.fragment,O_),O_.forEach(a),q_.forEach(a),tm=r(jl),di=n(jl,"SPAN",{});var K_=s(di);am=d(K_,"StableDiffusionAdapterPipeline"),K_.forEach(a),jl.forEach(a),nl=r(t),$=n(t,"DIV",{class:!0});var Z=s($);v(Na.$$.fragment,Z),om=r(Z),kn=n(Z,"P",{});var Hh=s(kn);nm=d(Hh,`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),Ba=n(Hh,"A",{href:!0,rel:!0});var eb=s(Ba);sm=d(eb,"https://arxiv.org/abs/2302.08453"),eb.forEach(a),Hh.forEach(a),im=r(Z),Fa=n(Z,"P",{});var Gl=s(Fa);rm=d(Gl,"This model inherits from "),Zn=n(Gl,"A",{href:!0});var tb=s(Zn);lm=d(tb,"DiffusionPipeline"),tb.forEach(a),pm=d(Gl,`. 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.)`),Gl.forEach(a),dm=r(Z),se=n(Z,"DIV",{class:!0});var Rn=s(se);v(La.$$.fragment,Rn),cm=r(Rn),ci=n(Rn,"P",{});var ab=s(ci);fm=d(ab,"Function invoked when calling the pipeline for generation."),ab.forEach(a),mm=r(Rn),v(He.$$.fragment,Rn),Rn.forEach(a),hm=r(Z),G=n(Z,"DIV",{class:!0});var Gt=s(G);v(Va.$$.fragment,Gt),um=r(Gt),fi=n(Gt,"P",{});var ob=s(fi);gm=d(ob,`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.`),ob.forEach(a),_m=r(Gt),v(qe.$$.fragment,Gt),bm=r(Gt),v(Oe.$$.fragment,Gt),Gt.forEach(a),vm=r(Z),Ke=n(Z,"DIV",{class:!0});var Pl=s(Ke);v(Qa.$$.fragment,Pl),ym=r(Pl),Ya=n(Pl,"P",{});var Cl=s(Ya);wm=d(Cl,"Disable sliced attention computation. If "),mi=n(Cl,"CODE",{});var nb=s(mi);Tm=d(nb,"enable_attention_slicing"),nb.forEach(a),Mm=d(Cl,` was previously called, attention is
computed in one step.`),Cl.forEach(a),Pl.forEach(a),Em=r(Z),et=n(Z,"DIV",{class:!0});var Rl=s(et);v(za.$$.fragment,Rl),Jm=r(Rl),hi=n(Rl,"P",{});var sb=s(hi);Um=d(sb,`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.`),sb.forEach(a),Rl.forEach(a),Am=r(Z),tt=n(Z,"DIV",{class:!0});var Xl=s(tt);v(Ha.$$.fragment,Xl),Im=r(Xl),qa=n(Xl,"P",{});var Wl=s(qa);$m=d(Wl,"Disable sliced VAE decoding. If "),ui=n(Wl,"CODE",{});var ib=s(ui);xm=d(ib,"enable_vae_slicing"),ib.forEach(a),km=d(Wl,` was previously enabled, this method will go back to
computing decoding in one step.`),Wl.forEach(a),Xl.forEach(a),Zm=r(Z),P=n(Z,"DIV",{class:!0});var Pt=s(P);v(Oa.$$.fragment,Pt),Dm=r(Pt),Ka=n(Pt,"P",{});var Nl=s(Ka);Sm=d(Nl,"Enable memory efficient attention from "),eo=n(Nl,"A",{href:!0,rel:!0});var rb=s(eo);jm=d(rb,"xFormers"),rb.forEach(a),Gm=d(Nl,`. 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.`),Nl.forEach(a),Pm=r(Pt),v(at.$$.fragment,Pt),Cm=r(Pt),v(ot.$$.fragment,Pt),Pt.forEach(a),Rm=r(Z),nt=n(Z,"DIV",{class:!0});var Bl=s(nt);v(to.$$.fragment,Bl),Xm=r(Bl),ao=n(Bl,"P",{});var Fl=s(ao);Wm=d(Fl,"Disable memory efficient attention from "),oo=n(Fl,"A",{href:!0,rel:!0});var lb=s(oo);Nm=d(lb,"xFormers"),lb.forEach(a),Bm=d(Fl,"."),Fl.forEach(a),Bl.forEach(a),Fm=r(Z),st=n(Z,"DIV",{class:!0});var Ll=s(st);v(no.$$.fragment,Ll),Lm=r(Ll),gi=n(Ll,"P",{});var pb=s(gi);Vm=d(pb,"Encodes the prompt into text encoder hidden states."),pb.forEach(a),Ll.forEach(a),Z.forEach(a),sl=r(t),ve=n(t,"H2",{class:!0});var Vl=s(ve);it=n(Vl,"A",{id:!0,class:!0,href:!0});var db=s(it);_i=n(db,"SPAN",{});var cb=s(_i);v(so.$$.fragment,cb),cb.forEach(a),db.forEach(a),Qm=r(Vl),bi=n(Vl,"SPAN",{});var fb=s(bi);Ym=d(fb,"StableDiffusionXLAdapterPipeline"),fb.forEach(a),Vl.forEach(a),il=r(t),A=n(t,"DIV",{class:!0});var x=s(A);v(io.$$.fragment,x),zm=r(x),Dn=n(x,"P",{});var qh=s(Dn);Hm=d(qh,`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),ro=n(qh,"A",{href:!0,rel:!0});var mb=s(ro);qm=d(mb,"https://arxiv.org/abs/2302.08453"),mb.forEach(a),qh.forEach(a),Om=r(x),lo=n(x,"P",{});var Ql=s(lo);Km=d(Ql,"This model inherits from "),Sn=n(Ql,"A",{href:!0});var hb=s(Sn);eh=d(hb,"DiffusionPipeline"),hb.forEach(a),th=d(Ql,`. 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.)`),Ql.forEach(a),ah=r(x),ie=n(x,"DIV",{class:!0});var Xn=s(ie);v(po.$$.fragment,Xn),oh=r(Xn),vi=n(Xn,"P",{});var ub=s(vi);nh=d(ub,"Function invoked when calling the pipeline for generation."),ub.forEach(a),sh=r(Xn),v(rt.$$.fragment,Xn),Xn.forEach(a),ih=r(x),C=n(x,"DIV",{class:!0});var Ct=s(C);v(co.$$.fragment,Ct),rh=r(Ct),yi=n(Ct,"P",{});var gb=s(yi);lh=d(gb,`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.`),gb.forEach(a),ph=r(Ct),v(lt.$$.fragment,Ct),dh=r(Ct),v(pt.$$.fragment,Ct),Ct.forEach(a),ch=r(x),dt=n(x,"DIV",{class:!0});var Yl=s(dt);v(fo.$$.fragment,Yl),fh=r(Yl),mo=n(Yl,"P",{});var zl=s(mo);mh=d(zl,"Disable sliced attention computation. If "),wi=n(zl,"CODE",{});var _b=s(wi);hh=d(_b,"enable_attention_slicing"),_b.forEach(a),uh=d(zl,` was previously called, attention is
computed in one step.`),zl.forEach(a),Yl.forEach(a),gh=r(x),ct=n(x,"DIV",{class:!0});var Hl=s(ct);v(ho.$$.fragment,Hl),_h=r(Hl),Ti=n(Hl,"P",{});var bb=s(Ti);bh=d(bb,`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.`),bb.forEach(a),Hl.forEach(a),vh=r(x),ft=n(x,"DIV",{class:!0});var ql=s(ft);v(uo.$$.fragment,ql),yh=r(ql),go=n(ql,"P",{});var Ol=s(go);wh=d(Ol,"Disable sliced VAE decoding. If "),Mi=n(Ol,"CODE",{});var vb=s(Mi);Th=d(vb,"enable_vae_slicing"),vb.forEach(a),Mh=d(Ol,` was previously enabled, this method will go back to
computing decoding in one step.`),Ol.forEach(a),ql.forEach(a),Eh=r(x),R=n(x,"DIV",{class:!0});var Rt=s(R);v(_o.$$.fragment,Rt),Jh=r(Rt),bo=n(Rt,"P",{});var Kl=s(bo);Uh=d(Kl,"Enable memory efficient attention from "),vo=n(Kl,"A",{href:!0,rel:!0});var yb=s(vo);Ah=d(yb,"xFormers"),yb.forEach(a),Ih=d(Kl,`. 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.`),Kl.forEach(a),$h=r(Rt),v(mt.$$.fragment,Rt),xh=r(Rt),v(ht.$$.fragment,Rt),Rt.forEach(a),kh=r(x),ut=n(x,"DIV",{class:!0});var ep=s(ut);v(yo.$$.fragment,ep),Zh=r(ep),wo=n(ep,"P",{});var tp=s(wo);Dh=d(tp,"Disable memory efficient attention from "),To=n(tp,"A",{href:!0,rel:!0});var wb=s(To);Sh=d(wb,"xFormers"),wb.forEach(a),jh=d(tp,"."),tp.forEach(a),ep.forEach(a),Gh=r(x),gt=n(x,"DIV",{class:!0});var ap=s(gt);v(Mo.$$.fragment,ap),Ph=r(ap),Eo=n(ap,"P",{});var op=s(Eo);Ch=d(op,"Disable tiled VAE decoding. If "),Ei=n(op,"CODE",{});var Tb=s(Ei);Rh=d(Tb,"enable_vae_tiling"),Tb.forEach(a),Xh=d(op,` was previously enabled, this method will go back to
computing decoding in one step.`),op.forEach(a),ap.forEach(a),Wh=r(x),_t=n(x,"DIV",{class:!0});var np=s(_t);v(Jo.$$.fragment,np),Nh=r(np),Ji=n(np,"P",{});var Mb=s(Ji);Bh=d(Mb,`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.`),Mb.forEach(a),np.forEach(a),Fh=r(x),bt=n(x,"DIV",{class:!0});var sp=s(bt);v(Uo.$$.fragment,sp),Lh=r(sp),Ui=n(sp,"P",{});var Eb=s(Ui);Vh=d(Eb,"Encodes the prompt into text encoder hidden states."),Eb.forEach(a),sp.forEach(a),x.forEach(a),this.h()},h(){l(h,"name","hf:doc:metadata"),l(h,"content",JSON.stringify(Wb)),l(u,"id","texttoimage-generation-with-adapter-conditioning"),l(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"),l(u,"href","#texttoimage-generation-with-adapter-conditioning"),l(g,"class","relative group"),l(ye,"id","overview"),l(ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ye,"href","#overview"),l(re,"class","relative group"),l(Nt,"href","https://arxiv.org/abs/2302.08453"),l(Nt,"rel","nofollow"),l(Bt,"href","https://github.com/HimariO"),l(Bt,"rel","nofollow"),l(Te,"id","available-pipelines"),l(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Te,"href","#available-pipelines"),l(le,"class","relative group"),l(Zo,"align","center"),l(Vt,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_adapter.py"),l(Vt,"rel","nofollow"),l(Do,"align","center"),l(Qt,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_xl_adapter.py"),l(Qt,"rel","nofollow"),l(So,"align","center"),l(Ee,"id","usage-example-with-the-base-model-of-stablediffusion1415"),l(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"),l(Ee,"href","#usage-example-with-the-base-model-of-stablediffusion1415"),l(fe,"class","relative group"),l(jo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionAdapterPipeline"),l(Ht,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),l(Ht,"rel","nofollow"),D(Po.src,Oh="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png")||l(Po,"src",Oh),l(Po,"alt","img"),D(Wo.src,Kh="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png")||l(Wo,"src",Kh),l(Wo,"alt","img"),D(Lo.src,eu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png")||l(Lo,"src",eu),l(Lo,"alt","img"),l(Ie,"id","usage-example-with-the-base-model-of-stablediffusionxl"),l(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"),l(Ie,"href","#usage-example-with-the-base-model-of-stablediffusionxl"),l(me,"class","relative group"),l(Vo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionXLAdapterPipeline"),l(oa,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0"),l(oa,"rel","nofollow"),D(Yo.src,tu="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png")||l(Yo,"src",tu),l(Yo,"alt","img"),D(Oo.src,au="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch_output.png")||l(Oo,"src",au),l(Oo,"alt","img"),l(Ze,"id","available-checkpoints"),l(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"),l(Ze,"href","#available-checkpoints"),l(he,"class","relative group"),l(la,"href","https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models"),l(la,"rel","nofollow"),l(Se,"id","t2iadapter-with-stable-diffusion-14"),l(Se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Se,"href","#t2iadapter-with-stable-diffusion-14"),l(ue,"class","relative group"),l(da,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),l(da,"rel","nofollow"),l(Pe,"width","64"),Wn(Pe,"margin","0"),Wn(Pe,"padding","0"),D(Pe.src,ou="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png")||l(Pe,"src",ou),l(Ko,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png"),l(tn,"width","64"),D(tn.src,nu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png")||l(tn,"src",nu),l(en,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png"),l(ca,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd14v1"),l(ca,"rel","nofollow"),l(Re,"width","64"),Wn(Re,"margin","0"),Wn(Re,"padding","0"),D(Re.src,su="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png")||l(Re,"src",su),l(an,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png"),l(nn,"width","64"),D(nn.src,iu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png")||l(nn,"src",iu),l(on,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png"),l(fa,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd14v1"),l(fa,"rel","nofollow"),l(ha,"href","https://github.com/zhuoinoulu/pidinet"),l(ha,"rel","nofollow"),l(We,"width","64"),Wn(We,"margin","0"),Wn(We,"padding","0"),D(We.src,ru="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png")||l(We,"src",ru),l(sn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png"),l(ln,"width","64"),D(ln.src,lu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png")||l(ln,"src",lu),l(rn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png"),l(ua,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd14v1"),l(ua,"rel","nofollow"),l(dn,"width","64"),D(dn.src,pu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||l(dn,"src",pu),l(pn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png"),l(fn,"width","64"),D(fn.src,du="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png")||l(fn,"src",du),l(cn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png"),l(ga,"href","https://huggingface.co/TencentARC/t2iadapter_openpose_sd14v1"),l(ga,"rel","nofollow"),l(ba,"href","https://github.com/CMU-Perceptual-Computing-Lab/openpose"),l(ba,"rel","nofollow"),l(hn,"width","64"),D(hn.src,cu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png")||l(hn,"src",cu),l(mn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png"),l(gn,"width","64"),D(gn.src,fu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png")||l(gn,"src",fu),l(un,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png"),l(va,"href","https://huggingface.co/TencentARC/t2iadapter_keypose_sd14v1"),l(va,"rel","nofollow"),l(wa,"href","https://github.com/open-mmlab/mmpose"),l(wa,"rel","nofollow"),l(bn,"width","64"),D(bn.src,mu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||l(bn,"src",mu),l(_n,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png"),l(yn,"width","64"),D(yn.src,hu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png")||l(yn,"src",hu),l(vn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png"),l(Ma,"href","https://huggingface.co/TencentARC/t2iadapter_seg_sd14v1"),l(Ma,"rel","nofollow"),l(Ja,"href","https://github.com/TencentARC/T2I-Adapter/discussions/25"),l(Ja,"rel","nofollow"),l(Tn,"width","64"),D(Tn.src,uu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png")||l(Tn,"src",uu),l(wn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png"),l(En,"width","64"),D(En.src,gu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png")||l(En,"src",gu),l(Mn,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png"),l(Ua,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd15v2"),l(Ua,"rel","nofollow"),l(Aa,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd15v2"),l(Aa,"rel","nofollow"),l(Ia,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd15v2"),l(Ia,"rel","nofollow"),l($a,"href","https://huggingface.co/TencentARC/t2iadapter_zoedepth_sd15v1"),l($a,"rel","nofollow"),l(xa,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0"),l(xa,"rel","nofollow"),l(ka,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/canny_sdxl_1.0"),l(ka,"rel","nofollow"),l(Za,"href","https://huggingface.co/Adapter/t2iadapter/tree/main/openpose_sdxl_1.0"),l(Za,"rel","nofollow"),l(Le,"id","combining-multiple-adapters"),l(Le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Le,"href","#combining-multiple-adapters"),l(ge,"class","relative group"),D(An.src,_u="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||l(An,"src",_u),l(An,"alt","img"),D(In.src,bu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||l(In,"src",bu),l(In,"alt","img"),D(xn.src,vu="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png")||l(xn,"src",vu),l(xn,"alt","img"),l(Qe,"id","t2i-adapter-vs-controlnet"),l(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"),l(Qe,"href","#t2i-adapter-vs-controlnet"),l(_e,"class","relative group"),l(Xa,"href","https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet"),l(Xa,"rel","nofollow"),l(ze,"id","diffusers.StableDiffusionAdapterPipeline"),l(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"),l(ze,"href","#diffusers.StableDiffusionAdapterPipeline"),l(be,"class","relative group"),l(Ba,"href","https://arxiv.org/abs/2302.08453"),l(Ba,"rel","nofollow"),l(Zn,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),l(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(eo,"href","https://facebookresearch.github.io/xformers/"),l(eo,"rel","nofollow"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(oo,"href","https://facebookresearch.github.io/xformers/"),l(oo,"rel","nofollow"),l(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(it,"id","diffusers.StableDiffusionXLAdapterPipeline"),l(it,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(it,"href","#diffusers.StableDiffusionXLAdapterPipeline"),l(ve,"class","relative group"),l(ro,"href","https://arxiv.org/abs/2302.08453"),l(ro,"rel","nofollow"),l(Sn,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),l(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(vo,"href","https://facebookresearch.github.io/xformers/"),l(vo,"rel","nofollow"),l(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(To,"href","https://facebookresearch.github.io/xformers/"),l(To,"rel","nofollow"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(A,"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,J),y(m,J,null),e(g,_),e(g,X),e(X,rp),f(t,Xi,c),f(t,re,c),e(re,ye),e(ye,Fn),y(Xt,Fn,null),e(re,lp),e(re,Ln),e(Ln,pp),f(t,Wi,c),f(t,Wt,c),e(Wt,Nt),e(Nt,dp),e(Wt,cp),f(t,Ni,c),f(t,$o,c),e($o,fp),f(t,Bi,c),f(t,xo,c),e(xo,mp),f(t,Fi,c),f(t,ko,c),e(ko,Vn),e(Vn,hp),f(t,Li,c),f(t,we,c),e(we,up),e(we,Bt),e(Bt,gp),e(we,_p),f(t,Vi,c),f(t,le,c),e(le,Te),e(Te,Qn),y(Ft,Qn,null),e(le,bp),e(le,Yn),e(Yn,vp),f(t,Qi,c),f(t,Me,c),e(Me,zn),e(zn,pe),e(pe,Hn),e(Hn,yp),e(pe,wp),e(pe,qn),e(qn,Tp),e(pe,Mp),e(pe,Zo),e(Zo,Ep),e(Me,Jp),e(Me,Lt),e(Lt,de),e(de,On),e(On,Vt),e(Vt,Up),e(de,Ap),e(de,Kn),e(Kn,es),e(es,Ip),e(de,$p),e(de,Do),e(Do,xp),e(Lt,kp),e(Lt,ce),e(ce,ts),e(ts,Qt),e(Qt,Zp),e(ce,Dp),e(ce,as),e(as,os),e(os,Sp),e(ce,jp),e(ce,So),e(So,Gp),f(t,Yi,c),f(t,fe,c),e(fe,Ee),e(Ee,ns),y(Yt,ns,null),e(fe,Pp),e(fe,ss),e(ss,Cp),f(t,zi,c),f(t,Je,c),e(Je,Rp),e(Je,is),e(is,Xp),e(Je,Wp),f(t,Hi,c),f(t,Ue,c),e(Ue,zt),e(zt,Np),e(zt,rs),e(rs,Bp),e(zt,Fp),e(Ue,Lp),e(Ue,W),e(W,Vp),e(W,ls),e(ls,Qp),e(W,Yp),e(W,ps),e(ps,zp),e(W,Hp),e(W,jo),e(jo,qp),e(W,Op),f(t,qi,c),f(t,Ae,c),e(Ae,Kp),e(Ae,Ht),e(Ht,ed),e(Ae,td),f(t,Oi,c),y(qt,t,c),f(t,Ki,c),f(t,Go,c),e(Go,Po),f(t,er,c),f(t,Co,c),e(Co,ad),f(t,tr,c),y(Ot,t,c),f(t,ar,c),f(t,Ro,c),e(Ro,od),f(t,or,c),f(t,Xo,c),e(Xo,Wo),f(t,nr,c),f(t,No,c),e(No,nd),f(t,sr,c),y(Kt,t,c),f(t,ir,c),f(t,Bo,c),e(Bo,sd),f(t,rr,c),y(ea,t,c),f(t,lr,c),f(t,Fo,c),e(Fo,Lo),f(t,pr,c),f(t,me,c),e(me,Ie),e(Ie,ds),y(ta,ds,null),e(me,id),e(me,cs),e(cs,rd),f(t,dr,c),f(t,$e,c),e($e,ld),e($e,fs),e(fs,pd),e($e,dd),f(t,cr,c),f(t,xe,c),e(xe,aa),e(aa,cd),e(aa,ms),e(ms,fd),e(aa,md),e(xe,hd),e(xe,N),e(N,ud),e(N,hs),e(hs,gd),e(N,_d),e(N,us),e(us,bd),e(N,vd),e(N,Vo),e(Vo,yd),e(N,wd),f(t,fr,c),f(t,ke,c),e(ke,Td),e(ke,oa),e(oa,Md),e(ke,Ed),f(t,mr,c),y(na,t,c),f(t,hr,c),f(t,Qo,c),e(Qo,Yo),f(t,ur,c),f(t,zo,c),e(zo,Jd),f(t,gr,c),y(sa,t,c),f(t,_r,c),f(t,Ho,c),e(Ho,Ud),f(t,br,c),y(ia,t,c),f(t,vr,c),f(t,qo,c),e(qo,Oo),f(t,yr,c),f(t,he,c),e(he,Ze),e(Ze,gs),y(ra,gs,null),e(he,Ad),e(he,_s),e(_s,Id),f(t,wr,c),f(t,De,c),e(De,$d),e(De,la),e(la,xd),e(De,kd),f(t,Tr,c),f(t,ue,c),e(ue,Se),e(Se,bs),y(pa,bs,null),e(ue,Zd),e(ue,vs),e(vs,Dd),f(t,Mr,c),f(t,je,c),e(je,ys),e(ys,B),e(B,ws),e(ws,Sd),e(B,jd),e(B,Ts),e(Ts,Gd),e(B,Pd),e(B,Ms),e(Ms,Cd),e(B,Rd),e(B,Es),e(Es,Xd),e(je,Wd),e(je,U),e(U,F),e(F,Ge),e(Ge,da),e(da,Nd),e(Ge,Bd),e(Ge,Fd),e(Ge,Js),e(Js,Ld),e(F,Vd),e(F,Us),e(Us,Qd),e(F,Yd),e(F,As),e(As,Ko),e(Ko,Pe),e(F,zd),e(F,Is),e(Is,en),e(en,tn),e(U,Hd),e(U,L),e(L,Ce),e(Ce,ca),e(ca,qd),e(Ce,Od),e(Ce,Kd),e(Ce,$s),e($s,ec),e(L,tc),e(L,xs),e(xs,ac),e(L,oc),e(L,ks),e(ks,an),e(an,Re),e(L,nc),e(L,Zs),e(Zs,on),e(on,nn),e(U,sc),e(U,V),e(V,Xe),e(Xe,fa),e(fa,ic),e(Xe,rc),e(Xe,lc),e(Xe,ma),e(ma,pc),e(ma,ha),e(ha,dc),e(ma,cc),e(V,fc),e(V,Ds),e(Ds,mc),e(V,hc),e(V,Ss),e(Ss,sn),e(sn,We),e(V,uc),e(V,js),e(js,rn),e(rn,ln),e(U,gc),e(U,Q),e(Q,Ne),e(Ne,ua),e(ua,_c),e(Ne,bc),e(Ne,vc),e(Ne,Gs),e(Gs,yc),e(Q,wc),e(Q,Ps),e(Ps,Tc),e(Q,Mc),e(Q,Cs),e(Cs,pn),e(pn,dn),e(Q,Ec),e(Q,Rs),e(Rs,cn),e(cn,fn),e(U,Jc),e(U,Y),e(Y,Be),e(Be,ga),e(ga,Uc),e(Be,Ac),e(Be,Ic),e(Be,Xs),e(Xs,$c),e(Y,xc),e(Y,_a),e(_a,kc),e(_a,ba),e(ba,Zc),e(_a,Dc),e(Y,Sc),e(Y,Ws),e(Ws,mn),e(mn,hn),e(Y,jc),e(Y,Ns),e(Ns,un),e(un,gn),e(U,Gc),e(U,z),e(z,Fe),e(Fe,va),e(va,Pc),e(Fe,Cc),e(Fe,Rc),e(Fe,Bs),e(Bs,Xc),e(z,Wc),e(z,ya),e(ya,Nc),e(ya,wa),e(wa,Bc),e(ya,Fc),e(z,Lc),e(z,Fs),e(Fs,_n),e(_n,bn),e(z,Vc),e(z,Ls),e(Ls,vn),e(vn,yn),e(U,Qc),e(U,H),e(H,Ta),e(Ta,Ma),e(Ma,Yc),e(Ta,zc),e(Ta,Vs),e(Vs,Hc),e(H,qc),e(H,Ea),e(Ea,Oc),e(Ea,Ja),e(Ja,Kc),e(Ea,ef),e(H,tf),e(H,Qs),e(Qs,wn),e(wn,Tn),e(H,af),e(H,Ys),e(Ys,Mn),e(Mn,En),e(U,of),e(U,q),e(q,zs),e(zs,Ua),e(Ua,nf),e(q,sf),e(q,Er),e(q,rf),e(q,Jr),e(q,lf),e(q,Ur),e(U,pf),e(U,O),e(O,Hs),e(Hs,Aa),e(Aa,df),e(O,cf),e(O,Ar),e(O,ff),e(O,Ir),e(O,mf),e(O,$r),e(U,hf),e(U,K),e(K,qs),e(qs,Ia),e(Ia,uf),e(K,gf),e(K,xr),e(K,_f),e(K,kr),e(K,bf),e(K,Zr),e(U,vf),e(U,ee),e(ee,Os),e(Os,$a),e($a,yf),e(ee,wf),e(ee,Dr),e(ee,Tf),e(ee,Sr),e(ee,Mf),e(ee,jr),e(U,Ef),e(U,te),e(te,Ks),e(Ks,xa),e(xa,Jf),e(te,Uf),e(te,Gr),e(te,Af),e(te,Pr),e(te,If),e(te,Cr),e(U,$f),e(U,ae),e(ae,ei),e(ei,ka),e(ka,xf),e(ae,kf),e(ae,Rr),e(ae,Zf),e(ae,Xr),e(ae,Df),e(ae,Wr),e(U,Sf),e(U,oe),e(oe,ti),e(ti,Za),e(Za,jf),e(oe,Gf),e(oe,Nr),e(oe,Pf),e(oe,Br),e(oe,Cf),e(oe,Fr),f(t,Lr,c),f(t,ge,c),e(ge,Le),e(Le,ai),y(Da,ai,null),e(ge,Rf),e(ge,oi),e(oi,Xf),f(t,Vr,c),f(t,Sa,c),e(Sa,ni),e(ni,Wf),e(Sa,Nf),f(t,Qr,c),f(t,Jn,c),e(Jn,Bf),f(t,Yr,c),y(ja,t,c),f(t,zr,c),f(t,Un,c),e(Un,Ff),f(t,Hr,c),f(t,Ve,c),e(Ve,An),e(Ve,Lf),e(Ve,In),f(t,qr,c),f(t,Ga,c),e(Ga,si),e(si,Vf),e(Ga,Qf),f(t,Or,c),f(t,Pa,c),e(Pa,ii),e(ii,Yf),e(Pa,zf),f(t,Kr,c),y(Ca,t,c),f(t,el,c),f(t,$n,c),e($n,xn),f(t,tl,c),f(t,_e,c),e(_e,Qe),e(Qe,ri),y(Ra,ri,null),e(_e,Hf),e(_e,li),e(li,qf),f(t,al,c),f(t,Ye,c),e(Ye,Of),e(Ye,Xa),e(Xa,Kf),e(Ye,em),f(t,ol,c),f(t,be,c),e(be,ze),e(ze,pi),y(Wa,pi,null),e(be,tm),e(be,di),e(di,am),f(t,nl,c),f(t,$,c),y(Na,$,null),e($,om),e($,kn),e(kn,nm),e(kn,Ba),e(Ba,sm),e($,im),e($,Fa),e(Fa,rm),e(Fa,Zn),e(Zn,lm),e(Fa,pm),e($,dm),e($,se),y(La,se,null),e(se,cm),e(se,ci),e(ci,fm),e(se,mm),y(He,se,null),e($,hm),e($,G),y(Va,G,null),e(G,um),e(G,fi),e(fi,gm),e(G,_m),y(qe,G,null),e(G,bm),y(Oe,G,null),e($,vm),e($,Ke),y(Qa,Ke,null),e(Ke,ym),e(Ke,Ya),e(Ya,wm),e(Ya,mi),e(mi,Tm),e(Ya,Mm),e($,Em),e($,et),y(za,et,null),e(et,Jm),e(et,hi),e(hi,Um),e($,Am),e($,tt),y(Ha,tt,null),e(tt,Im),e(tt,qa),e(qa,$m),e(qa,ui),e(ui,xm),e(qa,km),e($,Zm),e($,P),y(Oa,P,null),e(P,Dm),e(P,Ka),e(Ka,Sm),e(Ka,eo),e(eo,jm),e(Ka,Gm),e(P,Pm),y(at,P,null),e(P,Cm),y(ot,P,null),e($,Rm),e($,nt),y(to,nt,null),e(nt,Xm),e(nt,ao),e(ao,Wm),e(ao,oo),e(oo,Nm),e(ao,Bm),e($,Fm),e($,st),y(no,st,null),e(st,Lm),e(st,gi),e(gi,Vm),f(t,sl,c),f(t,ve,c),e(ve,it),e(it,_i),y(so,_i,null),e(ve,Qm),e(ve,bi),e(bi,Ym),f(t,il,c),f(t,A,c),y(io,A,null),e(A,zm),e(A,Dn),e(Dn,Hm),e(Dn,ro),e(ro,qm),e(A,Om),e(A,lo),e(lo,Km),e(lo,Sn),e(Sn,eh),e(lo,th),e(A,ah),e(A,ie),y(po,ie,null),e(ie,oh),e(ie,vi),e(vi,nh),e(ie,sh),y(rt,ie,null),e(A,ih),e(A,C),y(co,C,null),e(C,rh),e(C,yi),e(yi,lh),e(C,ph),y(lt,C,null),e(C,dh),y(pt,C,null),e(A,ch),e(A,dt),y(fo,dt,null),e(dt,fh),e(dt,mo),e(mo,mh),e(mo,wi),e(wi,hh),e(mo,uh),e(A,gh),e(A,ct),y(ho,ct,null),e(ct,_h),e(ct,Ti),e(Ti,bh),e(A,vh),e(A,ft),y(uo,ft,null),e(ft,yh),e(ft,go),e(go,wh),e(go,Mi),e(Mi,Th),e(go,Mh),e(A,Eh),e(A,R),y(_o,R,null),e(R,Jh),e(R,bo),e(bo,Uh),e(bo,vo),e(vo,Ah),e(bo,Ih),e(R,$h),y(mt,R,null),e(R,xh),y(ht,R,null),e(A,kh),e(A,ut),y(yo,ut,null),e(ut,Zh),e(ut,wo),e(wo,Dh),e(wo,To),e(To,Sh),e(wo,jh),e(A,Gh),e(A,gt),y(Mo,gt,null),e(gt,Ph),e(gt,Eo),e(Eo,Ch),e(Eo,Ei),e(Ei,Rh),e(Eo,Xh),e(A,Wh),e(A,_t),y(Jo,_t,null),e(_t,Nh),e(_t,Ji),e(Ji,Bh),e(A,Fh),e(A,bt),y(Uo,bt,null),e(bt,Lh),e(bt,Ui),e(Ui,Vh),rl=!0},p(t,[c]){const Ao={};c&2&&(Ao.$$scope={dirty:c,ctx:t}),He.$set(Ao);const Ai={};c&2&&(Ai.$$scope={dirty:c,ctx:t}),qe.$set(Ai);const Ii={};c&2&&(Ii.$$scope={dirty:c,ctx:t}),Oe.$set(Ii);const $i={};c&2&&($i.$$scope={dirty:c,ctx:t}),at.$set($i);const Io={};c&2&&(Io.$$scope={dirty:c,ctx:t}),ot.$set(Io);const xi={};c&2&&(xi.$$scope={dirty:c,ctx:t}),rt.$set(xi);const ki={};c&2&&(ki.$$scope={dirty:c,ctx:t}),lt.$set(ki);const Zi={};c&2&&(Zi.$$scope={dirty:c,ctx:t}),pt.$set(Zi);const jn={};c&2&&(jn.$$scope={dirty:c,ctx:t}),mt.$set(jn);const Di={};c&2&&(Di.$$scope={dirty:c,ctx:t}),ht.$set(Di)},i(t){rl||(w(m.$$.fragment,t),w(Xt.$$.fragment,t),w(Ft.$$.fragment,t),w(Yt.$$.fragment,t),w(qt.$$.fragment,t),w(Ot.$$.fragment,t),w(Kt.$$.fragment,t),w(ea.$$.fragment,t),w(ta.$$.fragment,t),w(na.$$.fragment,t),w(sa.$$.fragment,t),w(ia.$$.fragment,t),w(ra.$$.fragment,t),w(pa.$$.fragment,t),w(Da.$$.fragment,t),w(ja.$$.fragment,t),w(Ca.$$.fragment,t),w(Ra.$$.fragment,t),w(Wa.$$.fragment,t),w(Na.$$.fragment,t),w(La.$$.fragment,t),w(He.$$.fragment,t),w(Va.$$.fragment,t),w(qe.$$.fragment,t),w(Oe.$$.fragment,t),w(Qa.$$.fragment,t),w(za.$$.fragment,t),w(Ha.$$.fragment,t),w(Oa.$$.fragment,t),w(at.$$.fragment,t),w(ot.$$.fragment,t),w(to.$$.fragment,t),w(no.$$.fragment,t),w(so.$$.fragment,t),w(io.$$.fragment,t),w(po.$$.fragment,t),w(rt.$$.fragment,t),w(co.$$.fragment,t),w(lt.$$.fragment,t),w(pt.$$.fragment,t),w(fo.$$.fragment,t),w(ho.$$.fragment,t),w(uo.$$.fragment,t),w(_o.$$.fragment,t),w(mt.$$.fragment,t),w(ht.$$.fragment,t),w(yo.$$.fragment,t),w(Mo.$$.fragment,t),w(Jo.$$.fragment,t),w(Uo.$$.fragment,t),rl=!0)},o(t){T(m.$$.fragment,t),T(Xt.$$.fragment,t),T(Ft.$$.fragment,t),T(Yt.$$.fragment,t),T(qt.$$.fragment,t),T(Ot.$$.fragment,t),T(Kt.$$.fragment,t),T(ea.$$.fragment,t),T(ta.$$.fragment,t),T(na.$$.fragment,t),T(sa.$$.fragment,t),T(ia.$$.fragment,t),T(ra.$$.fragment,t),T(pa.$$.fragment,t),T(Da.$$.fragment,t),T(ja.$$.fragment,t),T(Ca.$$.fragment,t),T(Ra.$$.fragment,t),T(Wa.$$.fragment,t),T(Na.$$.fragment,t),T(La.$$.fragment,t),T(He.$$.fragment,t),T(Va.$$.fragment,t),T(qe.$$.fragment,t),T(Oe.$$.fragment,t),T(Qa.$$.fragment,t),T(za.$$.fragment,t),T(Ha.$$.fragment,t),T(Oa.$$.fragment,t),T(at.$$.fragment,t),T(ot.$$.fragment,t),T(to.$$.fragment,t),T(no.$$.fragment,t),T(so.$$.fragment,t),T(io.$$.fragment,t),T(po.$$.fragment,t),T(rt.$$.fragment,t),T(co.$$.fragment,t),T(lt.$$.fragment,t),T(pt.$$.fragment,t),T(fo.$$.fragment,t),T(ho.$$.fragment,t),T(uo.$$.fragment,t),T(_o.$$.fragment,t),T(mt.$$.fragment,t),T(ht.$$.fragment,t),T(yo.$$.fragment,t),T(Mo.$$.fragment,t),T(Jo.$$.fragment,t),T(Uo.$$.fragment,t),rl=!1},d(t){a(h),t&&a(E),t&&a(g),M(m),t&&a(Xi),t&&a(re),M(Xt),t&&a(Wi),t&&a(Wt),t&&a(Ni),t&&a($o),t&&a(Bi),t&&a(xo),t&&a(Fi),t&&a(ko),t&&a(Li),t&&a(we),t&&a(Vi),t&&a(le),M(Ft),t&&a(Qi),t&&a(Me),t&&a(Yi),t&&a(fe),M(Yt),t&&a(zi),t&&a(Je),t&&a(Hi),t&&a(Ue),t&&a(qi),t&&a(Ae),t&&a(Oi),M(qt,t),t&&a(Ki),t&&a(Go),t&&a(er),t&&a(Co),t&&a(tr),M(Ot,t),t&&a(ar),t&&a(Ro),t&&a(or),t&&a(Xo),t&&a(nr),t&&a(No),t&&a(sr),M(Kt,t),t&&a(ir),t&&a(Bo),t&&a(rr),M(ea,t),t&&a(lr),t&&a(Fo),t&&a(pr),t&&a(me),M(ta),t&&a(dr),t&&a($e),t&&a(cr),t&&a(xe),t&&a(fr),t&&a(ke),t&&a(mr),M(na,t),t&&a(hr),t&&a(Qo),t&&a(ur),t&&a(zo),t&&a(gr),M(sa,t),t&&a(_r),t&&a(Ho),t&&a(br),M(ia,t),t&&a(vr),t&&a(qo),t&&a(yr),t&&a(he),M(ra),t&&a(wr),t&&a(De),t&&a(Tr),t&&a(ue),M(pa),t&&a(Mr),t&&a(je),t&&a(Lr),t&&a(ge),M(Da),t&&a(Vr),t&&a(Sa),t&&a(Qr),t&&a(Jn),t&&a(Yr),M(ja,t),t&&a(zr),t&&a(Un),t&&a(Hr),t&&a(Ve),t&&a(qr),t&&a(Ga),t&&a(Or),t&&a(Pa),t&&a(Kr),M(Ca,t),t&&a(el),t&&a($n),t&&a(tl),t&&a(_e),M(Ra),t&&a(al),t&&a(Ye),t&&a(ol),t&&a(be),M(Wa),t&&a(nl),t&&a($),M(Na),M(La),M(He),M(Va),M(qe),M(Oe),M(Qa),M(za),M(Ha),M(Oa),M(at),M(ot),M(to),M(no),t&&a(sl),t&&a(ve),M(so),t&&a(il),t&&a(A),M(io),M(po),M(rt),M(co),M(lt),M(pt),M(fo),M(ho),M(uo),M(_o),M(mt),M(ht),M(yo),M(Mo),M(Jo),M(Uo)}}}const Wb={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 Nb(k){return $b(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zb extends Jb{constructor(h){super();Ub(this,h,Nb,Xb,Ab,{})}}export{zb as default,Wb as metadata};
