import{s as je,o as qe,n as Ge}from"../chunks/scheduler.8c3d61f6.js";import{S as He,i as Ae,g as s,s as o,r as g,A as Ee,h as a,f as n,c as i,j as H,u as _,x as u,k as A,y as d,a as r,v as h,d as P,t as I,w as x}from"../chunks/index.da70eac4.js";import{T as We}from"../chunks/Tip.1d9b8c37.js";import{D as X}from"../chunks/Docstring.6b390b9a.js";import{H as he,E as Fe}from"../chunks/EditOnGithub.1e64e623.js";function Re(Z){let l,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-components-across-pipelines">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){l=s("p"),l.innerHTML=y},l(m){l=a(m,"P",{"data-svelte-h":!0}),u(l)!=="svelte-1wmc0l4"&&(l.innerHTML=y)},m(m,E){r(m,l,E)},p:Ge,d(m){m&&n(l)}}}function Ye(Z){let l,y,m,E,$,ee,T,$e='<a href="https://huggingface.co/papers/2204.06125" rel="nofollow">Hierarchical Text-Conditional Image Generation with CLIP Latents</a> is by Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, Mark Chen. The unCLIP model in 🤗 Diffusers comes from kakaobrain’s <a href="https://github.com/kakaobrain/karlo" rel="nofollow">karlo</a>.',te,w,Te="The abstract from the paper is following:",ne,M,we="<em>Contrastive models like CLIP have been shown to learn robust representations of images that capture both semantics and style. To leverage these representations for image generation, we propose a two-stage model: a prior that generates a CLIP image embedding given a text caption, and a decoder that generates an image conditioned on the image embedding. We show that explicitly generating image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Moreover, the joint embedding space of CLIP enables language-guided image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples.</em>",re,D,Me='You can find lucidrains’ DALL-E 2 recreation at <a href="https://github.com/lucidrains/DALLE2-pytorch" rel="nofollow">lucidrains/DALLE2-pytorch</a>.',oe,C,ie,k,se,c,N,Pe,W,De="Pipeline for text-to-image generation using unCLIP.",Ie,F,ke=`This model inherits from <a href="/docs/diffusers/v0.32.1/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.).`,xe,L,V,ve,R,Ne="The call function to the pipeline for generation.",ae,z,de,p,O,Ce,Y,Ve="Pipeline to generate image variations from an input image using UnCLIP.",Le,B,ze=`This model inherits from <a href="/docs/diffusers/v0.32.1/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.).`,be,b,S,Ue,J,Oe="The call function to the pipeline for generation.",le,j,ce,v,q,ye,K,Se="Output class for image pipelines.",pe,G,ue,Q,me;return $=new he({props:{title:"unCLIP",local:"unclip",headingTag:"h1"}}),C=new We({props:{$$slots:{default:[Re]},$$scope:{ctx:Z}}}),k=new he({props:{title:"UnCLIPPipeline",local:"diffusers.UnCLIPPipeline",headingTag:"h2"}}),N=new X({props:{name:"class diffusers.UnCLIPPipeline",anchor:"diffusers.UnCLIPPipeline",parameters:[{name:"prior",val:": PriorTransformer"},{name:"decoder",val:": UNet2DConditionModel"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_proj",val:": UnCLIPTextProjModel"},{name:"super_res_first",val:": UNet2DModel"},{name:"super_res_last",val:": UNet2DModel"},{name:"prior_scheduler",val:": UnCLIPScheduler"},{name:"decoder_scheduler",val:": UnCLIPScheduler"},{name:"super_res_scheduler",val:": UnCLIPScheduler"}],parametersDescription:[{anchor:"diffusers.UnCLIPPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPTextModelWithProjection" rel="nofollow">CLIPTextModelWithProjection</a>) &#x2014;
Frozen text-encoder.`,name:"text_encoder"},{anchor:"diffusers.UnCLIPPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.UnCLIPPipeline.prior",description:`<strong>prior</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/prior_transformer#diffusers.PriorTransformer">PriorTransformer</a>) &#x2014;
The canonical unCLIP prior to approximate the image embedding from the text embedding.`,name:"prior"},{anchor:"diffusers.UnCLIPPipeline.text_proj",description:`<strong>text_proj</strong> (<code>UnCLIPTextProjModel</code>) &#x2014;
Utility class to prepare and combine the embeddings before they are passed to the decoder.`,name:"text_proj"},{anchor:"diffusers.UnCLIPPipeline.decoder",description:`<strong>decoder</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
The decoder to invert the image embedding into an image.`,name:"decoder"},{anchor:"diffusers.UnCLIPPipeline.super_res_first",description:`<strong>super_res_first</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014;
Super resolution UNet. Used in all but the last step of the super resolution diffusion process.`,name:"super_res_first"},{anchor:"diffusers.UnCLIPPipeline.super_res_last",description:`<strong>super_res_last</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014;
Super resolution UNet. Used in the last step of the super resolution diffusion process.`,name:"super_res_last"},{anchor:"diffusers.UnCLIPPipeline.prior_scheduler",description:`<strong>prior_scheduler</strong> (<code>UnCLIPScheduler</code>) &#x2014;
Scheduler used in the prior denoising process (a modified <a href="/docs/diffusers/v0.32.1/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>).`,name:"prior_scheduler"},{anchor:"diffusers.UnCLIPPipeline.decoder_scheduler",description:`<strong>decoder_scheduler</strong> (<code>UnCLIPScheduler</code>) &#x2014;
Scheduler used in the decoder denoising process (a modified <a href="/docs/diffusers/v0.32.1/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>).`,name:"decoder_scheduler"},{anchor:"diffusers.UnCLIPPipeline.super_res_scheduler",description:`<strong>super_res_scheduler</strong> (<code>UnCLIPScheduler</code>) &#x2014;
Scheduler used in the super resolution denoising process (a modified <a href="/docs/diffusers/v0.32.1/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>).`,name:"super_res_scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.32.1/src/diffusers/pipelines/unclip/pipeline_unclip.py#L34"}}),V=new X({props:{name:"__call__",anchor:"diffusers.UnCLIPPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prior_num_inference_steps",val:": int = 25"},{name:"decoder_num_inference_steps",val:": int = 25"},{name:"super_res_num_inference_steps",val:": int = 7"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"prior_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"super_res_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"text_model_output",val:": typing.Union[transformers.models.clip.modeling_clip.CLIPTextModelOutput, typing.Tuple, NoneType] = None"},{name:"text_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"prior_guidance_scale",val:": float = 4.0"},{name:"decoder_guidance_scale",val:": float = 8.0"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UnCLIPPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>) &#x2014;
The prompt or prompts to guide image generation. This can only be left undefined if <code>text_model_output</code>
and <code>text_attention_mask</code> is passed.`,name:"prompt"},{anchor:"diffusers.UnCLIPPipeline.__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.UnCLIPPipeline.__call__.prior_num_inference_steps",description:`<strong>prior_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 25) &#x2014;
The number of denoising steps for the prior. More denoising steps usually lead to a higher quality
image at the expense of slower inference.`,name:"prior_num_inference_steps"},{anchor:"diffusers.UnCLIPPipeline.__call__.decoder_num_inference_steps",description:`<strong>decoder_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 25) &#x2014;
The number of denoising steps for the decoder. More denoising steps usually lead to a higher quality
image at the expense of slower inference.`,name:"decoder_num_inference_steps"},{anchor:"diffusers.UnCLIPPipeline.__call__.super_res_num_inference_steps",description:`<strong>super_res_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
The number of denoising steps for super resolution. More denoising steps usually lead to a higher
quality image at the expense of slower inference.`,name:"super_res_num_inference_steps"},{anchor:"diffusers.UnCLIPPipeline.__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.UnCLIPPipeline.__call__.prior_latents",description:`<strong>prior_latents</strong> (<code>torch.Tensor</code> of shape (batch size, embeddings dimension), <em>optional</em>) &#x2014;
Pre-generated noisy latents to be used as inputs for the prior.`,name:"prior_latents"},{anchor:"diffusers.UnCLIPPipeline.__call__.decoder_latents",description:`<strong>decoder_latents</strong> (<code>torch.Tensor</code> of shape (batch size, channels, height, width), <em>optional</em>) &#x2014;
Pre-generated noisy latents to be used as inputs for the decoder.`,name:"decoder_latents"},{anchor:"diffusers.UnCLIPPipeline.__call__.super_res_latents",description:`<strong>super_res_latents</strong> (<code>torch.Tensor</code> of shape (batch size, channels, super res height, super res width), <em>optional</em>) &#x2014;
Pre-generated noisy latents to be used as inputs for the decoder.`,name:"super_res_latents"},{anchor:"diffusers.UnCLIPPipeline.__call__.prior_guidance_scale",description:`<strong>prior_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#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:"prior_guidance_scale"},{anchor:"diffusers.UnCLIPPipeline.__call__.decoder_guidance_scale",description:`<strong>decoder_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#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:"decoder_guidance_scale"},{anchor:"diffusers.UnCLIPPipeline.__call__.text_model_output",description:`<strong>text_model_output</strong> (<code>CLIPTextModelOutput</code>, <em>optional</em>) &#x2014;
Pre-defined <code>CLIPTextModel</code> outputs that can be derived from the text encoder. Pre-defined text
outputs can be passed for tasks like text embedding interpolations. Make sure to also pass
<code>text_attention_mask</code> in this case. <code>prompt</code> can the be left <code>None</code>.`,name:"text_model_output"},{anchor:"diffusers.UnCLIPPipeline.__call__.text_attention_mask",description:`<strong>text_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-defined CLIP text attention mask that can be derived from the tokenizer. Pre-defined text attention
masks are necessary when passing <code>text_model_output</code>.`,name:"text_attention_mask"},{anchor:"diffusers.UnCLIPPipeline.__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.UnCLIPPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.32.1/src/diffusers/pipelines/unclip/pipeline_unclip.py#L211",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),z=new he({props:{title:"UnCLIPImageVariationPipeline",local:"diffusers.UnCLIPImageVariationPipeline",headingTag:"h2"}}),O=new X({props:{name:"class diffusers.UnCLIPImageVariationPipeline",anchor:"diffusers.UnCLIPImageVariationPipeline",parameters:[{name:"decoder",val:": UNet2DConditionModel"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_proj",val:": UnCLIPTextProjModel"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"image_encoder",val:": CLIPVisionModelWithProjection"},{name:"super_res_first",val:": UNet2DModel"},{name:"super_res_last",val:": UNet2DModel"},{name:"decoder_scheduler",val:": UnCLIPScheduler"},{name:"super_res_scheduler",val:": UnCLIPScheduler"}],parametersDescription:[{anchor:"diffusers.UnCLIPImageVariationPipeline.text_encoder",description:`<strong>text_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPTextModelWithProjection" rel="nofollow">CLIPTextModelWithProjection</a>) &#x2014;
Frozen text-encoder.`,name:"text_encoder"},{anchor:"diffusers.UnCLIPImageVariationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>) &#x2014;
A <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.UnCLIPImageVariationPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPImageProcessor" rel="nofollow">CLIPImageProcessor</a>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>image_encoder</code>.`,name:"feature_extractor"},{anchor:"diffusers.UnCLIPImageVariationPipeline.image_encoder",description:`<strong>image_encoder</strong> (<a href="https://huggingface.co/docs/transformers/v4.47.1/en/model_doc/clip#transformers.CLIPVisionModelWithProjection" rel="nofollow">CLIPVisionModelWithProjection</a>) &#x2014;
Frozen CLIP image-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"image_encoder"},{anchor:"diffusers.UnCLIPImageVariationPipeline.text_proj",description:`<strong>text_proj</strong> (<code>UnCLIPTextProjModel</code>) &#x2014;
Utility class to prepare and combine the embeddings before they are passed to the decoder.`,name:"text_proj"},{anchor:"diffusers.UnCLIPImageVariationPipeline.decoder",description:`<strong>decoder</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
The decoder to invert the image embedding into an image.`,name:"decoder"},{anchor:"diffusers.UnCLIPImageVariationPipeline.super_res_first",description:`<strong>super_res_first</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014;
Super resolution UNet. Used in all but the last step of the super resolution diffusion process.`,name:"super_res_first"},{anchor:"diffusers.UnCLIPImageVariationPipeline.super_res_last",description:`<strong>super_res_last</strong> (<a href="/docs/diffusers/v0.32.1/en/api/models/unet2d#diffusers.UNet2DModel">UNet2DModel</a>) &#x2014;
Super resolution UNet. Used in the last step of the super resolution diffusion process.`,name:"super_res_last"},{anchor:"diffusers.UnCLIPImageVariationPipeline.decoder_scheduler",description:`<strong>decoder_scheduler</strong> (<code>UnCLIPScheduler</code>) &#x2014;
Scheduler used in the decoder denoising process (a modified <a href="/docs/diffusers/v0.32.1/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>).`,name:"decoder_scheduler"},{anchor:"diffusers.UnCLIPImageVariationPipeline.super_res_scheduler",description:`<strong>super_res_scheduler</strong> (<code>UnCLIPScheduler</code>) &#x2014;
Scheduler used in the super resolution denoising process (a modified <a href="/docs/diffusers/v0.32.1/en/api/schedulers/ddpm#diffusers.DDPMScheduler">DDPMScheduler</a>).`,name:"super_res_scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.32.1/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py#L39"}}),S=new X({props:{name:"__call__",anchor:"diffusers.UnCLIPImageVariationPipeline.__call__",parameters:[{name:"image",val:": typing.Union[PIL.Image.Image, typing.List[PIL.Image.Image], torch.Tensor, NoneType] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"decoder_num_inference_steps",val:": int = 25"},{name:"super_res_num_inference_steps",val:": int = 7"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"},{name:"decoder_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"super_res_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"image_embeddings",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_guidance_scale",val:": float = 8.0"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>List[PIL.Image.Image]</code> or <code>torch.Tensor</code>) &#x2014;
<code>Image</code> or tensor representing an image batch to be used as the starting point. If you provide a
tensor, it needs to be compatible with the <code>CLIPImageProcessor</code>
<a href="https://huggingface.co/fusing/karlo-image-variations-diffusers/blob/main/feature_extractor/preprocessor_config.json" rel="nofollow">configuration</a>.
Can be left as <code>None</code> only when <code>image_embeddings</code> are passed.`,name:"image"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__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.UnCLIPImageVariationPipeline.__call__.decoder_num_inference_steps",description:`<strong>decoder_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 25) &#x2014;
The number of denoising steps for the decoder. More denoising steps usually lead to a higher quality
image at the expense of slower inference.`,name:"decoder_num_inference_steps"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.super_res_num_inference_steps",description:`<strong>super_res_num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
The number of denoising steps for super resolution. More denoising steps usually lead to a higher
quality image at the expense of slower inference.`,name:"super_res_num_inference_steps"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.decoder_latents",description:`<strong>decoder_latents</strong> (<code>torch.Tensor</code> of shape (batch size, channels, height, width), <em>optional</em>) &#x2014;
Pre-generated noisy latents to be used as inputs for the decoder.`,name:"decoder_latents"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.super_res_latents",description:`<strong>super_res_latents</strong> (<code>torch.Tensor</code> of shape (batch size, channels, super res height, super res width), <em>optional</em>) &#x2014;
Pre-generated noisy latents to be used as inputs for the decoder.`,name:"super_res_latents"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.decoder_guidance_scale",description:`<strong>decoder_guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#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:"decoder_guidance_scale"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__call__.image_embeddings",description:`<strong>image_embeddings</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-defined image embeddings that can be derived from the image encoder. Pre-defined image embeddings
can be passed for tasks like image interpolations. <code>image</code> can be left as <code>None</code>.`,name:"image_embeddings"},{anchor:"diffusers.UnCLIPImageVariationPipeline.__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.UnCLIPImageVariationPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput">ImagePipelineOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.32.1/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py#L199",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is
returned where the first element is a list with the generated images.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/v0.32.1/en/api/pipelines/latent_diffusion#diffusers.ImagePipelineOutput"
>ImagePipelineOutput</a> or <code>tuple</code></p>
`}}),j=new he({props:{title:"ImagePipelineOutput",local:"diffusers.ImagePipelineOutput",headingTag:"h2"}}),q=new X({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.ImagePipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/v0.32.1/src/diffusers/pipelines/pipeline_utils.py#L106"}}),G=new Fe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/unclip.md"}}),{c(){l=s("meta"),y=o(),m=s("p"),E=o(),g($.$$.fragment),ee=o(),T=s("p"),T.innerHTML=$e,te=o(),w=s("p"),w.textContent=Te,ne=o(),M=s("p"),M.innerHTML=we,re=o(),D=s("p"),D.innerHTML=Me,oe=o(),g(C.$$.fragment),ie=o(),g(k.$$.fragment),se=o(),c=s("div"),g(N.$$.fragment),Pe=o(),W=s("p"),W.textContent=De,Ie=o(),F=s("p"),F.innerHTML=ke,xe=o(),L=s("div"),g(V.$$.fragment),ve=o(),R=s("p"),R.textContent=Ne,ae=o(),g(z.$$.fragment),de=o(),p=s("div"),g(O.$$.fragment),Ce=o(),Y=s("p"),Y.textContent=Ve,Le=o(),B=s("p"),B.innerHTML=ze,be=o(),b=s("div"),g(S.$$.fragment),Ue=o(),J=s("p"),J.textContent=Oe,le=o(),g(j.$$.fragment),ce=o(),v=s("div"),g(q.$$.fragment),ye=o(),K=s("p"),K.textContent=Se,pe=o(),g(G.$$.fragment),ue=o(),Q=s("p"),this.h()},l(e){const t=Ee("svelte-u9bgzb",document.head);l=a(t,"META",{name:!0,content:!0}),t.forEach(n),y=i(e),m=a(e,"P",{}),H(m).forEach(n),E=i(e),_($.$$.fragment,e),ee=i(e),T=a(e,"P",{"data-svelte-h":!0}),u(T)!=="svelte-i7e0m6"&&(T.innerHTML=$e),te=i(e),w=a(e,"P",{"data-svelte-h":!0}),u(w)!=="svelte-z3ah53"&&(w.textContent=Te),ne=i(e),M=a(e,"P",{"data-svelte-h":!0}),u(M)!=="svelte-ha34c8"&&(M.innerHTML=we),re=i(e),D=a(e,"P",{"data-svelte-h":!0}),u(D)!=="svelte-cdn0pw"&&(D.innerHTML=Me),oe=i(e),_(C.$$.fragment,e),ie=i(e),_(k.$$.fragment,e),se=i(e),c=a(e,"DIV",{class:!0});var f=H(c);_(N.$$.fragment,f),Pe=i(f),W=a(f,"P",{"data-svelte-h":!0}),u(W)!=="svelte-hi6w5l"&&(W.textContent=De),Ie=i(f),F=a(f,"P",{"data-svelte-h":!0}),u(F)!=="svelte-zy6387"&&(F.innerHTML=ke),xe=i(f),L=a(f,"DIV",{class:!0});var fe=H(L);_(V.$$.fragment,fe),ve=i(fe),R=a(fe,"P",{"data-svelte-h":!0}),u(R)!=="svelte-50j04k"&&(R.textContent=Ne),fe.forEach(n),f.forEach(n),ae=i(e),_(z.$$.fragment,e),de=i(e),p=a(e,"DIV",{class:!0});var U=H(p);_(O.$$.fragment,U),Ce=i(U),Y=a(U,"P",{"data-svelte-h":!0}),u(Y)!=="svelte-mnp0y8"&&(Y.textContent=Ve),Le=i(U),B=a(U,"P",{"data-svelte-h":!0}),u(B)!=="svelte-zy6387"&&(B.innerHTML=ze),be=i(U),b=a(U,"DIV",{class:!0});var ge=H(b);_(S.$$.fragment,ge),Ue=i(ge),J=a(ge,"P",{"data-svelte-h":!0}),u(J)!=="svelte-50j04k"&&(J.textContent=Oe),ge.forEach(n),U.forEach(n),le=i(e),_(j.$$.fragment,e),ce=i(e),v=a(e,"DIV",{class:!0});var _e=H(v);_(q.$$.fragment,_e),ye=i(_e),K=a(_e,"P",{"data-svelte-h":!0}),u(K)!=="svelte-19wetgi"&&(K.textContent=Se),_e.forEach(n),pe=i(e),_(G.$$.fragment,e),ue=i(e),Q=a(e,"P",{}),H(Q).forEach(n),this.h()},h(){A(l,"name","hf:doc:metadata"),A(l,"content",Be),A(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(v,"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){d(document.head,l),r(e,y,t),r(e,m,t),r(e,E,t),h($,e,t),r(e,ee,t),r(e,T,t),r(e,te,t),r(e,w,t),r(e,ne,t),r(e,M,t),r(e,re,t),r(e,D,t),r(e,oe,t),h(C,e,t),r(e,ie,t),h(k,e,t),r(e,se,t),r(e,c,t),h(N,c,null),d(c,Pe),d(c,W),d(c,Ie),d(c,F),d(c,xe),d(c,L),h(V,L,null),d(L,ve),d(L,R),r(e,ae,t),h(z,e,t),r(e,de,t),r(e,p,t),h(O,p,null),d(p,Ce),d(p,Y),d(p,Le),d(p,B),d(p,be),d(p,b),h(S,b,null),d(b,Ue),d(b,J),r(e,le,t),h(j,e,t),r(e,ce,t),r(e,v,t),h(q,v,null),d(v,ye),d(v,K),r(e,pe,t),h(G,e,t),r(e,ue,t),r(e,Q,t),me=!0},p(e,[t]){const f={};t&2&&(f.$$scope={dirty:t,ctx:e}),C.$set(f)},i(e){me||(P($.$$.fragment,e),P(C.$$.fragment,e),P(k.$$.fragment,e),P(N.$$.fragment,e),P(V.$$.fragment,e),P(z.$$.fragment,e),P(O.$$.fragment,e),P(S.$$.fragment,e),P(j.$$.fragment,e),P(q.$$.fragment,e),P(G.$$.fragment,e),me=!0)},o(e){I($.$$.fragment,e),I(C.$$.fragment,e),I(k.$$.fragment,e),I(N.$$.fragment,e),I(V.$$.fragment,e),I(z.$$.fragment,e),I(O.$$.fragment,e),I(S.$$.fragment,e),I(j.$$.fragment,e),I(q.$$.fragment,e),I(G.$$.fragment,e),me=!1},d(e){e&&(n(y),n(m),n(E),n(ee),n(T),n(te),n(w),n(ne),n(M),n(re),n(D),n(oe),n(ie),n(se),n(c),n(ae),n(de),n(p),n(le),n(ce),n(v),n(pe),n(ue),n(Q)),n(l),x($,e),x(C,e),x(k,e),x(N),x(V),x(z,e),x(O),x(S),x(j,e),x(q),x(G,e)}}}const Be='{"title":"unCLIP","local":"unclip","sections":[{"title":"UnCLIPPipeline","local":"diffusers.UnCLIPPipeline","sections":[],"depth":2},{"title":"UnCLIPImageVariationPipeline","local":"diffusers.UnCLIPImageVariationPipeline","sections":[],"depth":2},{"title":"ImagePipelineOutput","local":"diffusers.ImagePipelineOutput","sections":[],"depth":2}],"depth":1}';function Je(Z){return qe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tt extends He{constructor(l){super(),Ae(this,l,Je,Ye,je,{})}}export{tt as component};
