import{S as ai,i as si,s as oi,e as s,k as c,w as v,t as r,M as ii,c as o,d as n,m as f,a as i,x as w,h as l,b as m,G as e,g as y,y as x,q as I,o as M,B as T,v as ri,L as Ft}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Yn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as Z}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as Et}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Zt}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Wt}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function li(k){let p,_,h,d,b,a,u,G,R,de,Q,V,ce,F,S,ee,z;return{c(){p=s("p"),_=r("Make sure to check out the Stable Diffusion "),h=s("a"),d=r("Tips"),b=r(" section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),a=c(),u=s("p"),G=r("If you\u2019re interested in using one of the official checkpoints for a task, explore the "),R=s("a"),de=r("CompVis"),Q=r(", "),V=s("a"),ce=r("Runway"),F=r(", and "),S=s("a"),ee=r("Stability AI"),z=r(" Hub organizations!"),this.h()},l(j){p=o(j,"P",{});var W=i(p);_=l(W,"Make sure to check out the Stable Diffusion "),h=o(W,"A",{href:!0});var ut=i(h);d=l(ut,"Tips"),ut.forEach(n),b=l(W," section to learn how to explore the tradeoff between scheduler speed and quality, and how to reuse pipeline components efficiently!"),W.forEach(n),a=f(j),u=o(j,"P",{});var E=i(u);G=l(E,"If you\u2019re interested in using one of the official checkpoints for a task, explore the "),R=o(E,"A",{href:!0,rel:!0});var N=i(R);de=l(N,"CompVis"),N.forEach(n),Q=l(E,", "),V=o(E,"A",{href:!0,rel:!0});var ht=i(V);ce=l(ht,"Runway"),ht.forEach(n),F=l(E,", and "),S=o(E,"A",{href:!0,rel:!0});var H=i(S);ee=l(H,"Stability AI"),H.forEach(n),z=l(E," Hub organizations!"),E.forEach(n),this.h()},h(){m(h,"href","overview#tips"),m(R,"href","https://huggingface.co/CompVis"),m(R,"rel","nofollow"),m(V,"href","https://huggingface.co/runwayml"),m(V,"rel","nofollow"),m(S,"href","https://huggingface.co/stabilityai"),m(S,"rel","nofollow")},m(j,W){y(j,p,W),e(p,_),e(p,h),e(h,d),e(p,b),y(j,a,W),y(j,u,W),e(u,G),e(u,R),e(R,de),e(u,Q),e(u,V),e(V,ce),e(u,F),e(u,S),e(S,ee),e(u,z)},d(j){j&&n(p),j&&n(a),j&&n(u)}}}function pi(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("Examples:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"Examples:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function di(k){let p,_,h,d,b;return{c(){p=s("p"),_=r("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),h=s("code"),d=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){p=o(a,"P",{});var u=i(p);_=l(u,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),h=o(u,"CODE",{});var G=i(h);d=l(G,"scaled_dot_product_attention"),G.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,p,u),e(p,_),e(p,h),e(h,d),e(p,b)},d(a){a&&n(p)}}}function ci(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("Examples:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"Examples:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function fi(k){let p,_;return{c(){p=s("p"),_=r(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(h){p=o(h,"P",{});var d=i(p);_=l(d,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),d.forEach(n)},m(h,d){y(h,p,d),e(p,_)},d(h){h&&n(p)}}}function mi(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("Examples:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"Examples:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function ui(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"To load a textual inversion embedding vector in \u{1F917} Diffusers format:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function hi(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("locally:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"locally:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function gi(k){let p,_;return{c(){p=s("p"),_=r("\u{1F9EA} This is an experimental feature!")},l(h){p=o(h,"P",{});var d=i(p);_=l(d,"\u{1F9EA} This is an experimental feature!"),d.forEach(n)},m(h,d){y(h,p,d),e(p,_)},d(h){h&&n(p)}}}function _i(k){let p,_,h,d,b;return d=new Et({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(){p=s("p"),_=r("Examples:"),h=c(),v(d.$$.fragment)},l(a){p=o(a,"P",{});var u=i(p);_=l(u,"Examples:"),u.forEach(n),h=f(a),w(d.$$.fragment,a)},m(a,u){y(a,p,u),e(p,_),y(a,h,u),x(d,a,u),b=!0},p:Ft,i(a){b||(I(d.$$.fragment,a),b=!0)},o(a){M(d.$$.fragment,a),b=!1},d(a){a&&n(p),a&&n(h),T(d,a)}}}function bi(k){let p,_,h,d,b,a,u,G,R,de,Q,V,ce,F,S,ee,z,j,W,ut,E,N,ht,H,Qn,Hn,Ze,qn,On,yn,fe,vn,te,me,Nt,We,Kn,Gt,ea,wn,J,Fe,ta,Bt,na,aa,Ee,sa,gt,oa,ia,ra,Xt,la,pa,ne,_t,bt,da,ca,fa,yt,vt,ma,ua,ha,wt,xt,ga,_a,ba,q,Ne,ya,Ct,va,wa,ue,xa,B,Ge,Ia,Lt,Ma,Ta,he,Ja,ge,$a,_e,Be,ka,Xe,Sa,Rt,Da,Pa,ja,X,Ce,Ua,Le,Za,Re,Wa,Fa,Ea,be,Na,ye,Ga,ve,Ve,Ba,ze,Xa,Ae,Ca,La,Ra,D,Ye,Va,Qe,za,It,Aa,Ya,Qa,Vt,Ha,qa,we,Oa,He,Ka,qe,es,ts,ns,xe,as,P,Oe,ss,A,os,zt,is,rs,At,ls,ps,Yt,ds,cs,fs,Ke,ms,Qt,us,hs,gs,et,_s,Mt,bs,ys,vs,ae,ws,Tt,xs,Is,Ht,Ms,Ts,Js,se,$s,Jt,ks,Ss,qt,Ds,Ps,js,Ie,tt,Us,Ot,Zs,Ws,Me,nt,Fs,Kt,Es,xn,oe,Te,en,at,Ns,tn,Gs,In,ie,st,Bs,nn,Xs,Mn,re,Je,an,ot,Cs,sn,Ls,Tn,U,it,Rs,on,Vs,zs,$e,As,rt,Ys,$t,Qs,Hs,qs,O,lt,Os,rn,Ks,eo,ke,Jn,le,Se,ln,pt,to,pn,no,$n,Y,dt,ao,dn,so,oo,De,ct,io,cn,ro,kn;return a=new Zt({}),z=new Zt({}),fe=new Yn({props:{$$slots:{default:[li]},$$scope:{ctx:k}}}),We=new Zt({}),Fe=new Z({props:{name:"class diffusers.StableDiffusionInpaintPipeline",anchor:"diffusers.StableDiffusionInpaintPipeline",parameters:[{name:"vae",val:": typing.Union[diffusers.models.autoencoder_kl.AutoencoderKL, diffusers.models.autoencoder_asym_kl.AsymmetricAutoencoderKL]"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> ([<code>AutoencoderKL</code>, <code>AsymmetricAutoencoderKL</code>]) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionInpaintPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionInpaintPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/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/v0.21.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/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> (<code>CLIPImageProcessor</code>) &#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/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L162"}}),Ne=new Z({props:{name:"__call__",anchor:"diffusers.StableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"mask_image",val:": typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None"},{name:"masked_image_latents",val:": 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[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"}],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/v0.21.0/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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L698",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/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/v0.21.0/en/api/pipelines/stable_diffusion/img2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),ue=new Wt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[pi]},$$scope:{ctx:k}}}),Ge=new Z({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),he=new Yn({props:{warning:!0,$$slots:{default:[di]},$$scope:{ctx:k}}}),ge=new Wt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_attention_slicing.example",$$slots:{default:[ci]},$$scope:{ctx:k}}}),Be=new Z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),Ce=new Z({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),be=new Yn({props:{warning:!0,$$slots:{default:[fi]},$$scope:{ctx:k}}}),ye=new Wt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[mi]},$$scope:{ctx:k}}}),Ve=new Z({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),Ye=new Z({props:{name:"load_textual_inversion",anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, typing.List[str], typing.Dict[str, torch.Tensor], typing.List[typing.Dict[str, torch.Tensor]]]"},{name:"token",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"tokenizer",val:": typing.Optional[transformers.tokenization_utils.PreTrainedTokenizer] = None"},{name:"text_encoder",val:": typing.Optional[transformers.modeling_utils.PreTrainedModel] = 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.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>, <em>optional</em>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).
If not specified, function will take self.tokenizer.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>, <em>optional</em>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text. If not specified, function will take self.tokenizer.`,name:"tokenizer"},{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/v0.21.0/src/diffusers/loaders.py#L687"}}),we=new Wt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example",$$slots:{default:[ui]},$$scope:{ctx:k}}}),xe=new Wt({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example-2",$$slots:{default:[hi]},$$scope:{ctx:k}}}),Oe=new Z({props:{name:"load_lora_weights",anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": typing.Union[str, typing.Dict[str, torch.Tensor]]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) &#x2014;
See <a href="/docs/diffusers/v0.21.0/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/v0.21.0/en/api/loaders#diffusers.loaders.LoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L991"}}),tt=new Z({props:{name:"save_lora_weights",anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"unet_lora_layers",val:": typing.Dict[str, typing.Union[torch.nn.modules.module.Module, torch.Tensor]] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save LoRA parameters to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>Dict[str, torch.nn.Module]</code> or <code>Dict[str, torch.Tensor]</code>) &#x2014;
State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text
encoder LoRA state dict because it comes from &#x1F917; Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/loaders.py#L1623"}}),nt=new Z({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/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L329"}}),at=new Zt({}),st=new Z({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L15"}}),ot=new Zt({}),it=new Z({props:{name:"class diffusers.FlaxStableDiffusionInpaintPipeline",anchor:"diffusers.FlaxStableDiffusionInpaintPipeline",parameters:[{name:"vae",val:": FlaxAutoencoderKL"},{name:"text_encoder",val:": FlaxCLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": FlaxUNet2DConditionModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim_flax.FlaxDDIMScheduler, diffusers.schedulers.scheduling_pndm_flax.FlaxPNDMScheduler, diffusers.schedulers.scheduling_lms_discrete_flax.FlaxLMSDiscreteScheduler, diffusers.schedulers.scheduling_dpmsolver_multistep_flax.FlaxDPMSolverMultistepScheduler]"},{name:"safety_checker",val:": FlaxStableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.21.0/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> (<code>FlaxCLIPTextModel</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.FlaxStableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/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/v0.21.0/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> (<code>CLIPImageProcessor</code>) &#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/v0.21.0/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py#L102"}}),$e=new Yn({props:{warning:!0,$$slots:{default:[gi]},$$scope:{ctx:k}}}),lt=new Z({props:{name:"__call__",anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__",parameters:[{name:"prompt_ids",val:": array"},{name:"mask",val:": array"},{name:"masked_image",val:": array"},{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"prng_seed",val:": PRNGKeyArray"},{name:"num_inference_steps",val:": int = 50"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"guidance_scale",val:": typing.Union[float, array] = 7.5"},{name:"latents",val:": array = None"},{name:"neg_prompt_ids",val:": array = None"},{name:"return_dict",val:": bool = True"},{name:"jit",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation.`,name:"prompt"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference. This parameter is modulated by <code>strength</code>.`,name:"num_inference_steps"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.latents",description:`<strong>latents</strong> (<code>jnp.array</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
array is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.jit",description:`<strong>jit</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether to run <code>pmap</code> versions of the generation and safety scoring functions.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>This argument exists because <code>__call__</code> is not yet end-to-end pmap-able. It will be removed in a
future release.</p>

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