import{s as vo,o as wo,n as N}from"../chunks/scheduler.182ea377.js";import{S as Mo,i as To,g as l,s as a,r as f,A as xo,h as r,f as t,c as s,j as J,u as m,x as c,k as C,y as i,a as o,v as g,d as u,t as h,w as _}from"../chunks/index.abf12888.js";import{T as Ea}from"../chunks/Tip.230e2334.js";import{D as j}from"../chunks/Docstring.93f6f462.js";import{C as I}from"../chunks/CodeBlock.57fe6e13.js";import{E as In}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as R}from"../chunks/Heading.16916d63.js";function Uo(k){let p,T="Examples:",y,b,w;return b=new I({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>]`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function $o(k){let p,T=`⚠️ Don’t enable attention slicing if you’re already using <code>scaled_dot_product_attention</code> (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won’t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`;return{c(){p=l("p"),p.innerHTML=T},l(y){p=r(y,"P",{"data-svelte-h":!0}),c(p)!=="svelte-ackzsn"&&(p.innerHTML=T)},m(y,b){o(y,p,b)},p:N,d(y){y&&t(p)}}}function Jo(k){let p,T="Examples:",y,b,w;return b=new I({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>]`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function Co(k){let p,T=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){p=l("p"),p.textContent=T},l(y){p=r(y,"P",{"data-svelte-h":!0}),c(p)!=="svelte-17p1lpg"&&(p.textContent=T)},m(y,b){o(y,p,b)},p:N,d(y){y&&t(p)}}}function jo(k){let p,T="Examples:",y,b,w;return b=new I({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>)`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function ko(k){let p,T="Examples:",y,b,w;return b=new I({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>]`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function Io(k){let p,T=`⚠️ Don’t enable attention slicing if you’re already using <code>scaled_dot_product_attention</code> (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won’t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`;return{c(){p=l("p"),p.innerHTML=T},l(y){p=r(y,"P",{"data-svelte-h":!0}),c(p)!=="svelte-ackzsn"&&(p.innerHTML=T)},m(y,b){o(y,p,b)},p:N,d(y){y&&t(p)}}}function Zo(k){let p,T="Examples:",y,b,w;return b=new I({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>]`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function Ao(k){let p,T=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){p=l("p"),p.textContent=T},l(y){p=r(y,"P",{"data-svelte-h":!0}),c(p)!=="svelte-17p1lpg"&&(p.textContent=T)},m(y,b){o(y,p,b)},p:N,d(y){y&&t(p)}}}function So(k){let p,T="Examples:",y,b,w;return b=new I({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>)`,wrap:!1}}),{c(){p=l("p"),p.textContent=T,y=a(),f(b.$$.fragment)},l(d){p=r(d,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=T),y=s(d),m(b.$$.fragment,d)},m(d,U){o(d,p,U),o(d,y,U),g(b,d,U),w=!0},p:N,i(d){w||(u(b.$$.fragment,d),w=!0)},o(d){h(b.$$.fragment,d),w=!1},d(d){d&&(t(p),t(y)),_(b,d)}}}function Do(k){let p,T,y,b,w,d,U,An,we,oi='<a href="https://arxiv.org/abs/2302.08453" rel="nofollow">T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models</a> by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie.',Sn,Me,li="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.",Dn,Te,ri="The abstract of the paper is the following:",Gn,xe,di="<em>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 controlling (e.g., color and structure) is needed. In this paper, we aim to “dig out” 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 lightweight 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, achieving rich control and editing effects in the color and structure of the generation results. 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.</em>",Ln,Ue,pi='This model was contributed by the community contributor <a href="https://github.com/HimariO" rel="nofollow">HimariO</a> ❤️ .',Pn,$e,Xn,Je,ci='<thead><tr><th>Pipeline</th> <th>Tasks</th> <th align="center">Demo</th></tr></thead> <tbody><tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py" rel="nofollow">StableDiffusionAdapterPipeline</a></td> <td><em>Text-to-Image Generation with T2I-Adapter Conditioning</em></td> <td align="center">-</td></tr> <tr><td><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py" rel="nofollow">StableDiffusionXLAdapterPipeline</a></td> <td><em>Text-to-Image Generation with T2I-Adapter Conditioning on StableDiffusion-XL</em></td> <td align="center">-</td></tr></tbody>',Wn,Ce,Rn,je,fi=`In the following we give a simple example of how to use a <em>T2I-Adapter</em> checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`,Bn,ke,mi='<li>Images are first converted into the appropriate <em>control image</em> format.</li> <li>The <em>control image</em> and <em>prompt</em> are passed to the <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionAdapterPipeline">StableDiffusionAdapterPipeline</a>.</li>',Fn,Ie,gi='Let’s have a look at a simple example using the <a href="https://huggingface.co/TencentARC/t2iadapter_color_sd14v1" rel="nofollow">Color Adapter</a>.',Nn,Ze,En,Ae,ui='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png" alt="img"/>',Vn,Se,hi="Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size.",Hn,De,Qn,Ge,_i="Let’s take a look at the processed image.",Yn,Le,bi='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png" alt="img"/>',zn,Pe,yi="Next, create the adapter pipeline",qn,Xe,On,We,vi="Finally, pass the prompt and control image to the pipeline",Kn,Re,ea,Be,wi='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png" alt="img"/>',ta,Fe,na,Ne,Mi=`In the following we give a simple example of how to use a <em>T2I-Adapter</em> checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`,aa,Ee,Ti='<li>Images are first downloaded into the appropriate <em>control image</em> format.</li> <li>The <em>control image</em> and <em>prompt</em> are passed to the <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionXLAdapterPipeline">StableDiffusionXLAdapterPipeline</a>.</li>',sa,Ve,xi='Let’s have a look at a simple example using the <a href="https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0" rel="nofollow">Sketch Adapter</a>.',ia,He,oa,Qe,Ui='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png" alt="img"/>',la,Ye,$i="Then, create the adapter pipeline",ra,ze,da,qe,Ji="Finally, pass the prompt and control image to the pipeline",pa,Oe,ca,Ke,Ci='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch_output.png" alt="img"/>',fa,et,ma,tt,ji='Non-diffusers checkpoints can be found under <a href="https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models" rel="nofollow">TencentARC/T2I-Adapter</a>.',ga,nt,ua,at,ki='<thead><tr><th>Model Name</th> <th>Control Image Overview</th> <th>Control Image Example</th> <th>Generated Image Example</th></tr></thead> <tbody><tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_color_sd14v1" rel="nofollow">TencentARC/t2iadapter_color_sd14v1</a><br/> <em>Trained with spatial color palette</em></td> <td>An image with 8x8 color palette.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png"><img width="64" style="margin:0;padding:0;" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_canny_sd14v1" rel="nofollow">TencentARC/t2iadapter_canny_sd14v1</a><br/> <em>Trained with canny edge detection</em></td> <td>A monochrome image with white edges on a black background.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png"><img width="64" style="margin:0;padding:0;" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_sketch_sd14v1" rel="nofollow">TencentARC/t2iadapter_sketch_sd14v1</a><br/> <em>Trained with <a href="https://github.com/zhuoinoulu/pidinet" rel="nofollow">PidiNet</a> edge detection</em></td> <td>A hand-drawn monochrome image with white outlines on a black background.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png"><img width="64" style="margin:0;padding:0;" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_depth_sd14v1" rel="nofollow">TencentARC/t2iadapter_depth_sd14v1</a><br/> <em>Trained with Midas depth estimation</em></td> <td>A grayscale image with black representing deep areas and white representing shallow areas.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_openpose_sd14v1" rel="nofollow">TencentARC/t2iadapter_openpose_sd14v1</a><br/> <em>Trained with OpenPose bone image</em></td> <td>A <a href="https://github.com/CMU-Perceptual-Computing-Lab/openpose" rel="nofollow">OpenPose bone</a> image.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_keypose_sd14v1" rel="nofollow">TencentARC/t2iadapter_keypose_sd14v1</a><br/> <em>Trained with mmpose skeleton image</em></td> <td>A <a href="https://github.com/open-mmlab/mmpose" rel="nofollow">mmpose skeleton</a> image.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_seg_sd14v1" rel="nofollow">TencentARC/t2iadapter_seg_sd14v1</a><br/><em>Trained with semantic segmentation</em></td> <td>An <a href="https://github.com/TencentARC/T2I-Adapter/discussions/25" rel="nofollow">custom</a> segmentation protocol image.</td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png"/></a></td> <td><a href="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png"><img width="64" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png"/></a></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_canny_sd15v2" rel="nofollow">TencentARC/t2iadapter_canny_sd15v2</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_depth_sd15v2" rel="nofollow">TencentARC/t2iadapter_depth_sd15v2</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_sketch_sd15v2" rel="nofollow">TencentARC/t2iadapter_sketch_sd15v2</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/TencentARC/t2iadapter_zoedepth_sd15v1" rel="nofollow">TencentARC/t2iadapter_zoedepth_sd15v1</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/Adapter/t2iadapter/tree/main/sketch_sdxl_1.0" rel="nofollow">Adapter/t2iadapter, subfolder=‘sketch_sdxl_1.0’</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/Adapter/t2iadapter/tree/main/canny_sdxl_1.0" rel="nofollow">Adapter/t2iadapter, subfolder=‘canny_sdxl_1.0’</a></td> <td></td> <td></td> <td></td></tr> <tr><td><a href="https://huggingface.co/Adapter/t2iadapter/tree/main/openpose_sdxl_1.0" rel="nofollow">Adapter/t2iadapter, subfolder=‘openpose_sdxl_1.0’</a></td> <td></td> <td></td> <td></td></tr></tbody>',ha,st,_a,it,Ii="<code>MultiAdapter</code> can be used for applying multiple conditionings at once.",ba,ot,Zi="Here we use the keypose adapter for the character posture and the depth adapter for creating the scene.",ya,lt,va,rt,Ai="The two control images look as such:",wa,dt,Si='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png" alt="img"/> <img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png" alt="img"/>',Ma,pt,Di="<code>MultiAdapter</code> combines keypose and depth adapters.",Ta,ct,Gi="<code>adapter_conditioning_scale</code> balances the relative influence of the different adapters.",xa,ft,Ua,mt,Li='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png" alt="img"/>',$a,gt,Ja,ut,Pi=`T2I-Adapter is similar to <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet" rel="nofollow">ControlNet</a>.
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.`,Ca,ht,ja,x,_t,Va,Yt,Xi=`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
<a href="https://arxiv.org/abs/2302.08453" rel="nofollow">https://arxiv.org/abs/2302.08453</a>`,Ha,zt,Wi=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.)`,Qa,B,bt,Ya,qt,Ri="Function invoked when calling the pipeline for generation.",za,V,qa,Z,yt,Oa,Ot,Bi=`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.`,Ka,H,es,Q,ts,Y,vt,ns,Kt,Fi=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,as,z,wt,ss,en,Ni=`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.`,is,q,Mt,os,tn,Ei=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,ls,A,Tt,rs,nn,Vi=`Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>. 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.`,ds,O,ps,K,cs,ee,xt,fs,an,Hi='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',ms,te,Ut,gs,sn,Qi="Disables the FreeU mechanism if enabled.",us,S,$t,hs,on,Yi='Enables the FreeU mechanism as in <a href="https://arxiv.org/abs/2309.11497" rel="nofollow">https://arxiv.org/abs/2309.11497</a>.',_s,ln,zi="The suffixes after the scaling factors represent the stages where they are being applied.",bs,rn,qi=`Please refer to the <a href="https://github.com/ChenyangSi/FreeU" rel="nofollow">official repository</a> for combinations of the values
that are known to work well for different pipelines such as Stable Diffusion v1, v2, and Stable Diffusion XL.`,ys,ne,Jt,vs,dn,Oi="Encodes the prompt into text encoder hidden states.",ws,ae,Ct,Ms,pn,Ki='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',ka,jt,Ia,v,kt,Ts,cn,eo=`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
<a href="https://arxiv.org/abs/2302.08453" rel="nofollow">https://arxiv.org/abs/2302.08453</a>`,xs,fn,to=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. 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.)`,Us,mn,no="The pipeline also inherits the following loading methods:",$s,gn,ao='<li><a href="/docs/diffusers/main/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a> for loading textual inversion embeddings</li> <li><a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> for loading <code>.ckpt</code> files</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><code>save_lora_weights()</code> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',Js,F,It,Cs,un,so="Function invoked when calling the pipeline for generation.",js,se,ks,D,Zt,Is,hn,io=`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.`,Zs,ie,As,oe,Ss,le,At,Ds,_n,oo=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,Gs,re,St,Ls,bn,lo=`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.`,Ps,de,Dt,Xs,yn,ro=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Ws,G,Gt,Rs,vn,po=`Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>. 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.`,Bs,pe,Fs,ce,Ns,fe,Lt,Es,wn,co='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Vs,me,Pt,Hs,Mn,fo="Disables the FreeU mechanism if enabled.",Qs,ge,Xt,Ys,Tn,mo=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,zs,L,Wt,qs,xn,go='Enables the FreeU mechanism as in <a href="https://arxiv.org/abs/2309.11497" rel="nofollow">https://arxiv.org/abs/2309.11497</a>.',Os,Un,uo="The suffixes after the scaling factors represent the stages where they are being applied.",Ks,$n,ho=`Please refer to the <a href="https://github.com/ChenyangSi/FreeU" rel="nofollow">official repository</a> for combinations of the values
that are known to work well for different pipelines such as Stable Diffusion v1, v2, and Stable Diffusion XL.`,ei,ue,Rt,ti,Jn,_o=`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.`,ni,he,Bt,ai,Cn,bo="Encodes the prompt into text encoder hidden states.",si,_e,Ft,ii,jn,yo='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Za,Zn,Aa;return w=new R({props:{title:"Text-to-Image Generation with Adapter Conditioning",local:"text-to-image-generation-with-adapter-conditioning",headingTag:"h1"}}),U=new R({props:{title:"Overview",local:"overview",headingTag:"h2"}}),$e=new R({props:{title:"Available Pipelines:",local:"available-pipelines",headingTag:"h2"}}),Ce=new R({props:{title:"Usage example with the base model of StableDiffusion-1.4/1.5",local:"usage-example-with-the-base-model-of-stablediffusion-1415",headingTag:"h2"}}),Ze=new I({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMkMlMjBtYWtlX2ltYWdlX2dyaWQlMEElMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGY29sb3JfcmVmLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, make_image_grid

image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>)`,wrap:!1}}),De=new I({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)`,wrap:!1}}),Xe=new I({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>)`,wrap:!1}}),Re=new I({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoJTIyY3VkYSUyMikubWFudWFsX3NlZWQoNyklMEElMEFvdXRfaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCUyMkF0JTIwbmlnaHQlMkMlMjBnbG93aW5nJTIwY3ViZXMlMjBpbiUyMGZyb250JTIwb2YlMjB0aGUlMjBiZWFjaCUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEY29sb3JfcGFsZXR0ZSUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQW1ha2VfaW1hZ2VfZ3JpZCglNUJpbWFnZSUyQyUyMGNvbG9yX3BhbGV0dGUlMkMlMjBvdXRfaW1hZ2UlNUQlMkMlMjByb3dzJTNEMSUyQyUyMGNvbHMlM0QzKQ==",highlighted:`<span class="hljs-comment"># fix the random seed, so you will get the same result as the example</span>
generator = torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).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>]
make_image_grid([image, color_palette, out_image], rows=<span class="hljs-number">1</span>, cols=<span class="hljs-number">3</span>)`,wrap:!1}}),Fe=new R({props:{title:"Usage example with the base model of StableDiffusion-XL",local:"usage-example-with-the-base-model-of-stablediffusion-xl",headingTag:"h2"}}),He=new I({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMkMlMjBtYWtlX2ltYWdlX2dyaWQlMEElMEFza2V0Y2hfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZBZGFwdGVyJTJGdDJpYWRhcHRlciUyRnJlc29sdmUlMkZtYWluJTJGc2tldGNoLnBuZyUyMikuY29udmVydCglMjJMJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, make_image_grid

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>)`,wrap:!1}}),ze=new I({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwKCUwQSUyMCUyMCUyMCUyMFQySUFkYXB0ZXIlMkMlMEElMjAlMjAlMjAlMjBTdGFibGVEaWZmdXNpb25YTEFkYXB0ZXJQaXBlbGluZSUyQyUwQSUyMCUyMCUyMCUyMEREUE1TY2hlZHVsZXIlMEEpJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMEFhZGFwdGVyJTIwJTNEJTIwVDJJQWRhcHRlci5mcm9tX3ByZXRyYWluZWQoJTIyQWRhcHRlciUyRnQyaWFkYXB0ZXIlMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJza2V0Y2hfc2R4bF8xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjBhZGFwdGVyX3R5cGUlM0QlMjJmdWxsX2FkYXB0ZXJfeGwlMjIpJTBBc2NoZWR1bGVyJTIwJTNEJTIwRERQTVNjaGVkdWxlci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBzdWJmb2xkZXIlM0QlMjJzY2hlZHVsZXIlMjIpJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblhMQWRhcHRlclBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9pZCUyQyUyMGFkYXB0ZXIlM0RhZGFwdGVyJTJDJTIwc2FmZXR5X2NoZWNrZXIlM0ROb25lJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMkMlMjBzY2hlZHVsZXIlM0RzY2hlZHVsZXIlMEEpJTBBJTBBcGlwZS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
    T2IAdapter,
    StableDiffusionXLAdapterPipeline,
    DDPMScheduler
)

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>)`,wrap:!1}}),Oe=new I({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5HZW5lcmF0b3IoKS5tYW51YWxfc2VlZCg0MiklMEElMEFza2V0Y2hfaW1hZ2Vfb3V0JTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0QlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjBpbiUyMHJlYWwlMjB3b3JsZCUyQyUyMGhpZ2glMjBxdWFsaXR5JTIyJTJDJTBBJTIwJTIwJTIwJTIwbmVnYXRpdmVfcHJvbXB0JTNEJTIyZXh0cmElMjBkaWdpdCUyQyUyMGZld2VyJTIwZGlnaXRzJTJDJTIwY3JvcHBlZCUyQyUyMHdvcnN0JTIwcXVhbGl0eSUyQyUyMGxvdyUyMHF1YWxpdHklMjIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZSUzRHNrZXRjaF9pbWFnZSUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENy41JTBBKS5pbWFnZXMlNUIwJTVEJTBBbWFrZV9pbWFnZV9ncmlkKCU1QnNrZXRjaF9pbWFnZSUyQyUyMHNrZXRjaF9pbWFnZV9vdXQlNUQlMkMlMjByb3dzJTNEMSUyQyUyMGNvbHMlM0QyKQ==",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>]
make_image_grid([sketch_image, sketch_image_out], rows=<span class="hljs-number">1</span>, cols=<span class="hljs-number">2</span>)`,wrap:!1}}),et=new R({props:{title:"Available checkpoints",local:"available-checkpoints",headingTag:"h2"}}),nt=new R({props:{title:"T2I-Adapter with Stable Diffusion 1.4",local:"t2i-adapter-with-stable-diffusion-14",headingTag:"h3"}}),st=new R({props:{title:"Combining multiple adapters",local:"combining-multiple-adapters",headingTag:"h2"}}),lt=new I({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMkMlMjBtYWtlX2ltYWdlX2dyaWQlMEElMEFjb25kX2tleXBvc2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmtleXBvc2Vfc2FtcGxlX2lucHV0LnBuZyUyMiUwQSklMEFjb25kX2RlcHRoJTIwJTNEJTIwbG9hZF9pbWFnZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZkaWZmdXNlcnMlMkZkb2NzLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGdDJpLWFkYXB0ZXIlMkZkZXB0aF9zYW1wbGVfaW5wdXQucG5nJTIyJTBBKSUwQWNvbmQlMjAlM0QlMjAlNUJjb25kX2tleXBvc2UlMkMlMjBjb25kX2RlcHRoJTVEJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTVCJTIyQSUyMG1hbiUyMHdhbGtpbmclMjBpbiUyMGFuJTIwb2ZmaWNlJTIwcm9vbSUyMHdpdGglMjBhJTIwbmljZSUyMHZpZXclMjIlNUQ=",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, make_image_grid

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>]`,wrap:!1}}),ft=new I({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQWRhcHRlclBpcGVsaW5lJTJDJTIwTXVsdGlBZGFwdGVyJTJDJTIwVDJJQWRhcHRlciUwQSUwQWFkYXB0ZXJzJTIwJTNEJTIwTXVsdGlBZGFwdGVyKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2tleXBvc2Vfc2QxNHYxJTIyKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2RlcHRoX3NkMTR2MSUyMiklMkMlMEElMjAlMjAlMjAlMjAlNUQlMEEpJTBBYWRhcHRlcnMlMjAlM0QlMjBhZGFwdGVycy50byh0b3JjaC5mbG9hdDE2KSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25BZGFwdGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyJTNEYWRhcHRlcnMlMkMlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMGNvbmQlMkMlMjBhZGFwdGVyX2NvbmRpdGlvbmluZ19zY2FsZSUzRCU1QjAuOCUyQyUyMDAuOCU1RCkuaW1hZ2VzJTVCMCU1RCUwQW1ha2VfaW1hZ2VfZ3JpZCglNUJjb25kX2tleXBvc2UlMkMlMjBjb25kX2RlcHRoJTJDJTIwaW1hZ2UlNUQlMkMlMjByb3dzJTNEMSUyQyUyMGNvbHMlM0QzKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, MultiAdapter, T2IAdapter

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,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

image = pipe(prompt, cond, adapter_conditioning_scale=[<span class="hljs-number">0.8</span>, <span class="hljs-number">0.8</span>]).images[<span class="hljs-number">0</span>]
make_image_grid([cond_keypose, cond_depth, image], rows=<span class="hljs-number">1</span>, cols=<span class="hljs-number">3</span>)`,wrap:!1}}),gt=new R({props:{title:"T2I-Adapter vs ControlNet",local:"t2i-adapter-vs-controlnet",headingTag:"h2"}}),ht=new R({props:{title:"StableDiffusionAdapterPipeline",local:"diffusers.StableDiffusionAdapterPipeline",headingTag:"h2"}}),_t=new j({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:": Union"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionAdapterPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionAdapterPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionAdapterPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionAdapterPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L166"}}),bt=new j({props:{name:"__call__",anchor:"diffusers.StableDiffusionAdapterPipeline.__call__",parameters:[{name:"prompt",val:": Union = None"},{name:"image",val:": Union = None"},{name:"height",val:": Optional = None"},{name:"width",val:": Optional = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": List = None"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": Union = None"},{name:"num_images_per_prompt",val:": Optional = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": Optional = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": Optional = None"},{name:"adapter_conditioning_scale",val:": Union = 1.0"},{name:"clip_skip",val:": Optional = None"}],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__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code>. instead. If not defined, one has to pass <code>negative_prompt_embeds</code>. instead.
Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttnProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.adapter_conditioning_scale",description:`<strong>adapter_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The outputs of the adapter are multiplied by <code>adapter_conditioning_scale</code> before they are added to the
residual in the original unet. If multiple adapters are specified in init, you can set the
corresponding scale as a list.`,name:"adapter_conditioning_scale"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L699",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> or <code>tuple</code></p>
`}}),V=new In({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[Uo]},$$scope:{ctx:k}}}),yt=new j({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": Union = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2052"}}),H=new Ea({props:{warning:!0,$$slots:{default:[$o]},$$scope:{ctx:k}}}),Q=new In({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Jo]},$$scope:{ctx:k}}}),vt=new j({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2092"}}),wt=new j({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L252"}}),Mt=new j({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L260"}}),Tt=new j({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1991"}}),O=new Ea({props:{warning:!0,$$slots:{default:[Co]},$$scope:{ctx:k}}}),K=new In({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[jo]},$$scope:{ctx:k}}}),xt=new j({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2026"}}),Ut=new j({props:{name:"disable_freeu",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_freeu",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L655"}}),$t=new j({props:{name:"enable_freeu",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_freeu",parameters:[{name:"s1",val:": float"},{name:"s2",val:": float"},{name:"b1",val:": float"},{name:"b2",val:": float"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_freeu.s1",description:`<strong>s1</strong> (<code>float</code>) &#x2014;
Scaling factor for stage 1 to attenuate the contributions of the skip features. This is done to
mitigate &#x201C;oversmoothing effect&#x201D; in the enhanced denoising process.`,name:"s1"},{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_freeu.s2",description:`<strong>s2</strong> (<code>float</code>) &#x2014;
Scaling factor for stage 2 to attenuate the contributions of the skip features. This is done to
mitigate &#x201C;oversmoothing effect&#x201D; in the enhanced denoising process.`,name:"s2"},{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_freeu.b1",description:"<strong>b1</strong> (<code>float</code>) &#x2014; Scaling factor for stage 1 to amplify the contributions of backbone features.",name:"b1"},{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_freeu.b2",description:"<strong>b2</strong> (<code>float</code>) &#x2014; Scaling factor for stage 2 to amplify the contributions of backbone features.",name:"b2"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L632"}}),Jt=new j({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:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"lora_scale",val:": Optional = None"},{name:"clip_skip",val:": Optional = 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"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L301"}}),Ct=new j({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:""},{name:"embedding_dim",val:" = 512"},{name:"dtype",val:" = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding.timesteps",description:`<strong>timesteps</strong> (<code>torch.Tensor</code>) &#x2014;
generate embedding vectors at these timesteps`,name:"timesteps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
dimension of the embeddings to generate
dtype &#x2014;
data type of the generated embeddings`,name:"embedding_dim"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L660",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Embedding vectors with shape <code>(len(timesteps), embedding_dim)</code></p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),jt=new R({props:{title:"StableDiffusionXLAdapterPipeline",local:"diffusers.StableDiffusionXLAdapterPipeline",headingTag:"h2"}}),kt=new j({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:": Union"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"force_zeros_for_empty_prompt",val:": bool = True"},{name:"feature_extractor",val:": CLIPImageProcessor = None"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L182"}}),It=new j({props:{name:"__call__",anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__",parameters:[{name:"prompt",val:": Union = None"},{name:"prompt_2",val:": Union = None"},{name:"image",val:": Union = None"},{name:"height",val:": Optional = None"},{name:"width",val:": Optional = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": List = None"},{name:"denoising_end",val:": Optional = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": Union = None"},{name:"negative_prompt_2",val:": Union = None"},{name:"num_images_per_prompt",val:": Optional = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"pooled_prompt_embeds",val:": Optional = None"},{name:"negative_pooled_prompt_embeds",val:": Optional = None"},{name:"ip_adapter_image",val:": Union = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": Optional = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": Optional = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"original_size",val:": Optional = None"},{name:"crops_coords_top_left",val:": Tuple = (0, 0)"},{name:"target_size",val:": Optional = None"},{name:"negative_original_size",val:": Optional = None"},{name:"negative_crops_coords_top_left",val:": Tuple = (0, 0)"},{name:"negative_target_size",val:": Optional = None"},{name:"adapter_conditioning_scale",val:": Union = 1.0"},{name:"adapter_conditioning_factor",val:": float = 1.0"},{name:"clip_skip",val:": Optional = None"}],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__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.denoising_end",description:`<strong>denoising_end</strong> (<code>float</code>, <em>optional</em>) &#x2014;
When specified, determines the fraction (between 0.0 and 1.0) of the total denoising process to be
completed before it is intentionally prematurely terminated. As a result, the returned sample will
still retain a substantial amount of noise as determined by the discrete timesteps selected by the
scheduler. The denoising_end parameter should ideally be utilized when this pipeline forms a part of a
&#x201C;Mixture of Denoisers&#x201D; multi-pipeline setup, as elaborated in <a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_xl#refining-the-image-output" rel="nofollow"><strong>Refining the Image
Output</strong></a>`,name:"denoising_end"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in both text-encoders`,name:"negative_prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.
ip_adapter_image &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.`,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.0) &#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>(height, width)</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>(height, width)</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"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L817",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> or <code>tuple</code></p>
`}}),se=new In({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[ko]},$$scope:{ctx:k}}}),Zt=new j({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": Union = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2052"}}),ie=new Ea({props:{warning:!0,$$slots:{default:[Io]},$$scope:{ctx:k}}}),oe=new In({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Zo]},$$scope:{ctx:k}}}),At=new j({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2092"}}),St=new j({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L274"}}),Dt=new j({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L282"}}),Gt=new j({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": Optional = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1991"}}),pe=new Ea({props:{warning:!0,$$slots:{default:[Ao]},$$scope:{ctx:k}}}),ce=new In({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[So]},$$scope:{ctx:k}}}),Lt=new j({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2026"}}),Pt=new j({props:{name:"disable_freeu",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_freeu",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L773"}}),Xt=new j({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L299"}}),Wt=new j({props:{name:"enable_freeu",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_freeu",parameters:[{name:"s1",val:": float"},{name:"s2",val:": float"},{name:"b1",val:": float"},{name:"b2",val:": float"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_freeu.s1",description:`<strong>s1</strong> (<code>float</code>) &#x2014;
Scaling factor for stage 1 to attenuate the contributions of the skip features. This is done to
mitigate &#x201C;oversmoothing effect&#x201D; in the enhanced denoising process.`,name:"s1"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_freeu.s2",description:`<strong>s2</strong> (<code>float</code>) &#x2014;
Scaling factor for stage 2 to attenuate the contributions of the skip features. This is done to
mitigate &#x201C;oversmoothing effect&#x201D; in the enhanced denoising process.`,name:"s2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_freeu.b1",description:"<strong>b1</strong> (<code>float</code>) &#x2014; Scaling factor for stage 1 to amplify the contributions of backbone features.",name:"b1"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_freeu.b2",description:"<strong>b2</strong> (<code>float</code>) &#x2014; Scaling factor for stage 2 to amplify the contributions of backbone features.",name:"b2"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L750"}}),Rt=new j({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L290"}}),Bt=new j({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt",parameters:[{name:"prompt",val:": str"},{name:"prompt_2",val:": Optional = None"},{name:"device",val:": Optional = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": Optional = None"},{name:"negative_prompt_2",val:": Optional = None"},{name:"prompt_embeds",val:": Optional = None"},{name:"negative_prompt_embeds",val:": Optional = None"},{name:"pooled_prompt_embeds",val:": Optional = None"},{name:"negative_pooled_prompt_embeds",val:": Optional = None"},{name:"lora_scale",val:": Optional = None"},{name:"clip_skip",val:": Optional = 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"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.clip_skip",description:`<strong>clip_skip</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that
the output of the pre-final layer will be used for computing the prompt embeddings.`,name:"clip_skip"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L307"}}),Ft=new j({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:""},{name:"embedding_dim",val:" = 512"},{name:"dtype",val:" = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding.timesteps",description:`<strong>timesteps</strong> (<code>torch.Tensor</code>) &#x2014;
generate embedding vectors at these timesteps`,name:"timesteps"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
dimension of the embeddings to generate
dtype &#x2014;
data type of the generated embeddings`,name:"embedding_dim"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L778",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Embedding vectors with shape <code>(len(timesteps), embedding_dim)</code></p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),{c(){p=l("meta"),T=a(),y=l("p"),b=a(),f(w.$$.fragment),d=a(),f(U.$$.fragment),An=a(),we=l("p"),we.innerHTML=oi,Sn=a(),Me=l("p"),Me.textContent=li,Dn=a(),Te=l("p"),Te.textContent=ri,Gn=a(),xe=l("p"),xe.innerHTML=di,Ln=a(),Ue=l("p"),Ue.innerHTML=pi,Pn=a(),f($e.$$.fragment),Xn=a(),Je=l("table"),Je.innerHTML=ci,Wn=a(),f(Ce.$$.fragment),Rn=a(),je=l("p"),je.innerHTML=fi,Bn=a(),ke=l("ol"),ke.innerHTML=mi,Fn=a(),Ie=l("p"),Ie.innerHTML=gi,Nn=a(),f(Ze.$$.fragment),En=a(),Ae=l("p"),Ae.innerHTML=ui,Vn=a(),Se=l("p"),Se.textContent=hi,Hn=a(),f(De.$$.fragment),Qn=a(),Ge=l("p"),Ge.textContent=_i,Yn=a(),Le=l("p"),Le.innerHTML=bi,zn=a(),Pe=l("p"),Pe.textContent=yi,qn=a(),f(Xe.$$.fragment),On=a(),We=l("p"),We.textContent=vi,Kn=a(),f(Re.$$.fragment),ea=a(),Be=l("p"),Be.innerHTML=wi,ta=a(),f(Fe.$$.fragment),na=a(),Ne=l("p"),Ne.innerHTML=Mi,aa=a(),Ee=l("ol"),Ee.innerHTML=Ti,sa=a(),Ve=l("p"),Ve.innerHTML=xi,ia=a(),f(He.$$.fragment),oa=a(),Qe=l("p"),Qe.innerHTML=Ui,la=a(),Ye=l("p"),Ye.textContent=$i,ra=a(),f(ze.$$.fragment),da=a(),qe=l("p"),qe.textContent=Ji,pa=a(),f(Oe.$$.fragment),ca=a(),Ke=l("p"),Ke.innerHTML=Ci,fa=a(),f(et.$$.fragment),ma=a(),tt=l("p"),tt.innerHTML=ji,ga=a(),f(nt.$$.fragment),ua=a(),at=l("table"),at.innerHTML=ki,ha=a(),f(st.$$.fragment),_a=a(),it=l("p"),it.innerHTML=Ii,ba=a(),ot=l("p"),ot.textContent=Zi,ya=a(),f(lt.$$.fragment),va=a(),rt=l("p"),rt.textContent=Ai,wa=a(),dt=l("p"),dt.innerHTML=Si,Ma=a(),pt=l("p"),pt.innerHTML=Di,Ta=a(),ct=l("p"),ct.innerHTML=Gi,xa=a(),f(ft.$$.fragment),Ua=a(),mt=l("p"),mt.innerHTML=Li,$a=a(),f(gt.$$.fragment),Ja=a(),ut=l("p"),ut.innerHTML=Pi,Ca=a(),f(ht.$$.fragment),ja=a(),x=l("div"),f(_t.$$.fragment),Va=a(),Yt=l("p"),Yt.innerHTML=Xi,Ha=a(),zt=l("p"),zt.innerHTML=Wi,Qa=a(),B=l("div"),f(bt.$$.fragment),Ya=a(),qt=l("p"),qt.textContent=Ri,za=a(),f(V.$$.fragment),qa=a(),Z=l("div"),f(yt.$$.fragment),Oa=a(),Ot=l("p"),Ot.textContent=Bi,Ka=a(),f(H.$$.fragment),es=a(),f(Q.$$.fragment),ts=a(),Y=l("div"),f(vt.$$.fragment),ns=a(),Kt=l("p"),Kt.innerHTML=Fi,as=a(),z=l("div"),f(wt.$$.fragment),ss=a(),en=l("p"),en.textContent=Ni,is=a(),q=l("div"),f(Mt.$$.fragment),os=a(),tn=l("p"),tn.innerHTML=Ei,ls=a(),A=l("div"),f(Tt.$$.fragment),rs=a(),nn=l("p"),nn.innerHTML=Vi,ds=a(),f(O.$$.fragment),ps=a(),f(K.$$.fragment),cs=a(),ee=l("div"),f(xt.$$.fragment),fs=a(),an=l("p"),an.innerHTML=Hi,ms=a(),te=l("div"),f(Ut.$$.fragment),gs=a(),sn=l("p"),sn.textContent=Qi,us=a(),S=l("div"),f($t.$$.fragment),hs=a(),on=l("p"),on.innerHTML=Yi,_s=a(),ln=l("p"),ln.textContent=zi,bs=a(),rn=l("p"),rn.innerHTML=qi,ys=a(),ne=l("div"),f(Jt.$$.fragment),vs=a(),dn=l("p"),dn.textContent=Oi,ws=a(),ae=l("div"),f(Ct.$$.fragment),Ms=a(),pn=l("p"),pn.innerHTML=Ki,ka=a(),f(jt.$$.fragment),Ia=a(),v=l("div"),f(kt.$$.fragment),Ts=a(),cn=l("p"),cn.innerHTML=eo,xs=a(),fn=l("p"),fn.innerHTML=to,Us=a(),mn=l("p"),mn.textContent=no,$s=a(),gn=l("ul"),gn.innerHTML=ao,Js=a(),F=l("div"),f(It.$$.fragment),Cs=a(),un=l("p"),un.textContent=so,js=a(),f(se.$$.fragment),ks=a(),D=l("div"),f(Zt.$$.fragment),Is=a(),hn=l("p"),hn.textContent=io,Zs=a(),f(ie.$$.fragment),As=a(),f(oe.$$.fragment),Ss=a(),le=l("div"),f(At.$$.fragment),Ds=a(),_n=l("p"),_n.innerHTML=oo,Gs=a(),re=l("div"),f(St.$$.fragment),Ls=a(),bn=l("p"),bn.textContent=lo,Ps=a(),de=l("div"),f(Dt.$$.fragment),Xs=a(),yn=l("p"),yn.innerHTML=ro,Ws=a(),G=l("div"),f(Gt.$$.fragment),Rs=a(),vn=l("p"),vn.innerHTML=po,Bs=a(),f(pe.$$.fragment),Fs=a(),f(ce.$$.fragment),Ns=a(),fe=l("div"),f(Lt.$$.fragment),Es=a(),wn=l("p"),wn.innerHTML=co,Vs=a(),me=l("div"),f(Pt.$$.fragment),Hs=a(),Mn=l("p"),Mn.textContent=fo,Qs=a(),ge=l("div"),f(Xt.$$.fragment),Ys=a(),Tn=l("p"),Tn.innerHTML=mo,zs=a(),L=l("div"),f(Wt.$$.fragment),qs=a(),xn=l("p"),xn.innerHTML=go,Os=a(),Un=l("p"),Un.textContent=uo,Ks=a(),$n=l("p"),$n.innerHTML=ho,ei=a(),ue=l("div"),f(Rt.$$.fragment),ti=a(),Jn=l("p"),Jn.textContent=_o,ni=a(),he=l("div"),f(Bt.$$.fragment),ai=a(),Cn=l("p"),Cn.textContent=bo,si=a(),_e=l("div"),f(Ft.$$.fragment),ii=a(),jn=l("p"),jn.innerHTML=yo,Za=a(),Zn=l("p"),this.h()},l(e){const n=xo("svelte-u9bgzb",document.head);p=r(n,"META",{name:!0,content:!0}),n.forEach(t),T=s(e),y=r(e,"P",{}),J(y).forEach(t),b=s(e),m(w.$$.fragment,e),d=s(e),m(U.$$.fragment,e),An=s(e),we=r(e,"P",{"data-svelte-h":!0}),c(we)!=="svelte-1frzd9j"&&(we.innerHTML=oi),Sn=s(e),Me=r(e,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-rz87yd"&&(Me.textContent=li),Dn=s(e),Te=r(e,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-wu27l3"&&(Te.textContent=ri),Gn=s(e),xe=r(e,"P",{"data-svelte-h":!0}),c(xe)!=="svelte-yrtfs"&&(xe.innerHTML=di),Ln=s(e),Ue=r(e,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-1m3nepz"&&(Ue.innerHTML=pi),Pn=s(e),m($e.$$.fragment,e),Xn=s(e),Je=r(e,"TABLE",{"data-svelte-h":!0}),c(Je)!=="svelte-15wpul1"&&(Je.innerHTML=ci),Wn=s(e),m(Ce.$$.fragment,e),Rn=s(e),je=r(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-1arnca0"&&(je.innerHTML=fi),Bn=s(e),ke=r(e,"OL",{"data-svelte-h":!0}),c(ke)!=="svelte-1yj0xra"&&(ke.innerHTML=mi),Fn=s(e),Ie=r(e,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1gtojsx"&&(Ie.innerHTML=gi),Nn=s(e),m(Ze.$$.fragment,e),En=s(e),Ae=r(e,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-8mkiuz"&&(Ae.innerHTML=ui),Vn=s(e),Se=r(e,"P",{"data-svelte-h":!0}),c(Se)!=="svelte-1vnw3f1"&&(Se.textContent=hi),Hn=s(e),m(De.$$.fragment,e),Qn=s(e),Ge=r(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-1nomn51"&&(Ge.textContent=_i),Yn=s(e),Le=r(e,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-x98fz5"&&(Le.innerHTML=bi),zn=s(e),Pe=r(e,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-1al420d"&&(Pe.textContent=yi),qn=s(e),m(Xe.$$.fragment,e),On=s(e),We=r(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-yyug88"&&(We.textContent=vi),Kn=s(e),m(Re.$$.fragment,e),ea=s(e),Be=r(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-b2o0wp"&&(Be.innerHTML=wi),ta=s(e),m(Fe.$$.fragment,e),na=s(e),Ne=r(e,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-1y2wyg6"&&(Ne.innerHTML=Mi),aa=s(e),Ee=r(e,"OL",{"data-svelte-h":!0}),c(Ee)!=="svelte-j8d5w5"&&(Ee.innerHTML=Ti),sa=s(e),Ve=r(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-1q04fzy"&&(Ve.innerHTML=xi),ia=s(e),m(He.$$.fragment,e),oa=s(e),Qe=r(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-1651djs"&&(Qe.innerHTML=Ui),la=s(e),Ye=r(e,"P",{"data-svelte-h":!0}),c(Ye)!=="svelte-1e55rj3"&&(Ye.textContent=$i),ra=s(e),m(ze.$$.fragment,e),da=s(e),qe=r(e,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-yyug88"&&(qe.textContent=Ji),pa=s(e),m(Oe.$$.fragment,e),ca=s(e),Ke=r(e,"P",{"data-svelte-h":!0}),c(Ke)!=="svelte-1qebwe0"&&(Ke.innerHTML=Ci),fa=s(e),m(et.$$.fragment,e),ma=s(e),tt=r(e,"P",{"data-svelte-h":!0}),c(tt)!=="svelte-qop6by"&&(tt.innerHTML=ji),ga=s(e),m(nt.$$.fragment,e),ua=s(e),at=r(e,"TABLE",{"data-svelte-h":!0}),c(at)!=="svelte-1l9s9j"&&(at.innerHTML=ki),ha=s(e),m(st.$$.fragment,e),_a=s(e),it=r(e,"P",{"data-svelte-h":!0}),c(it)!=="svelte-1uq2woy"&&(it.innerHTML=Ii),ba=s(e),ot=r(e,"P",{"data-svelte-h":!0}),c(ot)!=="svelte-1huix7d"&&(ot.textContent=Zi),ya=s(e),m(lt.$$.fragment,e),va=s(e),rt=r(e,"P",{"data-svelte-h":!0}),c(rt)!=="svelte-aevisk"&&(rt.textContent=Ai),wa=s(e),dt=r(e,"P",{"data-svelte-h":!0}),c(dt)!=="svelte-1k4lejl"&&(dt.innerHTML=Si),Ma=s(e),pt=r(e,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-1aigb0j"&&(pt.innerHTML=Di),Ta=s(e),ct=r(e,"P",{"data-svelte-h":!0}),c(ct)!=="svelte-blouap"&&(ct.innerHTML=Gi),xa=s(e),m(ft.$$.fragment,e),Ua=s(e),mt=r(e,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-1ec5fzf"&&(mt.innerHTML=Li),$a=s(e),m(gt.$$.fragment,e),Ja=s(e),ut=r(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-70729v"&&(ut.innerHTML=Pi),Ca=s(e),m(ht.$$.fragment,e),ja=s(e),x=r(e,"DIV",{class:!0});var $=J(x);m(_t.$$.fragment,$),Va=s($),Yt=r($,"P",{"data-svelte-h":!0}),c(Yt)!=="svelte-1pw3838"&&(Yt.innerHTML=Xi),Ha=s($),zt=r($,"P",{"data-svelte-h":!0}),c(zt)!=="svelte-wu1jmh"&&(zt.innerHTML=Wi),Qa=s($),B=r($,"DIV",{class:!0});var E=J(B);m(bt.$$.fragment,E),Ya=s(E),qt=r(E,"P",{"data-svelte-h":!0}),c(qt)!=="svelte-v78lg8"&&(qt.textContent=Ri),za=s(E),m(V.$$.fragment,E),E.forEach(t),qa=s($),Z=r($,"DIV",{class:!0});var P=J(Z);m(yt.$$.fragment,P),Oa=s(P),Ot=r(P,"P",{"data-svelte-h":!0}),c(Ot)!=="svelte-10jaql7"&&(Ot.textContent=Bi),Ka=s(P),m(H.$$.fragment,P),es=s(P),m(Q.$$.fragment,P),P.forEach(t),ts=s($),Y=r($,"DIV",{class:!0});var Nt=J(Y);m(vt.$$.fragment,Nt),ns=s(Nt),Kt=r(Nt,"P",{"data-svelte-h":!0}),c(Kt)!=="svelte-1lh0nh5"&&(Kt.innerHTML=Fi),Nt.forEach(t),as=s($),z=r($,"DIV",{class:!0});var Et=J(z);m(wt.$$.fragment,Et),ss=s(Et),en=r(Et,"P",{"data-svelte-h":!0}),c(en)!=="svelte-14bnrb6"&&(en.textContent=Ni),Et.forEach(t),is=s($),q=r($,"DIV",{class:!0});var Vt=J(q);m(Mt.$$.fragment,Vt),os=s(Vt),tn=r(Vt,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-1s3c06i"&&(tn.innerHTML=Ei),Vt.forEach(t),ls=s($),A=r($,"DIV",{class:!0});var X=J(A);m(Tt.$$.fragment,X),rs=s(X),nn=r(X,"P",{"data-svelte-h":!0}),c(nn)!=="svelte-e03q3e"&&(nn.innerHTML=Vi),ds=s(X),m(O.$$.fragment,X),ps=s(X),m(K.$$.fragment,X),X.forEach(t),cs=s($),ee=r($,"DIV",{class:!0});var Ht=J(ee);m(xt.$$.fragment,Ht),fs=s(Ht),an=r(Ht,"P",{"data-svelte-h":!0}),c(an)!=="svelte-1vfte1e"&&(an.innerHTML=Hi),Ht.forEach(t),ms=s($),te=r($,"DIV",{class:!0});var Qt=J(te);m(Ut.$$.fragment,Qt),gs=s(Qt),sn=r(Qt,"P",{"data-svelte-h":!0}),c(sn)!=="svelte-psupw6"&&(sn.textContent=Qi),Qt.forEach(t),us=s($),S=r($,"DIV",{class:!0});var W=J(S);m($t.$$.fragment,W),hs=s(W),on=r(W,"P",{"data-svelte-h":!0}),c(on)!=="svelte-1f3tmq1"&&(on.innerHTML=Yi),_s=s(W),ln=r(W,"P",{"data-svelte-h":!0}),c(ln)!=="svelte-xjijlp"&&(ln.textContent=zi),bs=s(W),rn=r(W,"P",{"data-svelte-h":!0}),c(rn)!=="svelte-hy0nzs"&&(rn.innerHTML=qi),W.forEach(t),ys=s($),ne=r($,"DIV",{class:!0});var Sa=J(ne);m(Jt.$$.fragment,Sa),vs=s(Sa),dn=r(Sa,"P",{"data-svelte-h":!0}),c(dn)!=="svelte-16q0ax1"&&(dn.textContent=Oi),Sa.forEach(t),ws=s($),ae=r($,"DIV",{class:!0});var Da=J(ae);m(Ct.$$.fragment,Da),Ms=s(Da),pn=r(Da,"P",{"data-svelte-h":!0}),c(pn)!=="svelte-vo59ec"&&(pn.innerHTML=Ki),Da.forEach(t),$.forEach(t),ka=s(e),m(jt.$$.fragment,e),Ia=s(e),v=r(e,"DIV",{class:!0});var M=J(v);m(kt.$$.fragment,M),Ts=s(M),cn=r(M,"P",{"data-svelte-h":!0}),c(cn)!=="svelte-1pw3838"&&(cn.innerHTML=eo),xs=s(M),fn=r(M,"P",{"data-svelte-h":!0}),c(fn)!=="svelte-wu1jmh"&&(fn.innerHTML=to),Us=s(M),mn=r(M,"P",{"data-svelte-h":!0}),c(mn)!=="svelte-14s6m4u"&&(mn.textContent=no),$s=s(M),gn=r(M,"UL",{"data-svelte-h":!0}),c(gn)!=="svelte-1ir2i9c"&&(gn.innerHTML=ao),Js=s(M),F=r(M,"DIV",{class:!0});var kn=J(F);m(It.$$.fragment,kn),Cs=s(kn),un=r(kn,"P",{"data-svelte-h":!0}),c(un)!=="svelte-v78lg8"&&(un.textContent=so),js=s(kn),m(se.$$.fragment,kn),kn.forEach(t),ks=s(M),D=r(M,"DIV",{class:!0});var be=J(D);m(Zt.$$.fragment,be),Is=s(be),hn=r(be,"P",{"data-svelte-h":!0}),c(hn)!=="svelte-10jaql7"&&(hn.textContent=io),Zs=s(be),m(ie.$$.fragment,be),As=s(be),m(oe.$$.fragment,be),be.forEach(t),Ss=s(M),le=r(M,"DIV",{class:!0});var Ga=J(le);m(At.$$.fragment,Ga),Ds=s(Ga),_n=r(Ga,"P",{"data-svelte-h":!0}),c(_n)!=="svelte-1lh0nh5"&&(_n.innerHTML=oo),Ga.forEach(t),Gs=s(M),re=r(M,"DIV",{class:!0});var La=J(re);m(St.$$.fragment,La),Ls=s(La),bn=r(La,"P",{"data-svelte-h":!0}),c(bn)!=="svelte-14bnrb6"&&(bn.textContent=lo),La.forEach(t),Ps=s(M),de=r(M,"DIV",{class:!0});var Pa=J(de);m(Dt.$$.fragment,Pa),Xs=s(Pa),yn=r(Pa,"P",{"data-svelte-h":!0}),c(yn)!=="svelte-1s3c06i"&&(yn.innerHTML=ro),Pa.forEach(t),Ws=s(M),G=r(M,"DIV",{class:!0});var ye=J(G);m(Gt.$$.fragment,ye),Rs=s(ye),vn=r(ye,"P",{"data-svelte-h":!0}),c(vn)!=="svelte-e03q3e"&&(vn.innerHTML=po),Bs=s(ye),m(pe.$$.fragment,ye),Fs=s(ye),m(ce.$$.fragment,ye),ye.forEach(t),Ns=s(M),fe=r(M,"DIV",{class:!0});var Xa=J(fe);m(Lt.$$.fragment,Xa),Es=s(Xa),wn=r(Xa,"P",{"data-svelte-h":!0}),c(wn)!=="svelte-1vfte1e"&&(wn.innerHTML=co),Xa.forEach(t),Vs=s(M),me=r(M,"DIV",{class:!0});var Wa=J(me);m(Pt.$$.fragment,Wa),Hs=s(Wa),Mn=r(Wa,"P",{"data-svelte-h":!0}),c(Mn)!=="svelte-psupw6"&&(Mn.textContent=fo),Wa.forEach(t),Qs=s(M),ge=r(M,"DIV",{class:!0});var Ra=J(ge);m(Xt.$$.fragment,Ra),Ys=s(Ra),Tn=r(Ra,"P",{"data-svelte-h":!0}),c(Tn)!=="svelte-pkn4ui"&&(Tn.innerHTML=mo),Ra.forEach(t),zs=s(M),L=r(M,"DIV",{class:!0});var ve=J(L);m(Wt.$$.fragment,ve),qs=s(ve),xn=r(ve,"P",{"data-svelte-h":!0}),c(xn)!=="svelte-1f3tmq1"&&(xn.innerHTML=go),Os=s(ve),Un=r(ve,"P",{"data-svelte-h":!0}),c(Un)!=="svelte-xjijlp"&&(Un.textContent=uo),Ks=s(ve),$n=r(ve,"P",{"data-svelte-h":!0}),c($n)!=="svelte-hy0nzs"&&($n.innerHTML=ho),ve.forEach(t),ei=s(M),ue=r(M,"DIV",{class:!0});var Ba=J(ue);m(Rt.$$.fragment,Ba),ti=s(Ba),Jn=r(Ba,"P",{"data-svelte-h":!0}),c(Jn)!=="svelte-1xwrf7t"&&(Jn.textContent=_o),Ba.forEach(t),ni=s(M),he=r(M,"DIV",{class:!0});var Fa=J(he);m(Bt.$$.fragment,Fa),ai=s(Fa),Cn=r(Fa,"P",{"data-svelte-h":!0}),c(Cn)!=="svelte-16q0ax1"&&(Cn.textContent=bo),Fa.forEach(t),si=s(M),_e=r(M,"DIV",{class:!0});var Na=J(_e);m(Ft.$$.fragment,Na),ii=s(Na),jn=r(Na,"P",{"data-svelte-h":!0}),c(jn)!=="svelte-vo59ec"&&(jn.innerHTML=yo),Na.forEach(t),M.forEach(t),Za=s(e),Zn=r(e,"P",{}),J(Zn).forEach(t),this.h()},h(){C(p,"name","hf:doc:metadata"),C(p,"content",Go),C(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){i(document.head,p),o(e,T,n),o(e,y,n),o(e,b,n),g(w,e,n),o(e,d,n),g(U,e,n),o(e,An,n),o(e,we,n),o(e,Sn,n),o(e,Me,n),o(e,Dn,n),o(e,Te,n),o(e,Gn,n),o(e,xe,n),o(e,Ln,n),o(e,Ue,n),o(e,Pn,n),g($e,e,n),o(e,Xn,n),o(e,Je,n),o(e,Wn,n),g(Ce,e,n),o(e,Rn,n),o(e,je,n),o(e,Bn,n),o(e,ke,n),o(e,Fn,n),o(e,Ie,n),o(e,Nn,n),g(Ze,e,n),o(e,En,n),o(e,Ae,n),o(e,Vn,n),o(e,Se,n),o(e,Hn,n),g(De,e,n),o(e,Qn,n),o(e,Ge,n),o(e,Yn,n),o(e,Le,n),o(e,zn,n),o(e,Pe,n),o(e,qn,n),g(Xe,e,n),o(e,On,n),o(e,We,n),o(e,Kn,n),g(Re,e,n),o(e,ea,n),o(e,Be,n),o(e,ta,n),g(Fe,e,n),o(e,na,n),o(e,Ne,n),o(e,aa,n),o(e,Ee,n),o(e,sa,n),o(e,Ve,n),o(e,ia,n),g(He,e,n),o(e,oa,n),o(e,Qe,n),o(e,la,n),o(e,Ye,n),o(e,ra,n),g(ze,e,n),o(e,da,n),o(e,qe,n),o(e,pa,n),g(Oe,e,n),o(e,ca,n),o(e,Ke,n),o(e,fa,n),g(et,e,n),o(e,ma,n),o(e,tt,n),o(e,ga,n),g(nt,e,n),o(e,ua,n),o(e,at,n),o(e,ha,n),g(st,e,n),o(e,_a,n),o(e,it,n),o(e,ba,n),o(e,ot,n),o(e,ya,n),g(lt,e,n),o(e,va,n),o(e,rt,n),o(e,wa,n),o(e,dt,n),o(e,Ma,n),o(e,pt,n),o(e,Ta,n),o(e,ct,n),o(e,xa,n),g(ft,e,n),o(e,Ua,n),o(e,mt,n),o(e,$a,n),g(gt,e,n),o(e,Ja,n),o(e,ut,n),o(e,Ca,n),g(ht,e,n),o(e,ja,n),o(e,x,n),g(_t,x,null),i(x,Va),i(x,Yt),i(x,Ha),i(x,zt),i(x,Qa),i(x,B),g(bt,B,null),i(B,Ya),i(B,qt),i(B,za),g(V,B,null),i(x,qa),i(x,Z),g(yt,Z,null),i(Z,Oa),i(Z,Ot),i(Z,Ka),g(H,Z,null),i(Z,es),g(Q,Z,null),i(x,ts),i(x,Y),g(vt,Y,null),i(Y,ns),i(Y,Kt),i(x,as),i(x,z),g(wt,z,null),i(z,ss),i(z,en),i(x,is),i(x,q),g(Mt,q,null),i(q,os),i(q,tn),i(x,ls),i(x,A),g(Tt,A,null),i(A,rs),i(A,nn),i(A,ds),g(O,A,null),i(A,ps),g(K,A,null),i(x,cs),i(x,ee),g(xt,ee,null),i(ee,fs),i(ee,an),i(x,ms),i(x,te),g(Ut,te,null),i(te,gs),i(te,sn),i(x,us),i(x,S),g($t,S,null),i(S,hs),i(S,on),i(S,_s),i(S,ln),i(S,bs),i(S,rn),i(x,ys),i(x,ne),g(Jt,ne,null),i(ne,vs),i(ne,dn),i(x,ws),i(x,ae),g(Ct,ae,null),i(ae,Ms),i(ae,pn),o(e,ka,n),g(jt,e,n),o(e,Ia,n),o(e,v,n),g(kt,v,null),i(v,Ts),i(v,cn),i(v,xs),i(v,fn),i(v,Us),i(v,mn),i(v,$s),i(v,gn),i(v,Js),i(v,F),g(It,F,null),i(F,Cs),i(F,un),i(F,js),g(se,F,null),i(v,ks),i(v,D),g(Zt,D,null),i(D,Is),i(D,hn),i(D,Zs),g(ie,D,null),i(D,As),g(oe,D,null),i(v,Ss),i(v,le),g(At,le,null),i(le,Ds),i(le,_n),i(v,Gs),i(v,re),g(St,re,null),i(re,Ls),i(re,bn),i(v,Ps),i(v,de),g(Dt,de,null),i(de,Xs),i(de,yn),i(v,Ws),i(v,G),g(Gt,G,null),i(G,Rs),i(G,vn),i(G,Bs),g(pe,G,null),i(G,Fs),g(ce,G,null),i(v,Ns),i(v,fe),g(Lt,fe,null),i(fe,Es),i(fe,wn),i(v,Vs),i(v,me),g(Pt,me,null),i(me,Hs),i(me,Mn),i(v,Qs),i(v,ge),g(Xt,ge,null),i(ge,Ys),i(ge,Tn),i(v,zs),i(v,L),g(Wt,L,null),i(L,qs),i(L,xn),i(L,Os),i(L,Un),i(L,Ks),i(L,$n),i(v,ei),i(v,ue),g(Rt,ue,null),i(ue,ti),i(ue,Jn),i(v,ni),i(v,he),g(Bt,he,null),i(he,ai),i(he,Cn),i(v,si),i(v,_e),g(Ft,_e,null),i(_e,ii),i(_e,jn),o(e,Za,n),o(e,Zn,n),Aa=!0},p(e,[n]){const $={};n&2&&($.$$scope={dirty:n,ctx:e}),V.$set($);const E={};n&2&&(E.$$scope={dirty:n,ctx:e}),H.$set(E);const P={};n&2&&(P.$$scope={dirty:n,ctx:e}),Q.$set(P);const Nt={};n&2&&(Nt.$$scope={dirty:n,ctx:e}),O.$set(Nt);const Et={};n&2&&(Et.$$scope={dirty:n,ctx:e}),K.$set(Et);const Vt={};n&2&&(Vt.$$scope={dirty:n,ctx:e}),se.$set(Vt);const X={};n&2&&(X.$$scope={dirty:n,ctx:e}),ie.$set(X);const Ht={};n&2&&(Ht.$$scope={dirty:n,ctx:e}),oe.$set(Ht);const Qt={};n&2&&(Qt.$$scope={dirty:n,ctx:e}),pe.$set(Qt);const W={};n&2&&(W.$$scope={dirty:n,ctx:e}),ce.$set(W)},i(e){Aa||(u(w.$$.fragment,e),u(U.$$.fragment,e),u($e.$$.fragment,e),u(Ce.$$.fragment,e),u(Ze.$$.fragment,e),u(De.$$.fragment,e),u(Xe.$$.fragment,e),u(Re.$$.fragment,e),u(Fe.$$.fragment,e),u(He.$$.fragment,e),u(ze.$$.fragment,e),u(Oe.$$.fragment,e),u(et.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(lt.$$.fragment,e),u(ft.$$.fragment,e),u(gt.$$.fragment,e),u(ht.$$.fragment,e),u(_t.$$.fragment,e),u(bt.$$.fragment,e),u(V.$$.fragment,e),u(yt.$$.fragment,e),u(H.$$.fragment,e),u(Q.$$.fragment,e),u(vt.$$.fragment,e),u(wt.$$.fragment,e),u(Mt.$$.fragment,e),u(Tt.$$.fragment,e),u(O.$$.fragment,e),u(K.$$.fragment,e),u(xt.$$.fragment,e),u(Ut.$$.fragment,e),u($t.$$.fragment,e),u(Jt.$$.fragment,e),u(Ct.$$.fragment,e),u(jt.$$.fragment,e),u(kt.$$.fragment,e),u(It.$$.fragment,e),u(se.$$.fragment,e),u(Zt.$$.fragment,e),u(ie.$$.fragment,e),u(oe.$$.fragment,e),u(At.$$.fragment,e),u(St.$$.fragment,e),u(Dt.$$.fragment,e),u(Gt.$$.fragment,e),u(pe.$$.fragment,e),u(ce.$$.fragment,e),u(Lt.$$.fragment,e),u(Pt.$$.fragment,e),u(Xt.$$.fragment,e),u(Wt.$$.fragment,e),u(Rt.$$.fragment,e),u(Bt.$$.fragment,e),u(Ft.$$.fragment,e),Aa=!0)},o(e){h(w.$$.fragment,e),h(U.$$.fragment,e),h($e.$$.fragment,e),h(Ce.$$.fragment,e),h(Ze.$$.fragment,e),h(De.$$.fragment,e),h(Xe.$$.fragment,e),h(Re.$$.fragment,e),h(Fe.$$.fragment,e),h(He.$$.fragment,e),h(ze.$$.fragment,e),h(Oe.$$.fragment,e),h(et.$$.fragment,e),h(nt.$$.fragment,e),h(st.$$.fragment,e),h(lt.$$.fragment,e),h(ft.$$.fragment,e),h(gt.$$.fragment,e),h(ht.$$.fragment,e),h(_t.$$.fragment,e),h(bt.$$.fragment,e),h(V.$$.fragment,e),h(yt.$$.fragment,e),h(H.$$.fragment,e),h(Q.$$.fragment,e),h(vt.$$.fragment,e),h(wt.$$.fragment,e),h(Mt.$$.fragment,e),h(Tt.$$.fragment,e),h(O.$$.fragment,e),h(K.$$.fragment,e),h(xt.$$.fragment,e),h(Ut.$$.fragment,e),h($t.$$.fragment,e),h(Jt.$$.fragment,e),h(Ct.$$.fragment,e),h(jt.$$.fragment,e),h(kt.$$.fragment,e),h(It.$$.fragment,e),h(se.$$.fragment,e),h(Zt.$$.fragment,e),h(ie.$$.fragment,e),h(oe.$$.fragment,e),h(At.$$.fragment,e),h(St.$$.fragment,e),h(Dt.$$.fragment,e),h(Gt.$$.fragment,e),h(pe.$$.fragment,e),h(ce.$$.fragment,e),h(Lt.$$.fragment,e),h(Pt.$$.fragment,e),h(Xt.$$.fragment,e),h(Wt.$$.fragment,e),h(Rt.$$.fragment,e),h(Bt.$$.fragment,e),h(Ft.$$.fragment,e),Aa=!1},d(e){e&&(t(T),t(y),t(b),t(d),t(An),t(we),t(Sn),t(Me),t(Dn),t(Te),t(Gn),t(xe),t(Ln),t(Ue),t(Pn),t(Xn),t(Je),t(Wn),t(Rn),t(je),t(Bn),t(ke),t(Fn),t(Ie),t(Nn),t(En),t(Ae),t(Vn),t(Se),t(Hn),t(Qn),t(Ge),t(Yn),t(Le),t(zn),t(Pe),t(qn),t(On),t(We),t(Kn),t(ea),t(Be),t(ta),t(na),t(Ne),t(aa),t(Ee),t(sa),t(Ve),t(ia),t(oa),t(Qe),t(la),t(Ye),t(ra),t(da),t(qe),t(pa),t(ca),t(Ke),t(fa),t(ma),t(tt),t(ga),t(ua),t(at),t(ha),t(_a),t(it),t(ba),t(ot),t(ya),t(va),t(rt),t(wa),t(dt),t(Ma),t(pt),t(Ta),t(ct),t(xa),t(Ua),t(mt),t($a),t(Ja),t(ut),t(Ca),t(ja),t(x),t(ka),t(Ia),t(v),t(Za),t(Zn)),t(p),_(w,e),_(U,e),_($e,e),_(Ce,e),_(Ze,e),_(De,e),_(Xe,e),_(Re,e),_(Fe,e),_(He,e),_(ze,e),_(Oe,e),_(et,e),_(nt,e),_(st,e),_(lt,e),_(ft,e),_(gt,e),_(ht,e),_(_t),_(bt),_(V),_(yt),_(H),_(Q),_(vt),_(wt),_(Mt),_(Tt),_(O),_(K),_(xt),_(Ut),_($t),_(Jt),_(Ct),_(jt,e),_(kt),_(It),_(se),_(Zt),_(ie),_(oe),_(At),_(St),_(Dt),_(Gt),_(pe),_(ce),_(Lt),_(Pt),_(Xt),_(Wt),_(Rt),_(Bt),_(Ft)}}}const Go='{"title":"Text-to-Image Generation with Adapter Conditioning","local":"text-to-image-generation-with-adapter-conditioning","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Available Pipelines:","local":"available-pipelines","sections":[],"depth":2},{"title":"Usage example with the base model of StableDiffusion-1.4/1.5","local":"usage-example-with-the-base-model-of-stablediffusion-1415","sections":[],"depth":2},{"title":"Usage example with the base model of StableDiffusion-XL","local":"usage-example-with-the-base-model-of-stablediffusion-xl","sections":[],"depth":2},{"title":"Available checkpoints","local":"available-checkpoints","sections":[{"title":"T2I-Adapter with Stable Diffusion 1.4","local":"t2i-adapter-with-stable-diffusion-14","sections":[],"depth":3}],"depth":2},{"title":"Combining multiple adapters","local":"combining-multiple-adapters","sections":[],"depth":2},{"title":"T2I-Adapter vs ControlNet","local":"t2i-adapter-vs-controlnet","sections":[],"depth":2},{"title":"StableDiffusionAdapterPipeline","local":"diffusers.StableDiffusionAdapterPipeline","sections":[],"depth":2},{"title":"StableDiffusionXLAdapterPipeline","local":"diffusers.StableDiffusionXLAdapterPipeline","sections":[],"depth":2}],"depth":1}';function Lo(k){return wo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Eo extends Mo{constructor(p){super(),To(this,p,Lo,Do,vo,{})}}export{Eo as component};
