import{S as ii,i as ri,s as li,e as s,k as p,w as I,t as a,M as di,c as i,d as t,m as c,a as r,x as P,h as o,b as u,G as e,g as $,y as D,q as k,o as S,B as j,v as pi,L as nn}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Cn}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as an}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as si}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as tn}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ci(L){let l,_,f,m,w;return m=new an({props:{code:`import PIL
import requests
import torch
from io import BytesIO

from diffusers import StableDiffusionInpaintPipeline


def download_image(url):
    response = requests.get(url)
    return PIL.Image.open(BytesIO(response.content)).convert("RGB")


img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"

init_image = download_image(img_url).resize((512, 512))
mask_image = download_image(mask_url).resize((512, 512))

pipe = StableDiffusionInpaintPipeline.from_pretrained(
    "runwayml/stable-diffusion-inpainting", torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0]`,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(){l=s("p"),_=a("Examples:"),f=p(),I(m.$$.fragment)},l(d){l=i(d,"P",{});var h=r(l);_=o(h,"Examples:"),h.forEach(t),f=c(d),P(m.$$.fragment,d)},m(d,h){$(d,l,h),e(l,_),$(d,f,h),D(m,d,h),w=!0},p:nn,i(d){w||(k(m.$$.fragment,d),w=!0)},o(d){S(m.$$.fragment,d),w=!1},d(d){d&&t(l),d&&t(f),j(m,d)}}}function fi(L){let l,_,f,m,w;return m=new an({props:{code:`import torch
from diffusers import DiffusionPipeline
from xformers.ops import MemoryEfficientAttentionFlashAttentionOp

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
# Workaround for not accepting attention shape using VAE for Flash Attention
pipe.vae.enable_xformers_memory_efficient_attention(attention_op=None)`,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(){l=s("p"),_=a("Examples:"),f=p(),I(m.$$.fragment)},l(d){l=i(d,"P",{});var h=r(l);_=o(h,"Examples:"),h.forEach(t),f=c(d),P(m.$$.fragment,d)},m(d,h){$(d,l,h),e(l,_),$(d,f,h),D(m,d,h),w=!0},p:nn,i(d){w||(k(m.$$.fragment,d),w=!0)},o(d){S(m.$$.fragment,d),w=!1},d(d){d&&t(l),d&&t(f),j(m,d)}}}function mi(L){let l,_;return{c(){l=s("p"),_=a("This function is experimental and might change in the future.")},l(f){l=i(f,"P",{});var m=r(l);_=o(m,"This function is experimental and might change in the future."),m.forEach(t)},m(f,m){$(f,l,m),e(l,_)},d(f){f&&t(l)}}}function ui(L){let l,_,f,m,w,d,h,E;return{c(){l=s("p"),_=a("It is required to be logged in ("),f=s("code"),m=a("huggingface-cli login"),w=a(") when you want to use private or "),d=s("a"),h=a(`gated
models`),E=a("."),this.h()},l(g){l=i(g,"P",{});var b=r(l);_=o(b,"It is required to be logged in ("),f=i(b,"CODE",{});var T=r(f);m=o(T,"huggingface-cli login"),T.forEach(t),w=o(b,") when you want to use private or "),d=i(b,"A",{href:!0,rel:!0});var M=r(d);h=o(M,`gated
models`),M.forEach(t),E=o(b,"."),b.forEach(t),this.h()},h(){u(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),u(d,"rel","nofollow")},m(g,b){$(g,l,b),e(l,_),e(l,f),e(f,m),e(l,w),e(l,d),e(d,h),e(l,E)},d(g){g&&t(l)}}}function hi(L){let l,_,f,m,w,d,h,E;return h=new an({props:{code:`from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")

pipe.load_textual_inversion("sd-concepts-library/cat-toy")

prompt = "A <cat-toy> backpack"

image = pipe(prompt, num_inference_steps=50).images[0]
image.save("cat-backpack.png")`,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(){l=s("p"),_=a("To load a textual inversion embedding vector in "),f=s("code"),m=a("diffusers"),w=a(" format:"),d=p(),I(h.$$.fragment)},l(g){l=i(g,"P",{});var b=r(l);_=o(b,"To load a textual inversion embedding vector in "),f=i(b,"CODE",{});var T=r(f);m=o(T,"diffusers"),T.forEach(t),w=o(b," format:"),b.forEach(t),d=c(g),P(h.$$.fragment,g)},m(g,b){$(g,l,b),e(l,_),e(l,f),e(f,m),e(l,w),$(g,d,b),D(h,g,b),E=!0},p:nn,i(g){E||(k(h.$$.fragment,g),E=!0)},o(g){S(h.$$.fragment,g),E=!1},d(g){g&&t(l),g&&t(d),j(h,g)}}}function gi(L){let l,_,f,m,w,d,h,E;return h=new an({props:{code:`from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")

pipe.load_textual_inversion("./charturnerv2.pt", token="charturnerv2")

prompt = "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."

image = pipe(prompt, num_inference_steps=50).images[0]
image.save("character.png")`,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(){l=s("p"),_=a("e.g. from "),f=s("a"),m=a("civitAI"),w=a(" and then load the vector locally:"),d=p(),I(h.$$.fragment),this.h()},l(g){l=i(g,"P",{});var b=r(l);_=o(b,"e.g. from "),f=i(b,"A",{href:!0,rel:!0});var T=r(f);m=o(T,"civitAI"),T.forEach(t),w=o(b," and then load the vector locally:"),b.forEach(t),d=c(g),P(h.$$.fragment,g),this.h()},h(){u(f,"href","https://civitai.com/models/3036?modelVersionId=9857"),u(f,"rel","nofollow")},m(g,b){$(g,l,b),e(l,_),e(l,f),e(f,m),e(l,w),$(g,d,b),D(h,g,b),E=!0},p:nn,i(g){E||(k(h.$$.fragment,g),E=!0)},o(g){S(h.$$.fragment,g),E=!1},d(g){g&&t(l),g&&t(d),j(h,g)}}}function _i(L){let l,_;return{c(){l=s("p"),_=a("This function is experimental and might change in the future.")},l(f){l=i(f,"P",{});var m=r(l);_=o(m,"This function is experimental and might change in the future."),m.forEach(t)},m(f,m){$(f,l,m),e(l,_)},d(f){f&&t(l)}}}function bi(L){let l,_,f,m,w,d,h,E;return{c(){l=s("p"),_=a("It is required to be logged in ("),f=s("code"),m=a("huggingface-cli login"),w=a(") when you want to use private or "),d=s("a"),h=a(`gated
models`),E=a("."),this.h()},l(g){l=i(g,"P",{});var b=r(l);_=o(b,"It is required to be logged in ("),f=i(b,"CODE",{});var T=r(f);m=o(T,"huggingface-cli login"),T.forEach(t),w=o(b,") when you want to use private or "),d=i(b,"A",{href:!0,rel:!0});var M=r(d);h=o(M,`gated
models`),M.forEach(t),E=o(b,"."),b.forEach(t),this.h()},h(){u(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),u(d,"rel","nofollow")},m(g,b){$(g,l,b),e(l,_),e(l,f),e(f,m),e(l,w),e(l,d),e(d,h),e(l,E)},d(g){g&&t(l)}}}function vi(L){let l,_,f,m,w;return m=new an({props:{code:`import jax
import numpy as np
from flax.jax_utils import replicate
from flax.training.common_utils import shard
import PIL
import requests
from io import BytesIO
from diffusers import FlaxStableDiffusionInpaintPipeline


def download_image(url):
    response = requests.get(url)
    return PIL.Image.open(BytesIO(response.content)).convert("RGB")


img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"

init_image = download_image(img_url).resize((512, 512))
mask_image = download_image(mask_url).resize((512, 512))

pipeline, params = FlaxStableDiffusionInpaintPipeline.from_pretrained(
    "xvjiarui/stable-diffusion-2-inpainting"
)

prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
prng_seed = jax.random.PRNGKey(0)
num_inference_steps = 50

num_samples = jax.device_count()
prompt = num_samples * [prompt]
init_image = num_samples * [init_image]
mask_image = num_samples * [mask_image]
prompt_ids, processed_masked_images, processed_masks = pipeline.prepare_inputs(
    prompt, init_image, mask_image
)

params = replicate(params)
prng_seed = jax.random.split(prng_seed, jax.device_count())
prompt_ids = shard(prompt_ids)
processed_masked_images = shard(processed_masked_images)
processed_masks = shard(processed_masks)

images = pipeline(
    prompt_ids, processed_masks, processed_masked_images, params, prng_seed, num_inference_steps, jit=True
).images
images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-3:])))`,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(){l=s("p"),_=a("Examples:"),f=p(),I(m.$$.fragment)},l(d){l=i(d,"P",{});var h=r(l);_=o(h,"Examples:"),h.forEach(t),f=c(d),P(m.$$.fragment,d)},m(d,h){$(d,l,h),e(l,_),$(d,f,h),D(m,d,h),w=!0},p:nn,i(d){w||(k(m.$$.fragment,d),w=!0)},o(d){S(m.$$.fragment,d),w=!1},d(d){d&&t(l),d&&t(f),j(m,d)}}}function xi(L){let l,_,f,m,w,d,h,E,g,b,T,M,mt,he,qn,ut,An,on,q,Fn,ge,Mn,Nn,_e,On,Un,be,zn,Vn,ve,Gn,Wn,Ze,Rn,Bn,sn,et,Kn,rn,J,xe,ht,Qn,Yn,we,Hn,Jn,ye,gt,Xn,Zn,$e,ea,ln,tt,ta,dn,X,Ie,_t,na,aa,Pe,oa,sa,De,bt,ia,ra,ke,la,pn,x,Se,da,je,pa,vt,ca,fa,ma,Ee,ua,nt,ha,ga,_a,xt,ba,va,Te,Le,wt,xa,wa,at,ya,$a,Ce,yt,Ia,Pa,ot,Da,ka,$t,Sa,ja,It,qe,Pt,Ea,Ta,st,La,Ca,G,Ae,qa,Dt,Aa,Fa,Z,Ma,W,Fe,Na,kt,Oa,Ua,St,za,Va,ee,Me,Ga,Ne,Wa,jt,Ra,Ba,Ka,N,Oe,Qa,Et,Ya,Ha,Tt,Ja,Xa,Lt,Za,eo,te,to,ne,Ue,no,Ct,ao,oo,C,ze,so,Q,io,qt,ro,lo,At,po,co,fo,ae,mo,oe,uo,Ft,ho,go,se,_o,Mt,bo,vo,ie,xo,V,Ve,wo,Y,yo,it,$o,Io,Ge,Nt,Po,Do,ko,re,So,le,jo,de,We,Eo,Ot,To,Lo,pe,Re,Co,O,qo,Ut,Ao,Fo,zt,Mo,No,Vt,Oo,Uo,Gt,zo,Vo,Go,ce,Be,Wo,H,Ro,Wt,Bo,Ko,Rt,Qo,Yo,cn,U,Ke,Ho,Qe,Jo,Bt,Xo,Zo,es,Ye,ts,Kt,ns,as,os,R,He,ss,Qt,is,rs,fe,fn;return d=new si({}),he=new si({}),Se=new z({props:{name:"class diffusers.StableDiffusionInpaintPipeline",anchor:"diffusers.StableDiffusionInpaintPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.AutoencoderKL">AutoencoderKL</a>) &#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. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionInpaintPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.16.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.16.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.16.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.16.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 details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionInpaintPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L141"}}),Ae=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[torch.FloatTensor, PIL.Image.Image] = None"},{name:"mask_image",val:": typing.Union[torch.FloatTensor, PIL.Image.Image] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"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"}],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 the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch which will be inpainted, <em>i.e.</em> parts of the image will
be masked out with <code>mask_image</code> and repainted according to <code>prompt</code>.`,name:"image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>PIL.Image.Image</code>) &#x2014;
<code>Image</code>, or tensor representing an image batch, to mask <code>image</code>. White pixels in the mask will be
repainted, while black pixels will be preserved. If <code>mask_image</code> is a PIL image, it will be converted
to a single channel (luminance) before use. If it&#x2019;s a tensor, it should contain one color channel (L)
instead of 3, so the expected shape would be <code>(B, H, W, 1)</code>.`,name:"mask_image"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.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.`,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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.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 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.__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;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.16.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.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 will ge 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, <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.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.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.16.0/en/api/pipelines/stable_diffusion/overview#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 will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L651",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),Z=new tn({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[ci]},$$scope:{ctx:L}}}),Fe=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.16.0/src/diffusers/pipelines/pipeline_utils.py#L1476"}}),Me=new z({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionInpaintPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1492"}}),Oe=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.16.0/src/diffusers/pipelines/pipeline_utils.py#L1418"}}),te=new tn({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[fi]},$$scope:{ctx:L}}}),Ue=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.16.0/src/diffusers/pipelines/pipeline_utils.py#L1450"}}),ze=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.Dict[str, torch.Tensor]]"},{name:"token",val:": typing.Optional[str] = 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>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like
<code>&quot;sd-concepts-library/low-poly-hd-logos-icons&quot;</code>.</li>
<li>A path to a <em>directory</em> containing textual inversion weights, e.g.
<code>./my_text_inversion_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{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 in two cases:</p>
<ul>
<li>The saved textual inversion file is in <code>diffusers</code> 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 &#x201C;Automatic1111&#x201D; form.</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 in which a downloaded pretrained model configuration should be cached if the
standard cache should not be 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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,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, e.g., <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(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{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>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be 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;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L420"}}),ae=new Cn({props:{warning:!0,$$slots:{default:[mi]},$$scope:{ctx:L}}}),oe=new Cn({props:{$$slots:{default:[ui]},$$scope:{ctx:L}}}),se=new tn({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example",$$slots:{default:[hi]},$$scope:{ctx:L}}}),ie=new tn({props:{anchor:"diffusers.StableDiffusionInpaintPipeline.load_textual_inversion.example-2",$$slots:{default:[gi]},$$scope:{ctx:L}}}),Ve=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;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</li>
<li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state
dict</a>.</li>
</ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <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_lora_weights.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.StableDiffusionInpaintPipeline.load_lora_weights.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L678"}}),re=new Cn({props:{warning:!0,$$slots:{default:[_i]},$$scope:{ctx:L}}}),le=new Cn({props:{$$slots:{default:[bi]},$$scope:{ctx:L}}}),We=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, torch.nn.modules.module.Module] = None"},{name:"text_encoder_lora_layers",val:": typing.Dict[str, torch.nn.modules.module.Module] = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.StableDiffusionInpaintPipeline.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. 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>]) &#x2014;
State dict of the LoRA layers corresponding to the UNet. Specifying this helps to make the
serialization process easier and cleaner.`,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>]) &#x2014;
State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Since the <code>text_encoder</code> comes from
<code>transformers</code>, we cannot rejig it. That is why we have to explicitly pass the text encoder LoRA state
dict.`,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 when in distributed training like
TPUs and 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 on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/loaders.py#L1038"}}),Re=new z({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L302"}}),Be=new z({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.StableDiffusionInpaintPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py#L276"}}),Ke=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.16.0/en/api/models#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. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.FlaxCLIPTextModel" rel="nofollow">CLIP</a>,
specifically the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxUNet2DConditionModel">FlaxUNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.16.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 details.`,name:"safety_checker"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py#L102"}}),He=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 the image generation.`,name:"prompt"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.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.`,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;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.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. tensor will ge 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. NOTE: This argument
exists because <code>__call__</code> is not yet end-to-end pmap-able. It will be removed in a future release.`,name:"jit"},{anchor:"diffusers.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 <code>FlaxStableDiffusionPipelineOutput</code> instead of
a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py#L389",returnDescription:`
<p><code>FlaxStableDiffusionPipelineOutput</code> if <code>return_dict</code> is True, otherwise a
<code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><code>FlaxStableDiffusionPipelineOutput</code> or <code>tuple</code></p>
`}}),fe=new tn({props:{anchor:"diffusers.FlaxStableDiffusionInpaintPipeline.__call__.example",$$slots:{default:[vi]},$$scope:{ctx:L}}}),{c(){l=s("meta"),_=p(),f=s("h1"),m=s("a"),w=s("span"),I(d.$$.fragment),h=p(),E=s("span"),g=a("Text-Guided Image Inpainting"),b=p(),T=s("h2"),M=s("a"),mt=s("span"),I(he.$$.fragment),qn=p(),ut=s("span"),An=a("StableDiffusionInpaintPipeline"),on=p(),q=s("p"),Fn=a("The Stable Diffusion model was created by the researchers and engineers from "),ge=s("a"),Mn=a("CompVis"),Nn=a(", "),_e=s("a"),On=a("Stability AI"),Un=a(", "),be=s("a"),zn=a("runway"),Vn=a(", and "),ve=s("a"),Gn=a("LAION"),Wn=a(". The "),Ze=s("a"),Rn=a("StableDiffusionInpaintPipeline"),Bn=a(" lets you edit specific parts of an image by providing a mask and a text prompt using Stable Diffusion."),sn=p(),et=s("p"),Kn=a("The original codebase can be found here:"),rn=p(),J=s("ul"),xe=s("li"),ht=s("em"),Qn=a("Stable Diffusion V1"),Yn=a(": "),we=s("a"),Hn=a("CampVis/stable-diffusion"),Jn=p(),ye=s("li"),gt=s("em"),Xn=a("Stable Diffusion V2"),Zn=a(": "),$e=s("a"),ea=a("Stability-AI/stablediffusion"),ln=p(),tt=s("p"),ta=a("Available checkpoints are:"),dn=p(),X=s("ul"),Ie=s("li"),_t=s("em"),na=a("stable-diffusion-inpainting (512x512 resolution)"),aa=a(": "),Pe=s("a"),oa=a("runwayml/stable-diffusion-inpainting"),sa=p(),De=s("li"),bt=s("em"),ia=a("stable-diffusion-2-inpainting (512x512 resolution)"),ra=a(": "),ke=s("a"),la=a("stabilityai/stable-diffusion-2-inpainting"),pn=p(),x=s("div"),I(Se.$$.fragment),da=p(),je=s("p"),pa=a("Pipeline for text-guided image inpainting using Stable Diffusion. "),vt=s("em"),ca=a("This is an experimental feature"),fa=a("."),ma=p(),Ee=s("p"),ua=a("This model inherits from "),nt=s("a"),ha=a("DiffusionPipeline"),ga=a(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),_a=p(),xt=s("p"),ba=a("In addition the pipeline inherits the following loading methods:"),va=p(),Te=s("ul"),Le=s("li"),wt=s("em"),xa=a("Textual-Inversion"),wa=a(": "),at=s("a"),ya=a("loaders.TextualInversionLoaderMixin.load_textual_inversion()"),$a=p(),Ce=s("li"),yt=s("em"),Ia=a("LoRA"),Pa=a(": "),ot=s("a"),Da=a("loaders.LoraLoaderMixin.load_lora_weights()"),ka=p(),$t=s("p"),Sa=a("as well as the following saving methods:"),ja=p(),It=s("ul"),qe=s("li"),Pt=s("em"),Ea=a("LoRA"),Ta=a(": "),st=s("a"),La=a("loaders.LoraLoaderMixin.save_lora_weights()"),Ca=p(),G=s("div"),I(Ae.$$.fragment),qa=p(),Dt=s("p"),Aa=a("Function invoked when calling the pipeline for generation."),Fa=p(),I(Z.$$.fragment),Ma=p(),W=s("div"),I(Fe.$$.fragment),Na=p(),kt=s("p"),Oa=a("Enable sliced attention computation."),Ua=p(),St=s("p"),za=a(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Va=p(),ee=s("div"),I(Me.$$.fragment),Ga=p(),Ne=s("p"),Wa=a("Disable sliced attention computation. If "),jt=s("code"),Ra=a("enable_attention_slicing"),Ba=a(` was previously invoked, this method will go
back to computing attention in one step.`),Ka=p(),N=s("div"),I(Oe.$$.fragment),Qa=p(),Et=s("p"),Ya=a("Enable memory efficient attention as implemented in xformers."),Ha=p(),Tt=s("p"),Ja=a(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Xa=p(),Lt=s("p"),Za=a(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),eo=p(),I(te.$$.fragment),to=p(),ne=s("div"),I(Ue.$$.fragment),no=p(),Ct=s("p"),ao=a("Disable memory efficient attention as implemented in xformers."),oo=p(),C=s("div"),I(ze.$$.fragment),so=p(),Q=s("p"),io=a("Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),qt=s("code"),ro=a("diffusers"),lo=a(` and
`),At=s("code"),po=a("Automatic1111"),co=a(" formats are supported (see example below)."),fo=p(),I(ae.$$.fragment),mo=p(),I(oe.$$.fragment),uo=p(),Ft=s("p"),ho=a("Example:"),go=p(),I(se.$$.fragment),_o=p(),Mt=s("p"),bo=a("To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),vo=p(),I(ie.$$.fragment),xo=p(),V=s("div"),I(Ve.$$.fragment),wo=p(),Y=s("p"),yo=a("Load pretrained attention processor layers (such as LoRA) into "),it=s("a"),$o=a("UNet2DConditionModel"),Io=a(` and
`),Ge=s("a"),Nt=s("code"),Po=a("CLIPTextModel"),Do=a(")."),ko=p(),I(re.$$.fragment),So=p(),I(le.$$.fragment),jo=p(),de=s("div"),I(We.$$.fragment),Eo=p(),Ot=s("p"),To=a("Save the LoRA parameters corresponding to the UNet and the text encoder."),Lo=p(),pe=s("div"),I(Re.$$.fragment),Co=p(),O=s("p"),qo=a(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Ut=s("code"),Ao=a("enable_sequential_cpu_offload"),Fo=a(", this method moves one whole model at a time to the GPU when its "),zt=s("code"),Mo=a("forward"),No=a(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Vt=s("code"),Oo=a("enable_sequential_cpu_offload"),Uo=a(", but performance is much better due to the iterative execution of the "),Gt=s("code"),zo=a("unet"),Vo=a("."),Go=p(),ce=s("div"),I(Be.$$.fragment),Wo=p(),H=s("p"),Ro=a(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Wt=s("code"),Bo=a("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Ko=a("forward"),Rt=s("code"),Qo=a("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Yo=a("enable_model_cpu_offload`, but performance is lower."),cn=p(),U=s("div"),I(Ke.$$.fragment),Ho=p(),Qe=s("p"),Jo=a("Pipeline for text-guided image inpainting using Stable Diffusion. "),Bt=s("em"),Xo=a("This is an experimental feature"),Zo=a("."),es=p(),Ye=s("p"),ts=a("This model inherits from "),Kt=s("code"),ns=a("FlaxDiffusionPipeline"),as=a(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),os=p(),R=s("div"),I(He.$$.fragment),ss=p(),Qt=s("p"),is=a("Function invoked when calling the pipeline for generation."),rs=p(),I(fe.$$.fragment),this.h()},l(n){const v=di('[data-svelte="svelte-1phssyn"]',document.head);l=i(v,"META",{name:!0,content:!0}),v.forEach(t),_=c(n),f=i(n,"H1",{class:!0});var Je=r(f);m=i(Je,"A",{id:!0,class:!0,href:!0});var Yt=r(m);w=i(Yt,"SPAN",{});var Ht=r(w);P(d.$$.fragment,Ht),Ht.forEach(t),Yt.forEach(t),h=c(Je),E=i(Je,"SPAN",{});var Jt=r(E);g=o(Jt,"Text-Guided Image Inpainting"),Jt.forEach(t),Je.forEach(t),b=c(n),T=i(n,"H2",{class:!0});var Xe=r(T);M=i(Xe,"A",{id:!0,class:!0,href:!0});var Xt=r(M);mt=i(Xt,"SPAN",{});var Zt=r(mt);P(he.$$.fragment,Zt),Zt.forEach(t),Xt.forEach(t),qn=c(Xe),ut=i(Xe,"SPAN",{});var en=r(ut);An=o(en,"StableDiffusionInpaintPipeline"),en.forEach(t),Xe.forEach(t),on=c(n),q=i(n,"P",{});var F=r(q);Fn=o(F,"The Stable Diffusion model was created by the researchers and engineers from "),ge=i(F,"A",{href:!0,rel:!0});var ls=r(ge);Mn=o(ls,"CompVis"),ls.forEach(t),Nn=o(F,", "),_e=i(F,"A",{href:!0,rel:!0});var ds=r(_e);On=o(ds,"Stability AI"),ds.forEach(t),Un=o(F,", "),be=i(F,"A",{href:!0,rel:!0});var ps=r(be);zn=o(ps,"runway"),ps.forEach(t),Vn=o(F,", and "),ve=i(F,"A",{href:!0,rel:!0});var cs=r(ve);Gn=o(cs,"LAION"),cs.forEach(t),Wn=o(F,". The "),Ze=i(F,"A",{href:!0});var fs=r(Ze);Rn=o(fs,"StableDiffusionInpaintPipeline"),fs.forEach(t),Bn=o(F," lets you edit specific parts of an image by providing a mask and a text prompt using Stable Diffusion."),F.forEach(t),sn=c(n),et=i(n,"P",{});var ms=r(et);Kn=o(ms,"The original codebase can be found here:"),ms.forEach(t),rn=c(n),J=i(n,"UL",{});var mn=r(J);xe=i(mn,"LI",{});var un=r(xe);ht=i(un,"EM",{});var us=r(ht);Qn=o(us,"Stable Diffusion V1"),us.forEach(t),Yn=o(un,": "),we=i(un,"A",{href:!0,rel:!0});var hs=r(we);Hn=o(hs,"CampVis/stable-diffusion"),hs.forEach(t),un.forEach(t),Jn=c(mn),ye=i(mn,"LI",{});var hn=r(ye);gt=i(hn,"EM",{});var gs=r(gt);Xn=o(gs,"Stable Diffusion V2"),gs.forEach(t),Zn=o(hn,": "),$e=i(hn,"A",{href:!0,rel:!0});var _s=r($e);ea=o(_s,"Stability-AI/stablediffusion"),_s.forEach(t),hn.forEach(t),mn.forEach(t),ln=c(n),tt=i(n,"P",{});var bs=r(tt);ta=o(bs,"Available checkpoints are:"),bs.forEach(t),dn=c(n),X=i(n,"UL",{});var gn=r(X);Ie=i(gn,"LI",{});var _n=r(Ie);_t=i(_n,"EM",{});var vs=r(_t);na=o(vs,"stable-diffusion-inpainting (512x512 resolution)"),vs.forEach(t),aa=o(_n,": "),Pe=i(_n,"A",{href:!0,rel:!0});var xs=r(Pe);oa=o(xs,"runwayml/stable-diffusion-inpainting"),xs.forEach(t),_n.forEach(t),sa=c(gn),De=i(gn,"LI",{});var bn=r(De);bt=i(bn,"EM",{});var ws=r(bt);ia=o(ws,"stable-diffusion-2-inpainting (512x512 resolution)"),ws.forEach(t),ra=o(bn,": "),ke=i(bn,"A",{href:!0,rel:!0});var ys=r(ke);la=o(ys,"stabilityai/stable-diffusion-2-inpainting"),ys.forEach(t),bn.forEach(t),gn.forEach(t),pn=c(n),x=i(n,"DIV",{class:!0});var y=r(x);P(Se.$$.fragment,y),da=c(y),je=i(y,"P",{});var vn=r(je);pa=o(vn,"Pipeline for text-guided image inpainting using Stable Diffusion. "),vt=i(vn,"EM",{});var $s=r(vt);ca=o($s,"This is an experimental feature"),$s.forEach(t),fa=o(vn,"."),vn.forEach(t),ma=c(y),Ee=i(y,"P",{});var xn=r(Ee);ua=o(xn,"This model inherits from "),nt=i(xn,"A",{href:!0});var Is=r(nt);ha=o(Is,"DiffusionPipeline"),Is.forEach(t),ga=o(xn,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),xn.forEach(t),_a=c(y),xt=i(y,"P",{});var Ps=r(xt);ba=o(Ps,"In addition the pipeline inherits the following loading methods:"),Ps.forEach(t),va=c(y),Te=i(y,"UL",{});var wn=r(Te);Le=i(wn,"LI",{});var yn=r(Le);wt=i(yn,"EM",{});var Ds=r(wt);xa=o(Ds,"Textual-Inversion"),Ds.forEach(t),wa=o(yn,": "),at=i(yn,"A",{href:!0});var ks=r(at);ya=o(ks,"loaders.TextualInversionLoaderMixin.load_textual_inversion()"),ks.forEach(t),yn.forEach(t),$a=c(wn),Ce=i(wn,"LI",{});var $n=r(Ce);yt=i($n,"EM",{});var Ss=r(yt);Ia=o(Ss,"LoRA"),Ss.forEach(t),Pa=o($n,": "),ot=i($n,"A",{href:!0});var js=r(ot);Da=o(js,"loaders.LoraLoaderMixin.load_lora_weights()"),js.forEach(t),$n.forEach(t),wn.forEach(t),ka=c(y),$t=i(y,"P",{});var Es=r($t);Sa=o(Es,"as well as the following saving methods:"),Es.forEach(t),ja=c(y),It=i(y,"UL",{});var Ts=r(It);qe=i(Ts,"LI",{});var In=r(qe);Pt=i(In,"EM",{});var Ls=r(Pt);Ea=o(Ls,"LoRA"),Ls.forEach(t),Ta=o(In,": "),st=i(In,"A",{href:!0});var Cs=r(st);La=o(Cs,"loaders.LoraLoaderMixin.save_lora_weights()"),Cs.forEach(t),In.forEach(t),Ts.forEach(t),Ca=c(y),G=i(y,"DIV",{class:!0});var rt=r(G);P(Ae.$$.fragment,rt),qa=c(rt),Dt=i(rt,"P",{});var qs=r(Dt);Aa=o(qs,"Function invoked when calling the pipeline for generation."),qs.forEach(t),Fa=c(rt),P(Z.$$.fragment,rt),rt.forEach(t),Ma=c(y),W=i(y,"DIV",{class:!0});var lt=r(W);P(Fe.$$.fragment,lt),Na=c(lt),kt=i(lt,"P",{});var As=r(kt);Oa=o(As,"Enable sliced attention computation."),As.forEach(t),Ua=c(lt),St=i(lt,"P",{});var Fs=r(St);za=o(Fs,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Fs.forEach(t),lt.forEach(t),Va=c(y),ee=i(y,"DIV",{class:!0});var Pn=r(ee);P(Me.$$.fragment,Pn),Ga=c(Pn),Ne=i(Pn,"P",{});var Dn=r(Ne);Wa=o(Dn,"Disable sliced attention computation. If "),jt=i(Dn,"CODE",{});var Ms=r(jt);Ra=o(Ms,"enable_attention_slicing"),Ms.forEach(t),Ba=o(Dn,` was previously invoked, this method will go
back to computing attention in one step.`),Dn.forEach(t),Pn.forEach(t),Ka=c(y),N=i(y,"DIV",{class:!0});var B=r(N);P(Oe.$$.fragment,B),Qa=c(B),Et=i(B,"P",{});var Ns=r(Et);Ya=o(Ns,"Enable memory efficient attention as implemented in xformers."),Ns.forEach(t),Ha=c(B),Tt=i(B,"P",{});var Os=r(Tt);Ja=o(Os,`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Os.forEach(t),Xa=c(B),Lt=i(B,"P",{});var Us=r(Lt);Za=o(Us,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),Us.forEach(t),eo=c(B),P(te.$$.fragment,B),B.forEach(t),to=c(y),ne=i(y,"DIV",{class:!0});var kn=r(ne);P(Ue.$$.fragment,kn),no=c(kn),Ct=i(kn,"P",{});var zs=r(Ct);ao=o(zs,"Disable memory efficient attention as implemented in xformers."),zs.forEach(t),kn.forEach(t),oo=c(y),C=i(y,"DIV",{class:!0});var A=r(C);P(ze.$$.fragment,A),so=c(A),Q=i(A,"P",{});var dt=r(Q);io=o(dt,"Load textual inversion embeddings into the text encoder of stable diffusion pipelines. Both "),qt=i(dt,"CODE",{});var Vs=r(qt);ro=o(Vs,"diffusers"),Vs.forEach(t),lo=o(dt,` and
`),At=i(dt,"CODE",{});var Gs=r(At);po=o(Gs,"Automatic1111"),Gs.forEach(t),co=o(dt," formats are supported (see example below)."),dt.forEach(t),fo=c(A),P(ae.$$.fragment,A),mo=c(A),P(oe.$$.fragment,A),uo=c(A),Ft=i(A,"P",{});var Ws=r(Ft);ho=o(Ws,"Example:"),Ws.forEach(t),go=c(A),P(se.$$.fragment,A),_o=c(A),Mt=i(A,"P",{});var Rs=r(Mt);bo=o(Rs,"To load a textual inversion embedding vector in Automatic1111 format, make sure to first download the vector,"),Rs.forEach(t),vo=c(A),P(ie.$$.fragment,A),A.forEach(t),xo=c(y),V=i(y,"DIV",{class:!0});var me=r(V);P(Ve.$$.fragment,me),wo=c(me),Y=i(me,"P",{});var pt=r(Y);yo=o(pt,"Load pretrained attention processor layers (such as LoRA) into "),it=i(pt,"A",{href:!0});var Bs=r(it);$o=o(Bs,"UNet2DConditionModel"),Bs.forEach(t),Io=o(pt,` and
`),Ge=i(pt,"A",{href:!0,rel:!0});var Ks=r(Ge);Nt=i(Ks,"CODE",{});var Qs=r(Nt);Po=o(Qs,"CLIPTextModel"),Qs.forEach(t),Ks.forEach(t),Do=o(pt,")."),pt.forEach(t),ko=c(me),P(re.$$.fragment,me),So=c(me),P(le.$$.fragment,me),me.forEach(t),jo=c(y),de=i(y,"DIV",{class:!0});var Sn=r(de);P(We.$$.fragment,Sn),Eo=c(Sn),Ot=i(Sn,"P",{});var Ys=r(Ot);To=o(Ys,"Save the LoRA parameters corresponding to the UNet and the text encoder."),Ys.forEach(t),Sn.forEach(t),Lo=c(y),pe=i(y,"DIV",{class:!0});var jn=r(pe);P(Re.$$.fragment,jn),Co=c(jn),O=i(jn,"P",{});var K=r(O);qo=o(K,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Ut=i(K,"CODE",{});var Hs=r(Ut);Ao=o(Hs,"enable_sequential_cpu_offload"),Hs.forEach(t),Fo=o(K,", this method moves one whole model at a time to the GPU when its "),zt=i(K,"CODE",{});var Js=r(zt);Mo=o(Js,"forward"),Js.forEach(t),No=o(K,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),Vt=i(K,"CODE",{});var Xs=r(Vt);Oo=o(Xs,"enable_sequential_cpu_offload"),Xs.forEach(t),Uo=o(K,", but performance is much better due to the iterative execution of the "),Gt=i(K,"CODE",{});var Zs=r(Gt);zo=o(Zs,"unet"),Zs.forEach(t),Vo=o(K,"."),K.forEach(t),jn.forEach(t),Go=c(y),ce=i(y,"DIV",{class:!0});var En=r(ce);P(Be.$$.fragment,En),Wo=c(En),H=i(En,"P",{});var ct=r(H);Ro=o(ct,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Wt=i(ct,"CODE",{});var ei=r(Wt);Bo=o(ei,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),ei.forEach(t),Ko=o(ct,"forward"),Rt=i(ct,"CODE",{});var ti=r(Rt);Qo=o(ti,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),ti.forEach(t),Yo=o(ct,"enable_model_cpu_offload`, but performance is lower."),ct.forEach(t),En.forEach(t),y.forEach(t),cn=c(n),U=i(n,"DIV",{class:!0});var ue=r(U);P(Ke.$$.fragment,ue),Ho=c(ue),Qe=i(ue,"P",{});var Tn=r(Qe);Jo=o(Tn,"Pipeline for text-guided image inpainting using Stable Diffusion. "),Bt=i(Tn,"EM",{});var ni=r(Bt);Xo=o(ni,"This is an experimental feature"),ni.forEach(t),Zo=o(Tn,"."),Tn.forEach(t),es=c(ue),Ye=i(ue,"P",{});var Ln=r(Ye);ts=o(Ln,"This model inherits from "),Kt=i(Ln,"CODE",{});var ai=r(Kt);ns=o(ai,"FlaxDiffusionPipeline"),ai.forEach(t),as=o(Ln,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Ln.forEach(t),os=c(ue),R=i(ue,"DIV",{class:!0});var ft=r(R);P(He.$$.fragment,ft),ss=c(ft),Qt=i(ft,"P",{});var oi=r(Qt);is=o(oi,"Function invoked when calling the pipeline for generation."),oi.forEach(t),rs=c(ft),P(fe.$$.fragment,ft),ft.forEach(t),ue.forEach(t),this.h()},h(){u(l,"name","hf:doc:metadata"),u(l,"content",JSON.stringify(wi)),u(m,"id","textguided-image-inpainting"),u(m,"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"),u(m,"href","#textguided-image-inpainting"),u(f,"class","relative group"),u(M,"id","diffusers.StableDiffusionInpaintPipeline"),u(M,"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"),u(M,"href","#diffusers.StableDiffusionInpaintPipeline"),u(T,"class","relative group"),u(ge,"href","https://github.com/CompVis"),u(ge,"rel","nofollow"),u(_e,"href","https://stability.ai/"),u(_e,"rel","nofollow"),u(be,"href","https://github.com/runwayml"),u(be,"rel","nofollow"),u(ve,"href","https://laion.ai/"),u(ve,"rel","nofollow"),u(Ze,"href","/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline"),u(we,"href","https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion"),u(we,"rel","nofollow"),u($e,"href","https://github.com/Stability-AI/stablediffusion#image-inpainting-with-stable-diffusion"),u($e,"rel","nofollow"),u(Pe,"href","https://huggingface.co/runwayml/stable-diffusion-inpainting"),u(Pe,"rel","nofollow"),u(ke,"href","https://huggingface.co/stabilityai/stable-diffusion-2-inpainting"),u(ke,"rel","nofollow"),u(nt,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),u(at,"href","/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_textual_inversion"),u(ot,"href","/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.load_lora_weights"),u(st,"href","/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/inpaint#diffusers.StableDiffusionInpaintPipeline.save_lora_weights"),u(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet2DConditionModel"),u(Ge,"href","https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel"),u(Ge,"rel","nofollow"),u(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(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(n,v){e(document.head,l),$(n,_,v),$(n,f,v),e(f,m),e(m,w),D(d,w,null),e(f,h),e(f,E),e(E,g),$(n,b,v),$(n,T,v),e(T,M),e(M,mt),D(he,mt,null),e(T,qn),e(T,ut),e(ut,An),$(n,on,v),$(n,q,v),e(q,Fn),e(q,ge),e(ge,Mn),e(q,Nn),e(q,_e),e(_e,On),e(q,Un),e(q,be),e(be,zn),e(q,Vn),e(q,ve),e(ve,Gn),e(q,Wn),e(q,Ze),e(Ze,Rn),e(q,Bn),$(n,sn,v),$(n,et,v),e(et,Kn),$(n,rn,v),$(n,J,v),e(J,xe),e(xe,ht),e(ht,Qn),e(xe,Yn),e(xe,we),e(we,Hn),e(J,Jn),e(J,ye),e(ye,gt),e(gt,Xn),e(ye,Zn),e(ye,$e),e($e,ea),$(n,ln,v),$(n,tt,v),e(tt,ta),$(n,dn,v),$(n,X,v),e(X,Ie),e(Ie,_t),e(_t,na),e(Ie,aa),e(Ie,Pe),e(Pe,oa),e(X,sa),e(X,De),e(De,bt),e(bt,ia),e(De,ra),e(De,ke),e(ke,la),$(n,pn,v),$(n,x,v),D(Se,x,null),e(x,da),e(x,je),e(je,pa),e(je,vt),e(vt,ca),e(je,fa),e(x,ma),e(x,Ee),e(Ee,ua),e(Ee,nt),e(nt,ha),e(Ee,ga),e(x,_a),e(x,xt),e(xt,ba),e(x,va),e(x,Te),e(Te,Le),e(Le,wt),e(wt,xa),e(Le,wa),e(Le,at),e(at,ya),e(Te,$a),e(Te,Ce),e(Ce,yt),e(yt,Ia),e(Ce,Pa),e(Ce,ot),e(ot,Da),e(x,ka),e(x,$t),e($t,Sa),e(x,ja),e(x,It),e(It,qe),e(qe,Pt),e(Pt,Ea),e(qe,Ta),e(qe,st),e(st,La),e(x,Ca),e(x,G),D(Ae,G,null),e(G,qa),e(G,Dt),e(Dt,Aa),e(G,Fa),D(Z,G,null),e(x,Ma),e(x,W),D(Fe,W,null),e(W,Na),e(W,kt),e(kt,Oa),e(W,Ua),e(W,St),e(St,za),e(x,Va),e(x,ee),D(Me,ee,null),e(ee,Ga),e(ee,Ne),e(Ne,Wa),e(Ne,jt),e(jt,Ra),e(Ne,Ba),e(x,Ka),e(x,N),D(Oe,N,null),e(N,Qa),e(N,Et),e(Et,Ya),e(N,Ha),e(N,Tt),e(Tt,Ja),e(N,Xa),e(N,Lt),e(Lt,Za),e(N,eo),D(te,N,null),e(x,to),e(x,ne),D(Ue,ne,null),e(ne,no),e(ne,Ct),e(Ct,ao),e(x,oo),e(x,C),D(ze,C,null),e(C,so),e(C,Q),e(Q,io),e(Q,qt),e(qt,ro),e(Q,lo),e(Q,At),e(At,po),e(Q,co),e(C,fo),D(ae,C,null),e(C,mo),D(oe,C,null),e(C,uo),e(C,Ft),e(Ft,ho),e(C,go),D(se,C,null),e(C,_o),e(C,Mt),e(Mt,bo),e(C,vo),D(ie,C,null),e(x,xo),e(x,V),D(Ve,V,null),e(V,wo),e(V,Y),e(Y,yo),e(Y,it),e(it,$o),e(Y,Io),e(Y,Ge),e(Ge,Nt),e(Nt,Po),e(Y,Do),e(V,ko),D(re,V,null),e(V,So),D(le,V,null),e(x,jo),e(x,de),D(We,de,null),e(de,Eo),e(de,Ot),e(Ot,To),e(x,Lo),e(x,pe),D(Re,pe,null),e(pe,Co),e(pe,O),e(O,qo),e(O,Ut),e(Ut,Ao),e(O,Fo),e(O,zt),e(zt,Mo),e(O,No),e(O,Vt),e(Vt,Oo),e(O,Uo),e(O,Gt),e(Gt,zo),e(O,Vo),e(x,Go),e(x,ce),D(Be,ce,null),e(ce,Wo),e(ce,H),e(H,Ro),e(H,Wt),e(Wt,Bo),e(H,Ko),e(H,Rt),e(Rt,Qo),e(H,Yo),$(n,cn,v),$(n,U,v),D(Ke,U,null),e(U,Ho),e(U,Qe),e(Qe,Jo),e(Qe,Bt),e(Bt,Xo),e(Qe,Zo),e(U,es),e(U,Ye),e(Ye,ts),e(Ye,Kt),e(Kt,ns),e(Ye,as),e(U,os),e(U,R),D(He,R,null),e(R,ss),e(R,Qt),e(Qt,is),e(R,rs),D(fe,R,null),fn=!0},p(n,[v]){const Je={};v&2&&(Je.$$scope={dirty:v,ctx:n}),Z.$set(Je);const Yt={};v&2&&(Yt.$$scope={dirty:v,ctx:n}),te.$set(Yt);const Ht={};v&2&&(Ht.$$scope={dirty:v,ctx:n}),ae.$set(Ht);const Jt={};v&2&&(Jt.$$scope={dirty:v,ctx:n}),oe.$set(Jt);const Xe={};v&2&&(Xe.$$scope={dirty:v,ctx:n}),se.$set(Xe);const Xt={};v&2&&(Xt.$$scope={dirty:v,ctx:n}),ie.$set(Xt);const Zt={};v&2&&(Zt.$$scope={dirty:v,ctx:n}),re.$set(Zt);const en={};v&2&&(en.$$scope={dirty:v,ctx:n}),le.$set(en);const F={};v&2&&(F.$$scope={dirty:v,ctx:n}),fe.$set(F)},i(n){fn||(k(d.$$.fragment,n),k(he.$$.fragment,n),k(Se.$$.fragment,n),k(Ae.$$.fragment,n),k(Z.$$.fragment,n),k(Fe.$$.fragment,n),k(Me.$$.fragment,n),k(Oe.$$.fragment,n),k(te.$$.fragment,n),k(Ue.$$.fragment,n),k(ze.$$.fragment,n),k(ae.$$.fragment,n),k(oe.$$.fragment,n),k(se.$$.fragment,n),k(ie.$$.fragment,n),k(Ve.$$.fragment,n),k(re.$$.fragment,n),k(le.$$.fragment,n),k(We.$$.fragment,n),k(Re.$$.fragment,n),k(Be.$$.fragment,n),k(Ke.$$.fragment,n),k(He.$$.fragment,n),k(fe.$$.fragment,n),fn=!0)},o(n){S(d.$$.fragment,n),S(he.$$.fragment,n),S(Se.$$.fragment,n),S(Ae.$$.fragment,n),S(Z.$$.fragment,n),S(Fe.$$.fragment,n),S(Me.$$.fragment,n),S(Oe.$$.fragment,n),S(te.$$.fragment,n),S(Ue.$$.fragment,n),S(ze.$$.fragment,n),S(ae.$$.fragment,n),S(oe.$$.fragment,n),S(se.$$.fragment,n),S(ie.$$.fragment,n),S(Ve.$$.fragment,n),S(re.$$.fragment,n),S(le.$$.fragment,n),S(We.$$.fragment,n),S(Re.$$.fragment,n),S(Be.$$.fragment,n),S(Ke.$$.fragment,n),S(He.$$.fragment,n),S(fe.$$.fragment,n),fn=!1},d(n){t(l),n&&t(_),n&&t(f),j(d),n&&t(b),n&&t(T),j(he),n&&t(on),n&&t(q),n&&t(sn),n&&t(et),n&&t(rn),n&&t(J),n&&t(ln),n&&t(tt),n&&t(dn),n&&t(X),n&&t(pn),n&&t(x),j(Se),j(Ae),j(Z),j(Fe),j(Me),j(Oe),j(te),j(Ue),j(ze),j(ae),j(oe),j(se),j(ie),j(Ve),j(re),j(le),j(We),j(Re),j(Be),n&&t(cn),n&&t(U),j(Ke),j(He),j(fe)}}}const wi={local:"textguided-image-inpainting",sections:[{local:"diffusers.StableDiffusionInpaintPipeline",title:"StableDiffusionInpaintPipeline"}],title:"Text-Guided Image Inpainting"};function yi(L){return pi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ji extends ii{constructor(l){super();ri(this,l,yi,xi,li,{})}}export{ji as default,wi as metadata};
