import{S as Ii,i as Mi,s as $i,e as s,k as p,w,t as r,M as Ji,c as o,d as n,m as c,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 $,v as Ti,L as Bt}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as na}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as U}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Ct}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Gt}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Nt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ki(k){let d,_,h,f,b,a,u,N,R,ce,H,V,fe,W,S,te,A;return{c(){d=s("p"),_=r("Make sure to check out the Stable Diffusion "),h=s("a"),f=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=p(),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"),W=r(", and "),S=s("a"),te=r("Stability AI"),A=r(" Hub organizations!"),this.h()},l(j){d=o(j,"P",{});var E=i(d);_=l(E,"Make sure to check out the Stable Diffusion "),h=o(E,"A",{href:!0});var bt=i(h);f=l(bt,"Tips"),bt.forEach(n),b=l(E," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),E.forEach(n),a=c(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 yt=i(V);fe=l(yt,"Runway"),yt.forEach(n),W=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,E){y(j,d,E),e(d,_),e(d,h),e(h,f),e(d,b),y(j,a,E),y(j,u,E),e(u,N),e(u,R),e(R,ce),e(u,H),e(u,V),e(V,fe),e(u,W),e(u,S),e(S,te),e(u,A)},d(j){j&&n(d),j&&n(a),j&&n(u)}}}function Si(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Di(k){let d,_,h,f,b;return{c(){d=s("p"),_=r("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),h=s("code"),f=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);f=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,f),e(d,b)},d(a){a&&n(d)}}}function Pi(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Ui(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 f=i(d);_=l(f,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),f.forEach(n)},m(h,f){y(h,d,f),e(d,_)},d(h){h&&n(d)}}}function ji(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Zi(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.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=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Ei(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"locally:"),u.forEach(n),h=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Wi(k){let d,_;return{c(){d=s("p"),_=r("\u{1F9EA} This is an experimental feature!")},l(h){d=o(h,"P",{});var f=i(d);_=l(f,"\u{1F9EA} This is an experimental feature!"),f.forEach(n)},m(h,f){y(h,d,f),e(d,_)},d(h){h&&n(d)}}}function Fi(k){let d,_,h,f,b;return f=new Ct({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=p(),w(f.$$.fragment)},l(a){d=o(a,"P",{});var u=i(d);_=l(u,"Examples:"),u.forEach(n),h=c(a),v(f.$$.fragment,a)},m(a,u){y(a,d,u),e(d,_),y(a,h,u),x(f,a,u),b=!0},p:Bt,i(a){b||(I(f.$$.fragment,a),b=!0)},o(a){M(f.$$.fragment,a),b=!1},d(a){a&&n(d),a&&n(h),$(f,a)}}}function Gi(k){let d,_,h,f,b,a,u,N,R,ce,H,V,fe,W,S,te,A,j,E,bt,F,G,yt,q,aa,sa,Fe,oa,ia,Jn,me,Tn,ne,ue,Xt,Ge,ra,Lt,la,kn,J,Ne,da,Rt,pa,ca,Be,fa,wt,ma,ua,ha,Vt,ga,_a,ae,vt,xt,ba,ya,wa,It,Mt,va,xa,Ia,$t,Jt,Ma,$a,Ja,O,Ce,Ta,At,ka,Sa,he,Da,B,Xe,Pa,Yt,Ua,ja,ge,Za,_e,Ea,be,Le,Wa,Re,Fa,zt,Ga,Na,Ba,C,Ve,Ca,Ae,Xa,Ye,La,Ra,Va,ye,Aa,we,Ya,ve,ze,za,Qe,Qa,He,Ha,qa,Oa,D,qe,Ka,Oe,es,Tt,ts,ns,as,Qt,ss,os,xe,is,Ke,rs,et,ls,ds,ps,Ie,cs,P,tt,fs,Y,ms,Ht,us,hs,qt,gs,_s,Ot,bs,ys,ws,nt,vs,Kt,xs,Is,Ms,at,$s,kt,Js,Ts,ks,se,Ss,St,Ds,Ps,en,Us,js,Zs,oe,Es,Dt,Ws,Fs,tn,Gs,Ns,Bs,Me,st,Cs,nn,Xs,Ls,$e,ot,Rs,z,Vs,an,As,Ys,sn,zs,Qs,on,Hs,qs,Os,Je,it,Ks,rn,eo,Sn,ie,Te,ln,rt,to,dn,no,Dn,re,lt,ao,pn,so,Pn,le,ke,cn,dt,oo,fn,io,Un,Z,pt,ro,mn,lo,po,Se,co,ct,fo,Pt,mo,uo,ho,K,ft,go,un,_o,bo,De,jn,de,Pe,hn,mt,yo,gn,wo,Zn,Q,ut,vo,_n,xo,Io,Ue,ht,Mo,bn,$o,En;return a=new Gt({}),A=new Gt({}),me=new na({props:{$$slots:{default:[ki]},$$scope:{ctx:k}}}),Ge=new Gt({}),Ne=new U({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"}}),Ce=new U({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#L712",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 Nt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[Si]},$$scope:{ctx:k}}}),Xe=new U({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 na({props:{warning:!0,$$slots:{default:[Di]},$$scope:{ctx:k}}}),_e=new Nt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing.example",$$slots:{default:[Pi]},$$scope:{ctx:k}}}),Le=new U({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"}}),Ve=new U({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 na({props:{warning:!0,$$slots:{default:[Ui]},$$scope:{ctx:k}}}),we=new Nt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[ji]},$$scope:{ctx:k}}}),ze=new U({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"}}),qe=new U({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#L656"}}),xe=new Nt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example",$$slots:{default:[Zi]},$$scope:{ctx:k}}}),Ie=new Nt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example-2",$$slots:{default:[Ei]},$$scope:{ctx:k}}}),tt=new U({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#L928"}}),st=new U({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#L1534"}}),ot=new U({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"}}),it=new U({props:{name:"encode_prompt",anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionInpaintPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L354"}}),rt=new Gt({}),lt=new U({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"}}),dt=new Gt({}),pt=new U({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"}}),Se=new na({props:{warning:!0,$$slots:{default:[Wi]},$$scope:{ctx:k}}}),ft=new U({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>
`}}),De=new Nt({props:{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[Fi]},$$scope:{ctx:k}}}),mt=new Gt({}),ut=new U({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"}}),ht=new U({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"),_=p(),h=s("h1"),f=s("a"),b=s("span"),w(a.$$.fragment),u=p(),N=s("span"),R=r("Inpainting"),ce=p(),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=p(),W=s("h2"),S=s("a"),te=s("span"),w(A.$$.fragment),j=p(),E=s("span"),bt=r("Tips"),F=p(),G=s("p"),yt=r(`It is recommended to use this pipeline with checkpoints that have been specifically fine-tuned for inpainting, such
as `),q=s("a"),aa=r("runwayml/stable-diffusion-inpainting"),sa=r(`. Default
text-to-image Stable Diffusion checkpoints, such as
`),Fe=s("a"),oa=r("runwayml/stable-diffusion-v1-5"),ia=r(" are also compatible but they might be less performant."),Jn=p(),w(me.$$.fragment),Tn=p(),ne=s("h2"),ue=s("a"),Xt=s("span"),w(Ge.$$.fragment),ra=p(),Lt=s("span"),la=r("StableDiffusionInpaintPipeline"),kn=p(),J=s("div"),w(Ne.$$.fragment),da=p(),Rt=s("p"),pa=r("Pipeline for text-guided image inpainting using Stable Diffusion."),ca=p(),Be=s("p"),fa=r("This model inherits from "),wt=s("a"),ma=r("DiffusionPipeline"),ua=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ha=p(),Vt=s("p"),ga=r("The pipeline also inherits the following loading methods:"),_a=p(),ae=s("ul"),vt=s("li"),xt=s("a"),ba=r("load_textual_inversion()"),ya=r(" for loading textual inversion embeddings"),wa=p(),It=s("li"),Mt=s("a"),va=r("load_lora_weights()"),xa=r(" for loading LoRA weights"),Ia=p(),$t=s("li"),Jt=s("a"),Ma=r("save_lora_weights()"),$a=r(" for saving LoRA weights"),Ja=p(),O=s("div"),w(Ce.$$.fragment),Ta=p(),At=s("p"),ka=r("The call function to the pipeline for generation."),Sa=p(),w(he.$$.fragment),Da=p(),B=s("div"),w(Xe.$$.fragment),Pa=p(),Yt=s("p"),Ua=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.`),ja=p(),w(ge.$$.fragment),Za=p(),w(_e.$$.fragment),Ea=p(),be=s("div"),w(Le.$$.fragment),Wa=p(),Re=s("p"),Fa=r("Disable sliced attention computation. If "),zt=s("code"),Ga=r("enable_attention_slicing"),Na=r(` was previously called, attention is
computed in one step.`),Ba=p(),C=s("div"),w(Ve.$$.fragment),Ca=p(),Ae=s("p"),Xa=r("Enable memory efficient attention from "),Ye=s("a"),La=r("xFormers"),Ra=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.`),Va=p(),w(ye.$$.fragment),Aa=p(),w(we.$$.fragment),Ya=p(),ve=s("div"),w(ze.$$.fragment),za=p(),Qe=s("p"),Qa=r("Disable memory efficient attention from "),He=s("a"),Ha=r("xFormers"),qa=r("."),Oa=p(),D=s("div"),w(qe.$$.fragment),Ka=p(),Oe=s("p"),es=r("Load textual inversion embeddings into the text encoder of "),Tt=s("a"),ts=r("StableDiffusionPipeline"),ns=r(` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),as=p(),Qt=s("p"),ss=r("Example:"),os=p(),w(xe.$$.fragment),is=p(),Ke=s("p"),rs=r(`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),et=s("a"),ls=r("civitAI"),ds=r(") and then load the vector"),ps=p(),w(Ie.$$.fragment),cs=p(),P=s("div"),w(tt.$$.fragment),fs=p(),Y=s("p"),ms=r("Load LoRA weights specified in "),Ht=s("code"),us=r("pretrained_model_name_or_path_or_dict"),hs=r(" into "),qt=s("code"),gs=r("self.unet"),_s=r(` and
`),Ot=s("code"),bs=r("self.text_encoder"),ys=r("."),ws=p(),nt=s("p"),vs=r("All kwargs are forwarded to "),Kt=s("code"),xs=r("self.lora_state_dict"),Is=r("."),Ms=p(),at=s("p"),$s=r("See "),kt=s("a"),Js=r("lora_state_dict()"),Ts=r(" for more details on how the state dict is loaded."),ks=p(),se=s("p"),Ss=r("See "),St=s("a"),Ds=r("load_lora_into_unet()"),Ps=r(` for more details on how the state dict is loaded into
`),en=s("code"),Us=r("self.unet"),js=r("."),Zs=p(),oe=s("p"),Es=r("See "),Dt=s("a"),Ws=r("load_lora_into_text_encoder()"),Fs=r(` for more details on how the state dict is loaded
into `),tn=s("code"),Gs=r("self.text_encoder"),Ns=r("."),Bs=p(),Me=s("div"),w(st.$$.fragment),Cs=p(),nn=s("p"),Xs=r("Save the LoRA parameters corresponding to the UNet and text encoder."),Ls=p(),$e=s("div"),w(ot.$$.fragment),Rs=p(),z=s("p"),Vs=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 `),an=s("code"),As=r("forward"),Ys=r(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),sn=s("code"),zs=r("enable_sequential_cpu_offload"),Qs=r(`, but performance is much better due to the
iterative execution of the `),on=s("code"),Hs=r("unet"),qs=r("."),Os=p(),Je=s("div"),w(it.$$.fragment),Ks=p(),rn=s("p"),eo=r("Encodes the prompt into text encoder hidden states."),Sn=p(),ie=s("h2"),Te=s("a"),ln=s("span"),w(rt.$$.fragment),to=p(),dn=s("span"),no=r("StableDiffusionPipelineOutput"),Dn=p(),re=s("div"),w(lt.$$.fragment),ao=p(),pn=s("p"),so=r("Output class for Stable Diffusion pipelines."),Pn=p(),le=s("h2"),ke=s("a"),cn=s("span"),w(dt.$$.fragment),oo=p(),fn=s("span"),io=r("FlaxStableDiffusionInpaintPipeline"),Un=p(),Z=s("div"),w(pt.$$.fragment),ro=p(),mn=s("p"),lo=r("Flax-based pipeline for text-guided image inpainting using Stable Diffusion."),po=p(),w(Se.$$.fragment),co=p(),ct=s("p"),fo=r("This model inherits from "),Pt=s("a"),mo=r("FlaxDiffusionPipeline"),uo=r(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ho=p(),K=s("div"),w(ft.$$.fragment),go=p(),un=s("p"),_o=r("Function invoked when calling the pipeline for generation."),bo=p(),w(De.$$.fragment),jn=p(),de=s("h2"),Pe=s("a"),hn=s("span"),w(mt.$$.fragment),yo=p(),gn=s("span"),wo=r("FlaxStableDiffusionPipelineOutput"),Zn=p(),Q=s("div"),w(ut.$$.fragment),vo=p(),_n=s("p"),xo=r("Output class for Flax-based Stable Diffusion pipelines."),Io=p(),Ue=s("div"),w(ht.$$.fragment),Mo=p(),bn=s("p"),$o=r("\u201CReturns a new object replacing the specified fields with new values."),this.h()},l(t){const g=Ji('[data-svelte="svelte-1phssyn"]',document.head);d=o(g,"META",{name:!0,content:!0}),g.forEach(n),_=c(t),h=o(t,"H1",{class:!0});var gt=i(h);f=o(gt,"A",{id:!0,class:!0,href:!0});var yn=i(f);b=o(yn,"SPAN",{});var wn=i(b);v(a.$$.fragment,wn),wn.forEach(n),yn.forEach(n),u=c(gt),N=o(gt,"SPAN",{});var vn=i(N);R=l(vn,"Inpainting"),vn.forEach(n),gt.forEach(n),ce=c(t),H=o(t,"P",{});var xn=i(H);V=l(xn,"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."),xn.forEach(n),fe=c(t),W=o(t,"H2",{class:!0});var _t=i(W);S=o(_t,"A",{id:!0,class:!0,href:!0});var In=i(S);te=o(In,"SPAN",{});var Mn=i(te);v(A.$$.fragment,Mn),Mn.forEach(n),In.forEach(n),j=c(_t),E=o(_t,"SPAN",{});var $n=i(E);bt=l($n,"Tips"),$n.forEach(n),_t.forEach(n),F=c(t),G=o(t,"P",{});var pe=i(G);yt=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 So=i(q);aa=l(So,"runwayml/stable-diffusion-inpainting"),So.forEach(n),sa=l(pe,`. Default
text-to-image Stable Diffusion checkpoints, such as
`),Fe=o(pe,"A",{href:!0,rel:!0});var Do=i(Fe);oa=l(Do,"runwayml/stable-diffusion-v1-5"),Do.forEach(n),ia=l(pe," are also compatible but they might be less performant."),pe.forEach(n),Jn=c(t),v(me.$$.fragment,t),Tn=c(t),ne=o(t,"H2",{class:!0});var Wn=i(ne);ue=o(Wn,"A",{id:!0,class:!0,href:!0});var Po=i(ue);Xt=o(Po,"SPAN",{});var Uo=i(Xt);v(Ge.$$.fragment,Uo),Uo.forEach(n),Po.forEach(n),ra=c(Wn),Lt=o(Wn,"SPAN",{});var jo=i(Lt);la=l(jo,"StableDiffusionInpaintPipeline"),jo.forEach(n),Wn.forEach(n),kn=c(t),J=o(t,"DIV",{class:!0});var T=i(J);v(Ne.$$.fragment,T),da=c(T),Rt=o(T,"P",{});var Zo=i(Rt);pa=l(Zo,"Pipeline for text-guided image inpainting using Stable Diffusion."),Zo.forEach(n),ca=c(T),Be=o(T,"P",{});var Fn=i(Be);fa=l(Fn,"This model inherits from "),wt=o(Fn,"A",{href:!0});var Eo=i(wt);ma=l(Eo,"DiffusionPipeline"),Eo.forEach(n),ua=l(Fn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Fn.forEach(n),ha=c(T),Vt=o(T,"P",{});var Wo=i(Vt);ga=l(Wo,"The pipeline also inherits the following loading methods:"),Wo.forEach(n),_a=c(T),ae=o(T,"UL",{});var Ut=i(ae);vt=o(Ut,"LI",{});var Jo=i(vt);xt=o(Jo,"A",{href:!0});var Fo=i(xt);ba=l(Fo,"load_textual_inversion()"),Fo.forEach(n),ya=l(Jo," for loading textual inversion embeddings"),Jo.forEach(n),wa=c(Ut),It=o(Ut,"LI",{});var To=i(It);Mt=o(To,"A",{href:!0});var Go=i(Mt);va=l(Go,"load_lora_weights()"),Go.forEach(n),xa=l(To," for loading LoRA weights"),To.forEach(n),Ia=c(Ut),$t=o(Ut,"LI",{});var ko=i($t);Jt=o(ko,"A",{href:!0});var No=i(Jt);Ma=l(No,"save_lora_weights()"),No.forEach(n),$a=l(ko," for saving LoRA weights"),ko.forEach(n),Ut.forEach(n),Ja=c(T),O=o(T,"DIV",{class:!0});var jt=i(O);v(Ce.$$.fragment,jt),Ta=c(jt),At=o(jt,"P",{});var Bo=i(At);ka=l(Bo,"The call function to the pipeline for generation."),Bo.forEach(n),Sa=c(jt),v(he.$$.fragment,jt),jt.forEach(n),Da=c(T),B=o(T,"DIV",{class:!0});var je=i(B);v(Xe.$$.fragment,je),Pa=c(je),Yt=o(je,"P",{});var Co=i(Yt);Ua=l(Co,`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.`),Co.forEach(n),ja=c(je),v(ge.$$.fragment,je),Za=c(je),v(_e.$$.fragment,je),je.forEach(n),Ea=c(T),be=o(T,"DIV",{class:!0});var Gn=i(be);v(Le.$$.fragment,Gn),Wa=c(Gn),Re=o(Gn,"P",{});var Nn=i(Re);Fa=l(Nn,"Disable sliced attention computation. If "),zt=o(Nn,"CODE",{});var Xo=i(zt);Ga=l(Xo,"enable_attention_slicing"),Xo.forEach(n),Na=l(Nn,` was previously called, attention is
computed in one step.`),Nn.forEach(n),Gn.forEach(n),Ba=c(T),C=o(T,"DIV",{class:!0});var Ze=i(C);v(Ve.$$.fragment,Ze),Ca=c(Ze),Ae=o(Ze,"P",{});var Bn=i(Ae);Xa=l(Bn,"Enable memory efficient attention from "),Ye=o(Bn,"A",{href:!0,rel:!0});var Lo=i(Ye);La=l(Lo,"xFormers"),Lo.forEach(n),Ra=l(Bn,`. 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.`),Bn.forEach(n),Va=c(Ze),v(ye.$$.fragment,Ze),Aa=c(Ze),v(we.$$.fragment,Ze),Ze.forEach(n),Ya=c(T),ve=o(T,"DIV",{class:!0});var Cn=i(ve);v(ze.$$.fragment,Cn),za=c(Cn),Qe=o(Cn,"P",{});var Xn=i(Qe);Qa=l(Xn,"Disable memory efficient attention from "),He=o(Xn,"A",{href:!0,rel:!0});var Ro=i(He);Ha=l(Ro,"xFormers"),Ro.forEach(n),qa=l(Xn,"."),Xn.forEach(n),Cn.forEach(n),Oa=c(T),D=o(T,"DIV",{class:!0});var X=i(D);v(qe.$$.fragment,X),Ka=c(X),Oe=o(X,"P",{});var Ln=i(Oe);es=l(Ln,"Load textual inversion embeddings into the text encoder of "),Tt=o(Ln,"A",{href:!0});var Vo=i(Tt);ts=l(Vo,"StableDiffusionPipeline"),Vo.forEach(n),ns=l(Ln,` (both \u{1F917} Diffusers and
Automatic1111 formats are supported).`),Ln.forEach(n),as=c(X),Qt=o(X,"P",{});var Ao=i(Qt);ss=l(Ao,"Example:"),Ao.forEach(n),os=c(X),v(xe.$$.fragment,X),is=c(X),Ke=o(X,"P",{});var Rn=i(Ke);rs=l(Rn,`To load a textual inversion embedding vector in Automatic1111 format, make sure to download the vector first
(for example from `),et=o(Rn,"A",{href:!0,rel:!0});var Yo=i(et);ls=l(Yo,"civitAI"),Yo.forEach(n),ds=l(Rn,") and then load the vector"),Rn.forEach(n),ps=c(X),v(Ie.$$.fragment,X),X.forEach(n),cs=c(T),P=o(T,"DIV",{class:!0});var L=i(P);v(tt.$$.fragment,L),fs=c(L),Y=o(L,"P",{});var Ee=i(Y);ms=l(Ee,"Load LoRA weights specified in "),Ht=o(Ee,"CODE",{});var zo=i(Ht);us=l(zo,"pretrained_model_name_or_path_or_dict"),zo.forEach(n),hs=l(Ee," into "),qt=o(Ee,"CODE",{});var Qo=i(qt);gs=l(Qo,"self.unet"),Qo.forEach(n),_s=l(Ee,` and
`),Ot=o(Ee,"CODE",{});var Ho=i(Ot);bs=l(Ho,"self.text_encoder"),Ho.forEach(n),ys=l(Ee,"."),Ee.forEach(n),ws=c(L),nt=o(L,"P",{});var Vn=i(nt);vs=l(Vn,"All kwargs are forwarded to "),Kt=o(Vn,"CODE",{});var qo=i(Kt);xs=l(qo,"self.lora_state_dict"),qo.forEach(n),Is=l(Vn,"."),Vn.forEach(n),Ms=c(L),at=o(L,"P",{});var An=i(at);$s=l(An,"See "),kt=o(An,"A",{href:!0});var Oo=i(kt);Js=l(Oo,"lora_state_dict()"),Oo.forEach(n),Ts=l(An," for more details on how the state dict is loaded."),An.forEach(n),ks=c(L),se=o(L,"P",{});var Zt=i(se);Ss=l(Zt,"See "),St=o(Zt,"A",{href:!0});var Ko=i(St);Ds=l(Ko,"load_lora_into_unet()"),Ko.forEach(n),Ps=l(Zt,` for more details on how the state dict is loaded into
`),en=o(Zt,"CODE",{});var ei=i(en);Us=l(ei,"self.unet"),ei.forEach(n),js=l(Zt,"."),Zt.forEach(n),Zs=c(L),oe=o(L,"P",{});var Et=i(oe);Es=l(Et,"See "),Dt=o(Et,"A",{href:!0});var ti=i(Dt);Ws=l(ti,"load_lora_into_text_encoder()"),ti.forEach(n),Fs=l(Et,` for more details on how the state dict is loaded
into `),tn=o(Et,"CODE",{});var ni=i(tn);Gs=l(ni,"self.text_encoder"),ni.forEach(n),Ns=l(Et,"."),Et.forEach(n),L.forEach(n),Bs=c(T),Me=o(T,"DIV",{class:!0});var Yn=i(Me);v(st.$$.fragment,Yn),Cs=c(Yn),nn=o(Yn,"P",{});var ai=i(nn);Xs=l(ai,"Save the LoRA parameters corresponding to the UNet and text encoder."),ai.forEach(n),Yn.forEach(n),Ls=c(T),$e=o(T,"DIV",{class:!0});var zn=i($e);v(ot.$$.fragment,zn),Rs=c(zn),z=o(zn,"P",{});var We=i(z);Vs=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 `),an=o(We,"CODE",{});var si=i(an);As=l(si,"forward"),si.forEach(n),Ys=l(We,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),sn=o(We,"CODE",{});var oi=i(sn);zs=l(oi,"enable_sequential_cpu_offload"),oi.forEach(n),Qs=l(We,`, but performance is much better due to the
iterative execution of the `),on=o(We,"CODE",{});var ii=i(on);Hs=l(ii,"unet"),ii.forEach(n),qs=l(We,"."),We.forEach(n),zn.forEach(n),Os=c(T),Je=o(T,"DIV",{class:!0});var Qn=i(Je);v(it.$$.fragment,Qn),Ks=c(Qn),rn=o(Qn,"P",{});var ri=i(rn);eo=l(ri,"Encodes the prompt into text encoder hidden states."),ri.forEach(n),Qn.forEach(n),T.forEach(n),Sn=c(t),ie=o(t,"H2",{class:!0});var Hn=i(ie);Te=o(Hn,"A",{id:!0,class:!0,href:!0});var li=i(Te);ln=o(li,"SPAN",{});var di=i(ln);v(rt.$$.fragment,di),di.forEach(n),li.forEach(n),to=c(Hn),dn=o(Hn,"SPAN",{});var pi=i(dn);no=l(pi,"StableDiffusionPipelineOutput"),pi.forEach(n),Hn.forEach(n),Dn=c(t),re=o(t,"DIV",{class:!0});var qn=i(re);v(lt.$$.fragment,qn),ao=c(qn),pn=o(qn,"P",{});var ci=i(pn);so=l(ci,"Output class for Stable Diffusion pipelines."),ci.forEach(n),qn.forEach(n),Pn=c(t),le=o(t,"H2",{class:!0});var On=i(le);ke=o(On,"A",{id:!0,class:!0,href:!0});var fi=i(ke);cn=o(fi,"SPAN",{});var mi=i(cn);v(dt.$$.fragment,mi),mi.forEach(n),fi.forEach(n),oo=c(On),fn=o(On,"SPAN",{});var ui=i(fn);io=l(ui,"FlaxStableDiffusionInpaintPipeline"),ui.forEach(n),On.forEach(n),Un=c(t),Z=o(t,"DIV",{class:!0});var ee=i(Z);v(pt.$$.fragment,ee),ro=c(ee),mn=o(ee,"P",{});var hi=i(mn);lo=l(hi,"Flax-based pipeline for text-guided image inpainting using Stable Diffusion."),hi.forEach(n),po=c(ee),v(Se.$$.fragment,ee),co=c(ee),ct=o(ee,"P",{});var Kn=i(ct);fo=l(Kn,"This model inherits from "),Pt=o(Kn,"A",{href:!0});var gi=i(Pt);mo=l(gi,"FlaxDiffusionPipeline"),gi.forEach(n),uo=l(Kn,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Kn.forEach(n),ho=c(ee),K=o(ee,"DIV",{class:!0});var Wt=i(K);v(ft.$$.fragment,Wt),go=c(Wt),un=o(Wt,"P",{});var _i=i(un);_o=l(_i,"Function invoked when calling the pipeline for generation."),_i.forEach(n),bo=c(Wt),v(De.$$.fragment,Wt),Wt.forEach(n),ee.forEach(n),jn=c(t),de=o(t,"H2",{class:!0});var ea=i(de);Pe=o(ea,"A",{id:!0,class:!0,href:!0});var bi=i(Pe);hn=o(bi,"SPAN",{});var yi=i(hn);v(mt.$$.fragment,yi),yi.forEach(n),bi.forEach(n),yo=c(ea),gn=o(ea,"SPAN",{});var wi=i(gn);wo=l(wi,"FlaxStableDiffusionPipelineOutput"),wi.forEach(n),ea.forEach(n),Zn=c(t),Q=o(t,"DIV",{class:!0});var Ft=i(Q);v(ut.$$.fragment,Ft),vo=c(Ft),_n=o(Ft,"P",{});var vi=i(_n);xo=l(vi,"Output class for Flax-based Stable Diffusion pipelines."),vi.forEach(n),Io=c(Ft),Ue=o(Ft,"DIV",{class:!0});var ta=i(Ue);v(ht.$$.fragment,ta),Mo=c(ta),bn=o(ta,"P",{});var xi=i(bn);$o=l(xi,"\u201CReturns a new object replacing the specified fields with new values."),xi.forEach(n),ta.forEach(n),Ft.forEach(n),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Ni)),m(f,"id","inpainting"),m(f,"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(f,"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(W,"class","relative group"),m(q,"href","https://huggingface.co/runwayml/stable-diffusion-inpainting"),m(q,"rel","nofollow"),m(Fe,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),m(Fe,"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(wt,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),m(xt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_textual_inversion"),m(Mt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline.load_lora_weights"),m(Jt,"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(Ye,"href","https://facebookresearch.github.io/xformers/"),m(Ye,"rel","nofollow"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(He,"href","https://facebookresearch.github.io/xformers/"),m(He,"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(Tt,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),m(et,"href","https://civitai.com/models/3036?modelVersionId=9857"),m(et,"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(kt,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict"),m(St,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_unet"),m(Dt,"href","/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraLoaderMixin.load_lora_into_text_encoder"),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(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($e,"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(J,"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(ke,"id","diffusers.FlaxStableDiffusionInpaintPipeline"),m(ke,"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(ke,"href","#diffusers.FlaxStableDiffusionInpaintPipeline"),m(le,"class","relative group"),m(Pt,"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(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Pe,"id","diffusers.pipelines.stable_diffusion.FlaxStableDiffusionPipelineOutput"),m(Pe,"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(Pe,"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,f),e(f,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,W,g),e(W,S),e(S,te),x(A,te,null),e(W,j),e(W,E),e(E,bt),y(t,F,g),y(t,G,g),e(G,yt),e(G,q),e(q,aa),e(G,sa),e(G,Fe),e(Fe,oa),e(G,ia),y(t,Jn,g),x(me,t,g),y(t,Tn,g),y(t,ne,g),e(ne,ue),e(ue,Xt),x(Ge,Xt,null),e(ne,ra),e(ne,Lt),e(Lt,la),y(t,kn,g),y(t,J,g),x(Ne,J,null),e(J,da),e(J,Rt),e(Rt,pa),e(J,ca),e(J,Be),e(Be,fa),e(Be,wt),e(wt,ma),e(Be,ua),e(J,ha),e(J,Vt),e(Vt,ga),e(J,_a),e(J,ae),e(ae,vt),e(vt,xt),e(xt,ba),e(vt,ya),e(ae,wa),e(ae,It),e(It,Mt),e(Mt,va),e(It,xa),e(ae,Ia),e(ae,$t),e($t,Jt),e(Jt,Ma),e($t,$a),e(J,Ja),e(J,O),x(Ce,O,null),e(O,Ta),e(O,At),e(At,ka),e(O,Sa),x(he,O,null),e(J,Da),e(J,B),x(Xe,B,null),e(B,Pa),e(B,Yt),e(Yt,Ua),e(B,ja),x(ge,B,null),e(B,Za),x(_e,B,null),e(J,Ea),e(J,be),x(Le,be,null),e(be,Wa),e(be,Re),e(Re,Fa),e(Re,zt),e(zt,Ga),e(Re,Na),e(J,Ba),e(J,C),x(Ve,C,null),e(C,Ca),e(C,Ae),e(Ae,Xa),e(Ae,Ye),e(Ye,La),e(Ae,Ra),e(C,Va),x(ye,C,null),e(C,Aa),x(we,C,null),e(J,Ya),e(J,ve),x(ze,ve,null),e(ve,za),e(ve,Qe),e(Qe,Qa),e(Qe,He),e(He,Ha),e(Qe,qa),e(J,Oa),e(J,D),x(qe,D,null),e(D,Ka),e(D,Oe),e(Oe,es),e(Oe,Tt),e(Tt,ts),e(Oe,ns),e(D,as),e(D,Qt),e(Qt,ss),e(D,os),x(xe,D,null),e(D,is),e(D,Ke),e(Ke,rs),e(Ke,et),e(et,ls),e(Ke,ds),e(D,ps),x(Ie,D,null),e(J,cs),e(J,P),x(tt,P,null),e(P,fs),e(P,Y),e(Y,ms),e(Y,Ht),e(Ht,us),e(Y,hs),e(Y,qt),e(qt,gs),e(Y,_s),e(Y,Ot),e(Ot,bs),e(Y,ys),e(P,ws),e(P,nt),e(nt,vs),e(nt,Kt),e(Kt,xs),e(nt,Is),e(P,Ms),e(P,at),e(at,$s),e(at,kt),e(kt,Js),e(at,Ts),e(P,ks),e(P,se),e(se,Ss),e(se,St),e(St,Ds),e(se,Ps),e(se,en),e(en,Us),e(se,js),e(P,Zs),e(P,oe),e(oe,Es),e(oe,Dt),e(Dt,Ws),e(oe,Fs),e(oe,tn),e(tn,Gs),e(oe,Ns),e(J,Bs),e(J,Me),x(st,Me,null),e(Me,Cs),e(Me,nn),e(nn,Xs),e(J,Ls),e(J,$e),x(ot,$e,null),e($e,Rs),e($e,z),e(z,Vs),e(z,an),e(an,As),e(z,Ys),e(z,sn),e(sn,zs),e(z,Qs),e(z,on),e(on,Hs),e(z,qs),e(J,Os),e(J,Je),x(it,Je,null),e(Je,Ks),e(Je,rn),e(rn,eo),y(t,Sn,g),y(t,ie,g),e(ie,Te),e(Te,ln),x(rt,ln,null),e(ie,to),e(ie,dn),e(dn,no),y(t,Dn,g),y(t,re,g),x(lt,re,null),e(re,ao),e(re,pn),e(pn,so),y(t,Pn,g),y(t,le,g),e(le,ke),e(ke,cn),x(dt,cn,null),e(le,oo),e(le,fn),e(fn,io),y(t,Un,g),y(t,Z,g),x(pt,Z,null),e(Z,ro),e(Z,mn),e(mn,lo),e(Z,po),x(Se,Z,null),e(Z,co),e(Z,ct),e(ct,fo),e(ct,Pt),e(Pt,mo),e(ct,uo),e(Z,ho),e(Z,K),x(ft,K,null),e(K,go),e(K,un),e(un,_o),e(K,bo),x(De,K,null),y(t,jn,g),y(t,de,g),e(de,Pe),e(Pe,hn),x(mt,hn,null),e(de,yo),e(de,gn),e(gn,wo),y(t,Zn,g),y(t,Q,g),x(ut,Q,null),e(Q,vo),e(Q,_n),e(_n,xo),e(Q,Io),e(Q,Ue),x(ht,Ue,null),e(Ue,Mo),e(Ue,bn),e(bn,$o),En=!0},p(t,[g]){const gt={};g&2&&(gt.$$scope={dirty:g,ctx:t}),me.$set(gt);const yn={};g&2&&(yn.$$scope={dirty:g,ctx:t}),he.$set(yn);const wn={};g&2&&(wn.$$scope={dirty:g,ctx:t}),ge.$set(wn);const vn={};g&2&&(vn.$$scope={dirty:g,ctx:t}),_e.$set(vn);const xn={};g&2&&(xn.$$scope={dirty:g,ctx:t}),ye.$set(xn);const _t={};g&2&&(_t.$$scope={dirty:g,ctx:t}),we.$set(_t);const In={};g&2&&(In.$$scope={dirty:g,ctx:t}),xe.$set(In);const Mn={};g&2&&(Mn.$$scope={dirty:g,ctx:t}),Ie.$set(Mn);const $n={};g&2&&($n.$$scope={dirty:g,ctx:t}),Se.$set($n);const pe={};g&2&&(pe.$$scope={dirty:g,ctx:t}),De.$set(pe)},i(t){En||(I(a.$$.fragment,t),I(A.$$.fragment,t),I(me.$$.fragment,t),I(Ge.$$.fragment,t),I(Ne.$$.fragment,t),I(Ce.$$.fragment,t),I(he.$$.fragment,t),I(Xe.$$.fragment,t),I(ge.$$.fragment,t),I(_e.$$.fragment,t),I(Le.$$.fragment,t),I(Ve.$$.fragment,t),I(ye.$$.fragment,t),I(we.$$.fragment,t),I(ze.$$.fragment,t),I(qe.$$.fragment,t),I(xe.$$.fragment,t),I(Ie.$$.fragment,t),I(tt.$$.fragment,t),I(st.$$.fragment,t),I(ot.$$.fragment,t),I(it.$$.fragment,t),I(rt.$$.fragment,t),I(lt.$$.fragment,t),I(dt.$$.fragment,t),I(pt.$$.fragment,t),I(Se.$$.fragment,t),I(ft.$$.fragment,t),I(De.$$.fragment,t),I(mt.$$.fragment,t),I(ut.$$.fragment,t),I(ht.$$.fragment,t),En=!0)},o(t){M(a.$$.fragment,t),M(A.$$.fragment,t),M(me.$$.fragment,t),M(Ge.$$.fragment,t),M(Ne.$$.fragment,t),M(Ce.$$.fragment,t),M(he.$$.fragment,t),M(Xe.$$.fragment,t),M(ge.$$.fragment,t),M(_e.$$.fragment,t),M(Le.$$.fragment,t),M(Ve.$$.fragment,t),M(ye.$$.fragment,t),M(we.$$.fragment,t),M(ze.$$.fragment,t),M(qe.$$.fragment,t),M(xe.$$.fragment,t),M(Ie.$$.fragment,t),M(tt.$$.fragment,t),M(st.$$.fragment,t),M(ot.$$.fragment,t),M(it.$$.fragment,t),M(rt.$$.fragment,t),M(lt.$$.fragment,t),M(dt.$$.fragment,t),M(pt.$$.fragment,t),M(Se.$$.fragment,t),M(ft.$$.fragment,t),M(De.$$.fragment,t),M(mt.$$.fragment,t),M(ut.$$.fragment,t),M(ht.$$.fragment,t),En=!1},d(t){n(d),t&&n(_),t&&n(h),$(a),t&&n(ce),t&&n(H),t&&n(fe),t&&n(W),$(A),t&&n(F),t&&n(G),t&&n(Jn),$(me,t),t&&n(Tn),t&&n(ne),$(Ge),t&&n(kn),t&&n(J),$(Ne),$(Ce),$(he),$(Xe),$(ge),$(_e),$(Le),$(Ve),$(ye),$(we),$(ze),$(qe),$(xe),$(Ie),$(tt),$(st),$(ot),$(it),t&&n(Sn),t&&n(ie),$(rt),t&&n(Dn),t&&n(re),$(lt),t&&n(Pn),t&&n(le),$(dt),t&&n(Un),t&&n(Z),$(pt),$(Se),$(ft),$(De),t&&n(jn),t&&n(de),$(mt),t&&n(Zn),t&&n(Q),$(ut),$(ht)}}}const Ni={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 Bi(k){return Ti(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yi extends Ii{constructor(d){super();Mi(this,d,Bi,Gi,$i,{})}}export{Yi as default,Ni as metadata};
