import{s as Le,o as qe,n as De}from"../chunks/scheduler.53228c21.js";import{S as Oe,i as Ke,e as i,s as a,c as g,h as et,a as l,d as n,b as s,f as ee,g as _,j as p,k as F,l as c,m as o,n as y,t as M,o as b,p as w}from"../chunks/index.100fac89.js";import{D as Je}from"../chunks/Docstring.86a664ae.js";import{C as Fe}from"../chunks/CodeBlock.d30a6509.js";import{E as tt}from"../chunks/ExampleCodeBlock.15d6107c.js";import{H as Ue,E as nt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.09d4dba9.js";function ot(ne){let d,V="Examples:",T,u,h;return u=new Fe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU2FuYVZpZGVvUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJFZmZpY2llbnQtTGFyZ2UtTW9kZWwlMkZTQU5BLVZpZGVvXzJCXzQ4MHBfZGlmZnVzZXJzJTIyJTBBcGlwZSUyMCUzRCUyMFNhbmFWaWRlb1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEFwaXBlLnRyYW5zZm9ybWVyLnRvKHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudGV4dF9lbmNvZGVyLnRvKHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudmFlLnRvKHRvcmNoLmZsb2F0MzIpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQW1vZGVsX3Njb3JlJTIwJTNEJTIwMzAlMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJFdmVuaW5nJTJDJTIwYmFja2xpZ2h0JTJDJTIwc2lkZSUyMGxpZ2h0aW5nJTJDJTIwc29mdCUyMGxpZ2h0JTJDJTIwaGlnaCUyMGNvbnRyYXN0JTJDJTIwbWlkLXNob3QlMkMlMjBjZW50ZXJlZ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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> SanaVideoPipeline
<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>model_id = <span class="hljs-string">&quot;Efficient-Large-Model/SANA-Video_2B_480p_diffusers&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = SanaVideoPipeline.from_pretrained(model_id)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.transformer.to(torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.text_encoder.to(torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.to(torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_score = <span class="hljs-number">30</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Evening, backlight, side lighting, soft light, high contrast, mid-shot, centered composition, clean solo shot, warm color. A young Caucasian man stands in a forest, golden light glimmers on his hair as sunlight filters through the leaves. He wears a light shirt, wind gently blowing his hair and collar, light dances across his face with his movements. The background is blurred, with dappled light and soft tree shadows in the distance. The camera focuses on his lifted gaze, clear and emotional.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>negative_prompt = <span class="hljs-string">&quot;A chaotic sequence with misshapen, deformed limbs in heavy motion blur, sudden disappearance, jump cuts, jerky movements, rapid shot changes, frames out of sync, inconsistent character shapes, temporal artifacts, jitter, and ghosting effects, creating a disorienting visual experience.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>motion_prompt = <span class="hljs-string">f&quot; motion score: <span class="hljs-subst">{model_score}</span>.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = prompt + motion_prompt

<span class="hljs-meta">&gt;&gt;&gt; </span>output = pipe(
<span class="hljs-meta">... </span>    prompt=prompt,
<span class="hljs-meta">... </span>    negative_prompt=negative_prompt,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">480</span>,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">832</span>,
<span class="hljs-meta">... </span>    frames=<span class="hljs-number">81</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">6</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">42</span>),
<span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>export_to_video(output, <span class="hljs-string">&quot;sana-video-output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),{c(){d=i("p"),d.textContent=V,T=a(),g(u.$$.fragment)},l(r){d=l(r,"P",{"data-svelte-h":!0}),p(d)!=="svelte-kvfsh7"&&(d.textContent=V),T=s(r),_(u.$$.fragment,r)},m(r,f){o(r,d,f),o(r,T,f),y(u,r,f),h=!0},p:De,i(r){h||(M(u.$$.fragment,r),h=!0)},o(r){b(u.$$.fragment,r),h=!1},d(r){r&&(n(d),n(T)),w(u,r)}}}function at(ne){let d,V,T,u,h,r,f,Ce='<img alt="LoRA" src="https://img.shields.io/badge/LoRA-d8b4fe?style=flat"/> <img alt="MPS" src="https://img.shields.io/badge/MPS-000000?style=flat&amp;logo=apple&amp;logoColor=white%22"/>',oe,I,We='<a href="https://huggingface.co/papers/2509.24695" rel="nofollow">SANA-Video: Efficient Video Generation with Block Linear Diffusion Transformer</a> from NVIDIA and MIT HAN Lab, by Junsong Chen, Yuyang Zhao, Jincheng Yu, Ruihang Chu, Junyu Chen, Shuai Yang, Xianbang Wang, Yicheng Pan, Daquan Zhou, Huan Ling, Haozhe Liu, Hongwei Yi, Hao Zhang, Muyang Li, Yukang Chen, Han Cai, Sanja Fidler, Ping Luo, Song Han, Enze Xie.',ae,G,ke="The abstract from the paper is:",se,B,Se='<em>We introduce SANA-Video, a small diffusion model that can efficiently generate videos up to 720x1280 resolution and minute-length duration. SANA-Video synthesizes high-resolution, high-quality and long videos with strong text-video alignment at a remarkably fast speed, deployable on RTX 5090 GPU. Two core designs ensure our efficient, effective and long video generation: (1) Linear DiT: We leverage linear attention as the core operation, which is more efficient than vanilla attention given the large number of tokens processed in video generation. (2) Constant-Memory KV cache for Block Linear Attention: we design block-wise autoregressive approach for long video generation by employing a constant-memory state, derived from the cumulative properties of linear attention. This KV cache provides the Linear DiT with global context at a fixed memory cost, eliminating the need for a traditional KV cache and enabling efficient, minute-long video generation. In addition, we explore effective data filters and model training strategies, narrowing the training cost to 12 days on 64 H100 GPUs, which is only 1% of the cost of MovieGen. Given its low cost, SANA-Video achieves competitive performance compared to modern state-of-the-art small diffusion models (e.g., Wan 2.1-1.3B and SkyReel-V2-1.3B) while being 16x faster in measured latency. Moreover, SANA-Video can be deployed on RTX 5090 GPUs with NVFP4 precision, accelerating the inference speed of generating a 5-second 720p video from 71s to 29s (2.4x speedup). In summary, SANA-Video enables low-cost, high-quality video generation. <a href="https://github.com/NVlabs/SANA" rel="nofollow">this https URL</a>.</em>',ie,x,Ne='This pipeline was contributed by SANA Team. The original codebase can be found <a href="https://github.com/NVlabs/Sana" rel="nofollow">here</a>. The original weights can be found under <a href="https://hf.co/collections/Efficient-Large-Model/sana-video" rel="nofollow">hf.co/Efficient-Large-Model</a>.',le,C,Xe="Available models:",re,W,Qe='<thead><tr><th align="center">Model</th> <th align="center">Recommended dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/Efficient-Large-Model/ANA-Video_2B_480p_diffusers" rel="nofollow"><code>Efficient-Large-Model/SANA-Video_2B_480p_diffusers</code></a></td> <td align="center"><code>torch.bfloat16</code></td></tr></tbody>',de,k,Pe='Refer to <a href="https://huggingface.co/collections/Efficient-Large-Model/sana-video" rel="nofollow">this</a> collection for more information.',pe,S,ze="Note: The recommended dtype mentioned is for the transformer weights. The text encoder and VAE weights must stay in <code>torch.bfloat16</code> or <code>torch.float32</code> for the model to work correctly. Please refer to the inference example below to see how to load the model with the recommended dtype.",ce,N,me,X,Ee="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.",ue,Q,Ye='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/sana_video#diffusers.SanaVideoPipeline">SanaVideoPipeline</a> for inference with bitsandbytes.',he,P,fe,z,ge,m,E,je,L,He=`Pipeline for text-to-video generation using <a href="https://huggingface.co/papers/2509.24695" rel="nofollow">Sana</a>. 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 implemented for all
pipelines (downloading, saving, running on a particular device, etc.).`,Ze,J,Y,Ve,q,Re="Function invoked when calling the pipeline for generation.",Ie,j,Ge,Z,H,Be,D,Ae="Encodes the prompt into text encoder hidden states.",_e,R,ye,U,A,xe,O,$e="Output class for Sana-Video pipelines.",Me,$,be,te,we;return h=new Ue({props:{title:"SanaVideoPipeline",local:"sanavideopipeline",headingTag:"h1"}}),N=new Ue({props:{title:"Quantization",local:"quantization",headingTag:"h2"}}),P=new Fe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTIwYXMlMjBEaWZmdXNlcnNCaXRzQW5kQnl0ZXNDb25maWclMkMlMjBTYW5hVmlkZW9UcmFuc2Zvcm1lcjNETW9kZWwlMkMlMjBTYW5hVmlkZW9QaXBlbGluZSUwQWZyb20lMjB0c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UzRCUyMHByb21wdCUyMCUyQiUyMG1vdGlvbl9wcm9tcHQlMEElMEFvdXRwdXQlMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0Rwcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBuZWdhdGl2ZV9wcm9tcHQlM0RuZWdhdGl2ZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBoZWlnaHQlM0Q0ODAlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDgzMiUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENi4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTBBKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKG91dHB1dCUyQyUyMCUyMnNhbmEtdmlkZW8tb3V0cHV0Lm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",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, SanaVideoTransformer3DModel, SanaVideoPipeline
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> BitsAndBytesConfig, AutoModel

quant_config = BitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>)
text_encoder_8bit = AutoModel.from_pretrained(
    <span class="hljs-string">&quot;Efficient-Large-Model/SANA-Video_2B_480p_diffusers&quot;</span>,
    subfolder=<span class="hljs-string">&quot;text_encoder&quot;</span>,
    quantization_config=quant_config,
    torch_dtype=torch.float16,
)

quant_config = DiffusersBitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>)
transformer_8bit = SanaVideoTransformer3DModel.from_pretrained(
    <span class="hljs-string">&quot;Efficient-Large-Model/SANA-Video_2B_480p_diffusers&quot;</span>,
    subfolder=<span class="hljs-string">&quot;transformer&quot;</span>,
    quantization_config=quant_config,
    torch_dtype=torch.float16,
)

pipeline = SanaVideoPipeline.from_pretrained(
    <span class="hljs-string">&quot;Efficient-Large-Model/SANA-Video_2B_480p_diffusers&quot;</span>,
    text_encoder=text_encoder_8bit,
    transformer=transformer_8bit,
    torch_dtype=torch.float16,
    device_map=<span class="hljs-string">&quot;balanced&quot;</span>,
)

model_score = <span class="hljs-number">30</span>
prompt = <span class="hljs-string">&quot;Evening, backlight, side lighting, soft light, high contrast, mid-shot, centered composition, clean solo shot, warm color. A young Caucasian man stands in a forest, golden light glimmers on his hair as sunlight filters through the leaves. He wears a light shirt, wind gently blowing his hair and collar, light dances across his face with his movements. The background is blurred, with dappled light and soft tree shadows in the distance. The camera focuses on his lifted gaze, clear and emotional.&quot;</span>
negative_prompt = <span class="hljs-string">&quot;A chaotic sequence with misshapen, deformed limbs in heavy motion blur, sudden disappearance, jump cuts, jerky movements, rapid shot changes, frames out of sync, inconsistent character shapes, temporal artifacts, jitter, and ghosting effects, creating a disorienting visual experience.&quot;</span>
motion_prompt = <span class="hljs-string">f&quot; motion score: <span class="hljs-subst">{model_score}</span>.&quot;</span>
prompt = prompt + motion_prompt

output = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    height=<span class="hljs-number">480</span>,
    width=<span class="hljs-number">832</span>,
    num_frames=<span class="hljs-number">81</span>,
    guidance_scale=<span class="hljs-number">6.0</span>,
    num_inference_steps=<span class="hljs-number">50</span>
).frames[<span class="hljs-number">0</span>]
export_to_video(output, <span class="hljs-string">&quot;sana-video-output.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,wrap:!1}}),z=new Ue({props:{title:"SanaVideoPipeline",local:"diffusers.SanaVideoPipeline",headingTag:"h2"}}),E=new Je({props:{name:"class diffusers.SanaVideoPipeline",anchor:"diffusers.SanaVideoPipeline",parameters:[{name:"tokenizer",val:": typing.Union[transformers.models.gemma.tokenization_gemma.GemmaTokenizer, transformers.models.gemma.tokenization_gemma_fast.GemmaTokenizerFast]"},{name:"text_encoder",val:": Gemma2PreTrainedModel"},{name:"vae",val:": typing.Union[diffusers.models.autoencoders.autoencoder_dc.AutoencoderDC, diffusers.models.autoencoders.autoencoder_kl_wan.AutoencoderKLWan]"},{name:"transformer",val:": SanaVideoTransformer3DModel"},{name:"scheduler",val:": DPMSolverMultistepScheduler"}],parametersDescription:[{anchor:"diffusers.SanaVideoPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>GemmaTokenizer</code> or <code>GemmaTokenizerFast</code>) &#x2014;
The tokenizer used to tokenize the prompt.`,name:"tokenizer"},{anchor:"diffusers.SanaVideoPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>Gemma2PreTrainedModel</code>) &#x2014;
Text encoder model to encode the input prompts.`,name:"text_encoder"},{anchor:"diffusers.SanaVideoPipeline.vae",description:`<strong>vae</strong> ([<code>AutoencoderKLWan</code> or <code>AutoencoderDCAEV</code>]) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.SanaVideoPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/sana_video_transformer3d#diffusers.SanaVideoTransformer3DModel">SanaVideoTransformer3DModel</a>) &#x2014;
Conditional Transformer to denoise the input latents.`,name:"transformer"},{anchor:"diffusers.SanaVideoPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler">DPMSolverMultistepScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded video latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/sana/pipeline_sana_video.py#L187"}}),Y=new Je({props:{name:"__call__",anchor:"diffusers.SanaVideoPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"negative_prompt",val:": str = ''"},{name:"num_inference_steps",val:": int = 50"},{name:"timesteps",val:": typing.List[int] = None"},{name:"sigmas",val:": typing.List[float] = None"},{name:"guidance_scale",val:": float = 6.0"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"frames",val:": int = 81"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"clean_caption",val:": bool = False"},{name:"use_resolution_binning",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:`: typing.List[str] = ["Given a user prompt, generate an 'Enhanced prompt' that provides detailed visual descriptions suitable for video generation. Evaluate the level of detail in the user prompt:", '- If the prompt is simple, focus on adding specifics about colors, shapes, sizes, textures, motion, and temporal relationships to create vivid and dynamic scenes.', '- If the prompt is already detailed, refine and enhance the existing details slightly without overcomplicating.', 'Here are examples of how to transform or refine prompts:', '- User Prompt: A cat sleeping -> Enhanced: A small, fluffy white cat slowly settling into a curled position, peacefully falling asleep on a warm sunny windowsill, with gentle sunlight filtering through surrounding pots of blooming red flowers.', '- User Prompt: A busy city street -> Enhanced: A bustling city street scene at dusk, featuring glowing street lamps gradually lighting up, a diverse crowd of people in colorful clothing walking past, and a double-decker bus smoothly passing by towering glass skyscrapers.', 'Please generate only the enhanced description for the prompt below and avoid including any additional commentary or evaluations:', 'User Prompt: ']`}],parametersDescription:[{anchor:"diffusers.SanaVideoPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the video generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.SanaVideoPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the video generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.SanaVideoPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality video at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.SanaVideoPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument
in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is
passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.SanaVideoPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</code> argument in
their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is passed
will be used.`,name:"sigmas"},{anchor:"diffusers.SanaVideoPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.5) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate videos that are closely linked to
the text <code>prompt</code>, usually at the expense of lower video quality.`,name:"guidance_scale"},{anchor:"diffusers.SanaVideoPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.SanaVideoPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to 480) &#x2014;
The height in pixels of the generated video.`,name:"height"},{anchor:"diffusers.SanaVideoPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to 832) &#x2014;
The width in pixels of the generated video.`,name:"width"},{anchor:"diffusers.SanaVideoPipeline.__call__.frames",description:`<strong>frames</strong> (<code>int</code>, <em>optional</em>, defaults to 81) &#x2014;
The number of frames in the generated video.`,name:"frames"},{anchor:"diffusers.SanaVideoPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://huggingface.co/papers/2010.02502" rel="nofollow">https://huggingface.co/papers/2010.02502</a>. Only
applies to <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.SanaVideoPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.SanaVideoPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for video
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.SanaVideoPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.SanaVideoPipeline.__call__.prompt_attention_mask",description:"<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014; Pre-generated attention mask for text embeddings.",name:"prompt_attention_mask"},{anchor:"diffusers.SanaVideoPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For PixArt-Sigma this negative prompt should be &quot;&quot;. If not
provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaVideoPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.SanaVideoPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generated video. Choose between mp4 or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.SanaVideoPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>SanaVideoPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.SanaVideoPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.SanaVideoPipeline.__call__.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the caption before creating embeddings. Requires <code>beautifulsoup4</code> and <code>ftfy</code> to
be installed. If the dependencies are not installed, the embeddings will be created from the raw
prompt.`,name:"clean_caption"},{anchor:"diffusers.SanaVideoPipeline.__call__.use_resolution_binning",description:`<strong>use_resolution_binning</strong> (<code>bool</code> defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, the requested height and width are first mapped to the closest resolutions using
<code>ASPECT_RATIO_480_BIN</code> or <code>ASPECT_RATIO_720_BIN</code>. After the produced latents are decoded into videos,
they are resized back to the requested resolution. Useful for generating non-square videos.`,name:"use_resolution_binning"},{anchor:"diffusers.SanaVideoPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by
<code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.SanaVideoPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list
will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the
<code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.SanaVideoPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code> defaults to <code>300</code>) &#x2014;
Maximum sequence length to use with the <code>prompt</code>.`,name:"max_sequence_length"},{anchor:"diffusers.SanaVideoPipeline.__call__.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Instructions for complex human attention:
<a href="https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55" rel="nofollow">https://github.com/NVlabs/Sana/blob/main/configs/sana_app_config/Sana_1600M_app.yaml#L55</a>.`,name:"complex_human_instruction"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/sana/pipeline_sana_video.py#L701",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/sana_video#diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput"
>SanaVideoPipelineOutput</a> is returned,
otherwise a <code>tuple</code> is returned where the first element is a list with the generated videos</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/diffusers/main/en/api/pipelines/sana_video#diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput"
>SanaVideoPipelineOutput</a> or <code>tuple</code></p>
`}}),j=new tt({props:{anchor:"diffusers.SanaVideoPipeline.__call__.example",$$slots:{default:[ot]},$$scope:{ctx:ne}}}),H=new Je({props:{name:"encode_prompt",anchor:"diffusers.SanaVideoPipeline.encode_prompt",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str = ''"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"clean_caption",val:": bool = False"},{name:"max_sequence_length",val:": int = 300"},{name:"complex_human_instruction",val:": typing.Optional[typing.List[str]] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.SanaVideoPipeline.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.SanaVideoPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt not to guide the video generation. If not defined, one has to pass <code>negative_prompt_embeds</code>
instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>). For
PixArt-Alpha, this should be &quot;&quot;.`,name:"negative_prompt"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
number of videos that should be generated per prompt`,name:"num_videos_per_prompt"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device to place the resulting embeddings on`,name:"device"},{anchor:"diffusers.SanaVideoPipeline.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.SanaVideoPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. For Sana, it&#x2019;s should be the embeddings of the &quot;&quot; string.`,name:"negative_prompt_embeds"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.clean_caption",description:`<strong>clean_caption</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the function will preprocess and clean the provided caption before encoding.`,name:"clean_caption"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, defaults to 300) &#x2014; Maximum sequence length to use for the prompt.",name:"max_sequence_length"},{anchor:"diffusers.SanaVideoPipeline.encode_prompt.complex_human_instruction",description:`<strong>complex_human_instruction</strong> (<code>list[str]</code>, defaults to <code>complex_human_instruction</code>) &#x2014;
If <code>complex_human_instruction</code> is not empty, the function will use the complex Human instruction for
the prompt.`,name:"complex_human_instruction"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/sana/pipeline_sana_video.py#L292"}}),R=new Ue({props:{title:"SanaVideoPipelineOutput",local:"diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput",headingTag:"h2"}}),A=new Je({props:{name:"class diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput",anchor:"diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput.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/sana/pipeline_output.py#L26"}}),$=new nt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/sana_video.md"}}),{c(){d=i("meta"),V=a(),T=i("p"),u=a(),g(h.$$.fragment),r=a(),f=i("div"),f.innerHTML=Ce,oe=a(),I=i("p"),I.innerHTML=We,ae=a(),G=i("p"),G.textContent=ke,se=a(),B=i("p"),B.innerHTML=Se,ie=a(),x=i("p"),x.innerHTML=Ne,le=a(),C=i("p"),C.textContent=Xe,re=a(),W=i("table"),W.innerHTML=Qe,de=a(),k=i("p"),k.innerHTML=Pe,pe=a(),S=i("p"),S.innerHTML=ze,ce=a(),g(N.$$.fragment),me=a(),X=i("p"),X.textContent=Ee,ue=a(),Q=i("p"),Q.innerHTML=Ye,he=a(),g(P.$$.fragment),fe=a(),g(z.$$.fragment),ge=a(),m=i("div"),g(E.$$.fragment),je=a(),L=i("p"),L.innerHTML=He,Ze=a(),J=i("div"),g(Y.$$.fragment),Ve=a(),q=i("p"),q.textContent=Re,Ie=a(),g(j.$$.fragment),Ge=a(),Z=i("div"),g(H.$$.fragment),Be=a(),D=i("p"),D.textContent=Ae,_e=a(),g(R.$$.fragment),ye=a(),U=i("div"),g(A.$$.fragment),xe=a(),O=i("p"),O.textContent=$e,Me=a(),g($.$$.fragment),be=a(),te=i("p"),this.h()},l(e){const t=et("svelte-u9bgzb",document.head);d=l(t,"META",{name:!0,content:!0}),t.forEach(n),V=s(e),T=l(e,"P",{}),ee(T).forEach(n),u=s(e),_(h.$$.fragment,e),r=s(e),f=l(e,"DIV",{class:!0,"data-svelte-h":!0}),p(f)!=="svelte-1elo7hh"&&(f.innerHTML=Ce),oe=s(e),I=l(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-1v2o059"&&(I.innerHTML=We),ae=s(e),G=l(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-1cwsb16"&&(G.textContent=ke),se=s(e),B=l(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-197sf2y"&&(B.innerHTML=Se),ie=s(e),x=l(e,"P",{"data-svelte-h":!0}),p(x)!=="svelte-tnv2q5"&&(x.innerHTML=Ne),le=s(e),C=l(e,"P",{"data-svelte-h":!0}),p(C)!=="svelte-1bob28v"&&(C.textContent=Xe),re=s(e),W=l(e,"TABLE",{"data-svelte-h":!0}),p(W)!=="svelte-1y7nu0d"&&(W.innerHTML=Qe),de=s(e),k=l(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-126jk2h"&&(k.innerHTML=Pe),pe=s(e),S=l(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-okwwje"&&(S.innerHTML=ze),ce=s(e),_(N.$$.fragment,e),me=s(e),X=l(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1ou2pxc"&&(X.textContent=Ee),ue=s(e),Q=l(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-ao3wgl"&&(Q.innerHTML=Ye),he=s(e),_(P.$$.fragment,e),fe=s(e),_(z.$$.fragment,e),ge=s(e),m=l(e,"DIV",{class:!0});var v=ee(m);_(E.$$.fragment,v),je=s(v),L=l(v,"P",{"data-svelte-h":!0}),p(L)!=="svelte-yw72bc"&&(L.innerHTML=He),Ze=s(v),J=l(v,"DIV",{class:!0});var K=ee(J);_(Y.$$.fragment,K),Ve=s(K),q=l(K,"P",{"data-svelte-h":!0}),p(q)!=="svelte-v78lg8"&&(q.textContent=Re),Ie=s(K),_(j.$$.fragment,K),K.forEach(n),Ge=s(v),Z=l(v,"DIV",{class:!0});var ve=ee(Z);_(H.$$.fragment,ve),Be=s(ve),D=l(ve,"P",{"data-svelte-h":!0}),p(D)!=="svelte-16q0ax1"&&(D.textContent=Ae),ve.forEach(n),v.forEach(n),_e=s(e),_(R.$$.fragment,e),ye=s(e),U=l(e,"DIV",{class:!0});var Te=ee(U);_(A.$$.fragment,Te),xe=s(Te),O=l(Te,"P",{"data-svelte-h":!0}),p(O)!=="svelte-118o1xs"&&(O.textContent=$e),Te.forEach(n),Me=s(e),_($.$$.fragment,e),be=s(e),te=l(e,"P",{}),ee(te).forEach(n),this.h()},h(){F(d,"name","hf:doc:metadata"),F(d,"content",st),F(f,"class","flex flex-wrap space-x-1"),F(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){c(document.head,d),o(e,V,t),o(e,T,t),o(e,u,t),y(h,e,t),o(e,r,t),o(e,f,t),o(e,oe,t),o(e,I,t),o(e,ae,t),o(e,G,t),o(e,se,t),o(e,B,t),o(e,ie,t),o(e,x,t),o(e,le,t),o(e,C,t),o(e,re,t),o(e,W,t),o(e,de,t),o(e,k,t),o(e,pe,t),o(e,S,t),o(e,ce,t),y(N,e,t),o(e,me,t),o(e,X,t),o(e,ue,t),o(e,Q,t),o(e,he,t),y(P,e,t),o(e,fe,t),y(z,e,t),o(e,ge,t),o(e,m,t),y(E,m,null),c(m,je),c(m,L),c(m,Ze),c(m,J),y(Y,J,null),c(J,Ve),c(J,q),c(J,Ie),y(j,J,null),c(m,Ge),c(m,Z),y(H,Z,null),c(Z,Be),c(Z,D),o(e,_e,t),y(R,e,t),o(e,ye,t),o(e,U,t),y(A,U,null),c(U,xe),c(U,O),o(e,Me,t),y($,e,t),o(e,be,t),o(e,te,t),we=!0},p(e,[t]){const v={};t&2&&(v.$$scope={dirty:t,ctx:e}),j.$set(v)},i(e){we||(M(h.$$.fragment,e),M(N.$$.fragment,e),M(P.$$.fragment,e),M(z.$$.fragment,e),M(E.$$.fragment,e),M(Y.$$.fragment,e),M(j.$$.fragment,e),M(H.$$.fragment,e),M(R.$$.fragment,e),M(A.$$.fragment,e),M($.$$.fragment,e),we=!0)},o(e){b(h.$$.fragment,e),b(N.$$.fragment,e),b(P.$$.fragment,e),b(z.$$.fragment,e),b(E.$$.fragment,e),b(Y.$$.fragment,e),b(j.$$.fragment,e),b(H.$$.fragment,e),b(R.$$.fragment,e),b(A.$$.fragment,e),b($.$$.fragment,e),we=!1},d(e){e&&(n(V),n(T),n(u),n(r),n(f),n(oe),n(I),n(ae),n(G),n(se),n(B),n(ie),n(x),n(le),n(C),n(re),n(W),n(de),n(k),n(pe),n(S),n(ce),n(me),n(X),n(ue),n(Q),n(he),n(fe),n(ge),n(m),n(_e),n(ye),n(U),n(Me),n(be),n(te)),n(d),w(h,e),w(N,e),w(P,e),w(z,e),w(E),w(Y),w(j),w(H),w(R,e),w(A),w($,e)}}}const st='{"title":"SanaVideoPipeline","local":"sanavideopipeline","sections":[{"title":"Quantization","local":"quantization","sections":[],"depth":2},{"title":"SanaVideoPipeline","local":"diffusers.SanaVideoPipeline","sections":[],"depth":2},{"title":"SanaVideoPipelineOutput","local":"diffusers.pipelines.sana.pipeline_output.SanaVideoPipelineOutput","sections":[],"depth":2}],"depth":1}';function it(ne){return qe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ut extends Oe{constructor(d){super(),Ke(this,d,it,at,Le,{})}}export{ut as component};
