import{s as Me,o as Ie,n as ke}from"../chunks/scheduler.8c3d61f6.js";import{S as ze,i as Le,g as l,s,r as h,A as De,h as p,f as n,c as a,j as S,u as w,x as y,k as W,y as c,a as i,v as b,d as v,t as P,w as x}from"../chunks/index.da70eac4.js";import{T as Je}from"../chunks/Tip.1d9b8c37.js";import{D as pe}from"../chunks/Docstring.6b390b9a.js";import{C as Ne}from"../chunks/CodeBlock.00a903b3.js";import{E as Ue}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as we,E as qe}from"../chunks/EditOnGithub.1e64e623.js";function Ee(G){let o,C='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers.md">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading.md#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){o=l("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),y(o)!=="svelte-w7r39y"&&(o.innerHTML=C)},m(d,g){i(d,o,g)},p:ke,d(d){d&&n(o)}}}function He(G){let o,C="Examples:",d,g,f;return g=new Ne({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlldzNQbHVzUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwQ29nVmlldzNQbHVzUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMlRIVURNJTJGQ29nVmlldzNQbHVzLTNCJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMHBob3RvJTIwb2YlMjBhbiUyMGFzdHJvbmF1dCUyMHJpZGluZyUyMGElMjBob3JzZSUyMG9uJTIwbWFycyUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMm91dHB1dC5wbmclMjIp",highlighted:`<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> diffusers <span class="hljs-keyword">import</span> CogView3PlusPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = CogView3PlusPipeline.from_pretrained(<span class="hljs-string">&quot;THUDM/CogView3Plus-3B&quot;</span>, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;output.png&quot;</span>)`,wrap:!1}}),{c(){o=l("p"),o.textContent=C,d=s(),h(g.$$.fragment)},l(r){o=p(r,"P",{"data-svelte-h":!0}),y(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=a(r),w(g.$$.fragment,r)},m(r,_){i(r,o,_),i(r,d,_),b(g,r,_),f=!0},p:ke,i(r){f||(v(g.$$.fragment,r),f=!0)},o(r){P(g.$$.fragment,r),f=!1},d(r){r&&(n(o),n(d)),x(g,r)}}}function Oe(G){let o,C,d,g,f,r,_,be='<a href="https://huggingface.co/papers/2403.05121" rel="nofollow">CogView3: Finer and Faster Text-to-Image Generation via Relay Diffusion</a> from Tsinghua University &amp; ZhipuAI, by Wendi Zheng, Jiayan Teng, Zhuoyi Yang, Weihan Wang, Jidong Chen, Xiaotao Gu, Yuxiao Dong, Ming Ding, Jie Tang.',X,z,ve="The abstract from the paper is:",Q,L,Pe="<em>Recent advancements in text-to-image generative systems have been largely driven by diffusion models. However, single-stage text-to-image diffusion models still face challenges, in terms of computational efficiency and the refinement of image details. To tackle the issue, we propose CogView3, an innovative cascaded framework that enhances the performance of text-to-image diffusion. CogView3 is the first model implementing relay diffusion in the realm of text-to-image generation, executing the task by first creating low-resolution images and subsequently applying relay-based super-resolution. This methodology not only results in competitive text-to-image outputs but also greatly reduces both training and inference costs. Our experimental results demonstrate that CogView3 outperforms SDXL, the current state-of-the-art open-source text-to-image diffusion model, by 77.0% in human evaluations, all while requiring only about 1/2 of the inference time. The distilled variant of CogView3 achieves comparable performance while only utilizing 1/10 of the inference time by SDXL.</em>",Y,k,K,D,xe='This pipeline was contributed by <a href="https://github.com/zRzRzRzRzRzRzR" rel="nofollow">zRzRzRzRzRzRzR</a>. The original codebase can be found <a href="https://huggingface.co/THUDM" rel="nofollow">here</a>. The original weights can be found under <a href="https://huggingface.co/THUDM" rel="nofollow">hf.co/THUDM</a>.',ee,J,te,m,N,de,j,ye="Pipeline for text-to-image generation using CogView3Plus.",ce,R,Ce=`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 the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,me,T,U,ge,F,Te="Function invoked when calling the pipeline for generation.",ue,M,fe,I,q,_e,Z,$e="Encodes the prompt into text encoder hidden states.",ne,E,oe,$,H,he,A,Ve="Output class for CogView3 pipelines.",ie,O,se,B,ae;return f=new we({props:{title:"CogView3Plus",local:"cogview3plus",headingTag:"h1"}}),k=new Je({props:{$$slots:{default:[Ee]},$$scope:{ctx:G}}}),J=new we({props:{title:"CogView3PlusPipeline",local:"diffusers.CogView3PlusPipeline",headingTag:"h2"}}),N=new pe({props:{name:"class diffusers.CogView3PlusPipeline",anchor:"diffusers.CogView3PlusPipeline",parameters:[{name:"tokenizer",val:": T5Tokenizer"},{name:"text_encoder",val:": T5EncoderModel"},{name:"vae",val:": AutoencoderKL"},{name:"transformer",val:": CogView3PlusTransformer2DModel"},{name:"scheduler",val:": typing.Union[diffusers.schedulers.scheduling_ddim_cogvideox.CogVideoXDDIMScheduler, diffusers.schedulers.scheduling_dpm_cogvideox.CogVideoXDPMScheduler]"}],parametersDescription:[{anchor:"diffusers.CogView3PlusPipeline.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.CogView3PlusPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
Frozen text-encoder. CogView3Plus uses
<a href="https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>; specifically the
<a href="https://huggingface.co/PixArt-alpha/PixArt-alpha/tree/main/t5-v1_1-xxl" rel="nofollow">t5-v1_1-xxl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.CogView3PlusPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5Tokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5Tokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.CogView3PlusPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/cogview3plus_transformer2d#diffusers.CogView3PlusTransformer2DModel">CogView3PlusTransformer2DModel</a>) &#x2014;
A text conditioned <code>CogView3PlusTransformer2DModel</code> to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.CogView3PlusPipeline.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>transformer</code> to denoise the encoded image latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/cogview3/pipeline_cogview3plus.py#L111"}}),U=new pe({props:{name:"__call__",anchor:"diffusers.CogView3PlusPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.Optional[typing.List[int]] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"num_images_per_prompt",val:": 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.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"original_size",val:": typing.Optional[typing.Tuple[int, int]] = None"},{name:"crops_coords_top_left",val:": typing.Tuple[int, int] = (0, 0)"},{name:"output_type",val:": str = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 224"}],parametersDescription:[{anchor:"diffusers.CogView3PlusPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.CogView3PlusPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.CogView3PlusPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.transformer.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image. If not provided, it is set to 1024.`,name:"height"},{anchor:"diffusers.CogView3PlusPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.transformer.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image. If not provided it is set to 1024.`,name:"width"},{anchor:"diffusers.CogView3PlusPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to <code>50</code>) &#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.CogView3PlusPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.CogView3PlusPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to <code>5.0</code>) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.CogView3PlusPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.CogView3PlusPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.CogView3PlusPipeline.__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 will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.CogView3PlusPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.CogView3PlusPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.CogView3PlusPipeline.__call__.original_size",description:`<strong>original_size</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (1024, 1024)) &#x2014;
If <code>original_size</code> is not the same as <code>target_size</code> the image will appear to be down- or upsampled.
<code>original_size</code> defaults to <code>(height, width)</code> if not specified. Part of SDXL&#x2019;s micro-conditioning as
explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"original_size"},{anchor:"diffusers.CogView3PlusPipeline.__call__.crops_coords_top_left",description:`<strong>crops_coords_top_left</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to (0, 0)) &#x2014;
<code>crops_coords_top_left</code> can be used to generate an image that appears to be &#x201C;cropped&#x201D; from the position
<code>crops_coords_top_left</code> downwards. Favorable, well-centered images are usually achieved by setting
<code>crops_coords_top_left</code> to (0, 0). Part of SDXL&#x2019;s micro-conditioning as explained in section 2.2 of
<a href="https://huggingface.co/papers/2307.01952" rel="nofollow">https://huggingface.co/papers/2307.01952</a>.`,name:"crops_coords_top_left"},{anchor:"diffusers.CogView3PlusPipeline.__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 generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.CogView3PlusPipeline.__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 <code>~pipelines.stable_diffusion_xl.StableDiffusionXLPipelineOutput</code> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.CogView3PlusPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.CogView3PlusPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by
<code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.CogView3PlusPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.CogView3PlusPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>224</code>) &#x2014;
Maximum sequence length in encoded prompt. Can be set to other values but may lead to poorer results.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/cogview3/pipeline_cogview3plus.py#L402",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/cogview3#diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput"
>CogView3PipelineOutput</a> if <code>return_dict</code> is True, otherwise a
<code>tuple</code>. When returning a tuple, 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/main/en/api/pipelines/cogview3#diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput"
>CogView3PipelineOutput</a> or <code>tuple</code></p>
`}}),M=new Ue({props:{anchor:"diffusers.CogView3PlusPipeline.__call__.example",$$slots:{default:[He]},$$scope:{ctx:G}}}),q=new pe({props:{name:"encode_prompt",anchor:"diffusers.CogView3PlusPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"max_sequence_length",val:": int = 224"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"}],parametersDescription:[{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded`,name:"prompt"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of images that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_images_per_prompt"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>224</code>) &#x2014;
Maximum sequence length in encoded prompt. Can be set to other values but may lead to poorer results.`,name:"max_sequence_length"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.CogView3PlusPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/cogview3/pipeline_cogview3plus.py#L205"}}),E=new we({props:{title:"CogView3PipelineOutput",local:"diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput",headingTag:"h2"}}),H=new pe({props:{name:"class diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput",anchor:"diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput.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>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/cogview3/pipeline_output.py#L10"}}),O=new qe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/cogview3.md"}}),{c(){o=l("meta"),C=s(),d=l("p"),g=s(),h(f.$$.fragment),r=s(),_=l("p"),_.innerHTML=be,X=s(),z=l("p"),z.textContent=ve,Q=s(),L=l("p"),L.innerHTML=Pe,Y=s(),h(k.$$.fragment),K=s(),D=l("p"),D.innerHTML=xe,ee=s(),h(J.$$.fragment),te=s(),m=l("div"),h(N.$$.fragment),de=s(),j=l("p"),j.textContent=ye,ce=s(),R=l("p"),R.innerHTML=Ce,me=s(),T=l("div"),h(U.$$.fragment),ge=s(),F=l("p"),F.textContent=Te,ue=s(),h(M.$$.fragment),fe=s(),I=l("div"),h(q.$$.fragment),_e=s(),Z=l("p"),Z.textContent=$e,ne=s(),h(E.$$.fragment),oe=s(),$=l("div"),h(H.$$.fragment),he=s(),A=l("p"),A.textContent=Ve,ie=s(),h(O.$$.fragment),se=s(),B=l("p"),this.h()},l(e){const t=De("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(n),C=a(e),d=p(e,"P",{}),S(d).forEach(n),g=a(e),w(f.$$.fragment,e),r=a(e),_=p(e,"P",{"data-svelte-h":!0}),y(_)!=="svelte-1n97irq"&&(_.innerHTML=be),X=a(e),z=p(e,"P",{"data-svelte-h":!0}),y(z)!=="svelte-1cwsb16"&&(z.textContent=ve),Q=a(e),L=p(e,"P",{"data-svelte-h":!0}),y(L)!=="svelte-186qbfl"&&(L.innerHTML=Pe),Y=a(e),w(k.$$.fragment,e),K=a(e),D=p(e,"P",{"data-svelte-h":!0}),y(D)!=="svelte-14a2tju"&&(D.innerHTML=xe),ee=a(e),w(J.$$.fragment,e),te=a(e),m=p(e,"DIV",{class:!0});var u=S(m);w(N.$$.fragment,u),de=a(u),j=p(u,"P",{"data-svelte-h":!0}),y(j)!=="svelte-18ul76f"&&(j.textContent=ye),ce=a(u),R=p(u,"P",{"data-svelte-h":!0}),y(R)!=="svelte-wu1jmh"&&(R.innerHTML=Ce),me=a(u),T=p(u,"DIV",{class:!0});var V=S(T);w(U.$$.fragment,V),ge=a(V),F=p(V,"P",{"data-svelte-h":!0}),y(F)!=="svelte-v78lg8"&&(F.textContent=Te),ue=a(V),w(M.$$.fragment,V),V.forEach(n),fe=a(u),I=p(u,"DIV",{class:!0});var re=S(I);w(q.$$.fragment,re),_e=a(re),Z=p(re,"P",{"data-svelte-h":!0}),y(Z)!=="svelte-16q0ax1"&&(Z.textContent=$e),re.forEach(n),u.forEach(n),ne=a(e),w(E.$$.fragment,e),oe=a(e),$=p(e,"DIV",{class:!0});var le=S($);w(H.$$.fragment,le),he=a(le),A=p(le,"P",{"data-svelte-h":!0}),y(A)!=="svelte-zlr6ro"&&(A.textContent=Ve),le.forEach(n),ie=a(e),w(O.$$.fragment,e),se=a(e),B=p(e,"P",{}),S(B).forEach(n),this.h()},h(){W(o,"name","hf:doc:metadata"),W(o,"content",Ge),W(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W($,"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){c(document.head,o),i(e,C,t),i(e,d,t),i(e,g,t),b(f,e,t),i(e,r,t),i(e,_,t),i(e,X,t),i(e,z,t),i(e,Q,t),i(e,L,t),i(e,Y,t),b(k,e,t),i(e,K,t),i(e,D,t),i(e,ee,t),b(J,e,t),i(e,te,t),i(e,m,t),b(N,m,null),c(m,de),c(m,j),c(m,ce),c(m,R),c(m,me),c(m,T),b(U,T,null),c(T,ge),c(T,F),c(T,ue),b(M,T,null),c(m,fe),c(m,I),b(q,I,null),c(I,_e),c(I,Z),i(e,ne,t),b(E,e,t),i(e,oe,t),i(e,$,t),b(H,$,null),c($,he),c($,A),i(e,ie,t),b(O,e,t),i(e,se,t),i(e,B,t),ae=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),k.$set(u);const V={};t&2&&(V.$$scope={dirty:t,ctx:e}),M.$set(V)},i(e){ae||(v(f.$$.fragment,e),v(k.$$.fragment,e),v(J.$$.fragment,e),v(N.$$.fragment,e),v(U.$$.fragment,e),v(M.$$.fragment,e),v(q.$$.fragment,e),v(E.$$.fragment,e),v(H.$$.fragment,e),v(O.$$.fragment,e),ae=!0)},o(e){P(f.$$.fragment,e),P(k.$$.fragment,e),P(J.$$.fragment,e),P(N.$$.fragment,e),P(U.$$.fragment,e),P(M.$$.fragment,e),P(q.$$.fragment,e),P(E.$$.fragment,e),P(H.$$.fragment,e),P(O.$$.fragment,e),ae=!1},d(e){e&&(n(C),n(d),n(g),n(r),n(_),n(X),n(z),n(Q),n(L),n(Y),n(K),n(D),n(ee),n(te),n(m),n(ne),n(oe),n($),n(ie),n(se),n(B)),n(o),x(f,e),x(k,e),x(J,e),x(N),x(U),x(M),x(q),x(E,e),x(H),x(O,e)}}}const Ge='{"title":"CogView3Plus","local":"cogview3plus","sections":[{"title":"CogView3PlusPipeline","local":"diffusers.CogView3PlusPipeline","sections":[],"depth":2},{"title":"CogView3PipelineOutput","local":"diffusers.pipelines.cogview3.pipeline_output.CogView3PipelineOutput","sections":[],"depth":2}],"depth":1}';function je(G){return Ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xe extends ze{constructor(o){super(),Le(this,o,je,Oe,Me,{})}}export{Xe as component};
