import{s as xe,o as Te,n as we}from"../chunks/scheduler.8c3d61f6.js";import{S as Pe,i as Ie,g as p,s as i,r as u,A as $e,h as c,f as a,c as l,j as Y,u as g,x as $,k as N,y as M,a as n,v as h,d as _,t as b,w as y}from"../chunks/index.da70eac4.js";import{T as ve}from"../chunks/Tip.1d9b8c37.js";import{D as de}from"../chunks/Docstring.9419aa1d.js";import{C as Je}from"../chunks/CodeBlock.a9c4becf.js";import{E as Me}from"../chunks/ExampleCodeBlock.1b2603c3.js";import{H as oe,E as Ee}from"../chunks/getInferenceSnippets.39110341.js";function je(X){let s,w='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=w},l(r){s=c(r,"P",{"data-svelte-h":!0}),$(s)!=="svelte-1qn15hi"&&(s.innerHTML=w)},m(r,m){n(r,s,m)},p:we,d(r){r&&a(s)}}}function Be(X){let s,w="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=w,r=i(),u(m.$$.fragment)},l(o){s=c(o,"P",{"data-svelte-h":!0}),$(s)!=="svelte-11lpom8"&&(s.textContent=w),r=l(o),g(m.$$.fragment,o)},m(o,f){n(o,s,f),n(o,r,f),h(m,o,f),d=!0},p:we,i(o){d||(_(m.$$.fragment,o),d=!0)},o(o){b(m.$$.fragment,o),d=!1},d(o){o&&(a(s),a(r)),y(m,o)}}}function ke(X){let s,w,r,m,d,o,f,fe='<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.',z,E,ue="The abstract from the paper is:",O,j,ge="<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>",H,B,he='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>.',q,k,Q,W,_e='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.',A,v,K,S,ee,T,L,re,x,U,pe,F,be="The call function to the pipeline for generation.",ce,J,te,G,ae,P,Z,me,V,ye="Output class for Stable Diffusion pipelines.",ne,C,se,R,ie;return d=new oe({props:{title:"Paint by Example",local:"paint-by-example",headingTag:"h1"}}),k=new oe({props:{title:"Tips",local:"tips",headingTag:"h2"}}),v=new ve({props:{$$slots:{default:[je]},$$scope:{ctx:X}}}),S=new oe({props:{title:"PaintByExamplePipeline",local:"diffusers.PaintByExamplePipeline",headingTag:"h2"}}),L=new de({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"}}),U=new de({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/upscale#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/upscale#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/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),J=new Me({props:{anchor:"diffusers.PaintByExamplePipeline.__call__.example",$$slots:{default:[Be]},$$scope:{ctx:X}}}),G=new oe({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),Z=new de({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#L10"}}),C=new Ee({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/paint_by_example.md"}}),{c(){s=p("meta"),w=i(),r=p("p"),m=i(),u(d.$$.fragment),o=i(),f=p("p"),f.innerHTML=fe,z=i(),E=p("p"),E.textContent=ue,O=i(),j=p("p"),j.innerHTML=ge,H=i(),B=p("p"),B.innerHTML=he,q=i(),u(k.$$.fragment),Q=i(),W=p("p"),W.innerHTML=_e,A=i(),u(v.$$.fragment),K=i(),u(S.$$.fragment),ee=i(),T=p("div"),u(L.$$.fragment),re=i(),x=p("div"),u(U.$$.fragment),pe=i(),F=p("p"),F.textContent=be,ce=i(),u(J.$$.fragment),te=i(),u(G.$$.fragment),ae=i(),P=p("div"),u(Z.$$.fragment),me=i(),V=p("p"),V.textContent=ye,ne=i(),u(C.$$.fragment),se=i(),R=p("p"),this.h()},l(e){const t=$e("svelte-u9bgzb",document.head);s=c(t,"META",{name:!0,content:!0}),t.forEach(a),w=l(e),r=c(e,"P",{}),Y(r).forEach(a),m=l(e),g(d.$$.fragment,e),o=l(e),f=c(e,"P",{"data-svelte-h":!0}),$(f)!=="svelte-18m3poz"&&(f.innerHTML=fe),z=l(e),E=c(e,"P",{"data-svelte-h":!0}),$(E)!=="svelte-1cwsb16"&&(E.textContent=ue),O=l(e),j=c(e,"P",{"data-svelte-h":!0}),$(j)!=="svelte-cwxbih"&&(j.innerHTML=ge),H=l(e),B=c(e,"P",{"data-svelte-h":!0}),$(B)!=="svelte-1pp3j5k"&&(B.innerHTML=he),q=l(e),g(k.$$.fragment,e),Q=l(e),W=c(e,"P",{"data-svelte-h":!0}),$(W)!=="svelte-170d2m8"&&(W.innerHTML=_e),A=l(e),g(v.$$.fragment,e),K=l(e),g(S.$$.fragment,e),ee=l(e),T=c(e,"DIV",{class:!0});var D=Y(T);g(L.$$.fragment,D),re=l(D),x=c(D,"DIV",{class:!0});var I=Y(x);g(U.$$.fragment,I),pe=l(I),F=c(I,"P",{"data-svelte-h":!0}),$(F)!=="svelte-50j04k"&&(F.textContent=be),ce=l(I),g(J.$$.fragment,I),I.forEach(a),D.forEach(a),te=l(e),g(G.$$.fragment,e),ae=l(e),P=c(e,"DIV",{class:!0});var le=Y(P);g(Z.$$.fragment,le),me=l(le),V=c(le,"P",{"data-svelte-h":!0}),$(V)!=="svelte-1qpjiuf"&&(V.textContent=ye),le.forEach(a),ne=l(e),g(C.$$.fragment,e),se=l(e),R=c(e,"P",{}),Y(R).forEach(a),this.h()},h(){N(s,"name","hf:doc:metadata"),N(s,"content",We),N(x,"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,w,t),n(e,r,t),n(e,m,t),h(d,e,t),n(e,o,t),n(e,f,t),n(e,z,t),n(e,E,t),n(e,O,t),n(e,j,t),n(e,H,t),n(e,B,t),n(e,q,t),h(k,e,t),n(e,Q,t),n(e,W,t),n(e,A,t),h(v,e,t),n(e,K,t),h(S,e,t),n(e,ee,t),n(e,T,t),h(L,T,null),M(T,re),M(T,x),h(U,x,null),M(x,pe),M(x,F),M(x,ce),h(J,x,null),n(e,te,t),h(G,e,t),n(e,ae,t),n(e,P,t),h(Z,P,null),M(P,me),M(P,V),n(e,ne,t),h(C,e,t),n(e,se,t),n(e,R,t),ie=!0},p(e,[t]){const D={};t&2&&(D.$$scope={dirty:t,ctx:e}),v.$set(D);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),J.$set(I)},i(e){ie||(_(d.$$.fragment,e),_(k.$$.fragment,e),_(v.$$.fragment,e),_(S.$$.fragment,e),_(L.$$.fragment,e),_(U.$$.fragment,e),_(J.$$.fragment,e),_(G.$$.fragment,e),_(Z.$$.fragment,e),_(C.$$.fragment,e),ie=!0)},o(e){b(d.$$.fragment,e),b(k.$$.fragment,e),b(v.$$.fragment,e),b(S.$$.fragment,e),b(L.$$.fragment,e),b(U.$$.fragment,e),b(J.$$.fragment,e),b(G.$$.fragment,e),b(Z.$$.fragment,e),b(C.$$.fragment,e),ie=!1},d(e){e&&(a(w),a(r),a(m),a(o),a(f),a(z),a(E),a(O),a(j),a(H),a(B),a(q),a(Q),a(W),a(A),a(K),a(ee),a(T),a(te),a(ae),a(P),a(ne),a(se),a(R)),a(s),y(d,e),y(k,e),y(v,e),y(S,e),y(L),y(U),y(J),y(G,e),y(Z),y(C,e)}}}const We='{"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 Se(X){return Te(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fe extends Pe{constructor(s){super(),Ie(this,s,Se,ke,xe,{})}}export{Fe as component};
