import{S as hi,i as gi,s as _i,e as s,k as c,w,t as r,M as bi,c as o,d as n,m as f,a as i,x as v,h as l,b as m,G as e,g as y,y as x,q as I,o as M,B as J,v as yi,L as Gt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as On}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as Z}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Nt}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Et}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ft}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function wi(k){let d,_,h,p,b,a,u,N,R,ce,H,V,fe,E,S,te,A;return{c(){d=s("p"),_=r("Make sure to check out the Stable Diffusion "),h=s("a"),p=r("Tips"),b=r(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),a=c(),u=s("p"),N=r("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),R=s("a"),ce=r("CompVis"),H=r(", "),V=s("a"),fe=r("Runway"),E=r(", and "),S=s("a"),te=r("Stability AI"),A=r(" Hub organizations!"),this.h()},l(j){d=o(j,"P",{});var W=i(d);_=l(W,"Make sure to check out the Stable Diffusion "),h=o(W,"A",{href:!0});var gt=i(h);p=l(gt,"Tips"),gt.forEach(n),b=l(W," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),W.forEach(n),a=f(j),u=o(j,"P",{});var F=i(u);N=l(F,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),R=o(F,"A",{href:!0,rel:!0});var G=i(R);ce=l(G,"CompVis"),G.forEach(n),H=l(F,", "),V=o(F,"A",{href:!0,rel:!0});var _t=i(V);fe=l(_t,"Runway"),_t.forEach(n),E=l(F,", and "),S=o(F,"A",{href:!0,rel:!0});var q=i(S);te=l(q,"Stability AI"),q.forEach(n),A=l(F," Hub organizations!"),F.forEach(n),this.h()},h(){m(h,"href","overview#tips"),m(R,"href","https://huggingface.co/CompVis"),m(R,"rel","nofollow"),m(V,"href","https://huggingface.co/runwayml"),m(V,"rel","nofollow"),m(S,"href","https://huggingface.co/stabilityai"),m(S,"rel","nofollow")},m(j,W){y(j,d,W),e(d,_),e(d,h),e(h,p),e(d,b),y(j,a,W),y(j,u,W),e(u,N),e(u,R),e(R,ce),e(u,H),e(u,V),e(V,fe),e(u,E),e(u,S),e(S,te),e(u,A)},d(j){j&&n(d),j&&n(a),j&&n(u)}}}function vi(k){let d,_,h,p,b;return p=new Nt({props:{code:"aW1wb3J0JTIwUElMJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uSW5wYWludFBpcGVsaW5lJTBBJTBBJTBBZGVmJTIwZG93bmxvYWRfaW1hZ2UodXJsKSUzQSUwQSUyMCUyMCUyMCUyMHJlc3BvbnNlJTIwJTNEJTIwcmVxdWVzdHMuZ2V0KHVybCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBQSUwuSW1hZ2Uub3BlbihCeXRlc0lPKHJlc3BvbnNlLmNvbnRlbnQpKS5jb252ZXJ0KCUyMlJHQiUyMiklMEElMEElMEFpbWdfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGQ29tcFZpcyUyRmxhdGVudC1kaWZmdXNpb24lMkZtYWluJTJGZGF0YSUyRmlucGFpbnRpbmdfZXhhbXBsZXMlMkZvdmVydHVyZS1jcmVhdGlvbnMtNXNJNmZRZ1lJdW8ucG5nJTIyJTBBbWFza191cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZDb21wVmlzJTJGbGF0ZW50LWRpZmZ1c2lvbiUyRm1haW4lMkZkYXRhJTJGaW5wYWludGluZ19leGFtcGxlcyUyRm92ZXJ0dXJlLWNyZWF0aW9ucy01c0k2ZlFnWUl1b19tYXNrLnBuZyUyMiUwQSUwQWluaXRfaW1hZ2UlMjAlM0QlMjBkb3dubG9hZF9pbWFnZShpbWdfdXJsKS5yZXNpemUoKDUxMiUyQyUyMDUxMikpJTBBbWFza19pbWFnZSUyMCUzRCUyMGRvd25sb2FkX2ltYWdlKG1hc2tfdXJsKS5yZXNpemUoKDUxMiUyQyUyMDUxMikpJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbklucGFpbnRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLWlucGFpbnRpbmclMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJGYWNlJTIwb2YlMjBhJTIweWVsbG93JTIwY2F0JTJDJTIwaGlnaCUyMHJlc29sdXRpb24lMkMlMjBzaXR0aW5nJTIwb24lMjBhJTIwcGFyayUyMGJlbmNoJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUzRHByb21wdCUyQyUyMGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG1hc2tfaW1hZ2UlM0RtYXNrX2ltYWdlKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> PIL
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> io <span class="hljs-keyword">import</span> BytesIO

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


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">download_image</span>(<span class="hljs-params">url</span>):
<span class="hljs-meta">... </span>    response = requests.get(url)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> PIL.Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span>img_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = download_image(img_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = download_image(mask_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionInpaintPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-inpainting&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<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;Face of a yellow cat, high resolution, sitting on a park bench&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[<span class="hljs-number">0</span>]`}}),{c(){d=s("p"),_=r("Examples:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function xi(k){let d,_,h,p,b;return{c(){d=s("p"),_=r("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),h=s("code"),p=r("scaled_dot_product_attention"),b=r(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),h=o(u,"CODE",{});var N=i(h);p=l(N,"scaled_dot_product_attention"),N.forEach(n),b=l(u,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),u.forEach(n)},m(a,u){y(a,d,u),e(d,_),e(d,h),e(h,p),e(d,b)},d(a){a&&n(d)}}}function Ii(k){let d,_,h,p,b;return p=new Nt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){d=s("p"),_=r("Examples:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function Mi(k){let d,_;return{c(){d=s("p"),_=r(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(h){d=o(h,"P",{});var p=i(d);_=l(p,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),p.forEach(n)},m(h,p){y(h,d,p),e(d,_)},d(h){h&&n(d)}}}function Ji(k){let d,_,h,p,b;return p=new Nt({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(){d=s("p"),_=r("Examples:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function Ti(k){let d,_,h,p,b;return p=new Nt({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(){d=s("p"),_=r("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function $i(k){let d,_,h,p,b;return p=new Nt({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(){d=s("p"),_=r("locally:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"locally:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function ki(k){let d,_;return{c(){d=s("p"),_=r("\u{1F9EA} This is an experimental feature!")},l(h){d=o(h,"P",{});var p=i(d);_=l(p,"\u{1F9EA} This is an experimental feature!"),p.forEach(n)},m(h,p){y(h,d,p),e(d,_)},d(h){h&&n(d)}}}function Si(k){let d,_,h,p,b;return p=new Nt({props:{code:"aW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBZnJvbSUyMGZsYXguamF4X3V0aWxzJTIwaW1wb3J0JTIwcmVwbGljYXRlJTBBZnJvbSUyMGZsYXgudHJhaW5pbmcuY29tbW9uX3V0aWxzJTIwaW1wb3J0JTIwc2hhcmQlMEFpbXBvcnQlMjBQSUwlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmxheFN0YWJsZURpZmZ1c2lvbklucGFpbnRQaXBlbGluZSUwQSUwQSUwQWRlZiUyMGRvd25sb2FkX2ltYWdlKHVybCklM0ElMEElMjAlMjAlMjAlMjByZXNwb25zZSUyMCUzRCUyMHJlcXVlc3RzLmdldCh1cmwpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwUElMLkltYWdlLm9wZW4oQnl0ZXNJTyhyZXNwb25zZS5jb250ZW50KSkuY29udmVydCglMjJSR0IlMjIpJTBBJTBBJTBBaW1nX3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRkNvbXBWaXMlMkZsYXRlbnQtZGlmZnVzaW9uJTJGbWFpbiUyRmRhdGElMkZpbnBhaW50aW5nX2V4YW1wbGVzJTJGb3ZlcnR1cmUtY3JlYXRpb25zLTVzSTZmUWdZSXVvLnBuZyUyMiUwQW1hc2tfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGQ29tcFZpcyUyRmxhdGVudC1kaWZmdXNpb24lMkZtYWluJTJGZGF0YSUyRmlucGFpbnRpbmdfZXhhbXBsZXMlMkZvdmVydHVyZS1jcmVhdGlvbnMtNXNJNmZRZ1lJdW9fbWFzay5wbmclMjIlMEElMEFpbml0X2ltYWdlJTIwJTNEJTIwZG93bmxvYWRfaW1hZ2UoaW1nX3VybCkucmVzaXplKCg1MTIlMkMlMjA1MTIpKSUwQW1hc2tfaW1hZ2UlMjAlM0QlMjBkb3dubG9hZF9pbWFnZShtYXNrX3VybCkucmVzaXplKCg1MTIlMkMlMjA1MTIpKSUwQSUwQXBpcGVsaW5lJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFN0YWJsZURpZmZ1c2lvbklucGFpbnRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyeHZqaWFydWklMkZzdGFibGUtZGlmZnVzaW9uLTItaW5wYWludGluZyUyMiUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJGYWNlJTIwb2YlMjBhJTIweWVsbG93JTIwY2F0JTJDJTIwaGlnaCUyMHJlc29sdXRpb24lMkMlMjBzaXR0aW5nJTIwb24lMjBhJTIwcGFyayUyMGJlbmNoJTIyJTBBcHJuZ19zZWVkJTIwJTNEJTIwamF4LnJhbmRvbS5QUk5HS2V5KDApJTBBbnVtX2luZmVyZW5jZV9zdGVwcyUyMCUzRCUyMDUwJTBBJTBBbnVtX3NhbXBsZXMlMjAlM0QlMjBqYXguZGV2aWNlX2NvdW50KCklMEFwcm9tcHQlMjAlM0QlMjBudW1fc2FtcGxlcyUyMColMjAlNUJwcm9tcHQlNUQlMEFpbml0X2ltYWdlJTIwJTNEJTIwbnVtX3NhbXBsZXMlMjAqJTIwJTVCaW5pdF9pbWFnZSU1RCUwQW1hc2tfaW1hZ2UlMjAlM0QlMjBudW1fc2FtcGxlcyUyMColMjAlNUJtYXNrX2ltYWdlJTVEJTBBcHJvbXB0X2lkcyUyQyUyMHByb2Nlc3NlZF9tYXNrZWRfaW1hZ2VzJTJDJTIwcHJvY2Vzc2VkX21hc2tzJTIwJTNEJTIwcGlwZWxpbmUucHJlcGFyZV9pbnB1dHMoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTJDJTIwaW5pdF9pbWFnZSUyQyUyMG1hc2tfaW1hZ2UlMEEpJTBBJTBBcGFyYW1zJTIwJTNEJTIwcmVwbGljYXRlKHBhcmFtcyklMEFwcm5nX3NlZWQlMjAlM0QlMjBqYXgucmFuZG9tLnNwbGl0KHBybmdfc2VlZCUyQyUyMGpheC5kZXZpY2VfY291bnQoKSklMEFwcm9tcHRfaWRzJTIwJTNEJTIwc2hhcmQocHJvbXB0X2lkcyklMEFwcm9jZXNzZWRfbWFza2VkX2ltYWdlcyUyMCUzRCUyMHNoYXJkKHByb2Nlc3NlZF9tYXNrZWRfaW1hZ2VzKSUwQXByb2Nlc3NlZF9tYXNrcyUyMCUzRCUyMHNoYXJkKHByb2Nlc3NlZF9tYXNrcyklMEElMEFpbWFnZXMlMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjAlMjBwcm9tcHRfaWRzJTJDJTIwcHJvY2Vzc2VkX21hc2tzJTJDJTIwcHJvY2Vzc2VkX21hc2tlZF9pbWFnZXMlMkMlMjBwYXJhbXMlMkMlMjBwcm5nX3NlZWQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTJDJTIwaml0JTNEVHJ1ZSUwQSkuaW1hZ2VzJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZWxpbmUubnVtcHlfdG9fcGlsKG5wLmFzYXJyYXkoaW1hZ2VzLnJlc2hhcGUoKG51bV9zYW1wbGVzJTJDKSUyMCUyQiUyMGltYWdlcy5zaGFwZSU1Qi0zJTNBJTVEKSkp",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">import</span> PIL
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxStableDiffusionInpaintPipeline


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">download_image</span>(<span class="hljs-params">url</span>):
<span class="hljs-meta">... </span>    response = requests.get(url)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> PIL.Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span>img_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>init_image = download_image(img_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = download_image(mask_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline, params = FlaxStableDiffusionInpaintPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;xvjiarui/stable-diffusion-2-inpainting&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Face of a yellow cat, high resolution, sitting on a park bench&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>init_image = num_samples * [init_image]
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = num_samples * [mask_image]
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt_ids, processed_masked_images, processed_masks = pipeline.prepare_inputs(
<span class="hljs-meta">... </span>    prompt, init_image, mask_image
<span class="hljs-meta">... </span>)
<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>processed_masked_images = shard(processed_masked_images)
<span class="hljs-meta">&gt;&gt;&gt; </span>processed_masks = shard(processed_masks)

<span class="hljs-meta">&gt;&gt;&gt; </span>images = pipeline(
<span class="hljs-meta">... </span>    prompt_ids, processed_masks, processed_masked_images, params, prng_seed, num_inference_steps, jit=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </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(){d=s("p"),_=r("Examples:"),h=c(),w(p.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=f(a),v(p.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(p,a,u),b=!0},p:Gt,i(a){b||(I(p.$$.fragment,a),b=!0)},o(a){M(p.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),J(p,a)}}}function Di(k){let d,_,h,p,b,a,u,N,R,ce,H,V,fe,E,S,te,A,j,W,gt,F,G,_t,q,Kn,ea,Ee,ta,na,In,me,Mn,ne,ue,Bt,Fe,aa,Xt,sa,Jn,T,Ge,oa,Ct,ia,ra,Ne,la,bt,da,pa,ca,Lt,fa,ma,ae,yt,wt,ua,ha,ga,vt,xt,_a,ba,ya,It,Mt,wa,va,xa,O,Be,Ia,Rt,Ma,Ja,he,Ta,B,Xe,$a,Vt,ka,Sa,ge,Da,_e,Ua,be,Ce,ja,Le,Pa,At,Za,Wa,Ea,X,Re,Fa,Ve,Ga,Ae,Na,Ba,Xa,ye,Ca,we,La,ve,Ye,Ra,ze,Va,Qe,Aa,Ya,za,D,He,Qa,qe,Ha,Jt,qa,Oa,Ka,Yt,es,ts,xe,ns,Oe,as,Ke,ss,os,is,Ie,rs,U,et,ls,Y,ds,zt,ps,cs,Qt,fs,ms,Ht,us,hs,gs,tt,_s,qt,bs,ys,ws,nt,vs,Tt,xs,Is,Ms,se,Js,$t,Ts,$s,Ot,ks,Ss,Ds,oe,Us,kt,js,Ps,Kt,Zs,Ws,Es,Me,at,Fs,en,Gs,Ns,Je,st,Bs,z,Xs,tn,Cs,Ls,nn,Rs,Vs,an,As,Ys,Tn,ie,Te,sn,ot,zs,on,Qs,$n,re,it,Hs,rn,qs,kn,le,$e,ln,rt,Os,dn,Ks,Sn,P,lt,eo,pn,to,no,ke,ao,dt,so,St,oo,io,ro,K,pt,lo,cn,po,co,Se,Dn,de,De,fn,ct,fo,mn,mo,Un,Q,ft,uo,un,ho,go,Ue,mt,_o,hn,bo,jn;return a=new Et({}),A=new Et({}),me=new On({props:{$$slots:{default:[wi]},$$scope:{ctx:k}}}),Fe=new Et({}),Ge=new Z({props:{name:"class diffusers.StableDiffusionInpaintPipeline",anchor:"diffusers.StableDiffusionInpaintPipeline",parameters:[{name:"vae",val:": typing.Union[diffusers.models.autoencoder_kl.AutoencoderKL, diffusers.models.autoencoder_asym_kl.AsymmetricAutoencoderKL]"},{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.StableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> ([<code>AutoencoderKL</code>, <code>AsymmetricAutoencoderKL</code>]) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionInpaintPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionInpaintPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.StableDiffusionInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionInpaintPipeline.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 more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionInpaintPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L160"}}),Be=new Z({props:{name:"__call__",anchor:"diffusers.StableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"mask_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"strength",val:": float = 1.0"},{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"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.FloatTensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code>, numpy array or tensor representing an image batch to be inpainted (which parts of the image to
be masked out with <code>mask_image</code> and repainted according to <code>prompt</code>). For both numpy array and pytorch
tensor, the expected value range is between <code>[0, 1]</code> If it&#x2019;s a tensor or a list or tensors, the
expected shape should be <code>(B, C, H, W)</code> or <code>(C, H, W)</code>. If it is a numpy array or a list of arrays, the
expected shape should be <code>(B, H, W, C)</code> or <code>(H, W, C)</code> It can also accept image latents as <code>image</code>, but
if passing latents directly it is not encoded again.`,name:"image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.FloatTensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code>, numpy array or tensor representing an image batch to mask <code>image</code>. White pixels in the mask
are repainted while black pixels are preserved. If <code>mask_image</code> is a PIL image, it is converted to a
single channel (luminance) before use. If it&#x2019;s a numpy array or pytorch tensor, it should contain one
color channel (L) instead of 3, so the expected shape for pytorch tensor would be <code>(B, 1, H, W)</code>, <code>(B, H, W)</code>, <code>(1, H, W)</code>, <code>(H, W)</code>. And for numpy array would be for <code>(B, H, W, 1)</code>, <code>(B, H, W)</code>, <code>(H, W, 1)</code>, or <code>(H, W)</code>.`,name:"mask_image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Indicates extent to transform the reference <code>image</code>. Must be between 0 and 1. <code>image</code> is used as a
starting point and more noise is added the higher the <code>strength</code>. The number of denoising steps depends
on the amount of noise initially added. When <code>strength</code> is 1, added noise is maximum and the denoising
process runs for the full number of iterations specified in <code>num_inference_steps</code>. A value of 1
essentially ignores <code>image</code>.`,name:"strength"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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. This parameter is modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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.StableDiffusionInpaintPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__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 in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L686",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
\u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),he=new Ft({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[vi]},$$scope:{ctx:k}}}),Xe=new Z({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),ge=new On({props:{warning:!0,$$slots:{default:[xi]},$$scope:{ctx:k}}}),_e=new Ft({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing.example",$$slots:{default:[Ii]},$$scope:{ctx:k}}}),Ce=new Z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),Re=new Z({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),ye=new On({props:{warning:!0,$$slots:{default:[Mi]},$$scope:{ctx:k}}}),we=new Ft({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ji]},$$scope:{ctx:k}}}),Ye=new Z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),He=new Z({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionInpaintPipeline.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[typing.List[str], str, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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/main/src/diffusers/loaders.py#L591"}}),xe=new Ft({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example",$$slots:{default:[Ti]},$$scope:{ctx:k}}}),Ie=new Ft({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example-2",$$slots:{default:[$i]},$$scope:{ctx:k}}}),et=new Z({props:{name:"load_lora_weights",anchor:"diffusers.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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;
See <a href="/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
See <a href="/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py#L863"}}),at=new Z({props:{name:"save_lora_weights",anchor:"diffusers.StableDiffusionInpaintPipeline.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 = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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 <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_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 <code>text_encoder</code>. Must explicitly pass the text
encoder LoRA state dict because it comes from &#x1F917; Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.StableDiffusionInpaintPipeline.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.StableDiffusionInpaintPipeline.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"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders.py#L1439"}}),st=new Z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L294"}}),ot=new Et({}),it=new Z({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/__init__.py#L22"}}),rt=new Et({}),lt=new Z({props:{name:"class diffusers.FlaxStableDiffusionInpaintPipeline",anchor:"diffusers.FlaxStableDiffusionInpaintPipeline",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.FlaxStableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/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.FlaxStableDiffusionInpaintPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.FlaxCLIPTextModel" rel="nofollow">FlaxCLIPTextModel</a>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.FlaxUNet2DConditionModel">FlaxUNet2DConditionModel</a>) &#x2014;
A <code>FlaxUNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<code>FlaxDDIMScheduler</code>, <code>FlaxLMSDiscreteScheduler</code>, <code>FlaxPNDMScheduler</code>, or
<code>FlaxDPMSolverMultistepScheduler</code>.`,name:"scheduler"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.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 more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py#L102"}}),ke=new On({props:{warning:!0,$$slots:{default:[ki]},$$scope:{ctx:k}}}),pt=new Z({props:{name:"__call__",anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt_ids",val:": array"},{name:"mask",val:": array"},{name:"masked_image",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.FlaxStableDiffusionInpaintPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__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. This parameter is modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__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. If not provided, a latents
array is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__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.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>This argument exists because <code>__call__</code> is not yet end-to-end pmap-able. It will be removed in a
future release.</p>

					</div>`,name:"jit"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__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/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput">FlaxStableDiffusionPipelineOutput</a> instead of
a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py#L394",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"
>FlaxStableDiffusionPipelineOutput</a> is
returned, otherwise a <code>tuple</code> is returned where the first element is a list with the generated images
and the second element is a list of <code>bool</code>s indicating whether the corresponding generated image
contains \u201Cnot-safe-for-work\u201D (nsfw) content.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"
>FlaxStableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Se=new Ft({props:{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[Si]},$$scope:{ctx:k}}}),ct=new Et({}),ft=new Z({props:{name:"class diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput",parameters:[{name:"images",val:": ndarray"},{name:"nsfw_content_detected",val:": typing.List[bool]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>np.ndarray</code>) &#x2014;
Denoised images of array shape of <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content
or <code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/__init__.py#L118"}}),mt=new Z({props:{name:"replace",anchor:"diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L111"}}),{c(){d=s("meta"),_=c(),h=s("h1"),p=s("a"),b=s("span"),w(a.$$.fragment),u=c(),N=s("span"),R=r("Inpainting"),ce=c(),H=s("p"),V=r("The Stable Diffusion model can also be applied to inpainting which lets you edit specific parts of an image by providing a mask and a text prompt using Stable Diffusion."),fe=c(),E=s("h2"),S=s("a"),te=s("span"),w(A.$$.fragment),j=c(),W=s("span"),gt=r("Tips"),F=c(),G=s("p"),_t=r(`It is recommended to use this pipeline with checkpoints that have been specifically fine-tuned for inpainting, such
as `),q=s("a"),Kn=r("runwayml/stable-diffusion-inpainting"),ea=r(`. Default
text-to-image Stable Diffusion checkpoints, such as
`),Ee=s("a"),ta=r("runwayml/stable-diffusion-v1-5"),na=r(" are also compatible but they might be less performant."),In=c(),w(me.$$.fragment),Mn=c(),ne=s("h2"),ue=s("a"),Bt=s("span"),w(Fe.$$.fragment),aa=c(),Xt=s("span"),sa=r("StableDiffusionInpaintPipeline"),Jn=c(),T=s("div"),w(Ge.$$.fragment),oa=c(),Ct=s("p"),ia=r("Pipeline for text-guided image inpainting using Stable Diffusion."),ra=c(),Ne=s("p"),la=r("This model inherits from "),bt=s("a"),da=r("DiffusionPipeline"),pa=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ca=c(),Lt=s("p"),fa=r("The pipeline also inherits the following loading methods:"),ma=c(),ae=s("ul"),yt=s("li"),wt=s("a"),ua=r("load_textual_inversion()"),ha=r(" for loading textual inversion embeddings"),ga=c(),vt=s("li"),xt=s("a"),_a=r("load_lora_weights()"),ba=r(" for loading LoRA weights"),ya=c(),It=s("li"),Mt=s("a"),wa=r("save_lora_weights()"),va=r(" for saving LoRA weights"),xa=c(),O=s("div"),w(Be.$$.fragment),Ia=c(),Rt=s("p"),Ma=r("The call function to the pipeline for generation."),Ja=c(),w(he.$$.fragment),Ta=c(),B=s("div"),w(Xe.$$.fragment),$a=c(),Vt=s("p"),ka=r(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Sa=c(),w(ge.$$.fragment),Da=c(),w(_e.$$.fragment),Ua=c(),be=s("div"),w(Ce.$$.fragment),ja=c(),Le=s("p"),Pa=r("Disable sliced attention computation. If "),At=s("code"),Za=r("enable_attention_slicing"),Wa=r(` was previously called, attention is
computed in one step.`),Ea=c(),X=s("div"),w(Re.$$.fragment),Fa=c(),Ve=s("p"),Ga=r("Enable memory efficient attention from "),Ae=s("a"),Na=r("xFormers"),Ba=r(`. 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.`),Xa=c(),w(ye.$$.fragment),Ca=c(),w(we.$$.fragment),La=c(),ve=s("div"),w(Ye.$$.fragment),Ra=c(),ze=s("p"),Va=r("Disable memory efficient attention from "),Qe=s("a"),Aa=r("xFormers"),Ya=r("."),za=c(),D=s("div"),w(He.$$.fragment),Qa=c(),qe=s("p"),Ha=r("Load textual inversion embeddings into the text encoder of "),Jt=s("a"),qa=r("StableDiffusionPipeline"),Oa=r(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Ka=c(),Yt=s("p"),es=r("Example:"),ts=c(),w(xe.$$.fragment),ns=c(),Oe=s("p"),as=r(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ke=s("a"),ss=r("civitAI"),os=r(") and then load the vector"),is=c(),w(Ie.$$.fragment),rs=c(),U=s("div"),w(et.$$.fragment),ls=c(),Y=s("p"),ds=r("Load LoRA weights specified in "),zt=s("code"),ps=r("pretrained_model_name_or_path_or_dict"),cs=r(" into "),Qt=s("code"),fs=r("self.unet"),ms=r(` and
`),Ht=s("code"),us=r("self.text_encoder"),hs=r("."),gs=c(),tt=s("p"),_s=r("All kwargs are forwarded to "),qt=s("code"),bs=r("self.lora_state_dict"),ys=r("."),ws=c(),nt=s("p"),vs=r("See "),Tt=s("a"),xs=r("lora_state_dict()"),Is=r(" for more details on how the state dict is loaded."),Ms=c(),se=s("p"),Js=r("See "),$t=s("a"),Ts=r("load_lora_into_unet()"),$s=r(` for more details on how the state dict is loaded into
`),Ot=s("code"),ks=r("self.unet"),Ss=r("."),Ds=c(),oe=s("p"),Us=r("See "),kt=s("a"),js=r("load_lora_into_text_encoder()"),Ps=r(` for more details on how the state dict is loaded
into `),Kt=s("code"),Zs=r("self.text_encoder"),Ws=r("."),Es=c(),Me=s("div"),w(at.$$.fragment),Fs=c(),en=s("p"),Gs=r("Save the LoRA parameters corresponding to the UNet and text encoder."),Ns=c(),Je=s("div"),w(st.$$.fragment),Bs=c(),z=s("p"),Xs=r(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),tn=s("code"),Cs=r("forward"),Ls=r(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),nn=s("code"),Rs=r("enable_sequential_cpu_offload"),Vs=r(`, but performance is much better due to the
iterative execution of the `),an=s("code"),As=r("unet"),Ys=r("."),Tn=c(),ie=s("h2"),Te=s("a"),sn=s("span"),w(ot.$$.fragment),zs=c(),on=s("span"),Qs=r("StableDiffusionPipelineOutput"),$n=c(),re=s("div"),w(it.$$.fragment),Hs=c(),rn=s("p"),qs=r("Output class for Stable Diffusion pipelines."),kn=c(),le=s("h2"),$e=s("a"),ln=s("span"),w(rt.$$.fragment),Os=c(),dn=s("span"),Ks=r("FlaxStableDiffusionInpaintPipeline"),Sn=c(),P=s("div"),w(lt.$$.fragment),eo=c(),pn=s("p"),to=r("Flax-based pipeline for text-guided image inpainting using Stable Diffusion."),no=c(),w(ke.$$.fragment),ao=c(),dt=s("p"),so=r("This model inherits from "),St=s("a"),oo=r("FlaxDiffusionPipeline"),io=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ro=c(),K=s("div"),w(pt.$$.fragment),lo=c(),cn=s("p"),po=r("Function invoked when calling the pipeline for generation."),co=c(),w(Se.$$.fragment),Dn=c(),de=s("h2"),De=s("a"),fn=s("span"),w(ct.$$.fragment),fo=c(),mn=s("span"),mo=r("FlaxStableDiffusionPipelineOutput"),Un=c(),Q=s("div"),w(ft.$$.fragment),uo=c(),un=s("p"),ho=r("Output class for Flax-based Stable Diffusion pipelines."),go=c(),Ue=s("div"),w(mt.$$.fragment),_o=c(),hn=s("p"),bo=r("\u201CReturns a new object replacing the specified fields with new values."),this.h()},l(t){const g=bi('[data-svelte="svelte-1phssyn"]',document.head);d=o(g,"META",{name:!0,content:!0}),g.forEach(n),_=f(t),h=o(t,"H1",{class:!0});var ut=i(h);p=o(ut,"A",{id:!0,class:!0,href:!0});var gn=i(p);b=o(gn,"SPAN",{});var _n=i(b);v(a.$$.fragment,_n),_n.forEach(n),gn.forEach(n),u=f(ut),N=o(ut,"SPAN",{});var bn=i(N);R=l(bn,"Inpainting"),bn.forEach(n),ut.forEach(n),ce=f(t),H=o(t,"P",{});var yn=i(H);V=l(yn,"The Stable Diffusion model can also be applied to inpainting which lets you edit specific parts of an image by providing a mask and a text prompt using Stable Diffusion."),yn.forEach(n),fe=f(t),E=o(t,"H2",{class:!0});var ht=i(E);S=o(ht,"A",{id:!0,class:!0,href:!0});var wn=i(S);te=o(wn,"SPAN",{});var vn=i(te);v(A.$$.fragment,vn),vn.forEach(n),wn.forEach(n),j=f(ht),W=o(ht,"SPAN",{});var xn=i(W);gt=l(xn,"Tips"),xn.forEach(n),ht.forEach(n),F=f(t),G=o(t,"P",{});var pe=i(G);_t=l(pe,`It is recommended to use this pipeline with checkpoints that have been specifically fine-tuned for inpainting, such
as `),q=o(pe,"A",{href:!0,rel:!0});var xo=i(q);Kn=l(xo,"runwayml/stable-diffusion-inpainting"),xo.forEach(n),ea=l(pe,`. Default
text-to-image Stable Diffusion checkpoints, such as
`),Ee=o(pe,"A",{href:!0,rel:!0});var Io=i(Ee);ta=l(Io,"runwayml/stable-diffusion-v1-5"),Io.forEach(n),na=l(pe," are also compatible but they might be less performant."),pe.forEach(n),In=f(t),v(me.$$.fragment,t),Mn=f(t),ne=o(t,"H2",{class:!0});var Pn=i(ne);ue=o(Pn,"A",{id:!0,class:!0,href:!0});var Mo=i(ue);Bt=o(Mo,"SPAN",{});var Jo=i(Bt);v(Fe.$$.fragment,Jo),Jo.forEach(n),Mo.forEach(n),aa=f(Pn),Xt=o(Pn,"SPAN",{});var To=i(Xt);sa=l(To,"StableDiffusionInpaintPipeline"),To.forEach(n),Pn.forEach(n),Jn=f(t),T=o(t,"DIV",{class:!0});var $=i(T);v(Ge.$$.fragment,$),oa=f($),Ct=o($,"P",{});var $o=i(Ct);ia=l($o,"Pipeline for text-guided image inpainting using Stable Diffusion."),$o.forEach(n),ra=f($),Ne=o($,"P",{});var Zn=i(Ne);la=l(Zn,"This model inherits from "),bt=o(Zn,"A",{href:!0});var ko=i(bt);da=l(ko,"DiffusionPipeline"),ko.forEach(n),pa=l(Zn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Zn.forEach(n),ca=f($),Lt=o($,"P",{});var So=i(Lt);fa=l(So,"The pipeline also inherits the following loading methods:"),So.forEach(n),ma=f($),ae=o($,"UL",{});var Dt=i(ae);yt=o(Dt,"LI",{});var yo=i(yt);wt=o(yo,"A",{href:!0});var Do=i(wt);ua=l(Do,"load_textual_inversion()"),Do.forEach(n),ha=l(yo," for loading textual inversion embeddings"),yo.forEach(n),ga=f(Dt),vt=o(Dt,"LI",{});var wo=i(vt);xt=o(wo,"A",{href:!0});var Uo=i(xt);_a=l(Uo,"load_lora_weights()"),Uo.forEach(n),ba=l(wo," for loading LoRA weights"),wo.forEach(n),ya=f(Dt),It=o(Dt,"LI",{});var vo=i(It);Mt=o(vo,"A",{href:!0});var jo=i(Mt);wa=l(jo,"save_lora_weights()"),jo.forEach(n),va=l(vo," for saving LoRA weights"),vo.forEach(n),Dt.forEach(n),xa=f($),O=o($,"DIV",{class:!0});var Ut=i(O);v(Be.$$.fragment,Ut),Ia=f(Ut),Rt=o(Ut,"P",{});var Po=i(Rt);Ma=l(Po,"The call function to the pipeline for generation."),Po.forEach(n),Ja=f(Ut),v(he.$$.fragment,Ut),Ut.forEach(n),Ta=f($),B=o($,"DIV",{class:!0});var je=i(B);v(Xe.$$.fragment,je),$a=f(je),Vt=o(je,"P",{});var Zo=i(Vt);ka=l(Zo,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Zo.forEach(n),Sa=f(je),v(ge.$$.fragment,je),Da=f(je),v(_e.$$.fragment,je),je.forEach(n),Ua=f($),be=o($,"DIV",{class:!0});var Wn=i(be);v(Ce.$$.fragment,Wn),ja=f(Wn),Le=o(Wn,"P",{});var En=i(Le);Pa=l(En,"Disable sliced attention computation. If "),At=o(En,"CODE",{});var Wo=i(At);Za=l(Wo,"enable_attention_slicing"),Wo.forEach(n),Wa=l(En,` was previously called, attention is
computed in one step.`),En.forEach(n),Wn.forEach(n),Ea=f($),X=o($,"DIV",{class:!0});var Pe=i(X);v(Re.$$.fragment,Pe),Fa=f(Pe),Ve=o(Pe,"P",{});var Fn=i(Ve);Ga=l(Fn,"Enable memory efficient attention from "),Ae=o(Fn,"A",{href:!0,rel:!0});var Eo=i(Ae);Na=l(Eo,"xFormers"),Eo.forEach(n),Ba=l(Fn,`. 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.`),Fn.forEach(n),Xa=f(Pe),v(ye.$$.fragment,Pe),Ca=f(Pe),v(we.$$.fragment,Pe),Pe.forEach(n),La=f($),ve=o($,"DIV",{class:!0});var Gn=i(ve);v(Ye.$$.fragment,Gn),Ra=f(Gn),ze=o(Gn,"P",{});var Nn=i(ze);Va=l(Nn,"Disable memory efficient attention from "),Qe=o(Nn,"A",{href:!0,rel:!0});var Fo=i(Qe);Aa=l(Fo,"xFormers"),Fo.forEach(n),Ya=l(Nn,"."),Nn.forEach(n),Gn.forEach(n),za=f($),D=o($,"DIV",{class:!0});var C=i(D);v(He.$$.fragment,C),Qa=f(C),qe=o(C,"P",{});var Bn=i(qe);Ha=l(Bn,"Load textual inversion embeddings into the text encoder of "),Jt=o(Bn,"A",{href:!0});var Go=i(Jt);qa=l(Go,"StableDiffusionPipeline"),Go.forEach(n),Oa=l(Bn,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Bn.forEach(n),Ka=f(C),Yt=o(C,"P",{});var No=i(Yt);es=l(No,"Example:"),No.forEach(n),ts=f(C),v(xe.$$.fragment,C),ns=f(C),Oe=o(C,"P",{});var Xn=i(Oe);as=l(Xn,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),Ke=o(Xn,"A",{href:!0,rel:!0});var Bo=i(Ke);ss=l(Bo,"civitAI"),Bo.forEach(n),os=l(Xn,") and then load the vector"),Xn.forEach(n),is=f(C),v(Ie.$$.fragment,C),C.forEach(n),rs=f($),U=o($,"DIV",{class:!0});var L=i(U);v(et.$$.fragment,L),ls=f(L),Y=o(L,"P",{});var Ze=i(Y);ds=l(Ze,"Load LoRA weights specified in "),zt=o(Ze,"CODE",{});var Xo=i(zt);ps=l(Xo,"pretrained_model_name_or_path_or_dict"),Xo.forEach(n),cs=l(Ze," into "),Qt=o(Ze,"CODE",{});var Co=i(Qt);fs=l(Co,"self.unet"),Co.forEach(n),ms=l(Ze,` and
`),Ht=o(Ze,"CODE",{});var Lo=i(Ht);us=l(Lo,"self.text_encoder"),Lo.forEach(n),hs=l(Ze,"."),Ze.forEach(n),gs=f(L),tt=o(L,"P",{});var Cn=i(tt);_s=l(Cn,"All kwargs are forwarded to "),qt=o(Cn,"CODE",{});var Ro=i(qt);bs=l(Ro,"self.lora_state_dict"),Ro.forEach(n),ys=l(Cn,"."),Cn.forEach(n),ws=f(L),nt=o(L,"P",{});var Ln=i(nt);vs=l(Ln,"See "),Tt=o(Ln,"A",{href:!0});var Vo=i(Tt);xs=l(Vo,"lora_state_dict()"),Vo.forEach(n),Is=l(Ln," for more details on how the state dict is loaded."),Ln.forEach(n),Ms=f(L),se=o(L,"P",{});var jt=i(se);Js=l(jt,"See "),$t=o(jt,"A",{href:!0});var Ao=i($t);Ts=l(Ao,"load_lora_into_unet()"),Ao.forEach(n),$s=l(jt,` for more details on how the state dict is loaded into
`),Ot=o(jt,"CODE",{});var Yo=i(Ot);ks=l(Yo,"self.unet"),Yo.forEach(n),Ss=l(jt,"."),jt.forEach(n),Ds=f(L),oe=o(L,"P",{});var Pt=i(oe);Us=l(Pt,"See "),kt=o(Pt,"A",{href:!0});var zo=i(kt);js=l(zo,"load_lora_into_text_encoder()"),zo.forEach(n),Ps=l(Pt,` for more details on how the state dict is loaded
into `),Kt=o(Pt,"CODE",{});var Qo=i(Kt);Zs=l(Qo,"self.text_encoder"),Qo.forEach(n),Ws=l(Pt,"."),Pt.forEach(n),L.forEach(n),Es=f($),Me=o($,"DIV",{class:!0});var Rn=i(Me);v(at.$$.fragment,Rn),Fs=f(Rn),en=o(Rn,"P",{});var Ho=i(en);Gs=l(Ho,"Save the LoRA parameters corresponding to the UNet and text encoder."),Ho.forEach(n),Rn.forEach(n),Ns=f($),Je=o($,"DIV",{class:!0});var Vn=i(Je);v(st.$$.fragment,Vn),Bs=f(Vn),z=o(Vn,"P",{});var We=i(z);Xs=l(We,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),tn=o(We,"CODE",{});var qo=i(tn);Cs=l(qo,"forward"),qo.forEach(n),Ls=l(We,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),nn=o(We,"CODE",{});var Oo=i(nn);Rs=l(Oo,"enable_sequential_cpu_offload"),Oo.forEach(n),Vs=l(We,`, but performance is much better due to the
iterative execution of the `),an=o(We,"CODE",{});var Ko=i(an);As=l(Ko,"unet"),Ko.forEach(n),Ys=l(We,"."),We.forEach(n),Vn.forEach(n),$.forEach(n),Tn=f(t),ie=o(t,"H2",{class:!0});var An=i(ie);Te=o(An,"A",{id:!0,class:!0,href:!0});var ei=i(Te);sn=o(ei,"SPAN",{});var ti=i(sn);v(ot.$$.fragment,ti),ti.forEach(n),ei.forEach(n),zs=f(An),on=o(An,"SPAN",{});var ni=i(on);Qs=l(ni,"StableDiffusionPipelineOutput"),ni.forEach(n),An.forEach(n),$n=f(t),re=o(t,"DIV",{class:!0});var Yn=i(re);v(it.$$.fragment,Yn),Hs=f(Yn),rn=o(Yn,"P",{});var ai=i(rn);qs=l(ai,"Output class for Stable Diffusion pipelines."),ai.forEach(n),Yn.forEach(n),kn=f(t),le=o(t,"H2",{class:!0});var zn=i(le);$e=o(zn,"A",{id:!0,class:!0,href:!0});var si=i($e);ln=o(si,"SPAN",{});var oi=i(ln);v(rt.$$.fragment,oi),oi.forEach(n),si.forEach(n),Os=f(zn),dn=o(zn,"SPAN",{});var ii=i(dn);Ks=l(ii,"FlaxStableDiffusionInpaintPipeline"),ii.forEach(n),zn.forEach(n),Sn=f(t),P=o(t,"DIV",{class:!0});var ee=i(P);v(lt.$$.fragment,ee),eo=f(ee),pn=o(ee,"P",{});var ri=i(pn);to=l(ri,"Flax-based pipeline for text-guided image inpainting using Stable Diffusion."),ri.forEach(n),no=f(ee),v(ke.$$.fragment,ee),ao=f(ee),dt=o(ee,"P",{});var Qn=i(dt);so=l(Qn,"This model inherits from "),St=o(Qn,"A",{href:!0});var li=i(St);oo=l(li,"FlaxDiffusionPipeline"),li.forEach(n),io=l(Qn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Qn.forEach(n),ro=f(ee),K=o(ee,"DIV",{class:!0});var Zt=i(K);v(pt.$$.fragment,Zt),lo=f(Zt),cn=o(Zt,"P",{});var di=i(cn);po=l(di,"Function invoked when calling the pipeline for generation."),di.forEach(n),co=f(Zt),v(Se.$$.fragment,Zt),Zt.forEach(n),ee.forEach(n),Dn=f(t),de=o(t,"H2",{class:!0});var Hn=i(de);De=o(Hn,"A",{id:!0,class:!0,href:!0});var pi=i(De);fn=o(pi,"SPAN",{});var ci=i(fn);v(ct.$$.fragment,ci),ci.forEach(n),pi.forEach(n),fo=f(Hn),mn=o(Hn,"SPAN",{});var fi=i(mn);mo=l(fi,"FlaxStableDiffusionPipelineOutput"),fi.forEach(n),Hn.forEach(n),Un=f(t),Q=o(t,"DIV",{class:!0});var Wt=i(Q);v(ft.$$.fragment,Wt),uo=f(Wt),un=o(Wt,"P",{});var mi=i(un);ho=l(mi,"Output class for Flax-based Stable Diffusion pipelines."),mi.forEach(n),go=f(Wt),Ue=o(Wt,"DIV",{class:!0});var qn=i(Ue);v(mt.$$.fragment,qn),_o=f(qn),hn=o(qn,"P",{});var ui=i(hn);bo=l(ui,"\u201CReturns a new object replacing the specified fields with new values."),ui.forEach(n),qn.forEach(n),Wt.forEach(n),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Ui)),m(p,"id","inpainting"),m(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"),m(p,"href","#inpainting"),m(h,"class","relative group"),m(S,"id","tips"),m(S,"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"),m(S,"href","#tips"),m(E,"class","relative group"),m(q,"href","https://huggingface.co/runwayml/stable-diffusion-inpainting"),m(q,"rel","nofollow"),m(Ee,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),m(Ee,"rel","nofollow"),m(ue,"id","diffusers.StableDiffusionInpaintPipeline"),m(ue,"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"),m(ue,"href","#diffusers.StableDiffusionInpaintPipeline"),m(ne,"class","relative group"),m(bt,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),m(wt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),m(xt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),m(Mt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.save_lora_weights"),m(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ae,"href","https://facebookresearch.github.io/xformers/"),m(Ae,"rel","nofollow"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qe,"href","https://facebookresearch.github.io/xformers/"),m(Qe,"rel","nofollow"),m(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Jt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),m(Ke,"href","https://civitai.com/models/3036?modelVersionId=9857"),m(Ke,"rel","nofollow"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Tt,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),m($t,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),m(kt,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Te,"id","diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),m(Te,"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"),m(Te,"href","#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"),m(ie,"class","relative group"),m(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($e,"id","diffusers.FlaxStableDiffusionInpaintPipeline"),m($e,"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"),m($e,"href","#diffusers.FlaxStableDiffusionInpaintPipeline"),m(le,"class","relative group"),m(St,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(De,"id","diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"),m(De,"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"),m(De,"href","#diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"),m(de,"class","relative group"),m(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),y(t,_,g),y(t,h,g),e(h,p),e(p,b),x(a,b,null),e(h,u),e(h,N),e(N,R),y(t,ce,g),y(t,H,g),e(H,V),y(t,fe,g),y(t,E,g),e(E,S),e(S,te),x(A,te,null),e(E,j),e(E,W),e(W,gt),y(t,F,g),y(t,G,g),e(G,_t),e(G,q),e(q,Kn),e(G,ea),e(G,Ee),e(Ee,ta),e(G,na),y(t,In,g),x(me,t,g),y(t,Mn,g),y(t,ne,g),e(ne,ue),e(ue,Bt),x(Fe,Bt,null),e(ne,aa),e(ne,Xt),e(Xt,sa),y(t,Jn,g),y(t,T,g),x(Ge,T,null),e(T,oa),e(T,Ct),e(Ct,ia),e(T,ra),e(T,Ne),e(Ne,la),e(Ne,bt),e(bt,da),e(Ne,pa),e(T,ca),e(T,Lt),e(Lt,fa),e(T,ma),e(T,ae),e(ae,yt),e(yt,wt),e(wt,ua),e(yt,ha),e(ae,ga),e(ae,vt),e(vt,xt),e(xt,_a),e(vt,ba),e(ae,ya),e(ae,It),e(It,Mt),e(Mt,wa),e(It,va),e(T,xa),e(T,O),x(Be,O,null),e(O,Ia),e(O,Rt),e(Rt,Ma),e(O,Ja),x(he,O,null),e(T,Ta),e(T,B),x(Xe,B,null),e(B,$a),e(B,Vt),e(Vt,ka),e(B,Sa),x(ge,B,null),e(B,Da),x(_e,B,null),e(T,Ua),e(T,be),x(Ce,be,null),e(be,ja),e(be,Le),e(Le,Pa),e(Le,At),e(At,Za),e(Le,Wa),e(T,Ea),e(T,X),x(Re,X,null),e(X,Fa),e(X,Ve),e(Ve,Ga),e(Ve,Ae),e(Ae,Na),e(Ve,Ba),e(X,Xa),x(ye,X,null),e(X,Ca),x(we,X,null),e(T,La),e(T,ve),x(Ye,ve,null),e(ve,Ra),e(ve,ze),e(ze,Va),e(ze,Qe),e(Qe,Aa),e(ze,Ya),e(T,za),e(T,D),x(He,D,null),e(D,Qa),e(D,qe),e(qe,Ha),e(qe,Jt),e(Jt,qa),e(qe,Oa),e(D,Ka),e(D,Yt),e(Yt,es),e(D,ts),x(xe,D,null),e(D,ns),e(D,Oe),e(Oe,as),e(Oe,Ke),e(Ke,ss),e(Oe,os),e(D,is),x(Ie,D,null),e(T,rs),e(T,U),x(et,U,null),e(U,ls),e(U,Y),e(Y,ds),e(Y,zt),e(zt,ps),e(Y,cs),e(Y,Qt),e(Qt,fs),e(Y,ms),e(Y,Ht),e(Ht,us),e(Y,hs),e(U,gs),e(U,tt),e(tt,_s),e(tt,qt),e(qt,bs),e(tt,ys),e(U,ws),e(U,nt),e(nt,vs),e(nt,Tt),e(Tt,xs),e(nt,Is),e(U,Ms),e(U,se),e(se,Js),e(se,$t),e($t,Ts),e(se,$s),e(se,Ot),e(Ot,ks),e(se,Ss),e(U,Ds),e(U,oe),e(oe,Us),e(oe,kt),e(kt,js),e(oe,Ps),e(oe,Kt),e(Kt,Zs),e(oe,Ws),e(T,Es),e(T,Me),x(at,Me,null),e(Me,Fs),e(Me,en),e(en,Gs),e(T,Ns),e(T,Je),x(st,Je,null),e(Je,Bs),e(Je,z),e(z,Xs),e(z,tn),e(tn,Cs),e(z,Ls),e(z,nn),e(nn,Rs),e(z,Vs),e(z,an),e(an,As),e(z,Ys),y(t,Tn,g),y(t,ie,g),e(ie,Te),e(Te,sn),x(ot,sn,null),e(ie,zs),e(ie,on),e(on,Qs),y(t,$n,g),y(t,re,g),x(it,re,null),e(re,Hs),e(re,rn),e(rn,qs),y(t,kn,g),y(t,le,g),e(le,$e),e($e,ln),x(rt,ln,null),e(le,Os),e(le,dn),e(dn,Ks),y(t,Sn,g),y(t,P,g),x(lt,P,null),e(P,eo),e(P,pn),e(pn,to),e(P,no),x(ke,P,null),e(P,ao),e(P,dt),e(dt,so),e(dt,St),e(St,oo),e(dt,io),e(P,ro),e(P,K),x(pt,K,null),e(K,lo),e(K,cn),e(cn,po),e(K,co),x(Se,K,null),y(t,Dn,g),y(t,de,g),e(de,De),e(De,fn),x(ct,fn,null),e(de,fo),e(de,mn),e(mn,mo),y(t,Un,g),y(t,Q,g),x(ft,Q,null),e(Q,uo),e(Q,un),e(un,ho),e(Q,go),e(Q,Ue),x(mt,Ue,null),e(Ue,_o),e(Ue,hn),e(hn,bo),jn=!0},p(t,[g]){const ut={};g&2&&(ut.$$scope={dirty:g,ctx:t}),me.$set(ut);const gn={};g&2&&(gn.$$scope={dirty:g,ctx:t}),he.$set(gn);const _n={};g&2&&(_n.$$scope={dirty:g,ctx:t}),ge.$set(_n);const bn={};g&2&&(bn.$$scope={dirty:g,ctx:t}),_e.$set(bn);const yn={};g&2&&(yn.$$scope={dirty:g,ctx:t}),ye.$set(yn);const ht={};g&2&&(ht.$$scope={dirty:g,ctx:t}),we.$set(ht);const wn={};g&2&&(wn.$$scope={dirty:g,ctx:t}),xe.$set(wn);const vn={};g&2&&(vn.$$scope={dirty:g,ctx:t}),Ie.$set(vn);const xn={};g&2&&(xn.$$scope={dirty:g,ctx:t}),ke.$set(xn);const pe={};g&2&&(pe.$$scope={dirty:g,ctx:t}),Se.$set(pe)},i(t){jn||(I(a.$$.fragment,t),I(A.$$.fragment,t),I(me.$$.fragment,t),I(Fe.$$.fragment,t),I(Ge.$$.fragment,t),I(Be.$$.fragment,t),I(he.$$.fragment,t),I(Xe.$$.fragment,t),I(ge.$$.fragment,t),I(_e.$$.fragment,t),I(Ce.$$.fragment,t),I(Re.$$.fragment,t),I(ye.$$.fragment,t),I(we.$$.fragment,t),I(Ye.$$.fragment,t),I(He.$$.fragment,t),I(xe.$$.fragment,t),I(Ie.$$.fragment,t),I(et.$$.fragment,t),I(at.$$.fragment,t),I(st.$$.fragment,t),I(ot.$$.fragment,t),I(it.$$.fragment,t),I(rt.$$.fragment,t),I(lt.$$.fragment,t),I(ke.$$.fragment,t),I(pt.$$.fragment,t),I(Se.$$.fragment,t),I(ct.$$.fragment,t),I(ft.$$.fragment,t),I(mt.$$.fragment,t),jn=!0)},o(t){M(a.$$.fragment,t),M(A.$$.fragment,t),M(me.$$.fragment,t),M(Fe.$$.fragment,t),M(Ge.$$.fragment,t),M(Be.$$.fragment,t),M(he.$$.fragment,t),M(Xe.$$.fragment,t),M(ge.$$.fragment,t),M(_e.$$.fragment,t),M(Ce.$$.fragment,t),M(Re.$$.fragment,t),M(ye.$$.fragment,t),M(we.$$.fragment,t),M(Ye.$$.fragment,t),M(He.$$.fragment,t),M(xe.$$.fragment,t),M(Ie.$$.fragment,t),M(et.$$.fragment,t),M(at.$$.fragment,t),M(st.$$.fragment,t),M(ot.$$.fragment,t),M(it.$$.fragment,t),M(rt.$$.fragment,t),M(lt.$$.fragment,t),M(ke.$$.fragment,t),M(pt.$$.fragment,t),M(Se.$$.fragment,t),M(ct.$$.fragment,t),M(ft.$$.fragment,t),M(mt.$$.fragment,t),jn=!1},d(t){n(d),t&&n(_),t&&n(h),J(a),t&&n(ce),t&&n(H),t&&n(fe),t&&n(E),J(A),t&&n(F),t&&n(G),t&&n(In),J(me,t),t&&n(Mn),t&&n(ne),J(Fe),t&&n(Jn),t&&n(T),J(Ge),J(Be),J(he),J(Xe),J(ge),J(_e),J(Ce),J(Re),J(ye),J(we),J(Ye),J(He),J(xe),J(Ie),J(et),J(at),J(st),t&&n(Tn),t&&n(ie),J(ot),t&&n($n),t&&n(re),J(it),t&&n(kn),t&&n(le),J(rt),t&&n(Sn),t&&n(P),J(lt),J(ke),J(pt),J(Se),t&&n(Dn),t&&n(de),J(ct),t&&n(Un),t&&n(Q),J(ft),J(mt)}}}const Ui={local:"inpainting",sections:[{local:"tips",title:"Tips"},{local:"diffusers.StableDiffusionInpaintPipeline",title:"StableDiffusionInpaintPipeline"},{local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",title:"StableDiffusionPipelineOutput"},{local:"diffusers.FlaxStableDiffusionInpaintPipeline",title:"FlaxStableDiffusionInpaintPipeline"},{local:"diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput",title:"FlaxStableDiffusionPipelineOutput"}],title:"Inpainting"};function ji(k){return yi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ni extends hi{constructor(d){super();gi(this,d,ji,Di,_i,{})}}export{Ni as default,Ui as metadata};
