import{S as Wa,i as Ba,s as Ra,e as s,k as l,w as g,t as n,M as Za,c as i,d as o,m as d,x as v,a,h as r,b as f,N as Ha,f as Fa,G as t,g as c,y as b,q as y,o as w,B as x,v as Ya,L as Ka}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Ja}from"../../../chunks/Tip-hf-doc-builder.js";import{D as se}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Lo}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as st}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qa}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Xa(Ie){let u,D;return{c(){u=s("p"),D=n("This pipeline is for research purposes only.")},l(T){u=i(T,"P",{});var $=a(u);D=r($,"This pipeline is for research purposes only."),$.forEach(o)},m(T,$){c(T,u,$),t(u,D)},d(T){T&&o(u)}}}function en(Ie){let u,D,T,$,P;return $=new Lo({props:{code:`import torch
from diffusers import TextToVideoSDPipeline
from diffusers.utils import export_to_video

pipe = TextToVideoSDPipeline.from_pretrained(
    "damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16"
)
pipe.enable_model_cpu_offload()

prompt = "Spiderman is surfing"
video_frames = pipe(prompt).frames
video_path = export_to_video(video_frames)
video_path`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> TextToVideoSDPipeline
<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>pipe = TextToVideoSDPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;damo-vilab/text-to-video-ms-1.7b&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Spiderman is surfing&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video_frames = pipe(prompt).frames
<span class="hljs-meta">&gt;&gt;&gt; </span>video_path = export_to_video(video_frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video_path`}}),{c(){u=s("p"),D=n("Examples:"),T=l(),g($.$$.fragment)},l(m){u=i(m,"P",{});var k=a(u);D=r(k,"Examples:"),k.forEach(o),T=d(m),v($.$$.fragment,m)},m(m,k){c(m,u,k),t(u,D),c(m,T,k),b($,m,k),P=!0},p:Ka,i(m){P||(y($.$$.fragment,m),P=!0)},o(m){w($.$$.fragment,m),P=!1},d(m){m&&o(u),m&&o(T),x($,m)}}}function tn(Ie){let u,D,T,$,P,m,k,ie,Mo,it,Io,Zt,q,z,at,ae,No,nt,Uo,Yt,ne,re,Go,Oo,Kt,Ne,zo,Jt,Ue,rt,Ho,Qt,Ge,Fo,Xt,S,lt,le,Wo,Bo,dt,de,Ro,Zo,pt,pe,Yo,eo,L,H,ft,fe,Ko,ct,Jo,to,F,ht,M,mt,Qo,Xo,ut,es,ts,Oe,os,ss,_t,I,gt,ce,is,as,vt,bt,ns,rs,ze,he,ls,oo,N,W,yt,me,ds,wt,ps,so,He,fs,io,ue,ao,Fe,cs,no,We,hs,ro,_e,lo,B,ms,xt,us,_s,po,Be,gs,fo,ge,co,Re,vs,ho,Ze,ve,Tt,R,bs,ys,ws,be,ki,xs,$t,Z,Ts,$s,Ps,ye,Si,mo,U,Y,Pt,we,Es,Et,Ds,uo,K,Dt,xe,ks,Ss,kt,Te,Vs,_o,G,J,St,$e,As,Vt,js,go,h,Pe,Cs,At,qs,Ls,Ee,Ms,Ye,Is,Ns,Us,V,De,Gs,jt,Os,zs,Q,Hs,X,ke,Fs,Se,Ws,Ct,Bs,Rs,Zs,ee,Ve,Ys,Ae,Ks,qt,Js,Qs,Xs,te,je,ei,E,ti,Lt,oi,si,Mt,ii,ai,It,ni,ri,Nt,li,di,pi,oe,Ce,fi,O,ci,Ut,hi,mi,Gt,ui,_i,gi,A,qe,vi,Ot,bi,yi,zt,wi,xi,j,Le,Ti,Ht,$i,Pi,Ft,Ei,vo;return T=new Ja({props:{warning:!0,$$slots:{default:[Xa]},$$scope:{ctx:Ie}}}),ie=new st({}),ae=new st({}),fe=new st({}),me=new st({}),ue=new Lo({props:{code:`import torch
from diffusers import DiffusionPipeline
from diffusers.utils import export_to_video

pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
pipe = pipe.to("cuda")

prompt = "Spiderman is surfing"
video_frames = pipe(prompt).frames
video_path = export_to_video(video_frames)
video_path`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;damo-vilab/text-to-video-ms-1.7b&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;Spiderman is surfing&quot;</span>
video_frames = pipe(prompt).frames
video_path = export_to_video(video_frames)
video_path`}}),_e=new Lo({props:{code:`import torch
from diffusers import DiffusionPipeline
from diffusers.utils import export_to_video

pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
pipe.enable_model_cpu_offload()

# memory optimization
pipe.enable_vae_slicing()

prompt = "Darth Vader surfing a wave"
video_frames = pipe(prompt, num_frames=64).frames
video_path = export_to_video(video_frames)
video_path`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;damo-vilab/text-to-video-ms-1.7b&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>)
pipe.enable_model_cpu_offload()

<span class="hljs-comment"># memory optimization</span>
pipe.enable_vae_slicing()

prompt = <span class="hljs-string">&quot;Darth Vader surfing a wave&quot;</span>
video_frames = pipe(prompt, num_frames=<span class="hljs-number">64</span>).frames
video_path = export_to_video(video_frames)
video_path`}}),ge=new Lo({props:{code:`import torch
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
from diffusers.utils import export_to_video

pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()

prompt = "Spiderman is surfing"
video_frames = pipe(prompt, num_inference_steps=25).frames
video_path = export_to_video(video_frames)
video_path`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, DPMSolverMultistepScheduler
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;damo-vilab/text-to-video-ms-1.7b&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()

prompt = <span class="hljs-string">&quot;Spiderman is surfing&quot;</span>
video_frames = pipe(prompt, num_inference_steps=<span class="hljs-number">25</span>).frames
video_path = export_to_video(video_frames)
video_path`}}),we=new st({}),$e=new st({}),Pe=new se({props:{name:"class diffusers.TextToVideoSDPipeline",anchor:"diffusers.TextToVideoSDPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet3DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"}],parametersDescription:[{anchor:"diffusers.TextToVideoSDPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.TextToVideoSDPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Same as Stable Diffusion 2.`,name:"text_encoder"},{anchor:"diffusers.TextToVideoSDPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.TextToVideoSDPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.UNet3DConditionModel">UNet3DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded video latents.',name:"unet"},{anchor:"diffusers.TextToVideoSDPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.16.0/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/v0.16.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.16.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.16.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L76"}}),De=new se({props:{name:"__call__",anchor:"diffusers.TextToVideoSDPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_frames",val:": int = 16"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 9.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{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.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"}],parametersDescription:[{anchor:"diffusers.TextToVideoSDPipeline.__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.TextToVideoSDPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated video.`,name:"height"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated video.`,name:"width"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The number of video frames that are generated. Defaults to 16 frames which at 8 frames per seconds
amounts to 2 seconds of video.`,name:"num_frames"},{anchor:"diffusers.TextToVideoSDPipeline.__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 videos at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate videos that are closely linked to the text <code>prompt</code>,
usually at the expense of lower video quality.`,name:"guidance_scale"},{anchor:"diffusers.TextToVideoSDPipeline.__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.TextToVideoSDPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.16.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.TextToVideoSDPipeline.__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.TextToVideoSDPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</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 ge generated by sampling using the supplied random <code>generator</code>. Latents should be of shape
<code>(batch_size, num_channel, num_frames, height, width)</code>.`,name:"latents"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</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.TextToVideoSDPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;np&quot;</code>) &#x2014;
The output format of the generate video. Choose between <code>torch.FloatTensor</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.stable_diffusion.TextToVideoSDPipelineOutput</code> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#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/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L478",returnDescription:`
<p><code>~pipelines.stable_diffusion.TextToVideoSDPipelineOutput</code> if <code>return_dict</code> is True, otherwise a \`tuple.
When returning a tuple, the first element is a list with the generated frames.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.TextToVideoSDPipelineOutput</code> or <code>tuple</code></p>
`}}),Q=new Qa({props:{anchor:"diffusers.TextToVideoSDPipeline.__call__.example",$$slots:{default:[en]},$$scope:{ctx:Ie}}}),ke=new se({props:{name:"disable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L127"}}),Ve=new se({props:{name:"disable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L145"}}),je=new se({props:{name:"enable_model_cpu_offload",anchor:"diffusers.TextToVideoSDPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L173"}}),Ce=new se({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.TextToVideoSDPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L152"}}),qe=new se({props:{name:"enable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L117"}}),Le=new se({props:{name:"enable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L135"}}),{c(){u=s("meta"),D=l(),g(T.$$.fragment),$=l(),P=s("h1"),m=s("a"),k=s("span"),g(ie.$$.fragment),Mo=l(),it=s("span"),Io=n("Text-to-video synthesis"),Zt=l(),q=s("h2"),z=s("a"),at=s("span"),g(ae.$$.fragment),No=l(),nt=s("span"),Uo=n("Overview"),Yt=l(),ne=s("p"),re=s("a"),Go=n("VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),Oo=n(" by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),Kt=l(),Ne=s("p"),zo=n("The abstract of the paper is the following:"),Jt=l(),Ue=s("p"),rt=s("em"),Ho=n("A diffusion probabilistic model (DPM), which constructs a forward diffusion process by gradually adding noise to data points and learns the reverse denoising process to generate new samples, has been shown to handle complex data distribution. Despite its recent success in image synthesis, applying DPMs to video generation is still challenging due to high-dimensional data spaces. Previous methods usually adopt a standard diffusion process, where frames in the same video clip are destroyed with independent noises, ignoring the content redundancy and temporal correlation. This work presents a decomposed diffusion process via resolving the per-frame noise into a base noise that is shared among all frames and a residual noise that varies along the time axis. The denoising pipeline employs two jointly-learned networks to match the noise decomposition accordingly. Experiments on various datasets confirm that our approach, termed as VideoFusion, surpasses both GAN-based and diffusion-based alternatives in high-quality video generation. We further show that our decomposed formulation can benefit from pre-trained image diffusion models and well-support text-conditioned video creation."),Qt=l(),Ge=s("p"),Fo=n("Resources:"),Xt=l(),S=s("ul"),lt=s("li"),le=s("a"),Wo=n("Website"),Bo=l(),dt=s("li"),de=s("a"),Ro=n("GitHub repository"),Zo=l(),pt=s("li"),pe=s("a"),Yo=n("\u{1F917} Spaces"),eo=l(),L=s("h2"),H=s("a"),ft=s("span"),g(fe.$$.fragment),Ko=l(),ct=s("span"),Jo=n("Available Pipelines:"),to=l(),F=s("table"),ht=s("thead"),M=s("tr"),mt=s("th"),Qo=n("Pipeline"),Xo=l(),ut=s("th"),es=n("Tasks"),ts=l(),Oe=s("th"),os=n("Demo"),ss=l(),_t=s("tbody"),I=s("tr"),gt=s("td"),ce=s("a"),is=n("TextToVideoSDPipeline"),as=l(),vt=s("td"),bt=s("em"),ns=n("Text-to-Video Generation"),rs=l(),ze=s("td"),he=s("a"),ls=n("\u{1F917} Spaces"),oo=l(),N=s("h2"),W=s("a"),yt=s("span"),g(me.$$.fragment),ds=l(),wt=s("span"),ps=n("Usage example"),so=l(),He=s("p"),fs=n("Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),io=l(),g(ue.$$.fragment),ao=l(),Fe=s("p"),cs=n(`Diffusers supports different optimization techniques to improve the latency
and memory footprint of a pipeline. Since videos are often more memory-heavy than images,
we can enable CPU offloading and VAE slicing to keep the memory footprint at bay.`),no=l(),We=s("p"),hs=n("Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),ro=l(),g(_e.$$.fragment),lo=l(),B=s("p"),ms=n("It just takes "),xt=s("strong"),us=n("7 GBs of GPU memory"),_s=n(" to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),po=l(),Be=s("p"),gs=n("We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),fo=l(),g(ge.$$.fragment),co=l(),Re=s("p"),vs=n("Here are some sample outputs:"),ho=l(),Ze=s("table"),ve=s("tr"),Tt=s("td"),R=s("center"),bs=n(`An astronaut riding a horse.
        `),ys=s("br"),ws=l(),be=s("img"),xs=l(),$t=s("td"),Z=s("center"),Ts=n(`Darth vader surfing in waves.
        `),$s=s("br"),Ps=l(),ye=s("img"),mo=l(),U=s("h2"),Y=s("a"),Pt=s("span"),g(we.$$.fragment),Es=l(),Et=s("span"),Ds=n("Available checkpoints"),uo=l(),K=s("ul"),Dt=s("li"),xe=s("a"),ks=n("damo-vilab/text-to-video-ms-1.7b"),Ss=l(),kt=s("li"),Te=s("a"),Vs=n("damo-vilab/text-to-video-ms-1.7b-legacy"),_o=l(),G=s("h2"),J=s("a"),St=s("span"),g($e.$$.fragment),As=l(),Vt=s("span"),js=n("TextToVideoSDPipeline"),go=l(),h=s("div"),g(Pe.$$.fragment),Cs=l(),At=s("p"),qs=n("Pipeline for text-to-video generation."),Ls=l(),Ee=s("p"),Ms=n("This model inherits from "),Ye=s("a"),Is=n("DiffusionPipeline"),Ns=n(`. 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.)`),Us=l(),V=s("div"),g(De.$$.fragment),Gs=l(),jt=s("p"),Os=n("Function invoked when calling the pipeline for generation."),zs=l(),g(Q.$$.fragment),Hs=l(),X=s("div"),g(ke.$$.fragment),Fs=l(),Se=s("p"),Ws=n("Disable sliced VAE decoding. If "),Ct=s("code"),Bs=n("enable_vae_slicing"),Rs=n(` was previously invoked, this method will go back to
computing decoding in one step.`),Zs=l(),ee=s("div"),g(Ve.$$.fragment),Ys=l(),Ae=s("p"),Ks=n("Disable tiled VAE decoding. If "),qt=s("code"),Js=n("enable_vae_tiling"),Qs=n(` was previously invoked, this method will go back to
computing decoding in one step.`),Xs=l(),te=s("div"),g(je.$$.fragment),ei=l(),E=s("p"),ti=n(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Lt=s("code"),oi=n("enable_sequential_cpu_offload"),si=n(", this method moves one whole model at a time to the GPU when its "),Mt=s("code"),ii=n("forward"),ai=n(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),It=s("code"),ni=n("enable_sequential_cpu_offload"),ri=n(", but performance is much better due to the iterative execution of the "),Nt=s("code"),li=n("unet"),di=n("."),pi=l(),oe=s("div"),g(Ce.$$.fragment),fi=l(),O=s("p"),ci=n(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae have their state dicts saved to CPU and then are moved to a `),Ut=s("code"),hi=n("torch.device('meta') and loaded to GPU only when their specific submodule has its "),mi=n("forward"),Gt=s("code"),ui=n("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),_i=n("enable_model_cpu_offload`, but performance is lower."),gi=l(),A=s("div"),g(qe.$$.fragment),vi=l(),Ot=s("p"),bi=n("Enable sliced VAE decoding."),yi=l(),zt=s("p"),wi=n(`When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several
steps. This is useful to save some memory and allow larger batch sizes.`),xi=l(),j=s("div"),g(Le.$$.fragment),Ti=l(),Ht=s("p"),$i=n("Enable tiled VAE decoding."),Pi=l(),Ft=s("p"),Ei=n(`When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in
several steps. This is useful to save a large amount of memory and to allow the processing of larger images.`),this.h()},l(e){const p=Za('[data-svelte="svelte-1phssyn"]',document.head);u=i(p,"META",{name:!0,content:!0}),p.forEach(o),D=d(e),v(T.$$.fragment,e),$=d(e),P=i(e,"H1",{class:!0});var Me=a(P);m=i(Me,"A",{id:!0,class:!0,href:!0});var Wt=a(m);k=i(Wt,"SPAN",{});var Vi=a(k);v(ie.$$.fragment,Vi),Vi.forEach(o),Wt.forEach(o),Mo=d(Me),it=i(Me,"SPAN",{});var Ai=a(it);Io=r(Ai,"Text-to-video synthesis"),Ai.forEach(o),Me.forEach(o),Zt=d(e),q=i(e,"H2",{class:!0});var bo=a(q);z=i(bo,"A",{id:!0,class:!0,href:!0});var ji=a(z);at=i(ji,"SPAN",{});var Ci=a(at);v(ae.$$.fragment,Ci),Ci.forEach(o),ji.forEach(o),No=d(bo),nt=i(bo,"SPAN",{});var qi=a(nt);Uo=r(qi,"Overview"),qi.forEach(o),bo.forEach(o),Yt=d(e),ne=i(e,"P",{});var Di=a(ne);re=i(Di,"A",{href:!0,rel:!0});var Li=a(re);Go=r(Li,"VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),Li.forEach(o),Oo=r(Di," by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),Di.forEach(o),Kt=d(e),Ne=i(e,"P",{});var Mi=a(Ne);zo=r(Mi,"The abstract of the paper is the following:"),Mi.forEach(o),Jt=d(e),Ue=i(e,"P",{});var Ii=a(Ue);rt=i(Ii,"EM",{});var Ni=a(rt);Ho=r(Ni,"A diffusion probabilistic model (DPM), which constructs a forward diffusion process by gradually adding noise to data points and learns the reverse denoising process to generate new samples, has been shown to handle complex data distribution. Despite its recent success in image synthesis, applying DPMs to video generation is still challenging due to high-dimensional data spaces. Previous methods usually adopt a standard diffusion process, where frames in the same video clip are destroyed with independent noises, ignoring the content redundancy and temporal correlation. This work presents a decomposed diffusion process via resolving the per-frame noise into a base noise that is shared among all frames and a residual noise that varies along the time axis. The denoising pipeline employs two jointly-learned networks to match the noise decomposition accordingly. Experiments on various datasets confirm that our approach, termed as VideoFusion, surpasses both GAN-based and diffusion-based alternatives in high-quality video generation. We further show that our decomposed formulation can benefit from pre-trained image diffusion models and well-support text-conditioned video creation."),Ni.forEach(o),Ii.forEach(o),Qt=d(e),Ge=i(e,"P",{});var Ui=a(Ge);Fo=r(Ui,"Resources:"),Ui.forEach(o),Xt=d(e),S=i(e,"UL",{});var Ke=a(S);lt=i(Ke,"LI",{});var Gi=a(lt);le=i(Gi,"A",{href:!0,rel:!0});var Oi=a(le);Wo=r(Oi,"Website"),Oi.forEach(o),Gi.forEach(o),Bo=d(Ke),dt=i(Ke,"LI",{});var zi=a(dt);de=i(zi,"A",{href:!0,rel:!0});var Hi=a(de);Ro=r(Hi,"GitHub repository"),Hi.forEach(o),zi.forEach(o),Zo=d(Ke),pt=i(Ke,"LI",{});var Fi=a(pt);pe=i(Fi,"A",{href:!0,rel:!0});var Wi=a(pe);Yo=r(Wi,"\u{1F917} Spaces"),Wi.forEach(o),Fi.forEach(o),Ke.forEach(o),eo=d(e),L=i(e,"H2",{class:!0});var yo=a(L);H=i(yo,"A",{id:!0,class:!0,href:!0});var Bi=a(H);ft=i(Bi,"SPAN",{});var Ri=a(ft);v(fe.$$.fragment,Ri),Ri.forEach(o),Bi.forEach(o),Ko=d(yo),ct=i(yo,"SPAN",{});var Zi=a(ct);Jo=r(Zi,"Available Pipelines:"),Zi.forEach(o),yo.forEach(o),to=d(e),F=i(e,"TABLE",{});var wo=a(F);ht=i(wo,"THEAD",{});var Yi=a(ht);M=i(Yi,"TR",{});var Je=a(M);mt=i(Je,"TH",{});var Ki=a(mt);Qo=r(Ki,"Pipeline"),Ki.forEach(o),Xo=d(Je),ut=i(Je,"TH",{});var Ji=a(ut);es=r(Ji,"Tasks"),Ji.forEach(o),ts=d(Je),Oe=i(Je,"TH",{align:!0});var Qi=a(Oe);os=r(Qi,"Demo"),Qi.forEach(o),Je.forEach(o),Yi.forEach(o),ss=d(wo),_t=i(wo,"TBODY",{});var Xi=a(_t);I=i(Xi,"TR",{});var Qe=a(I);gt=i(Qe,"TD",{});var ea=a(gt);ce=i(ea,"A",{href:!0,rel:!0});var ta=a(ce);is=r(ta,"TextToVideoSDPipeline"),ta.forEach(o),ea.forEach(o),as=d(Qe),vt=i(Qe,"TD",{});var oa=a(vt);bt=i(oa,"EM",{});var sa=a(bt);ns=r(sa,"Text-to-Video Generation"),sa.forEach(o),oa.forEach(o),rs=d(Qe),ze=i(Qe,"TD",{align:!0});var ia=a(ze);he=i(ia,"A",{href:!0,rel:!0});var aa=a(he);ls=r(aa,"\u{1F917} Spaces"),aa.forEach(o),ia.forEach(o),Qe.forEach(o),Xi.forEach(o),wo.forEach(o),oo=d(e),N=i(e,"H2",{class:!0});var xo=a(N);W=i(xo,"A",{id:!0,class:!0,href:!0});var na=a(W);yt=i(na,"SPAN",{});var ra=a(yt);v(me.$$.fragment,ra),ra.forEach(o),na.forEach(o),ds=d(xo),wt=i(xo,"SPAN",{});var la=a(wt);ps=r(la,"Usage example"),la.forEach(o),xo.forEach(o),so=d(e),He=i(e,"P",{});var da=a(He);fs=r(da,"Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),da.forEach(o),io=d(e),v(ue.$$.fragment,e),ao=d(e),Fe=i(e,"P",{});var pa=a(Fe);cs=r(pa,`Diffusers supports different optimization techniques to improve the latency
and memory footprint of a pipeline. Since videos are often more memory-heavy than images,
we can enable CPU offloading and VAE slicing to keep the memory footprint at bay.`),pa.forEach(o),no=d(e),We=i(e,"P",{});var fa=a(We);hs=r(fa,"Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),fa.forEach(o),ro=d(e),v(_e.$$.fragment,e),lo=d(e),B=i(e,"P",{});var To=a(B);ms=r(To,"It just takes "),xt=i(To,"STRONG",{});var ca=a(xt);us=r(ca,"7 GBs of GPU memory"),ca.forEach(o),_s=r(To," to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),To.forEach(o),po=d(e),Be=i(e,"P",{});var ha=a(Be);gs=r(ha,"We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),ha.forEach(o),fo=d(e),v(ge.$$.fragment,e),co=d(e),Re=i(e,"P",{});var ma=a(Re);vs=r(ma,"Here are some sample outputs:"),ma.forEach(o),ho=d(e),Ze=i(e,"TABLE",{});var ua=a(Ze);ve=i(ua,"TR",{});var $o=a(ve);Tt=i($o,"TD",{});var _a=a(Tt);R=i(_a,"CENTER",{});var Bt=a(R);bs=r(Bt,`An astronaut riding a horse.
        `),ys=i(Bt,"BR",{}),ws=d(Bt),be=i(Bt,"IMG",{src:!0,alt:!0,style:!0}),Bt.forEach(o),_a.forEach(o),xs=d($o),$t=i($o,"TD",{});var ga=a($t);Z=i(ga,"CENTER",{});var Rt=a(Z);Ts=r(Rt,`Darth vader surfing in waves.
        `),$s=i(Rt,"BR",{}),Ps=d(Rt),ye=i(Rt,"IMG",{src:!0,alt:!0,style:!0}),Rt.forEach(o),ga.forEach(o),$o.forEach(o),ua.forEach(o),mo=d(e),U=i(e,"H2",{class:!0});var Po=a(U);Y=i(Po,"A",{id:!0,class:!0,href:!0});var va=a(Y);Pt=i(va,"SPAN",{});var ba=a(Pt);v(we.$$.fragment,ba),ba.forEach(o),va.forEach(o),Es=d(Po),Et=i(Po,"SPAN",{});var ya=a(Et);Ds=r(ya,"Available checkpoints"),ya.forEach(o),Po.forEach(o),uo=d(e),K=i(e,"UL",{});var Eo=a(K);Dt=i(Eo,"LI",{});var wa=a(Dt);xe=i(wa,"A",{href:!0,rel:!0});var xa=a(xe);ks=r(xa,"damo-vilab/text-to-video-ms-1.7b"),xa.forEach(o),wa.forEach(o),Ss=d(Eo),kt=i(Eo,"LI",{});var Ta=a(kt);Te=i(Ta,"A",{href:!0,rel:!0});var $a=a(Te);Vs=r($a,"damo-vilab/text-to-video-ms-1.7b-legacy"),$a.forEach(o),Ta.forEach(o),Eo.forEach(o),_o=d(e),G=i(e,"H2",{class:!0});var Do=a(G);J=i(Do,"A",{id:!0,class:!0,href:!0});var Pa=a(J);St=i(Pa,"SPAN",{});var Ea=a(St);v($e.$$.fragment,Ea),Ea.forEach(o),Pa.forEach(o),As=d(Do),Vt=i(Do,"SPAN",{});var Da=a(Vt);js=r(Da,"TextToVideoSDPipeline"),Da.forEach(o),Do.forEach(o),go=d(e),h=i(e,"DIV",{class:!0});var _=a(h);v(Pe.$$.fragment,_),Cs=d(_),At=i(_,"P",{});var ka=a(At);qs=r(ka,"Pipeline for text-to-video generation."),ka.forEach(o),Ls=d(_),Ee=i(_,"P",{});var ko=a(Ee);Ms=r(ko,"This model inherits from "),Ye=i(ko,"A",{href:!0});var Sa=a(Ye);Is=r(Sa,"DiffusionPipeline"),Sa.forEach(o),Ns=r(ko,`. 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.)`),ko.forEach(o),Us=d(_),V=i(_,"DIV",{class:!0});var Xe=a(V);v(De.$$.fragment,Xe),Gs=d(Xe),jt=i(Xe,"P",{});var Va=a(jt);Os=r(Va,"Function invoked when calling the pipeline for generation."),Va.forEach(o),zs=d(Xe),v(Q.$$.fragment,Xe),Xe.forEach(o),Hs=d(_),X=i(_,"DIV",{class:!0});var So=a(X);v(ke.$$.fragment,So),Fs=d(So),Se=i(So,"P",{});var Vo=a(Se);Ws=r(Vo,"Disable sliced VAE decoding. If "),Ct=i(Vo,"CODE",{});var Aa=a(Ct);Bs=r(Aa,"enable_vae_slicing"),Aa.forEach(o),Rs=r(Vo,` was previously invoked, this method will go back to
computing decoding in one step.`),Vo.forEach(o),So.forEach(o),Zs=d(_),ee=i(_,"DIV",{class:!0});var Ao=a(ee);v(Ve.$$.fragment,Ao),Ys=d(Ao),Ae=i(Ao,"P",{});var jo=a(Ae);Ks=r(jo,"Disable tiled VAE decoding. If "),qt=i(jo,"CODE",{});var ja=a(qt);Js=r(ja,"enable_vae_tiling"),ja.forEach(o),Qs=r(jo,` was previously invoked, this method will go back to
computing decoding in one step.`),jo.forEach(o),Ao.forEach(o),Xs=d(_),te=i(_,"DIV",{class:!0});var Co=a(te);v(je.$$.fragment,Co),ei=d(Co),E=i(Co,"P",{});var C=a(E);ti=r(C,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Lt=i(C,"CODE",{});var Ca=a(Lt);oi=r(Ca,"enable_sequential_cpu_offload"),Ca.forEach(o),si=r(C,", this method moves one whole model at a time to the GPU when its "),Mt=i(C,"CODE",{});var qa=a(Mt);ii=r(qa,"forward"),qa.forEach(o),ai=r(C,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),It=i(C,"CODE",{});var La=a(It);ni=r(La,"enable_sequential_cpu_offload"),La.forEach(o),ri=r(C,", but performance is much better due to the iterative execution of the "),Nt=i(C,"CODE",{});var Ma=a(Nt);li=r(Ma,"unet"),Ma.forEach(o),di=r(C,"."),C.forEach(o),Co.forEach(o),pi=d(_),oe=i(_,"DIV",{class:!0});var qo=a(oe);v(Ce.$$.fragment,qo),fi=d(qo),O=i(qo,"P",{});var et=a(O);ci=r(et,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae have their state dicts saved to CPU and then are moved to a `),Ut=i(et,"CODE",{});var Ia=a(Ut);hi=r(Ia,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),Ia.forEach(o),mi=r(et,"forward"),Gt=i(et,"CODE",{});var Na=a(Gt);ui=r(Na,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),Na.forEach(o),_i=r(et,"enable_model_cpu_offload`, but performance is lower."),et.forEach(o),qo.forEach(o),gi=d(_),A=i(_,"DIV",{class:!0});var tt=a(A);v(qe.$$.fragment,tt),vi=d(tt),Ot=i(tt,"P",{});var Ua=a(Ot);bi=r(Ua,"Enable sliced VAE decoding."),Ua.forEach(o),yi=d(tt),zt=i(tt,"P",{});var Ga=a(zt);wi=r(Ga,`When this option is enabled, the VAE will split the input tensor in slices to compute decoding in several
steps. This is useful to save some memory and allow larger batch sizes.`),Ga.forEach(o),tt.forEach(o),xi=d(_),j=i(_,"DIV",{class:!0});var ot=a(j);v(Le.$$.fragment,ot),Ti=d(ot),Ht=i(ot,"P",{});var Oa=a(Ht);$i=r(Oa,"Enable tiled VAE decoding."),Oa.forEach(o),Pi=d(ot),Ft=i(ot,"P",{});var za=a(Ft);Ei=r(za,`When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and encoding in
several steps. This is useful to save a large amount of memory and to allow the processing of larger images.`),za.forEach(o),ot.forEach(o),_.forEach(o),this.h()},h(){f(u,"name","hf:doc:metadata"),f(u,"content",JSON.stringify(on)),f(m,"id","texttovideo-synthesis"),f(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(m,"href","#texttovideo-synthesis"),f(P,"class","relative group"),f(z,"id","overview"),f(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(z,"href","#overview"),f(q,"class","relative group"),f(re,"href","https://arxiv.org/abs/2303.08320"),f(re,"rel","nofollow"),f(le,"href","https://modelscope.cn/models/damo/text-to-video-synthesis/summary"),f(le,"rel","nofollow"),f(de,"href","https://github.com/modelscope/modelscope/"),f(de,"rel","nofollow"),f(pe,"href","https://huggingface.co/spaces/damo-vilab/modelscope-text-to-video-synthesis"),f(pe,"rel","nofollow"),f(H,"id","available-pipelines"),f(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(H,"href","#available-pipelines"),f(L,"class","relative group"),f(Oe,"align","center"),f(ce,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py"),f(ce,"rel","nofollow"),f(he,"href","https://huggingface.co/spaces/damo-vilab/modelscope-text-to-video-synthesis"),f(he,"rel","nofollow"),f(ze,"align","center"),f(W,"id","usage-example"),f(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(W,"href","#usage-example"),f(N,"class","relative group"),Ha(be.src,ki="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astr.gif")||f(be,"src",ki),f(be,"alt","An astronaut riding a horse."),Fa(be,"width","300px"),Ha(ye.src,Si="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/vader.gif")||f(ye,"src",Si),f(ye,"alt","Darth vader surfing in waves."),Fa(ye,"width","300px"),f(Y,"id","available-checkpoints"),f(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Y,"href","#available-checkpoints"),f(U,"class","relative group"),f(xe,"href","https://huggingface.co/damo-vilab/text-to-video-ms-1.7b/"),f(xe,"rel","nofollow"),f(Te,"href","https://huggingface.co/damo-vilab/text-to-video-ms-1.7b-legacy"),f(Te,"rel","nofollow"),f(J,"id","diffusers.TextToVideoSDPipeline"),f(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(J,"href","#diffusers.TextToVideoSDPipeline"),f(G,"class","relative group"),f(Ye,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),f(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(h,"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,p){t(document.head,u),c(e,D,p),b(T,e,p),c(e,$,p),c(e,P,p),t(P,m),t(m,k),b(ie,k,null),t(P,Mo),t(P,it),t(it,Io),c(e,Zt,p),c(e,q,p),t(q,z),t(z,at),b(ae,at,null),t(q,No),t(q,nt),t(nt,Uo),c(e,Yt,p),c(e,ne,p),t(ne,re),t(re,Go),t(ne,Oo),c(e,Kt,p),c(e,Ne,p),t(Ne,zo),c(e,Jt,p),c(e,Ue,p),t(Ue,rt),t(rt,Ho),c(e,Qt,p),c(e,Ge,p),t(Ge,Fo),c(e,Xt,p),c(e,S,p),t(S,lt),t(lt,le),t(le,Wo),t(S,Bo),t(S,dt),t(dt,de),t(de,Ro),t(S,Zo),t(S,pt),t(pt,pe),t(pe,Yo),c(e,eo,p),c(e,L,p),t(L,H),t(H,ft),b(fe,ft,null),t(L,Ko),t(L,ct),t(ct,Jo),c(e,to,p),c(e,F,p),t(F,ht),t(ht,M),t(M,mt),t(mt,Qo),t(M,Xo),t(M,ut),t(ut,es),t(M,ts),t(M,Oe),t(Oe,os),t(F,ss),t(F,_t),t(_t,I),t(I,gt),t(gt,ce),t(ce,is),t(I,as),t(I,vt),t(vt,bt),t(bt,ns),t(I,rs),t(I,ze),t(ze,he),t(he,ls),c(e,oo,p),c(e,N,p),t(N,W),t(W,yt),b(me,yt,null),t(N,ds),t(N,wt),t(wt,ps),c(e,so,p),c(e,He,p),t(He,fs),c(e,io,p),b(ue,e,p),c(e,ao,p),c(e,Fe,p),t(Fe,cs),c(e,no,p),c(e,We,p),t(We,hs),c(e,ro,p),b(_e,e,p),c(e,lo,p),c(e,B,p),t(B,ms),t(B,xt),t(xt,us),t(B,_s),c(e,po,p),c(e,Be,p),t(Be,gs),c(e,fo,p),b(ge,e,p),c(e,co,p),c(e,Re,p),t(Re,vs),c(e,ho,p),c(e,Ze,p),t(Ze,ve),t(ve,Tt),t(Tt,R),t(R,bs),t(R,ys),t(R,ws),t(R,be),t(ve,xs),t(ve,$t),t($t,Z),t(Z,Ts),t(Z,$s),t(Z,Ps),t(Z,ye),c(e,mo,p),c(e,U,p),t(U,Y),t(Y,Pt),b(we,Pt,null),t(U,Es),t(U,Et),t(Et,Ds),c(e,uo,p),c(e,K,p),t(K,Dt),t(Dt,xe),t(xe,ks),t(K,Ss),t(K,kt),t(kt,Te),t(Te,Vs),c(e,_o,p),c(e,G,p),t(G,J),t(J,St),b($e,St,null),t(G,As),t(G,Vt),t(Vt,js),c(e,go,p),c(e,h,p),b(Pe,h,null),t(h,Cs),t(h,At),t(At,qs),t(h,Ls),t(h,Ee),t(Ee,Ms),t(Ee,Ye),t(Ye,Is),t(Ee,Ns),t(h,Us),t(h,V),b(De,V,null),t(V,Gs),t(V,jt),t(jt,Os),t(V,zs),b(Q,V,null),t(h,Hs),t(h,X),b(ke,X,null),t(X,Fs),t(X,Se),t(Se,Ws),t(Se,Ct),t(Ct,Bs),t(Se,Rs),t(h,Zs),t(h,ee),b(Ve,ee,null),t(ee,Ys),t(ee,Ae),t(Ae,Ks),t(Ae,qt),t(qt,Js),t(Ae,Qs),t(h,Xs),t(h,te),b(je,te,null),t(te,ei),t(te,E),t(E,ti),t(E,Lt),t(Lt,oi),t(E,si),t(E,Mt),t(Mt,ii),t(E,ai),t(E,It),t(It,ni),t(E,ri),t(E,Nt),t(Nt,li),t(E,di),t(h,pi),t(h,oe),b(Ce,oe,null),t(oe,fi),t(oe,O),t(O,ci),t(O,Ut),t(Ut,hi),t(O,mi),t(O,Gt),t(Gt,ui),t(O,_i),t(h,gi),t(h,A),b(qe,A,null),t(A,vi),t(A,Ot),t(Ot,bi),t(A,yi),t(A,zt),t(zt,wi),t(h,xi),t(h,j),b(Le,j,null),t(j,Ti),t(j,Ht),t(Ht,$i),t(j,Pi),t(j,Ft),t(Ft,Ei),vo=!0},p(e,[p]){const Me={};p&2&&(Me.$$scope={dirty:p,ctx:e}),T.$set(Me);const Wt={};p&2&&(Wt.$$scope={dirty:p,ctx:e}),Q.$set(Wt)},i(e){vo||(y(T.$$.fragment,e),y(ie.$$.fragment,e),y(ae.$$.fragment,e),y(fe.$$.fragment,e),y(me.$$.fragment,e),y(ue.$$.fragment,e),y(_e.$$.fragment,e),y(ge.$$.fragment,e),y(we.$$.fragment,e),y($e.$$.fragment,e),y(Pe.$$.fragment,e),y(De.$$.fragment,e),y(Q.$$.fragment,e),y(ke.$$.fragment,e),y(Ve.$$.fragment,e),y(je.$$.fragment,e),y(Ce.$$.fragment,e),y(qe.$$.fragment,e),y(Le.$$.fragment,e),vo=!0)},o(e){w(T.$$.fragment,e),w(ie.$$.fragment,e),w(ae.$$.fragment,e),w(fe.$$.fragment,e),w(me.$$.fragment,e),w(ue.$$.fragment,e),w(_e.$$.fragment,e),w(ge.$$.fragment,e),w(we.$$.fragment,e),w($e.$$.fragment,e),w(Pe.$$.fragment,e),w(De.$$.fragment,e),w(Q.$$.fragment,e),w(ke.$$.fragment,e),w(Ve.$$.fragment,e),w(je.$$.fragment,e),w(Ce.$$.fragment,e),w(qe.$$.fragment,e),w(Le.$$.fragment,e),vo=!1},d(e){o(u),e&&o(D),x(T,e),e&&o($),e&&o(P),x(ie),e&&o(Zt),e&&o(q),x(ae),e&&o(Yt),e&&o(ne),e&&o(Kt),e&&o(Ne),e&&o(Jt),e&&o(Ue),e&&o(Qt),e&&o(Ge),e&&o(Xt),e&&o(S),e&&o(eo),e&&o(L),x(fe),e&&o(to),e&&o(F),e&&o(oo),e&&o(N),x(me),e&&o(so),e&&o(He),e&&o(io),x(ue,e),e&&o(ao),e&&o(Fe),e&&o(no),e&&o(We),e&&o(ro),x(_e,e),e&&o(lo),e&&o(B),e&&o(po),e&&o(Be),e&&o(fo),x(ge,e),e&&o(co),e&&o(Re),e&&o(ho),e&&o(Ze),e&&o(mo),e&&o(U),x(we),e&&o(uo),e&&o(K),e&&o(_o),e&&o(G),x($e),e&&o(go),e&&o(h),x(Pe),x(De),x(Q),x(ke),x(Ve),x(je),x(Ce),x(qe),x(Le)}}}const on={local:"texttovideo-synthesis",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"usage-example",title:"Usage example "},{local:"available-checkpoints",title:"Available checkpoints "},{local:"diffusers.TextToVideoSDPipeline",title:"TextToVideoSDPipeline"}],title:"Text-to-video synthesis"};function sn(Ie){return Ya(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fn extends Wa{constructor(u){super();Ba(this,u,sn,tn,Ra,{})}}export{fn as default,on as metadata};
