import{s as Ie,o as $e,n as Pe}from"../chunks/scheduler.8c3d61f6.js";import{S as ve,i as Je,g as p,s as i,r as u,A as Me,h as c,f as a,c as l,j as H,x,u as f,k as N,y as M,a as n,v as g,d as h,t as _,w as b}from"../chunks/index.da70eac4.js";import{T as Ee}from"../chunks/Tip.6f698f24.js";import{D as ge}from"../chunks/Docstring.367be9ed.js";import{C as je}from"../chunks/CodeBlock.a9c4becf.js";import{E as Be}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as ce,E as ke}from"../chunks/getInferenceSnippets.cb466318.js";function We(V){let s,y='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){s=p("p"),s.innerHTML=y},l(r){s=c(r,"P",{"data-svelte-h":!0}),x(s)!=="svelte-1qn15hi"&&(s.innerHTML=y)},m(r,m){n(r,s,m)},p:Pe,d(r){r&&a(s)}}}function Se(V){let s,y="Example:",r,m,d;return m=new je({props:{code:"aW1wb3J0JTIwUElMJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBpbyUyMGltcG9ydCUyMEJ5dGVzSU8lMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwUGFpbnRCeUV4YW1wbGVQaXBlbGluZSUwQSUwQSUwQWRlZiUyMGRvd25sb2FkX2ltYWdlKHVybCklM0ElMEElMjAlMjAlMjAlMjByZXNwb25zZSUyMCUzRCUyMHJlcXVlc3RzLmdldCh1cmwpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwUElMLkltYWdlLm9wZW4oQnl0ZXNJTyhyZXNwb25zZS5jb250ZW50KSkuY29udmVydCglMjJSR0IlMjIpJTBBJTBBJTBBaW1nX3VybCUyMCUzRCUyMCglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZGYW50YXN5LVN0dWRpbyUyRlBhaW50LWJ5LUV4YW1wbGUlMkZtYWluJTJGZXhhbXBsZXMlMkZpbWFnZSUyRmV4YW1wbGVfMS5wbmclMjIlMEEpJTBBbWFza191cmwlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGRmFudGFzeS1TdHVkaW8lMkZQYWludC1ieS1FeGFtcGxlJTJGbWFpbiUyRmV4YW1wbGVzJTJGbWFzayUyRmV4YW1wbGVfMS5wbmclMjIlMEEpJTBBZXhhbXBsZV91cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZGYW50YXN5LVN0dWRpbyUyRlBhaW50LWJ5LUV4YW1wbGUlMkZtYWluJTJGZXhhbXBsZXMlMkZyZWZlcmVuY2UlMkZleGFtcGxlXzEuanBnJTIyJTBBJTBBaW5pdF9pbWFnZSUyMCUzRCUyMGRvd25sb2FkX2ltYWdlKGltZ191cmwpLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSklMEFtYXNrX2ltYWdlJTIwJTNEJTIwZG93bmxvYWRfaW1hZ2UobWFza191cmwpLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSklMEFleGFtcGxlX2ltYWdlJTIwJTNEJTIwZG93bmxvYWRfaW1hZ2UoZXhhbXBsZV91cmwpLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSklMEElMEFwaXBlJTIwJTNEJTIwUGFpbnRCeUV4YW1wbGVQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyRmFudGFzeS1TdHVkaW8lMkZQYWludC1ieS1FeGFtcGxlJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGUlMjAlM0QlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKGltYWdlJTNEaW5pdF9pbWFnZSUyQyUyMG1hc2tfaW1hZ2UlM0RtYXNrX2ltYWdlJTJDJTIwZXhhbXBsZV9pbWFnZSUzRGV4YW1wbGVfaW1hZ2UpLmltYWdlcyU1QjAlNUQlMEFpbWFnZQ==",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> PaintByExamplePipeline


<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-meta">... </span>    <span class="hljs-string">&quot;https://raw.githubusercontent.com/Fantasy-Studio/Paint-by-Example/main/examples/image/example_1.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_url = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://raw.githubusercontent.com/Fantasy-Studio/Paint-by-Example/main/examples/mask/example_1.png&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/Fantasy-Studio/Paint-by-Example/main/examples/reference/example_1.jpg&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>example_image = download_image(example_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = PaintByExamplePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Fantasy-Studio/Paint-by-Example&quot;</span>,
<span class="hljs-meta">... </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>image = pipe(image=init_image, mask_image=mask_image, example_image=example_image).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image`,wrap:!1}}),{c(){s=p("p"),s.textContent=y,r=i(),u(m.$$.fragment)},l(o){s=c(o,"P",{"data-svelte-h":!0}),x(s)!=="svelte-11lpom8"&&(s.textContent=y),r=l(o),f(m.$$.fragment,o)},m(o,$){n(o,s,$),n(o,r,$),g(m,o,$),d=!0},p:Pe,i(o){d||(h(m.$$.fragment,o),d=!0)},o(o){_(m.$$.fragment,o),d=!1},d(o){o&&(a(s),a(r)),b(m,o)}}}function Le(V){let s,y,r,m,d,o="<p>This pipeline is deprecated but it can still be used. However, we won’t test the pipeline anymore and won’t accept any changes to it. If you run into any issues, reinstall the last Diffusers version that supported this model.</p>",$,E,O,j,he='<a href="https://huggingface.co/papers/2211.13227" rel="nofollow">Paint by Example: Exemplar-based Image Editing with Diffusion Models</a> is by Binxin Yang, Shuyang Gu, Bo Zhang, Ting Zhang, Xuejin Chen, Xiaoyan Sun, Dong Chen, Fang Wen.',q,B,_e="The abstract from the paper is:",Q,k,be="<em>Language-guided image editing has achieved great success recently. In this paper, for the first time, we investigate exemplar-guided image editing for more precise control. We achieve this goal by leveraging self-supervised training to disentangle and re-organize the source image and the exemplar. However, the naive approach will cause obvious fusing artifacts. We carefully analyze it and propose an information bottleneck and strong augmentations to avoid the trivial solution of directly copying and pasting the exemplar image. Meanwhile, to ensure the controllability of the editing process, we design an arbitrary shape mask for the exemplar image and leverage the classifier-free guidance to increase the similarity to the exemplar image. The whole framework involves a single forward of the diffusion model without any iterative optimization. We demonstrate that our method achieves an impressive performance and enables controllable editing on in-the-wild images with high fidelity.</em>",A,W,ye='The original codebase can be found at <a href="https://github.com/Fantasy-Studio/Paint-by-Example" rel="nofollow">Fantasy-Studio/Paint-by-Example</a>, and you can try it out in a <a href="https://huggingface.co/spaces/Fantasy-Studio/Paint-by-Example" rel="nofollow">demo</a>.',K,S,ee,L,we='Paint by Example is supported by the official <a href="https://huggingface.co/Fantasy-Studio/Paint-by-Example" rel="nofollow">Fantasy-Studio/Paint-by-Example</a> checkpoint. The checkpoint is warm-started from <a href="https://huggingface.co/CompVis/stable-diffusion-v1-4" rel="nofollow">CompVis/stable-diffusion-v1-4</a> to inpaint partly masked images conditioned on example and reference images.',te,v,ae,U,ne,T,C,me,w,G,de,R,xe="The call function to the pipeline for generation.",ue,J,se,Z,ie,P,D,fe,Y,Te="Output class for Stable Diffusion pipelines.",le,X,oe,z,re;return E=new ce({props:{title:"Paint by Example",local:"paint-by-example",headingTag:"h1"}}),S=new ce({props:{title:"Tips",local:"tips",headingTag:"h2"}}),v=new Ee({props:{$$slots:{default:[We]},$$scope:{ctx:V}}}),U=new ce({props:{title:"PaintByExamplePipeline",local:"diffusers.PaintByExamplePipeline",headingTag:"h2"}}),C=new ge({props:{name:"class diffusers.PaintByExamplePipeline",anchor:"diffusers.PaintByExamplePipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"image_encoder",val:": PaintByExampleImageEncoder"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim.DDIMScheduler, diffusers.schedulers.scheduling_pndm.PNDMScheduler, diffusers.schedulers.scheduling_lms_discrete.LMSDiscreteScheduler]"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = False"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py#L158"}}),G=new ge({props:{name:"__call__",anchor:"diffusers.PaintByExamplePipeline.__call__",parameters:[{name:"example_image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{name:"mask_image",val:": typing.Union[torch.Tensor, PIL.Image.Image]"},{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 = 5.0"},{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.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Optional[typing.Callable[[int, int, torch.Tensor], NoneType]] = None"},{name:"callback_steps",val:": int = 1"}],parametersDescription:[{anchor:"diffusers.PaintByExamplePipeline.__call__.example_image",description:`<strong>example_image</strong> (<code>torch.Tensor</code> or <code>PIL.Image.Image</code> or <code>List[PIL.Image.Image]</code>) &#x2014;
An example image to guide image generation.`,name:"example_image"},{anchor:"diffusers.PaintByExamplePipeline.__call__.image",description:`<strong>image</strong> (<code>torch.Tensor</code> or <code>PIL.Image.Image</code> or <code>List[PIL.Image.Image]</code>) &#x2014;
<code>Image</code> or tensor representing an image batch to be inpainted (parts of the image are masked out with
<code>mask_image</code> and repainted according to <code>prompt</code>).`,name:"image"},{anchor:"diffusers.PaintByExamplePipeline.__call__.mask_image",description:`<strong>mask_image</strong> (<code>torch.Tensor</code> or <code>PIL.Image.Image</code> or <code>List[PIL.Image.Image]</code>) &#x2014;
<code>Image</code> or tensor representing an image batch to mask <code>image</code>. White pixels in the mask are repainted,
while black pixels are preserved. If <code>mask_image</code> is a PIL image, it is converted to a single channel
(luminance) before use. If it&#x2019;s a 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.PaintByExamplePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.PaintByExamplePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.PaintByExamplePipeline.__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.PaintByExamplePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.PaintByExamplePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.PaintByExamplePipeline.__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.PaintByExamplePipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">DDIM</a> paper. Only
applies to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.PaintByExamplePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.PaintByExamplePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.PaintByExamplePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>PIL.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.PaintByExamplePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.PaintByExamplePipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.Tensor)</code>.`,name:"callback"},{anchor:"diffusers.PaintByExamplePipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function is called. If not specified, the callback is called at
every step.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py#L401",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
“not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),J=new Be({props:{anchor:"diffusers.PaintByExamplePipeline.__call__.example",$$slots:{default:[Se]},$$scope:{ctx:V}}}),Z=new ce({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),D=new ge({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>List[bool]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_output.py#L11"}}),X=new ke({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/paint_by_example.md"}}),{c(){s=p("meta"),y=i(),r=p("p"),m=i(),d=p("blockquote"),d.innerHTML=o,$=i(),u(E.$$.fragment),O=i(),j=p("p"),j.innerHTML=he,q=i(),B=p("p"),B.textContent=_e,Q=i(),k=p("p"),k.innerHTML=be,A=i(),W=p("p"),W.innerHTML=ye,K=i(),u(S.$$.fragment),ee=i(),L=p("p"),L.innerHTML=we,te=i(),u(v.$$.fragment),ae=i(),u(U.$$.fragment),ne=i(),T=p("div"),u(C.$$.fragment),me=i(),w=p("div"),u(G.$$.fragment),de=i(),R=p("p"),R.textContent=xe,ue=i(),u(J.$$.fragment),se=i(),u(Z.$$.fragment),ie=i(),P=p("div"),u(D.$$.fragment),fe=i(),Y=p("p"),Y.textContent=Te,le=i(),u(X.$$.fragment),oe=i(),z=p("p"),this.h()},l(e){const t=Me("svelte-u9bgzb",document.head);s=c(t,"META",{name:!0,content:!0}),t.forEach(a),y=l(e),r=c(e,"P",{}),H(r).forEach(a),m=l(e),d=c(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),x(d)!=="svelte-124tjg"&&(d.innerHTML=o),$=l(e),f(E.$$.fragment,e),O=l(e),j=c(e,"P",{"data-svelte-h":!0}),x(j)!=="svelte-18m3poz"&&(j.innerHTML=he),q=l(e),B=c(e,"P",{"data-svelte-h":!0}),x(B)!=="svelte-1cwsb16"&&(B.textContent=_e),Q=l(e),k=c(e,"P",{"data-svelte-h":!0}),x(k)!=="svelte-cwxbih"&&(k.innerHTML=be),A=l(e),W=c(e,"P",{"data-svelte-h":!0}),x(W)!=="svelte-1pp3j5k"&&(W.innerHTML=ye),K=l(e),f(S.$$.fragment,e),ee=l(e),L=c(e,"P",{"data-svelte-h":!0}),x(L)!=="svelte-170d2m8"&&(L.innerHTML=we),te=l(e),f(v.$$.fragment,e),ae=l(e),f(U.$$.fragment,e),ne=l(e),T=c(e,"DIV",{class:!0});var F=H(T);f(C.$$.fragment,F),me=l(F),w=c(F,"DIV",{class:!0});var I=H(w);f(G.$$.fragment,I),de=l(I),R=c(I,"P",{"data-svelte-h":!0}),x(R)!=="svelte-50j04k"&&(R.textContent=xe),ue=l(I),f(J.$$.fragment,I),I.forEach(a),F.forEach(a),se=l(e),f(Z.$$.fragment,e),ie=l(e),P=c(e,"DIV",{class:!0});var pe=H(P);f(D.$$.fragment,pe),fe=l(pe),Y=c(pe,"P",{"data-svelte-h":!0}),x(Y)!=="svelte-1qpjiuf"&&(Y.textContent=Te),pe.forEach(a),le=l(e),f(X.$$.fragment,e),oe=l(e),z=c(e,"P",{}),H(z).forEach(a),this.h()},h(){N(s,"name","hf:doc:metadata"),N(s,"content",Ue),N(d,"class","warning"),N(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){M(document.head,s),n(e,y,t),n(e,r,t),n(e,m,t),n(e,d,t),n(e,$,t),g(E,e,t),n(e,O,t),n(e,j,t),n(e,q,t),n(e,B,t),n(e,Q,t),n(e,k,t),n(e,A,t),n(e,W,t),n(e,K,t),g(S,e,t),n(e,ee,t),n(e,L,t),n(e,te,t),g(v,e,t),n(e,ae,t),g(U,e,t),n(e,ne,t),n(e,T,t),g(C,T,null),M(T,me),M(T,w),g(G,w,null),M(w,de),M(w,R),M(w,ue),g(J,w,null),n(e,se,t),g(Z,e,t),n(e,ie,t),n(e,P,t),g(D,P,null),M(P,fe),M(P,Y),n(e,le,t),g(X,e,t),n(e,oe,t),n(e,z,t),re=!0},p(e,[t]){const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),v.$set(F);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),J.$set(I)},i(e){re||(h(E.$$.fragment,e),h(S.$$.fragment,e),h(v.$$.fragment,e),h(U.$$.fragment,e),h(C.$$.fragment,e),h(G.$$.fragment,e),h(J.$$.fragment,e),h(Z.$$.fragment,e),h(D.$$.fragment,e),h(X.$$.fragment,e),re=!0)},o(e){_(E.$$.fragment,e),_(S.$$.fragment,e),_(v.$$.fragment,e),_(U.$$.fragment,e),_(C.$$.fragment,e),_(G.$$.fragment,e),_(J.$$.fragment,e),_(Z.$$.fragment,e),_(D.$$.fragment,e),_(X.$$.fragment,e),re=!1},d(e){e&&(a(y),a(r),a(m),a(d),a($),a(O),a(j),a(q),a(B),a(Q),a(k),a(A),a(W),a(K),a(ee),a(L),a(te),a(ae),a(ne),a(T),a(se),a(ie),a(P),a(le),a(oe),a(z)),a(s),b(E,e),b(S,e),b(v,e),b(U,e),b(C),b(G),b(J),b(Z,e),b(D),b(X,e)}}}const Ue='{"title":"Paint by Example","local":"paint-by-example","sections":[{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"PaintByExamplePipeline","local":"diffusers.PaintByExamplePipeline","sections":[],"depth":2},{"title":"StableDiffusionPipelineOutput","local":"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput","sections":[],"depth":2}],"depth":1}';function Ce(V){return $e(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ye extends ve{constructor(s){super(),Je(this,s,Ce,Le,Ie,{})}}export{Ye as component};
