import{s as Ee,o as Je,n as _e}from"../chunks/scheduler.182ea377.js";import{S as ke,i as Be,g as p,s as o,r as y,A as je,h as c,f as a,c as l,j as A,u as x,x as _,k as H,y as g,a as s,v as w,d as P,t as T,w as v}from"../chunks/index.abf12888.js";import{T as Ie}from"../chunks/Tip.230e2334.js";import{D as he}from"../chunks/Docstring.93f6f462.js";import{C as Se}from"../chunks/CodeBlock.57fe6e13.js";import{E as Ce}from"../chunks/ExampleCodeBlock.658f5cd6.js";import{H as re}from"../chunks/Heading.16916d63.js";function We(E){let n,f='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-components-across-pipelines">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){n=p("p"),n.innerHTML=f},l(i){n=c(i,"P",{"data-svelte-h":!0}),_(n)!=="svelte-1wmc0l4"&&(n.innerHTML=f)},m(i,d){s(i,n,d)},p:_e,d(i){i&&a(n)}}}function Le(E){let n,f="🧪 This is an experimental feature!";return{c(){n=p("p"),n.textContent=f},l(i){n=c(i,"P",{"data-svelte-h":!0}),_(n)!=="svelte-15q3ih4"&&(n.textContent=f)},m(i,d){s(i,n,d)},p:_e,d(i){i&&a(n)}}}function Ue(E){let n,f="Example:",i,d,h;return d=new Se({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(){n=p("p"),n.textContent=f,i=o(),y(d.$$.fragment)},l(r){n=c(r,"P",{"data-svelte-h":!0}),_(n)!=="svelte-11lpom8"&&(n.textContent=f),i=l(r),x(d.$$.fragment,r)},m(r,b){s(r,n,b),s(r,i,b),w(d,r,b),h=!0},p:_e,i(r){h||(P(d.$$.fragment,r),h=!0)},o(r){T(d.$$.fragment,r),h=!1},d(r){r&&(a(n),a(i)),v(d,r)}}}function Ze(E){let n,f,i,d,h,r,b,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.',O,j,ye="The abstract from the paper is:",q,S,xe="<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>",Q,C,we='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,W,ee,L,Pe='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,J,ae,U,ne,m,Z,pe,k,ce,V,Te="Pipeline for image-guided image inpainting using Stable Diffusion.",de,z,ve=`This model inherits from <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,me,$,D,fe,R,$e="The call function to the pipeline for generation.",ue,B,se,G,ie,M,F,ge,Y,Me="Output class for Stable Diffusion pipelines.",oe,N,le;return h=new re({props:{title:"Paint by Example",local:"paint-by-example",headingTag:"h1"}}),W=new re({props:{title:"Tips",local:"tips",headingTag:"h2"}}),J=new Ie({props:{$$slots:{default:[We]},$$scope:{ctx:E}}}),U=new re({props:{title:"PaintByExamplePipeline",local:"diffusers.PaintByExamplePipeline",headingTag:"h2"}}),Z=new he({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:": Union"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.PaintByExamplePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.PaintByExamplePipeline.image_encoder",description:`<strong>image_encoder</strong> (<code>PaintByExampleImageEncoder</code>) &#x2014;
Encodes the example input image. The <code>unet</code> is conditioned on the example image instead of a text prompt.`,name:"image_encoder"},{anchor:"diffusers.PaintByExamplePipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.PaintByExamplePipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <code>UNet2DConditionModel</code> to denoise the encoded image latents.`,name:"unet"},{anchor:"diffusers.PaintByExamplePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.PaintByExamplePipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.PaintByExamplePipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py#L151"}}),k=new Ie({props:{warning:!0,$$slots:{default:[Le]},$$scope:{ctx:E}}}),D=new he({props:{name:"__call__",anchor:"diffusers.PaintByExamplePipeline.__call__",parameters:[{name:"example_image",val:": Union"},{name:"image",val:": Union"},{name:"mask_image",val:": Union"},{name:"height",val:": Optional = None"},{name:"width",val:": Optional = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": Union = None"},{name:"num_images_per_prompt",val:": Optional = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": Union = None"},{name:"latents",val:": Optional = None"},{name:"output_type",val:": Optional = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": Optional = None"},{name:"callback_steps",val:": int = 1"}],parametersDescription:[{anchor:"diffusers.PaintByExamplePipeline.__call__.example_image",description:`<strong>example_image</strong> (<code>torch.FloatTensor</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.FloatTensor</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.FloatTensor</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://arxiv.org/abs/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.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor 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.FloatTensor)</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#L388",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>
`}}),B=new Ce({props:{anchor:"diffusers.PaintByExamplePipeline.__call__.example",$$slots:{default:[Ue]},$$scope:{ctx:E}}}),G=new re({props:{title:"StableDiffusionPipelineOutput",local:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",headingTag:"h2"}}),F=new he({props:{name:"class diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",anchor:"diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput",parameters:[{name:"images",val:": Union"},{name:"nsfw_content_detected",val:": Optional"}],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(){n=p("meta"),f=o(),i=p("p"),d=o(),y(h.$$.fragment),r=o(),b=p("p"),b.innerHTML=be,O=o(),j=p("p"),j.textContent=ye,q=o(),S=p("p"),S.innerHTML=xe,Q=o(),C=p("p"),C.innerHTML=we,K=o(),y(W.$$.fragment),ee=o(),L=p("p"),L.innerHTML=Pe,te=o(),y(J.$$.fragment),ae=o(),y(U.$$.fragment),ne=o(),m=p("div"),y(Z.$$.fragment),pe=o(),y(k.$$.fragment),ce=o(),V=p("p"),V.textContent=Te,de=o(),z=p("p"),z.innerHTML=ve,me=o(),$=p("div"),y(D.$$.fragment),fe=o(),R=p("p"),R.textContent=$e,ue=o(),y(B.$$.fragment),se=o(),y(G.$$.fragment),ie=o(),M=p("div"),y(F.$$.fragment),ge=o(),Y=p("p"),Y.textContent=Me,oe=o(),N=p("p"),this.h()},l(e){const t=je("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(a),f=l(e),i=c(e,"P",{}),A(i).forEach(a),d=l(e),x(h.$$.fragment,e),r=l(e),b=c(e,"P",{"data-svelte-h":!0}),_(b)!=="svelte-18m3poz"&&(b.innerHTML=be),O=l(e),j=c(e,"P",{"data-svelte-h":!0}),_(j)!=="svelte-1cwsb16"&&(j.textContent=ye),q=l(e),S=c(e,"P",{"data-svelte-h":!0}),_(S)!=="svelte-cwxbih"&&(S.innerHTML=xe),Q=l(e),C=c(e,"P",{"data-svelte-h":!0}),_(C)!=="svelte-1pp3j5k"&&(C.innerHTML=we),K=l(e),x(W.$$.fragment,e),ee=l(e),L=c(e,"P",{"data-svelte-h":!0}),_(L)!=="svelte-170d2m8"&&(L.innerHTML=Pe),te=l(e),x(J.$$.fragment,e),ae=l(e),x(U.$$.fragment,e),ne=l(e),m=c(e,"DIV",{class:!0});var u=A(m);x(Z.$$.fragment,u),pe=l(u),x(k.$$.fragment,u),ce=l(u),V=c(u,"P",{"data-svelte-h":!0}),_(V)!=="svelte-1xhroxt"&&(V.textContent=Te),de=l(u),z=c(u,"P",{"data-svelte-h":!0}),_(z)!=="svelte-496sm0"&&(z.innerHTML=ve),me=l(u),$=c(u,"DIV",{class:!0});var I=A($);x(D.$$.fragment,I),fe=l(I),R=c(I,"P",{"data-svelte-h":!0}),_(R)!=="svelte-50j04k"&&(R.textContent=$e),ue=l(I),x(B.$$.fragment,I),I.forEach(a),u.forEach(a),se=l(e),x(G.$$.fragment,e),ie=l(e),M=c(e,"DIV",{class:!0});var X=A(M);x(F.$$.fragment,X),ge=l(X),Y=c(X,"P",{"data-svelte-h":!0}),_(Y)!=="svelte-1qpjiuf"&&(Y.textContent=Me),X.forEach(a),oe=l(e),N=c(e,"P",{}),A(N).forEach(a),this.h()},h(){H(n,"name","hf:doc:metadata"),H(n,"content",De),H($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(M,"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){g(document.head,n),s(e,f,t),s(e,i,t),s(e,d,t),w(h,e,t),s(e,r,t),s(e,b,t),s(e,O,t),s(e,j,t),s(e,q,t),s(e,S,t),s(e,Q,t),s(e,C,t),s(e,K,t),w(W,e,t),s(e,ee,t),s(e,L,t),s(e,te,t),w(J,e,t),s(e,ae,t),w(U,e,t),s(e,ne,t),s(e,m,t),w(Z,m,null),g(m,pe),w(k,m,null),g(m,ce),g(m,V),g(m,de),g(m,z),g(m,me),g(m,$),w(D,$,null),g($,fe),g($,R),g($,ue),w(B,$,null),s(e,se,t),w(G,e,t),s(e,ie,t),s(e,M,t),w(F,M,null),g(M,ge),g(M,Y),s(e,oe,t),s(e,N,t),le=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),J.$set(u);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),k.$set(I);const X={};t&2&&(X.$$scope={dirty:t,ctx:e}),B.$set(X)},i(e){le||(P(h.$$.fragment,e),P(W.$$.fragment,e),P(J.$$.fragment,e),P(U.$$.fragment,e),P(Z.$$.fragment,e),P(k.$$.fragment,e),P(D.$$.fragment,e),P(B.$$.fragment,e),P(G.$$.fragment,e),P(F.$$.fragment,e),le=!0)},o(e){T(h.$$.fragment,e),T(W.$$.fragment,e),T(J.$$.fragment,e),T(U.$$.fragment,e),T(Z.$$.fragment,e),T(k.$$.fragment,e),T(D.$$.fragment,e),T(B.$$.fragment,e),T(G.$$.fragment,e),T(F.$$.fragment,e),le=!1},d(e){e&&(a(f),a(i),a(d),a(r),a(b),a(O),a(j),a(q),a(S),a(Q),a(C),a(K),a(ee),a(L),a(te),a(ae),a(ne),a(m),a(se),a(ie),a(M),a(oe),a(N)),a(n),v(h,e),v(W,e),v(J,e),v(U,e),v(Z),v(k),v(D),v(B),v(G,e),v(F)}}}const De='{"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 Ge(E){return Je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ae extends ke{constructor(n){super(),Be(this,n,Ge,Ze,Ee,{})}}export{Ae as component};
