import{S as ua,i as ha,s as fa,e as s,k as f,w as R,t as m,M as ga,c as n,d as a,m as g,a as i,x as $,h as d,b as p,G as t,g as c,y as W,q as Z,o as E,B as x,v as _a,L as ya}from"../../../chunks/vendor-hf-doc-builder.js";import{T as wa}from"../../../chunks/Tip-hf-doc-builder.js";import{D as ze}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as ba}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as qe}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ma}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function va(Q){let l,M,u,h,_,r,y,j;return{c(){l=s("p"),M=m("Make sure to check out the Schedulers "),u=s("a"),h=m("guide"),_=m(" to learn how to explore the tradeoff between scheduler speed and quality, and see the "),r=s("a"),y=m("reuse components across pipelines"),j=m(" section to learn how to efficiently load the same components into multiple pipelines."),this.h()},l(J){l=n(J,"P",{});var w=i(l);M=d(w,"Make sure to check out the Schedulers "),u=n(w,"A",{href:!0});var v=i(u);h=d(v,"guide"),v.forEach(a),_=d(w," to learn how to explore the tradeoff between scheduler speed and quality, and see the "),r=n(w,"A",{href:!0});var P=i(r);y=d(P,"reuse components across pipelines"),P.forEach(a),j=d(w," section to learn how to efficiently load the same components into multiple pipelines."),w.forEach(a),this.h()},h(){p(u,"href","/using-diffusers/schedulers"),p(r,"href","/using-diffusers/loading#reuse-components-across-pipelines")},m(J,w){c(J,l,w),t(l,M),t(l,u),t(u,h),t(l,_),t(l,r),t(r,y),t(l,j)},d(J){J&&a(l)}}}function Pa(Q){let l,M,u,h,_;return h=new ba({props:{code:"ZnJvbSUyMGlvJTIwaW1wb3J0JTIwQnl0ZXNJTyUwQWltcG9ydCUyMHRvcmNoJTBBaW1wb3J0JTIwUElMJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwUmVQYWludFBpcGVsaW5lJTJDJTIwUmVQYWludFNjaGVkdWxlciUwQSUwQSUwQWRlZiUyMGRvd25sb2FkX2ltYWdlKHVybCklM0ElMEElMjAlMjAlMjAlMjByZXNwb25zZSUyMCUzRCUyMHJlcXVlc3RzLmdldCh1cmwpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwUElMLkltYWdlLm9wZW4oQnl0ZXNJTyhyZXNwb25zZS5jb250ZW50KSkuY29udmVydCglMjJSR0IlMjIpJTBBJTBBJTBBaW1nX3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmhmLWludGVybmFsLXRlc3RpbmclMkZkaWZmdXNlcnMtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZyZXBhaW50JTJGY2VsZWJhX2hxXzI1Ni5wbmclMjIlMEFtYXNrX3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmhmLWludGVybmFsLXRlc3RpbmclMkZkaWZmdXNlcnMtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZyZXBhaW50JTJGbWFza18yNTYucG5nJTIyJTBBJTBBJTIzJTIwTG9hZCUyMHRoZSUyMG9yaWdpbmFsJTIwaW1hZ2UlMjBhbmQlMjB0aGUlMjBtYXNrJTIwYXMlMjBQSUwlMjBpbWFnZXMlMEFvcmlnaW5hbF9pbWFnZSUyMCUzRCUyMGRvd25sb2FkX2ltYWdlKGltZ191cmwpLnJlc2l6ZSgoMjU2JTJDJTIwMjU2KSklMEFtYXNrX2ltYWdlJTIwJTNEJTIwZG93bmxvYWRfaW1hZ2UobWFza191cmwpLnJlc2l6ZSgoMjU2JTJDJTIwMjU2KSklMEElMEElMjMlMjBMb2FkJTIwdGhlJTIwUmVQYWludCUyMHNjaGVkdWxlciUyMGFuZCUyMHBpcGVsaW5lJTIwYmFzZWQlMjBvbiUyMGElMjBwcmV0cmFpbmVkJTIwRERQTSUyMG1vZGVsJTBBc2NoZWR1bGVyJTIwJTNEJTIwUmVQYWludFNjaGVkdWxlci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZGRwbS1lbWEtY2VsZWJhaHEtMjU2JTIyKSUwQXBpcGUlMjAlM0QlMjBSZVBhaW50UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmRkcG0tZW1hLWNlbGViYWhxLTI1NiUyMiUyQyUyMHNjaGVkdWxlciUzRHNjaGVkdWxlciklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWdlbmVyYXRvciUyMCUzRCUyMHRvcmNoLkdlbmVyYXRvcihkZXZpY2UlM0QlMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUwQW91dHB1dCUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0RvcmlnaW5hbF9pbWFnZSUyQyUwQSUyMCUyMCUyMCUyMG1hc2tfaW1hZ2UlM0RtYXNrX2ltYWdlJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDI1MCUyQyUwQSUyMCUyMCUyMCUyMGV0YSUzRDAuMCUyQyUwQSUyMCUyMCUyMCUyMGp1bXBfbGVuZ3RoJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBqdW1wX25fc2FtcGxlJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMEEpJTBBaW5wYWludGVkX2ltYWdlJTIwJTNEJTIwb3V0cHV0LmltYWdlcyU1QjAlNUQ=",highlighted:`<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">import</span> torch
<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> diffusers <span class="hljs-keyword">import</span> RePaintPipeline, RePaintScheduler


<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://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/repaint/celeba_hq_256.png&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_url = <span class="hljs-string">&quot;https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/repaint/mask_256.png&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load the original image and the mask as PIL images</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>original_image = download_image(img_url).resize((<span class="hljs-number">256</span>, <span class="hljs-number">256</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = download_image(mask_url).resize((<span class="hljs-number">256</span>, <span class="hljs-number">256</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load the RePaint scheduler and pipeline based on a pretrained DDPM model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = RePaintScheduler.from_pretrained(<span class="hljs-string">&quot;google/ddpm-ema-celebahq-256&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = RePaintPipeline.from_pretrained(<span class="hljs-string">&quot;google/ddpm-ema-celebahq-256&quot;</span>, scheduler=scheduler)
<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>generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    image=original_image,
<span class="hljs-meta">... </span>    mask_image=mask_image,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">250</span>,
<span class="hljs-meta">... </span>    eta=<span class="hljs-number">0.0</span>,
<span class="hljs-meta">... </span>    jump_length=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>    jump_n_sample=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>    generator=generator,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inpainted_image = output.images[<span class="hljs-number">0</span>]`}}),{c(){l=s("p"),M=m("Example:"),u=f(),R(h.$$.fragment)},l(r){l=n(r,"P",{});var y=i(l);M=d(y,"Example:"),y.forEach(a),u=g(r),$(h.$$.fragment,r)},m(r,y){c(r,l,y),t(l,M),c(r,u,y),W(h,r,y),_=!0},p:ya,i(r){_||(Z(h.$$.fragment,r),_=!0)},o(r){E(h.$$.fragment,r),_=!1},d(r){r&&a(l),r&&a(u),x(h,r)}}}function Ta(Q){let l,M,u,h,_,r,y,j,J,w,v,P,Te,je,ce,H,Je,me,O,ae,Ie,de,G,ke,N,Ue,Re,ue,V,he,I,B,te,A,$e,se,We,fe,b,L,Ze,ne,Ee,xe,X,Ge,K,Ve,Be,De,T,Y,Se,ie,Ce,Ne,D,ge,k,S,re,F,Ae,oe,Le,_e,U,z,Xe,le,Ye,ye;return r=new qe({}),V=new wa({props:{$$slots:{default:[va]},$$scope:{ctx:Q}}}),A=new qe({}),L=new ze({props:{name:"class diffusers.RePaintPipeline",anchor:"diffusers.RePaintPipeline",parameters:[{name:"unet",val:""},{name:"scheduler",val:""}],parametersDescription:[{anchor:"diffusers.RePaintPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/unet2d#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014;
A <code>UNet2DModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.RePaintPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.21.0/en/api/schedulers/repaint#diffusers.RePaintScheduler">RePaintScheduler</a>) &#x2014;
A <code>RePaintScheduler</code> to be used in combination with <code>unet</code> to denoise the encoded image.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/repaint/pipeline_repaint.py#L76"}}),Y=new ze({props:{name:"__call__",anchor:"diffusers.RePaintPipeline.__call__",parameters:[{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{name:"mask_image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{name:"num_inference_steps",val:": int = 250"},{name:"eta",val:": float = 0.0"},{name:"jump_length",val:": int = 10"},{name:"jump_n_sample",val:": int = 10"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.RePaintPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
The original image to inpaint on.`,name:"image"},{anchor:"diffusers.RePaintPipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>torch.FloatTensor</code> or <code>PIL.Image.Image</code>) &#x2014;
The mask_image where 0.0 define which part of the original image to inpaint.`,name:"mask_image"},{anchor:"diffusers.RePaintPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1000) &#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.RePaintPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>) &#x2014;
The weight of the added noise in a diffusion step. Its value is between 0.0 and 1.0; 0.0 corresponds to
DDIM and 1.0 is the DDPM scheduler.`,name:"eta"},{anchor:"diffusers.RePaintPipeline.__call__.jump_length",description:`<strong>jump_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The number of steps taken forward in time before going backward in time for a single jump (&#x201C;j&#x201D; in
RePaint paper). Take a look at Figure 9 and 10 in the <a href="https://arxiv.org/pdf/2201.09865.pdf" rel="nofollow">paper</a>.`,name:"jump_length"},{anchor:"diffusers.RePaintPipeline.__call__.jump_n_sample",description:`<strong>jump_n_sample</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The number of times to make a forward time jump for a given chosen time sample. Take a look at Figure 9
and 10 in the <a href="https://arxiv.org/pdf/2201.09865.pdf" rel="nofollow">paper</a>.`,name:"jump_n_sample"},{anchor:"diffusers.RePaintPipeline.__call__.generator",description:`<strong>generator</strong> (<code>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.RePaintPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <code>optional</code>, 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.RePaintPipeline.__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/latent_diffusion_uncond#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/repaint/pipeline_repaint.py#L98",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.21.0/en/api/pipelines/latent_diffusion_uncond#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),D=new Ma({props:{anchor:"diffusers.RePaintPipeline.__call__.example",$$slots:{default:[Pa]},$$scope:{ctx:Q}}}),F=new qe({}),z=new ze({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.ImagePipelineOutput.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L112"}}),{c(){l=s("meta"),M=f(),u=s("h1"),h=s("a"),_=s("span"),R(r.$$.fragment),y=f(),j=s("span"),J=m("RePaint"),w=f(),v=s("p"),P=s("a"),Te=m("RePaint: Inpainting using Denoising Diffusion Probabilistic Models"),je=m(" is by Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, Luc Van Gool."),ce=f(),H=s("p"),Je=m("The abstract from the paper is:"),me=f(),O=s("p"),ae=s("em"),Ie=m(`Free-form inpainting is the task of adding new content to an image in the regions specified by an arbitrary binary mask. Most existing approaches train for a certain distribution of masks, which limits their generalization capabilities to unseen mask types. Furthermore, training with pixel-wise and perceptual losses often leads to simple textural extensions towards the missing areas instead of semantically meaningful generation. In this work, we propose RePaint: A Denoising Diffusion Probabilistic Model (DDPM) based inpainting approach that is applicable to even extreme masks. We employ a pretrained unconditional DDPM as the generative prior. To condition the generation process, we only alter the reverse diffusion iterations by sampling the unmasked regions using the given image information. Since this technique does not modify or condition the original DDPM network itself, the model produces high-quality and diverse output images for any inpainting form. We validate our method for both faces and general-purpose image inpainting using standard and extreme masks.
RePaint outperforms state-of-the-art Autoregressive, and GAN approaches for at least five out of six mask distributions.`),de=f(),G=s("p"),ke=m("The original codebase can be found at "),N=s("a"),Ue=m("andreas128/RePaint"),Re=m("."),ue=f(),R(V.$$.fragment),he=f(),I=s("h2"),B=s("a"),te=s("span"),R(A.$$.fragment),$e=f(),se=s("span"),We=m("RePaintPipeline"),fe=f(),b=s("div"),R(L.$$.fragment),Ze=f(),ne=s("p"),Ee=m("Pipeline for image inpainting using RePaint."),xe=f(),X=s("p"),Ge=m("This model inherits from "),K=s("a"),Ve=m("DiffusionPipeline"),Be=m(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),De=f(),T=s("div"),R(Y.$$.fragment),Se=f(),ie=s("p"),Ce=m("The call function to the pipeline for generation."),Ne=f(),R(D.$$.fragment),ge=f(),k=s("h2"),S=s("a"),re=s("span"),R(F.$$.fragment),Ae=f(),oe=s("span"),Le=m("ImagePipelineOutput"),_e=f(),U=s("div"),R(z.$$.fragment),Xe=f(),le=s("p"),Ye=m("Output class for image pipelines."),this.h()},l(e){const o=ga('[data-svelte="svelte-1phssyn"]',document.head);l=n(o,"META",{name:!0,content:!0}),o.forEach(a),M=g(e),u=n(e,"H1",{class:!0});var q=i(u);h=n(q,"A",{id:!0,class:!0,href:!0});var pe=i(h);_=n(pe,"SPAN",{});var Qe=i(_);$(r.$$.fragment,Qe),Qe.forEach(a),pe.forEach(a),y=g(q),j=n(q,"SPAN",{});var He=i(j);J=d(He,"RePaint"),He.forEach(a),q.forEach(a),w=g(e),v=n(e,"P",{});var Fe=i(v);P=n(Fe,"A",{href:!0,rel:!0});var Oe=i(P);Te=d(Oe,"RePaint: Inpainting using Denoising Diffusion Probabilistic Models"),Oe.forEach(a),je=d(Fe," is by Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, Luc Van Gool."),Fe.forEach(a),ce=g(e),H=n(e,"P",{});var Ke=i(H);Je=d(Ke,"The abstract from the paper is:"),Ke.forEach(a),me=g(e),O=n(e,"P",{});var ea=i(O);ae=n(ea,"EM",{});var aa=i(ae);Ie=d(aa,`Free-form inpainting is the task of adding new content to an image in the regions specified by an arbitrary binary mask. Most existing approaches train for a certain distribution of masks, which limits their generalization capabilities to unseen mask types. Furthermore, training with pixel-wise and perceptual losses often leads to simple textural extensions towards the missing areas instead of semantically meaningful generation. In this work, we propose RePaint: A Denoising Diffusion Probabilistic Model (DDPM) based inpainting approach that is applicable to even extreme masks. We employ a pretrained unconditional DDPM as the generative prior. To condition the generation process, we only alter the reverse diffusion iterations by sampling the unmasked regions using the given image information. Since this technique does not modify or condition the original DDPM network itself, the model produces high-quality and diverse output images for any inpainting form. We validate our method for both faces and general-purpose image inpainting using standard and extreme masks.
RePaint outperforms state-of-the-art Autoregressive, and GAN approaches for at least five out of six mask distributions.`),aa.forEach(a),ea.forEach(a),de=g(e),G=n(e,"P",{});var we=i(G);ke=d(we,"The original codebase can be found at "),N=n(we,"A",{href:!0,rel:!0});var ta=i(N);Ue=d(ta,"andreas128/RePaint"),ta.forEach(a),Re=d(we,"."),we.forEach(a),ue=g(e),$(V.$$.fragment,e),he=g(e),I=n(e,"H2",{class:!0});var be=i(I);B=n(be,"A",{id:!0,class:!0,href:!0});var sa=i(B);te=n(sa,"SPAN",{});var na=i(te);$(A.$$.fragment,na),na.forEach(a),sa.forEach(a),$e=g(be),se=n(be,"SPAN",{});var ia=i(se);We=d(ia,"RePaintPipeline"),ia.forEach(a),be.forEach(a),fe=g(e),b=n(e,"DIV",{class:!0});var C=i(b);$(L.$$.fragment,C),Ze=g(C),ne=n(C,"P",{});var ra=i(ne);Ee=d(ra,"Pipeline for image inpainting using RePaint."),ra.forEach(a),xe=g(C),X=n(C,"P",{});var Me=i(X);Ge=d(Me,"This model inherits from "),K=n(Me,"A",{href:!0});var oa=i(K);Ve=d(oa,"DiffusionPipeline"),oa.forEach(a),Be=d(Me,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Me.forEach(a),De=g(C),T=n(C,"DIV",{class:!0});var ee=i(T);$(Y.$$.fragment,ee),Se=g(ee),ie=n(ee,"P",{});var la=i(ie);Ce=d(la,"The call function to the pipeline for generation."),la.forEach(a),Ne=g(ee),$(D.$$.fragment,ee),ee.forEach(a),C.forEach(a),ge=g(e),k=n(e,"H2",{class:!0});var ve=i(k);S=n(ve,"A",{id:!0,class:!0,href:!0});var pa=i(S);re=n(pa,"SPAN",{});var ca=i(re);$(F.$$.fragment,ca),ca.forEach(a),pa.forEach(a),Ae=g(ve),oe=n(ve,"SPAN",{});var ma=i(oe);Le=d(ma,"ImagePipelineOutput"),ma.forEach(a),ve.forEach(a),_e=g(e),U=n(e,"DIV",{class:!0});var Pe=i(U);$(z.$$.fragment,Pe),Xe=g(Pe),le=n(Pe,"P",{});var da=i(le);Ye=d(da,"Output class for image pipelines."),da.forEach(a),Pe.forEach(a),this.h()},h(){p(l,"name","hf:doc:metadata"),p(l,"content",JSON.stringify(ja)),p(h,"id","repaint"),p(h,"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"),p(h,"href","#repaint"),p(u,"class","relative group"),p(P,"href","https://huggingface.co/papers/2201.09865"),p(P,"rel","nofollow"),p(N,"href","https://github.com/andreas128/RePaint"),p(N,"rel","nofollow"),p(B,"id","diffusers.RePaintPipeline"),p(B,"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"),p(B,"href","#diffusers.RePaintPipeline"),p(I,"class","relative group"),p(K,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),p(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(S,"id","diffusers.ImagePipelineOutput"),p(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"),p(S,"href","#diffusers.ImagePipelineOutput"),p(k,"class","relative group"),p(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(e,o){t(document.head,l),c(e,M,o),c(e,u,o),t(u,h),t(h,_),W(r,_,null),t(u,y),t(u,j),t(j,J),c(e,w,o),c(e,v,o),t(v,P),t(P,Te),t(v,je),c(e,ce,o),c(e,H,o),t(H,Je),c(e,me,o),c(e,O,o),t(O,ae),t(ae,Ie),c(e,de,o),c(e,G,o),t(G,ke),t(G,N),t(N,Ue),t(G,Re),c(e,ue,o),W(V,e,o),c(e,he,o),c(e,I,o),t(I,B),t(B,te),W(A,te,null),t(I,$e),t(I,se),t(se,We),c(e,fe,o),c(e,b,o),W(L,b,null),t(b,Ze),t(b,ne),t(ne,Ee),t(b,xe),t(b,X),t(X,Ge),t(X,K),t(K,Ve),t(X,Be),t(b,De),t(b,T),W(Y,T,null),t(T,Se),t(T,ie),t(ie,Ce),t(T,Ne),W(D,T,null),c(e,ge,o),c(e,k,o),t(k,S),t(S,re),W(F,re,null),t(k,Ae),t(k,oe),t(oe,Le),c(e,_e,o),c(e,U,o),W(z,U,null),t(U,Xe),t(U,le),t(le,Ye),ye=!0},p(e,[o]){const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),V.$set(q);const pe={};o&2&&(pe.$$scope={dirty:o,ctx:e}),D.$set(pe)},i(e){ye||(Z(r.$$.fragment,e),Z(V.$$.fragment,e),Z(A.$$.fragment,e),Z(L.$$.fragment,e),Z(Y.$$.fragment,e),Z(D.$$.fragment,e),Z(F.$$.fragment,e),Z(z.$$.fragment,e),ye=!0)},o(e){E(r.$$.fragment,e),E(V.$$.fragment,e),E(A.$$.fragment,e),E(L.$$.fragment,e),E(Y.$$.fragment,e),E(D.$$.fragment,e),E(F.$$.fragment,e),E(z.$$.fragment,e),ye=!1},d(e){a(l),e&&a(M),e&&a(u),x(r),e&&a(w),e&&a(v),e&&a(ce),e&&a(H),e&&a(me),e&&a(O),e&&a(de),e&&a(G),e&&a(ue),x(V,e),e&&a(he),e&&a(I),x(A),e&&a(fe),e&&a(b),x(L),x(Y),x(D),e&&a(ge),e&&a(k),x(F),e&&a(_e),e&&a(U),x(z)}}}const ja={local:"repaint",sections:[{local:"diffusers.RePaintPipeline",title:"RePaintPipeline"},{local:"diffusers.ImagePipelineOutput",title:"ImagePipelineOutput"}],title:"RePaint"};function Ja(Q){return _a(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Za extends ua{constructor(l){super();ha(this,l,Ja,Ta,fa,{})}}export{Za as default,ja as metadata};
