import{S as Dr,i as jr,s as kr,e as s,k as l,w as h,t as a,M as Ur,c as n,d as o,m as d,x as u,a as i,h as r,b as c,N as na,f as ia,G as t,g as m,y as g,q as _,o as v,B as b,v as Gr,L as $r}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Pr}from"../../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as mt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ct}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Er}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Sr(L){let y,D;return{c(){y=s("p"),D=a("\u{1F9EA} This pipeline is for research purposes only.")},l(T){y=n(T,"P",{});var w=i(y);D=r(w,"\u{1F9EA} This pipeline is for research purposes only."),w.forEach(o)},m(T,w){m(T,y,w),t(y,D)},d(T){T&&o(y)}}}function Wr(L){let y,D,T,w,Z;return w=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVGV4dFRvVmlkZW9TRFBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBUZXh0VG9WaWRlb1NEUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmRhbW8tdmlsYWIlMkZ0ZXh0LXRvLXZpZGVvLW1zLTEuN2IlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjB2YXJpYW50JTNEJTIyZnAxNiUyMiUwQSklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyU3BpZGVybWFuJTIwaXMlMjBzdXJmaW5nJTIyJTBBdmlkZW9fZnJhbWVzJTIwJTNEJTIwcGlwZShwcm9tcHQpLmZyYW1lcyUwQXZpZGVvX3BhdGglMjAlM0QlMjBleHBvcnRfdG9fdmlkZW8odmlkZW9fZnJhbWVzKSUwQXZpZGVvX3BhdGg=",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(){y=s("p"),D=a("Examples:"),T=l(),h(w.$$.fragment)},l(f){y=n(f,"P",{});var V=i(y);D=r(V,"Examples:"),V.forEach(o),T=d(f),u(w.$$.fragment,f)},m(f,V){m(f,y,V),t(y,D),m(f,T,V),g(w,f,V),Z=!0},p:$r,i(f){Z||(_(w.$$.fragment,f),Z=!0)},o(f){v(w.$$.fragment,f),Z=!1},d(f){f&&o(y),f&&o(T),b(w,f)}}}function Ir(L){let y,D,T,w,Z;return w=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMkMlMjBEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJjZXJzcGVuc2UlMkZ6ZXJvc2NvcGVfdjJfNTc2dyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlLnNjaGVkdWxlciUyMCUzRCUyMERQTVNvbHZlck11bHRpc3RlcFNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlLnNjaGVkdWxlci5jb25maWcpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMnNwaWRlcm1hbiUyMHJ1bm5pbmclMjBpbiUyMHRoZSUyMGRlc2VydCUyMiUwQXZpZGVvX2ZyYW1lcyUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQwJTJDJTIwaGVpZ2h0JTNEMzIwJTJDJTIwd2lkdGglM0Q1NzYlMkMlMjBudW1fZnJhbWVzJTNEMjQpLmZyYW1lcyUwQSUyMyUyMHNhZmUlMjBsb3ctcmVzJTIwdmlkZW8lMEF2aWRlb19wYXRoJTIwJTNEJTIwZXhwb3J0X3RvX3ZpZGVvKHZpZGVvX2ZyYW1lcyUyQyUyMG91dHB1dF92aWRlb19wYXRoJTNEJTIyLiUyRnZpZGVvXzU3Nl9zcGlkZXJtYW4ubXA0JTIyKSUwQSUwQSUyMyUyMGxldCdzJTIwb2ZmbG9hZCUyMHRoZSUyMHRleHQtdG8taW1hZ2UlMjBtb2RlbCUwQXBpcGUudG8oJTIyY3B1JTIyKSUwQSUwQSUyMyUyMGFuZCUyMGxvYWQlMjB0aGUlMjBpbWFnZS10by1pbWFnZSUyMG1vZGVsJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJjZXJzcGVuc2UlMkZ6ZXJvc2NvcGVfdjJfWEwlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMjByZXZpc2lvbiUzRCUyMnJlZnMlMkZwciUyRjE1JTIyJTBBKSUwQXBpcGUuc2NoZWR1bGVyJTIwJTNEJTIwRFBNU29sdmVyTXVsdGlzdGVwU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGUuc2NoZWR1bGVyLmNvbmZpZyklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBJTIzJTIwVGhlJTIwVkFFJTIwY29uc3VtZXMlMjBBJTIwTE9UJTIwb2YlMjBtZW1vcnklMkMlMjBsZXQncyUyMG1ha2UlMjBzdXJlJTIwd2UlMjBydW4lMjBpdCUyMGluJTIwc2xpY2VkJTIwbW9kZSUwQXBpcGUudmFlLmVuYWJsZV9zbGljaW5nKCklMEElMEElMjMlMjBub3clMjBsZXQncyUyMHVwc2NhbGUlMjBpdCUwQXZpZGVvJTIwJTNEJTIwJTVCSW1hZ2UuZnJvbWFycmF5KGZyYW1lKS5yZXNpemUoKDEwMjQlMkMlMjA1NzYpKSUyMGZvciUyMGZyYW1lJTIwaW4lMjB2aWRlb19mcmFtZXMlNUQlMEElMEElMjMlMjBhbmQlMjBkZW5vaXNlJTIwaXQlMEF2aWRlb19mcmFtZXMlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMHZpZGVvJTNEdmlkZW8lMkMlMjBzdHJlbmd0aCUzRDAuNikuZnJhbWVzJTBBdmlkZW9fcGF0aCUyMCUzRCUyMGV4cG9ydF90b192aWRlbyh2aWRlb19mcmFtZXMlMkMlMjBvdXRwdXRfdmlkZW9fcGF0aCUzRCUyMi4lMkZ2aWRlb18xMDI0X3NwaWRlcm1hbi5tcDQlMjIpJTBBdmlkZW9fcGF0aA==",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> DiffusionPipeline, DPMSolverMultistepScheduler
<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 = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;cerspense/zeroscope_v2_576w&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
<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>prompt = <span class="hljs-string">&quot;spiderman running in the desert&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video_frames = pipe(prompt, num_inference_steps=<span class="hljs-number">40</span>, height=<span class="hljs-number">320</span>, width=<span class="hljs-number">576</span>, num_frames=<span class="hljs-number">24</span>).frames
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># safe low-res video</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video_path = export_to_video(video_frames, output_video_path=<span class="hljs-string">&quot;./video_576_spiderman.mp4&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let&#x27;s offload the text-to-image model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cpu&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># and load the image-to-image model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cerspense/zeroscope_v2_XL&quot;</span>, torch_dtype=torch.float16, revision=<span class="hljs-string">&quot;refs/pr/15&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># The VAE consumes A LOT of memory, let&#x27;s make sure we run it in sliced mode</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_slicing()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now let&#x27;s upscale it</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video = [Image.fromarray(frame).resize((<span class="hljs-number">1024</span>, <span class="hljs-number">576</span>)) <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> video_frames]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># and denoise it</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video_frames = pipe(prompt, video=video, strength=<span class="hljs-number">0.6</span>).frames
<span class="hljs-meta">&gt;&gt;&gt; </span>video_path = export_to_video(video_frames, output_video_path=<span class="hljs-string">&quot;./video_1024_spiderman.mp4&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>video_path`}}),{c(){y=s("p"),D=a("Examples:"),T=l(),h(w.$$.fragment)},l(f){y=n(f,"P",{});var V=i(y);D=r(V,"Examples:"),V.forEach(o),T=d(f),u(w.$$.fragment,f)},m(f,V){m(f,y,V),t(y,D),m(f,T,V),g(w,f,V),Z=!0},p:$r,i(f){Z||(_(w.$$.fragment,f),Z=!0)},o(f){v(w.$$.fragment,f),Z=!1},d(f){f&&o(y),f&&o(T),b(w,f)}}}function Br(L){let y,D,T,w,Z,f,V,_e,Es,Dt,$s,Vo,ve,be,Ds,js,Jo,ft,ks,Eo,ht,jt,Us,$o,j,Gs,ye,Ps,Ss,we,Ws,Is,Te,Bs,Xs,Me,Cs,zs,xe,Ns,Rs,Do,B,F,kt,Ze,As,Ut,Ls,jo,X,Y,Gt,Ve,Fs,Pt,St,Ys,ko,ut,Hs,Uo,Je,Go,gt,Qs,Po,_t,qs,So,Ee,Wo,H,Os,Wt,Ks,en,Io,vt,tn,Bo,$e,Xo,bt,on,Co,yt,De,It,Q,sn,nn,an,je,aa,rn,Bt,q,ln,dn,pn,ke,ra,zo,C,O,Xt,Ue,cn,Ge,Ct,mn,fn,zt,hn,No,J,un,Nt,gn,_n,Rt,vn,bn,Pe,At,yn,wn,wt,Tn,Mn,Tt,xn,Zn,Se,Lt,Vn,Jn,Ro,We,Ao,Mt,En,Lo,Ie,Fo,xt,$n,Yo,Zt,Ft,Yt,K,Dn,jn,kn,Be,la,Ho,z,ee,Ht,Xe,Un,Qt,Gn,Qo,M,Ce,Pn,qt,Sn,Wn,ze,In,Vt,Bn,Xn,Cn,W,Ne,zn,Ot,Nn,Rn,te,An,oe,Re,Ln,Ae,Fn,Kt,Yn,Hn,Qn,se,Le,qn,Fe,On,eo,Kn,ei,ti,ne,Ye,oi,P,si,to,ni,ii,oo,ai,ri,so,li,di,pi,ie,He,ci,no,mi,fi,ae,Qe,hi,io,ui,qo,N,re,ao,qe,gi,ro,_i,Oo,x,Oe,vi,lo,bi,yi,Ke,wi,Jt,Ti,Mi,xi,I,et,Zi,po,Vi,Ji,le,Ei,de,tt,$i,ot,Di,co,ji,ki,Ui,pe,st,Gi,nt,Pi,mo,Si,Wi,Ii,ce,it,Bi,S,Xi,fo,Ci,zi,ho,Ni,Ri,uo,Ai,Li,Fi,me,at,Yi,go,Hi,Qi,fe,rt,qi,_o,Oi,Ko,R,he,vo,lt,Ki,bo,ea,es,A,dt,ta,yo,oa,ts;return T=new Pr({props:{warning:!0,$$slots:{default:[Sr]},$$scope:{ctx:L}}}),_e=new ct({}),Ze=new ct({}),Ve=new ct({}),Je=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJkYW1vLXZpbGFiJTJGdGV4dC10by12aWRlby1tcy0xLjdiJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIpJTBBcGlwZSUyMCUzRCUyMHBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJTcGlkZXJtYW4lMjBpcyUyMHN1cmZpbmclMjIlMEF2aWRlb19mcmFtZXMlMjAlM0QlMjBwaXBlKHByb21wdCkuZnJhbWVzJTBBdmlkZW9fcGF0aCUyMCUzRCUyMGV4cG9ydF90b192aWRlbyh2aWRlb19mcmFtZXMpJTBBdmlkZW9fcGF0aA==",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`}}),Ee=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJkYW1vLXZpbGFiJTJGdGV4dC10by12aWRlby1tcy0xLjdiJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQSUyMyUyMG1lbW9yeSUyMG9wdGltaXphdGlvbiUwQXBpcGUuZW5hYmxlX3ZhZV9zbGljaW5nKCklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJEYXJ0aCUyMFZhZGVyJTIwc3VyZmluZyUyMGElMjB3YXZlJTIyJTBBdmlkZW9fZnJhbWVzJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1fZnJhbWVzJTNENjQpLmZyYW1lcyUwQXZpZGVvX3BhdGglMjAlM0QlMjBleHBvcnRfdG9fdmlkZW8odmlkZW9fZnJhbWVzKSUwQXZpZGVvX3BhdGg=",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`}}),$e=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMkMlMjBEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJkYW1vLXZpbGFiJTJGdGV4dC10by12aWRlby1tcy0xLjdiJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIpJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZS5zY2hlZHVsZXIuY29uZmlnKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJTcGlkZXJtYW4lMjBpcyUyMHN1cmZpbmclMjIlMEF2aWRlb19mcmFtZXMlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyNSkuZnJhbWVzJTBBdmlkZW9fcGF0aCUyMCUzRCUyMGV4cG9ydF90b192aWRlbyh2aWRlb19mcmFtZXMpJTBBdmlkZW9fcGF0aA==",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`}}),Ue=new ct({}),We=new mt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJjZXJzcGVuc2UlMkZ6ZXJvc2NvcGVfdjJfNTc2dyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBJTIzJTIwbWVtb3J5JTIwb3B0aW1pemF0aW9uJTBBcGlwZS51bmV0LmVuYWJsZV9mb3J3YXJkX2NodW5raW5nKGNodW5rX3NpemUlM0QxJTJDJTIwZGltJTNEMSklMEFwaXBlLmVuYWJsZV92YWVfc2xpY2luZygpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyRGFydGglMjBWYWRlciUyMHN1cmZpbmclMjBhJTIwd2F2ZSUyMiUwQXZpZGVvX2ZyYW1lcyUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwbnVtX2ZyYW1lcyUzRDI0KS5mcmFtZXMlMEF2aWRlb19wYXRoJTIwJTNEJTIwZXhwb3J0X3RvX3ZpZGVvKHZpZGVvX2ZyYW1lcyklMEF2aWRlb19wYXRo",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;cerspense/zeroscope_v2_576w&quot;</span>, torch_dtype=torch.float16)
pipe.enable_model_cpu_offload()

<span class="hljs-comment"># memory optimization</span>
pipe.unet.enable_forward_chunking(chunk_size=<span class="hljs-number">1</span>, dim=<span class="hljs-number">1</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">24</span>).frames
video_path = export_to_video(video_frames)
video_path`}}),Ie=new mt({props:{code:"cGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJjZXJzcGVuc2UlMkZ6ZXJvc2NvcGVfdjJfWEwlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZS5zY2hlZHVsZXIlMjAlM0QlMjBEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9jb25maWcocGlwZS5zY2hlZHVsZXIuY29uZmlnKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEElMjMlMjBtZW1vcnklMjBvcHRpbWl6YXRpb24lMEFwaXBlLnVuZXQuZW5hYmxlX2ZvcndhcmRfY2h1bmtpbmcoY2h1bmtfc2l6ZSUzRDElMkMlMjBkaW0lM0QxKSUwQXBpcGUuZW5hYmxlX3ZhZV9zbGljaW5nKCklMEElMEF2aWRlbyUyMCUzRCUyMCU1QkltYWdlLmZyb21hcnJheShmcmFtZSkucmVzaXplKCgxMDI0JTJDJTIwNTc2KSklMjBmb3IlMjBmcmFtZSUyMGluJTIwdmlkZW9fZnJhbWVzJTVEJTBBJTBBdmlkZW9fZnJhbWVzJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjB2aWRlbyUzRHZpZGVvJTJDJTIwc3RyZW5ndGglM0QwLjYpLmZyYW1lcyUwQXZpZGVvX3BhdGglMjAlM0QlMjBleHBvcnRfdG9fdmlkZW8odmlkZW9fZnJhbWVzKSUwQXZpZGVvX3BhdGg=",highlighted:`pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;cerspense/zeroscope_v2_XL&quot;</span>, torch_dtype=torch.float16)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()

<span class="hljs-comment"># memory optimization</span>
pipe.unet.enable_forward_chunking(chunk_size=<span class="hljs-number">1</span>, dim=<span class="hljs-number">1</span>)
pipe.enable_vae_slicing()

video = [Image.fromarray(frame).resize((<span class="hljs-number">1024</span>, <span class="hljs-number">576</span>)) <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> video_frames]

video_frames = pipe(prompt, video=video, strength=<span class="hljs-number">0.6</span>).frames
video_path = export_to_video(video_frames)
video_path`}}),Xe=new ct({}),Ce=new k({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/main/en/api/models/autoencoderkl#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 (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.TextToVideoSDPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.TextToVideoSDPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/main/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a> to denoise the encoded video latents.`,name:"unet"},{anchor:"diffusers.TextToVideoSDPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L76"}}),Ne=new k({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 image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#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 <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#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;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,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 to guide what to not include in image generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.TextToVideoSDPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_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;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,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;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></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 is 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 (prompt weighting). If not
provided, text embeddings are generated from the <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 (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <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 generated 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 <a href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput">TextToVideoSDPipelineOutput</a> 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 calls every <code>callback_steps</code> steps during inference. The function is 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 is called. If not specified, the callback is 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 in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L450",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> is
returned, otherwise a <code>tuple</code> is returned where the first element is a list with the generated frames.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> or <code>tuple</code></p>
`}}),te=new Er({props:{anchor:"diffusers.TextToVideoSDPipeline.__call__.example",$$slots:{default:[Wr]},$$scope:{ctx:L}}}),Re=new k({props:{name:"disable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L125"}}),Le=new k({props:{name:"disable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L142"}}),Ye=new k({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/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L149"}}),He=new k({props:{name:"enable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L117"}}),Qe=new k({props:{name:"enable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L133"}}),qe=new ct({}),Oe=new k({props:{name:"class diffusers.VideoToVideoSDPipeline",anchor:"diffusers.VideoToVideoSDPipeline",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.VideoToVideoSDPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.VideoToVideoSDPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.VideoToVideoSDPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/main/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VideoToVideoSDPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/main/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a> to denoise the encoded video latents.`,name:"unet"},{anchor:"diffusers.VideoToVideoSDPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/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/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L138"}}),et=new k({props:{name:"__call__",anchor:"diffusers.VideoToVideoSDPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"video",val:": typing.Union[typing.List[numpy.ndarray], torch.FloatTensor] = None"},{name:"strength",val:": float = 0.6"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 15.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.VideoToVideoSDPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,name:"prompt"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.video",description:`<strong>video</strong> (<code>List[np.ndarray]</code> or <code>torch.FloatTensor</code>) &#x2014;
<code>video</code> frames or tensor representing a video batch to be used as the starting point for the process.
Can also accept video latents as <code>image</code>, if passing latents directly, it will not be encoded again.`,name:"video"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.strength",description:`<strong>strength</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
Indicates extent to transform the reference <code>video</code>. Must be between 0 and 1. <code>video</code> is used as a
starting point, adding more noise to it the larger the <code>strength</code>. The number of denoising steps
depends on the amount of noise initially added. When <code>strength</code> is 1, added noise is maximum and the
denoising process runs for the full number of iterations specified in <code>num_inference_steps</code>. A value of
1 essentially ignores <code>video</code>.`,name:"strength"},{anchor:"diffusers.VideoToVideoSDPipeline.__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.VideoToVideoSDPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
A higher guidance scale value encourages the model to generate images closely linked to the text
<code>prompt</code> at the expense of lower image quality. Guidance scale is enabled when <code>guidance_scale &gt; 1</code>.`,name:"guidance_scale"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide what to not include in video generation. If not defined, you need to
pass <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,name:"eta"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 is 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.VideoToVideoSDPipeline.__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 (prompt weighting). If not
provided, text embeddings are generated from the <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 (prompt weighting). If
not provided, <code>negative_prompt_embeds</code> are generated from the <code>negative_prompt</code> input argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 generated video. Choose between <code>torch.FloatTensor</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 <a href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput">TextToVideoSDPipelineOutput</a> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.VideoToVideoSDPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that calls every <code>callback_steps</code> steps during inference. The function is called with the
following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 is called. If not specified, the callback is called at
every step.`,name:"callback_steps"},{anchor:"diffusers.VideoToVideoSDPipeline.__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 in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow"><code>self.processor</code></a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L535",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> is
returned, otherwise a <code>tuple</code> is returned where the first element is a list with the generated frames.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> or <code>tuple</code></p>
`}}),le=new Er({props:{anchor:"diffusers.VideoToVideoSDPipeline.__call__.example",$$slots:{default:[Ir]},$$scope:{ctx:L}}}),tt=new k({props:{name:"disable_vae_slicing",anchor:"diffusers.VideoToVideoSDPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L187"}}),st=new k({props:{name:"disable_vae_tiling",anchor:"diffusers.VideoToVideoSDPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L204"}}),it=new k({props:{name:"enable_model_cpu_offload",anchor:"diffusers.VideoToVideoSDPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L211"}}),at=new k({props:{name:"enable_vae_slicing",anchor:"diffusers.VideoToVideoSDPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L179"}}),rt=new k({props:{name:"enable_vae_tiling",anchor:"diffusers.VideoToVideoSDPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L195"}}),lt=new ct({}),dt=new k({props:{name:"class diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput",anchor:"diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput",parameters:[{name:"frames",val:": typing.Union[typing.List[numpy.ndarray], torch.FloatTensor]"}],parametersDescription:[{anchor:"diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput.frames",description:`<strong>frames</strong> (<code>List[np.ndarray]</code> or <code>torch.FloatTensor</code>) &#x2014;
List of denoised frames (essentially images) as NumPy arrays of shape <code>(height, width, num_channels)</code> or as
a <code>torch</code> tensor. The length of the list denotes the video length (the number of frames).`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/__init__.py#L11"}}),{c(){y=s("meta"),D=l(),h(T.$$.fragment),w=l(),Z=s("h1"),f=s("a"),V=s("span"),h(_e.$$.fragment),Es=l(),Dt=s("span"),$s=a("Text-to-video"),Vo=l(),ve=s("p"),be=s("a"),Ds=a("VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),js=a(" is by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),Jo=l(),ft=s("p"),ks=a("The abstract from the paper is:"),Eo=l(),ht=s("p"),jt=s("em"),Us=a("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."),$o=l(),j=s("p"),Gs=a("You can find additional information about Text-to-Video on the "),ye=s("a"),Ps=a("project page"),Ss=a(", "),we=s("a"),Ws=a("original codebase"),Is=a(", and try it out in a "),Te=s("a"),Bs=a("demo"),Xs=a(". Official checkpoints can be found at "),Me=s("a"),Cs=a("damo-vilab"),zs=a(" and "),xe=s("a"),Ns=a("cerspense"),Rs=a("."),Do=l(),B=s("h2"),F=s("a"),kt=s("span"),h(Ze.$$.fragment),As=l(),Ut=s("span"),Ls=a("Usage example"),jo=l(),X=s("h3"),Y=s("a"),Gt=s("span"),h(Ve.$$.fragment),Fs=l(),Pt=s("span"),St=s("code"),Ys=a("text-to-video-ms-1.7b"),ko=l(),ut=s("p"),Hs=a("Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),Uo=l(),h(Je.$$.fragment),Go=l(),gt=s("p"),Qs=a(`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.`),Po=l(),_t=s("p"),qs=a("Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),So=l(),h(Ee.$$.fragment),Wo=l(),H=s("p"),Os=a("It just takes "),Wt=s("strong"),Ks=a("7 GBs of GPU memory"),en=a(" to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),Io=l(),vt=s("p"),tn=a("We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),Bo=l(),h($e.$$.fragment),Xo=l(),bt=s("p"),on=a("Here are some sample outputs:"),Co=l(),yt=s("table"),De=s("tr"),It=s("td"),Q=s("center"),sn=a(`An astronaut riding a horse.
        `),nn=s("br"),an=l(),je=s("img"),rn=l(),Bt=s("td"),q=s("center"),ln=a(`Darth vader surfing in waves.
        `),dn=s("br"),pn=l(),ke=s("img"),zo=l(),C=s("h3"),O=s("a"),Xt=s("span"),h(Ue.$$.fragment),cn=l(),Ge=s("span"),Ct=s("code"),mn=a("cerspense/zeroscope_v2_576w"),fn=a(" & "),zt=s("code"),hn=a("cerspense/zeroscope_v2_XL"),No=l(),J=s("p"),un=a("Zeroscope are watermark-free model and have been trained on specific sizes such as "),Nt=s("code"),gn=a("576x320"),_n=a(" and "),Rt=s("code"),vn=a("1024x576"),bn=a(`.
One should first generate a video using the lower resolution checkpoint `),Pe=s("a"),At=s("code"),yn=a("cerspense/zeroscope_v2_576w"),wn=a(" with "),wt=s("a"),Tn=a("TextToVideoSDPipeline"),Mn=a(`,
which can then be upscaled using `),Tt=s("a"),xn=a("VideoToVideoSDPipeline"),Zn=a(" and "),Se=s("a"),Lt=s("code"),Vn=a("cerspense/zeroscope_v2_XL"),Jn=a("."),Ro=l(),h(We.$$.fragment),Ao=l(),Mt=s("p"),En=a("Now the video can be upscaled:"),Lo=l(),h(Ie.$$.fragment),Fo=l(),xt=s("p"),$n=a("Here are some sample outputs:"),Yo=l(),Zt=s("table"),Ft=s("tr"),Yt=s("td"),K=s("center"),Dn=a(`Darth vader surfing in waves.
        `),jn=s("br"),kn=l(),Be=s("img"),Ho=l(),z=s("h2"),ee=s("a"),Ht=s("span"),h(Xe.$$.fragment),Un=l(),Qt=s("span"),Gn=a("TextToVideoSDPipeline"),Qo=l(),M=s("div"),h(Ce.$$.fragment),Pn=l(),qt=s("p"),Sn=a("Pipeline for text-to-video generation."),Wn=l(),ze=s("p"),In=a("This model inherits from "),Vt=s("a"),Bn=a("DiffusionPipeline"),Xn=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Cn=l(),W=s("div"),h(Ne.$$.fragment),zn=l(),Ot=s("p"),Nn=a("The call function to the pipeline for generation."),Rn=l(),h(te.$$.fragment),An=l(),oe=s("div"),h(Re.$$.fragment),Ln=l(),Ae=s("p"),Fn=a("Disable sliced VAE decoding. If "),Kt=s("code"),Yn=a("enable_vae_slicing"),Hn=a(` was previously enabled, this method will go back to
computing decoding in one step.`),Qn=l(),se=s("div"),h(Le.$$.fragment),qn=l(),Fe=s("p"),On=a("Disable tiled VAE decoding. If "),eo=s("code"),Kn=a("enable_vae_tiling"),ei=a(` was previously enabled, this method will go back to
computing decoding in one step.`),ti=l(),ne=s("div"),h(Ye.$$.fragment),oi=l(),P=s("p"),si=a(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),to=s("code"),ni=a("forward"),ii=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),oo=s("code"),ai=a("enable_sequential_cpu_offload"),ri=a(`, but performance is much better due to the
iterative execution of the `),so=s("code"),li=a("unet"),di=a("."),pi=l(),ie=s("div"),h(He.$$.fragment),ci=l(),no=s("p"),mi=a(`Enable sliced VAE decoding. 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.`),fi=l(),ae=s("div"),h(Qe.$$.fragment),hi=l(),io=s("p"),ui=a(`Enable tiled VAE decoding. 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 for saving a large amount of memory and to allow
processing larger images.`),qo=l(),N=s("h2"),re=s("a"),ao=s("span"),h(qe.$$.fragment),gi=l(),ro=s("span"),_i=a("VideoToVideoSDPipeline"),Oo=l(),x=s("div"),h(Oe.$$.fragment),vi=l(),lo=s("p"),bi=a("Pipeline for text-guided video-to-video generation."),yi=l(),Ke=s("p"),wi=a("This model inherits from "),Jt=s("a"),Ti=a("DiffusionPipeline"),Mi=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),xi=l(),I=s("div"),h(et.$$.fragment),Zi=l(),po=s("p"),Vi=a("The call function to the pipeline for generation."),Ji=l(),h(le.$$.fragment),Ei=l(),de=s("div"),h(tt.$$.fragment),$i=l(),ot=s("p"),Di=a("Disable sliced VAE decoding. If "),co=s("code"),ji=a("enable_vae_slicing"),ki=a(` was previously enabled, this method will go back to
computing decoding in one step.`),Ui=l(),pe=s("div"),h(st.$$.fragment),Gi=l(),nt=s("p"),Pi=a("Disable tiled VAE decoding. If "),mo=s("code"),Si=a("enable_vae_tiling"),Wi=a(` was previously enabled, this method will go back to
computing decoding in one step.`),Ii=l(),ce=s("div"),h(it.$$.fragment),Bi=l(),S=s("p"),Xi=a(`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),fo=s("code"),Ci=a("forward"),zi=a(` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),ho=s("code"),Ni=a("enable_sequential_cpu_offload"),Ri=a(`, but performance is much better due to the
iterative execution of the `),uo=s("code"),Ai=a("unet"),Li=a("."),Fi=l(),me=s("div"),h(at.$$.fragment),Yi=l(),go=s("p"),Hi=a(`Enable sliced VAE decoding. 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.`),Qi=l(),fe=s("div"),h(rt.$$.fragment),qi=l(),_o=s("p"),Oi=a(`Enable tiled VAE decoding. 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 for saving a large amount of memory and to allow
processing larger images.`),Ko=l(),R=s("h2"),he=s("a"),vo=s("span"),h(lt.$$.fragment),Ki=l(),bo=s("span"),ea=a("TextToVideoSDPipelineOutput"),es=l(),A=s("div"),h(dt.$$.fragment),ta=l(),yo=s("p"),oa=a("Output class for text-to-video pipelines."),this.h()},l(e){const p=Ur('[data-svelte="svelte-1phssyn"]',document.head);y=n(p,"META",{name:!0,content:!0}),p.forEach(o),D=d(e),u(T.$$.fragment,e),w=d(e),Z=n(e,"H1",{class:!0});var pt=i(Z);f=n(pt,"A",{id:!0,class:!0,href:!0});var wo=i(f);V=n(wo,"SPAN",{});var To=i(V);u(_e.$$.fragment,To),To.forEach(o),wo.forEach(o),Es=d(pt),Dt=n(pt,"SPAN",{});var da=i(Dt);$s=r(da,"Text-to-video"),da.forEach(o),pt.forEach(o),Vo=d(e),ve=n(e,"P",{});var sa=i(ve);be=n(sa,"A",{href:!0,rel:!0});var pa=i(be);Ds=r(pa,"VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),pa.forEach(o),js=r(sa," is by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),sa.forEach(o),Jo=d(e),ft=n(e,"P",{});var ca=i(ft);ks=r(ca,"The abstract from the paper is:"),ca.forEach(o),Eo=d(e),ht=n(e,"P",{});var ma=i(ht);jt=n(ma,"EM",{});var fa=i(jt);Us=r(fa,"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."),fa.forEach(o),ma.forEach(o),$o=d(e),j=n(e,"P",{});var G=i(j);Gs=r(G,"You can find additional information about Text-to-Video on the "),ye=n(G,"A",{href:!0,rel:!0});var ha=i(ye);Ps=r(ha,"project page"),ha.forEach(o),Ss=r(G,", "),we=n(G,"A",{href:!0,rel:!0});var ua=i(we);Ws=r(ua,"original codebase"),ua.forEach(o),Is=r(G,", and try it out in a "),Te=n(G,"A",{href:!0,rel:!0});var ga=i(Te);Bs=r(ga,"demo"),ga.forEach(o),Xs=r(G,". Official checkpoints can be found at "),Me=n(G,"A",{href:!0,rel:!0});var _a=i(Me);Cs=r(_a,"damo-vilab"),_a.forEach(o),zs=r(G," and "),xe=n(G,"A",{href:!0,rel:!0});var va=i(xe);Ns=r(va,"cerspense"),va.forEach(o),Rs=r(G,"."),G.forEach(o),Do=d(e),B=n(e,"H2",{class:!0});var os=i(B);F=n(os,"A",{id:!0,class:!0,href:!0});var ba=i(F);kt=n(ba,"SPAN",{});var ya=i(kt);u(Ze.$$.fragment,ya),ya.forEach(o),ba.forEach(o),As=d(os),Ut=n(os,"SPAN",{});var wa=i(Ut);Ls=r(wa,"Usage example"),wa.forEach(o),os.forEach(o),jo=d(e),X=n(e,"H3",{class:!0});var ss=i(X);Y=n(ss,"A",{id:!0,class:!0,href:!0});var Ta=i(Y);Gt=n(Ta,"SPAN",{});var Ma=i(Gt);u(Ve.$$.fragment,Ma),Ma.forEach(o),Ta.forEach(o),Fs=d(ss),Pt=n(ss,"SPAN",{});var xa=i(Pt);St=n(xa,"CODE",{});var Za=i(St);Ys=r(Za,"text-to-video-ms-1.7b"),Za.forEach(o),xa.forEach(o),ss.forEach(o),ko=d(e),ut=n(e,"P",{});var Va=i(ut);Hs=r(Va,"Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),Va.forEach(o),Uo=d(e),u(Je.$$.fragment,e),Go=d(e),gt=n(e,"P",{});var Ja=i(gt);Qs=r(Ja,`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.`),Ja.forEach(o),Po=d(e),_t=n(e,"P",{});var Ea=i(_t);qs=r(Ea,"Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),Ea.forEach(o),So=d(e),u(Ee.$$.fragment,e),Wo=d(e),H=n(e,"P",{});var ns=i(H);Os=r(ns,"It just takes "),Wt=n(ns,"STRONG",{});var $a=i(Wt);Ks=r($a,"7 GBs of GPU memory"),$a.forEach(o),en=r(ns," to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),ns.forEach(o),Io=d(e),vt=n(e,"P",{});var Da=i(vt);tn=r(Da,"We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),Da.forEach(o),Bo=d(e),u($e.$$.fragment,e),Xo=d(e),bt=n(e,"P",{});var ja=i(bt);on=r(ja,"Here are some sample outputs:"),ja.forEach(o),Co=d(e),yt=n(e,"TABLE",{});var ka=i(yt);De=n(ka,"TR",{});var is=i(De);It=n(is,"TD",{});var Ua=i(It);Q=n(Ua,"CENTER",{});var Mo=i(Q);sn=r(Mo,`An astronaut riding a horse.
        `),nn=n(Mo,"BR",{}),an=d(Mo),je=n(Mo,"IMG",{src:!0,alt:!0,style:!0}),Mo.forEach(o),Ua.forEach(o),rn=d(is),Bt=n(is,"TD",{});var Ga=i(Bt);q=n(Ga,"CENTER",{});var xo=i(q);ln=r(xo,`Darth vader surfing in waves.
        `),dn=n(xo,"BR",{}),pn=d(xo),ke=n(xo,"IMG",{src:!0,alt:!0,style:!0}),xo.forEach(o),Ga.forEach(o),is.forEach(o),ka.forEach(o),zo=d(e),C=n(e,"H3",{class:!0});var as=i(C);O=n(as,"A",{id:!0,class:!0,href:!0});var Pa=i(O);Xt=n(Pa,"SPAN",{});var Sa=i(Xt);u(Ue.$$.fragment,Sa),Sa.forEach(o),Pa.forEach(o),cn=d(as),Ge=n(as,"SPAN",{});var rs=i(Ge);Ct=n(rs,"CODE",{});var Wa=i(Ct);mn=r(Wa,"cerspense/zeroscope_v2_576w"),Wa.forEach(o),fn=r(rs," & "),zt=n(rs,"CODE",{});var Ia=i(zt);hn=r(Ia,"cerspense/zeroscope_v2_XL"),Ia.forEach(o),rs.forEach(o),as.forEach(o),No=d(e),J=n(e,"P",{});var U=i(J);un=r(U,"Zeroscope are watermark-free model and have been trained on specific sizes such as "),Nt=n(U,"CODE",{});var Ba=i(Nt);gn=r(Ba,"576x320"),Ba.forEach(o),_n=r(U," and "),Rt=n(U,"CODE",{});var Xa=i(Rt);vn=r(Xa,"1024x576"),Xa.forEach(o),bn=r(U,`.
One should first generate a video using the lower resolution checkpoint `),Pe=n(U,"A",{href:!0,rel:!0});var Ca=i(Pe);At=n(Ca,"CODE",{});var za=i(At);yn=r(za,"cerspense/zeroscope_v2_576w"),za.forEach(o),Ca.forEach(o),wn=r(U," with "),wt=n(U,"A",{href:!0});var Na=i(wt);Tn=r(Na,"TextToVideoSDPipeline"),Na.forEach(o),Mn=r(U,`,
which can then be upscaled using `),Tt=n(U,"A",{href:!0});var Ra=i(Tt);xn=r(Ra,"VideoToVideoSDPipeline"),Ra.forEach(o),Zn=r(U," and "),Se=n(U,"A",{href:!0,rel:!0});var Aa=i(Se);Lt=n(Aa,"CODE",{});var La=i(Lt);Vn=r(La,"cerspense/zeroscope_v2_XL"),La.forEach(o),Aa.forEach(o),Jn=r(U,"."),U.forEach(o),Ro=d(e),u(We.$$.fragment,e),Ao=d(e),Mt=n(e,"P",{});var Fa=i(Mt);En=r(Fa,"Now the video can be upscaled:"),Fa.forEach(o),Lo=d(e),u(Ie.$$.fragment,e),Fo=d(e),xt=n(e,"P",{});var Ya=i(xt);$n=r(Ya,"Here are some sample outputs:"),Ya.forEach(o),Yo=d(e),Zt=n(e,"TABLE",{});var Ha=i(Zt);Ft=n(Ha,"TR",{});var Qa=i(Ft);Yt=n(Qa,"TD",{});var qa=i(Yt);K=n(qa,"CENTER",{});var Zo=i(K);Dn=r(Zo,`Darth vader surfing in waves.
        `),jn=n(Zo,"BR",{}),kn=d(Zo),Be=n(Zo,"IMG",{src:!0,alt:!0,style:!0}),Zo.forEach(o),qa.forEach(o),Qa.forEach(o),Ha.forEach(o),Ho=d(e),z=n(e,"H2",{class:!0});var ls=i(z);ee=n(ls,"A",{id:!0,class:!0,href:!0});var Oa=i(ee);Ht=n(Oa,"SPAN",{});var Ka=i(Ht);u(Xe.$$.fragment,Ka),Ka.forEach(o),Oa.forEach(o),Un=d(ls),Qt=n(ls,"SPAN",{});var er=i(Qt);Gn=r(er,"TextToVideoSDPipeline"),er.forEach(o),ls.forEach(o),Qo=d(e),M=n(e,"DIV",{class:!0});var E=i(M);u(Ce.$$.fragment,E),Pn=d(E),qt=n(E,"P",{});var tr=i(qt);Sn=r(tr,"Pipeline for text-to-video generation."),tr.forEach(o),Wn=d(E),ze=n(E,"P",{});var ds=i(ze);In=r(ds,"This model inherits from "),Vt=n(ds,"A",{href:!0});var or=i(Vt);Bn=r(or,"DiffusionPipeline"),or.forEach(o),Xn=r(ds,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ds.forEach(o),Cn=d(E),W=n(E,"DIV",{class:!0});var Et=i(W);u(Ne.$$.fragment,Et),zn=d(Et),Ot=n(Et,"P",{});var sr=i(Ot);Nn=r(sr,"The call function to the pipeline for generation."),sr.forEach(o),Rn=d(Et),u(te.$$.fragment,Et),Et.forEach(o),An=d(E),oe=n(E,"DIV",{class:!0});var ps=i(oe);u(Re.$$.fragment,ps),Ln=d(ps),Ae=n(ps,"P",{});var cs=i(Ae);Fn=r(cs,"Disable sliced VAE decoding. If "),Kt=n(cs,"CODE",{});var nr=i(Kt);Yn=r(nr,"enable_vae_slicing"),nr.forEach(o),Hn=r(cs,` was previously enabled, this method will go back to
computing decoding in one step.`),cs.forEach(o),ps.forEach(o),Qn=d(E),se=n(E,"DIV",{class:!0});var ms=i(se);u(Le.$$.fragment,ms),qn=d(ms),Fe=n(ms,"P",{});var fs=i(Fe);On=r(fs,"Disable tiled VAE decoding. If "),eo=n(fs,"CODE",{});var ir=i(eo);Kn=r(ir,"enable_vae_tiling"),ir.forEach(o),ei=r(fs,` was previously enabled, this method will go back to
computing decoding in one step.`),fs.forEach(o),ms.forEach(o),ti=d(E),ne=n(E,"DIV",{class:!0});var hs=i(ne);u(Ye.$$.fragment,hs),oi=d(hs),P=n(hs,"P",{});var ue=i(P);si=r(ue,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),to=n(ue,"CODE",{});var ar=i(to);ni=r(ar,"forward"),ar.forEach(o),ii=r(ue,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),oo=n(ue,"CODE",{});var rr=i(oo);ai=r(rr,"enable_sequential_cpu_offload"),rr.forEach(o),ri=r(ue,`, but performance is much better due to the
iterative execution of the `),so=n(ue,"CODE",{});var lr=i(so);li=r(lr,"unet"),lr.forEach(o),di=r(ue,"."),ue.forEach(o),hs.forEach(o),pi=d(E),ie=n(E,"DIV",{class:!0});var us=i(ie);u(He.$$.fragment,us),ci=d(us),no=n(us,"P",{});var dr=i(no);mi=r(dr,`Enable sliced VAE decoding. 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.`),dr.forEach(o),us.forEach(o),fi=d(E),ae=n(E,"DIV",{class:!0});var gs=i(ae);u(Qe.$$.fragment,gs),hi=d(gs),io=n(gs,"P",{});var pr=i(io);ui=r(pr,`Enable tiled VAE decoding. 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 for saving a large amount of memory and to allow
processing larger images.`),pr.forEach(o),gs.forEach(o),E.forEach(o),qo=d(e),N=n(e,"H2",{class:!0});var _s=i(N);re=n(_s,"A",{id:!0,class:!0,href:!0});var cr=i(re);ao=n(cr,"SPAN",{});var mr=i(ao);u(qe.$$.fragment,mr),mr.forEach(o),cr.forEach(o),gi=d(_s),ro=n(_s,"SPAN",{});var fr=i(ro);_i=r(fr,"VideoToVideoSDPipeline"),fr.forEach(o),_s.forEach(o),Oo=d(e),x=n(e,"DIV",{class:!0});var $=i(x);u(Oe.$$.fragment,$),vi=d($),lo=n($,"P",{});var hr=i(lo);bi=r(hr,"Pipeline for text-guided video-to-video generation."),hr.forEach(o),yi=d($),Ke=n($,"P",{});var vs=i(Ke);wi=r(vs,"This model inherits from "),Jt=n(vs,"A",{href:!0});var ur=i(Jt);Ti=r(ur,"DiffusionPipeline"),ur.forEach(o),Mi=r(vs,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),vs.forEach(o),xi=d($),I=n($,"DIV",{class:!0});var $t=i(I);u(et.$$.fragment,$t),Zi=d($t),po=n($t,"P",{});var gr=i(po);Vi=r(gr,"The call function to the pipeline for generation."),gr.forEach(o),Ji=d($t),u(le.$$.fragment,$t),$t.forEach(o),Ei=d($),de=n($,"DIV",{class:!0});var bs=i(de);u(tt.$$.fragment,bs),$i=d(bs),ot=n(bs,"P",{});var ys=i(ot);Di=r(ys,"Disable sliced VAE decoding. If "),co=n(ys,"CODE",{});var _r=i(co);ji=r(_r,"enable_vae_slicing"),_r.forEach(o),ki=r(ys,` was previously enabled, this method will go back to
computing decoding in one step.`),ys.forEach(o),bs.forEach(o),Ui=d($),pe=n($,"DIV",{class:!0});var ws=i(pe);u(st.$$.fragment,ws),Gi=d(ws),nt=n(ws,"P",{});var Ts=i(nt);Pi=r(Ts,"Disable tiled VAE decoding. If "),mo=n(Ts,"CODE",{});var vr=i(mo);Si=r(vr,"enable_vae_tiling"),vr.forEach(o),Wi=r(Ts,` was previously enabled, this method will go back to
computing decoding in one step.`),Ts.forEach(o),ws.forEach(o),Ii=d($),ce=n($,"DIV",{class:!0});var Ms=i(ce);u(it.$$.fragment,Ms),Bi=d(Ms),S=n(Ms,"P",{});var ge=i(S);Xi=r(ge,`Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a
time to the GPU when its `),fo=n(ge,"CODE",{});var br=i(fo);Ci=r(br,"forward"),br.forEach(o),zi=r(ge,` method is called, and the model remains in GPU until the next model runs.
Memory savings are lower than using `),ho=n(ge,"CODE",{});var yr=i(ho);Ni=r(yr,"enable_sequential_cpu_offload"),yr.forEach(o),Ri=r(ge,`, but performance is much better due to the
iterative execution of the `),uo=n(ge,"CODE",{});var wr=i(uo);Ai=r(wr,"unet"),wr.forEach(o),Li=r(ge,"."),ge.forEach(o),Ms.forEach(o),Fi=d($),me=n($,"DIV",{class:!0});var xs=i(me);u(at.$$.fragment,xs),Yi=d(xs),go=n(xs,"P",{});var Tr=i(go);Hi=r(Tr,`Enable sliced VAE decoding. 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.`),Tr.forEach(o),xs.forEach(o),Qi=d($),fe=n($,"DIV",{class:!0});var Zs=i(fe);u(rt.$$.fragment,Zs),qi=d(Zs),_o=n(Zs,"P",{});var Mr=i(_o);Oi=r(Mr,`Enable tiled VAE decoding. 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 for saving a large amount of memory and to allow
processing larger images.`),Mr.forEach(o),Zs.forEach(o),$.forEach(o),Ko=d(e),R=n(e,"H2",{class:!0});var Vs=i(R);he=n(Vs,"A",{id:!0,class:!0,href:!0});var xr=i(he);vo=n(xr,"SPAN",{});var Zr=i(vo);u(lt.$$.fragment,Zr),Zr.forEach(o),xr.forEach(o),Ki=d(Vs),bo=n(Vs,"SPAN",{});var Vr=i(bo);ea=r(Vr,"TextToVideoSDPipelineOutput"),Vr.forEach(o),Vs.forEach(o),es=d(e),A=n(e,"DIV",{class:!0});var Js=i(A);u(dt.$$.fragment,Js),ta=d(Js),yo=n(Js,"P",{});var Jr=i(yo);oa=r(Jr,"Output class for text-to-video pipelines."),Jr.forEach(o),Js.forEach(o),this.h()},h(){c(y,"name","hf:doc:metadata"),c(y,"content",JSON.stringify(Xr)),c(f,"id","texttovideo"),c(f,"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"),c(f,"href","#texttovideo"),c(Z,"class","relative group"),c(be,"href","https://huggingface.co/papers/2303.08320"),c(be,"rel","nofollow"),c(ye,"href","https://modelscope.cn/models/damo/text-to-video-synthesis/summary"),c(ye,"rel","nofollow"),c(we,"href","https://github.com/modelscope/modelscope/"),c(we,"rel","nofollow"),c(Te,"href","https://huggingface.co/spaces/damo-vilab/modelscope-text-to-video-synthesis"),c(Te,"rel","nofollow"),c(Me,"href","https://huggingface.co/damo-vilab"),c(Me,"rel","nofollow"),c(xe,"href","https://huggingface.co/cerspense"),c(xe,"rel","nofollow"),c(F,"id","usage-example"),c(F,"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"),c(F,"href","#usage-example"),c(B,"class","relative group"),c(Y,"id","texttovideoms17b"),c(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"),c(Y,"href","#texttovideoms17b"),c(X,"class","relative group"),na(je.src,aa="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astr.gif")||c(je,"src",aa),c(je,"alt","An astronaut riding a horse."),ia(je,"width","300px"),na(ke.src,ra="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/vader.gif")||c(ke,"src",ra),c(ke,"alt","Darth vader surfing in waves."),ia(ke,"width","300px"),c(O,"id","cerspensezeroscopev2576w-cerspensezeroscopev2xl"),c(O,"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"),c(O,"href","#cerspensezeroscopev2576w-cerspensezeroscopev2xl"),c(C,"class","relative group"),c(Pe,"href","https://huggingface.co/cerspense/zeroscope_v2_576w"),c(Pe,"rel","nofollow"),c(wt,"href","/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.TextToVideoSDPipeline"),c(Tt,"href","/docs/diffusers/main/en/api/pipelines/text_to_video#diffusers.VideoToVideoSDPipeline"),c(Se,"href","https://huggingface.co/cerspense/zeroscope_v2_XL"),c(Se,"rel","nofollow"),na(Be.src,la="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/darthvader_cerpense.gif")||c(Be,"src",la),c(Be,"alt","Darth vader surfing in waves."),ia(Be,"width","576px"),c(ee,"id","diffusers.TextToVideoSDPipeline"),c(ee,"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"),c(ee,"href","#diffusers.TextToVideoSDPipeline"),c(z,"class","relative group"),c(Vt,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"id","diffusers.VideoToVideoSDPipeline"),c(re,"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"),c(re,"href","#diffusers.VideoToVideoSDPipeline"),c(N,"class","relative group"),c(Jt,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(he,"id","diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"),c(he,"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"),c(he,"href","#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"),c(R,"class","relative group"),c(A,"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,y),m(e,D,p),g(T,e,p),m(e,w,p),m(e,Z,p),t(Z,f),t(f,V),g(_e,V,null),t(Z,Es),t(Z,Dt),t(Dt,$s),m(e,Vo,p),m(e,ve,p),t(ve,be),t(be,Ds),t(ve,js),m(e,Jo,p),m(e,ft,p),t(ft,ks),m(e,Eo,p),m(e,ht,p),t(ht,jt),t(jt,Us),m(e,$o,p),m(e,j,p),t(j,Gs),t(j,ye),t(ye,Ps),t(j,Ss),t(j,we),t(we,Ws),t(j,Is),t(j,Te),t(Te,Bs),t(j,Xs),t(j,Me),t(Me,Cs),t(j,zs),t(j,xe),t(xe,Ns),t(j,Rs),m(e,Do,p),m(e,B,p),t(B,F),t(F,kt),g(Ze,kt,null),t(B,As),t(B,Ut),t(Ut,Ls),m(e,jo,p),m(e,X,p),t(X,Y),t(Y,Gt),g(Ve,Gt,null),t(X,Fs),t(X,Pt),t(Pt,St),t(St,Ys),m(e,ko,p),m(e,ut,p),t(ut,Hs),m(e,Uo,p),g(Je,e,p),m(e,Go,p),m(e,gt,p),t(gt,Qs),m(e,Po,p),m(e,_t,p),t(_t,qs),m(e,So,p),g(Ee,e,p),m(e,Wo,p),m(e,H,p),t(H,Os),t(H,Wt),t(Wt,Ks),t(H,en),m(e,Io,p),m(e,vt,p),t(vt,tn),m(e,Bo,p),g($e,e,p),m(e,Xo,p),m(e,bt,p),t(bt,on),m(e,Co,p),m(e,yt,p),t(yt,De),t(De,It),t(It,Q),t(Q,sn),t(Q,nn),t(Q,an),t(Q,je),t(De,rn),t(De,Bt),t(Bt,q),t(q,ln),t(q,dn),t(q,pn),t(q,ke),m(e,zo,p),m(e,C,p),t(C,O),t(O,Xt),g(Ue,Xt,null),t(C,cn),t(C,Ge),t(Ge,Ct),t(Ct,mn),t(Ge,fn),t(Ge,zt),t(zt,hn),m(e,No,p),m(e,J,p),t(J,un),t(J,Nt),t(Nt,gn),t(J,_n),t(J,Rt),t(Rt,vn),t(J,bn),t(J,Pe),t(Pe,At),t(At,yn),t(J,wn),t(J,wt),t(wt,Tn),t(J,Mn),t(J,Tt),t(Tt,xn),t(J,Zn),t(J,Se),t(Se,Lt),t(Lt,Vn),t(J,Jn),m(e,Ro,p),g(We,e,p),m(e,Ao,p),m(e,Mt,p),t(Mt,En),m(e,Lo,p),g(Ie,e,p),m(e,Fo,p),m(e,xt,p),t(xt,$n),m(e,Yo,p),m(e,Zt,p),t(Zt,Ft),t(Ft,Yt),t(Yt,K),t(K,Dn),t(K,jn),t(K,kn),t(K,Be),m(e,Ho,p),m(e,z,p),t(z,ee),t(ee,Ht),g(Xe,Ht,null),t(z,Un),t(z,Qt),t(Qt,Gn),m(e,Qo,p),m(e,M,p),g(Ce,M,null),t(M,Pn),t(M,qt),t(qt,Sn),t(M,Wn),t(M,ze),t(ze,In),t(ze,Vt),t(Vt,Bn),t(ze,Xn),t(M,Cn),t(M,W),g(Ne,W,null),t(W,zn),t(W,Ot),t(Ot,Nn),t(W,Rn),g(te,W,null),t(M,An),t(M,oe),g(Re,oe,null),t(oe,Ln),t(oe,Ae),t(Ae,Fn),t(Ae,Kt),t(Kt,Yn),t(Ae,Hn),t(M,Qn),t(M,se),g(Le,se,null),t(se,qn),t(se,Fe),t(Fe,On),t(Fe,eo),t(eo,Kn),t(Fe,ei),t(M,ti),t(M,ne),g(Ye,ne,null),t(ne,oi),t(ne,P),t(P,si),t(P,to),t(to,ni),t(P,ii),t(P,oo),t(oo,ai),t(P,ri),t(P,so),t(so,li),t(P,di),t(M,pi),t(M,ie),g(He,ie,null),t(ie,ci),t(ie,no),t(no,mi),t(M,fi),t(M,ae),g(Qe,ae,null),t(ae,hi),t(ae,io),t(io,ui),m(e,qo,p),m(e,N,p),t(N,re),t(re,ao),g(qe,ao,null),t(N,gi),t(N,ro),t(ro,_i),m(e,Oo,p),m(e,x,p),g(Oe,x,null),t(x,vi),t(x,lo),t(lo,bi),t(x,yi),t(x,Ke),t(Ke,wi),t(Ke,Jt),t(Jt,Ti),t(Ke,Mi),t(x,xi),t(x,I),g(et,I,null),t(I,Zi),t(I,po),t(po,Vi),t(I,Ji),g(le,I,null),t(x,Ei),t(x,de),g(tt,de,null),t(de,$i),t(de,ot),t(ot,Di),t(ot,co),t(co,ji),t(ot,ki),t(x,Ui),t(x,pe),g(st,pe,null),t(pe,Gi),t(pe,nt),t(nt,Pi),t(nt,mo),t(mo,Si),t(nt,Wi),t(x,Ii),t(x,ce),g(it,ce,null),t(ce,Bi),t(ce,S),t(S,Xi),t(S,fo),t(fo,Ci),t(S,zi),t(S,ho),t(ho,Ni),t(S,Ri),t(S,uo),t(uo,Ai),t(S,Li),t(x,Fi),t(x,me),g(at,me,null),t(me,Yi),t(me,go),t(go,Hi),t(x,Qi),t(x,fe),g(rt,fe,null),t(fe,qi),t(fe,_o),t(_o,Oi),m(e,Ko,p),m(e,R,p),t(R,he),t(he,vo),g(lt,vo,null),t(R,Ki),t(R,bo),t(bo,ea),m(e,es,p),m(e,A,p),g(dt,A,null),t(A,ta),t(A,yo),t(yo,oa),ts=!0},p(e,[p]){const pt={};p&2&&(pt.$$scope={dirty:p,ctx:e}),T.$set(pt);const wo={};p&2&&(wo.$$scope={dirty:p,ctx:e}),te.$set(wo);const To={};p&2&&(To.$$scope={dirty:p,ctx:e}),le.$set(To)},i(e){ts||(_(T.$$.fragment,e),_(_e.$$.fragment,e),_(Ze.$$.fragment,e),_(Ve.$$.fragment,e),_(Je.$$.fragment,e),_(Ee.$$.fragment,e),_($e.$$.fragment,e),_(Ue.$$.fragment,e),_(We.$$.fragment,e),_(Ie.$$.fragment,e),_(Xe.$$.fragment,e),_(Ce.$$.fragment,e),_(Ne.$$.fragment,e),_(te.$$.fragment,e),_(Re.$$.fragment,e),_(Le.$$.fragment,e),_(Ye.$$.fragment,e),_(He.$$.fragment,e),_(Qe.$$.fragment,e),_(qe.$$.fragment,e),_(Oe.$$.fragment,e),_(et.$$.fragment,e),_(le.$$.fragment,e),_(tt.$$.fragment,e),_(st.$$.fragment,e),_(it.$$.fragment,e),_(at.$$.fragment,e),_(rt.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),ts=!0)},o(e){v(T.$$.fragment,e),v(_e.$$.fragment,e),v(Ze.$$.fragment,e),v(Ve.$$.fragment,e),v(Je.$$.fragment,e),v(Ee.$$.fragment,e),v($e.$$.fragment,e),v(Ue.$$.fragment,e),v(We.$$.fragment,e),v(Ie.$$.fragment,e),v(Xe.$$.fragment,e),v(Ce.$$.fragment,e),v(Ne.$$.fragment,e),v(te.$$.fragment,e),v(Re.$$.fragment,e),v(Le.$$.fragment,e),v(Ye.$$.fragment,e),v(He.$$.fragment,e),v(Qe.$$.fragment,e),v(qe.$$.fragment,e),v(Oe.$$.fragment,e),v(et.$$.fragment,e),v(le.$$.fragment,e),v(tt.$$.fragment,e),v(st.$$.fragment,e),v(it.$$.fragment,e),v(at.$$.fragment,e),v(rt.$$.fragment,e),v(lt.$$.fragment,e),v(dt.$$.fragment,e),ts=!1},d(e){o(y),e&&o(D),b(T,e),e&&o(w),e&&o(Z),b(_e),e&&o(Vo),e&&o(ve),e&&o(Jo),e&&o(ft),e&&o(Eo),e&&o(ht),e&&o($o),e&&o(j),e&&o(Do),e&&o(B),b(Ze),e&&o(jo),e&&o(X),b(Ve),e&&o(ko),e&&o(ut),e&&o(Uo),b(Je,e),e&&o(Go),e&&o(gt),e&&o(Po),e&&o(_t),e&&o(So),b(Ee,e),e&&o(Wo),e&&o(H),e&&o(Io),e&&o(vt),e&&o(Bo),b($e,e),e&&o(Xo),e&&o(bt),e&&o(Co),e&&o(yt),e&&o(zo),e&&o(C),b(Ue),e&&o(No),e&&o(J),e&&o(Ro),b(We,e),e&&o(Ao),e&&o(Mt),e&&o(Lo),b(Ie,e),e&&o(Fo),e&&o(xt),e&&o(Yo),e&&o(Zt),e&&o(Ho),e&&o(z),b(Xe),e&&o(Qo),e&&o(M),b(Ce),b(Ne),b(te),b(Re),b(Le),b(Ye),b(He),b(Qe),e&&o(qo),e&&o(N),b(qe),e&&o(Oo),e&&o(x),b(Oe),b(et),b(le),b(tt),b(st),b(it),b(at),b(rt),e&&o(Ko),e&&o(R),b(lt),e&&o(es),e&&o(A),b(dt)}}}const Xr={local:"texttovideo",sections:[{local:"usage-example",sections:[{local:"texttovideoms17b",title:"`text-to-video-ms-1.7b`"},{local:"cerspensezeroscopev2576w-cerspensezeroscopev2xl",title:"`cerspense/zeroscope_v2_576w` & `cerspense/zeroscope_v2_XL`"}],title:"Usage example "},{local:"diffusers.TextToVideoSDPipeline",title:"TextToVideoSDPipeline"},{local:"diffusers.VideoToVideoSDPipeline",title:"VideoToVideoSDPipeline"},{local:"diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput",title:"TextToVideoSDPipelineOutput"}],title:"Text-to-video"};function Cr(L){return Gr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yr extends Dr{constructor(y){super();jr(this,y,Cr,Br,kr,{})}}export{Yr as default,Xr as metadata};
