Buckets:
| import{s as lt,o as rt,n as pt}from"../chunks/scheduler.53228c21.js";import{S as mt,i as dt,e as o,s,c as g,h as ct,a as l,d as n,b as i,f as ae,g as _,j as r,k as se,l as m,m as a,n as y,t as b,o as M,p as v}from"../chunks/index.cac5d66a.js";import{D as Be}from"../chunks/Docstring.1e7ac4f3.js";import{C as ot}from"../chunks/CodeBlock.606cbaf4.js";import{E as ut}from"../chunks/ExampleCodeBlock.ccf7d2a9.js";import{H as Ze,E as ft}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.323ee77a.js";function ht(oe){let d,x="Examples:",j,f,h;return f=new ot({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRWFzeUFuaW1hdGVQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBleHBvcnRfdG9fdmlkZW8lMEElMEElMjMlMjBNb2RlbHMlM0ElMjAlMjJhbGliYWJhLXBhaSUyRkVhc3lBbmltYXRlVjUuMS0xMmItemglMjIlMEFwaXBlJTIwJTNEJTIwRWFzeUFuaW1hdGVQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYWxpYmFiYS1wYWklMkZFYXN5QW5pbWF0ZVY1LjEtN2ItemgtZGlmZnVzZXJzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCglMEElMjAlMjAlMjAlMjAlMjJBJTIwcGFuZGElMkMlMjBkcmVzc2VkJTIwaW4lMjBhJTIwc21hbGwlMkMlMjByZWQlMjBqYWNrZXQlMjBhbmQlMjBhJTIwdGlueSUyMGhhdCUyQyUyMHNpdHMlMjBvbiUyMGElMjB3b29kZW4lMjBzdG9vbCUyMGluJTIwYSUyMHNlcmVuZSUyMGJhbWJvbyUyMGZvcmVzdC4lMjAlMj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TEyKSUwQXZpZGVvJTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDYlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0QlMjJiYWQlMjBkZXRhaWxlZCUyMiUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRHNhbXBsZV9zaXplJTVCMCU1RCUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNEc2FtcGxlX3NpemUlNUIxJTVEJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDgp",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>)`,lang:"python",wrap:!1}}),{c(){d=o("p"),d.textContent=x,j=s(),g(f.$$.fragment)},l(p){d=l(p,"P",{"data-svelte-h":!0}),r(d)!=="svelte-kvfsh7"&&(d.textContent=x),j=i(p),_(f.$$.fragment,p)},m(p,w){a(p,d,w),a(p,j,w),y(f,p,w),h=!0},p:pt,i(p){h||(b(f.$$.fragment,p),h=!0)},o(p){M(f.$$.fragment,p),h=!1},d(p){p&&(n(d),n(j)),v(f,p)}}}function gt(oe){let d,x,j,f,h,p,w,Ve='<a href="https://github.com/aigc-apps/EasyAnimate" rel="nofollow">EasyAnimate</a> by Alibaba PAI.',le,k,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>`,re,B,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>.',pe,Z,He="There are two official EasyAnimate checkpoints for text-to-video and video-to-video.",me,I,Ye='<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>',de,U,Qe="There is one official EasyAnimate checkpoints available for image-to-video and video-to-video.",ce,C,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-InP" rel="nofollow"><code>alibaba-pai/EasyAnimateV5.1-12b-zh-InP</code></a></td> <td align="center">torch.float16</td></tr></tbody>',ue,P,Fe="There are two official EasyAnimate checkpoints available for control-to-video.",fe,$,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-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>',he,W,Se="For the EasyAnimateV5.1 series:",ge,z,De="<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>",_e,G,ye,N,Oe="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.",be,V,Ke='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_13745/en/api/pipelines/easyanimate#diffusers.EasyAnimatePipeline">EasyAnimatePipeline</a> for inference with bitsandbytes.',Me,X,ve,q,we,c,H,Ie,S,et="Pipeline for text-to-video generation using EasyAnimate.",Ue,D,tt=`This model inherits from <a href="/docs/diffusers/pr_13745/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.)`,Ce,O,nt='EasyAnimate uses one text encoder <a href="https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct" rel="nofollow">qwen2 vl</a> in V5.1.',Pe,T,Y,$e,K,at="Generates images or video using the EasyAnimate pipeline based on the provided prompts.",We,J,ze,A,Q,Ge,ee,st="Encodes the prompt into text encoder hidden states.",je,R,Te,E,F,Ne,te,it="Output class for EasyAnimate pipelines.",Ee,L,Je,ie,Ae;return h=new Ze({props:{title:"EasyAnimate",local:"easyanimate",headingTag:"h1"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9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBkZXZpY2VfbWFwJTNEJTIyYmFsYW5jZWQlMjIlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMGNhdCUyMHdhbGtzJTIwb24lMjB0aGUlMjBncmFzcyUyQyUyMHJlYWxpc3RpYyUyMHN0eWxlLiUyMiUwQW5lZ2F0aXZlX3Byb21wdCUyMCUzRCUyMCUyMmJhZCUyMGRldGFpbGVkJTIyJTBBdmlkZW8lMjAlM0QlMjBwaXBlbGluZShwcm9tcHQlM0Rwcm9tcHQlMkMlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMjBudW1fZnJhbWVzJTNENDklMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzApLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJjYXQubXA0JTIyJTJDJTIwZnBzJTNEOCk=",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>)`,lang:"py",wrap:!1}}),q=new Ze({props:{title:"EasyAnimatePipeline",local:"diffusers.EasyAnimatePipeline",headingTag:"h2"}}),H=new Be({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_13745/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_13745/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_13745/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_13745/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L186"}}),Y=new Be({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"}],parametersDescription:[{anchor:"diffusers.EasyAnimatePipeline.__call__.prompt",description:`<strong>prompt</strong> (<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.`,name:"prompt"},{anchor:"diffusers.EasyAnimatePipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>) — | |
| Length of the generated video (in frames).`,name:"num_frames"},{anchor:"diffusers.EasyAnimatePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>) — | |
| Height of the generated image in pixels.`,name:"height"},{anchor:"diffusers.EasyAnimatePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>) — | |
| Width of the generated image in pixels.`,name:"width"},{anchor:"diffusers.EasyAnimatePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<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.`,name:"num_inference_steps"},{anchor:"diffusers.EasyAnimatePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<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.`,name:"guidance_scale"},{anchor:"diffusers.EasyAnimatePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<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>.`,name:"negative_prompt"},{anchor:"diffusers.EasyAnimatePipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| Number of images to generate for each prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.EasyAnimatePipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Applies to DDIM scheduling. Controlled by the eta parameter from the related literature.`,name:"eta"},{anchor:"diffusers.EasyAnimatePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| A generator to ensure reproducibility in image generation.`,name:"generator"},{anchor:"diffusers.EasyAnimatePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Predefined latent tensors to condition generation.`,name:"latents"},{anchor:"diffusers.EasyAnimatePipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Text embeddings for the prompts. Overrides prompt string inputs for more flexibility.`,name:"prompt_embeds"},{anchor:"diffusers.EasyAnimatePipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Embeddings for negative prompts. Overrides string inputs if defined.`,name:"negative_prompt_embeds"},{anchor:"diffusers.EasyAnimatePipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Attention mask for the primary prompt embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.EasyAnimatePipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Attention mask for negative prompt embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.EasyAnimatePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to “latent”) — | |
| Format of the generated output, either as a PIL image or as a NumPy array.`,name:"output_type"},{anchor:"diffusers.EasyAnimatePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| If <code>True</code>, returns a structured output. Otherwise returns a simple tuple.`,name:"return_dict"},{anchor:"diffusers.EasyAnimatePipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| Functions called at the end of each denoising step.`,name:"callback_on_step_end"},{anchor:"diffusers.EasyAnimatePipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Tensor names to be included in callback function calls.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.EasyAnimatePipeline.__call__.guidance_rescale",description:`<strong>guidance_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| Adjusts noise levels based on guidance scale.`,name:"guidance_rescale"},{anchor:"diffusers.EasyAnimatePipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>list[int]</code>, <em>optional</em>) — | |
| Custom timesteps to use for the denoising process. If not defined, the scheduler’s default schedule for | |
| <code>num_inference_steps</code> is used.`,name:"timesteps"}],source:"https://github.com/huggingface/diffusers/blob/vr_13745/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_13745/en/api/pipelines/stable_diffusion/upscale#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_13745/en/api/pipelines/stable_diffusion/upscale#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput" | |
| >StableDiffusionPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),J=new ut({props:{anchor:"diffusers.EasyAnimatePipeline.__call__.example",$$slots:{default:[ht]},$$scope:{ctx:oe}}}),Q=new Be({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_13745/src/diffusers/pipelines/easyanimate/pipeline_easyanimate.py#L241"}}),R=new Ze({props:{title:"EasyAnimatePipelineOutput",local:"diffusers.pipelines.easyanimate.pipeline_output.EasyAnimatePipelineOutput",headingTag:"h2"}}),F=new Be({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_13745/src/diffusers/pipelines/easyanimate/pipeline_output.py#L9"}}),L=new ft({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/easyanimate.md"}}),{c(){d=o("meta"),x=s(),j=o("p"),f=s(),g(h.$$.fragment),p=s(),w=o("p"),w.innerHTML=Ve,le=s(),k=o("p"),k.innerHTML=Xe,re=s(),B=o("p"),B.innerHTML=qe,pe=s(),Z=o("p"),Z.textContent=He,me=s(),I=o("table"),I.innerHTML=Ye,de=s(),U=o("p"),U.textContent=Qe,ce=s(),C=o("table"),C.innerHTML=Re,ue=s(),P=o("p"),P.textContent=Fe,fe=s(),$=o("table"),$.innerHTML=Le,he=s(),W=o("p"),W.textContent=Se,ge=s(),z=o("ul"),z.innerHTML=De,_e=s(),g(G.$$.fragment),ye=s(),N=o("p"),N.textContent=Oe,be=s(),V=o("p"),V.innerHTML=Ke,Me=s(),g(X.$$.fragment),ve=s(),g(q.$$.fragment),we=s(),c=o("div"),g(H.$$.fragment),Ie=s(),S=o("p"),S.textContent=et,Ue=s(),D=o("p"),D.innerHTML=tt,Ce=s(),O=o("p"),O.innerHTML=nt,Pe=s(),T=o("div"),g(Y.$$.fragment),$e=s(),K=o("p"),K.textContent=at,We=s(),g(J.$$.fragment),ze=s(),A=o("div"),g(Q.$$.fragment),Ge=s(),ee=o("p"),ee.textContent=st,je=s(),g(R.$$.fragment),Te=s(),E=o("div"),g(F.$$.fragment),Ne=s(),te=o("p"),te.textContent=it,Ee=s(),g(L.$$.fragment),Je=s(),ie=o("p"),this.h()},l(e){const t=ct("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(n),x=i(e),j=l(e,"P",{}),ae(j).forEach(n),f=i(e),_(h.$$.fragment,e),p=i(e),w=l(e,"P",{"data-svelte-h":!0}),r(w)!=="svelte-6loz9a"&&(w.innerHTML=Ve),le=i(e),k=l(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-ewhoap"&&(k.innerHTML=Xe),re=i(e),B=l(e,"P",{"data-svelte-h":!0}),r(B)!=="svelte-1076ftz"&&(B.innerHTML=qe),pe=i(e),Z=l(e,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-1tmuis1"&&(Z.textContent=He),me=i(e),I=l(e,"TABLE",{"data-svelte-h":!0}),r(I)!=="svelte-kj7zra"&&(I.innerHTML=Ye),de=i(e),U=l(e,"P",{"data-svelte-h":!0}),r(U)!=="svelte-t0fty0"&&(U.textContent=Qe),ce=i(e),C=l(e,"TABLE",{"data-svelte-h":!0}),r(C)!=="svelte-1e1oid4"&&(C.innerHTML=Re),ue=i(e),P=l(e,"P",{"data-svelte-h":!0}),r(P)!=="svelte-57jtf2"&&(P.textContent=Fe),fe=i(e),$=l(e,"TABLE",{"data-svelte-h":!0}),r($)!=="svelte-1a1zcfo"&&($.innerHTML=Le),he=i(e),W=l(e,"P",{"data-svelte-h":!0}),r(W)!=="svelte-176pj48"&&(W.textContent=Se),ge=i(e),z=l(e,"UL",{"data-svelte-h":!0}),r(z)!=="svelte-1jberkp"&&(z.innerHTML=De),_e=i(e),_(G.$$.fragment,e),ye=i(e),N=l(e,"P",{"data-svelte-h":!0}),r(N)!=="svelte-1ou2pxc"&&(N.textContent=Oe),be=i(e),V=l(e,"P",{"data-svelte-h":!0}),r(V)!=="svelte-1nai7lx"&&(V.innerHTML=Ke),Me=i(e),_(X.$$.fragment,e),ve=i(e),_(q.$$.fragment,e),we=i(e),c=l(e,"DIV",{class:!0});var u=ae(c);_(H.$$.fragment,u),Ie=i(u),S=l(u,"P",{"data-svelte-h":!0}),r(S)!=="svelte-1rg7qql"&&(S.textContent=et),Ue=i(u),D=l(u,"P",{"data-svelte-h":!0}),r(D)!=="svelte-sq65if"&&(D.innerHTML=tt),Ce=i(u),O=l(u,"P",{"data-svelte-h":!0}),r(O)!=="svelte-loodk4"&&(O.innerHTML=nt),Pe=i(u),T=l(u,"DIV",{class:!0});var ne=ae(T);_(Y.$$.fragment,ne),$e=i(ne),K=l(ne,"P",{"data-svelte-h":!0}),r(K)!=="svelte-1jdvqvd"&&(K.textContent=at),We=i(ne),_(J.$$.fragment,ne),ne.forEach(n),ze=i(u),A=l(u,"DIV",{class:!0});var xe=ae(A);_(Q.$$.fragment,xe),Ge=i(xe),ee=l(xe,"P",{"data-svelte-h":!0}),r(ee)!=="svelte-16q0ax1"&&(ee.textContent=st),xe.forEach(n),u.forEach(n),je=i(e),_(R.$$.fragment,e),Te=i(e),E=l(e,"DIV",{class:!0});var ke=ae(E);_(F.$$.fragment,ke),Ne=i(ke),te=l(ke,"P",{"data-svelte-h":!0}),r(te)!=="svelte-bb8ik2"&&(te.textContent=it),ke.forEach(n),Ee=i(e),_(L.$$.fragment,e),Je=i(e),ie=l(e,"P",{}),ae(ie).forEach(n),this.h()},h(){se(d,"name","hf:doc:metadata"),se(d,"content",_t),se(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(E,"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){m(document.head,d),a(e,x,t),a(e,j,t),a(e,f,t),y(h,e,t),a(e,p,t),a(e,w,t),a(e,le,t),a(e,k,t),a(e,re,t),a(e,B,t),a(e,pe,t),a(e,Z,t),a(e,me,t),a(e,I,t),a(e,de,t),a(e,U,t),a(e,ce,t),a(e,C,t),a(e,ue,t),a(e,P,t),a(e,fe,t),a(e,$,t),a(e,he,t),a(e,W,t),a(e,ge,t),a(e,z,t),a(e,_e,t),y(G,e,t),a(e,ye,t),a(e,N,t),a(e,be,t),a(e,V,t),a(e,Me,t),y(X,e,t),a(e,ve,t),y(q,e,t),a(e,we,t),a(e,c,t),y(H,c,null),m(c,Ie),m(c,S),m(c,Ue),m(c,D),m(c,Ce),m(c,O),m(c,Pe),m(c,T),y(Y,T,null),m(T,$e),m(T,K),m(T,We),y(J,T,null),m(c,ze),m(c,A),y(Q,A,null),m(A,Ge),m(A,ee),a(e,je,t),y(R,e,t),a(e,Te,t),a(e,E,t),y(F,E,null),m(E,Ne),m(E,te),a(e,Ee,t),y(L,e,t),a(e,Je,t),a(e,ie,t),Ae=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),J.$set(u)},i(e){Ae||(b(h.$$.fragment,e),b(G.$$.fragment,e),b(X.$$.fragment,e),b(q.$$.fragment,e),b(H.$$.fragment,e),b(Y.$$.fragment,e),b(J.$$.fragment,e),b(Q.$$.fragment,e),b(R.$$.fragment,e),b(F.$$.fragment,e),b(L.$$.fragment,e),Ae=!0)},o(e){M(h.$$.fragment,e),M(G.$$.fragment,e),M(X.$$.fragment,e),M(q.$$.fragment,e),M(H.$$.fragment,e),M(Y.$$.fragment,e),M(J.$$.fragment,e),M(Q.$$.fragment,e),M(R.$$.fragment,e),M(F.$$.fragment,e),M(L.$$.fragment,e),Ae=!1},d(e){e&&(n(x),n(j),n(f),n(p),n(w),n(le),n(k),n(re),n(B),n(pe),n(Z),n(me),n(I),n(de),n(U),n(ce),n(C),n(ue),n(P),n(fe),n($),n(he),n(W),n(ge),n(z),n(_e),n(ye),n(N),n(be),n(V),n(Me),n(ve),n(we),n(c),n(je),n(Te),n(E),n(Ee),n(Je),n(ie)),n(d),v(h,e),v(G,e),v(X,e),v(q,e),v(H),v(Y),v(J),v(Q),v(R,e),v(F),v(L,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 yt(oe){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Et extends mt{constructor(d){super(),dt(this,d,yt,gt,lt,{})}}export{Et as component}; | |
Xet Storage Details
- Size:
- 35.9 kB
- Xet hash:
- ed1c10a2933db6b495e79d1040c83c0fa56c87fbc37001d934d4e6b47c8aa631
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.