import{s as mt,o as dt,n as ct}from"../chunks/scheduler.53228c21.js";import{S as ut,i as ft,e as o,s,c as y,h as ht,a as l,d as n,b as i,f as se,g as b,j as r,k as ie,l as p,m as a,n as M,t as _,o as w,p as v}from"../chunks/index.100fac89.js";import{D as Ze}from"../chunks/Docstring.d02a9fa5.js";import{C as pt}from"../chunks/CodeBlock.d30a6509.js";import{E as gt}from"../chunks/ExampleCodeBlock.38517eb4.js";import{H as Ie,E as yt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.62dbb7c4.js";function bt(le){let d,B="Examples:",T,f,h;return f=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRWFzeUFuaW1hdGVQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fdmlkZW8lMEElMEElMjMlMjBNb2RlbHMlM0ElMjAlMjJhbGliYWJhLXBhaSUyRkVhc3lBbmltYXRlVjUuMS0xMmItemglMjIlMEFwaXBlJTIwJTNEJTIwRWFzeUFuaW1hdGVQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYWxpYmFiYS1wYWklMkZFYXN5QW5pbWF0ZVY1LjEtN2ItemgtZGlmZnVzZXJzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCglMEElMjAlMjAlMjAlMjAlMjJBJTIwcGFuZGElMkMlMjBkcmVzc2VkJTIwaW4lMjBhJTIwc21hbGwlMkMlMjByZWQlMjBqYWNrZXQlMjBhbmQlMjBhJTIwdGlueSUyMGhhdCUyQyUyMHNpdHMlMjBvbiUyMGElMjB3b29kZW4lMjBzdG9vbCUyMGluJTIwYSUyMHNlcmVuZSUyMGJhbWJvbyUyMGZvcmVzdC4lMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJUaGUlMjBwYW5kYSdzJTIwZmx1ZmZ5JTIwcGF3cyUyMHN0cnVtJTIwYSUyMG1pbmlhdHVyZSUyMGFjb3VzdGljJTIwZ3VpdGFyJTJDJTIwcHJvZHVjaW5nJTIwc29mdCUyQyUyMG1lbG9kaWMlMjB0dW5lcy4lMjBOZWFyYnklMkMlMjBhJTIwZmV3JTIwb3RoZXIlMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJwYW5kYXMlMjBnYXRoZXIlMkMlMjB3YXRjaGluZyUyMGN1cmlvdXNseSUyMGFuZCUyMHNvbWUlMjBjbGFwcGluZyUyMGluJTIwcmh5dGhtLiUyMFN1bmxpZ2h0JTIwZmlsdGVycyUyMHRocm91Z2glMjB0aGUlMjB0YWxsJTIwYmFtYm9vJTJDJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIyY2FzdGluZyUyMGElMjBnZW50bGUlMjBnbG93JTIwb24lMjB0aGUlMjBzY2VuZS4lMjBUaGUlMjBwYW5kYSdzJTIwZmFjZSUyMGlzJTIwZXhwcmVzc2l2ZSUyQyUyMHNob3dpbmclMjBjb25jZW50cmF0aW9uJTIwYW5kJTIwam95JTIwYXMlMjBpdCUyMHBsYXlzLiUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMlRoZSUyMGJhY2tncm91bmQlMjBpbmNsdWRlcyUyMGElMjBzbWFsbCUyQyUyMGZsb3dpbmclMjBzdHJlYW0lMjBhbmQlMjB2aWJyYW50JTIwZ3JlZW4lMjBmb2xpYWdlJTJDJTIwZW5oYW5jaW5nJTIwdGhlJTIwcGVhY2VmdWwlMjBhbmQlMjBtYWdpY2FsJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIyYXRtb3NwaGVyZSUyMG9mJTIwdGhpcyUyMHVuaXF1ZSUyMG11c2ljYWwlMjBwZXJmb3JtYW5jZS4lMjIlMEEpJTBBc2FtcGxlX3NpemUlMjAlM0QlMjAoNTEyJTJDJTIwNTEyKSUwQXZpZGVvJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDYlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0QlMjJiYWQlMjBkZXRhaWxlZCUyMiUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRHNhbXBsZV9zaXplJTVCMCU1RCUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNEc2FtcGxlX3NpemUlNUIxJTVEJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDgp",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> EasyAnimatePipeline
<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><span class="hljs-comment"># Models: &quot;alibaba-pai/EasyAnimateV5.1-12b-zh&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = EasyAnimatePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;alibaba-pai/EasyAnimateV5.1-7b-zh-diffusers&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>).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 panda, dressed in a small, red jacket and a tiny hat, sits on a wooden stool in a serene bamboo forest. &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;The panda&#x27;s fluffy paws strum a miniature acoustic guitar, producing soft, melodic tunes. Nearby, a few other &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;pandas gather, watching curiously and some clapping in rhythm. Sunlight filters through the tall bamboo, &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;casting a gentle glow on the scene. The panda&#x27;s face is expressive, showing concentration and joy as it plays. &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;The background includes a small, flowing stream and vibrant green foliage, enhancing the peaceful and magical &quot;</span>
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;atmosphere of this unique musical performance.&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sample_size = (<span class="hljs-number">512</span>, <span class="hljs-number">512</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = pipe(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">6</span>,
<span class="hljs-meta">... </span>    negative_prompt=<span class="hljs-string">&quot;bad detailed&quot;</span>,
<span class="hljs-meta">... </span>    height=sample_size[<span class="hljs-number">0</span>],
<span class="hljs-meta">... </span>    width=sample_size[<span class="hljs-number">1</span>],
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </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">8</span>)`,wrap:!1}}),{c(){d=o("p"),d.textContent=B,T=s(),y(f.$$.fragment)},l(m){d=l(m,"P",{"data-svelte-h":!0}),r(d)!=="svelte-kvfsh7"&&(d.textContent=B),T=i(m),b(f.$$.fragment,m)},m(m,j){a(m,d,j),a(m,T,j),M(f,m,j),h=!0},p:ct,i(m){h||(_(f.$$.fragment,m),h=!0)},o(m){w(f.$$.fragment,m),h=!1},d(m){m&&(n(d),n(T)),v(f,m)}}}function Mt(le){let d,B,T,f,h,m,j,He='<a href="https://github.com/aigc-apps/EasyAnimate" rel="nofollow">EasyAnimate</a> by Alibaba PAI.',re,U,Xe=`The description from it’s GitHub page:
<em>EasyAnimate is a pipeline based on the transformer architecture, designed for generating AI images and videos, and for training baseline models and Lora models for Diffusion Transformer. We support direct prediction from pre-trained EasyAnimate models, allowing for the generation of videos with various resolutions, approximately 6 seconds in length, at 8fps (EasyAnimateV5.1, 1 to 49 frames). Additionally, users can train their own baseline and Lora models for specific style transformations.</em>`,pe,Z,qe='This pipeline was contributed by <a href="https://github.com/bubbliiiing" rel="nofollow">bubbliiiing</a>. The original codebase can be found <a href="https://huggingface.co/alibaba-pai" rel="nofollow">here</a>. The original weights can be found under <a href="https://huggingface.co/alibaba-pai" rel="nofollow">hf.co/alibaba-pai</a>.',me,I,Ye="There are two official EasyAnimate checkpoints for text-to-video and video-to-video.",de,k,Qe='<thead><tr><th align="center">checkpoints</th> <th align="center">recommended inference dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/alibaba-pai/EasyAnimateV5.1-12b-zh" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh</code></a></td> <td align="center">torch.float16</td></tr> <tr><td align="center"><a href="https://huggingface.co/alibaba-pai/EasyAnimateV5.1-12b-zh-InP" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh-InP</code></a></td> <td align="center">torch.float16</td></tr></tbody>',ce,C,Re="There is one official EasyAnimate checkpoints available for image-to-video and video-to-video.",ue,z,Fe='<thead><tr><th align="center">checkpoints</th> <th align="center">recommended inference dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/alibaba-pai/EasyAnimateV5.1-12b-zh-InP" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh-InP</code></a></td> <td align="center">torch.float16</td></tr></tbody>',fe,$,Se="There are two official EasyAnimate checkpoints available for control-to-video.",he,W,De='<thead><tr><th align="center">checkpoints</th> <th align="center">recommended inference dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/alibaba-pai/EasyAnimateV5.1-12b-zh-Control" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh-Control</code></a></td> <td align="center">torch.float16</td></tr> <tr><td align="center"><a href="https://huggingface.co/alibaba-pai/EasyAnimateV5.1-12b-zh-Control-Camera" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh-Control-Camera</code></a></td> <td align="center">torch.float16</td></tr></tbody>',ge,G,Oe="For the EasyAnimateV5.1 series:",ye,V,Ke="<li>Text-to-video (T2V) and Image-to-video (I2V) works for multiple resolutions. The width and height can vary from 256 to 1024.</li> <li>Both T2V and I2V models support generation with 1~49 frames and work best at this value. Exporting videos at 8 FPS is recommended.</li>",be,P,Me,N,et="Quantization helps reduce the memory requirements of very large models by storing model weights in a lower precision data type. However, quantization may have varying impact on video quality depending on the video model.",_e,L,tt='Refer to the <a href="../../quantization/overview">Quantization</a> overview to learn more about supported quantization backends and selecting a quantization backend that supports your use case. The example below demonstrates how to load a quantized <a href="/docs/diffusers/main/en/api/pipelines/easyanimate#diffusers.EasyAnimatePipeline">EasyAnimatePipeline</a> for inference with bitsandbytes.',we,H,ve,X,je,c,q,ke,D,nt="Pipeline for text-to-video generation using EasyAnimate.",Ce,O,at=`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.)`,ze,K,st='EasyAnimate uses one text encoder <a href="https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct" rel="nofollow">qwen2 vl</a> in V5.1.',$e,g,Y,We,ee,it="Generates images or video using the EasyAnimate pipeline based on the provided prompts.",Ge,E,Ve,te,ot=`prompt (<code>str</code> or <code>List[str]</code>, <em>optional</em>):
Text prompts to guide the image or video generation. If not provided, use <code>prompt_embeds</code> instead.
num_frames (<code>int</code>, <em>optional</em>):
Length of the generated video (in frames).
height (<code>int</code>, <em>optional</em>):
Height of the generated image in pixels.
width (<code>int</code>, <em>optional</em>):
Width of the generated image in pixels.
num_inference_steps (<code>int</code>, <em>optional</em>, defaults to 50):
Number of denoising steps during generation. More steps generally yield higher quality images but slow
down inference.
guidance_scale (<code>float</code>, <em>optional</em>, defaults to 5.0):
Encourages the model to align outputs with prompts. A higher value may decrease image quality.
negative_prompt (<code>str</code> or <code>List[str]</code>, <em>optional</em>):
Prompts indicating what to exclude in generation. If not specified, use <code>negative_prompt_embeds</code>.
num_images_per_prompt (<code>int</code>, <em>optional</em>, defaults to 1):
Number of images to generate for each prompt.
eta (<code>float</code>, <em>optional</em>, defaults to 0.0):
Applies to DDIM scheduling. Controlled by the eta parameter from the related literature.
generator (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>):
A generator to ensure reproducibility in image generation.
latents (<code>torch.Tensor</code>, <em>optional</em>):
Predefined latent tensors to condition generation.
prompt_embeds (<code>torch.Tensor</code>, <em>optional</em>):
Text embeddings for the prompts. Overrides prompt string inputs for more flexibility.
negative_prompt_embeds (<code>torch.Tensor</code>, <em>optional</em>):
Embeddings for negative prompts. Overrides string inputs if defined.
prompt_attention_mask (<code>torch.Tensor</code>, <em>optional</em>):
Attention mask for the primary prompt embeddings.
negative_prompt_attention_mask (<code>torch.Tensor</code>, <em>optional</em>):
Attention mask for negative prompt embeddings.
output_type (<code>str</code>, <em>optional</em>, defaults to “latent”):
Format of the generated output, either as a PIL image or as a NumPy array.
return_dict (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>):
If <code>True</code>, returns a structured output. Otherwise returns a simple tuple.
callback_on_step_end (<code>Callable</code>, <em>optional</em>):
Functions called at the end of each denoising step.
callback_on_step_end_tensor_inputs (<code>List[str]</code>, <em>optional</em>):
Tensor names to be included in callback function calls.
guidance_rescale (<code>float</code>, <em>optional</em>, defaults to 0.0):
Adjusts noise levels based on guidance scale.
original_size (<code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>(1024, 1024)</code>):
Original dimensions of the output.
target_size (<code>Tuple[int, int]</code>, <em>optional</em>):
Desired output dimensions for calculations.
crops_coords_top_left (<code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>(0, 0)</code>):
Coordinates for cropping.`,Pe,A,Q,Ne,ne,lt="Encodes the prompt into text encoder hidden states.",Te,R,Je,J,F,Le,ae,rt="Output class for EasyAnimate pipelines.",Ee,S,Ae,oe,xe;return h=new Ie({props:{title:"EasyAnimate",local:"easyanimate",headingTag:"h1"}}),P=new Ie({props:{title:"Quantization",local:"quantization",headingTag:"h2"}}),H=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTIwYXMlMjBEaWZmdXNlcnNCaXRzQW5kQnl0ZXNDb25maWclMkMlMjBFYXN5QW5pbWF0ZVRyYW5zZm9ybWVyM0RNb2RlbCUyQyUyMEVhc3lBbmltYXRlUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcXVhbnRfY29uZmlnJTIwJTNEJTIwRGlmZnVzZXJzQml0c0FuZEJ5dGVzQ29uZmlnKGxvYWRfaW5fOGJpdCUzRFRydWUpJTBBdHJhbnNmb3JtZXJfOGJpdCUyMCUzRCUyMEVhc3lBbmltYXRlVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJhbGliYWJhLXBhaSUyRkVhc3lBbmltYXRlVjUuMS0xMmItemglMjIlMkMlMEElMjAlMjAlMjAlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RxdWFudF9jb25maWclMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBFYXN5QW5pbWF0ZVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJhbGliYWJhLXBhaSUyRkVhc3lBbmltYXRlVjUuMS0xMmItemglMjIlMkMlMEElMjAlMjAlMjAlMjB0cmFuc2Zvcm1lciUzRHRyYW5zZm9ybWVyXzhiaXQlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBkZXZpY2VfbWFwJTNEJTIyYmFsYW5jZWQlMjIlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGNhdCUyMHdhbGtzJTIwb24lMjB0aGUlMjBncmFzcyUyQyUyMHJlYWxpc3RpYyUyMHN0eWxlLiUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMmJhZCUyMGRldGFpbGVkJTIyJTBBdmlkZW8lMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlM0Rwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMjBudW1fZnJhbWVzJTNENDklMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzApLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJjYXQubXA0JTIyJTJDJTIwZnBzJTNEOCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> DiffusersBitsAndBytesConfig, EasyAnimateTransformer3DModel, EasyAnimatePipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

quant_config = DiffusersBitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>)
transformer_8bit = EasyAnimateTransformer3DModel.from_pretrained(
    <span class="hljs-string">&quot;alibaba-pai/EasyAnimateV5.1-12b-zh&quot;</span>,
    subfolder=<span class="hljs-string">&quot;transformer&quot;</span>,
    quantization_config=quant_config,
    torch_dtype=torch.float16,
)

pipeline = EasyAnimatePipeline.from_pretrained(
    <span class="hljs-string">&quot;alibaba-pai/EasyAnimateV5.1-12b-zh&quot;</span>,
    transformer=transformer_8bit,
    torch_dtype=torch.float16,
    device_map=<span class="hljs-string">&quot;balanced&quot;</span>,
)

prompt = <span class="hljs-string">&quot;A cat walks on the grass, realistic style.&quot;</span>
negative_prompt = <span class="hljs-string">&quot;bad detailed&quot;</span>
video = pipeline(prompt=prompt, negative_prompt=negative_prompt, num_frames=<span class="hljs-number">49</span>, num_inference_steps=<span class="hljs-number">30</span>).frames[<span class="hljs-number">0</span>]
export_to_video(video, <span class="hljs-string">&quot;cat.mp4&quot;</span>, fps=<span class="hljs-number">8</span>)`,wrap:!1}}),X=new Ie({props:{title:"EasyAnimatePipeline",local:"diffusers.EasyAnimatePipeline",headingTag:"h2"}}),q=new Ze({props:{name:"class diffusers.EasyAnimatePipeline",anchor:"diffusers.EasyAnimatePipeline",parameters:[{name:"vae",val:": AutoencoderKLMagvit"},{name:"text_encoder",val:": typing.Union[transformers.models.qwen2_vl.modeling_qwen2_vl.Qwen2VLForConditionalGeneration, transformers.models.bert.modeling_bert.BertModel]"},{name:"tokenizer",val:": typing.Union[transformers.models.qwen2.tokenization_qwen2.Qwen2Tokenizer, transformers.models.bert.tokenization_bert.BertTokenizer]"},{name:"transformer",val:": EasyAnimateTransformer3DModel"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.EasyAnimatePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl_magvit#diffusers.AutoencoderKLMagvit">AutoencoderKLMagvit</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode video to and from latent representations.`,name:"vae"},{anchor:"diffusers.EasyAnimatePipeline.text_encoder",description:`<strong>text_encoder</strong> (Optional[<code>~transformers.Qwen2VLForConditionalGeneration</code>, <code>~transformers.BertModel</code>]) &#x2014;
EasyAnimate uses <a href="https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct" rel="nofollow">qwen2 vl</a> in V5.1.`,name:"text_encoder"},{anchor:"diffusers.EasyAnimatePipeline.tokenizer",description:`<strong>tokenizer</strong> (Optional[<code>~transformers.Qwen2Tokenizer</code>, <code>~transformers.BertTokenizer</code>]) &#x2014;
A <code>Qwen2Tokenizer</code> or <code>BertTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.EasyAnimatePipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/easyanimate_transformer3d#diffusers.EasyAnimateTransformer3DModel">EasyAnimateTransformer3DModel</a>) &#x2014;
The EasyAnimate model designed by EasyAnimate Team.`,name:"transformer"},{anchor:"diffusers.EasyAnimatePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with EasyAnimate to denoise the encoded image latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L186"}}),Y=new Ze({props:{name:"__call__",anchor:"diffusers.EasyAnimatePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"num_frames",val:": typing.Optional[int] = 49"},{name:"height",val:": typing.Optional[int] = 512"},{name:"width",val:": typing.Optional[int] = 512"},{name:"num_inference_steps",val:": typing.Optional[int] = 50"},{name:"guidance_scale",val:": typing.Optional[float] = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": typing.Optional[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:"timesteps",val:": typing.Optional[typing.List[int]] = 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:"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:"guidance_rescale",val:": float = 0.0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L524",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated images and the
second element is a list of <code>bool</code>s indicating whether the corresponding generated image contains
“not-safe-for-work” (nsfw) content.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput"
>StableDiffusionPipelineOutput</a> or <code>tuple</code></p>
`}}),E=new gt({props:{anchor:"diffusers.EasyAnimatePipeline.__call__.example",$$slots:{default:[bt]},$$scope:{ctx:le}}}),Q=new Ze({props:{name:"encode_prompt",anchor:"diffusers.EasyAnimatePipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = 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:"device",val:": typing.Optional[torch.device] = None"},{name:"dtype",val:": typing.Optional[torch.dtype] = None"},{name:"max_sequence_length",val:": int = 256"}],parametersDescription:[{anchor:"diffusers.EasyAnimatePipeline.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.EasyAnimatePipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>) &#x2014;
torch dtype`,name:"dtype"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.EasyAnimatePipeline.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.EasyAnimatePipeline.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.EasyAnimatePipeline.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.EasyAnimatePipeline.encode_prompt.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Attention mask for the prompt. Required when <code>prompt_embeds</code> is passed directly.`,name:"prompt_attention_mask"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Attention mask for the negative prompt. Required when <code>negative_prompt_embeds</code> is passed directly.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, <em>optional</em>) &#x2014; maximum sequence length to use for the prompt.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L241"}}),R=new Ie({props:{title:"EasyAnimatePipelineOutput",local:"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput",headingTag:"h2"}}),F=new Ze({props:{name:"class diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput",anchor:"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput.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/easyanimate/pipeline_output.py#L9"}}),S=new yt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/easyanimate.md"}}),{c(){d=o("meta"),B=s(),T=o("p"),f=s(),y(h.$$.fragment),m=s(),j=o("p"),j.innerHTML=He,re=s(),U=o("p"),U.innerHTML=Xe,pe=s(),Z=o("p"),Z.innerHTML=qe,me=s(),I=o("p"),I.textContent=Ye,de=s(),k=o("table"),k.innerHTML=Qe,ce=s(),C=o("p"),C.textContent=Re,ue=s(),z=o("table"),z.innerHTML=Fe,fe=s(),$=o("p"),$.textContent=Se,he=s(),W=o("table"),W.innerHTML=De,ge=s(),G=o("p"),G.textContent=Oe,ye=s(),V=o("ul"),V.innerHTML=Ke,be=s(),y(P.$$.fragment),Me=s(),N=o("p"),N.textContent=et,_e=s(),L=o("p"),L.innerHTML=tt,we=s(),y(H.$$.fragment),ve=s(),y(X.$$.fragment),je=s(),c=o("div"),y(q.$$.fragment),ke=s(),D=o("p"),D.textContent=nt,Ce=s(),O=o("p"),O.innerHTML=at,ze=s(),K=o("p"),K.innerHTML=st,$e=s(),g=o("div"),y(Y.$$.fragment),We=s(),ee=o("p"),ee.textContent=it,Ge=s(),y(E.$$.fragment),Ve=s(),te=o("p"),te.innerHTML=ot,Pe=s(),A=o("div"),y(Q.$$.fragment),Ne=s(),ne=o("p"),ne.textContent=lt,Te=s(),y(R.$$.fragment),Je=s(),J=o("div"),y(F.$$.fragment),Le=s(),ae=o("p"),ae.textContent=rt,Ee=s(),y(S.$$.fragment),Ae=s(),oe=o("p"),this.h()},l(e){const t=ht("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(n),B=i(e),T=l(e,"P",{}),se(T).forEach(n),f=i(e),b(h.$$.fragment,e),m=i(e),j=l(e,"P",{"data-svelte-h":!0}),r(j)!=="svelte-6loz9a"&&(j.innerHTML=He),re=i(e),U=l(e,"P",{"data-svelte-h":!0}),r(U)!=="svelte-ewhoap"&&(U.innerHTML=Xe),pe=i(e),Z=l(e,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-1076ftz"&&(Z.innerHTML=qe),me=i(e),I=l(e,"P",{"data-svelte-h":!0}),r(I)!=="svelte-1tmuis1"&&(I.textContent=Ye),de=i(e),k=l(e,"TABLE",{"data-svelte-h":!0}),r(k)!=="svelte-kj7zra"&&(k.innerHTML=Qe),ce=i(e),C=l(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-t0fty0"&&(C.textContent=Re),ue=i(e),z=l(e,"TABLE",{"data-svelte-h":!0}),r(z)!=="svelte-1e1oid4"&&(z.innerHTML=Fe),fe=i(e),$=l(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-57jtf2"&&($.textContent=Se),he=i(e),W=l(e,"TABLE",{"data-svelte-h":!0}),r(W)!=="svelte-1a1zcfo"&&(W.innerHTML=De),ge=i(e),G=l(e,"P",{"data-svelte-h":!0}),r(G)!=="svelte-176pj48"&&(G.textContent=Oe),ye=i(e),V=l(e,"UL",{"data-svelte-h":!0}),r(V)!=="svelte-1jberkp"&&(V.innerHTML=Ke),be=i(e),b(P.$$.fragment,e),Me=i(e),N=l(e,"P",{"data-svelte-h":!0}),r(N)!=="svelte-1ou2pxc"&&(N.textContent=et),_e=i(e),L=l(e,"P",{"data-svelte-h":!0}),r(L)!=="svelte-1ge8eln"&&(L.innerHTML=tt),we=i(e),b(H.$$.fragment,e),ve=i(e),b(X.$$.fragment,e),je=i(e),c=l(e,"DIV",{class:!0});var u=se(c);b(q.$$.fragment,u),ke=i(u),D=l(u,"P",{"data-svelte-h":!0}),r(D)!=="svelte-1rg7qql"&&(D.textContent=nt),Ce=i(u),O=l(u,"P",{"data-svelte-h":!0}),r(O)!=="svelte-wu1jmh"&&(O.innerHTML=at),ze=i(u),K=l(u,"P",{"data-svelte-h":!0}),r(K)!=="svelte-loodk4"&&(K.innerHTML=st),$e=i(u),g=l(u,"DIV",{class:!0});var x=se(g);b(Y.$$.fragment,x),We=i(x),ee=l(x,"P",{"data-svelte-h":!0}),r(ee)!=="svelte-1jdvqvd"&&(ee.textContent=it),Ge=i(x),b(E.$$.fragment,x),Ve=i(x),te=l(x,"P",{"data-svelte-h":!0}),r(te)!=="svelte-1p8elq8"&&(te.innerHTML=ot),x.forEach(n),Pe=i(u),A=l(u,"DIV",{class:!0});var Be=se(A);b(Q.$$.fragment,Be),Ne=i(Be),ne=l(Be,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-16q0ax1"&&(ne.textContent=lt),Be.forEach(n),u.forEach(n),Te=i(e),b(R.$$.fragment,e),Je=i(e),J=l(e,"DIV",{class:!0});var Ue=se(J);b(F.$$.fragment,Ue),Le=i(Ue),ae=l(Ue,"P",{"data-svelte-h":!0}),r(ae)!=="svelte-bb8ik2"&&(ae.textContent=rt),Ue.forEach(n),Ee=i(e),b(S.$$.fragment,e),Ae=i(e),oe=l(e,"P",{}),se(oe).forEach(n),this.h()},h(){ie(d,"name","hf:doc:metadata"),ie(d,"content",_t),ie(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ie(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ie(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ie(J,"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){p(document.head,d),a(e,B,t),a(e,T,t),a(e,f,t),M(h,e,t),a(e,m,t),a(e,j,t),a(e,re,t),a(e,U,t),a(e,pe,t),a(e,Z,t),a(e,me,t),a(e,I,t),a(e,de,t),a(e,k,t),a(e,ce,t),a(e,C,t),a(e,ue,t),a(e,z,t),a(e,fe,t),a(e,$,t),a(e,he,t),a(e,W,t),a(e,ge,t),a(e,G,t),a(e,ye,t),a(e,V,t),a(e,be,t),M(P,e,t),a(e,Me,t),a(e,N,t),a(e,_e,t),a(e,L,t),a(e,we,t),M(H,e,t),a(e,ve,t),M(X,e,t),a(e,je,t),a(e,c,t),M(q,c,null),p(c,ke),p(c,D),p(c,Ce),p(c,O),p(c,ze),p(c,K),p(c,$e),p(c,g),M(Y,g,null),p(g,We),p(g,ee),p(g,Ge),M(E,g,null),p(g,Ve),p(g,te),p(c,Pe),p(c,A),M(Q,A,null),p(A,Ne),p(A,ne),a(e,Te,t),M(R,e,t),a(e,Je,t),a(e,J,t),M(F,J,null),p(J,Le),p(J,ae),a(e,Ee,t),M(S,e,t),a(e,Ae,t),a(e,oe,t),xe=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),E.$set(u)},i(e){xe||(_(h.$$.fragment,e),_(P.$$.fragment,e),_(H.$$.fragment,e),_(X.$$.fragment,e),_(q.$$.fragment,e),_(Y.$$.fragment,e),_(E.$$.fragment,e),_(Q.$$.fragment,e),_(R.$$.fragment,e),_(F.$$.fragment,e),_(S.$$.fragment,e),xe=!0)},o(e){w(h.$$.fragment,e),w(P.$$.fragment,e),w(H.$$.fragment,e),w(X.$$.fragment,e),w(q.$$.fragment,e),w(Y.$$.fragment,e),w(E.$$.fragment,e),w(Q.$$.fragment,e),w(R.$$.fragment,e),w(F.$$.fragment,e),w(S.$$.fragment,e),xe=!1},d(e){e&&(n(B),n(T),n(f),n(m),n(j),n(re),n(U),n(pe),n(Z),n(me),n(I),n(de),n(k),n(ce),n(C),n(ue),n(z),n(fe),n($),n(he),n(W),n(ge),n(G),n(ye),n(V),n(be),n(Me),n(N),n(_e),n(L),n(we),n(ve),n(je),n(c),n(Te),n(Je),n(J),n(Ee),n(Ae),n(oe)),n(d),v(h,e),v(P,e),v(H,e),v(X,e),v(q),v(Y),v(E),v(Q),v(R,e),v(F),v(S,e)}}}const _t='{"title":"EasyAnimate","local":"easyanimate","sections":[{"title":"Quantization","local":"quantization","sections":[],"depth":2},{"title":"EasyAnimatePipeline","local":"diffusers.EasyAnimatePipeline","sections":[],"depth":2},{"title":"EasyAnimatePipelineOutput","local":"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput","sections":[],"depth":2}],"depth":1}';function wt(le){return dt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xt extends ut{constructor(d){super(),ft(this,d,wt,Mt,mt,{})}}export{xt as component};
