import{s as fo,o as mo,n as G}from"../chunks/scheduler.8c3d61f6.js";import{S as go,i as uo,g as s,s as a,r as f,A as ho,h as r,f as l,c as i,j as P,u as m,x as b,k as S,y as t,a as y,v as g,d as u,t as h,w as _}from"../chunks/index.da70eac4.js";import{T as jt}from"../chunks/Tip.1d9b8c37.js";import{D}from"../chunks/Docstring.6b390b9a.js";import{C as ht}from"../chunks/CodeBlock.00a903b3.js";import{E as ut}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as jn,E as _o}from"../chunks/EditOnGithub.1e64e623.js";function bo(I){let o,w="Examples:",p,d,v;return d=new ht({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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function yo(I){let o,w=`⚠️ 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(){o=s("p"),o.innerHTML=w},l(p){o=r(p,"P",{"data-svelte-h":!0}),b(o)!=="svelte-ackzsn"&&(o.innerHTML=w)},m(p,d){y(p,o,d)},p:G,d(p){p&&l(o)}}}function vo(I){let o,w="Examples:",p,d,v;return d=new ht({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQXBpcGUuZW5hYmxlX2F0dGVudGlvbl9zbGljaW5nKCklMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",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;stable-diffusion-v1-5/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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function wo(I){let o,w=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){o=s("p"),o.textContent=w},l(p){o=r(p,"P",{"data-svelte-h":!0}),b(o)!=="svelte-17p1lpg"&&(o.textContent=w)},m(p,d){y(p,o,d)},p:G,d(p){p&&l(o)}}}function xo(I){let o,w="Examples:",p,d,v;return d=new ht({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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function Mo(I){let o,w="Examples:",p,d,v;return d=new ht({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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function To(I){let o,w=`⚠️ 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(){o=s("p"),o.innerHTML=w},l(p){o=r(p,"P",{"data-svelte-h":!0}),b(o)!=="svelte-ackzsn"&&(o.innerHTML=w)},m(p,d){y(p,o,d)},p:G,d(p){p&&l(o)}}}function $o(I){let o,w="Examples:",p,d,v;return d=new ht({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMHVzZV9zYWZldGVuc29ycyUzRFRydWUlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQXBpcGUuZW5hYmxlX2F0dGVudGlvbl9zbGljaW5nKCklMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVE",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;stable-diffusion-v1-5/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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function Uo(I){let o,w=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){o=s("p"),o.textContent=w},l(p){o=r(p,"P",{"data-svelte-h":!0}),b(o)!=="svelte-17p1lpg"&&(o.textContent=w)},m(p,d){y(p,o,d)},p:G,d(p){p&&l(o)}}}function Io(I){let o,w="Examples:",p,d,v;return d=new ht({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(){o=s("p"),o.textContent=w,p=a(),f(d.$$.fragment)},l(n){o=r(n,"P",{"data-svelte-h":!0}),b(o)!=="svelte-kvfsh7"&&(o.textContent=w),p=i(n),m(d.$$.fragment,n)},m(n,M){y(n,o,M),y(n,p,M),g(d,n,M),v=!0},p:G,i(n){v||(u(d.$$.fragment,n),v=!0)},o(n){h(d.$$.fragment,n),v=!1},d(n){n&&(l(o),l(p)),_(d,n)}}}function Po(I){let o,w,p,d,v,n,M,Jn='<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.',bt,ce,Zn="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.",yt,fe,Xn="The abstract of the paper is the following:",vt,me,Gn="<em>The incredible generative ability of large-scale text-to-image (T2I) models has demonstrated strong power of learning complex structures and meaningful semantics. However, relying solely on text prompts cannot fully take advantage of the knowledge learned by the model, especially when flexible and accurate controlling (e.g., color and structure) is needed. In this paper, we aim to “dig out” the capabilities that T2I models have implicitly learned, and then explicitly use them to control the generation more granularly. Specifically, we propose to learn simple and lightweight T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, achieving rich control and editing effects in the color and structure of the generation results. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications.</em>",wt,ge,Wn='This model was contributed by the community contributor <a href="https://github.com/HimariO" rel="nofollow">HimariO</a> ❤️ .',xt,ue,Mt,T,he,Jt,ze,Nn=`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>`,Zt,Be,En=`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.)`,Xt,Z,_e,Gt,Ve,Rn="Function invoked when calling the pipeline for generation.",Wt,N,Nt,L,be,Et,Fe,zn=`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.`,Rt,E,zt,R,Bt,z,ye,Vt,He,Bn=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,Ft,B,ve,Ht,Ye,Vn=`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.`,Yt,V,we,Qt,Qe,Fn=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,qt,A,xe,Ot,qe,Hn=`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.`,Kt,F,en,H,tn,Y,Me,nn,Oe,Yn='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',on,Q,Te,an,Ke,Qn="Encodes the prompt into text encoder hidden states.",sn,q,$e,rn,et,qn='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Tt,Ue,$t,x,Ie,ln,tt,On=`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>`,dn,nt,Kn=`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.)`,pn,ot,eo="The pipeline also inherits the following loading methods:",cn,at,to='<li><a href="/docs/diffusers/main/en/api/loaders/textual_inversion#diffusers.loaders.TextualInversionLoaderMixin.load_textual_inversion">load_textual_inversion()</a> for loading textual inversion embeddings</li> <li><a href="/docs/diffusers/main/en/api/loaders/single_file#diffusers.loaders.FromSingleFileMixin.from_single_file">from_single_file()</a> for loading <code>.ckpt</code> files</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for loading LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/lora#diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for saving LoRA weights</li> <li><a href="/docs/diffusers/main/en/api/loaders/ip_adapter#diffusers.loaders.IPAdapterMixin.load_ip_adapter">load_ip_adapter()</a> for loading IP Adapters</li>',fn,X,Pe,mn,it,no="Function invoked when calling the pipeline for generation.",gn,O,un,C,Se,hn,st,oo=`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.`,_n,K,bn,ee,yn,te,De,vn,rt,ao=`Disable sliced attention computation. If <code>enable_attention_slicing</code> was previously called, attention is
computed in one step.`,wn,ne,Le,xn,lt,io=`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.`,Mn,oe,Ae,Tn,dt,so=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,$n,k,Ce,Un,pt,ro=`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.`,In,ae,Pn,ie,Sn,se,ke,Dn,ct,lo='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Ln,re,je,An,ft,po="Encodes the prompt into text encoder hidden states.",Cn,le,Je,kn,mt,co='See <a href="https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298" rel="nofollow">https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298</a>',Ut,Ze,It,_t,Pt;return v=new jn({props:{title:"T2I-Adapter",local:"t2i-adapter",headingTag:"h1"}}),ue=new jn({props:{title:"StableDiffusionAdapterPipeline",local:"diffusers.StableDiffusionAdapterPipeline",headingTag:"h2"}}),he=new D({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:": CLIPImageProcessor"},{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/stable-diffusion-v1-5/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>CLIPImageProcessor</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#L191"}}),_e=new D({props:{name:"__call__",anchor:"diffusers.StableDiffusionAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"sigmas",val:": typing.List[float] = None"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Optional[typing.Callable[[int, int, torch.Tensor], NoneType]] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = 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.Tensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.Tensor]</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.Tensor</code>, it is passed to Adapter as is. PIL.Image.Image\` can also be
accepted as an image. The control image is automatically resized to fit the output image.`,name:"image"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in
their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed
will be used.`,name:"sigmas"},{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.Tensor</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.Tensor</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.Tensor</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.Tensor)</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#L689",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>
`}}),N=new ut({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[bo]},$$scope:{ctx:I}}}),be=new D({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[int, str, 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#L1708"}}),E=new jt({props:{warning:!0,$$slots:{default:[yo]},$$scope:{ctx:I}}}),R=new ut({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[vo]},$$scope:{ctx:I}}}),ye=new D({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#L1748"}}),ve=new D({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1893"}}),we=new D({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1900"}}),xe=new D({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#L1647"}}),F=new jt({props:{warning:!0,$$slots:{default:[wo]},$$scope:{ctx:I}}}),H=new ut({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[xo]},$$scope:{ctx:I}}}),Me=new D({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#L1682"}}),Te=new D({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.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = 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`,name:"prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{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.Tensor</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.Tensor</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#L311"}}),$e=new D({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding.w",description:`<strong>w</strong> (<code>torch.Tensor</code>) &#x2014;
Generate embedding vectors with a specified guidance scale to subsequently enrich timestep embeddings.`,name:"w"},{anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the embeddings to generate.`,name:"embedding_dim"},{anchor:"diffusers.StableDiffusionAdapterPipeline.get_guidance_scale_embedding.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
Data type of the generated embeddings.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L648",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),Ue=new jn({props:{title:"StableDiffusionXLAdapterPipeline",local:"diffusers.StableDiffusionXLAdapterPipeline",headingTag:"h2"}}),Ie=new D({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"},{name:"feature_extractor",val:": CLIPImageProcessor = None"},{name:"image_encoder",val:": CLIPVisionModelWithProjection = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/stable-diffusion-v1-5/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>CLIPImageProcessor</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#L216"}}),Pe=new D({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[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"sigmas",val:": typing.List[float] = None"},{name:"denoising_end",val:": typing.Optional[float] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"ip_adapter_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.Tensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.Tensor], NoneType] = None"},{name:"ip_adapter_image_embeds",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Optional[typing.Callable[[int, int, torch.Tensor], NoneType]] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"guidance_rescale",val:": float = 0.0"},{name:"original_size",val:": typing.Optional[typing.Tuple[int, int]] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"target_size",val:": typing.Optional[typing.Tuple[int, int]] = None"},{name:"negative_original_size",val:": typing.Optional[typing.Tuple[int, int]] = None"},{name:"negative_crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"negative_target_size",val:": typing.Optional[typing.Tuple[int, int]] = 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.Tensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.Tensor]</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.Tensor</code>, it is passed to Adapter as is. PIL.Image.Image\` can also be
accepted as an image. The control image is automatically resized to fit the output image.`,name:"image"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image. Anything below 512 pixels won&#x2019;t work well for
<a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0" rel="nofollow">stabilityai/stable-diffusion-xl-base-1.0</a>
and checkpoints that are not specifically fine-tuned on low resolutions.`,name:"height"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image. Anything below 512 pixels won&#x2019;t work well for
<a href="https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0" rel="nofollow">stabilityai/stable-diffusion-xl-base-1.0</a>
and checkpoints that are not specifically fine-tuned on low resolutions.`,name:"width"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in
their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed
will be used.`,name:"sigmas"},{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.Tensor</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.Tensor</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.Tensor</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.Tensor</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.Tensor</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__.ip_adapter_image",description:"<strong>ip_adapter_image</strong> &#x2014; (<code>PipelineImageInput</code>, <em>optional</em>): Optional image input to work with IP Adapters.",name:"ip_adapter_image"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.ip_adapter_image_embeds",description:`<strong>ip_adapter_image_embeds</strong> (<code>List[torch.Tensor]</code>, <em>optional</em>) &#x2014;
Pre-generated image embeddings for IP-Adapter. It should be a list of length same as number of
IP-adapters. Each element should be a tensor of shape <code>(batch_size, num_images, emb_dim)</code>. It should
contain the negative image embedding if <code>do_classifier_free_guidance</code> is set to <code>True</code>. If not
provided, embeddings are computed from the <code>ip_adapter_image</code> input argument.`,name:"ip_adapter_image_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.Tensor)</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#L868",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>
`}}),O=new ut({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.__call__.example",$$slots:{default:[Mo]},$$scope:{ctx:I}}}),Se=new D({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[int, str, 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#L1708"}}),K=new jt({props:{warning:!0,$$slots:{default:[To]},$$scope:{ctx:I}}}),ee=new ut({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[$o]},$$scope:{ctx:I}}}),De=new D({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#L1748"}}),Le=new D({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1893"}}),Ae=new D({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionXLAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1900"}}),Ce=new D({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#L1647"}}),ae=new jt({props:{warning:!0,$$slots:{default:[Uo]},$$scope:{ctx:I}}}),ie=new ut({props:{anchor:"diffusers.StableDiffusionXLAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Io]},$$scope:{ctx:I}}}),ke=new D({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#L1682"}}),je=new D({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.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.Tensor] = 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`,name:"prompt_2"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{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.Tensor</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.Tensor</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.Tensor</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.Tensor</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#L314"}}),Je=new D({props:{name:"get_guidance_scale_embedding",anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding",parameters:[{name:"w",val:": Tensor"},{name:"embedding_dim",val:": int = 512"},{name:"dtype",val:": dtype = torch.float32"}],parametersDescription:[{anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding.w",description:`<strong>w</strong> (<code>torch.Tensor</code>) &#x2014;
Generate embedding vectors with a specified guidance scale to subsequently enrich timestep embeddings.`,name:"w"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the embeddings to generate.`,name:"embedding_dim"},{anchor:"diffusers.StableDiffusionXLAdapterPipeline.get_guidance_scale_embedding.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
Data type of the generated embeddings.`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py#L827",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>torch.Tensor</code></p>
`}}),Ze=new _o({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/stable_diffusion/adapter.md"}}),{c(){o=s("meta"),w=a(),p=s("p"),d=a(),f(v.$$.fragment),n=a(),M=s("p"),M.innerHTML=Jn,bt=a(),ce=s("p"),ce.textContent=Zn,yt=a(),fe=s("p"),fe.textContent=Xn,vt=a(),me=s("p"),me.innerHTML=Gn,wt=a(),ge=s("p"),ge.innerHTML=Wn,xt=a(),f(ue.$$.fragment),Mt=a(),T=s("div"),f(he.$$.fragment),Jt=a(),ze=s("p"),ze.innerHTML=Nn,Zt=a(),Be=s("p"),Be.innerHTML=En,Xt=a(),Z=s("div"),f(_e.$$.fragment),Gt=a(),Ve=s("p"),Ve.textContent=Rn,Wt=a(),f(N.$$.fragment),Nt=a(),L=s("div"),f(be.$$.fragment),Et=a(),Fe=s("p"),Fe.textContent=zn,Rt=a(),f(E.$$.fragment),zt=a(),f(R.$$.fragment),Bt=a(),z=s("div"),f(ye.$$.fragment),Vt=a(),He=s("p"),He.innerHTML=Bn,Ft=a(),B=s("div"),f(ve.$$.fragment),Ht=a(),Ye=s("p"),Ye.textContent=Vn,Yt=a(),V=s("div"),f(we.$$.fragment),Qt=a(),Qe=s("p"),Qe.innerHTML=Fn,qt=a(),A=s("div"),f(xe.$$.fragment),Ot=a(),qe=s("p"),qe.innerHTML=Hn,Kt=a(),f(F.$$.fragment),en=a(),f(H.$$.fragment),tn=a(),Y=s("div"),f(Me.$$.fragment),nn=a(),Oe=s("p"),Oe.innerHTML=Yn,on=a(),Q=s("div"),f(Te.$$.fragment),an=a(),Ke=s("p"),Ke.textContent=Qn,sn=a(),q=s("div"),f($e.$$.fragment),rn=a(),et=s("p"),et.innerHTML=qn,Tt=a(),f(Ue.$$.fragment),$t=a(),x=s("div"),f(Ie.$$.fragment),ln=a(),tt=s("p"),tt.innerHTML=On,dn=a(),nt=s("p"),nt.innerHTML=Kn,pn=a(),ot=s("p"),ot.textContent=eo,cn=a(),at=s("ul"),at.innerHTML=to,fn=a(),X=s("div"),f(Pe.$$.fragment),mn=a(),it=s("p"),it.textContent=no,gn=a(),f(O.$$.fragment),un=a(),C=s("div"),f(Se.$$.fragment),hn=a(),st=s("p"),st.textContent=oo,_n=a(),f(K.$$.fragment),bn=a(),f(ee.$$.fragment),yn=a(),te=s("div"),f(De.$$.fragment),vn=a(),rt=s("p"),rt.innerHTML=ao,wn=a(),ne=s("div"),f(Le.$$.fragment),xn=a(),lt=s("p"),lt.textContent=io,Mn=a(),oe=s("div"),f(Ae.$$.fragment),Tn=a(),dt=s("p"),dt.innerHTML=so,$n=a(),k=s("div"),f(Ce.$$.fragment),Un=a(),pt=s("p"),pt.innerHTML=ro,In=a(),f(ae.$$.fragment),Pn=a(),f(ie.$$.fragment),Sn=a(),se=s("div"),f(ke.$$.fragment),Dn=a(),ct=s("p"),ct.innerHTML=lo,Ln=a(),re=s("div"),f(je.$$.fragment),An=a(),ft=s("p"),ft.textContent=po,Cn=a(),le=s("div"),f(Je.$$.fragment),kn=a(),mt=s("p"),mt.innerHTML=co,Ut=a(),f(Ze.$$.fragment),It=a(),_t=s("p"),this.h()},l(e){const c=ho("svelte-u9bgzb",document.head);o=r(c,"META",{name:!0,content:!0}),c.forEach(l),w=i(e),p=r(e,"P",{}),P(p).forEach(l),d=i(e),m(v.$$.fragment,e),n=i(e),M=r(e,"P",{"data-svelte-h":!0}),b(M)!=="svelte-1frzd9j"&&(M.innerHTML=Jn),bt=i(e),ce=r(e,"P",{"data-svelte-h":!0}),b(ce)!=="svelte-rz87yd"&&(ce.textContent=Zn),yt=i(e),fe=r(e,"P",{"data-svelte-h":!0}),b(fe)!=="svelte-wu27l3"&&(fe.textContent=Xn),vt=i(e),me=r(e,"P",{"data-svelte-h":!0}),b(me)!=="svelte-yrtfs"&&(me.innerHTML=Gn),wt=i(e),ge=r(e,"P",{"data-svelte-h":!0}),b(ge)!=="svelte-1m3nepz"&&(ge.innerHTML=Wn),xt=i(e),m(ue.$$.fragment,e),Mt=i(e),T=r(e,"DIV",{class:!0});var U=P(T);m(he.$$.fragment,U),Jt=i(U),ze=r(U,"P",{"data-svelte-h":!0}),b(ze)!=="svelte-1pw3838"&&(ze.innerHTML=Nn),Zt=i(U),Be=r(U,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-wu1jmh"&&(Be.innerHTML=En),Xt=i(U),Z=r(U,"DIV",{class:!0});var W=P(Z);m(_e.$$.fragment,W),Gt=i(W),Ve=r(W,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-v78lg8"&&(Ve.textContent=Rn),Wt=i(W),m(N.$$.fragment,W),W.forEach(l),Nt=i(U),L=r(U,"DIV",{class:!0});var j=P(L);m(be.$$.fragment,j),Et=i(j),Fe=r(j,"P",{"data-svelte-h":!0}),b(Fe)!=="svelte-10jaql7"&&(Fe.textContent=zn),Rt=i(j),m(E.$$.fragment,j),zt=i(j),m(R.$$.fragment,j),j.forEach(l),Bt=i(U),z=r(U,"DIV",{class:!0});var Xe=P(z);m(ye.$$.fragment,Xe),Vt=i(Xe),He=r(Xe,"P",{"data-svelte-h":!0}),b(He)!=="svelte-1lh0nh5"&&(He.innerHTML=Bn),Xe.forEach(l),Ft=i(U),B=r(U,"DIV",{class:!0});var Ge=P(B);m(ve.$$.fragment,Ge),Ht=i(Ge),Ye=r(Ge,"P",{"data-svelte-h":!0}),b(Ye)!=="svelte-14bnrb6"&&(Ye.textContent=Vn),Ge.forEach(l),Yt=i(U),V=r(U,"DIV",{class:!0});var We=P(V);m(we.$$.fragment,We),Qt=i(We),Qe=r(We,"P",{"data-svelte-h":!0}),b(Qe)!=="svelte-1s3c06i"&&(Qe.innerHTML=Fn),We.forEach(l),qt=i(U),A=r(U,"DIV",{class:!0});var J=P(A);m(xe.$$.fragment,J),Ot=i(J),qe=r(J,"P",{"data-svelte-h":!0}),b(qe)!=="svelte-e03q3e"&&(qe.innerHTML=Hn),Kt=i(J),m(F.$$.fragment,J),en=i(J),m(H.$$.fragment,J),J.forEach(l),tn=i(U),Y=r(U,"DIV",{class:!0});var Ne=P(Y);m(Me.$$.fragment,Ne),nn=i(Ne),Oe=r(Ne,"P",{"data-svelte-h":!0}),b(Oe)!=="svelte-1vfte1e"&&(Oe.innerHTML=Yn),Ne.forEach(l),on=i(U),Q=r(U,"DIV",{class:!0});var Ee=P(Q);m(Te.$$.fragment,Ee),an=i(Ee),Ke=r(Ee,"P",{"data-svelte-h":!0}),b(Ke)!=="svelte-16q0ax1"&&(Ke.textContent=Qn),Ee.forEach(l),sn=i(U),q=r(U,"DIV",{class:!0});var Re=P(q);m($e.$$.fragment,Re),rn=i(Re),et=r(Re,"P",{"data-svelte-h":!0}),b(et)!=="svelte-vo59ec"&&(et.innerHTML=qn),Re.forEach(l),U.forEach(l),Tt=i(e),m(Ue.$$.fragment,e),$t=i(e),x=r(e,"DIV",{class:!0});var $=P(x);m(Ie.$$.fragment,$),ln=i($),tt=r($,"P",{"data-svelte-h":!0}),b(tt)!=="svelte-1pw3838"&&(tt.innerHTML=On),dn=i($),nt=r($,"P",{"data-svelte-h":!0}),b(nt)!=="svelte-wu1jmh"&&(nt.innerHTML=Kn),pn=i($),ot=r($,"P",{"data-svelte-h":!0}),b(ot)!=="svelte-14s6m4u"&&(ot.textContent=eo),cn=i($),at=r($,"UL",{"data-svelte-h":!0}),b(at)!=="svelte-9wc0dt"&&(at.innerHTML=to),fn=i($),X=r($,"DIV",{class:!0});var gt=P(X);m(Pe.$$.fragment,gt),mn=i(gt),it=r(gt,"P",{"data-svelte-h":!0}),b(it)!=="svelte-v78lg8"&&(it.textContent=no),gn=i(gt),m(O.$$.fragment,gt),gt.forEach(l),un=i($),C=r($,"DIV",{class:!0});var de=P(C);m(Se.$$.fragment,de),hn=i(de),st=r(de,"P",{"data-svelte-h":!0}),b(st)!=="svelte-10jaql7"&&(st.textContent=oo),_n=i(de),m(K.$$.fragment,de),bn=i(de),m(ee.$$.fragment,de),de.forEach(l),yn=i($),te=r($,"DIV",{class:!0});var St=P(te);m(De.$$.fragment,St),vn=i(St),rt=r(St,"P",{"data-svelte-h":!0}),b(rt)!=="svelte-1lh0nh5"&&(rt.innerHTML=ao),St.forEach(l),wn=i($),ne=r($,"DIV",{class:!0});var Dt=P(ne);m(Le.$$.fragment,Dt),xn=i(Dt),lt=r(Dt,"P",{"data-svelte-h":!0}),b(lt)!=="svelte-14bnrb6"&&(lt.textContent=io),Dt.forEach(l),Mn=i($),oe=r($,"DIV",{class:!0});var Lt=P(oe);m(Ae.$$.fragment,Lt),Tn=i(Lt),dt=r(Lt,"P",{"data-svelte-h":!0}),b(dt)!=="svelte-1s3c06i"&&(dt.innerHTML=so),Lt.forEach(l),$n=i($),k=r($,"DIV",{class:!0});var pe=P(k);m(Ce.$$.fragment,pe),Un=i(pe),pt=r(pe,"P",{"data-svelte-h":!0}),b(pt)!=="svelte-e03q3e"&&(pt.innerHTML=ro),In=i(pe),m(ae.$$.fragment,pe),Pn=i(pe),m(ie.$$.fragment,pe),pe.forEach(l),Sn=i($),se=r($,"DIV",{class:!0});var At=P(se);m(ke.$$.fragment,At),Dn=i(At),ct=r(At,"P",{"data-svelte-h":!0}),b(ct)!=="svelte-1vfte1e"&&(ct.innerHTML=lo),At.forEach(l),Ln=i($),re=r($,"DIV",{class:!0});var Ct=P(re);m(je.$$.fragment,Ct),An=i(Ct),ft=r(Ct,"P",{"data-svelte-h":!0}),b(ft)!=="svelte-16q0ax1"&&(ft.textContent=po),Ct.forEach(l),Cn=i($),le=r($,"DIV",{class:!0});var kt=P(le);m(Je.$$.fragment,kt),kn=i(kt),mt=r(kt,"P",{"data-svelte-h":!0}),b(mt)!=="svelte-vo59ec"&&(mt.innerHTML=co),kt.forEach(l),$.forEach(l),Ut=i(e),m(Ze.$$.fragment,e),It=i(e),_t=r(e,"P",{}),P(_t).forEach(l),this.h()},h(){S(o,"name","hf:doc:metadata"),S(o,"content",So),S(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(x,"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,c){t(document.head,o),y(e,w,c),y(e,p,c),y(e,d,c),g(v,e,c),y(e,n,c),y(e,M,c),y(e,bt,c),y(e,ce,c),y(e,yt,c),y(e,fe,c),y(e,vt,c),y(e,me,c),y(e,wt,c),y(e,ge,c),y(e,xt,c),g(ue,e,c),y(e,Mt,c),y(e,T,c),g(he,T,null),t(T,Jt),t(T,ze),t(T,Zt),t(T,Be),t(T,Xt),t(T,Z),g(_e,Z,null),t(Z,Gt),t(Z,Ve),t(Z,Wt),g(N,Z,null),t(T,Nt),t(T,L),g(be,L,null),t(L,Et),t(L,Fe),t(L,Rt),g(E,L,null),t(L,zt),g(R,L,null),t(T,Bt),t(T,z),g(ye,z,null),t(z,Vt),t(z,He),t(T,Ft),t(T,B),g(ve,B,null),t(B,Ht),t(B,Ye),t(T,Yt),t(T,V),g(we,V,null),t(V,Qt),t(V,Qe),t(T,qt),t(T,A),g(xe,A,null),t(A,Ot),t(A,qe),t(A,Kt),g(F,A,null),t(A,en),g(H,A,null),t(T,tn),t(T,Y),g(Me,Y,null),t(Y,nn),t(Y,Oe),t(T,on),t(T,Q),g(Te,Q,null),t(Q,an),t(Q,Ke),t(T,sn),t(T,q),g($e,q,null),t(q,rn),t(q,et),y(e,Tt,c),g(Ue,e,c),y(e,$t,c),y(e,x,c),g(Ie,x,null),t(x,ln),t(x,tt),t(x,dn),t(x,nt),t(x,pn),t(x,ot),t(x,cn),t(x,at),t(x,fn),t(x,X),g(Pe,X,null),t(X,mn),t(X,it),t(X,gn),g(O,X,null),t(x,un),t(x,C),g(Se,C,null),t(C,hn),t(C,st),t(C,_n),g(K,C,null),t(C,bn),g(ee,C,null),t(x,yn),t(x,te),g(De,te,null),t(te,vn),t(te,rt),t(x,wn),t(x,ne),g(Le,ne,null),t(ne,xn),t(ne,lt),t(x,Mn),t(x,oe),g(Ae,oe,null),t(oe,Tn),t(oe,dt),t(x,$n),t(x,k),g(Ce,k,null),t(k,Un),t(k,pt),t(k,In),g(ae,k,null),t(k,Pn),g(ie,k,null),t(x,Sn),t(x,se),g(ke,se,null),t(se,Dn),t(se,ct),t(x,Ln),t(x,re),g(je,re,null),t(re,An),t(re,ft),t(x,Cn),t(x,le),g(Je,le,null),t(le,kn),t(le,mt),y(e,Ut,c),g(Ze,e,c),y(e,It,c),y(e,_t,c),Pt=!0},p(e,[c]){const U={};c&2&&(U.$$scope={dirty:c,ctx:e}),N.$set(U);const W={};c&2&&(W.$$scope={dirty:c,ctx:e}),E.$set(W);const j={};c&2&&(j.$$scope={dirty:c,ctx:e}),R.$set(j);const Xe={};c&2&&(Xe.$$scope={dirty:c,ctx:e}),F.$set(Xe);const Ge={};c&2&&(Ge.$$scope={dirty:c,ctx:e}),H.$set(Ge);const We={};c&2&&(We.$$scope={dirty:c,ctx:e}),O.$set(We);const J={};c&2&&(J.$$scope={dirty:c,ctx:e}),K.$set(J);const Ne={};c&2&&(Ne.$$scope={dirty:c,ctx:e}),ee.$set(Ne);const Ee={};c&2&&(Ee.$$scope={dirty:c,ctx:e}),ae.$set(Ee);const Re={};c&2&&(Re.$$scope={dirty:c,ctx:e}),ie.$set(Re)},i(e){Pt||(u(v.$$.fragment,e),u(ue.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(N.$$.fragment,e),u(be.$$.fragment,e),u(E.$$.fragment,e),u(R.$$.fragment,e),u(ye.$$.fragment,e),u(ve.$$.fragment,e),u(we.$$.fragment,e),u(xe.$$.fragment,e),u(F.$$.fragment,e),u(H.$$.fragment,e),u(Me.$$.fragment,e),u(Te.$$.fragment,e),u($e.$$.fragment,e),u(Ue.$$.fragment,e),u(Ie.$$.fragment,e),u(Pe.$$.fragment,e),u(O.$$.fragment,e),u(Se.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(De.$$.fragment,e),u(Le.$$.fragment,e),u(Ae.$$.fragment,e),u(Ce.$$.fragment,e),u(ae.$$.fragment,e),u(ie.$$.fragment,e),u(ke.$$.fragment,e),u(je.$$.fragment,e),u(Je.$$.fragment,e),u(Ze.$$.fragment,e),Pt=!0)},o(e){h(v.$$.fragment,e),h(ue.$$.fragment,e),h(he.$$.fragment,e),h(_e.$$.fragment,e),h(N.$$.fragment,e),h(be.$$.fragment,e),h(E.$$.fragment,e),h(R.$$.fragment,e),h(ye.$$.fragment,e),h(ve.$$.fragment,e),h(we.$$.fragment,e),h(xe.$$.fragment,e),h(F.$$.fragment,e),h(H.$$.fragment,e),h(Me.$$.fragment,e),h(Te.$$.fragment,e),h($e.$$.fragment,e),h(Ue.$$.fragment,e),h(Ie.$$.fragment,e),h(Pe.$$.fragment,e),h(O.$$.fragment,e),h(Se.$$.fragment,e),h(K.$$.fragment,e),h(ee.$$.fragment,e),h(De.$$.fragment,e),h(Le.$$.fragment,e),h(Ae.$$.fragment,e),h(Ce.$$.fragment,e),h(ae.$$.fragment,e),h(ie.$$.fragment,e),h(ke.$$.fragment,e),h(je.$$.fragment,e),h(Je.$$.fragment,e),h(Ze.$$.fragment,e),Pt=!1},d(e){e&&(l(w),l(p),l(d),l(n),l(M),l(bt),l(ce),l(yt),l(fe),l(vt),l(me),l(wt),l(ge),l(xt),l(Mt),l(T),l(Tt),l($t),l(x),l(Ut),l(It),l(_t)),l(o),_(v,e),_(ue,e),_(he),_(_e),_(N),_(be),_(E),_(R),_(ye),_(ve),_(we),_(xe),_(F),_(H),_(Me),_(Te),_($e),_(Ue,e),_(Ie),_(Pe),_(O),_(Se),_(K),_(ee),_(De),_(Le),_(Ae),_(Ce),_(ae),_(ie),_(ke),_(je),_(Je),_(Ze,e)}}}const So='{"title":"T2I-Adapter","local":"t2i-adapter","sections":[{"title":"StableDiffusionAdapterPipeline","local":"diffusers.StableDiffusionAdapterPipeline","sections":[],"depth":2},{"title":"StableDiffusionXLAdapterPipeline","local":"diffusers.StableDiffusionXLAdapterPipeline","sections":[],"depth":2}],"depth":1}';function Do(I){return mo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xo extends go{constructor(o){super(),uo(this,o,Do,Po,fo,{})}}export{Xo as component};
