import{s as $e,o as Pe,n as Ae}from"../chunks/scheduler.8c3d61f6.js";import{S as Ie,i as ke,g as l,s,r as _,A as Je,h as p,f as n,c as a,j as Y,u as v,x as A,k as D,y as c,a as r,v as b,d as y,t as w,w as x}from"../chunks/index.da70eac4.js";import{T as je}from"../chunks/Tip.1d9b8c37.js";import{D as ie}from"../chunks/Docstring.6b390b9a.js";import{C as Ce}from"../chunks/CodeBlock.00a903b3.js";import{E as Ue}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as he,E as Ze}from"../chunks/EditOnGithub.1e64e623.js";function Be(z){let o,T='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=T},l(d){o=p(d,"P",{"data-svelte-h":!0}),A(o)!=="svelte-w7r39y"&&(o.innerHTML=T)},m(d,g){r(d,o,g)},p:Ae,d(d){d&&n(o)}}}function qe(z){let o,T="Examples:",d,g,f;return g=new Ce({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXV0b2VuY29kZXJLTEFsbGVncm8lMkMlMjBBbGxlZ3JvUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBdmFlJTIwJTNEJTIwQXV0b2VuY29kZXJLTEFsbGVncm8uZnJvbV9wcmV0cmFpbmVkKCUyMnJoeW1lcy1haSUyRkFsbGVncm8lMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ2YWUlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MzIpJTBBcGlwZSUyMCUzRCUyMEFsbGVncm9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycmh5bWVzLWFpJTJGQWxsZWdybyUyMiUyQyUyMHZhZSUzRHZhZSUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwKCUwQSUyMCUyMCUyMCUyMCUyMkElMjBzZWFzaWRlJTIwaGFyYm9yJTIwd2l0aCUyMGJyaWdodCUyMHN1bmxpZ2h0JTIwYW5kJTIwc3BhcmtsaW5nJTIwc2Vhd2F0ZXIlMkMlMjB3aXRoJTIwbWFueSUyMGJvYXRzJTIwaW4lMjB0aGUlMjB3YXRlci4lMjBGcm9tJTIwYW4lMjBhZXJpYWwlMjB2aWV3JTJDJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIydGhlJTIwYm9hdHMlMjB2YXJ5JTIwaW4lMjBzaXplJTIwYW5kJTIwY29sb3IlMkMlMjBzb21lJTIwbW92aW5nJTIwYW5kJTIwc29tZSUyMHN0YXRpb25hcnkuJTIwRmlzaGluZyUyMGJvYXRzJTIwaW4lMjB0aGUlMjB3YXRlciUyMHN1Z2dlc3QlMjB0aGF0JTIwdGhpcyUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmxvY2F0aW9uJTIwbWlnaHQlMjBiZSUyMGElMjBwb3B1bGFyJTIwc3BvdCUyMGZvciUyMGRvY2tpbmclMjBmaXNoaW5nJTIwYm9hdHMuJTIyJTBBKSUwQXZpZGVvJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBndWlkYW5jZV9zY2FsZSUzRDcuNSUyQyUyMG1heF9zZXF1ZW5jZV9sZW5ndGglM0Q1MTIpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXRwdXQubXA0JTIyJTJDJTIwZnBzJTNEMTUp",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>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(){o=l("p"),o.textContent=T,d=s(),_(g.$$.fragment)},l(i){o=p(i,"P",{"data-svelte-h":!0}),A(o)!=="svelte-kvfsh7"&&(o.textContent=T),d=a(i),v(g.$$.fragment,i)},m(i,h){r(i,o,h),r(i,d,h),b(g,i,h),f=!0},p:Ae,i(i){f||(y(g.$$.fragment,i),f=!0)},o(i){w(g.$$.fragment,i),f=!1},d(i){i&&(n(o),n(d)),x(g,i)}}}function Ge(z){let o,T,d,g,f,i,h,_e='<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.',V,j,ve="The abstract from the paper is:",S,C,be='<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>',R,I,Q,U,K,m,Z,le,N,ye="Pipeline for text-to-video generation using Allegro.",pe,E,we=`This model inherits from <a href="/docs/diffusers/pr_10000/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.)`,de,M,B,ce,F,xe="Function invoked when calling the pipeline for generation.",me,k,ge,J,q,ue,O,Te="Encodes the prompt into text encoder hidden states.",ee,G,te,$,L,fe,X,Me="Output class for Allegro pipelines.",ne,W,oe,H,re;return f=new he({props:{title:"Allegro",local:"allegro",headingTag:"h1"}}),I=new je({props:{$$slots:{default:[Be]},$$scope:{ctx:z}}}),U=new he({props:{title:"AllegroPipeline",local:"diffusers.AllegroPipeline",headingTag:"h2"}}),Z=new ie({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/pr_10000/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/pr_10000/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/vr_10000/src/diffusers/pipelines/allegro/pipeline_allegro.py#L134"}}),B=new ie({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/pr_10000/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/vr_10000/src/diffusers/pipelines/allegro/pipeline_allegro.py#L661",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/pr_10000/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/pr_10000/en/api/pipelines/allegro#diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput"
>AllegroPipelineOutput</a> or <code>tuple</code></p>
`}}),k=new Ue({props:{anchor:"diffusers.AllegroPipeline.__call__.example",$$slots:{default:[qe]},$$scope:{ctx:z}}}),q=new ie({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/vr_10000/src/diffusers/pipelines/allegro/pipeline_allegro.py#L205"}}),G=new he({props:{title:"AllegroPipelineOutput",local:"diffusers.pipelines.allegro.pipeline_output.AllegroPipelineOutput",headingTag:"h2"}}),L=new ie({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/vr_10000/src/diffusers/pipelines/allegro/pipeline_output.py#L11"}}),W=new Ze({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/allegro.md"}}),{c(){o=l("meta"),T=s(),d=l("p"),g=s(),_(f.$$.fragment),i=s(),h=l("p"),h.innerHTML=_e,V=s(),j=l("p"),j.textContent=ve,S=s(),C=l("p"),C.innerHTML=be,R=s(),_(I.$$.fragment),Q=s(),_(U.$$.fragment),K=s(),m=l("div"),_(Z.$$.fragment),le=s(),N=l("p"),N.textContent=ye,pe=s(),E=l("p"),E.innerHTML=we,de=s(),M=l("div"),_(B.$$.fragment),ce=s(),F=l("p"),F.textContent=xe,me=s(),_(k.$$.fragment),ge=s(),J=l("div"),_(q.$$.fragment),ue=s(),O=l("p"),O.textContent=Te,ee=s(),_(G.$$.fragment),te=s(),$=l("div"),_(L.$$.fragment),fe=s(),X=l("p"),X.textContent=Me,ne=s(),_(W.$$.fragment),oe=s(),H=l("p"),this.h()},l(e){const t=Je("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(n),T=a(e),d=p(e,"P",{}),Y(d).forEach(n),g=a(e),v(f.$$.fragment,e),i=a(e),h=p(e,"P",{"data-svelte-h":!0}),A(h)!=="svelte-17qj9tz"&&(h.innerHTML=_e),V=a(e),j=p(e,"P",{"data-svelte-h":!0}),A(j)!=="svelte-1cwsb16"&&(j.textContent=ve),S=a(e),C=p(e,"P",{"data-svelte-h":!0}),A(C)!=="svelte-159uw6t"&&(C.innerHTML=be),R=a(e),v(I.$$.fragment,e),Q=a(e),v(U.$$.fragment,e),K=a(e),m=p(e,"DIV",{class:!0});var u=Y(m);v(Z.$$.fragment,u),le=a(u),N=p(u,"P",{"data-svelte-h":!0}),A(N)!=="svelte-122gdxk"&&(N.textContent=ye),pe=a(u),E=p(u,"P",{"data-svelte-h":!0}),A(E)!=="svelte-ldepl4"&&(E.innerHTML=we),de=a(u),M=p(u,"DIV",{class:!0});var P=Y(M);v(B.$$.fragment,P),ce=a(P),F=p(P,"P",{"data-svelte-h":!0}),A(F)!=="svelte-v78lg8"&&(F.textContent=xe),me=a(P),v(k.$$.fragment,P),P.forEach(n),ge=a(u),J=p(u,"DIV",{class:!0});var se=Y(J);v(q.$$.fragment,se),ue=a(se),O=p(se,"P",{"data-svelte-h":!0}),A(O)!=="svelte-16q0ax1"&&(O.textContent=Te),se.forEach(n),u.forEach(n),ee=a(e),v(G.$$.fragment,e),te=a(e),$=p(e,"DIV",{class:!0});var ae=Y($);v(L.$$.fragment,ae),fe=a(ae),X=p(ae,"P",{"data-svelte-h":!0}),A(X)!=="svelte-1wjc5n1"&&(X.textContent=Me),ae.forEach(n),ne=a(e),v(W.$$.fragment,e),oe=a(e),H=p(e,"P",{}),Y(H).forEach(n),this.h()},h(){D(o,"name","hf:doc:metadata"),D(o,"content",Le),D(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D($,"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),r(e,T,t),r(e,d,t),r(e,g,t),b(f,e,t),r(e,i,t),r(e,h,t),r(e,V,t),r(e,j,t),r(e,S,t),r(e,C,t),r(e,R,t),b(I,e,t),r(e,Q,t),b(U,e,t),r(e,K,t),r(e,m,t),b(Z,m,null),c(m,le),c(m,N),c(m,pe),c(m,E),c(m,de),c(m,M),b(B,M,null),c(M,ce),c(M,F),c(M,me),b(k,M,null),c(m,ge),c(m,J),b(q,J,null),c(J,ue),c(J,O),r(e,ee,t),b(G,e,t),r(e,te,t),r(e,$,t),b(L,$,null),c($,fe),c($,X),r(e,ne,t),b(W,e,t),r(e,oe,t),r(e,H,t),re=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),I.$set(u);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),k.$set(P)},i(e){re||(y(f.$$.fragment,e),y(I.$$.fragment,e),y(U.$$.fragment,e),y(Z.$$.fragment,e),y(B.$$.fragment,e),y(k.$$.fragment,e),y(q.$$.fragment,e),y(G.$$.fragment,e),y(L.$$.fragment,e),y(W.$$.fragment,e),re=!0)},o(e){w(f.$$.fragment,e),w(I.$$.fragment,e),w(U.$$.fragment,e),w(Z.$$.fragment,e),w(B.$$.fragment,e),w(k.$$.fragment,e),w(q.$$.fragment,e),w(G.$$.fragment,e),w(L.$$.fragment,e),w(W.$$.fragment,e),re=!1},d(e){e&&(n(T),n(d),n(g),n(i),n(h),n(V),n(j),n(S),n(C),n(R),n(Q),n(K),n(m),n(ee),n(te),n($),n(ne),n(oe),n(H)),n(o),x(f,e),x(I,e),x(U,e),x(Z),x(B),x(k),x(q),x(G,e),x(L),x(W,e)}}}const Le='{"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 We(z){return Pe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class De extends Ie{constructor(o){super(),ke(this,o,We,Ge,$e,{})}}export{De as component};
