import{s as et,o as tt,n as Ke}from"../chunks/scheduler.8c3d61f6.js";import{S as nt,i as ot,g as a,s as r,r as u,A as rt,h as l,f as t,c as s,j as A,u as f,x as w,k as P,y as o,a as d,v as h,d as _,t as b,w as v}from"../chunks/index.da70eac4.js";import{T as st}from"../chunks/Tip.1d9b8c37.js";import{D as G}from"../chunks/Docstring.6b390b9a.js";import{C as it}from"../chunks/CodeBlock.00a903b3.js";import{E as at}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as We,E as lt}from"../chunks/EditOnGithub.1e64e623.js";function pt(R){let i,$='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(){i=a("p"),i.innerHTML=$},l(g){i=l(g,"P",{"data-svelte-h":!0}),w(i)!=="svelte-w7r39y"&&(i.innerHTML=$)},m(g,y){d(g,i,y)},p:Ke,d(g){g&&t(i)}}}function dt(R){let i,$="Examples:",g,y,x;return y=new it({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b2VuY29kZXJLTEFsbGVncm8lMkMlMjBBbGxlZ3JvUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBdmFlJTIwJTNEJTIwQXV0b2VuY29kZXJLTEFsbGVncm8uZnJvbV9wcmV0cmFpbmVkKCUyMnJoeW1lcy1haSUyRkFsbGVncm8lMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ2YWUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MzIpJTBBcGlwZSUyMCUzRCUyMEFsbGVncm9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycmh5bWVzLWFpJTJGQWxsZWdybyUyMiUyQyUyMHZhZSUzRHZhZSUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZS5lbmFibGVfdmFlX3RpbGluZygpJTBBJTBBcHJvbXB0JTIwJTNEJTIwKCUwQSUyMCUyMCUyMCUyMCUyMkElMjBzZWFzaWRlJTIwaGFyYm9yJTIwd2l0aCUyMGJyaWdodCUyMHN1bmxpZ2h0JTIwYW5kJTIwc3BhcmtsaW5nJTIwc2Vhd2F0ZXIlMkMlMjB3aXRoJTIwbWFueSUyMGJvYXRzJTIwaW4lMjB0aGUlMjB3YXRlci4lMjBGcm9tJTIwYW4lMjBhZXJpYWwlMjB2aWV3JTJDJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIydGhlJTIwYm9hdHMlMjB2YXJ5JTIwaW4lMjBzaXplJTIwYW5kJTIwY29sb3IlMkMlMjBzb21lJTIwbW92aW5nJTIwYW5kJTIwc29tZSUyMHN0YXRpb25hcnkuJTIwRmlzaGluZyUyMGJvYXRzJTIwaW4lMjB0aGUlMjB3YXRlciUyMHN1Z2dlc3QlMjB0aGF0JTIwdGhpcyUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmxvY2F0aW9uJTIwbWlnaHQlMjBiZSUyMGElMjBwb3B1bGFyJTIwc3BvdCUyMGZvciUyMGRvY2tpbmclMjBmaXNoaW5nJTIwYm9hdHMuJTIyJTBBKSUwQXZpZGVvJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBndWlkYW5jZV9zY2FsZSUzRDcuNSUyQyUyMG1heF9zZXF1ZW5jZV9sZW5ndGglM0Q1MTIpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMTUp",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> AutoencoderKLAllegro, AllegroPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

<span class="hljs-meta">&gt;&gt;&gt; </span>vae = AutoencoderKLAllegro.from_pretrained(<span class="hljs-string">&quot;rhymes-ai/Allegro&quot;</span>, subfolder=<span class="hljs-string">&quot;vae&quot;</span>, torch_dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = AllegroPipeline.from_pretrained(<span class="hljs-string">&quot;rhymes-ai/Allegro&quot;</span>, vae=vae, torch_dtype=torch.bfloat16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_vae_tiling()

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = (
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A seaside harbor with bright sunlight and sparkling seawater, with many boats in the water. From an aerial view, &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;the boats vary in size and color, some moving and some stationary. Fishing boats in the water suggest that this &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;location might be a popular spot for docking fishing boats.&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = pipe(prompt, guidance_scale=<span class="hljs-number">7.5</span>, max_sequence_length=<span class="hljs-number">512</span>).frames[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;output.mp4&quot;</span>, fps=<span class="hljs-number">15</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=$,g=r(),u(y.$$.fragment)},l(m){i=l(m,"P",{"data-svelte-h":!0}),w(i)!=="svelte-kvfsh7"&&(i.textContent=$),g=s(m),f(y.$$.fragment,m)},m(m,T){d(m,i,T),d(m,g,T),h(y,m,T),x=!0},p:Ke,i(m){x||(_(y.$$.fragment,m),x=!0)},o(m){b(y.$$.fragment,m),x=!1},d(m){m&&(t(i),t(g)),v(y,m)}}}function ct(R){let i,$,g,y,x,m,T,ze='<a href="https://huggingface.co/papers/2410.15458" rel="nofollow">Allegro: Open the Black Box of Commercial-Level Video Generation Model</a> from RhymesAI, by Yuan Zhou, Qiuyue Wang, Yuxuan Cai, Huan Yang.',le,q,Ve="The abstract from the paper is:",pe,E,De='<em>Significant advancements have been made in the field of video generation, with the open-source community contributing a wealth of research papers and tools for training high-quality models. However, despite these efforts, the available information and resources remain insufficient for achieving commercial-level performance. In this report, we open the black box and introduce Allegro, an advanced video generation model that excels in both quality and temporal consistency. We also highlight the current limitations in the field and present a comprehensive methodology for training high-performance, commercial-level video generation models, addressing key aspects such as data, model architecture, training pipeline, and evaluation. Our user study shows that Allegro surpasses existing open-source models and most commercial models, ranking just behind Hailuo and Kling. Code: <a href="https://github.com/rhymes-ai/Allegro" rel="nofollow">https://github.com/rhymes-ai/Allegro</a> , Model: <a href="https://huggingface.co/rhymes-ai/Allegro" rel="nofollow">https://huggingface.co/rhymes-ai/Allegro</a> , Gallery: <a href="https://rhymes.ai/allegro_gallery" rel="nofollow">https://rhymes.ai/allegro_gallery</a> .</em>',de,J,ce,W,me,p,z,$e,Q,Fe="Pipeline for text-to-video generation using Allegro.",Me,K,Ne=`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.)`,Ae,M,V,Pe,ee,Xe="Function invoked when calling the pipeline for generation.",Ie,C,ke,j,D,Je,te,He=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Ce,L,F,je,ne,Oe=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,Le,U,N,Ue,oe,Ye=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Ze,Z,X,Be,re,Se=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`,Ge,B,H,qe,se,Re="Encodes the prompt into text encoder hidden states.",ge,O,ue,I,Y,Ee,ie,Qe="Output class for Allegro pipelines.",fe,S,he,ae,_e;return x=new We({props:{title:"Allegro",local:"allegro",headingTag:"h1"}}),J=new st({props:{$$slots:{default:[pt]},$$scope:{ctx:R}}}),W=new We({props:{title:"AllegroPipeline",local:"diffusers.AllegroPipeline",headingTag:"h2"}}),z=new G({props:{name:"class diffusers.AllegroPipeline",anchor:"diffusers.AllegroPipeline",parameters:[{name:"tokenizer",val:": T5Tokenizer"},{name:"text_encoder",val:": T5EncoderModel"},{name:"vae",val:": AutoencoderKLAllegro"},{name:"transformer",val:": AllegroTransformer3DModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.AllegroPipeline.vae",description:`<strong>vae</strong> (<code>AllegroAutoEncoderKL3D</code>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode video to and from latent representations.`,name:"vae"},{anchor:"diffusers.AllegroPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) &#x2014;
Frozen text-encoder. PixArt-Alpha 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.AllegroPipeline.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.AllegroPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/allegro_transformer3d#diffusers.AllegroTransformer3DModel">AllegroTransformer3DModel</a>) &#x2014;
A text conditioned <code>AllegroTransformer3DModel</code> to denoise the encoded video latents.`,name:"transformer"},{anchor:"diffusers.AllegroPipeline.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 video latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L135"}}),V=new G({props:{name:"__call__",anchor:"diffusers.AllegroPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": str = ''"},{name:"num_inference_steps",val:": int = 100"},{name:"timesteps",val:": typing.List[int] = None"},{name:"guidance_scale",val:": float = 7.5"},{name:"num_frames",val:": typing.Optional[int] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_videos_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.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[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:"clean_caption",val:": bool = True"},{name:"max_sequence_length",val:": int = 512"}],parametersDescription:[{anchor:"diffusers.AllegroPipeline.__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 video generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.AllegroPipeline.__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 video 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.AllegroPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality video at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.AllegroPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process. If not defined, equal spaced <code>num_inference_steps</code>
timesteps are used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.AllegroPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#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 videos that are closely linked to the text <code>prompt</code>,
usually at the expense of lower video quality.`,name:"guidance_scale"},{anchor:"diffusers.AllegroPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.AllegroPipeline.__call__.num_frames",description:`<strong>num_frames</strong> &#x2014; (<code>int</code>, <em>optional</em>, defaults to 88):
The number controls the generated video frames.`,name:"num_frames"},{anchor:"diffusers.AllegroPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) &#x2014;
The height in pixels of the generated video.`,name:"height"},{anchor:"diffusers.AllegroPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size) &#x2014;
The width in pixels of the generated video.`,name:"width"},{anchor:"diffusers.AllegroPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.AllegroPipeline.__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.AllegroPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for video
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.AllegroPipeline.__call__.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.AllegroPipeline.__call__.prompt_attention_mask",description:"<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014; Pre-generated attention mask for text embeddings.",name:"prompt_attention_mask"},{anchor:"diffusers.AllegroPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be &quot;&quot;. If not
provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AllegroPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.AllegroPipeline.__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 video. 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.AllegroPipeline.__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.IFPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.AllegroPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.Tensor)</code>.`,name:"callback"},{anchor:"diffusers.AllegroPipeline.__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 will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.AllegroPipeline.__call__.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the caption before creating embeddings. Requires <code>beautifulsoup4</code> and <code>ftfy</code> to
be installed. If the dependencies are not installed, the embeddings will be created from the raw
prompt.`,name:"clean_caption"},{anchor:"diffusers.AllegroPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>512</code>) &#x2014;
Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L681",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/allegro#diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput"
>AllegroPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated videos.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/allegro#diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput"
>AllegroPipelineOutput</a> or <code>tuple</code></p>
`}}),C=new at({props:{anchor:"diffusers.AllegroPipeline.__call__.example",$$slots:{default:[dt]},$$scope:{ctx:R}}}),D=new G({props:{name:"disable_vae_slicing",anchor:"diffusers.AllegroPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L647"}}),F=new G({props:{name:"disable_vae_tiling",anchor:"diffusers.AllegroPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L662"}}),N=new G({props:{name:"enable_vae_slicing",anchor:"diffusers.AllegroPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L640"}}),X=new G({props:{name:"enable_vae_tiling",anchor:"diffusers.AllegroPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L654"}}),H=new G({props:{name:"encode_prompt",anchor:"diffusers.AllegroPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str = ''"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"clean_caption",val:": bool = False"},{name:"max_sequence_length",val:": int = 512"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.AllegroPipeline.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.AllegroPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt 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>). For
PixArt-Alpha, this should be &quot;&quot;.`,name:"negative_prompt"},{anchor:"diffusers.AllegroPipeline.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.AllegroPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
number of images that should be generated per prompt`,name:"num_videos_per_prompt"},{anchor:"diffusers.AllegroPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device to place the resulting embeddings on`,name:"device"},{anchor:"diffusers.AllegroPipeline.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.AllegroPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Alpha, it&#x2019;s should be the embeddings of the &quot;&quot;
string.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AllegroPipeline.encode_prompt.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the function will preprocess and clean the provided caption before encoding.`,name:"clean_caption"},{anchor:"diffusers.AllegroPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, defaults to 512) &#x2014; Maximum sequence length to use for the prompt.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_allegro.py#L206"}}),O=new We({props:{title:"AllegroPipelineOutput",local:"diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput",headingTag:"h2"}}),Y=new G({props:{name:"class diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput",anchor:"diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput",parameters:[{name:"frames",val:": typing.Union[torch.Tensor, numpy.ndarray, typing.List[typing.List[PIL.Image.Image]]]"}],parametersDescription:[{anchor:"diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput.frames",description:`<strong>frames</strong> (<code>torch.Tensor</code>, <code>np.ndarray</code>, or List[List[PIL.Image.Image]]) &#x2014;
List of video outputs - It can be a nested list of length <code>batch_size,</code> with each sub-list containing
denoised PIL image sequences of length <code>num_frames.</code> It can also be a NumPy array or Torch tensor of shape
<code>(batch_size, num_frames, channels, height, width)</code>.`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/allegro/pipeline_output.py#L11"}}),S=new lt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/allegro.md"}}),{c(){i=a("meta"),$=r(),g=a("p"),y=r(),u(x.$$.fragment),m=r(),T=a("p"),T.innerHTML=ze,le=r(),q=a("p"),q.textContent=Ve,pe=r(),E=a("p"),E.innerHTML=De,de=r(),u(J.$$.fragment),ce=r(),u(W.$$.fragment),me=r(),p=a("div"),u(z.$$.fragment),$e=r(),Q=a("p"),Q.textContent=Fe,Me=r(),K=a("p"),K.innerHTML=Ne,Ae=r(),M=a("div"),u(V.$$.fragment),Pe=r(),ee=a("p"),ee.textContent=Xe,Ie=r(),u(C.$$.fragment),ke=r(),j=a("div"),u(D.$$.fragment),Je=r(),te=a("p"),te.innerHTML=He,Ce=r(),L=a("div"),u(F.$$.fragment),je=r(),ne=a("p"),ne.innerHTML=Oe,Le=r(),U=a("div"),u(N.$$.fragment),Ue=r(),oe=a("p"),oe.textContent=Ye,Ze=r(),Z=a("div"),u(X.$$.fragment),Be=r(),re=a("p"),re.textContent=Se,Ge=r(),B=a("div"),u(H.$$.fragment),qe=r(),se=a("p"),se.textContent=Re,ge=r(),u(O.$$.fragment),ue=r(),I=a("div"),u(Y.$$.fragment),Ee=r(),ie=a("p"),ie.textContent=Qe,fe=r(),u(S.$$.fragment),he=r(),ae=a("p"),this.h()},l(e){const n=rt("svelte-u9bgzb",document.head);i=l(n,"META",{name:!0,content:!0}),n.forEach(t),$=s(e),g=l(e,"P",{}),A(g).forEach(t),y=s(e),f(x.$$.fragment,e),m=s(e),T=l(e,"P",{"data-svelte-h":!0}),w(T)!=="svelte-17qj9tz"&&(T.innerHTML=ze),le=s(e),q=l(e,"P",{"data-svelte-h":!0}),w(q)!=="svelte-1cwsb16"&&(q.textContent=Ve),pe=s(e),E=l(e,"P",{"data-svelte-h":!0}),w(E)!=="svelte-159uw6t"&&(E.innerHTML=De),de=s(e),f(J.$$.fragment,e),ce=s(e),f(W.$$.fragment,e),me=s(e),p=l(e,"DIV",{class:!0});var c=A(p);f(z.$$.fragment,c),$e=s(c),Q=l(c,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-122gdxk"&&(Q.textContent=Fe),Me=s(c),K=l(c,"P",{"data-svelte-h":!0}),w(K)!=="svelte-wu1jmh"&&(K.innerHTML=Ne),Ae=s(c),M=l(c,"DIV",{class:!0});var k=A(M);f(V.$$.fragment,k),Pe=s(k),ee=l(k,"P",{"data-svelte-h":!0}),w(ee)!=="svelte-v78lg8"&&(ee.textContent=Xe),Ie=s(k),f(C.$$.fragment,k),k.forEach(t),ke=s(c),j=l(c,"DIV",{class:!0});var be=A(j);f(D.$$.fragment,be),Je=s(be),te=l(be,"P",{"data-svelte-h":!0}),w(te)!=="svelte-1s3c06i"&&(te.innerHTML=He),be.forEach(t),Ce=s(c),L=l(c,"DIV",{class:!0});var ve=A(L);f(F.$$.fragment,ve),je=s(ve),ne=l(ve,"P",{"data-svelte-h":!0}),w(ne)!=="svelte-pkn4ui"&&(ne.innerHTML=Oe),ve.forEach(t),Le=s(c),U=l(c,"DIV",{class:!0});var ye=A(U);f(N.$$.fragment,ye),Ue=s(ye),oe=l(ye,"P",{"data-svelte-h":!0}),w(oe)!=="svelte-14bnrb6"&&(oe.textContent=Ye),ye.forEach(t),Ze=s(c),Z=l(c,"DIV",{class:!0});var we=A(Z);f(X.$$.fragment,we),Be=s(we),re=l(we,"P",{"data-svelte-h":!0}),w(re)!=="svelte-1xwrf7t"&&(re.textContent=Se),we.forEach(t),Ge=s(c),B=l(c,"DIV",{class:!0});var xe=A(B);f(H.$$.fragment,xe),qe=s(xe),se=l(xe,"P",{"data-svelte-h":!0}),w(se)!=="svelte-16q0ax1"&&(se.textContent=Re),xe.forEach(t),c.forEach(t),ge=s(e),f(O.$$.fragment,e),ue=s(e),I=l(e,"DIV",{class:!0});var Te=A(I);f(Y.$$.fragment,Te),Ee=s(Te),ie=l(Te,"P",{"data-svelte-h":!0}),w(ie)!=="svelte-1wjc5n1"&&(ie.textContent=Qe),Te.forEach(t),fe=s(e),f(S.$$.fragment,e),he=s(e),ae=l(e,"P",{}),A(ae).forEach(t),this.h()},h(){P(i,"name","hf:doc:metadata"),P(i,"content",mt),P(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(p,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),P(I,"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,n){o(document.head,i),d(e,$,n),d(e,g,n),d(e,y,n),h(x,e,n),d(e,m,n),d(e,T,n),d(e,le,n),d(e,q,n),d(e,pe,n),d(e,E,n),d(e,de,n),h(J,e,n),d(e,ce,n),h(W,e,n),d(e,me,n),d(e,p,n),h(z,p,null),o(p,$e),o(p,Q),o(p,Me),o(p,K),o(p,Ae),o(p,M),h(V,M,null),o(M,Pe),o(M,ee),o(M,Ie),h(C,M,null),o(p,ke),o(p,j),h(D,j,null),o(j,Je),o(j,te),o(p,Ce),o(p,L),h(F,L,null),o(L,je),o(L,ne),o(p,Le),o(p,U),h(N,U,null),o(U,Ue),o(U,oe),o(p,Ze),o(p,Z),h(X,Z,null),o(Z,Be),o(Z,re),o(p,Ge),o(p,B),h(H,B,null),o(B,qe),o(B,se),d(e,ge,n),h(O,e,n),d(e,ue,n),d(e,I,n),h(Y,I,null),o(I,Ee),o(I,ie),d(e,fe,n),h(S,e,n),d(e,he,n),d(e,ae,n),_e=!0},p(e,[n]){const c={};n&2&&(c.$$scope={dirty:n,ctx:e}),J.$set(c);const k={};n&2&&(k.$$scope={dirty:n,ctx:e}),C.$set(k)},i(e){_e||(_(x.$$.fragment,e),_(J.$$.fragment,e),_(W.$$.fragment,e),_(z.$$.fragment,e),_(V.$$.fragment,e),_(C.$$.fragment,e),_(D.$$.fragment,e),_(F.$$.fragment,e),_(N.$$.fragment,e),_(X.$$.fragment,e),_(H.$$.fragment,e),_(O.$$.fragment,e),_(Y.$$.fragment,e),_(S.$$.fragment,e),_e=!0)},o(e){b(x.$$.fragment,e),b(J.$$.fragment,e),b(W.$$.fragment,e),b(z.$$.fragment,e),b(V.$$.fragment,e),b(C.$$.fragment,e),b(D.$$.fragment,e),b(F.$$.fragment,e),b(N.$$.fragment,e),b(X.$$.fragment,e),b(H.$$.fragment,e),b(O.$$.fragment,e),b(Y.$$.fragment,e),b(S.$$.fragment,e),_e=!1},d(e){e&&(t($),t(g),t(y),t(m),t(T),t(le),t(q),t(pe),t(E),t(de),t(ce),t(me),t(p),t(ge),t(ue),t(I),t(fe),t(he),t(ae)),t(i),v(x,e),v(J,e),v(W,e),v(z),v(V),v(C),v(D),v(F),v(N),v(X),v(H),v(O,e),v(Y),v(S,e)}}}const mt='{"title":"Allegro","local":"allegro","sections":[{"title":"AllegroPipeline","local":"diffusers.AllegroPipeline","sections":[],"depth":2},{"title":"AllegroPipelineOutput","local":"diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput","sections":[],"depth":2}],"depth":1}';function gt(R){return tt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends nt{constructor(i){super(),ot(this,i,gt,ct,et,{})}}export{wt as component};
