import{s as Me,o as Je,n as $e}from"../chunks/scheduler.53228c21.js";import{S as Ee,i as je,e as p,s,c as d,h as Be,a as r,d as a,b as i,f as O,j as w,g as u,k as V,l as M,m as n,n as f,t as g,o as h,p as _}from"../chunks/index.100fac89.js";import{C as ke}from"../chunks/CopyLLMTxtMenu.494046bd.js";import{D as _e}from"../chunks/Docstring.9bbf7d33.js";import{C as We}from"../chunks/CodeBlock.d30a6509.js";import{E as Le}from"../chunks/ExampleCodeBlock.a8b00edf.js";import{H as de,E as Se}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8999c127.js";function Ue(q){let l,J="Example:",b,m,c;return m=new We({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(){l=p("p"),l.textContent=J,b=s(),d(m.$$.fragment)},l(o){l=r(o,"P",{"data-svelte-h":!0}),w(l)!=="svelte-11lpom8"&&(l.textContent=J),b=i(o),u(m.$$.fragment,o)},m(o,P){n(o,l,P),n(o,b,P),f(m,o,P),c=!0},p:$e,i(o){c||(g(m.$$.fragment,o),c=!0)},o(o){h(m.$$.fragment,o),c=!1},d(o){o&&(a(l),a(b)),_(m,o)}}}function Ce(q){let l,J,b,m,c,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>",P,$,H,E,Q,j,be='<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.',A,B,ye="The abstract from the paper is:",K,k,we="<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>",ee,W,xe='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>.',te,L,ae,S,Te='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.',ne,I,Pe='<p>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.</p>',se,U,ie,x,C,ue,y,G,fe,R,Ie="The call function to the pipeline for generation.",ge,v,le,Z,oe,T,D,he,Y,ve="Output class for Stable Diffusion pipelines.",pe,X,re,z,ce;return $=new ke({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),E=new de({props:{title:"Paint by Example",local:"paint-by-example",headingTag:"h1"}}),L=new de({props:{title:"Tips",local:"tips",headingTag:"h2"}}),U=new de({props:{title:"PaintByExamplePipeline",local:"diffusers.PaintByExamplePipeline",headingTag:"h2"}}),C=new _e({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 _e({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/depth2img#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#L397",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/depth2img#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/depth2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),v=new Le({props:{anchor:"diffusers.PaintByExamplePipeline.__call__.example",$$slots:{default:[Ue]},$$scope:{ctx:q}}}),Z=new de({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),D=new _e({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 Se({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/paint_by_example.md"}}),{c(){l=p("meta"),J=s(),b=p("p"),m=s(),c=p("blockquote"),c.innerHTML=o,P=s(),d($.$$.fragment),H=s(),d(E.$$.fragment),Q=s(),j=p("p"),j.innerHTML=be,A=s(),B=p("p"),B.textContent=ye,K=s(),k=p("p"),k.innerHTML=we,ee=s(),W=p("p"),W.innerHTML=xe,te=s(),d(L.$$.fragment),ae=s(),S=p("p"),S.innerHTML=Te,ne=s(),I=p("blockquote"),I.innerHTML=Pe,se=s(),d(U.$$.fragment),ie=s(),x=p("div"),d(C.$$.fragment),ue=s(),y=p("div"),d(G.$$.fragment),fe=s(),R=p("p"),R.textContent=Ie,ge=s(),d(v.$$.fragment),le=s(),d(Z.$$.fragment),oe=s(),T=p("div"),d(D.$$.fragment),he=s(),Y=p("p"),Y.textContent=ve,pe=s(),d(X.$$.fragment),re=s(),z=p("p"),this.h()},l(e){const t=Be("svelte-u9bgzb",document.head);l=r(t,"META",{name:!0,content:!0}),t.forEach(a),J=i(e),b=r(e,"P",{}),O(b).forEach(a),m=i(e),c=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),w(c)!=="svelte-124tjg"&&(c.innerHTML=o),P=i(e),u($.$$.fragment,e),H=i(e),u(E.$$.fragment,e),Q=i(e),j=r(e,"P",{"data-svelte-h":!0}),w(j)!=="svelte-18m3poz"&&(j.innerHTML=be),A=i(e),B=r(e,"P",{"data-svelte-h":!0}),w(B)!=="svelte-1cwsb16"&&(B.textContent=ye),K=i(e),k=r(e,"P",{"data-svelte-h":!0}),w(k)!=="svelte-cwxbih"&&(k.innerHTML=we),ee=i(e),W=r(e,"P",{"data-svelte-h":!0}),w(W)!=="svelte-1pp3j5k"&&(W.innerHTML=xe),te=i(e),u(L.$$.fragment,e),ae=i(e),S=r(e,"P",{"data-svelte-h":!0}),w(S)!=="svelte-170d2m8"&&(S.innerHTML=Te),ne=i(e),I=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),w(I)!=="svelte-r1jcqf"&&(I.innerHTML=Pe),se=i(e),u(U.$$.fragment,e),ie=i(e),x=r(e,"DIV",{class:!0});var F=O(x);u(C.$$.fragment,F),ue=i(F),y=r(F,"DIV",{class:!0});var N=O(y);u(G.$$.fragment,N),fe=i(N),R=r(N,"P",{"data-svelte-h":!0}),w(R)!=="svelte-50j04k"&&(R.textContent=Ie),ge=i(N),u(v.$$.fragment,N),N.forEach(a),F.forEach(a),le=i(e),u(Z.$$.fragment,e),oe=i(e),T=r(e,"DIV",{class:!0});var me=O(T);u(D.$$.fragment,me),he=i(me),Y=r(me,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-1qpjiuf"&&(Y.textContent=ve),me.forEach(a),pe=i(e),u(X.$$.fragment,e),re=i(e),z=r(e,"P",{}),O(z).forEach(a),this.h()},h(){V(l,"name","hf:doc:metadata"),V(l,"content",Ge),V(c,"class","warning"),V(I,"class","tip"),V(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(T,"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,l),n(e,J,t),n(e,b,t),n(e,m,t),n(e,c,t),n(e,P,t),f($,e,t),n(e,H,t),f(E,e,t),n(e,Q,t),n(e,j,t),n(e,A,t),n(e,B,t),n(e,K,t),n(e,k,t),n(e,ee,t),n(e,W,t),n(e,te,t),f(L,e,t),n(e,ae,t),n(e,S,t),n(e,ne,t),n(e,I,t),n(e,se,t),f(U,e,t),n(e,ie,t),n(e,x,t),f(C,x,null),M(x,ue),M(x,y),f(G,y,null),M(y,fe),M(y,R),M(y,ge),f(v,y,null),n(e,le,t),f(Z,e,t),n(e,oe,t),n(e,T,t),f(D,T,null),M(T,he),M(T,Y),n(e,pe,t),f(X,e,t),n(e,re,t),n(e,z,t),ce=!0},p(e,[t]){const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),v.$set(F)},i(e){ce||(g($.$$.fragment,e),g(E.$$.fragment,e),g(L.$$.fragment,e),g(U.$$.fragment,e),g(C.$$.fragment,e),g(G.$$.fragment,e),g(v.$$.fragment,e),g(Z.$$.fragment,e),g(D.$$.fragment,e),g(X.$$.fragment,e),ce=!0)},o(e){h($.$$.fragment,e),h(E.$$.fragment,e),h(L.$$.fragment,e),h(U.$$.fragment,e),h(C.$$.fragment,e),h(G.$$.fragment,e),h(v.$$.fragment,e),h(Z.$$.fragment,e),h(D.$$.fragment,e),h(X.$$.fragment,e),ce=!1},d(e){e&&(a(J),a(b),a(m),a(c),a(P),a(H),a(Q),a(j),a(A),a(B),a(K),a(k),a(ee),a(W),a(te),a(ae),a(S),a(ne),a(I),a(se),a(ie),a(x),a(le),a(oe),a(T),a(pe),a(re),a(z)),a(l),_($,e),_(E,e),_(L,e),_(U,e),_(C),_(G),_(v),_(Z,e),_(D),_(X,e)}}}const Ge='{"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 Ze(q){return Je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ze extends Ee{constructor(l){super(),je(this,l,Ze,Ce,Me,{})}}export{ze as component};
