import{s as mi,o as gi,n as R}from"../chunks/scheduler.182ea377.js";import{S as ui,i as hi,g as p,s as a,r as g,A as _i,h as d,f as n,c as s,j as I,u,x as c,k as Z,y as l,a as i,v as h,d as _,t as b,w as y}from"../chunks/index.abf12888.js";import{T as ua}from"../chunks/Tip.230e2334.js";import{D as C}from"../chunks/Docstring.93f6f462.js";import{C as k}from"../chunks/CodeBlock.57fe6e13.js";import{E as sn}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as P}from"../chunks/Heading.16916d63.js";function bi($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function yi($){let r,v=`⚠️ 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(){r=p("p"),r.innerHTML=v},l(m){r=d(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-ackzsn"&&(r.innerHTML=v)},m(m,f){i(m,r,f)},p:R,d(m){m&&n(r)}}}function wi($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function vi($){let r,v=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){r=p("p"),r.textContent=v},l(m){r=d(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-17p1lpg"&&(r.textContent=v)},m(m,f){i(m,r,f)},p:R,d(m){m&&n(r)}}}function Mi($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function Ti($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function xi($){let r,v=`⚠️ 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(){r=p("p"),r.innerHTML=v},l(m){r=d(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-ackzsn"&&(r.innerHTML=v)},m(m,f){i(m,r,f)},p:R,d(m){m&&n(r)}}}function Ji($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function Ui($){let r,v=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){r=p("p"),r.textContent=v},l(m){r=d(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-17p1lpg"&&(r.textContent=v)},m(m,f){i(m,r,f)},p:R,d(m){m&&n(r)}}}function $i($){let r,v="Examples:",m,f,w;return f=new k({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(){r=p("p"),r.textContent=v,m=a(),g(f.$$.fragment)},l(o){r=d(o,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=v),m=s(o),u(f.$$.fragment,o)},m(o,M){i(o,r,M),i(o,m,M),h(f,o,M),w=!0},p:R,i(o){w||(_(f.$$.fragment,o),w=!0)},o(o){b(f.$$.fragment,o),w=!1},d(o){o&&(n(r),n(m)),y(f,o)}}}function Ii($){let r,v,m,f,w,o,M,ln,me,fs='<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.',rn,ge,ms="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.",pn,ue,gs="The abstract of the paper is the following:",dn,he,us="<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 structure control 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 small T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, and achieve rich control and editing effects. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications.</em>",cn,_e,hs='This model was contributed by the community contributor <a href="https://github.com/HimariO" rel="nofollow">HimariO</a> ❤️ .',fn,be,mn,ye,_s='<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/stable_diffusion/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/stable_diffusion/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>',gn,we,un,ve,bs=`In the following we give a simple example of how to use a <em>T2IAdapter</em> checkpoint with Diffusers for inference based on StableDiffusion-1.4/1.5.
All adapters use the same pipeline.`,hn,Me,ys='<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>',_n,Te,ws='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,xe,yn,Je,vs='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png" alt="img"/>',wn,Ue,Ms="Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size.",vn,$e,Mn,Ie,Ts="Let’s take a look at the processed image.",Tn,Ze,xs='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png" alt="img"/>',xn,Ce,Js="Next, create the adapter pipeline",Jn,ke,Un,je,Us="Finally, pass the prompt and control image to the pipeline",$n,Ae,In,Ge,$s='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png" alt="img"/>',Zn,Se,Cn,De,Is=`In the following we give a simple example of how to use a <em>T2IAdapter</em> checkpoint with Diffusers for inference based on StableDiffusion-XL.
All adapters use the same pipeline.`,kn,Le,Zs='<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>',jn,Pe,Cs='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>.',An,Xe,Gn,We,ks='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch.png" alt="img"/>',Sn,Re,js="Then, create the adapter pipeline",Dn,Ne,Ln,Be,As="Finally, pass the prompt and control image to the pipeline",Pn,Fe,Xn,Ve,Gs='<img src="https://huggingface.co/Adapter/t2iadapter/resolve/main/sketch_output.png" alt="img"/>',Wn,Ee,Rn,Qe,Ss='Non-diffusers checkpoints can be found under <a href="https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models" rel="nofollow">TencentARC/T2I-Adapter</a>.',Nn,He,Bn,Ye,Ds='<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>A 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>',Fn,ze,Vn,qe,Ls="<code>MultiAdapter</code> can be used for applying multiple conditionings at once.",En,Oe,Ps="Here we use the keypose adapter for the character posture and the depth adapter for creating the scene.",Qn,Ke,Hn,et,Xs="The two control images look as such:",Yn,tt,Ws='<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"/>',zn,nt,Rs="<code>MultiAdapter</code> combines keypose and depth adapters.",qn,at,Ns="<code>adapter_conditioning_scale</code> balances the relative influence of the different adapters.",On,st,Kn,it,Bs='<img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png" alt="img"/>',ea,ot,ta,lt,Fs=`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.`,na,rt,aa,J,pt,ha,St,Vs=`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>`,_a,Dt,Es=`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.)`,ba,X,dt,ya,Lt,Qs="Function invoked when calling the pipeline for generation.",wa,B,va,j,ct,Ma,Pt,Hs=`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.`,Ta,F,xa,V,Ja,E,ft,Ua,Xt,Ys=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,$a,Q,mt,Ia,Wt,zs=`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.`,Za,H,gt,Ca,Rt,qs=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,ka,A,ut,ja,Nt,Os=`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.`,Aa,Y,Ga,z,Sa,q,ht,Da,Bt,Ks='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',La,O,_t,Pa,Ft,ei="Encodes the prompt into text encoder hidden states.",sa,bt,ia,T,yt,Xa,Vt,ti=`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>`,Wa,Et,ni=`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.)`,Ra,W,wt,Na,Qt,ai="Function invoked when calling the pipeline for generation.",Ba,K,Fa,G,vt,Va,Ht,si=`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.`,Ea,ee,Qa,te,Ha,ne,Mt,Ya,Yt,ii=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,za,ae,Tt,qa,zt,oi=`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.`,Oa,se,xt,Ka,qt,li=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,es,S,Jt,ts,Ot,ri=`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.`,ns,ie,as,oe,ss,le,Ut,is,Kt,pi='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',os,re,$t,ls,en,di=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,rs,pe,It,ps,tn,ci=`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.`,ds,de,Zt,cs,nn,fi="Encodes the prompt into text encoder hidden states.",oa,on,la;return w=new P({props:{title:"Text-to-Image Generation with Adapter Conditioning",local:"text-to-image-generation-with-adapter-conditioning",headingTag:"h1"}}),M=new P({props:{title:"Overview",local:"overview",headingTag:"h2"}}),be=new P({props:{title:"Available Pipelines:",local:"available-pipelines",headingTag:"h2"}}),we=new P({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"}}),xe=new k({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGY29sb3JfcmVmLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>)`,wrap:!1}}),$e=new k({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}}),ke=new k({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}}),Ae=new k({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg3KSUwQSUwQW91dF9pbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIyQXQlMjBuaWdodCUyQyUyMGdsb3dpbmclMjBjdWJlcyUyMGluJTIwZnJvbnQlMjBvZiUyMHRoZSUyMGJlYWNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0Rjb2xvcl9wYWxldHRlJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-comment"># fix the random seed, so you will get the same result as the example</span>
generator = torch.manual_seed(<span class="hljs-number">7</span>)

out_image = pipe(
    <span class="hljs-string">&quot;At night, glowing cubes in front of the beach&quot;</span>,
    image=color_palette,
    generator=generator,
).images[<span class="hljs-number">0</span>]`,wrap:!1}}),Se=new P({props:{title:"Usage example with the base model of StableDiffusion-XL",local:"usage-example-with-the-base-model-of-stablediffusion-xl",headingTag:"h2"}}),Xe=new k({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFza2V0Y2hfaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZBZGFwdGVyJTJGdDJpYWRhcHRlciUyRnJlc29sdmUlMkZtYWluJTJGc2tldGNoLnBuZyUyMikuY29udmVydCglMjJMJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

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

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

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

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

sketch_image_out = pipe(
    prompt=<span class="hljs-string">&quot;a photo of a dog in real world, high quality&quot;</span>, 
    negative_prompt=<span class="hljs-string">&quot;extra digit, fewer digits, cropped, worst quality, low quality&quot;</span>, 
    image=sketch_image, 
    generator=generator, 
    guidance_scale=<span class="hljs-number">7.5</span>
).images[<span class="hljs-number">0</span>]`,wrap:!1}}),Ee=new P({props:{title:"Available checkpoints",local:"available-checkpoints",headingTag:"h2"}}),He=new P({props:{title:"T2I-Adapter with Stable Diffusion 1.4",local:"t2i-adapter-with-stable-diffusion-14",headingTag:"h3"}}),ze=new P({props:{title:"Combining multiple adapters",local:"combining-multiple-adapters",headingTag:"h2"}}),Ke=new k({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWNvbmRfa2V5cG9zZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGa2V5cG9zZV9zYW1wbGVfaW5wdXQucG5nJTIyJTBBKSUwQWNvbmRfZGVwdGglMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmRlcHRoX3NhbXBsZV9pbnB1dC5wbmclMjIlMEEpJTBBY29uZCUyMCUzRCUyMCU1QiU1QmNvbmRfa2V5cG9zZSUyQyUyMGNvbmRfZGVwdGglNUQlNUQlMEElMEFwcm9tcHQlMjAlM0QlMjAlNUIlMjJBJTIwbWFuJTIwd2Fsa2luZyUyMGluJTIwYW4lMjBvZmZpY2UlMjByb29tJTIwd2l0aCUyMGElMjBuaWNlJTIwdmlldyUyMiU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

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

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

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

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

images = pipe(prompt, cond, adapter_conditioning_scale=[<span class="hljs-number">0.8</span>, <span class="hljs-number">0.8</span>])`,wrap:!1}}),ot=new P({props:{title:"T2I Adapter vs ControlNet",local:"t2i-adapter-vs-controlnet",headingTag:"h2"}}),rt=new P({props:{title:"StableDiffusionAdapterPipeline",local:"diffusers.StableDiffusionAdapterPipeline",headingTag:"h2"}}),pt=new C({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#L120"}}),dt=new C({props:{name:"__call__",anchor:"diffusers.StableDiffusionAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{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__.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#L584",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>
`}}),B=new sn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[bi]},$$scope:{ctx:$}}}),ct=new C({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#L1925"}}),F=new ua({props:{warning:!0,$$slots:{default:[yi]},$$scope:{ctx:$}}}),V=new sn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[wi]},$$scope:{ctx:$}}}),ft=new C({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#L1965"}}),mt=new C({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L205"}}),gt=new C({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L213"}}),ut=new C({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#L1864"}}),Y=new ua({props:{warning:!0,$$slots:{default:[vi]},$$scope:{ctx:$}}}),z=new sn({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Mi]},$$scope:{ctx:$}}}),ht=new C({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#L1899"}}),_t=new C({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#L254"}}),bt=new P({props:{title:"StableDiffusionXLAdapterPipeline",local:"diffusers.StableDiffusionXLAdapterPipeline",headingTag:"h2"}}),yt=new C({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#L119"}}),wt=new C({props:{name:"__call__",anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"denoising_end",val:": typing.Optional[float] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_original_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"negative_crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"negative_target_size",val:": typing.Union[typing.Tuple[int, int], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"},{name:"adapter_conditioning_factor",val:": float = 1.0"},{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__.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#L610",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>
`}}),K=new sn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[Ti]},$$scope:{ctx:$}}}),vt=new C({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#L1925"}}),ee=new ua({props:{warning:!0,$$slots:{default:[xi]},$$scope:{ctx:$}}}),te=new sn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Ji]},$$scope:{ctx:$}}}),Mt=new C({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#L1965"}}),Tt=new C({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#L187"}}),xt=new C({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#L195"}}),Jt=new C({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#L1864"}}),ie=new ua({props:{warning:!0,$$slots:{default:[Ui]},$$scope:{ctx:$}}}),oe=new sn({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[$i]},$$scope:{ctx:$}}}),Ut=new C({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#L1899"}}),$t=new C({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#L212"}}),It=new C({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#L203"}}),Zt=new C({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#L220"}}),{c(){r=p("meta"),v=a(),m=p("p"),f=a(),g(w.$$.fragment),o=a(),g(M.$$.fragment),ln=a(),me=p("p"),me.innerHTML=fs,rn=a(),ge=p("p"),ge.textContent=ms,pn=a(),ue=p("p"),ue.textContent=gs,dn=a(),he=p("p"),he.innerHTML=us,cn=a(),_e=p("p"),_e.innerHTML=hs,fn=a(),g(be.$$.fragment),mn=a(),ye=p("table"),ye.innerHTML=_s,gn=a(),g(we.$$.fragment),un=a(),ve=p("p"),ve.innerHTML=bs,hn=a(),Me=p("ol"),Me.innerHTML=ys,_n=a(),Te=p("p"),Te.innerHTML=ws,bn=a(),g(xe.$$.fragment),yn=a(),Je=p("p"),Je.innerHTML=vs,wn=a(),Ue=p("p"),Ue.textContent=Ms,vn=a(),g($e.$$.fragment),Mn=a(),Ie=p("p"),Ie.textContent=Ts,Tn=a(),Ze=p("p"),Ze.innerHTML=xs,xn=a(),Ce=p("p"),Ce.textContent=Js,Jn=a(),g(ke.$$.fragment),Un=a(),je=p("p"),je.textContent=Us,$n=a(),g(Ae.$$.fragment),In=a(),Ge=p("p"),Ge.innerHTML=$s,Zn=a(),g(Se.$$.fragment),Cn=a(),De=p("p"),De.innerHTML=Is,kn=a(),Le=p("ol"),Le.innerHTML=Zs,jn=a(),Pe=p("p"),Pe.innerHTML=Cs,An=a(),g(Xe.$$.fragment),Gn=a(),We=p("p"),We.innerHTML=ks,Sn=a(),Re=p("p"),Re.textContent=js,Dn=a(),g(Ne.$$.fragment),Ln=a(),Be=p("p"),Be.textContent=As,Pn=a(),g(Fe.$$.fragment),Xn=a(),Ve=p("p"),Ve.innerHTML=Gs,Wn=a(),g(Ee.$$.fragment),Rn=a(),Qe=p("p"),Qe.innerHTML=Ss,Nn=a(),g(He.$$.fragment),Bn=a(),Ye=p("table"),Ye.innerHTML=Ds,Fn=a(),g(ze.$$.fragment),Vn=a(),qe=p("p"),qe.innerHTML=Ls,En=a(),Oe=p("p"),Oe.textContent=Ps,Qn=a(),g(Ke.$$.fragment),Hn=a(),et=p("p"),et.textContent=Xs,Yn=a(),tt=p("p"),tt.innerHTML=Ws,zn=a(),nt=p("p"),nt.innerHTML=Rs,qn=a(),at=p("p"),at.innerHTML=Ns,On=a(),g(st.$$.fragment),Kn=a(),it=p("p"),it.innerHTML=Bs,ea=a(),g(ot.$$.fragment),ta=a(),lt=p("p"),lt.innerHTML=Fs,na=a(),g(rt.$$.fragment),aa=a(),J=p("div"),g(pt.$$.fragment),ha=a(),St=p("p"),St.innerHTML=Vs,_a=a(),Dt=p("p"),Dt.innerHTML=Es,ba=a(),X=p("div"),g(dt.$$.fragment),ya=a(),Lt=p("p"),Lt.textContent=Qs,wa=a(),g(B.$$.fragment),va=a(),j=p("div"),g(ct.$$.fragment),Ma=a(),Pt=p("p"),Pt.textContent=Hs,Ta=a(),g(F.$$.fragment),xa=a(),g(V.$$.fragment),Ja=a(),E=p("div"),g(ft.$$.fragment),Ua=a(),Xt=p("p"),Xt.innerHTML=Ys,$a=a(),Q=p("div"),g(mt.$$.fragment),Ia=a(),Wt=p("p"),Wt.textContent=zs,Za=a(),H=p("div"),g(gt.$$.fragment),Ca=a(),Rt=p("p"),Rt.innerHTML=qs,ka=a(),A=p("div"),g(ut.$$.fragment),ja=a(),Nt=p("p"),Nt.innerHTML=Os,Aa=a(),g(Y.$$.fragment),Ga=a(),g(z.$$.fragment),Sa=a(),q=p("div"),g(ht.$$.fragment),Da=a(),Bt=p("p"),Bt.innerHTML=Ks,La=a(),O=p("div"),g(_t.$$.fragment),Pa=a(),Ft=p("p"),Ft.textContent=ei,sa=a(),g(bt.$$.fragment),ia=a(),T=p("div"),g(yt.$$.fragment),Xa=a(),Vt=p("p"),Vt.innerHTML=ti,Wa=a(),Et=p("p"),Et.innerHTML=ni,Ra=a(),W=p("div"),g(wt.$$.fragment),Na=a(),Qt=p("p"),Qt.textContent=ai,Ba=a(),g(K.$$.fragment),Fa=a(),G=p("div"),g(vt.$$.fragment),Va=a(),Ht=p("p"),Ht.textContent=si,Ea=a(),g(ee.$$.fragment),Qa=a(),g(te.$$.fragment),Ha=a(),ne=p("div"),g(Mt.$$.fragment),Ya=a(),Yt=p("p"),Yt.innerHTML=ii,za=a(),ae=p("div"),g(Tt.$$.fragment),qa=a(),zt=p("p"),zt.textContent=oi,Oa=a(),se=p("div"),g(xt.$$.fragment),Ka=a(),qt=p("p"),qt.innerHTML=li,es=a(),S=p("div"),g(Jt.$$.fragment),ts=a(),Ot=p("p"),Ot.innerHTML=ri,ns=a(),g(ie.$$.fragment),as=a(),g(oe.$$.fragment),ss=a(),le=p("div"),g(Ut.$$.fragment),is=a(),Kt=p("p"),Kt.innerHTML=pi,os=a(),re=p("div"),g($t.$$.fragment),ls=a(),en=p("p"),en.innerHTML=di,rs=a(),pe=p("div"),g(It.$$.fragment),ps=a(),tn=p("p"),tn.textContent=ci,ds=a(),de=p("div"),g(Zt.$$.fragment),cs=a(),nn=p("p"),nn.textContent=fi,oa=a(),on=p("p"),this.h()},l(e){const t=_i("svelte-u9bgzb",document.head);r=d(t,"META",{name:!0,content:!0}),t.forEach(n),v=s(e),m=d(e,"P",{}),I(m).forEach(n),f=s(e),u(w.$$.fragment,e),o=s(e),u(M.$$.fragment,e),ln=s(e),me=d(e,"P",{"data-svelte-h":!0}),c(me)!=="svelte-1frzd9j"&&(me.innerHTML=fs),rn=s(e),ge=d(e,"P",{"data-svelte-h":!0}),c(ge)!=="svelte-rz87yd"&&(ge.textContent=ms),pn=s(e),ue=d(e,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-wu27l3"&&(ue.textContent=gs),dn=s(e),he=d(e,"P",{"data-svelte-h":!0}),c(he)!=="svelte-1q9miql"&&(he.innerHTML=us),cn=s(e),_e=d(e,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-1m3nepz"&&(_e.innerHTML=hs),fn=s(e),u(be.$$.fragment,e),mn=s(e),ye=d(e,"TABLE",{"data-svelte-h":!0}),c(ye)!=="svelte-5t7iov"&&(ye.innerHTML=_s),gn=s(e),u(we.$$.fragment,e),un=s(e),ve=d(e,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-1e75dez"&&(ve.innerHTML=bs),hn=s(e),Me=d(e,"OL",{"data-svelte-h":!0}),c(Me)!=="svelte-1yj0xra"&&(Me.innerHTML=ys),_n=s(e),Te=d(e,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-1gtojsx"&&(Te.innerHTML=ws),bn=s(e),u(xe.$$.fragment,e),yn=s(e),Je=d(e,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-8mkiuz"&&(Je.innerHTML=vs),wn=s(e),Ue=d(e,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-1vnw3f1"&&(Ue.textContent=Ms),vn=s(e),u($e.$$.fragment,e),Mn=s(e),Ie=d(e,"P",{"data-svelte-h":!0}),c(Ie)!=="svelte-1nomn51"&&(Ie.textContent=Ts),Tn=s(e),Ze=d(e,"P",{"data-svelte-h":!0}),c(Ze)!=="svelte-x98fz5"&&(Ze.innerHTML=xs),xn=s(e),Ce=d(e,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-1al420d"&&(Ce.textContent=Js),Jn=s(e),u(ke.$$.fragment,e),Un=s(e),je=d(e,"P",{"data-svelte-h":!0}),c(je)!=="svelte-yyug88"&&(je.textContent=Us),$n=s(e),u(Ae.$$.fragment,e),In=s(e),Ge=d(e,"P",{"data-svelte-h":!0}),c(Ge)!=="svelte-b2o0wp"&&(Ge.innerHTML=$s),Zn=s(e),u(Se.$$.fragment,e),Cn=s(e),De=d(e,"P",{"data-svelte-h":!0}),c(De)!=="svelte-frnk8l"&&(De.innerHTML=Is),kn=s(e),Le=d(e,"OL",{"data-svelte-h":!0}),c(Le)!=="svelte-j8d5w5"&&(Le.innerHTML=Zs),jn=s(e),Pe=d(e,"P",{"data-svelte-h":!0}),c(Pe)!=="svelte-1q04fzy"&&(Pe.innerHTML=Cs),An=s(e),u(Xe.$$.fragment,e),Gn=s(e),We=d(e,"P",{"data-svelte-h":!0}),c(We)!=="svelte-1651djs"&&(We.innerHTML=ks),Sn=s(e),Re=d(e,"P",{"data-svelte-h":!0}),c(Re)!=="svelte-1e55rj3"&&(Re.textContent=js),Dn=s(e),u(Ne.$$.fragment,e),Ln=s(e),Be=d(e,"P",{"data-svelte-h":!0}),c(Be)!=="svelte-yyug88"&&(Be.textContent=As),Pn=s(e),u(Fe.$$.fragment,e),Xn=s(e),Ve=d(e,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-1qebwe0"&&(Ve.innerHTML=Gs),Wn=s(e),u(Ee.$$.fragment,e),Rn=s(e),Qe=d(e,"P",{"data-svelte-h":!0}),c(Qe)!=="svelte-qop6by"&&(Qe.innerHTML=Ss),Nn=s(e),u(He.$$.fragment,e),Bn=s(e),Ye=d(e,"TABLE",{"data-svelte-h":!0}),c(Ye)!=="svelte-6239qt"&&(Ye.innerHTML=Ds),Fn=s(e),u(ze.$$.fragment,e),Vn=s(e),qe=d(e,"P",{"data-svelte-h":!0}),c(qe)!=="svelte-1uq2woy"&&(qe.innerHTML=Ls),En=s(e),Oe=d(e,"P",{"data-svelte-h":!0}),c(Oe)!=="svelte-1huix7d"&&(Oe.textContent=Ps),Qn=s(e),u(Ke.$$.fragment,e),Hn=s(e),et=d(e,"P",{"data-svelte-h":!0}),c(et)!=="svelte-aevisk"&&(et.textContent=Xs),Yn=s(e),tt=d(e,"P",{"data-svelte-h":!0}),c(tt)!=="svelte-1k4lejl"&&(tt.innerHTML=Ws),zn=s(e),nt=d(e,"P",{"data-svelte-h":!0}),c(nt)!=="svelte-17bkz9j"&&(nt.innerHTML=Rs),qn=s(e),at=d(e,"P",{"data-svelte-h":!0}),c(at)!=="svelte-blouap"&&(at.innerHTML=Ns),On=s(e),u(st.$$.fragment,e),Kn=s(e),it=d(e,"P",{"data-svelte-h":!0}),c(it)!=="svelte-1ec5fzf"&&(it.innerHTML=Bs),ea=s(e),u(ot.$$.fragment,e),ta=s(e),lt=d(e,"P",{"data-svelte-h":!0}),c(lt)!=="svelte-1o5b21b"&&(lt.innerHTML=Fs),na=s(e),u(rt.$$.fragment,e),aa=s(e),J=d(e,"DIV",{class:!0});var U=I(J);u(pt.$$.fragment,U),ha=s(U),St=d(U,"P",{"data-svelte-h":!0}),c(St)!=="svelte-1pw3838"&&(St.innerHTML=Vs),_a=s(U),Dt=d(U,"P",{"data-svelte-h":!0}),c(Dt)!=="svelte-wu1jmh"&&(Dt.innerHTML=Es),ba=s(U),X=d(U,"DIV",{class:!0});var N=I(X);u(dt.$$.fragment,N),ya=s(N),Lt=d(N,"P",{"data-svelte-h":!0}),c(Lt)!=="svelte-v78lg8"&&(Lt.textContent=Qs),wa=s(N),u(B.$$.fragment,N),N.forEach(n),va=s(U),j=d(U,"DIV",{class:!0});var D=I(j);u(ct.$$.fragment,D),Ma=s(D),Pt=d(D,"P",{"data-svelte-h":!0}),c(Pt)!=="svelte-10jaql7"&&(Pt.textContent=Hs),Ta=s(D),u(F.$$.fragment,D),xa=s(D),u(V.$$.fragment,D),D.forEach(n),Ja=s(U),E=d(U,"DIV",{class:!0});var Ct=I(E);u(ft.$$.fragment,Ct),Ua=s(Ct),Xt=d(Ct,"P",{"data-svelte-h":!0}),c(Xt)!=="svelte-1lh0nh5"&&(Xt.innerHTML=Ys),Ct.forEach(n),$a=s(U),Q=d(U,"DIV",{class:!0});var kt=I(Q);u(mt.$$.fragment,kt),Ia=s(kt),Wt=d(kt,"P",{"data-svelte-h":!0}),c(Wt)!=="svelte-14bnrb6"&&(Wt.textContent=zs),kt.forEach(n),Za=s(U),H=d(U,"DIV",{class:!0});var jt=I(H);u(gt.$$.fragment,jt),Ca=s(jt),Rt=d(jt,"P",{"data-svelte-h":!0}),c(Rt)!=="svelte-1s3c06i"&&(Rt.innerHTML=qs),jt.forEach(n),ka=s(U),A=d(U,"DIV",{class:!0});var L=I(A);u(ut.$$.fragment,L),ja=s(L),Nt=d(L,"P",{"data-svelte-h":!0}),c(Nt)!=="svelte-e03q3e"&&(Nt.innerHTML=Os),Aa=s(L),u(Y.$$.fragment,L),Ga=s(L),u(z.$$.fragment,L),L.forEach(n),Sa=s(U),q=d(U,"DIV",{class:!0});var At=I(q);u(ht.$$.fragment,At),Da=s(At),Bt=d(At,"P",{"data-svelte-h":!0}),c(Bt)!=="svelte-1vfte1e"&&(Bt.innerHTML=Ks),At.forEach(n),La=s(U),O=d(U,"DIV",{class:!0});var Gt=I(O);u(_t.$$.fragment,Gt),Pa=s(Gt),Ft=d(Gt,"P",{"data-svelte-h":!0}),c(Ft)!=="svelte-16q0ax1"&&(Ft.textContent=ei),Gt.forEach(n),U.forEach(n),sa=s(e),u(bt.$$.fragment,e),ia=s(e),T=d(e,"DIV",{class:!0});var x=I(T);u(yt.$$.fragment,x),Xa=s(x),Vt=d(x,"P",{"data-svelte-h":!0}),c(Vt)!=="svelte-1pw3838"&&(Vt.innerHTML=ti),Wa=s(x),Et=d(x,"P",{"data-svelte-h":!0}),c(Et)!=="svelte-wu1jmh"&&(Et.innerHTML=ni),Ra=s(x),W=d(x,"DIV",{class:!0});var an=I(W);u(wt.$$.fragment,an),Na=s(an),Qt=d(an,"P",{"data-svelte-h":!0}),c(Qt)!=="svelte-v78lg8"&&(Qt.textContent=ai),Ba=s(an),u(K.$$.fragment,an),an.forEach(n),Fa=s(x),G=d(x,"DIV",{class:!0});var ce=I(G);u(vt.$$.fragment,ce),Va=s(ce),Ht=d(ce,"P",{"data-svelte-h":!0}),c(Ht)!=="svelte-10jaql7"&&(Ht.textContent=si),Ea=s(ce),u(ee.$$.fragment,ce),Qa=s(ce),u(te.$$.fragment,ce),ce.forEach(n),Ha=s(x),ne=d(x,"DIV",{class:!0});var ra=I(ne);u(Mt.$$.fragment,ra),Ya=s(ra),Yt=d(ra,"P",{"data-svelte-h":!0}),c(Yt)!=="svelte-1lh0nh5"&&(Yt.innerHTML=ii),ra.forEach(n),za=s(x),ae=d(x,"DIV",{class:!0});var pa=I(ae);u(Tt.$$.fragment,pa),qa=s(pa),zt=d(pa,"P",{"data-svelte-h":!0}),c(zt)!=="svelte-14bnrb6"&&(zt.textContent=oi),pa.forEach(n),Oa=s(x),se=d(x,"DIV",{class:!0});var da=I(se);u(xt.$$.fragment,da),Ka=s(da),qt=d(da,"P",{"data-svelte-h":!0}),c(qt)!=="svelte-1s3c06i"&&(qt.innerHTML=li),da.forEach(n),es=s(x),S=d(x,"DIV",{class:!0});var fe=I(S);u(Jt.$$.fragment,fe),ts=s(fe),Ot=d(fe,"P",{"data-svelte-h":!0}),c(Ot)!=="svelte-e03q3e"&&(Ot.innerHTML=ri),ns=s(fe),u(ie.$$.fragment,fe),as=s(fe),u(oe.$$.fragment,fe),fe.forEach(n),ss=s(x),le=d(x,"DIV",{class:!0});var ca=I(le);u(Ut.$$.fragment,ca),is=s(ca),Kt=d(ca,"P",{"data-svelte-h":!0}),c(Kt)!=="svelte-1vfte1e"&&(Kt.innerHTML=pi),ca.forEach(n),os=s(x),re=d(x,"DIV",{class:!0});var fa=I(re);u($t.$$.fragment,fa),ls=s(fa),en=d(fa,"P",{"data-svelte-h":!0}),c(en)!=="svelte-pkn4ui"&&(en.innerHTML=di),fa.forEach(n),rs=s(x),pe=d(x,"DIV",{class:!0});var ma=I(pe);u(It.$$.fragment,ma),ps=s(ma),tn=d(ma,"P",{"data-svelte-h":!0}),c(tn)!=="svelte-1xwrf7t"&&(tn.textContent=ci),ma.forEach(n),ds=s(x),de=d(x,"DIV",{class:!0});var ga=I(de);u(Zt.$$.fragment,ga),cs=s(ga),nn=d(ga,"P",{"data-svelte-h":!0}),c(nn)!=="svelte-16q0ax1"&&(nn.textContent=fi),ga.forEach(n),x.forEach(n),oa=s(e),on=d(e,"P",{}),I(on).forEach(n),this.h()},h(){Z(r,"name","hf:doc:metadata"),Z(r,"content",Zi),Z(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(T,"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,t){l(document.head,r),i(e,v,t),i(e,m,t),i(e,f,t),h(w,e,t),i(e,o,t),h(M,e,t),i(e,ln,t),i(e,me,t),i(e,rn,t),i(e,ge,t),i(e,pn,t),i(e,ue,t),i(e,dn,t),i(e,he,t),i(e,cn,t),i(e,_e,t),i(e,fn,t),h(be,e,t),i(e,mn,t),i(e,ye,t),i(e,gn,t),h(we,e,t),i(e,un,t),i(e,ve,t),i(e,hn,t),i(e,Me,t),i(e,_n,t),i(e,Te,t),i(e,bn,t),h(xe,e,t),i(e,yn,t),i(e,Je,t),i(e,wn,t),i(e,Ue,t),i(e,vn,t),h($e,e,t),i(e,Mn,t),i(e,Ie,t),i(e,Tn,t),i(e,Ze,t),i(e,xn,t),i(e,Ce,t),i(e,Jn,t),h(ke,e,t),i(e,Un,t),i(e,je,t),i(e,$n,t),h(Ae,e,t),i(e,In,t),i(e,Ge,t),i(e,Zn,t),h(Se,e,t),i(e,Cn,t),i(e,De,t),i(e,kn,t),i(e,Le,t),i(e,jn,t),i(e,Pe,t),i(e,An,t),h(Xe,e,t),i(e,Gn,t),i(e,We,t),i(e,Sn,t),i(e,Re,t),i(e,Dn,t),h(Ne,e,t),i(e,Ln,t),i(e,Be,t),i(e,Pn,t),h(Fe,e,t),i(e,Xn,t),i(e,Ve,t),i(e,Wn,t),h(Ee,e,t),i(e,Rn,t),i(e,Qe,t),i(e,Nn,t),h(He,e,t),i(e,Bn,t),i(e,Ye,t),i(e,Fn,t),h(ze,e,t),i(e,Vn,t),i(e,qe,t),i(e,En,t),i(e,Oe,t),i(e,Qn,t),h(Ke,e,t),i(e,Hn,t),i(e,et,t),i(e,Yn,t),i(e,tt,t),i(e,zn,t),i(e,nt,t),i(e,qn,t),i(e,at,t),i(e,On,t),h(st,e,t),i(e,Kn,t),i(e,it,t),i(e,ea,t),h(ot,e,t),i(e,ta,t),i(e,lt,t),i(e,na,t),h(rt,e,t),i(e,aa,t),i(e,J,t),h(pt,J,null),l(J,ha),l(J,St),l(J,_a),l(J,Dt),l(J,ba),l(J,X),h(dt,X,null),l(X,ya),l(X,Lt),l(X,wa),h(B,X,null),l(J,va),l(J,j),h(ct,j,null),l(j,Ma),l(j,Pt),l(j,Ta),h(F,j,null),l(j,xa),h(V,j,null),l(J,Ja),l(J,E),h(ft,E,null),l(E,Ua),l(E,Xt),l(J,$a),l(J,Q),h(mt,Q,null),l(Q,Ia),l(Q,Wt),l(J,Za),l(J,H),h(gt,H,null),l(H,Ca),l(H,Rt),l(J,ka),l(J,A),h(ut,A,null),l(A,ja),l(A,Nt),l(A,Aa),h(Y,A,null),l(A,Ga),h(z,A,null),l(J,Sa),l(J,q),h(ht,q,null),l(q,Da),l(q,Bt),l(J,La),l(J,O),h(_t,O,null),l(O,Pa),l(O,Ft),i(e,sa,t),h(bt,e,t),i(e,ia,t),i(e,T,t),h(yt,T,null),l(T,Xa),l(T,Vt),l(T,Wa),l(T,Et),l(T,Ra),l(T,W),h(wt,W,null),l(W,Na),l(W,Qt),l(W,Ba),h(K,W,null),l(T,Fa),l(T,G),h(vt,G,null),l(G,Va),l(G,Ht),l(G,Ea),h(ee,G,null),l(G,Qa),h(te,G,null),l(T,Ha),l(T,ne),h(Mt,ne,null),l(ne,Ya),l(ne,Yt),l(T,za),l(T,ae),h(Tt,ae,null),l(ae,qa),l(ae,zt),l(T,Oa),l(T,se),h(xt,se,null),l(se,Ka),l(se,qt),l(T,es),l(T,S),h(Jt,S,null),l(S,ts),l(S,Ot),l(S,ns),h(ie,S,null),l(S,as),h(oe,S,null),l(T,ss),l(T,le),h(Ut,le,null),l(le,is),l(le,Kt),l(T,os),l(T,re),h($t,re,null),l(re,ls),l(re,en),l(T,rs),l(T,pe),h(It,pe,null),l(pe,ps),l(pe,tn),l(T,ds),l(T,de),h(Zt,de,null),l(de,cs),l(de,nn),i(e,oa,t),i(e,on,t),la=!0},p(e,[t]){const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),B.$set(U);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),F.$set(N);const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),V.$set(D);const Ct={};t&2&&(Ct.$$scope={dirty:t,ctx:e}),Y.$set(Ct);const kt={};t&2&&(kt.$$scope={dirty:t,ctx:e}),z.$set(kt);const jt={};t&2&&(jt.$$scope={dirty:t,ctx:e}),K.$set(jt);const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),ee.$set(L);const At={};t&2&&(At.$$scope={dirty:t,ctx:e}),te.$set(At);const Gt={};t&2&&(Gt.$$scope={dirty:t,ctx:e}),ie.$set(Gt);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),oe.$set(x)},i(e){la||(_(w.$$.fragment,e),_(M.$$.fragment,e),_(be.$$.fragment,e),_(we.$$.fragment,e),_(xe.$$.fragment,e),_($e.$$.fragment,e),_(ke.$$.fragment,e),_(Ae.$$.fragment,e),_(Se.$$.fragment,e),_(Xe.$$.fragment,e),_(Ne.$$.fragment,e),_(Fe.$$.fragment,e),_(Ee.$$.fragment,e),_(He.$$.fragment,e),_(ze.$$.fragment,e),_(Ke.$$.fragment,e),_(st.$$.fragment,e),_(ot.$$.fragment,e),_(rt.$$.fragment,e),_(pt.$$.fragment,e),_(dt.$$.fragment,e),_(B.$$.fragment,e),_(ct.$$.fragment,e),_(F.$$.fragment,e),_(V.$$.fragment,e),_(ft.$$.fragment,e),_(mt.$$.fragment,e),_(gt.$$.fragment,e),_(ut.$$.fragment,e),_(Y.$$.fragment,e),_(z.$$.fragment,e),_(ht.$$.fragment,e),_(_t.$$.fragment,e),_(bt.$$.fragment,e),_(yt.$$.fragment,e),_(wt.$$.fragment,e),_(K.$$.fragment,e),_(vt.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(Mt.$$.fragment,e),_(Tt.$$.fragment,e),_(xt.$$.fragment,e),_(Jt.$$.fragment,e),_(ie.$$.fragment,e),_(oe.$$.fragment,e),_(Ut.$$.fragment,e),_($t.$$.fragment,e),_(It.$$.fragment,e),_(Zt.$$.fragment,e),la=!0)},o(e){b(w.$$.fragment,e),b(M.$$.fragment,e),b(be.$$.fragment,e),b(we.$$.fragment,e),b(xe.$$.fragment,e),b($e.$$.fragment,e),b(ke.$$.fragment,e),b(Ae.$$.fragment,e),b(Se.$$.fragment,e),b(Xe.$$.fragment,e),b(Ne.$$.fragment,e),b(Fe.$$.fragment,e),b(Ee.$$.fragment,e),b(He.$$.fragment,e),b(ze.$$.fragment,e),b(Ke.$$.fragment,e),b(st.$$.fragment,e),b(ot.$$.fragment,e),b(rt.$$.fragment,e),b(pt.$$.fragment,e),b(dt.$$.fragment,e),b(B.$$.fragment,e),b(ct.$$.fragment,e),b(F.$$.fragment,e),b(V.$$.fragment,e),b(ft.$$.fragment,e),b(mt.$$.fragment,e),b(gt.$$.fragment,e),b(ut.$$.fragment,e),b(Y.$$.fragment,e),b(z.$$.fragment,e),b(ht.$$.fragment,e),b(_t.$$.fragment,e),b(bt.$$.fragment,e),b(yt.$$.fragment,e),b(wt.$$.fragment,e),b(K.$$.fragment,e),b(vt.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(Mt.$$.fragment,e),b(Tt.$$.fragment,e),b(xt.$$.fragment,e),b(Jt.$$.fragment,e),b(ie.$$.fragment,e),b(oe.$$.fragment,e),b(Ut.$$.fragment,e),b($t.$$.fragment,e),b(It.$$.fragment,e),b(Zt.$$.fragment,e),la=!1},d(e){e&&(n(v),n(m),n(f),n(o),n(ln),n(me),n(rn),n(ge),n(pn),n(ue),n(dn),n(he),n(cn),n(_e),n(fn),n(mn),n(ye),n(gn),n(un),n(ve),n(hn),n(Me),n(_n),n(Te),n(bn),n(yn),n(Je),n(wn),n(Ue),n(vn),n(Mn),n(Ie),n(Tn),n(Ze),n(xn),n(Ce),n(Jn),n(Un),n(je),n($n),n(In),n(Ge),n(Zn),n(Cn),n(De),n(kn),n(Le),n(jn),n(Pe),n(An),n(Gn),n(We),n(Sn),n(Re),n(Dn),n(Ln),n(Be),n(Pn),n(Xn),n(Ve),n(Wn),n(Rn),n(Qe),n(Nn),n(Bn),n(Ye),n(Fn),n(Vn),n(qe),n(En),n(Oe),n(Qn),n(Hn),n(et),n(Yn),n(tt),n(zn),n(nt),n(qn),n(at),n(On),n(Kn),n(it),n(ea),n(ta),n(lt),n(na),n(aa),n(J),n(sa),n(ia),n(T),n(oa),n(on)),n(r),y(w,e),y(M,e),y(be,e),y(we,e),y(xe,e),y($e,e),y(ke,e),y(Ae,e),y(Se,e),y(Xe,e),y(Ne,e),y(Fe,e),y(Ee,e),y(He,e),y(ze,e),y(Ke,e),y(st,e),y(ot,e),y(rt,e),y(pt),y(dt),y(B),y(ct),y(F),y(V),y(ft),y(mt),y(gt),y(ut),y(Y),y(z),y(ht),y(_t),y(bt,e),y(yt),y(wt),y(K),y(vt),y(ee),y(te),y(Mt),y(Tt),y(xt),y(Jt),y(ie),y(oe),y(Ut),y($t),y(It),y(Zt)}}}const Zi='{"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 Ci($){return gi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pi extends ui{constructor(r){super(),hi(this,r,Ci,Ii,mi,{})}}export{Pi as component};
