import{s as go,o as uo,n as N}from"../chunks/scheduler.182ea377.js";import{S as ho,i as _o,g as r,s as a,r as f,A as bo,h as l,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 Fa}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 jn}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as R}from"../chunks/Heading.16916d63.js";function yo(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function vo(k){let d,M=`⚠️ 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(){d=r("p"),d.innerHTML=M},l(y){d=l(y,"P",{"data-svelte-h":!0}),c(d)!=="svelte-ackzsn"&&(d.innerHTML=M)},m(y,b){o(y,d,b)},p:N,d(y){y&&t(d)}}}function wo(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function Mo(k){let d,M=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){d=r("p"),d.textContent=M},l(y){d=l(y,"P",{"data-svelte-h":!0}),c(d)!=="svelte-17p1lpg"&&(d.textContent=M)},m(y,b){o(y,d,b)},p:N,d(y){y&&t(d)}}}function To(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function xo(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function Uo(k){let d,M=`⚠️ 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(){d=r("p"),d.innerHTML=M},l(y){d=l(y,"P",{"data-svelte-h":!0}),c(d)!=="svelte-ackzsn"&&(d.innerHTML=M)},m(y,b){o(y,d,b)},p:N,d(y){y&&t(d)}}}function $o(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function Jo(k){let d,M=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){d=r("p"),d.textContent=M},l(y){d=l(y,"P",{"data-svelte-h":!0}),c(d)!=="svelte-17p1lpg"&&(d.textContent=M)},m(y,b){o(y,d,b)},p:N,d(y){y&&t(d)}}}function Co(k){let d,M="Examples:",y,b,v;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(){d=r("p"),d.textContent=M,y=a(),f(b.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),c(d)!=="svelte-kvfsh7"&&(d.textContent=M),y=s(p),m(b.$$.fragment,p)},m(p,U){o(p,d,U),o(p,y,U),g(b,p,U),v=!0},p:N,i(p){v||(u(b.$$.fragment,p),v=!0)},o(p){h(b.$$.fragment,p),v=!1},d(p){p&&(t(d),t(y)),_(b,p)}}}function jo(k){let d,M,y,b,v,p,U,In,we,ni='<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.',Zn,Me,ai="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.",An,Te,si="The abstract of the paper is the following:",Sn,xe,ii="<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>",Dn,Ue,oi='This model was contributed by the community contributor <a href="https://github.com/HimariO" rel="nofollow">HimariO</a> ❤️ .',Gn,$e,Ln,Je,ri='<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>',Pn,Ce,Xn,je,li=`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.`,Wn,ke,pi='<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>',Rn,Ie,di='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>.',Bn,Ze,Fn,Ae,ci='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png" alt="img"/>',Nn,Se,fi="Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size.",En,De,Vn,Ge,mi="Let’s take a look at the processed image.",Hn,Le,gi='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png" alt="img"/>',Qn,Pe,ui="Next, create the adapter pipeline",Yn,Xe,zn,We,hi="Finally, pass the prompt and control image to the pipeline",qn,Re,On,Be,_i='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png" alt="img"/>',Kn,Fe,ea,Ne,bi=`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.`,ta,Ee,yi='<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>',na,Ve,vi='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>.',aa,He,sa,Qe,wi='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png" alt="img"/>',ia,Ye,Mi="Then, create the adapter pipeline",oa,ze,ra,qe,Ti="Finally, pass the prompt and control image to the pipeline",la,Oe,pa,Ke,xi='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch_output.png" alt="img"/>',da,et,ca,tt,Ui='Non-diffusers checkpoints can be found under <a href="https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models" rel="nofollow">TencentARC/T2I-Adapter</a>.',fa,nt,ma,at,$i='<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>',ga,st,ua,it,Ji="<code>MultiAdapter</code> can be used for applying multiple conditionings at once.",ha,ot,Ci="Here we use the keypose adapter for the character posture and the depth adapter for creating the scene.",_a,rt,ba,lt,ji="The two control images look as such:",ya,pt,ki='<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"/>',va,dt,Ii="<code>MultiAdapter</code> combines keypose and depth adapters.",wa,ct,Zi="<code>adapter_conditioning_scale</code> balances the relative influence of the different adapters.",Ma,ft,Ta,mt,Ai='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png" alt="img"/>',xa,gt,Ua,ut,Si=`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.`,$a,ht,Ja,T,_t,Na,Yt,Di=`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>`,Ea,zt,Gi=`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.)`,Va,B,bt,Ha,qt,Li="Function invoked when calling the pipeline for generation.",Qa,V,Ya,Z,yt,za,Ot,Pi=`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.`,qa,H,Oa,Q,Ka,Y,vt,es,Kt,Xi=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,ts,z,wt,ns,en,Wi=`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.`,as,q,Mt,ss,tn,Ri=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,is,A,Tt,os,nn,Bi=`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.`,rs,O,ls,K,ps,ee,xt,ds,an,Fi='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',cs,te,Ut,fs,sn,Ni="Disables the FreeU mechanism if enabled.",ms,S,$t,gs,on,Ei='Enables the FreeU mechanism as in <a href="https://arxiv.org/abs/2309.11497" rel="nofollow">https://arxiv.org/abs/2309.11497</a>.',us,rn,Vi="The suffixes after the scaling factors represent the stages where they are being applied.",hs,ln,Hi=`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.`,_s,ne,Jt,bs,pn,Qi="Encodes the prompt into text encoder hidden states.",ys,ae,Ct,vs,dn,Yi='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>',Ca,jt,ja,w,kt,ws,cn,zi=`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>`,Ms,fn,qi=`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.)`,Ts,F,It,xs,mn,Oi="Function invoked when calling the pipeline for generation.",Us,se,$s,D,Zt,Js,gn,Ki=`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.`,Cs,ie,js,oe,ks,re,At,Is,un,eo=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,Zs,le,St,As,hn,to=`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.`,Ss,pe,Dt,Ds,_n,no=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Gs,G,Gt,Ls,bn,ao=`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.`,Ps,de,Xs,ce,Ws,fe,Lt,Rs,yn,so='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Bs,me,Pt,Fs,vn,io="Disables the FreeU mechanism if enabled.",Ns,ge,Xt,Es,wn,oo=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,Vs,L,Wt,Hs,Mn,ro='Enables the FreeU mechanism as in <a href="https://arxiv.org/abs/2309.11497" rel="nofollow">https://arxiv.org/abs/2309.11497</a>.',Qs,Tn,lo="The suffixes after the scaling factors represent the stages where they are being applied.",Ys,xn,po=`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.`,zs,ue,Rt,qs,Un,co=`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.`,Os,he,Bt,Ks,$n,fo="Encodes the prompt into text encoder hidden states.",ei,_e,Ft,ti,Jn,mo='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,kn,Ia;return v=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"}}),rt=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:": typing.Union[diffusers.models.adapter.T2IAdapter, diffusers.models.adapter.MultiAdapter, typing.List[diffusers.models.adapter.T2IAdapter]]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"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:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"clip_skip",val:": typing.Optional[int] = 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 jn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[yo]},$$scope:{ctx:k}}}),yt=new j({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2047"}}),H=new Fa({props:{warning:!0,$$slots:{default:[vo]},$$scope:{ctx:k}}}),Q=new jn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[wo]},$$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#L2087"}}),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:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1986"}}),O=new Fa({props:{warning:!0,$$slots:{default:[Mo]},$$scope:{ctx:k}}}),K=new jn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[To]},$$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#L2021"}}),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:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"},{name:"clip_skip",val:": typing.Optional[int] = 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:": typing.Union[diffusers.models.adapter.T2IAdapter, diffusers.models.adapter.MultiAdapter, typing.List[diffusers.models.adapter.T2IAdapter]]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"force_zeros_for_empty_prompt",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L171"}}),It=new j({props:{name:"__call__",anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"denoising_end",val:": typing.Optional[float] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"negative_target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"adapter_conditioning_factor",val:": float = 1.0"},{name:"clip_skip",val:": typing.Optional[int] = 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.`,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#L759",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 jn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[xo]},$$scope:{ctx:k}}}),Zt=new j({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L2047"}}),ie=new Fa({props:{warning:!0,$$slots:{default:[Uo]},$$scope:{ctx:k}}}),oe=new jn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[$o]},$$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#L2087"}}),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#L241"}}),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#L249"}}),Gt=new j({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1986"}}),de=new Fa({props:{warning:!0,$$slots:{default:[Jo]},$$scope:{ctx:k}}}),ce=new jn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Co]},$$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#L2021"}}),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#L715"}}),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#L266"}}),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#L692"}}),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#L257"}}),Bt=new j({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt",parameters:[{name:"prompt",val:": str"},{name:"prompt_2",val:": typing.Optional[str] = None"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": typing.Optional[str] = None"},{name:"negative_prompt_2",val:": typing.Optional[str] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"},{name:"clip_skip",val:": typing.Optional[int] = 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#L274"}}),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#L720",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(){d=r("meta"),M=a(),y=r("p"),b=a(),f(v.$$.fragment),p=a(),f(U.$$.fragment),In=a(),we=r("p"),we.innerHTML=ni,Zn=a(),Me=r("p"),Me.textContent=ai,An=a(),Te=r("p"),Te.textContent=si,Sn=a(),xe=r("p"),xe.innerHTML=ii,Dn=a(),Ue=r("p"),Ue.innerHTML=oi,Gn=a(),f($e.$$.fragment),Ln=a(),Je=r("table"),Je.innerHTML=ri,Pn=a(),f(Ce.$$.fragment),Xn=a(),je=r("p"),je.innerHTML=li,Wn=a(),ke=r("ol"),ke.innerHTML=pi,Rn=a(),Ie=r("p"),Ie.innerHTML=di,Bn=a(),f(Ze.$$.fragment),Fn=a(),Ae=r("p"),Ae.innerHTML=ci,Nn=a(),Se=r("p"),Se.textContent=fi,En=a(),f(De.$$.fragment),Vn=a(),Ge=r("p"),Ge.textContent=mi,Hn=a(),Le=r("p"),Le.innerHTML=gi,Qn=a(),Pe=r("p"),Pe.textContent=ui,Yn=a(),f(Xe.$$.fragment),zn=a(),We=r("p"),We.textContent=hi,qn=a(),f(Re.$$.fragment),On=a(),Be=r("p"),Be.innerHTML=_i,Kn=a(),f(Fe.$$.fragment),ea=a(),Ne=r("p"),Ne.innerHTML=bi,ta=a(),Ee=r("ol"),Ee.innerHTML=yi,na=a(),Ve=r("p"),Ve.innerHTML=vi,aa=a(),f(He.$$.fragment),sa=a(),Qe=r("p"),Qe.innerHTML=wi,ia=a(),Ye=r("p"),Ye.textContent=Mi,oa=a(),f(ze.$$.fragment),ra=a(),qe=r("p"),qe.textContent=Ti,la=a(),f(Oe.$$.fragment),pa=a(),Ke=r("p"),Ke.innerHTML=xi,da=a(),f(et.$$.fragment),ca=a(),tt=r("p"),tt.innerHTML=Ui,fa=a(),f(nt.$$.fragment),ma=a(),at=r("table"),at.innerHTML=$i,ga=a(),f(st.$$.fragment),ua=a(),it=r("p"),it.innerHTML=Ji,ha=a(),ot=r("p"),ot.textContent=Ci,_a=a(),f(rt.$$.fragment),ba=a(),lt=r("p"),lt.textContent=ji,ya=a(),pt=r("p"),pt.innerHTML=ki,va=a(),dt=r("p"),dt.innerHTML=Ii,wa=a(),ct=r("p"),ct.innerHTML=Zi,Ma=a(),f(ft.$$.fragment),Ta=a(),mt=r("p"),mt.innerHTML=Ai,xa=a(),f(gt.$$.fragment),Ua=a(),ut=r("p"),ut.innerHTML=Si,$a=a(),f(ht.$$.fragment),Ja=a(),T=r("div"),f(_t.$$.fragment),Na=a(),Yt=r("p"),Yt.innerHTML=Di,Ea=a(),zt=r("p"),zt.innerHTML=Gi,Va=a(),B=r("div"),f(bt.$$.fragment),Ha=a(),qt=r("p"),qt.textContent=Li,Qa=a(),f(V.$$.fragment),Ya=a(),Z=r("div"),f(yt.$$.fragment),za=a(),Ot=r("p"),Ot.textContent=Pi,qa=a(),f(H.$$.fragment),Oa=a(),f(Q.$$.fragment),Ka=a(),Y=r("div"),f(vt.$$.fragment),es=a(),Kt=r("p"),Kt.innerHTML=Xi,ts=a(),z=r("div"),f(wt.$$.fragment),ns=a(),en=r("p"),en.textContent=Wi,as=a(),q=r("div"),f(Mt.$$.fragment),ss=a(),tn=r("p"),tn.innerHTML=Ri,is=a(),A=r("div"),f(Tt.$$.fragment),os=a(),nn=r("p"),nn.innerHTML=Bi,rs=a(),f(O.$$.fragment),ls=a(),f(K.$$.fragment),ps=a(),ee=r("div"),f(xt.$$.fragment),ds=a(),an=r("p"),an.innerHTML=Fi,cs=a(),te=r("div"),f(Ut.$$.fragment),fs=a(),sn=r("p"),sn.textContent=Ni,ms=a(),S=r("div"),f($t.$$.fragment),gs=a(),on=r("p"),on.innerHTML=Ei,us=a(),rn=r("p"),rn.textContent=Vi,hs=a(),ln=r("p"),ln.innerHTML=Hi,_s=a(),ne=r("div"),f(Jt.$$.fragment),bs=a(),pn=r("p"),pn.textContent=Qi,ys=a(),ae=r("div"),f(Ct.$$.fragment),vs=a(),dn=r("p"),dn.innerHTML=Yi,Ca=a(),f(jt.$$.fragment),ja=a(),w=r("div"),f(kt.$$.fragment),ws=a(),cn=r("p"),cn.innerHTML=zi,Ms=a(),fn=r("p"),fn.innerHTML=qi,Ts=a(),F=r("div"),f(It.$$.fragment),xs=a(),mn=r("p"),mn.textContent=Oi,Us=a(),f(se.$$.fragment),$s=a(),D=r("div"),f(Zt.$$.fragment),Js=a(),gn=r("p"),gn.textContent=Ki,Cs=a(),f(ie.$$.fragment),js=a(),f(oe.$$.fragment),ks=a(),re=r("div"),f(At.$$.fragment),Is=a(),un=r("p"),un.innerHTML=eo,Zs=a(),le=r("div"),f(St.$$.fragment),As=a(),hn=r("p"),hn.textContent=to,Ss=a(),pe=r("div"),f(Dt.$$.fragment),Ds=a(),_n=r("p"),_n.innerHTML=no,Gs=a(),G=r("div"),f(Gt.$$.fragment),Ls=a(),bn=r("p"),bn.innerHTML=ao,Ps=a(),f(de.$$.fragment),Xs=a(),f(ce.$$.fragment),Ws=a(),fe=r("div"),f(Lt.$$.fragment),Rs=a(),yn=r("p"),yn.innerHTML=so,Bs=a(),me=r("div"),f(Pt.$$.fragment),Fs=a(),vn=r("p"),vn.textContent=io,Ns=a(),ge=r("div"),f(Xt.$$.fragment),Es=a(),wn=r("p"),wn.innerHTML=oo,Vs=a(),L=r("div"),f(Wt.$$.fragment),Hs=a(),Mn=r("p"),Mn.innerHTML=ro,Qs=a(),Tn=r("p"),Tn.textContent=lo,Ys=a(),xn=r("p"),xn.innerHTML=po,zs=a(),ue=r("div"),f(Rt.$$.fragment),qs=a(),Un=r("p"),Un.textContent=co,Os=a(),he=r("div"),f(Bt.$$.fragment),Ks=a(),$n=r("p"),$n.textContent=fo,ei=a(),_e=r("div"),f(Ft.$$.fragment),ti=a(),Jn=r("p"),Jn.innerHTML=mo,ka=a(),kn=r("p"),this.h()},l(e){const n=bo("svelte-u9bgzb",document.head);d=l(n,"META",{name:!0,content:!0}),n.forEach(t),M=s(e),y=l(e,"P",{}),J(y).forEach(t),b=s(e),m(v.$$.fragment,e),p=s(e),m(U.$$.fragment,e),In=s(e),we=l(e,"P",{"data-svelte-h":!0}),c(we)!=="svelte-1frzd9j"&&(we.innerHTML=ni),Zn=s(e),Me=l(e,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-rz87yd"&&(Me.textContent=ai),An=s(e),Te=l(e,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-wu27l3"&&(Te.textContent=si),Sn=s(e),xe=l(e,"P",{"data-svelte-h":!0}),c(xe)!=="svelte-yrtfs"&&(xe.innerHTML=ii),Dn=s(e),Ue=l(e,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-1m3nepz"&&(Ue.innerHTML=oi),Gn=s(e),m($e.$$.fragment,e),Ln=s(e),Je=l(e,"TABLE",{"data-svelte-h":!0}),c(Je)!=="svelte-15wpul1"&&(Je.innerHTML=ri),Pn=s(e),m(Ce.$$.fragment,e),Xn=s(e),je=l(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-1arnca0"&&(je.innerHTML=li),Wn=s(e),ke=l(e,"OL",{"data-svelte-h":!0}),c(ke)!=="svelte-1yj0xra"&&(ke.innerHTML=pi),Rn=s(e),Ie=l(e,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1gtojsx"&&(Ie.innerHTML=di),Bn=s(e),m(Ze.$$.fragment,e),Fn=s(e),Ae=l(e,"P",{"data-svelte-h":!0}),c(Ae)!=="svelte-8mkiuz"&&(Ae.innerHTML=ci),Nn=s(e),Se=l(e,"P",{"data-svelte-h":!0}),c(Se)!=="svelte-1vnw3f1"&&(Se.textContent=fi),En=s(e),m(De.$$.fragment,e),Vn=s(e),Ge=l(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-1nomn51"&&(Ge.textContent=mi),Hn=s(e),Le=l(e,"P",{"data-svelte-h":!0}),c(Le)!=="svelte-x98fz5"&&(Le.innerHTML=gi),Qn=s(e),Pe=l(e,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-1al420d"&&(Pe.textContent=ui),Yn=s(e),m(Xe.$$.fragment,e),zn=s(e),We=l(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-yyug88"&&(We.textContent=hi),qn=s(e),m(Re.$$.fragment,e),On=s(e),Be=l(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-b2o0wp"&&(Be.innerHTML=_i),Kn=s(e),m(Fe.$$.fragment,e),ea=s(e),Ne=l(e,"P",{"data-svelte-h":!0}),c(Ne)!=="svelte-1y2wyg6"&&(Ne.innerHTML=bi),ta=s(e),Ee=l(e,"OL",{"data-svelte-h":!0}),c(Ee)!=="svelte-j8d5w5"&&(Ee.innerHTML=yi),na=s(e),Ve=l(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-1q04fzy"&&(Ve.innerHTML=vi),aa=s(e),m(He.$$.fragment,e),sa=s(e),Qe=l(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-1651djs"&&(Qe.innerHTML=wi),ia=s(e),Ye=l(e,"P",{"data-svelte-h":!0}),c(Ye)!=="svelte-1e55rj3"&&(Ye.textContent=Mi),oa=s(e),m(ze.$$.fragment,e),ra=s(e),qe=l(e,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-yyug88"&&(qe.textContent=Ti),la=s(e),m(Oe.$$.fragment,e),pa=s(e),Ke=l(e,"P",{"data-svelte-h":!0}),c(Ke)!=="svelte-1qebwe0"&&(Ke.innerHTML=xi),da=s(e),m(et.$$.fragment,e),ca=s(e),tt=l(e,"P",{"data-svelte-h":!0}),c(tt)!=="svelte-qop6by"&&(tt.innerHTML=Ui),fa=s(e),m(nt.$$.fragment,e),ma=s(e),at=l(e,"TABLE",{"data-svelte-h":!0}),c(at)!=="svelte-1l9s9j"&&(at.innerHTML=$i),ga=s(e),m(st.$$.fragment,e),ua=s(e),it=l(e,"P",{"data-svelte-h":!0}),c(it)!=="svelte-1uq2woy"&&(it.innerHTML=Ji),ha=s(e),ot=l(e,"P",{"data-svelte-h":!0}),c(ot)!=="svelte-1huix7d"&&(ot.textContent=Ci),_a=s(e),m(rt.$$.fragment,e),ba=s(e),lt=l(e,"P",{"data-svelte-h":!0}),c(lt)!=="svelte-aevisk"&&(lt.textContent=ji),ya=s(e),pt=l(e,"P",{"data-svelte-h":!0}),c(pt)!=="svelte-1k4lejl"&&(pt.innerHTML=ki),va=s(e),dt=l(e,"P",{"data-svelte-h":!0}),c(dt)!=="svelte-1aigb0j"&&(dt.innerHTML=Ii),wa=s(e),ct=l(e,"P",{"data-svelte-h":!0}),c(ct)!=="svelte-blouap"&&(ct.innerHTML=Zi),Ma=s(e),m(ft.$$.fragment,e),Ta=s(e),mt=l(e,"P",{"data-svelte-h":!0}),c(mt)!=="svelte-1ec5fzf"&&(mt.innerHTML=Ai),xa=s(e),m(gt.$$.fragment,e),Ua=s(e),ut=l(e,"P",{"data-svelte-h":!0}),c(ut)!=="svelte-70729v"&&(ut.innerHTML=Si),$a=s(e),m(ht.$$.fragment,e),Ja=s(e),T=l(e,"DIV",{class:!0});var $=J(T);m(_t.$$.fragment,$),Na=s($),Yt=l($,"P",{"data-svelte-h":!0}),c(Yt)!=="svelte-1pw3838"&&(Yt.innerHTML=Di),Ea=s($),zt=l($,"P",{"data-svelte-h":!0}),c(zt)!=="svelte-wu1jmh"&&(zt.innerHTML=Gi),Va=s($),B=l($,"DIV",{class:!0});var E=J(B);m(bt.$$.fragment,E),Ha=s(E),qt=l(E,"P",{"data-svelte-h":!0}),c(qt)!=="svelte-v78lg8"&&(qt.textContent=Li),Qa=s(E),m(V.$$.fragment,E),E.forEach(t),Ya=s($),Z=l($,"DIV",{class:!0});var P=J(Z);m(yt.$$.fragment,P),za=s(P),Ot=l(P,"P",{"data-svelte-h":!0}),c(Ot)!=="svelte-10jaql7"&&(Ot.textContent=Pi),qa=s(P),m(H.$$.fragment,P),Oa=s(P),m(Q.$$.fragment,P),P.forEach(t),Ka=s($),Y=l($,"DIV",{class:!0});var Nt=J(Y);m(vt.$$.fragment,Nt),es=s(Nt),Kt=l(Nt,"P",{"data-svelte-h":!0}),c(Kt)!=="svelte-1lh0nh5"&&(Kt.innerHTML=Xi),Nt.forEach(t),ts=s($),z=l($,"DIV",{class:!0});var Et=J(z);m(wt.$$.fragment,Et),ns=s(Et),en=l(Et,"P",{"data-svelte-h":!0}),c(en)!=="svelte-14bnrb6"&&(en.textContent=Wi),Et.forEach(t),as=s($),q=l($,"DIV",{class:!0});var Vt=J(q);m(Mt.$$.fragment,Vt),ss=s(Vt),tn=l(Vt,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-1s3c06i"&&(tn.innerHTML=Ri),Vt.forEach(t),is=s($),A=l($,"DIV",{class:!0});var X=J(A);m(Tt.$$.fragment,X),os=s(X),nn=l(X,"P",{"data-svelte-h":!0}),c(nn)!=="svelte-e03q3e"&&(nn.innerHTML=Bi),rs=s(X),m(O.$$.fragment,X),ls=s(X),m(K.$$.fragment,X),X.forEach(t),ps=s($),ee=l($,"DIV",{class:!0});var Ht=J(ee);m(xt.$$.fragment,Ht),ds=s(Ht),an=l(Ht,"P",{"data-svelte-h":!0}),c(an)!=="svelte-1vfte1e"&&(an.innerHTML=Fi),Ht.forEach(t),cs=s($),te=l($,"DIV",{class:!0});var Qt=J(te);m(Ut.$$.fragment,Qt),fs=s(Qt),sn=l(Qt,"P",{"data-svelte-h":!0}),c(sn)!=="svelte-psupw6"&&(sn.textContent=Ni),Qt.forEach(t),ms=s($),S=l($,"DIV",{class:!0});var W=J(S);m($t.$$.fragment,W),gs=s(W),on=l(W,"P",{"data-svelte-h":!0}),c(on)!=="svelte-1f3tmq1"&&(on.innerHTML=Ei),us=s(W),rn=l(W,"P",{"data-svelte-h":!0}),c(rn)!=="svelte-xjijlp"&&(rn.textContent=Vi),hs=s(W),ln=l(W,"P",{"data-svelte-h":!0}),c(ln)!=="svelte-hy0nzs"&&(ln.innerHTML=Hi),W.forEach(t),_s=s($),ne=l($,"DIV",{class:!0});var Za=J(ne);m(Jt.$$.fragment,Za),bs=s(Za),pn=l(Za,"P",{"data-svelte-h":!0}),c(pn)!=="svelte-16q0ax1"&&(pn.textContent=Qi),Za.forEach(t),ys=s($),ae=l($,"DIV",{class:!0});var Aa=J(ae);m(Ct.$$.fragment,Aa),vs=s(Aa),dn=l(Aa,"P",{"data-svelte-h":!0}),c(dn)!=="svelte-vo59ec"&&(dn.innerHTML=Yi),Aa.forEach(t),$.forEach(t),Ca=s(e),m(jt.$$.fragment,e),ja=s(e),w=l(e,"DIV",{class:!0});var x=J(w);m(kt.$$.fragment,x),ws=s(x),cn=l(x,"P",{"data-svelte-h":!0}),c(cn)!=="svelte-1pw3838"&&(cn.innerHTML=zi),Ms=s(x),fn=l(x,"P",{"data-svelte-h":!0}),c(fn)!=="svelte-wu1jmh"&&(fn.innerHTML=qi),Ts=s(x),F=l(x,"DIV",{class:!0});var Cn=J(F);m(It.$$.fragment,Cn),xs=s(Cn),mn=l(Cn,"P",{"data-svelte-h":!0}),c(mn)!=="svelte-v78lg8"&&(mn.textContent=Oi),Us=s(Cn),m(se.$$.fragment,Cn),Cn.forEach(t),$s=s(x),D=l(x,"DIV",{class:!0});var be=J(D);m(Zt.$$.fragment,be),Js=s(be),gn=l(be,"P",{"data-svelte-h":!0}),c(gn)!=="svelte-10jaql7"&&(gn.textContent=Ki),Cs=s(be),m(ie.$$.fragment,be),js=s(be),m(oe.$$.fragment,be),be.forEach(t),ks=s(x),re=l(x,"DIV",{class:!0});var Sa=J(re);m(At.$$.fragment,Sa),Is=s(Sa),un=l(Sa,"P",{"data-svelte-h":!0}),c(un)!=="svelte-1lh0nh5"&&(un.innerHTML=eo),Sa.forEach(t),Zs=s(x),le=l(x,"DIV",{class:!0});var Da=J(le);m(St.$$.fragment,Da),As=s(Da),hn=l(Da,"P",{"data-svelte-h":!0}),c(hn)!=="svelte-14bnrb6"&&(hn.textContent=to),Da.forEach(t),Ss=s(x),pe=l(x,"DIV",{class:!0});var Ga=J(pe);m(Dt.$$.fragment,Ga),Ds=s(Ga),_n=l(Ga,"P",{"data-svelte-h":!0}),c(_n)!=="svelte-1s3c06i"&&(_n.innerHTML=no),Ga.forEach(t),Gs=s(x),G=l(x,"DIV",{class:!0});var ye=J(G);m(Gt.$$.fragment,ye),Ls=s(ye),bn=l(ye,"P",{"data-svelte-h":!0}),c(bn)!=="svelte-e03q3e"&&(bn.innerHTML=ao),Ps=s(ye),m(de.$$.fragment,ye),Xs=s(ye),m(ce.$$.fragment,ye),ye.forEach(t),Ws=s(x),fe=l(x,"DIV",{class:!0});var La=J(fe);m(Lt.$$.fragment,La),Rs=s(La),yn=l(La,"P",{"data-svelte-h":!0}),c(yn)!=="svelte-1vfte1e"&&(yn.innerHTML=so),La.forEach(t),Bs=s(x),me=l(x,"DIV",{class:!0});var Pa=J(me);m(Pt.$$.fragment,Pa),Fs=s(Pa),vn=l(Pa,"P",{"data-svelte-h":!0}),c(vn)!=="svelte-psupw6"&&(vn.textContent=io),Pa.forEach(t),Ns=s(x),ge=l(x,"DIV",{class:!0});var Xa=J(ge);m(Xt.$$.fragment,Xa),Es=s(Xa),wn=l(Xa,"P",{"data-svelte-h":!0}),c(wn)!=="svelte-pkn4ui"&&(wn.innerHTML=oo),Xa.forEach(t),Vs=s(x),L=l(x,"DIV",{class:!0});var ve=J(L);m(Wt.$$.fragment,ve),Hs=s(ve),Mn=l(ve,"P",{"data-svelte-h":!0}),c(Mn)!=="svelte-1f3tmq1"&&(Mn.innerHTML=ro),Qs=s(ve),Tn=l(ve,"P",{"data-svelte-h":!0}),c(Tn)!=="svelte-xjijlp"&&(Tn.textContent=lo),Ys=s(ve),xn=l(ve,"P",{"data-svelte-h":!0}),c(xn)!=="svelte-hy0nzs"&&(xn.innerHTML=po),ve.forEach(t),zs=s(x),ue=l(x,"DIV",{class:!0});var Wa=J(ue);m(Rt.$$.fragment,Wa),qs=s(Wa),Un=l(Wa,"P",{"data-svelte-h":!0}),c(Un)!=="svelte-1xwrf7t"&&(Un.textContent=co),Wa.forEach(t),Os=s(x),he=l(x,"DIV",{class:!0});var Ra=J(he);m(Bt.$$.fragment,Ra),Ks=s(Ra),$n=l(Ra,"P",{"data-svelte-h":!0}),c($n)!=="svelte-16q0ax1"&&($n.textContent=fo),Ra.forEach(t),ei=s(x),_e=l(x,"DIV",{class:!0});var Ba=J(_e);m(Ft.$$.fragment,Ba),ti=s(Ba),Jn=l(Ba,"P",{"data-svelte-h":!0}),c(Jn)!=="svelte-vo59ec"&&(Jn.innerHTML=mo),Ba.forEach(t),x.forEach(t),ka=s(e),kn=l(e,"P",{}),J(kn).forEach(t),this.h()},h(){C(d,"name","hf:doc:metadata"),C(d,"content",ko),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(T,"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(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(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(pe,"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(w,"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,d),o(e,M,n),o(e,y,n),o(e,b,n),g(v,e,n),o(e,p,n),g(U,e,n),o(e,In,n),o(e,we,n),o(e,Zn,n),o(e,Me,n),o(e,An,n),o(e,Te,n),o(e,Sn,n),o(e,xe,n),o(e,Dn,n),o(e,Ue,n),o(e,Gn,n),g($e,e,n),o(e,Ln,n),o(e,Je,n),o(e,Pn,n),g(Ce,e,n),o(e,Xn,n),o(e,je,n),o(e,Wn,n),o(e,ke,n),o(e,Rn,n),o(e,Ie,n),o(e,Bn,n),g(Ze,e,n),o(e,Fn,n),o(e,Ae,n),o(e,Nn,n),o(e,Se,n),o(e,En,n),g(De,e,n),o(e,Vn,n),o(e,Ge,n),o(e,Hn,n),o(e,Le,n),o(e,Qn,n),o(e,Pe,n),o(e,Yn,n),g(Xe,e,n),o(e,zn,n),o(e,We,n),o(e,qn,n),g(Re,e,n),o(e,On,n),o(e,Be,n),o(e,Kn,n),g(Fe,e,n),o(e,ea,n),o(e,Ne,n),o(e,ta,n),o(e,Ee,n),o(e,na,n),o(e,Ve,n),o(e,aa,n),g(He,e,n),o(e,sa,n),o(e,Qe,n),o(e,ia,n),o(e,Ye,n),o(e,oa,n),g(ze,e,n),o(e,ra,n),o(e,qe,n),o(e,la,n),g(Oe,e,n),o(e,pa,n),o(e,Ke,n),o(e,da,n),g(et,e,n),o(e,ca,n),o(e,tt,n),o(e,fa,n),g(nt,e,n),o(e,ma,n),o(e,at,n),o(e,ga,n),g(st,e,n),o(e,ua,n),o(e,it,n),o(e,ha,n),o(e,ot,n),o(e,_a,n),g(rt,e,n),o(e,ba,n),o(e,lt,n),o(e,ya,n),o(e,pt,n),o(e,va,n),o(e,dt,n),o(e,wa,n),o(e,ct,n),o(e,Ma,n),g(ft,e,n),o(e,Ta,n),o(e,mt,n),o(e,xa,n),g(gt,e,n),o(e,Ua,n),o(e,ut,n),o(e,$a,n),g(ht,e,n),o(e,Ja,n),o(e,T,n),g(_t,T,null),i(T,Na),i(T,Yt),i(T,Ea),i(T,zt),i(T,Va),i(T,B),g(bt,B,null),i(B,Ha),i(B,qt),i(B,Qa),g(V,B,null),i(T,Ya),i(T,Z),g(yt,Z,null),i(Z,za),i(Z,Ot),i(Z,qa),g(H,Z,null),i(Z,Oa),g(Q,Z,null),i(T,Ka),i(T,Y),g(vt,Y,null),i(Y,es),i(Y,Kt),i(T,ts),i(T,z),g(wt,z,null),i(z,ns),i(z,en),i(T,as),i(T,q),g(Mt,q,null),i(q,ss),i(q,tn),i(T,is),i(T,A),g(Tt,A,null),i(A,os),i(A,nn),i(A,rs),g(O,A,null),i(A,ls),g(K,A,null),i(T,ps),i(T,ee),g(xt,ee,null),i(ee,ds),i(ee,an),i(T,cs),i(T,te),g(Ut,te,null),i(te,fs),i(te,sn),i(T,ms),i(T,S),g($t,S,null),i(S,gs),i(S,on),i(S,us),i(S,rn),i(S,hs),i(S,ln),i(T,_s),i(T,ne),g(Jt,ne,null),i(ne,bs),i(ne,pn),i(T,ys),i(T,ae),g(Ct,ae,null),i(ae,vs),i(ae,dn),o(e,Ca,n),g(jt,e,n),o(e,ja,n),o(e,w,n),g(kt,w,null),i(w,ws),i(w,cn),i(w,Ms),i(w,fn),i(w,Ts),i(w,F),g(It,F,null),i(F,xs),i(F,mn),i(F,Us),g(se,F,null),i(w,$s),i(w,D),g(Zt,D,null),i(D,Js),i(D,gn),i(D,Cs),g(ie,D,null),i(D,js),g(oe,D,null),i(w,ks),i(w,re),g(At,re,null),i(re,Is),i(re,un),i(w,Zs),i(w,le),g(St,le,null),i(le,As),i(le,hn),i(w,Ss),i(w,pe),g(Dt,pe,null),i(pe,Ds),i(pe,_n),i(w,Gs),i(w,G),g(Gt,G,null),i(G,Ls),i(G,bn),i(G,Ps),g(de,G,null),i(G,Xs),g(ce,G,null),i(w,Ws),i(w,fe),g(Lt,fe,null),i(fe,Rs),i(fe,yn),i(w,Bs),i(w,me),g(Pt,me,null),i(me,Fs),i(me,vn),i(w,Ns),i(w,ge),g(Xt,ge,null),i(ge,Es),i(ge,wn),i(w,Vs),i(w,L),g(Wt,L,null),i(L,Hs),i(L,Mn),i(L,Qs),i(L,Tn),i(L,Ys),i(L,xn),i(w,zs),i(w,ue),g(Rt,ue,null),i(ue,qs),i(ue,Un),i(w,Os),i(w,he),g(Bt,he,null),i(he,Ks),i(he,$n),i(w,ei),i(w,_e),g(Ft,_e,null),i(_e,ti),i(_e,Jn),o(e,ka,n),o(e,kn,n),Ia=!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}),de.$set(Qt);const W={};n&2&&(W.$$scope={dirty:n,ctx:e}),ce.$set(W)},i(e){Ia||(u(v.$$.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(rt.$$.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(de.$$.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),Ia=!0)},o(e){h(v.$$.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(rt.$$.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(de.$$.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),Ia=!1},d(e){e&&(t(M),t(y),t(b),t(p),t(In),t(we),t(Zn),t(Me),t(An),t(Te),t(Sn),t(xe),t(Dn),t(Ue),t(Gn),t(Ln),t(Je),t(Pn),t(Xn),t(je),t(Wn),t(ke),t(Rn),t(Ie),t(Bn),t(Fn),t(Ae),t(Nn),t(Se),t(En),t(Vn),t(Ge),t(Hn),t(Le),t(Qn),t(Pe),t(Yn),t(zn),t(We),t(qn),t(On),t(Be),t(Kn),t(ea),t(Ne),t(ta),t(Ee),t(na),t(Ve),t(aa),t(sa),t(Qe),t(ia),t(Ye),t(oa),t(ra),t(qe),t(la),t(pa),t(Ke),t(da),t(ca),t(tt),t(fa),t(ma),t(at),t(ga),t(ua),t(it),t(ha),t(ot),t(_a),t(ba),t(lt),t(ya),t(pt),t(va),t(dt),t(wa),t(ct),t(Ma),t(Ta),t(mt),t(xa),t(Ua),t(ut),t($a),t(Ja),t(T),t(Ca),t(ja),t(w),t(ka),t(kn)),t(d),_(v,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),_(rt,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),_(de),_(ce),_(Lt),_(Pt),_(Xt),_(Wt),_(Rt),_(Bt),_(Ft)}}}const ko='{"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 Io(k){return uo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xo extends ho{constructor(d){super(),_o(this,d,Io,jo,go,{})}}export{Xo as component};
