Buckets:
| import{s as mt,o as dt,n as ct}from"../chunks/scheduler.53228c21.js";import{S as ut,i as ft,e as i,s,c as b,h as ht,a as l,d as n,b as o,f as se,g as y,j as r,k as oe,l as p,m as a,n as M,t as _,o as v,p as w}from"../chunks/index.100fac89.js";import{D as Ie}from"../chunks/Docstring.60584164.js";import{C as pt}from"../chunks/CodeBlock.d30a6509.js";import{E as gt}from"../chunks/ExampleCodeBlock.84c0636f.js";import{H as ke,E as bt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.debde53c.js";function yt(le){let d,Z="Examples:",T,f,h;return f=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRWFzeUFuaW1hdGVQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fdmlkZW8lMEElMEElMjMlMjBNb2RlbHMlM0ElMjAlMjJhbGliYWJhLXBhaSUyRkVhc3lBbmltYXRlVjUuMS0xMmItemglMjIlMEFwaXBlJTIwJTNEJTIwRWFzeUFuaW1hdGVQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYWxpYmFiYS1wYWklMkZFYXN5QW5pbWF0ZVY1LjEtN2ItemgtZGlmZnVzZXJzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCglMEElMjAlMjAlMjAlMjAlMjJBJTIwcGFuZGElMkMlMjBkcmVzc2VkJTIwaW4lMjBhJTIwc21hbGwlMkMlMjByZWQlMjBqYWNrZXQlMjBhbmQlMjBhJTIwdGlueSUyMGhhdCUyQyUyMHNpdHMlMjBvbiUyMGElMjB3b29kZW4lMjBzdG9vbCUyMGluJTIwYSUyMHNlcmVuZSUyMGJhbWJvbyUyMGZvcmVzdC4lMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJUaGUlMjBwYW5kYSdzJTIwZmx1ZmZ5JTIwcGF3cyUyMHN0cnVtJTIwYSUyMG1pbmlhdHVyZSUyMGFjb3VzdGljJTIwZ3VpdGFyJTJDJTIwcHJvZHVjaW5nJTIwc29mdCUyQyUyMG1lbG9kaWMlMjB0dW5lcy4lMjBOZWFyYnklMkMlMjBhJTIwZmV3JTIwb3RoZXIlMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJwYW5kYXMlMjBnYXRoZXIlMkMlMjB3YXRjaGluZyUyMGN1cmlvdXNseSUyMGFuZCUyMHNvbWUlMjBjbGFwcGluZyUyMGluJTIwcmh5dGhtLiUyMFN1bmxpZ2h0JTIwZmlsdGVycyUyMHRocm91Z2glMjB0aGUlMjB0YWxsJTIwYmFtYm9vJTJDJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIyY2FzdGluZyUyMGElMjBnZW50bGUlMjBnbG93JTIwb24lMjB0aGUlMjBzY2VuZS4lMjBUaGUlMjBwYW5kYSdzJTIwZmFjZSUyMGlzJTIwZXhwcmVzc2l2ZSUyQyUyMHNob3dpbmclMjBjb25jZW50cmF0aW9uJTIwYW5kJTIwam95JTIwYXMlMjBpdCUyMHBsYXlzLiUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMlRoZSUyMGJhY2tncm91bmQlMjBpbmNsdWRlcyUyMGElMjBzbWFsbCUyQyUyMGZsb3dpbmclMjBzdHJlYW0lMjBhbmQlMjB2aWJyYW50JTIwZ3JlZW4lMjBmb2xpYWdlJTJDJTIwZW5oYW5jaW5nJTIwdGhlJTIwcGVhY2VmdWwlMjBhbmQlMjBtYWdpY2FsJTIwJTIyJTBBJTIwJTIwJTIwJTIwJTIyYXRtb3NwaGVyZSUyMG9mJTIwdGhpcyUyMHVuaXF1ZSUyMG11c2ljYWwlMjBwZXJmb3JtYW5jZS4lMjIlMEEpJTBBc2FtcGxlX3NpemUlMjAlM0QlMjAoNTEyJTJDJTIwNTEyKSUwQXZpZGVvJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDYlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0QlMjJiYWQlMjBkZXRhaWxlZCUyMiUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRHNhbXBsZV9zaXplJTVCMCU1RCUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNEc2FtcGxlX3NpemUlNUIxJTVEJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDgp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> EasyAnimatePipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Models: "alibaba-pai/EasyAnimateV5.1-12b-zh"</span> | |
| <span class="hljs-meta">>>> </span>pipe = EasyAnimatePipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"alibaba-pai/EasyAnimateV5.1-7b-zh-diffusers"</span>, torch_dtype=torch.float16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = ( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"A panda, dressed in a small, red jacket and a tiny hat, sits on a wooden stool in a serene bamboo forest. "</span> | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"The panda's fluffy paws strum a miniature acoustic guitar, producing soft, melodic tunes. Nearby, a few other "</span> | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"pandas gather, watching curiously and some clapping in rhythm. Sunlight filters through the tall bamboo, "</span> | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"casting a gentle glow on the scene. The panda's face is expressive, showing concentration and joy as it plays. "</span> | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"The background includes a small, flowing stream and vibrant green foliage, enhancing the peaceful and magical "</span> | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"atmosphere of this unique musical performance."</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>sample_size = (<span class="hljs-number">512</span>, <span class="hljs-number">512</span>) | |
| <span class="hljs-meta">>>> </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">"bad detailed"</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">>>> </span>export_to_video(video, <span class="hljs-string">"output.mp4"</span>, fps=<span class="hljs-number">8</span>)`,wrap:!1}}),{c(){d=i("p"),d.textContent=Z,T=s(),b(f.$$.fragment)},l(m){d=l(m,"P",{"data-svelte-h":!0}),r(d)!=="svelte-kvfsh7"&&(d.textContent=Z),T=o(m),y(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){v(f.$$.fragment,m),h=!1},d(m){m&&(n(d),n(T)),w(f,m)}}}function Mt(le){let d,Z,T,f,h,m,j,Xe='<a href="https://github.com/aigc-apps/EasyAnimate" rel="nofollow">EasyAnimate</a> by Alibaba PAI.',re,x,qe=`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,I,Ye='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,k,Qe="There are two official EasyAnimate checkpoints for text-to-video and video-to-video.",de,U,Re='<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,Fe="There is one official EasyAnimate checkpoints available for image-to-video and video-to-video.",ue,z,Le='<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:",be,N,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>",ye,V,Me,P,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,H,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/pr_13331/en/api/pipelines/easyanimate#diffusers.EasyAnimatePipeline">EasyAnimatePipeline</a> for inference with bitsandbytes.',ve,X,we,q,je,c,Y,Ue,D,nt="Pipeline for text-to-video generation using EasyAnimate.",Ce,O,at=`This model inherits from <a href="/docs/diffusers/pr_13331/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,Q,We,ee,ot="Generates images or video using the EasyAnimate pipeline based on the provided prompts.",Ge,E,Ne,te,it=`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.`,Ve,A,R,Pe,ne,lt="Encodes the prompt into text encoder hidden states.",Te,F,Je,J,L,He,ae,rt="Output class for EasyAnimate pipelines.",Ee,S,Ae,ie,Be;return h=new ke({props:{title:"EasyAnimate",local:"easyanimate",headingTag:"h1"}}),V=new ke({props:{title:"Quantization",local:"quantization",headingTag:"h2"}}),X=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">"alibaba-pai/EasyAnimateV5.1-12b-zh"</span>, | |
| subfolder=<span class="hljs-string">"transformer"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.float16, | |
| ) | |
| pipeline = EasyAnimatePipeline.from_pretrained( | |
| <span class="hljs-string">"alibaba-pai/EasyAnimateV5.1-12b-zh"</span>, | |
| transformer=transformer_8bit, | |
| torch_dtype=torch.float16, | |
| device_map=<span class="hljs-string">"balanced"</span>, | |
| ) | |
| prompt = <span class="hljs-string">"A cat walks on the grass, realistic style."</span> | |
| negative_prompt = <span class="hljs-string">"bad detailed"</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">"cat.mp4"</span>, fps=<span class="hljs-number">8</span>)`,wrap:!1}}),q=new ke({props:{title:"EasyAnimatePipeline",local:"diffusers.EasyAnimatePipeline",headingTag:"h2"}}),Y=new Ie({props:{name:"class diffusers.EasyAnimatePipeline",anchor:"diffusers.EasyAnimatePipeline",parameters:[{name:"vae",val:": AutoencoderKLMagvit"},{name:"text_encoder",val:": transformers.models.qwen2_vl.modeling_qwen2_vl.Qwen2VLForConditionalGeneration | transformers.models.bert.modeling_bert.BertModel"},{name:"tokenizer",val:": 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/pr_13331/en/api/models/autoencoderkl_magvit#diffusers.AutoencoderKLMagvit">AutoencoderKLMagvit</a>) — | |
| 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> (<code>~transformers.Qwen2VLForConditionalGeneration</code>, <code>~transformers.BertModel</code> | None) — | |
| 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> (<code>~transformers.Qwen2Tokenizer</code>, <code>~transformers.BertTokenizer</code> | None) — | |
| 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/pr_13331/en/api/models/easyanimate_transformer3d#diffusers.EasyAnimateTransformer3DModel">EasyAnimateTransformer3DModel</a>) — | |
| The EasyAnimate model designed by EasyAnimate Team.`,name:"transformer"},{anchor:"diffusers.EasyAnimatePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_13331/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) — | |
| A scheduler to be used in combination with EasyAnimate to denoise the encoded image latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_13331/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L186"}}),Q=new Ie({props:{name:"__call__",anchor:"diffusers.EasyAnimatePipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"num_frames",val:": int | None = 49"},{name:"height",val:": int | None = 512"},{name:"width",val:": int | None = 512"},{name:"num_inference_steps",val:": int | None = 50"},{name:"guidance_scale",val:": float | None = 5.0"},{name:"negative_prompt",val:": str | list[str] | None = None"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"eta",val:": float | None = 0.0"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"timesteps",val:": list[int] | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"},{name:"guidance_rescale",val:": float = 0.0"}],source:"https://github.com/huggingface/diffusers/blob/vr_13331/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/pr_13331/en/api/pipelines/stable_diffusion/inpaint#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/pr_13331/en/api/pipelines/stable_diffusion/inpaint#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput" | |
| >StableDiffusionPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),E=new gt({props:{anchor:"diffusers.EasyAnimatePipeline.__call__.example",$$slots:{default:[yt]},$$scope:{ctx:le}}}),R=new Ie({props:{name:"encode_prompt",anchor:"diffusers.EasyAnimatePipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"num_images_per_prompt",val:": int = 1"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str | list[str] | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"device",val:": torch.device | None = None"},{name:"dtype",val:": torch.dtype | None = 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>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>): | |
| torch device`,name:"device"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.dtype",description:`<strong>dtype</strong> (<code>torch.dtype</code>) — | |
| torch dtype`,name:"dtype"},{anchor:"diffusers.EasyAnimatePipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — maximum sequence length to use for the prompt.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_13331/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L241"}}),F=new ke({props:{title:"EasyAnimatePipelineOutput",local:"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput",headingTag:"h2"}}),L=new Ie({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]]) — | |
| 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_13331/src/diffusers/pipelines/easyanimate/pipeline_output.py#L9"}}),S=new bt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/easyanimate.md"}}),{c(){d=i("meta"),Z=s(),T=i("p"),f=s(),b(h.$$.fragment),m=s(),j=i("p"),j.innerHTML=Xe,re=s(),x=i("p"),x.innerHTML=qe,pe=s(),I=i("p"),I.innerHTML=Ye,me=s(),k=i("p"),k.textContent=Qe,de=s(),U=i("table"),U.innerHTML=Re,ce=s(),C=i("p"),C.textContent=Fe,ue=s(),z=i("table"),z.innerHTML=Le,fe=s(),$=i("p"),$.textContent=Se,he=s(),W=i("table"),W.innerHTML=De,ge=s(),G=i("p"),G.textContent=Oe,be=s(),N=i("ul"),N.innerHTML=Ke,ye=s(),b(V.$$.fragment),Me=s(),P=i("p"),P.textContent=et,_e=s(),H=i("p"),H.innerHTML=tt,ve=s(),b(X.$$.fragment),we=s(),b(q.$$.fragment),je=s(),c=i("div"),b(Y.$$.fragment),Ue=s(),D=i("p"),D.textContent=nt,Ce=s(),O=i("p"),O.innerHTML=at,ze=s(),K=i("p"),K.innerHTML=st,$e=s(),g=i("div"),b(Q.$$.fragment),We=s(),ee=i("p"),ee.textContent=ot,Ge=s(),b(E.$$.fragment),Ne=s(),te=i("p"),te.innerHTML=it,Ve=s(),A=i("div"),b(R.$$.fragment),Pe=s(),ne=i("p"),ne.textContent=lt,Te=s(),b(F.$$.fragment),Je=s(),J=i("div"),b(L.$$.fragment),He=s(),ae=i("p"),ae.textContent=rt,Ee=s(),b(S.$$.fragment),Ae=s(),ie=i("p"),this.h()},l(e){const t=ht("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(n),Z=o(e),T=l(e,"P",{}),se(T).forEach(n),f=o(e),y(h.$$.fragment,e),m=o(e),j=l(e,"P",{"data-svelte-h":!0}),r(j)!=="svelte-6loz9a"&&(j.innerHTML=Xe),re=o(e),x=l(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-ewhoap"&&(x.innerHTML=qe),pe=o(e),I=l(e,"P",{"data-svelte-h":!0}),r(I)!=="svelte-1076ftz"&&(I.innerHTML=Ye),me=o(e),k=l(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-1tmuis1"&&(k.textContent=Qe),de=o(e),U=l(e,"TABLE",{"data-svelte-h":!0}),r(U)!=="svelte-kj7zra"&&(U.innerHTML=Re),ce=o(e),C=l(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-t0fty0"&&(C.textContent=Fe),ue=o(e),z=l(e,"TABLE",{"data-svelte-h":!0}),r(z)!=="svelte-1e1oid4"&&(z.innerHTML=Le),fe=o(e),$=l(e,"P",{"data-svelte-h":!0}),r($)!=="svelte-57jtf2"&&($.textContent=Se),he=o(e),W=l(e,"TABLE",{"data-svelte-h":!0}),r(W)!=="svelte-1a1zcfo"&&(W.innerHTML=De),ge=o(e),G=l(e,"P",{"data-svelte-h":!0}),r(G)!=="svelte-176pj48"&&(G.textContent=Oe),be=o(e),N=l(e,"UL",{"data-svelte-h":!0}),r(N)!=="svelte-1jberkp"&&(N.innerHTML=Ke),ye=o(e),y(V.$$.fragment,e),Me=o(e),P=l(e,"P",{"data-svelte-h":!0}),r(P)!=="svelte-1ou2pxc"&&(P.textContent=et),_e=o(e),H=l(e,"P",{"data-svelte-h":!0}),r(H)!=="svelte-54igim"&&(H.innerHTML=tt),ve=o(e),y(X.$$.fragment,e),we=o(e),y(q.$$.fragment,e),je=o(e),c=l(e,"DIV",{class:!0});var u=se(c);y(Y.$$.fragment,u),Ue=o(u),D=l(u,"P",{"data-svelte-h":!0}),r(D)!=="svelte-1rg7qql"&&(D.textContent=nt),Ce=o(u),O=l(u,"P",{"data-svelte-h":!0}),r(O)!=="svelte-1cuyam2"&&(O.innerHTML=at),ze=o(u),K=l(u,"P",{"data-svelte-h":!0}),r(K)!=="svelte-loodk4"&&(K.innerHTML=st),$e=o(u),g=l(u,"DIV",{class:!0});var B=se(g);y(Q.$$.fragment,B),We=o(B),ee=l(B,"P",{"data-svelte-h":!0}),r(ee)!=="svelte-1jdvqvd"&&(ee.textContent=ot),Ge=o(B),y(E.$$.fragment,B),Ne=o(B),te=l(B,"P",{"data-svelte-h":!0}),r(te)!=="svelte-42bqzk"&&(te.innerHTML=it),B.forEach(n),Ve=o(u),A=l(u,"DIV",{class:!0});var Ze=se(A);y(R.$$.fragment,Ze),Pe=o(Ze),ne=l(Ze,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-16q0ax1"&&(ne.textContent=lt),Ze.forEach(n),u.forEach(n),Te=o(e),y(F.$$.fragment,e),Je=o(e),J=l(e,"DIV",{class:!0});var xe=se(J);y(L.$$.fragment,xe),He=o(xe),ae=l(xe,"P",{"data-svelte-h":!0}),r(ae)!=="svelte-bb8ik2"&&(ae.textContent=rt),xe.forEach(n),Ee=o(e),y(S.$$.fragment,e),Ae=o(e),ie=l(e,"P",{}),se(ie).forEach(n),this.h()},h(){oe(d,"name","hf:doc:metadata"),oe(d,"content",_t),oe(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(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,Z,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,x,t),a(e,pe,t),a(e,I,t),a(e,me,t),a(e,k,t),a(e,de,t),a(e,U,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,be,t),a(e,N,t),a(e,ye,t),M(V,e,t),a(e,Me,t),a(e,P,t),a(e,_e,t),a(e,H,t),a(e,ve,t),M(X,e,t),a(e,we,t),M(q,e,t),a(e,je,t),a(e,c,t),M(Y,c,null),p(c,Ue),p(c,D),p(c,Ce),p(c,O),p(c,ze),p(c,K),p(c,$e),p(c,g),M(Q,g,null),p(g,We),p(g,ee),p(g,Ge),M(E,g,null),p(g,Ne),p(g,te),p(c,Ve),p(c,A),M(R,A,null),p(A,Pe),p(A,ne),a(e,Te,t),M(F,e,t),a(e,Je,t),a(e,J,t),M(L,J,null),p(J,He),p(J,ae),a(e,Ee,t),M(S,e,t),a(e,Ae,t),a(e,ie,t),Be=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),E.$set(u)},i(e){Be||(_(h.$$.fragment,e),_(V.$$.fragment,e),_(X.$$.fragment,e),_(q.$$.fragment,e),_(Y.$$.fragment,e),_(Q.$$.fragment,e),_(E.$$.fragment,e),_(R.$$.fragment,e),_(F.$$.fragment,e),_(L.$$.fragment,e),_(S.$$.fragment,e),Be=!0)},o(e){v(h.$$.fragment,e),v(V.$$.fragment,e),v(X.$$.fragment,e),v(q.$$.fragment,e),v(Y.$$.fragment,e),v(Q.$$.fragment,e),v(E.$$.fragment,e),v(R.$$.fragment,e),v(F.$$.fragment,e),v(L.$$.fragment,e),v(S.$$.fragment,e),Be=!1},d(e){e&&(n(Z),n(T),n(f),n(m),n(j),n(re),n(x),n(pe),n(I),n(me),n(k),n(de),n(U),n(ce),n(C),n(ue),n(z),n(fe),n($),n(he),n(W),n(ge),n(G),n(be),n(N),n(ye),n(Me),n(P),n(_e),n(H),n(ve),n(we),n(je),n(c),n(Te),n(Je),n(J),n(Ee),n(Ae),n(ie)),n(d),w(h,e),w(V,e),w(X,e),w(q,e),w(Y),w(Q),w(E),w(R),w(F,e),w(L),w(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 vt(le){return dt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bt extends ut{constructor(d){super(),ft(this,d,vt,Mt,mt,{})}}export{Bt as component}; | |
Xet Storage Details
- Size:
- 33.5 kB
- Xet hash:
- 08649f09699da098987c0487c14378461a110bcb1eeb1473dc9ee7f032552d80
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.