import{S as lr,i as rr,s as dr,e as o,k as d,w as y,t as s,M as cr,c as n,d as t,m as c,a,x as w,h as i,b as f,G as e,g as S,y as x,q as M,o as T,B as D,v as fr,L as Vt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as pr}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as P}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Bt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ir}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Lt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ur(E){let u,$,h,p,v;return p=new Bt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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-string">&quot;runwayml/stable-diffusion-v1-5&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>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>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){u=o("p"),$=s("Examples:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"Examples:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function mr(E){let u,$;return{c(){u=o("p"),$=s(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(h){u=n(h,"P",{});var p=a(u);$=i(p,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),p.forEach(t)},m(h,p){S(h,u,p),e(u,$)},d(h){h&&t(u)}}}function hr(E){let u,$,h,p,v;return p=new Bt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){u=o("p"),$=s("Examples:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"Examples:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function gr(E){let u,$,h,p,v;return p=new Bt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyc2QtY29uY2VwdHMtbGlicmFyeSUyRmNhdC10b3klMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMCUzQ2NhdC10b3klM0UlMjBiYWNrcGFjayUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNhdC1iYWNrcGFjay5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;sd-concepts-library/cat-toy&quot;</span>)

prompt = <span class="hljs-string">&quot;A &lt;cat-toy&gt; backpack&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;cat-backpack.png&quot;</span>)`}}),{c(){u=o("p"),$=s("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function _r(E){let u,$,h,p,v;return p=new Bt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNikudG8oJTIyY3VkYSUyMiklMEElMEFwaXBlLmxvYWRfdGV4dHVhbF9pbnZlcnNpb24oJTIyLiUyRmNoYXJ0dXJuZXJ2Mi5wdCUyMiUyQyUyMHRva2VuJTNEJTIyY2hhcnR1cm5lcnYyJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMmNoYXJ0dXJuZXJ2MiUyQyUyMG11bHRpcGxlJTIwdmlld3MlMjBvZiUyMHRoZSUyMHNhbWUlMjBjaGFyYWN0ZXIlMjBpbiUyMHRoZSUyMHNhbWUlMjBvdXRmaXQlMkMlMjBhJTIwY2hhcmFjdGVyJTIwdHVybmFyb3VuZCUyMG9mJTIwYSUyMHdvbWFuJTIwd2VhcmluZyUyMGElMjBibGFjayUyMGphY2tldCUyMGFuZCUyMHJlZCUyMHNoaXJ0JTJDJTIwYmVzdCUyMHF1YWxpdHklMkMlMjBpbnRyaWNhdGUlMjBkZXRhaWxzLiUyMiUwQSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENTApLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmNoYXJhY3Rlci5wbmclMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

pipe.load_textual_inversion(<span class="hljs-string">&quot;./charturnerv2.pt&quot;</span>, token=<span class="hljs-string">&quot;charturnerv2&quot;</span>)

prompt = <span class="hljs-string">&quot;charturnerv2, multiple views of the same character in the same outfit, a character turnaround of a woman wearing a black jacket and red shirt, best quality, intricate details.&quot;</span>

image = pipe(prompt, num_inference_steps=<span class="hljs-number">50</span>).images[<span class="hljs-number">0</span>]
image.save(<span class="hljs-string">&quot;character.png&quot;</span>)`}}),{c(){u=o("p"),$=s("locally:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"locally:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function br(E){let u,$,h,p,v;return p=new Bt({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGV2Fycmlvck1hbWE3NzclMkZPcmFuZ2VNaXhzJTJGYmxvYiUyRm1haW4lMkZNb2RlbHMlMkZBYnlzc09yYW5nZU1peCUyRkFieXNzT3JhbmdlTWl4LnNhZmV0ZW5zb3JzJTIyJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwbG9jYWwlMjBmaWxlJTBBJTIzJTIwZmlsZSUyMGlzJTIwZG93bmxvYWRlZCUyMHVuZGVyJTIwLiUyRnYxLTUtcHJ1bmVkLWVtYW9ubHkuY2twdCUwQXBpcGVsaW5lJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9zaW5nbGVfZmlsZSglMjIuJTJGdjEtNS1wcnVuZWQtZW1hb25seSUyMiklMEElMEElMjMlMjBFbmFibGUlMjBmbG9hdDE2JTIwYW5kJTIwbW92ZSUyMHRvJTIwR1BVJTBBcGlwZWxpbmUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyRmJsb2IlMkZtYWluJTJGdjEtNS1wcnVuZWQtZW1hb25seS5ja3B0JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGVsaW5lLnRvKCUyMmN1ZGElMjIp",highlighted:`<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><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/WarriorMama777/OrangeMixs/blob/main/Models/AbyssOrangeMix/AbyssOrangeMix.safetensors&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from local file</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># file is downloaded under ./v1-5-pruned-emaonly.ckpt</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(<span class="hljs-string">&quot;./v1-5-pruned-emaonly&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Enable float16 and move to GPU</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = StableDiffusionPipeline.from_single_file(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),{c(){u=o("p"),$=s("Examples:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"Examples:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function vr(E){let u,$,h,p,v;return p=new Bt({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMGZsYXguamF4X3V0aWxzJTIwaW1wb3J0JTIwcmVwbGljYXRlJTBBZnJvbSUyMGZsYXgudHJhaW5pbmcuY29tbW9uX3V0aWxzJTIwaW1wb3J0JTIwc2hhcmQlMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmxheFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4U3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTIwcmV2aXNpb24lM0QlMjJiZjE2JTIyJTJDJTIwZHR5cGUlM0RqYXgubnVtcHkuYmZsb2F0MTYlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQSUwQXBybmdfc2VlZCUyMCUzRCUyMGpheC5yYW5kb20uUFJOR0tleSgwKSUwQW51bV9pbmZlcmVuY2Vfc3RlcHMlMjAlM0QlMjA1MCUwQSUwQW51bV9zYW1wbGVzJTIwJTNEJTIwamF4LmRldmljZV9jb3VudCgpJTBBcHJvbXB0JTIwJTNEJTIwbnVtX3NhbXBsZXMlMjAqJTIwJTVCcHJvbXB0JTVEJTBBcHJvbXB0X2lkcyUyMCUzRCUyMHBpcGVsaW5lLnByZXBhcmVfaW5wdXRzKHByb21wdCklMEElMEFwYXJhbXMlMjAlM0QlMjByZXBsaWNhdGUocGFyYW1zKSUwQXBybmdfc2VlZCUyMCUzRCUyMGpheC5yYW5kb20uc3BsaXQocHJuZ19zZWVkJTJDJTIwamF4LmRldmljZV9jb3VudCgpKSUwQXByb21wdF9pZHMlMjAlM0QlMjBzaGFyZChwcm9tcHRfaWRzKSUwQSUwQWltYWdlcyUyMCUzRCUyMHBpcGVsaW5lKHByb21wdF9pZHMlMkMlMjBwYXJhbXMlMkMlMjBwcm5nX3NlZWQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTJDJTIwaml0JTNEVHJ1ZSkuaW1hZ2VzJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUubnVtcHlfdG9fcGlsKG5wLmFzYXJyYXkoaW1hZ2VzLnJlc2hhcGUoKG51bV9zYW1wbGVzJTJDKSUyMCUyQiUyMGltYWdlcy5zaGFwZSU1Qi0zJTNBJTVEKSkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax.jax_utils <span class="hljs-keyword">import</span> replicate
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax.training.common_utils <span class="hljs-keyword">import</span> shard

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxStableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, revision=<span class="hljs-string">&quot;bf16&quot;</span>, dtype=jax.numpy.bfloat16
<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>prng_seed = jax.random.PRNGKey(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>num_inference_steps = <span class="hljs-number">50</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>num_samples = jax.device_count()
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = num_samples * [prompt]
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_ids = pipeline.prepare_inputs(prompt)
<span class="hljs-comment"># shard inputs and rng</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>params = replicate(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>prng_seed = jax.random.split(prng_seed, jax.device_count())
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_ids = shard(prompt_ids)

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=<span class="hljs-literal">True</span>).images
<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-<span class="hljs-number">3</span>:])))`}}),{c(){u=o("p"),$=s("Examples:"),h=d(),y(p.$$.fragment)},l(r){u=n(r,"P",{});var g=a(u);$=i(g,"Examples:"),g.forEach(t),h=c(r),w(p.$$.fragment,r)},m(r,g){S(r,u,g),e(u,$),S(r,h,g),x(p,r,g),v=!0},p:Vt,i(r){v||(M(p.$$.fragment,r),v=!0)},o(r){T(p.$$.fragment,r),v=!1},d(r){r&&t(u),r&&t(h),D(p,r)}}}function yr(E){let u,$,h,p,v,r,g,At,$n,No,Y,O,Rt,_e,Sn,zt,Pn,Lo,J,En,be,Jn,Un,ve,kn,In,ye,jn,Zn,we,Cn,Wn,wt,Gn,Fn,Vo,xt,Nn,Bo,K,xe,qt,Ln,Vn,Me,Bn,An,Te,Yt,Rn,zn,De,qn,Ao,Mt,Yn,Ro,U,$e,Xt,Xn,Hn,Se,Qn,On,Pe,Ht,Kn,ea,Ee,ta,oa,Je,Qt,na,aa,Ue,sa,ia,ke,Ot,la,ra,Ie,da,ca,je,Kt,fa,pa,Ze,ua,ma,Ce,eo,ha,ga,We,_a,zo,m,Ge,ba,to,va,ya,Fe,wa,Tt,xa,Ma,Ta,oo,Da,$a,X,Ne,no,Sa,Pa,Dt,Ea,Ja,Le,ao,Ua,ka,$t,Ia,ja,Ve,so,Za,Ca,St,Wa,Ga,io,Fa,Na,lo,Be,ro,La,Va,Pt,Ba,Aa,N,Ae,Ra,co,za,qa,ee,Ya,L,Re,Xa,fo,Ha,Qa,po,Oa,Ka,te,ze,es,qe,ts,uo,os,ns,as,V,Ye,ss,mo,is,ls,ho,rs,ds,oe,Xe,cs,He,fs,go,ps,us,ms,I,Qe,hs,Oe,gs,Ke,_s,bs,vs,_o,ys,ws,ne,xs,ae,Ms,se,et,Ts,tt,Ds,ot,$s,Ss,Ps,B,nt,Es,bo,Js,Us,vo,ks,Is,ie,at,js,st,Zs,yo,Cs,Ws,Gs,k,it,Fs,lt,Ns,Et,Ls,Vs,Bs,wo,As,Rs,le,zs,rt,qs,dt,Ys,Xs,Hs,re,Qs,A,ct,Os,F,Ks,Jt,ei,ti,xo,oi,ni,Mo,ai,si,ii,de,li,ce,ft,ri,H,di,Ut,ci,fi,pt,To,pi,ui,mi,fe,ut,hi,Do,gi,_i,pe,mt,bi,j,vi,$o,yi,wi,So,xi,Mi,Po,Ti,Di,Eo,$i,Si,Pi,ue,ht,Ei,Q,Ji,Jo,Ui,ki,Uo,Ii,ji,qo,Z,gt,Zi,ko,Ci,Wi,_t,Gi,Io,Fi,Ni,Li,R,bt,Vi,jo,Bi,Ai,me,Yo;return r=new ir({}),_e=new ir({}),Ge=new P({props:{name:"class diffusers.StableDiffusionPipeline",anchor:"diffusers.StableDiffusionPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.18.2/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.StableDiffusionPipeline.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.StableDiffusionPipeline.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.StableDiffusionPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.18.2/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.18.2/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.18.2/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.18.2/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.18.2/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionPipeline.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/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L72"}}),Ae=new P({props:{name:"__call__",anchor:"diffusers.StableDiffusionPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"guidance_rescale",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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.StableDiffusionPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.18.2/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionPipeline.__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.StableDiffusionPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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 <a href="/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionPipeline.__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.StableDiffusionPipeline.__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/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionPipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.7) &#x2014;
Guidance rescale factor proposed by <a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are
Flawed</a> <code>guidance_scale</code> is defined as <code>&#x3C6;</code> in equation 16. of
<a href="https://arxiv.org/pdf/2305.08891.pdf" rel="nofollow">Common Diffusion Noise Schedules and Sample Steps are Flawed</a>.
Guidance rescale factor should fix overexposure when using zero terminal SNR.`,name:"guidance_rescale"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L564",returnDescription:`
<p><a
  href="/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ee=new Lt({props:{anchor:"diffusers.StableDiffusionPipeline.__call__.example",$$slots:{default:[ur]},$$scope:{ctx:E}}}),Re=new P({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1470"}}),ze=new P({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1486"}}),Ye=new P({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L199"}}),Xe=new P({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L208"}}),Qe=new P({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1408"}}),ne=new pr({props:{warning:!0,$$slots:{default:[mr]},$$scope:{ctx:E}}}),ae=new Lt({props:{anchor:"diffusers.StableDiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[hr]},$$scope:{ctx:E}}}),et=new P({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/pipeline_utils.py#L1444"}}),nt=new P({props:{name:"enable_vae_tiling",anchor:"diffusers.StableDiffusionPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L215"}}),at=new P({props:{name:"disable_vae_tiling",anchor:"diffusers.StableDiffusionPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L224"}}),it=new P({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code> or <code>List[str or os.PathLike]</code> or <code>Dict</code> or <code>List[Dict]</code>) &#x2014;
Can be either one of the following or a list of them:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>sd-concepts-library/low-poly-hd-logos-icons</code>) of a
pretrained model hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_text_inversion_directory/</code>) containing the textual
inversion weights.</li>
<li>A path to a <em>file</em> (for example <code>./my_text_inversions.pt</code>) containing textual inversion weights.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.token",description:`<strong>token</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Override the token to use for the textual inversion weights. If <code>pretrained_model_name_or_path</code> is a
list, then <code>token</code> must also be a list of equal length.`,name:"token"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of a custom weight file. This should be used when:</p>
<ul>
<li>The saved textual inversion file is in &#x1F917; Diffusers format, but was saved under a specific weight
name such as <code>text_inv.bin</code>.</li>
<li>The saved textual inversion file is in the Automatic1111 format.</li>
</ul>`,name:"weight_name"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L469"}}),le=new Lt({props:{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.example",$$slots:{default:[gr]},$$scope:{ctx:E}}}),re=new Lt({props:{anchor:"diffusers.StableDiffusionPipeline.load_textual_inversion.example-2",$$slots:{default:[_r]},$$scope:{ctx:E}}}),ct=new P({props:{name:"from_single_file",anchor:"diffusers.StableDiffusionPipeline.from_single_file",parameters:[{name:"pretrained_model_link_or_path",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.from_single_file.pretrained_model_link_or_path",description:`<strong>pretrained_model_link_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:<ul>
<li>A link to the <code>.ckpt</code> file (for example
<code>&quot;https://huggingface.co/&lt;repo_id&gt;/blob/main/&lt;path_to_file&gt;.ckpt&quot;</code>) on the Hub.</li>
<li>A path to a <em>file</em> containing all pipeline weights.</li>
</ul>`,name:"pretrained_model_link_or_path"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to True, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.extract_ema",description:`<strong>extract_ema</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to extract the EMA weights or not. Pass <code>True</code> to extract the EMA weights which usually yield
higher quality images for inference. Non-EMA weights are usually better to continue finetuning.`,name:"extract_ema"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.upcast_attention",description:`<strong>upcast_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether the attention computation should always be upcasted.`,name:"upcast_attention"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
Diffusion v2 base model. Use 768 for Stable Diffusion v2.`,name:"image_size"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.prediction_type",description:`<strong>prediction_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The prediction type the model was trained on. Use <code>&apos;epsilon&apos;</code> for all Stable Diffusion v1 models and
the Stable Diffusion v2 base model. Use <code>&apos;v_prediction&apos;</code> for Stable Diffusion v2.`,name:"prediction_type"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.num_in_channels",description:`<strong>num_in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of input channels. If <code>None</code>, it will be automatically inferred.`,name:"num_in_channels"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.scheduler_type",description:`<strong>scheduler_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pndm&quot;</code>) &#x2014;
Type of scheduler to use. Should be one of <code>[&quot;pndm&quot;, &quot;lms&quot;, &quot;heun&quot;, &quot;euler&quot;, &quot;euler-ancestral&quot;, &quot;dpm&quot;, &quot;ddim&quot;]</code>.`,name:"scheduler_type"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.load_safety_checker",description:`<strong>load_safety_checker</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to load the safety checker or not.`,name:"load_safety_checker"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An instance of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a> to use,
specifically the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>
variant. If this parameter is <code>None</code>, the function will load a new instance of [CLIP] by itself, if
needed.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
An instance of
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>
to use. If this parameter is <code>None</code>, the function will load a new instance of [CLIPTokenizer] by
itself, if needed.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionPipeline.from_single_file.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (for example the pipeline components of the
specific pipeline class). The overwritten components are directly passed to the pipelines <code>__init__</code>
method. See example below for more information.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L1290"}}),de=new Lt({props:{anchor:"diffusers.StableDiffusionPipeline.from_single_file.example",$$slots:{default:[br]},$$scope:{ctx:E}}}),ft=new P({props:{name:"load_lora_weights",anchor:"diffusers.StableDiffusionPipeline.load_lora_weights",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/v0.18.2/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionPipeline.load_lora_weights.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L746"}}),ut=new P({props:{name:"save_lora_weights",anchor:"diffusers.StableDiffusionPipeline.save_lora_weights",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"unet_lora_layers",val:": typing.Dict[str, typing.Union[torch.nn.modules.module.Module, torch.Tensor]] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.StableDiffusionPipeline.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save LoRA parameters to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.StableDiffusionPipeline.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the UNet.`,name:"unet_lora_layers"},{anchor:"diffusers.StableDiffusionPipeline.save_lora_weights.text_encoder_lora_layers",description:"<strong>text_encoder_lora_layers</strong> (<code>Dict[str, torch.nn.Module] or </code>Dict[str, torch.Tensor]<code>) -- State dict of the LoRA layers corresponding to the </code>text_encoder`. Must explicitly pass the text\nencoder LoRA state dict because it comes &#x1F917; Transformers.",name:"text_encoder_lora_layers"},{anchor:"diffusers.StableDiffusionPipeline.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.StableDiffusionPipeline.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/loaders.py#L1150"}}),mt=new P({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L256"}}),ht=new P({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L231"}}),gt=new P({props:{name:"class diffusers.FlaxStableDiffusionPipeline",anchor:"diffusers.FlaxStableDiffusionPipeline",parameters:[{name:"vae",val:": FlaxAutoencoderKL"},{name:"text_encoder",val:": FlaxCLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": FlaxUNet2DConditionModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim_flax.FlaxDDIMScheduler, diffusers.schedulers.scheduling_pndm_flax.FlaxPNDMScheduler, diffusers.schedulers.scheduling_lms_discrete_flax.FlaxLMSDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep_flax.FlaxDPMSolverMultistepScheduler]"},{name:"safety_checker",val:": FlaxStableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.18.2/en/api/models/autoencoderkl#diffusers.FlaxAutoencoderKL">FlaxAutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.FlaxStableDiffusionPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>FlaxCLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.FlaxCLIPTextModel" 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.FlaxStableDiffusionPipeline.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.FlaxStableDiffusionPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.18.2/en/api/models/unet2d-cond#diffusers.FlaxUNet2DConditionModel">FlaxUNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.FlaxStableDiffusionPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.18.2/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
<code>FlaxDDIMScheduler</code>, <code>FlaxLMSDiscreteScheduler</code>, <code>FlaxPNDMScheduler</code>, or
<code>FlaxDPMSolverMultistepScheduler</code>.`,name:"scheduler"},{anchor:"diffusers.FlaxStableDiffusionPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>FlaxStableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.FlaxStableDiffusionPipeline.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/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py#L81"}}),bt=new P({props:{name:"__call__",anchor:"diffusers.FlaxStableDiffusionPipeline.__call__",parameters:[{name:"prompt_ids",val:": array"},{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"prng_seed",val:": PRNGKeyArray"},{name:"num_inference_steps",val:": int = 50"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"guidance_scale",val:": typing.Union[float, array] = 7.5"},{name:"latents",val:": array = None"},{name:"neg_prompt_ids",val:": array = None"},{name:"return_dict",val:": bool = True"},{name:"jit",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide the image generation.`,name:"prompt"},{anchor:"diffusers.FlaxStableDiffusionPipeline.__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.FlaxStableDiffusionPipeline.__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.FlaxStableDiffusionPipeline.__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.FlaxStableDiffusionPipeline.__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.FlaxStableDiffusionPipeline.__call__.latents",description:`<strong>latents</strong> (<code>jnp.array</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. tensor will ge generated
by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.FlaxStableDiffusionPipeline.__call__.jit",description:`<strong>jit</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to run <code>pmap</code> versions of the generation and safety scoring functions. NOTE: This argument
exists because <code>__call__</code> is not yet end-to-end pmap-able. It will be removed in a future release.`,name:"jit"},{anchor:"diffusers.FlaxStableDiffusionPipeline.__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>FlaxStableDiffusionPipelineOutput</code> instead of
a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py#L311",returnDescription:`
<p><code>FlaxStableDiffusionPipelineOutput</code> if <code>return_dict</code> is True, otherwise a
<code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><code>FlaxStableDiffusionPipelineOutput</code> or <code>tuple</code></p>
`}}),me=new Lt({props:{anchor:"diffusers.FlaxStableDiffusionPipeline.__call__.example",$$slots:{default:[vr]},$$scope:{ctx:E}}}),{c(){u=o("meta"),$=d(),h=o("h1"),p=o("a"),v=o("span"),y(r.$$.fragment),g=d(),At=o("span"),$n=s("Text-to-Image Generation"),No=d(),Y=o("h2"),O=o("a"),Rt=o("span"),y(_e.$$.fragment),Sn=d(),zt=o("span"),Pn=s("StableDiffusionPipeline"),Lo=d(),J=o("p"),En=s("The Stable Diffusion model was created by the researchers and engineers from "),be=o("a"),Jn=s("CompVis"),Un=s(", "),ve=o("a"),kn=s("Stability AI"),In=s(", "),ye=o("a"),jn=s("runway"),Zn=s(", and "),we=o("a"),Cn=s("LAION"),Wn=s(". The "),wt=o("a"),Gn=s("StableDiffusionPipeline"),Fn=s(" is capable of generating photo-realistic images given any text input using Stable Diffusion."),Vo=d(),xt=o("p"),Nn=s("The original codebase can be found here:"),Bo=d(),K=o("ul"),xe=o("li"),qt=o("em"),Ln=s("Stable Diffusion V1"),Vn=s(": "),Me=o("a"),Bn=s("CompVis/stable-diffusion"),An=d(),Te=o("li"),Yt=o("em"),Rn=s("Stable Diffusion v2"),zn=s(": "),De=o("a"),qn=s("Stability-AI/stablediffusion"),Ao=d(),Mt=o("p"),Yn=s("Available Checkpoints are:"),Ro=d(),U=o("ul"),$e=o("li"),Xt=o("em"),Xn=s("stable-diffusion-v1-4 (512x512 resolution)"),Hn=d(),Se=o("a"),Qn=s("CompVis/stable-diffusion-v1-4"),On=d(),Pe=o("li"),Ht=o("em"),Kn=s("stable-diffusion-v1-5 (512x512 resolution)"),ea=d(),Ee=o("a"),ta=s("runwayml/stable-diffusion-v1-5"),oa=d(),Je=o("li"),Qt=o("em"),na=s("stable-diffusion-2-base (512x512 resolution)"),aa=s(": "),Ue=o("a"),sa=s("stabilityai/stable-diffusion-2-base"),ia=d(),ke=o("li"),Ot=o("em"),la=s("stable-diffusion-2 (768x768 resolution)"),ra=s(": "),Ie=o("a"),da=s("stabilityai/stable-diffusion-2"),ca=d(),je=o("li"),Kt=o("em"),fa=s("stable-diffusion-2-1-base (512x512 resolution)"),pa=d(),Ze=o("a"),ua=s("stabilityai/stable-diffusion-2-1-base"),ma=d(),Ce=o("li"),eo=o("em"),ha=s("stable-diffusion-2-1 (768x768 resolution)"),ga=s(": "),We=o("a"),_a=s("stabilityai/stable-diffusion-2-1"),zo=d(),m=o("div"),y(Ge.$$.fragment),ba=d(),to=o("p"),va=s("Pipeline for text-to-image generation using Stable Diffusion."),ya=d(),Fe=o("p"),wa=s("This model inherits from "),Tt=o("a"),xa=s("DiffusionPipeline"),Ma=s(`. 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.)`),Ta=d(),oo=o("p"),Da=s("In addition the pipeline inherits the following loading methods:"),$a=d(),X=o("ul"),Ne=o("li"),no=o("em"),Sa=s("Textual-Inversion"),Pa=s(": "),Dt=o("a"),Ea=s("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),Ja=d(),Le=o("li"),ao=o("em"),Ua=s("LoRA"),ka=s(": "),$t=o("a"),Ia=s("loaders.LoraLoaderMixin.load_lora_weights()"),ja=d(),Ve=o("li"),so=o("em"),Za=s("Ckpt"),Ca=s(": "),St=o("a"),Wa=s("loaders.FromSingleFileMixin.from_single_file()"),Ga=d(),io=o("p"),Fa=s("as well as the following saving methods:"),Na=d(),lo=o("ul"),Be=o("li"),ro=o("em"),La=s("LoRA"),Va=s(": "),Pt=o("a"),Ba=s("loaders.LoraLoaderMixin.save_lora_weights()"),Aa=d(),N=o("div"),y(Ae.$$.fragment),Ra=d(),co=o("p"),za=s("Function invoked when calling the pipeline for generation."),qa=d(),y(ee.$$.fragment),Ya=d(),L=o("div"),y(Re.$$.fragment),Xa=d(),fo=o("p"),Ha=s("Enable sliced attention computation."),Qa=d(),po=o("p"),Oa=s(`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful to save some memory in exchange for a small speed decrease.`),Ka=d(),te=o("div"),y(ze.$$.fragment),es=d(),qe=o("p"),ts=s("Disable sliced attention computation. If "),uo=o("code"),os=s("enable_attention_slicing"),ns=s(` was previously called, attention is
computed in one step.`),as=d(),V=o("div"),y(Ye.$$.fragment),ss=d(),mo=o("p"),is=s("Enable sliced VAE decoding."),ls=d(),ho=o("p"),rs=s(`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.`),ds=d(),oe=o("div"),y(Xe.$$.fragment),cs=d(),He=o("p"),fs=s("Disable sliced VAE decoding. If "),go=o("code"),ps=s("enable_vae_slicing"),us=s(` was previously invoked, this method will go back to
computing decoding in one step.`),ms=d(),I=o("div"),y(Qe.$$.fragment),hs=d(),Oe=o("p"),gs=s("Enable memory efficient attention from "),Ke=o("a"),_s=s("xFormers"),bs=s("."),vs=d(),_o=o("p"),ys=s(`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.`),ws=d(),y(ne.$$.fragment),xs=d(),y(ae.$$.fragment),Ms=d(),se=o("div"),y(et.$$.fragment),Ts=d(),tt=o("p"),Ds=s("Disable memory efficient attention from "),ot=o("a"),$s=s("xFormers"),Ss=s("."),Ps=d(),B=o("div"),y(nt.$$.fragment),Es=d(),bo=o("p"),Js=s("Enable tiled VAE decoding."),Us=d(),vo=o("p"),ks=s(`When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in
several steps. This is useful to save a large amount of memory and to allow the processing of larger images.`),Is=d(),ie=o("div"),y(at.$$.fragment),js=d(),st=o("p"),Zs=s("Disable tiled VAE decoding. If "),yo=o("code"),Cs=s("enable_vae_tiling"),Ws=s(` was previously invoked, this method will go back to
computing decoding in one step.`),Gs=d(),k=o("div"),y(it.$$.fragment),Fs=d(),lt=o("p"),Ns=s("Load textual inversion embeddings into the text encoder of "),Et=o("a"),Ls=s("StableDiffusionPipeline"),Vs=s(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Bs=d(),wo=o("p"),As=s("Example:"),Rs=d(),y(le.$$.fragment),zs=d(),rt=o("p"),qs=s(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),dt=o("a"),Ys=s("civitAI"),Xs=s(") and then load the vector"),Hs=d(),y(re.$$.fragment),Qs=d(),A=o("div"),y(ct.$$.fragment),Os=d(),F=o("p"),Ks=s("Instantiate a "),Jt=o("a"),ei=s("DiffusionPipeline"),ti=s(" from pretrained pipeline weights saved in the "),xo=o("code"),oi=s(".ckpt"),ni=s(` format. The pipeline
is set in evaluation mode (`),Mo=o("code"),ai=s("model.eval()"),si=s(") by default."),ii=d(),y(de.$$.fragment),li=d(),ce=o("div"),y(ft.$$.fragment),ri=d(),H=o("p"),di=s("Load pretrained LoRA attention processor layers into "),Ut=o("a"),ci=s("UNet2DConditionModel"),fi=s(` and
`),pt=o("a"),To=o("code"),pi=s("CLIPTextModel"),ui=s("."),mi=d(),fe=o("div"),y(ut.$$.fragment),hi=d(),Do=o("p"),gi=s("Save the LoRA parameters corresponding to the UNet and text encoder."),_i=d(),pe=o("div"),y(mt.$$.fragment),bi=d(),j=o("p"),vi=s(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),$o=o("code"),yi=s("enable_sequential_cpu_offload"),wi=s(", this method moves one whole model at a time to the GPU when its "),So=o("code"),xi=s("forward"),Mi=s(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Po=o("code"),Ti=s("enable_sequential_cpu_offload"),Di=s(", but performance is much better due to the iterative execution of the "),Eo=o("code"),$i=s("unet"),Si=s("."),Pi=d(),ue=o("div"),y(ht.$$.fragment),Ei=d(),Q=o("p"),Ji=s(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Jo=o("code"),Ui=s("torch.device('meta') and loaded to GPU only when their specific submodule has its "),ki=s("forward"),Uo=o("code"),Ii=s("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),ji=s("enable_model_cpu_offload`, but performance is lower."),qo=d(),Z=o("div"),y(gt.$$.fragment),Zi=d(),ko=o("p"),Ci=s("Pipeline for text-to-image generation using Stable Diffusion."),Wi=d(),_t=o("p"),Gi=s("This model inherits from "),Io=o("code"),Fi=s("FlaxDiffusionPipeline"),Ni=s(`. 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.)`),Li=d(),R=o("div"),y(bt.$$.fragment),Vi=d(),jo=o("p"),Bi=s("Function invoked when calling the pipeline for generation."),Ai=d(),y(me.$$.fragment),this.h()},l(l){const b=cr('[data-svelte="svelte-1phssyn"]',document.head);u=n(b,"META",{name:!0,content:!0}),b.forEach(t),$=c(l),h=n(l,"H1",{class:!0});var vt=a(h);p=n(vt,"A",{id:!0,class:!0,href:!0});var Zo=a(p);v=n(Zo,"SPAN",{});var Co=a(v);w(r.$$.fragment,Co),Co.forEach(t),Zo.forEach(t),g=c(vt),At=n(vt,"SPAN",{});var Wo=a(At);$n=i(Wo,"Text-to-Image Generation"),Wo.forEach(t),vt.forEach(t),No=c(l),Y=n(l,"H2",{class:!0});var yt=a(Y);O=n(yt,"A",{id:!0,class:!0,href:!0});var Go=a(O);Rt=n(Go,"SPAN",{});var Fo=a(Rt);w(_e.$$.fragment,Fo),Fo.forEach(t),Go.forEach(t),Sn=c(yt),zt=n(yt,"SPAN",{});var Ri=a(zt);Pn=i(Ri,"StableDiffusionPipeline"),Ri.forEach(t),yt.forEach(t),Lo=c(l),J=n(l,"P",{});var C=a(J);En=i(C,"The Stable Diffusion model was created by the researchers and engineers from "),be=n(C,"A",{href:!0,rel:!0});var zi=a(be);Jn=i(zi,"CompVis"),zi.forEach(t),Un=i(C,", "),ve=n(C,"A",{href:!0,rel:!0});var qi=a(ve);kn=i(qi,"Stability AI"),qi.forEach(t),In=i(C,", "),ye=n(C,"A",{href:!0,rel:!0});var Yi=a(ye);jn=i(Yi,"runway"),Yi.forEach(t),Zn=i(C,", and "),we=n(C,"A",{href:!0,rel:!0});var Xi=a(we);Cn=i(Xi,"LAION"),Xi.forEach(t),Wn=i(C,". The "),wt=n(C,"A",{href:!0});var Hi=a(wt);Gn=i(Hi,"StableDiffusionPipeline"),Hi.forEach(t),Fn=i(C," is capable of generating photo-realistic images given any text input using Stable Diffusion."),C.forEach(t),Vo=c(l),xt=n(l,"P",{});var Qi=a(xt);Nn=i(Qi,"The original codebase can be found here:"),Qi.forEach(t),Bo=c(l),K=n(l,"UL",{});var Xo=a(K);xe=n(Xo,"LI",{});var Ho=a(xe);qt=n(Ho,"EM",{});var Oi=a(qt);Ln=i(Oi,"Stable Diffusion V1"),Oi.forEach(t),Vn=i(Ho,": "),Me=n(Ho,"A",{href:!0,rel:!0});var Ki=a(Me);Bn=i(Ki,"CompVis/stable-diffusion"),Ki.forEach(t),Ho.forEach(t),An=c(Xo),Te=n(Xo,"LI",{});var Qo=a(Te);Yt=n(Qo,"EM",{});var el=a(Yt);Rn=i(el,"Stable Diffusion v2"),el.forEach(t),zn=i(Qo,": "),De=n(Qo,"A",{href:!0,rel:!0});var tl=a(De);qn=i(tl,"Stability-AI/stablediffusion"),tl.forEach(t),Qo.forEach(t),Xo.forEach(t),Ao=c(l),Mt=n(l,"P",{});var ol=a(Mt);Yn=i(ol,"Available Checkpoints are:"),ol.forEach(t),Ro=c(l),U=n(l,"UL",{});var W=a(U);$e=n(W,"LI",{});var Oo=a($e);Xt=n(Oo,"EM",{});var nl=a(Xt);Xn=i(nl,"stable-diffusion-v1-4 (512x512 resolution)"),nl.forEach(t),Hn=c(Oo),Se=n(Oo,"A",{href:!0,rel:!0});var al=a(Se);Qn=i(al,"CompVis/stable-diffusion-v1-4"),al.forEach(t),Oo.forEach(t),On=c(W),Pe=n(W,"LI",{});var Ko=a(Pe);Ht=n(Ko,"EM",{});var sl=a(Ht);Kn=i(sl,"stable-diffusion-v1-5 (512x512 resolution)"),sl.forEach(t),ea=c(Ko),Ee=n(Ko,"A",{href:!0,rel:!0});var il=a(Ee);ta=i(il,"runwayml/stable-diffusion-v1-5"),il.forEach(t),Ko.forEach(t),oa=c(W),Je=n(W,"LI",{});var en=a(Je);Qt=n(en,"EM",{});var ll=a(Qt);na=i(ll,"stable-diffusion-2-base (512x512 resolution)"),ll.forEach(t),aa=i(en,": "),Ue=n(en,"A",{href:!0,rel:!0});var rl=a(Ue);sa=i(rl,"stabilityai/stable-diffusion-2-base"),rl.forEach(t),en.forEach(t),ia=c(W),ke=n(W,"LI",{});var tn=a(ke);Ot=n(tn,"EM",{});var dl=a(Ot);la=i(dl,"stable-diffusion-2 (768x768 resolution)"),dl.forEach(t),ra=i(tn,": "),Ie=n(tn,"A",{href:!0,rel:!0});var cl=a(Ie);da=i(cl,"stabilityai/stable-diffusion-2"),cl.forEach(t),tn.forEach(t),ca=c(W),je=n(W,"LI",{});var on=a(je);Kt=n(on,"EM",{});var fl=a(Kt);fa=i(fl,"stable-diffusion-2-1-base (512x512 resolution)"),fl.forEach(t),pa=c(on),Ze=n(on,"A",{href:!0,rel:!0});var pl=a(Ze);ua=i(pl,"stabilityai/stable-diffusion-2-1-base"),pl.forEach(t),on.forEach(t),ma=c(W),Ce=n(W,"LI",{});var nn=a(Ce);eo=n(nn,"EM",{});var ul=a(eo);ha=i(ul,"stable-diffusion-2-1 (768x768 resolution)"),ul.forEach(t),ga=i(nn,": "),We=n(nn,"A",{href:!0,rel:!0});var ml=a(We);_a=i(ml,"stabilityai/stable-diffusion-2-1"),ml.forEach(t),nn.forEach(t),W.forEach(t),zo=c(l),m=n(l,"DIV",{class:!0});var _=a(m);w(Ge.$$.fragment,_),ba=c(_),to=n(_,"P",{});var hl=a(to);va=i(hl,"Pipeline for text-to-image generation using Stable Diffusion."),hl.forEach(t),ya=c(_),Fe=n(_,"P",{});var an=a(Fe);wa=i(an,"This model inherits from "),Tt=n(an,"A",{href:!0});var gl=a(Tt);xa=i(gl,"DiffusionPipeline"),gl.forEach(t),Ma=i(an,`. 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.)`),an.forEach(t),Ta=c(_),oo=n(_,"P",{});var _l=a(oo);Da=i(_l,"In addition the pipeline inherits the following loading methods:"),_l.forEach(t),$a=c(_),X=n(_,"UL",{});var kt=a(X);Ne=n(kt,"LI",{});var sn=a(Ne);no=n(sn,"EM",{});var bl=a(no);Sa=i(bl,"Textual-Inversion"),bl.forEach(t),Pa=i(sn,": "),Dt=n(sn,"A",{href:!0});var vl=a(Dt);Ea=i(vl,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),vl.forEach(t),sn.forEach(t),Ja=c(kt),Le=n(kt,"LI",{});var ln=a(Le);ao=n(ln,"EM",{});var yl=a(ao);Ua=i(yl,"LoRA"),yl.forEach(t),ka=i(ln,": "),$t=n(ln,"A",{href:!0});var wl=a($t);Ia=i(wl,"loaders.LoraLoaderMixin.load_lora_weights()"),wl.forEach(t),ln.forEach(t),ja=c(kt),Ve=n(kt,"LI",{});var rn=a(Ve);so=n(rn,"EM",{});var xl=a(so);Za=i(xl,"Ckpt"),xl.forEach(t),Ca=i(rn,": "),St=n(rn,"A",{href:!0});var Ml=a(St);Wa=i(Ml,"loaders.FromSingleFileMixin.from_single_file()"),Ml.forEach(t),rn.forEach(t),kt.forEach(t),Ga=c(_),io=n(_,"P",{});var Tl=a(io);Fa=i(Tl,"as well as the following saving methods:"),Tl.forEach(t),Na=c(_),lo=n(_,"UL",{});var Dl=a(lo);Be=n(Dl,"LI",{});var dn=a(Be);ro=n(dn,"EM",{});var $l=a(ro);La=i($l,"LoRA"),$l.forEach(t),Va=i(dn,": "),Pt=n(dn,"A",{href:!0});var Sl=a(Pt);Ba=i(Sl,"loaders.LoraLoaderMixin.save_lora_weights()"),Sl.forEach(t),dn.forEach(t),Dl.forEach(t),Aa=c(_),N=n(_,"DIV",{class:!0});var It=a(N);w(Ae.$$.fragment,It),Ra=c(It),co=n(It,"P",{});var Pl=a(co);za=i(Pl,"Function invoked when calling the pipeline for generation."),Pl.forEach(t),qa=c(It),w(ee.$$.fragment,It),It.forEach(t),Ya=c(_),L=n(_,"DIV",{class:!0});var jt=a(L);w(Re.$$.fragment,jt),Xa=c(jt),fo=n(jt,"P",{});var El=a(fo);Ha=i(El,"Enable sliced attention computation."),El.forEach(t),Qa=c(jt),po=n(jt,"P",{});var Jl=a(po);Oa=i(Jl,`When this option is enabled, the attention module splits the input tensor in slices to compute attention in
several steps. This is useful to save some memory in exchange for a small speed decrease.`),Jl.forEach(t),jt.forEach(t),Ka=c(_),te=n(_,"DIV",{class:!0});var cn=a(te);w(ze.$$.fragment,cn),es=c(cn),qe=n(cn,"P",{});var fn=a(qe);ts=i(fn,"Disable sliced attention computation. If "),uo=n(fn,"CODE",{});var Ul=a(uo);os=i(Ul,"enable_attention_slicing"),Ul.forEach(t),ns=i(fn,` was previously called, attention is
computed in one step.`),fn.forEach(t),cn.forEach(t),as=c(_),V=n(_,"DIV",{class:!0});var Zt=a(V);w(Ye.$$.fragment,Zt),ss=c(Zt),mo=n(Zt,"P",{});var kl=a(mo);is=i(kl,"Enable sliced VAE decoding."),kl.forEach(t),ls=c(Zt),ho=n(Zt,"P",{});var Il=a(ho);rs=i(Il,`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.`),Il.forEach(t),Zt.forEach(t),ds=c(_),oe=n(_,"DIV",{class:!0});var pn=a(oe);w(Xe.$$.fragment,pn),cs=c(pn),He=n(pn,"P",{});var un=a(He);fs=i(un,"Disable sliced VAE decoding. If "),go=n(un,"CODE",{});var jl=a(go);ps=i(jl,"enable_vae_slicing"),jl.forEach(t),us=i(un,` was previously invoked, this method will go back to
computing decoding in one step.`),un.forEach(t),pn.forEach(t),ms=c(_),I=n(_,"DIV",{class:!0});var z=a(I);w(Qe.$$.fragment,z),hs=c(z),Oe=n(z,"P",{});var mn=a(Oe);gs=i(mn,"Enable memory efficient attention from "),Ke=n(mn,"A",{href:!0,rel:!0});var Zl=a(Ke);_s=i(Zl,"xFormers"),Zl.forEach(t),bs=i(mn,"."),mn.forEach(t),vs=c(z),_o=n(z,"P",{});var Cl=a(_o);ys=i(Cl,`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.`),Cl.forEach(t),ws=c(z),w(ne.$$.fragment,z),xs=c(z),w(ae.$$.fragment,z),z.forEach(t),Ms=c(_),se=n(_,"DIV",{class:!0});var hn=a(se);w(et.$$.fragment,hn),Ts=c(hn),tt=n(hn,"P",{});var gn=a(tt);Ds=i(gn,"Disable memory efficient attention from "),ot=n(gn,"A",{href:!0,rel:!0});var Wl=a(ot);$s=i(Wl,"xFormers"),Wl.forEach(t),Ss=i(gn,"."),gn.forEach(t),hn.forEach(t),Ps=c(_),B=n(_,"DIV",{class:!0});var Ct=a(B);w(nt.$$.fragment,Ct),Es=c(Ct),bo=n(Ct,"P",{});var Gl=a(bo);Js=i(Gl,"Enable tiled VAE decoding."),Gl.forEach(t),Us=c(Ct),vo=n(Ct,"P",{});var Fl=a(vo);ks=i(Fl,`When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in
several steps. This is useful to save a large amount of memory and to allow the processing of larger images.`),Fl.forEach(t),Ct.forEach(t),Is=c(_),ie=n(_,"DIV",{class:!0});var _n=a(ie);w(at.$$.fragment,_n),js=c(_n),st=n(_n,"P",{});var bn=a(st);Zs=i(bn,"Disable tiled VAE decoding. If "),yo=n(bn,"CODE",{});var Nl=a(yo);Cs=i(Nl,"enable_vae_tiling"),Nl.forEach(t),Ws=i(bn,` was previously invoked, this method will go back to
computing decoding in one step.`),bn.forEach(t),_n.forEach(t),Gs=c(_),k=n(_,"DIV",{class:!0});var G=a(k);w(it.$$.fragment,G),Fs=c(G),lt=n(G,"P",{});var vn=a(lt);Ns=i(vn,"Load textual inversion embeddings into the text encoder of "),Et=n(vn,"A",{href:!0});var Ll=a(Et);Ls=i(Ll,"StableDiffusionPipeline"),Ll.forEach(t),Vs=i(vn,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),vn.forEach(t),Bs=c(G),wo=n(G,"P",{});var Vl=a(wo);As=i(Vl,"Example:"),Vl.forEach(t),Rs=c(G),w(le.$$.fragment,G),zs=c(G),rt=n(G,"P",{});var yn=a(rt);qs=i(yn,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),dt=n(yn,"A",{href:!0,rel:!0});var Bl=a(dt);Ys=i(Bl,"civitAI"),Bl.forEach(t),Xs=i(yn,") and then load the vector"),yn.forEach(t),Hs=c(G),w(re.$$.fragment,G),G.forEach(t),Qs=c(_),A=n(_,"DIV",{class:!0});var Wt=a(A);w(ct.$$.fragment,Wt),Os=c(Wt),F=n(Wt,"P",{});var he=a(F);Ks=i(he,"Instantiate a "),Jt=n(he,"A",{href:!0});var Al=a(Jt);ei=i(Al,"DiffusionPipeline"),Al.forEach(t),ti=i(he," from pretrained pipeline weights saved in the "),xo=n(he,"CODE",{});var Rl=a(xo);oi=i(Rl,".ckpt"),Rl.forEach(t),ni=i(he,` format. The pipeline
is set in evaluation mode (`),Mo=n(he,"CODE",{});var zl=a(Mo);ai=i(zl,"model.eval()"),zl.forEach(t),si=i(he,") by default."),he.forEach(t),ii=c(Wt),w(de.$$.fragment,Wt),Wt.forEach(t),li=c(_),ce=n(_,"DIV",{class:!0});var wn=a(ce);w(ft.$$.fragment,wn),ri=c(wn),H=n(wn,"P",{});var Gt=a(H);di=i(Gt,"Load pretrained LoRA attention processor layers into "),Ut=n(Gt,"A",{href:!0});var ql=a(Ut);ci=i(ql,"UNet2DConditionModel"),ql.forEach(t),fi=i(Gt,` and
`),pt=n(Gt,"A",{href:!0,rel:!0});var Yl=a(pt);To=n(Yl,"CODE",{});var Xl=a(To);pi=i(Xl,"CLIPTextModel"),Xl.forEach(t),Yl.forEach(t),ui=i(Gt,"."),Gt.forEach(t),wn.forEach(t),mi=c(_),fe=n(_,"DIV",{class:!0});var xn=a(fe);w(ut.$$.fragment,xn),hi=c(xn),Do=n(xn,"P",{});var Hl=a(Do);gi=i(Hl,"Save the LoRA parameters corresponding to the UNet and text encoder."),Hl.forEach(t),xn.forEach(t),_i=c(_),pe=n(_,"DIV",{class:!0});var Mn=a(pe);w(mt.$$.fragment,Mn),bi=c(Mn),j=n(Mn,"P",{});var q=a(j);vi=i(q,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),$o=n(q,"CODE",{});var Ql=a($o);yi=i(Ql,"enable_sequential_cpu_offload"),Ql.forEach(t),wi=i(q,", this method moves one whole model at a time to the GPU when its "),So=n(q,"CODE",{});var Ol=a(So);xi=i(Ol,"forward"),Ol.forEach(t),Mi=i(q,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Po=n(q,"CODE",{});var Kl=a(Po);Ti=i(Kl,"enable_sequential_cpu_offload"),Kl.forEach(t),Di=i(q,", but performance is much better due to the iterative execution of the "),Eo=n(q,"CODE",{});var er=a(Eo);$i=i(er,"unet"),er.forEach(t),Si=i(q,"."),q.forEach(t),Mn.forEach(t),Pi=c(_),ue=n(_,"DIV",{class:!0});var Tn=a(ue);w(ht.$$.fragment,Tn),Ei=c(Tn),Q=n(Tn,"P",{});var Ft=a(Q);Ji=i(Ft,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Jo=n(Ft,"CODE",{});var tr=a(Jo);Ui=i(tr,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),tr.forEach(t),ki=i(Ft,"forward"),Uo=n(Ft,"CODE",{});var or=a(Uo);Ii=i(or,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),or.forEach(t),ji=i(Ft,"enable_model_cpu_offload`, but performance is lower."),Ft.forEach(t),Tn.forEach(t),_.forEach(t),qo=c(l),Z=n(l,"DIV",{class:!0});var ge=a(Z);w(gt.$$.fragment,ge),Zi=c(ge),ko=n(ge,"P",{});var nr=a(ko);Ci=i(nr,"Pipeline for text-to-image generation using Stable Diffusion."),nr.forEach(t),Wi=c(ge),_t=n(ge,"P",{});var Dn=a(_t);Gi=i(Dn,"This model inherits from "),Io=n(Dn,"CODE",{});var ar=a(Io);Fi=i(ar,"FlaxDiffusionPipeline"),ar.forEach(t),Ni=i(Dn,`. 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.)`),Dn.forEach(t),Li=c(ge),R=n(ge,"DIV",{class:!0});var Nt=a(R);w(bt.$$.fragment,Nt),Vi=c(Nt),jo=n(Nt,"P",{});var sr=a(jo);Bi=i(sr,"Function invoked when calling the pipeline for generation."),sr.forEach(t),Ai=c(Nt),w(me.$$.fragment,Nt),Nt.forEach(t),ge.forEach(t),this.h()},h(){f(u,"name","hf:doc:metadata"),f(u,"content",JSON.stringify(wr)),f(p,"id","texttoimage-generation"),f(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(p,"href","#texttoimage-generation"),f(h,"class","relative group"),f(O,"id","diffusers.StableDiffusionPipeline"),f(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(O,"href","#diffusers.StableDiffusionPipeline"),f(Y,"class","relative group"),f(be,"href","https://github.com/CompVis"),f(be,"rel","nofollow"),f(ve,"href","https://stability.ai/"),f(ve,"rel","nofollow"),f(ye,"href","https://github.com/runwayml"),f(ye,"rel","nofollow"),f(we,"href","https://laion.ai/"),f(we,"rel","nofollow"),f(wt,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),f(Me,"href","https://github.com/CompVis/stable-diffusion"),f(Me,"rel","nofollow"),f(De,"href","https://github.com/Stability-AI/stablediffusion"),f(De,"rel","nofollow"),f(Se,"href","https://huggingface.co/CompVis/stable-diffusion-v1-4"),f(Se,"rel","nofollow"),f(Ee,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),f(Ee,"rel","nofollow"),f(Ue,"href","https://huggingface.co/stabilityai/stable-diffusion-2-base"),f(Ue,"rel","nofollow"),f(Ie,"href","https://huggingface.co/stabilityai/stable-diffusion-2"),f(Ie,"rel","nofollow"),f(Ze,"href","https://huggingface.co/stabilityai/stable-diffusion-2-1-base"),f(Ze,"rel","nofollow"),f(We,"href","https://huggingface.co/stabilityai/stable-diffusion-2-1"),f(We,"rel","nofollow"),f(Tt,"href","/docs/diffusers/v0.18.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),f(Dt,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_textual_inversion"),f($t,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.load_lora_weights"),f(St,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.from_single_file"),f(Pt,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/depth2img#diffusers.StableDiffusionDepth2ImgPipeline.save_lora_weights"),f(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ke,"href","https://facebookresearch.github.io/xformers/"),f(Ke,"rel","nofollow"),f(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"href","https://facebookresearch.github.io/xformers/"),f(ot,"rel","nofollow"),f(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Et,"href","/docs/diffusers/v0.18.2/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),f(dt,"href","https://civitai.com/models/3036?modelVersionId=9857"),f(dt,"rel","nofollow"),f(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Jt,"href","/docs/diffusers/v0.18.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ut,"href","/docs/diffusers/v0.18.2/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel"),f(pt,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),f(pt,"rel","nofollow"),f(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,b){e(document.head,u),S(l,$,b),S(l,h,b),e(h,p),e(p,v),x(r,v,null),e(h,g),e(h,At),e(At,$n),S(l,No,b),S(l,Y,b),e(Y,O),e(O,Rt),x(_e,Rt,null),e(Y,Sn),e(Y,zt),e(zt,Pn),S(l,Lo,b),S(l,J,b),e(J,En),e(J,be),e(be,Jn),e(J,Un),e(J,ve),e(ve,kn),e(J,In),e(J,ye),e(ye,jn),e(J,Zn),e(J,we),e(we,Cn),e(J,Wn),e(J,wt),e(wt,Gn),e(J,Fn),S(l,Vo,b),S(l,xt,b),e(xt,Nn),S(l,Bo,b),S(l,K,b),e(K,xe),e(xe,qt),e(qt,Ln),e(xe,Vn),e(xe,Me),e(Me,Bn),e(K,An),e(K,Te),e(Te,Yt),e(Yt,Rn),e(Te,zn),e(Te,De),e(De,qn),S(l,Ao,b),S(l,Mt,b),e(Mt,Yn),S(l,Ro,b),S(l,U,b),e(U,$e),e($e,Xt),e(Xt,Xn),e($e,Hn),e($e,Se),e(Se,Qn),e(U,On),e(U,Pe),e(Pe,Ht),e(Ht,Kn),e(Pe,ea),e(Pe,Ee),e(Ee,ta),e(U,oa),e(U,Je),e(Je,Qt),e(Qt,na),e(Je,aa),e(Je,Ue),e(Ue,sa),e(U,ia),e(U,ke),e(ke,Ot),e(Ot,la),e(ke,ra),e(ke,Ie),e(Ie,da),e(U,ca),e(U,je),e(je,Kt),e(Kt,fa),e(je,pa),e(je,Ze),e(Ze,ua),e(U,ma),e(U,Ce),e(Ce,eo),e(eo,ha),e(Ce,ga),e(Ce,We),e(We,_a),S(l,zo,b),S(l,m,b),x(Ge,m,null),e(m,ba),e(m,to),e(to,va),e(m,ya),e(m,Fe),e(Fe,wa),e(Fe,Tt),e(Tt,xa),e(Fe,Ma),e(m,Ta),e(m,oo),e(oo,Da),e(m,$a),e(m,X),e(X,Ne),e(Ne,no),e(no,Sa),e(Ne,Pa),e(Ne,Dt),e(Dt,Ea),e(X,Ja),e(X,Le),e(Le,ao),e(ao,Ua),e(Le,ka),e(Le,$t),e($t,Ia),e(X,ja),e(X,Ve),e(Ve,so),e(so,Za),e(Ve,Ca),e(Ve,St),e(St,Wa),e(m,Ga),e(m,io),e(io,Fa),e(m,Na),e(m,lo),e(lo,Be),e(Be,ro),e(ro,La),e(Be,Va),e(Be,Pt),e(Pt,Ba),e(m,Aa),e(m,N),x(Ae,N,null),e(N,Ra),e(N,co),e(co,za),e(N,qa),x(ee,N,null),e(m,Ya),e(m,L),x(Re,L,null),e(L,Xa),e(L,fo),e(fo,Ha),e(L,Qa),e(L,po),e(po,Oa),e(m,Ka),e(m,te),x(ze,te,null),e(te,es),e(te,qe),e(qe,ts),e(qe,uo),e(uo,os),e(qe,ns),e(m,as),e(m,V),x(Ye,V,null),e(V,ss),e(V,mo),e(mo,is),e(V,ls),e(V,ho),e(ho,rs),e(m,ds),e(m,oe),x(Xe,oe,null),e(oe,cs),e(oe,He),e(He,fs),e(He,go),e(go,ps),e(He,us),e(m,ms),e(m,I),x(Qe,I,null),e(I,hs),e(I,Oe),e(Oe,gs),e(Oe,Ke),e(Ke,_s),e(Oe,bs),e(I,vs),e(I,_o),e(_o,ys),e(I,ws),x(ne,I,null),e(I,xs),x(ae,I,null),e(m,Ms),e(m,se),x(et,se,null),e(se,Ts),e(se,tt),e(tt,Ds),e(tt,ot),e(ot,$s),e(tt,Ss),e(m,Ps),e(m,B),x(nt,B,null),e(B,Es),e(B,bo),e(bo,Js),e(B,Us),e(B,vo),e(vo,ks),e(m,Is),e(m,ie),x(at,ie,null),e(ie,js),e(ie,st),e(st,Zs),e(st,yo),e(yo,Cs),e(st,Ws),e(m,Gs),e(m,k),x(it,k,null),e(k,Fs),e(k,lt),e(lt,Ns),e(lt,Et),e(Et,Ls),e(lt,Vs),e(k,Bs),e(k,wo),e(wo,As),e(k,Rs),x(le,k,null),e(k,zs),e(k,rt),e(rt,qs),e(rt,dt),e(dt,Ys),e(rt,Xs),e(k,Hs),x(re,k,null),e(m,Qs),e(m,A),x(ct,A,null),e(A,Os),e(A,F),e(F,Ks),e(F,Jt),e(Jt,ei),e(F,ti),e(F,xo),e(xo,oi),e(F,ni),e(F,Mo),e(Mo,ai),e(F,si),e(A,ii),x(de,A,null),e(m,li),e(m,ce),x(ft,ce,null),e(ce,ri),e(ce,H),e(H,di),e(H,Ut),e(Ut,ci),e(H,fi),e(H,pt),e(pt,To),e(To,pi),e(H,ui),e(m,mi),e(m,fe),x(ut,fe,null),e(fe,hi),e(fe,Do),e(Do,gi),e(m,_i),e(m,pe),x(mt,pe,null),e(pe,bi),e(pe,j),e(j,vi),e(j,$o),e($o,yi),e(j,wi),e(j,So),e(So,xi),e(j,Mi),e(j,Po),e(Po,Ti),e(j,Di),e(j,Eo),e(Eo,$i),e(j,Si),e(m,Pi),e(m,ue),x(ht,ue,null),e(ue,Ei),e(ue,Q),e(Q,Ji),e(Q,Jo),e(Jo,Ui),e(Q,ki),e(Q,Uo),e(Uo,Ii),e(Q,ji),S(l,qo,b),S(l,Z,b),x(gt,Z,null),e(Z,Zi),e(Z,ko),e(ko,Ci),e(Z,Wi),e(Z,_t),e(_t,Gi),e(_t,Io),e(Io,Fi),e(_t,Ni),e(Z,Li),e(Z,R),x(bt,R,null),e(R,Vi),e(R,jo),e(jo,Bi),e(R,Ai),x(me,R,null),Yo=!0},p(l,[b]){const vt={};b&2&&(vt.$$scope={dirty:b,ctx:l}),ee.$set(vt);const Zo={};b&2&&(Zo.$$scope={dirty:b,ctx:l}),ne.$set(Zo);const Co={};b&2&&(Co.$$scope={dirty:b,ctx:l}),ae.$set(Co);const Wo={};b&2&&(Wo.$$scope={dirty:b,ctx:l}),le.$set(Wo);const yt={};b&2&&(yt.$$scope={dirty:b,ctx:l}),re.$set(yt);const Go={};b&2&&(Go.$$scope={dirty:b,ctx:l}),de.$set(Go);const Fo={};b&2&&(Fo.$$scope={dirty:b,ctx:l}),me.$set(Fo)},i(l){Yo||(M(r.$$.fragment,l),M(_e.$$.fragment,l),M(Ge.$$.fragment,l),M(Ae.$$.fragment,l),M(ee.$$.fragment,l),M(Re.$$.fragment,l),M(ze.$$.fragment,l),M(Ye.$$.fragment,l),M(Xe.$$.fragment,l),M(Qe.$$.fragment,l),M(ne.$$.fragment,l),M(ae.$$.fragment,l),M(et.$$.fragment,l),M(nt.$$.fragment,l),M(at.$$.fragment,l),M(it.$$.fragment,l),M(le.$$.fragment,l),M(re.$$.fragment,l),M(ct.$$.fragment,l),M(de.$$.fragment,l),M(ft.$$.fragment,l),M(ut.$$.fragment,l),M(mt.$$.fragment,l),M(ht.$$.fragment,l),M(gt.$$.fragment,l),M(bt.$$.fragment,l),M(me.$$.fragment,l),Yo=!0)},o(l){T(r.$$.fragment,l),T(_e.$$.fragment,l),T(Ge.$$.fragment,l),T(Ae.$$.fragment,l),T(ee.$$.fragment,l),T(Re.$$.fragment,l),T(ze.$$.fragment,l),T(Ye.$$.fragment,l),T(Xe.$$.fragment,l),T(Qe.$$.fragment,l),T(ne.$$.fragment,l),T(ae.$$.fragment,l),T(et.$$.fragment,l),T(nt.$$.fragment,l),T(at.$$.fragment,l),T(it.$$.fragment,l),T(le.$$.fragment,l),T(re.$$.fragment,l),T(ct.$$.fragment,l),T(de.$$.fragment,l),T(ft.$$.fragment,l),T(ut.$$.fragment,l),T(mt.$$.fragment,l),T(ht.$$.fragment,l),T(gt.$$.fragment,l),T(bt.$$.fragment,l),T(me.$$.fragment,l),Yo=!1},d(l){t(u),l&&t($),l&&t(h),D(r),l&&t(No),l&&t(Y),D(_e),l&&t(Lo),l&&t(J),l&&t(Vo),l&&t(xt),l&&t(Bo),l&&t(K),l&&t(Ao),l&&t(Mt),l&&t(Ro),l&&t(U),l&&t(zo),l&&t(m),D(Ge),D(Ae),D(ee),D(Re),D(ze),D(Ye),D(Xe),D(Qe),D(ne),D(ae),D(et),D(nt),D(at),D(it),D(le),D(re),D(ct),D(de),D(ft),D(ut),D(mt),D(ht),l&&t(qo),l&&t(Z),D(gt),D(bt),D(me)}}}const wr={local:"texttoimage-generation",sections:[{local:"diffusers.StableDiffusionPipeline",title:"StableDiffusionPipeline"}],title:"Text-to-Image Generation"};function xr(E){return fr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Er extends lr{constructor(u){super();rr(this,u,xr,yr,dr,{})}}export{Er as default,wr as metadata};
