import{S as ar,i as rr,s as lr,e as s,k as l,w as h,t as a,M as dr,c as n,d as o,m as d,x as u,a as i,h as r,b as c,N as Ii,f as Bi,G as t,g as m,y as g,q as _,o as v,B as b,v as pr,L as ir}from"../../../chunks/vendor-hf-doc-builder.js";import{T as cr}from"../../../chunks/Tip-hf-doc-builder.js";import{D as k}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as lt}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as rt}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as nr}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function mr(R){let y,$;return{c(){y=s("p"),$=a("\u{1F9EA} This pipeline is for research purposes only.")},l(w){y=n(w,"P",{});var T=i(y);$=r(T,"\u{1F9EA} This pipeline is for research purposes only."),T.forEach(o)},m(w,T){m(w,y,T),t(y,$)},d(w){w&&o(y)}}}function fr(R){let y,$,w,T,M;return T=new lt({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"),$=a("Examples:"),w=l(),h(T.$$.fragment)},l(f){y=n(f,"P",{});var Z=i(y);$=r(Z,"Examples:"),Z.forEach(o),w=d(f),u(T.$$.fragment,f)},m(f,Z){m(f,y,Z),t(y,$),m(f,w,Z),g(T,f,Z),M=!0},p:ir,i(f){M||(_(T.$$.fragment,f),M=!0)},o(f){v(T.$$.fragment,f),M=!1},d(f){f&&o(y),f&&o(w),b(T,f)}}}function hr(R){let y,$,w,T,M;return T=new lt({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"),$=a("Examples:"),w=l(),h(T.$$.fragment)},l(f){y=n(f,"P",{});var Z=i(y);$=r(Z,"Examples:"),Z.forEach(o),w=d(f),u(T.$$.fragment,f)},m(f,Z){m(f,y,Z),t(y,$),m(f,w,Z),g(T,f,Z),M=!0},p:ir,i(f){M||(_(T.$$.fragment,f),M=!0)},o(f){v(T.$$.fragment,f),M=!1},d(f){f&&o(y),f&&o(w),b(T,f)}}}function ur(R){let y,$,w,T,M,f,Z,fe,ys,Zt,Ts,vo,he,ue,ws,xs,bo,dt,Vs,yo,pt,Jt,Ms,To,j,Zs,ge,Js,Es,_e,Ds,$s,ve,js,ks,be,Ss,Ps,ye,Us,Gs,wo,W,A,Et,Te,Ws,Dt,Is,xo,I,L,$t,we,Bs,jt,kt,Xs,Vo,ct,Cs,Mo,xe,Zo,mt,zs,Jo,ft,Ns,Eo,Ve,Do,F,Rs,St,As,Ls,$o,ht,Fs,jo,Me,ko,ut,Ys,So,gt,Ze,Pt,Y,Hs,Qs,qs,Je,Xi,Os,Ut,H,Ks,en,tn,Ee,Ci,Po,B,Q,Gt,De,on,$e,Wt,sn,nn,It,an,Uo,J,rn,Bt,ln,dn,Xt,pn,cn,je,Ct,mn,fn,_t,hn,un,vt,gn,_n,ke,zt,vn,bn,Go,Se,Wo,bt,yn,Io,Pe,Bo,yt,Tn,Xo,Tt,Nt,Rt,q,wn,xn,Vn,Ue,zi,Co,X,O,At,Ge,Mn,Lt,Zn,zo,x,We,Jn,Ft,En,Dn,Ie,$n,wt,jn,kn,Sn,U,Be,Pn,Yt,Un,Gn,K,Wn,ee,Xe,In,Ce,Bn,Ht,Xn,Cn,zn,te,ze,Nn,Ne,Rn,Qt,An,Ln,Fn,oe,Re,Yn,qt,Hn,Qn,se,Ae,qn,Ot,On,Kn,ne,Le,ei,Kt,ti,No,C,ie,eo,Fe,oi,to,si,Ro,V,Ye,ni,oo,ii,ai,He,ri,xt,li,di,pi,G,Qe,ci,so,mi,fi,ae,hi,re,qe,ui,Oe,gi,no,_i,vi,bi,le,Ke,yi,et,Ti,io,wi,xi,Vi,de,tt,Mi,ao,Zi,Ji,pe,ot,Ei,ro,Di,$i,ce,st,ji,lo,ki,Ao,z,me,po,nt,Si,co,Pi,Lo,N,it,Ui,mo,Gi,Fo;return w=new cr({props:{warning:!0,$$slots:{default:[mr]},$$scope:{ctx:R}}}),fe=new rt({}),Te=new rt({}),we=new rt({}),xe=new lt({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`}}),Ve=new lt({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`}}),Me=new lt({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`}}),De=new rt({}),Se=new lt({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`}}),Pe=new lt({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`}}),Ge=new rt({}),We=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/v0.21.0/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 <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.TextToVideoSDPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/v0.21.0/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/v0.21.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.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L76"}}),Be=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/v0.21.0/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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L455",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/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/v0.21.0/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> or <code>tuple</code></p>
`}}),K=new nr({props:{anchor:"diffusers.TextToVideoSDPipeline.__call__.example",$$slots:{default:[fr]},$$scope:{ctx:R}}}),Xe=new k({props:{name:"disable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L126"}}),ze=new k({props:{name:"disable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L143"}}),Re=new k({props:{name:"enable_vae_slicing",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L118"}}),Ae=new k({props:{name:"enable_vae_tiling",anchor:"diffusers.TextToVideoSDPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L134"}}),Le=new k({props:{name:"encode_prompt",anchor:"diffusers.TextToVideoSDPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.TextToVideoSDPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.TextToVideoSDPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.TextToVideoSDPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.TextToVideoSDPipeline.encode_prompt.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 image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.TextToVideoSDPipeline.encode_prompt.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.encode_prompt.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.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py#L182"}}),Fe=new rt({}),Ye=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/v0.21.0/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 <code>CLIPTokenizer</code> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.VideoToVideoSDPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.21.0/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/v0.21.0/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/v0.21.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.21.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.21.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.21.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L138"}}),Qe=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/v0.21.0/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/v0.21.0/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/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L540",returnDescription:`
<p>If <code>return_dict</code> is <code>True</code>, <a
  href="/docs/diffusers/v0.21.0/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/v0.21.0/en/api/pipelines/text_to_video#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"
>TextToVideoSDPipelineOutput</a> or <code>tuple</code></p>
`}}),ae=new nr({props:{anchor:"diffusers.VideoToVideoSDPipeline.__call__.example",$$slots:{default:[hr]},$$scope:{ctx:R}}}),qe=new k({props:{name:"disable_vae_slicing",anchor:"diffusers.VideoToVideoSDPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L188"}}),Ke=new k({props:{name:"disable_vae_tiling",anchor:"diffusers.VideoToVideoSDPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L205"}}),tt=new k({props:{name:"enable_vae_slicing",anchor:"diffusers.VideoToVideoSDPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L180"}}),ot=new k({props:{name:"enable_vae_tiling",anchor:"diffusers.VideoToVideoSDPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L196"}}),st=new k({props:{name:"encode_prompt",anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt",parameters:[{name:"prompt",val:""},{name:"device",val:""},{name:"num_images_per_prompt",val:""},{name:"do_classifier_free_guidance",val:""},{name:"negative_prompt",val:" = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
prompt to be encoded
device &#x2014; (<code>torch.device</code>):
torch device`,name:"prompt"},{anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>) &#x2014;
whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt.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 image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.VideoToVideoSDPipeline.encode_prompt.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.VideoToVideoSDPipeline.encode_prompt.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.VideoToVideoSDPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py#L244"}}),nt=new rt({}),it=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/v0.21.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_output.py#L13"}}),{c(){y=s("meta"),$=l(),h(w.$$.fragment),T=l(),M=s("h1"),f=s("a"),Z=s("span"),h(fe.$$.fragment),ys=l(),Zt=s("span"),Ts=a("Text-to-video"),vo=l(),he=s("p"),ue=s("a"),ws=a("VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),xs=a(" is by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),bo=l(),dt=s("p"),Vs=a("The abstract from the paper is:"),yo=l(),pt=s("p"),Jt=s("em"),Ms=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."),To=l(),j=s("p"),Zs=a("You can find additional information about Text-to-Video on the "),ge=s("a"),Js=a("project page"),Es=a(", "),_e=s("a"),Ds=a("original codebase"),$s=a(", and try it out in a "),ve=s("a"),js=a("demo"),ks=a(". Official checkpoints can be found at "),be=s("a"),Ss=a("damo-vilab"),Ps=a(" and "),ye=s("a"),Us=a("cerspense"),Gs=a("."),wo=l(),W=s("h2"),A=s("a"),Et=s("span"),h(Te.$$.fragment),Ws=l(),Dt=s("span"),Is=a("Usage example"),xo=l(),I=s("h3"),L=s("a"),$t=s("span"),h(we.$$.fragment),Bs=l(),jt=s("span"),kt=s("code"),Xs=a("text-to-video-ms-1.7b"),Vo=l(),ct=s("p"),Cs=a("Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),Mo=l(),h(xe.$$.fragment),Zo=l(),mt=s("p"),zs=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.`),Jo=l(),ft=s("p"),Ns=a("Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),Eo=l(),h(Ve.$$.fragment),Do=l(),F=s("p"),Rs=a("It just takes "),St=s("strong"),As=a("7 GBs of GPU memory"),Ls=a(" to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),$o=l(),ht=s("p"),Fs=a("We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),jo=l(),h(Me.$$.fragment),ko=l(),ut=s("p"),Ys=a("Here are some sample outputs:"),So=l(),gt=s("table"),Ze=s("tr"),Pt=s("td"),Y=s("center"),Hs=a(`An astronaut riding a horse.
        `),Qs=s("br"),qs=l(),Je=s("img"),Os=l(),Ut=s("td"),H=s("center"),Ks=a(`Darth vader surfing in waves.
        `),en=s("br"),tn=l(),Ee=s("img"),Po=l(),B=s("h3"),Q=s("a"),Gt=s("span"),h(De.$$.fragment),on=l(),$e=s("span"),Wt=s("code"),sn=a("cerspense/zeroscope_v2_576w"),nn=a(" & "),It=s("code"),an=a("cerspense/zeroscope_v2_XL"),Uo=l(),J=s("p"),rn=a("Zeroscope are watermark-free model and have been trained on specific sizes such as "),Bt=s("code"),ln=a("576x320"),dn=a(" and "),Xt=s("code"),pn=a("1024x576"),cn=a(`.
One should first generate a video using the lower resolution checkpoint `),je=s("a"),Ct=s("code"),mn=a("cerspense/zeroscope_v2_576w"),fn=a(" with "),_t=s("a"),hn=a("TextToVideoSDPipeline"),un=a(`,
which can then be upscaled using `),vt=s("a"),gn=a("VideoToVideoSDPipeline"),_n=a(" and "),ke=s("a"),zt=s("code"),vn=a("cerspense/zeroscope_v2_XL"),bn=a("."),Go=l(),h(Se.$$.fragment),Wo=l(),bt=s("p"),yn=a("Now the video can be upscaled:"),Io=l(),h(Pe.$$.fragment),Bo=l(),yt=s("p"),Tn=a("Here are some sample outputs:"),Xo=l(),Tt=s("table"),Nt=s("tr"),Rt=s("td"),q=s("center"),wn=a(`Darth vader surfing in waves.
        `),xn=s("br"),Vn=l(),Ue=s("img"),Co=l(),X=s("h2"),O=s("a"),At=s("span"),h(Ge.$$.fragment),Mn=l(),Lt=s("span"),Zn=a("TextToVideoSDPipeline"),zo=l(),x=s("div"),h(We.$$.fragment),Jn=l(),Ft=s("p"),En=a("Pipeline for text-to-video generation."),Dn=l(),Ie=s("p"),$n=a("This model inherits from "),wt=s("a"),jn=a("DiffusionPipeline"),kn=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),Sn=l(),U=s("div"),h(Be.$$.fragment),Pn=l(),Yt=s("p"),Un=a("The call function to the pipeline for generation."),Gn=l(),h(K.$$.fragment),Wn=l(),ee=s("div"),h(Xe.$$.fragment),In=l(),Ce=s("p"),Bn=a("Disable sliced VAE decoding. If "),Ht=s("code"),Xn=a("enable_vae_slicing"),Cn=a(` was previously enabled, this method will go back to
computing decoding in one step.`),zn=l(),te=s("div"),h(ze.$$.fragment),Nn=l(),Ne=s("p"),Rn=a("Disable tiled VAE decoding. If "),Qt=s("code"),An=a("enable_vae_tiling"),Ln=a(` was previously enabled, this method will go back to
computing decoding in one step.`),Fn=l(),oe=s("div"),h(Re.$$.fragment),Yn=l(),qt=s("p"),Hn=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.`),Qn=l(),se=s("div"),h(Ae.$$.fragment),qn=l(),Ot=s("p"),On=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.`),Kn=l(),ne=s("div"),h(Le.$$.fragment),ei=l(),Kt=s("p"),ti=a("Encodes the prompt into text encoder hidden states."),No=l(),C=s("h2"),ie=s("a"),eo=s("span"),h(Fe.$$.fragment),oi=l(),to=s("span"),si=a("VideoToVideoSDPipeline"),Ro=l(),V=s("div"),h(Ye.$$.fragment),ni=l(),oo=s("p"),ii=a("Pipeline for text-guided video-to-video generation."),ai=l(),He=s("p"),ri=a("This model inherits from "),xt=s("a"),li=a("DiffusionPipeline"),di=a(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),pi=l(),G=s("div"),h(Qe.$$.fragment),ci=l(),so=s("p"),mi=a("The call function to the pipeline for generation."),fi=l(),h(ae.$$.fragment),hi=l(),re=s("div"),h(qe.$$.fragment),ui=l(),Oe=s("p"),gi=a("Disable sliced VAE decoding. If "),no=s("code"),_i=a("enable_vae_slicing"),vi=a(` was previously enabled, this method will go back to
computing decoding in one step.`),bi=l(),le=s("div"),h(Ke.$$.fragment),yi=l(),et=s("p"),Ti=a("Disable tiled VAE decoding. If "),io=s("code"),wi=a("enable_vae_tiling"),xi=a(` was previously enabled, this method will go back to
computing decoding in one step.`),Vi=l(),de=s("div"),h(tt.$$.fragment),Mi=l(),ao=s("p"),Zi=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.`),Ji=l(),pe=s("div"),h(ot.$$.fragment),Ei=l(),ro=s("p"),Di=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.`),$i=l(),ce=s("div"),h(st.$$.fragment),ji=l(),lo=s("p"),ki=a("Encodes the prompt into text encoder hidden states."),Ao=l(),z=s("h2"),me=s("a"),po=s("span"),h(nt.$$.fragment),Si=l(),co=s("span"),Pi=a("TextToVideoSDPipelineOutput"),Lo=l(),N=s("div"),h(it.$$.fragment),Ui=l(),mo=s("p"),Gi=a("Output class for text-to-video pipelines."),this.h()},l(e){const p=dr('[data-svelte="svelte-1phssyn"]',document.head);y=n(p,"META",{name:!0,content:!0}),p.forEach(o),$=d(e),u(w.$$.fragment,e),T=d(e),M=n(e,"H1",{class:!0});var at=i(M);f=n(at,"A",{id:!0,class:!0,href:!0});var fo=i(f);Z=n(fo,"SPAN",{});var ho=i(Z);u(fe.$$.fragment,ho),ho.forEach(o),fo.forEach(o),ys=d(at),Zt=n(at,"SPAN",{});var Ni=i(Zt);Ts=r(Ni,"Text-to-video"),Ni.forEach(o),at.forEach(o),vo=d(e),he=n(e,"P",{});var Wi=i(he);ue=n(Wi,"A",{href:!0,rel:!0});var Ri=i(ue);ws=r(Ri,"VideoFusion: Decomposed Diffusion Models for High-Quality Video Generation"),Ri.forEach(o),xs=r(Wi," is by Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, Tieniu Tan."),Wi.forEach(o),bo=d(e),dt=n(e,"P",{});var Ai=i(dt);Vs=r(Ai,"The abstract from the paper is:"),Ai.forEach(o),yo=d(e),pt=n(e,"P",{});var Li=i(pt);Jt=n(Li,"EM",{});var Fi=i(Jt);Ms=r(Fi,"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."),Fi.forEach(o),Li.forEach(o),To=d(e),j=n(e,"P",{});var P=i(j);Zs=r(P,"You can find additional information about Text-to-Video on the "),ge=n(P,"A",{href:!0,rel:!0});var Yi=i(ge);Js=r(Yi,"project page"),Yi.forEach(o),Es=r(P,", "),_e=n(P,"A",{href:!0,rel:!0});var Hi=i(_e);Ds=r(Hi,"original codebase"),Hi.forEach(o),$s=r(P,", and try it out in a "),ve=n(P,"A",{href:!0,rel:!0});var Qi=i(ve);js=r(Qi,"demo"),Qi.forEach(o),ks=r(P,". Official checkpoints can be found at "),be=n(P,"A",{href:!0,rel:!0});var qi=i(be);Ss=r(qi,"damo-vilab"),qi.forEach(o),Ps=r(P," and "),ye=n(P,"A",{href:!0,rel:!0});var Oi=i(ye);Us=r(Oi,"cerspense"),Oi.forEach(o),Gs=r(P,"."),P.forEach(o),wo=d(e),W=n(e,"H2",{class:!0});var Yo=i(W);A=n(Yo,"A",{id:!0,class:!0,href:!0});var Ki=i(A);Et=n(Ki,"SPAN",{});var ea=i(Et);u(Te.$$.fragment,ea),ea.forEach(o),Ki.forEach(o),Ws=d(Yo),Dt=n(Yo,"SPAN",{});var ta=i(Dt);Is=r(ta,"Usage example"),ta.forEach(o),Yo.forEach(o),xo=d(e),I=n(e,"H3",{class:!0});var Ho=i(I);L=n(Ho,"A",{id:!0,class:!0,href:!0});var oa=i(L);$t=n(oa,"SPAN",{});var sa=i($t);u(we.$$.fragment,sa),sa.forEach(o),oa.forEach(o),Bs=d(Ho),jt=n(Ho,"SPAN",{});var na=i(jt);kt=n(na,"CODE",{});var ia=i(kt);Xs=r(ia,"text-to-video-ms-1.7b"),ia.forEach(o),na.forEach(o),Ho.forEach(o),Vo=d(e),ct=n(e,"P",{});var aa=i(ct);Cs=r(aa,"Let\u2019s start by generating a short video with the default length of 16 frames (2s at 8 fps):"),aa.forEach(o),Mo=d(e),u(xe.$$.fragment,e),Zo=d(e),mt=n(e,"P",{});var ra=i(mt);zs=r(ra,`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.`),ra.forEach(o),Jo=d(e),ft=n(e,"P",{});var la=i(ft);Ns=r(la,"Let\u2019s generate a video of 8 seconds (64 frames) on the same GPU using CPU offloading and VAE slicing:"),la.forEach(o),Eo=d(e),u(Ve.$$.fragment,e),Do=d(e),F=n(e,"P",{});var Qo=i(F);Rs=r(Qo,"It just takes "),St=n(Qo,"STRONG",{});var da=i(St);As=r(da,"7 GBs of GPU memory"),da.forEach(o),Ls=r(Qo," to generate the 64 video frames using PyTorch 2.0, \u201Cfp16\u201D precision and the techniques mentioned above."),Qo.forEach(o),$o=d(e),ht=n(e,"P",{});var pa=i(ht);Fs=r(pa,"We can also use a different scheduler easily, using the same method we\u2019d use for Stable Diffusion:"),pa.forEach(o),jo=d(e),u(Me.$$.fragment,e),ko=d(e),ut=n(e,"P",{});var ca=i(ut);Ys=r(ca,"Here are some sample outputs:"),ca.forEach(o),So=d(e),gt=n(e,"TABLE",{});var ma=i(gt);Ze=n(ma,"TR",{});var qo=i(Ze);Pt=n(qo,"TD",{});var fa=i(Pt);Y=n(fa,"CENTER",{});var uo=i(Y);Hs=r(uo,`An astronaut riding a horse.
        `),Qs=n(uo,"BR",{}),qs=d(uo),Je=n(uo,"IMG",{src:!0,alt:!0,style:!0}),uo.forEach(o),fa.forEach(o),Os=d(qo),Ut=n(qo,"TD",{});var ha=i(Ut);H=n(ha,"CENTER",{});var go=i(H);Ks=r(go,`Darth vader surfing in waves.
        `),en=n(go,"BR",{}),tn=d(go),Ee=n(go,"IMG",{src:!0,alt:!0,style:!0}),go.forEach(o),ha.forEach(o),qo.forEach(o),ma.forEach(o),Po=d(e),B=n(e,"H3",{class:!0});var Oo=i(B);Q=n(Oo,"A",{id:!0,class:!0,href:!0});var ua=i(Q);Gt=n(ua,"SPAN",{});var ga=i(Gt);u(De.$$.fragment,ga),ga.forEach(o),ua.forEach(o),on=d(Oo),$e=n(Oo,"SPAN",{});var Ko=i($e);Wt=n(Ko,"CODE",{});var _a=i(Wt);sn=r(_a,"cerspense/zeroscope_v2_576w"),_a.forEach(o),nn=r(Ko," & "),It=n(Ko,"CODE",{});var va=i(It);an=r(va,"cerspense/zeroscope_v2_XL"),va.forEach(o),Ko.forEach(o),Oo.forEach(o),Uo=d(e),J=n(e,"P",{});var S=i(J);rn=r(S,"Zeroscope are watermark-free model and have been trained on specific sizes such as "),Bt=n(S,"CODE",{});var ba=i(Bt);ln=r(ba,"576x320"),ba.forEach(o),dn=r(S," and "),Xt=n(S,"CODE",{});var ya=i(Xt);pn=r(ya,"1024x576"),ya.forEach(o),cn=r(S,`.
One should first generate a video using the lower resolution checkpoint `),je=n(S,"A",{href:!0,rel:!0});var Ta=i(je);Ct=n(Ta,"CODE",{});var wa=i(Ct);mn=r(wa,"cerspense/zeroscope_v2_576w"),wa.forEach(o),Ta.forEach(o),fn=r(S," with "),_t=n(S,"A",{href:!0});var xa=i(_t);hn=r(xa,"TextToVideoSDPipeline"),xa.forEach(o),un=r(S,`,
which can then be upscaled using `),vt=n(S,"A",{href:!0});var Va=i(vt);gn=r(Va,"VideoToVideoSDPipeline"),Va.forEach(o),_n=r(S," and "),ke=n(S,"A",{href:!0,rel:!0});var Ma=i(ke);zt=n(Ma,"CODE",{});var Za=i(zt);vn=r(Za,"cerspense/zeroscope_v2_XL"),Za.forEach(o),Ma.forEach(o),bn=r(S,"."),S.forEach(o),Go=d(e),u(Se.$$.fragment,e),Wo=d(e),bt=n(e,"P",{});var Ja=i(bt);yn=r(Ja,"Now the video can be upscaled:"),Ja.forEach(o),Io=d(e),u(Pe.$$.fragment,e),Bo=d(e),yt=n(e,"P",{});var Ea=i(yt);Tn=r(Ea,"Here are some sample outputs:"),Ea.forEach(o),Xo=d(e),Tt=n(e,"TABLE",{});var Da=i(Tt);Nt=n(Da,"TR",{});var $a=i(Nt);Rt=n($a,"TD",{});var ja=i(Rt);q=n(ja,"CENTER",{});var _o=i(q);wn=r(_o,`Darth vader surfing in waves.
        `),xn=n(_o,"BR",{}),Vn=d(_o),Ue=n(_o,"IMG",{src:!0,alt:!0,style:!0}),_o.forEach(o),ja.forEach(o),$a.forEach(o),Da.forEach(o),Co=d(e),X=n(e,"H2",{class:!0});var es=i(X);O=n(es,"A",{id:!0,class:!0,href:!0});var ka=i(O);At=n(ka,"SPAN",{});var Sa=i(At);u(Ge.$$.fragment,Sa),Sa.forEach(o),ka.forEach(o),Mn=d(es),Lt=n(es,"SPAN",{});var Pa=i(Lt);Zn=r(Pa,"TextToVideoSDPipeline"),Pa.forEach(o),es.forEach(o),zo=d(e),x=n(e,"DIV",{class:!0});var E=i(x);u(We.$$.fragment,E),Jn=d(E),Ft=n(E,"P",{});var Ua=i(Ft);En=r(Ua,"Pipeline for text-to-video generation."),Ua.forEach(o),Dn=d(E),Ie=n(E,"P",{});var ts=i(Ie);$n=r(ts,"This model inherits from "),wt=n(ts,"A",{href:!0});var Ga=i(wt);jn=r(Ga,"DiffusionPipeline"),Ga.forEach(o),kn=r(ts,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ts.forEach(o),Sn=d(E),U=n(E,"DIV",{class:!0});var Vt=i(U);u(Be.$$.fragment,Vt),Pn=d(Vt),Yt=n(Vt,"P",{});var Wa=i(Yt);Un=r(Wa,"The call function to the pipeline for generation."),Wa.forEach(o),Gn=d(Vt),u(K.$$.fragment,Vt),Vt.forEach(o),Wn=d(E),ee=n(E,"DIV",{class:!0});var os=i(ee);u(Xe.$$.fragment,os),In=d(os),Ce=n(os,"P",{});var ss=i(Ce);Bn=r(ss,"Disable sliced VAE decoding. If "),Ht=n(ss,"CODE",{});var Ia=i(Ht);Xn=r(Ia,"enable_vae_slicing"),Ia.forEach(o),Cn=r(ss,` was previously enabled, this method will go back to
computing decoding in one step.`),ss.forEach(o),os.forEach(o),zn=d(E),te=n(E,"DIV",{class:!0});var ns=i(te);u(ze.$$.fragment,ns),Nn=d(ns),Ne=n(ns,"P",{});var is=i(Ne);Rn=r(is,"Disable tiled VAE decoding. If "),Qt=n(is,"CODE",{});var Ba=i(Qt);An=r(Ba,"enable_vae_tiling"),Ba.forEach(o),Ln=r(is,` was previously enabled, this method will go back to
computing decoding in one step.`),is.forEach(o),ns.forEach(o),Fn=d(E),oe=n(E,"DIV",{class:!0});var as=i(oe);u(Re.$$.fragment,as),Yn=d(as),qt=n(as,"P",{});var Xa=i(qt);Hn=r(Xa,`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.`),Xa.forEach(o),as.forEach(o),Qn=d(E),se=n(E,"DIV",{class:!0});var rs=i(se);u(Ae.$$.fragment,rs),qn=d(rs),Ot=n(rs,"P",{});var Ca=i(Ot);On=r(Ca,`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.`),Ca.forEach(o),rs.forEach(o),Kn=d(E),ne=n(E,"DIV",{class:!0});var ls=i(ne);u(Le.$$.fragment,ls),ei=d(ls),Kt=n(ls,"P",{});var za=i(Kt);ti=r(za,"Encodes the prompt into text encoder hidden states."),za.forEach(o),ls.forEach(o),E.forEach(o),No=d(e),C=n(e,"H2",{class:!0});var ds=i(C);ie=n(ds,"A",{id:!0,class:!0,href:!0});var Na=i(ie);eo=n(Na,"SPAN",{});var Ra=i(eo);u(Fe.$$.fragment,Ra),Ra.forEach(o),Na.forEach(o),oi=d(ds),to=n(ds,"SPAN",{});var Aa=i(to);si=r(Aa,"VideoToVideoSDPipeline"),Aa.forEach(o),ds.forEach(o),Ro=d(e),V=n(e,"DIV",{class:!0});var D=i(V);u(Ye.$$.fragment,D),ni=d(D),oo=n(D,"P",{});var La=i(oo);ii=r(La,"Pipeline for text-guided video-to-video generation."),La.forEach(o),ai=d(D),He=n(D,"P",{});var ps=i(He);ri=r(ps,"This model inherits from "),xt=n(ps,"A",{href:!0});var Fa=i(xt);li=r(Fa,"DiffusionPipeline"),Fa.forEach(o),di=r(ps,`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),ps.forEach(o),pi=d(D),G=n(D,"DIV",{class:!0});var Mt=i(G);u(Qe.$$.fragment,Mt),ci=d(Mt),so=n(Mt,"P",{});var Ya=i(so);mi=r(Ya,"The call function to the pipeline for generation."),Ya.forEach(o),fi=d(Mt),u(ae.$$.fragment,Mt),Mt.forEach(o),hi=d(D),re=n(D,"DIV",{class:!0});var cs=i(re);u(qe.$$.fragment,cs),ui=d(cs),Oe=n(cs,"P",{});var ms=i(Oe);gi=r(ms,"Disable sliced VAE decoding. If "),no=n(ms,"CODE",{});var Ha=i(no);_i=r(Ha,"enable_vae_slicing"),Ha.forEach(o),vi=r(ms,` was previously enabled, this method will go back to
computing decoding in one step.`),ms.forEach(o),cs.forEach(o),bi=d(D),le=n(D,"DIV",{class:!0});var fs=i(le);u(Ke.$$.fragment,fs),yi=d(fs),et=n(fs,"P",{});var hs=i(et);Ti=r(hs,"Disable tiled VAE decoding. If "),io=n(hs,"CODE",{});var Qa=i(io);wi=r(Qa,"enable_vae_tiling"),Qa.forEach(o),xi=r(hs,` was previously enabled, this method will go back to
computing decoding in one step.`),hs.forEach(o),fs.forEach(o),Vi=d(D),de=n(D,"DIV",{class:!0});var us=i(de);u(tt.$$.fragment,us),Mi=d(us),ao=n(us,"P",{});var qa=i(ao);Zi=r(qa,`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.`),qa.forEach(o),us.forEach(o),Ji=d(D),pe=n(D,"DIV",{class:!0});var gs=i(pe);u(ot.$$.fragment,gs),Ei=d(gs),ro=n(gs,"P",{});var Oa=i(ro);Di=r(Oa,`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.`),Oa.forEach(o),gs.forEach(o),$i=d(D),ce=n(D,"DIV",{class:!0});var _s=i(ce);u(st.$$.fragment,_s),ji=d(_s),lo=n(_s,"P",{});var Ka=i(lo);ki=r(Ka,"Encodes the prompt into text encoder hidden states."),Ka.forEach(o),_s.forEach(o),D.forEach(o),Ao=d(e),z=n(e,"H2",{class:!0});var vs=i(z);me=n(vs,"A",{id:!0,class:!0,href:!0});var er=i(me);po=n(er,"SPAN",{});var tr=i(po);u(nt.$$.fragment,tr),tr.forEach(o),er.forEach(o),Si=d(vs),co=n(vs,"SPAN",{});var or=i(co);Pi=r(or,"TextToVideoSDPipelineOutput"),or.forEach(o),vs.forEach(o),Lo=d(e),N=n(e,"DIV",{class:!0});var bs=i(N);u(it.$$.fragment,bs),Ui=d(bs),mo=n(bs,"P",{});var sr=i(mo);Gi=r(sr,"Output class for text-to-video pipelines."),sr.forEach(o),bs.forEach(o),this.h()},h(){c(y,"name","hf:doc:metadata"),c(y,"content",JSON.stringify(gr)),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(M,"class","relative group"),c(ue,"href","https://huggingface.co/papers/2303.08320"),c(ue,"rel","nofollow"),c(ge,"href","https://modelscope.cn/models/damo/text-to-video-synthesis/summary"),c(ge,"rel","nofollow"),c(_e,"href","https://github.com/modelscope/modelscope/"),c(_e,"rel","nofollow"),c(ve,"href","https://huggingface.co/spaces/damo-vilab/modelscope-text-to-video-synthesis"),c(ve,"rel","nofollow"),c(be,"href","https://huggingface.co/damo-vilab"),c(be,"rel","nofollow"),c(ye,"href","https://huggingface.co/cerspense"),c(ye,"rel","nofollow"),c(A,"id","usage-example"),c(A,"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(A,"href","#usage-example"),c(W,"class","relative group"),c(L,"id","texttovideoms17b"),c(L,"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(L,"href","#texttovideoms17b"),c(I,"class","relative group"),Ii(Je.src,Xi="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/astr.gif")||c(Je,"src",Xi),c(Je,"alt","An astronaut riding a horse."),Bi(Je,"width","300px"),Ii(Ee.src,Ci="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/vader.gif")||c(Ee,"src",Ci),c(Ee,"alt","Darth vader surfing in waves."),Bi(Ee,"width","300px"),c(Q,"id","cerspensezeroscopev2576w-cerspensezeroscopev2xl"),c(Q,"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(Q,"href","#cerspensezeroscopev2576w-cerspensezeroscopev2xl"),c(B,"class","relative group"),c(je,"href","https://huggingface.co/cerspense/zeroscope_v2_576w"),c(je,"rel","nofollow"),c(_t,"href","/docs/diffusers/v0.21.0/en/api/pipelines/text_to_video#diffusers.TextToVideoSDPipeline"),c(vt,"href","/docs/diffusers/v0.21.0/en/api/pipelines/text_to_video#diffusers.VideoToVideoSDPipeline"),c(ke,"href","https://huggingface.co/cerspense/zeroscope_v2_XL"),c(ke,"rel","nofollow"),Ii(Ue.src,zi="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/darthvader_cerpense.gif")||c(Ue,"src",zi),c(Ue,"alt","Darth vader surfing in waves."),Bi(Ue,"width","576px"),c(O,"id","diffusers.TextToVideoSDPipeline"),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","#diffusers.TextToVideoSDPipeline"),c(X,"class","relative group"),c(wt,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"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(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(ie,"id","diffusers.VideoToVideoSDPipeline"),c(ie,"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(ie,"href","#diffusers.VideoToVideoSDPipeline"),c(C,"class","relative group"),c(xt,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),c(G,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"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(V,"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,"id","diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"),c(me,"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(me,"href","#diffusers.pipelines.text_to_video_synthesis.TextToVideoSDPipelineOutput"),c(z,"class","relative group"),c(N,"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,$,p),g(w,e,p),m(e,T,p),m(e,M,p),t(M,f),t(f,Z),g(fe,Z,null),t(M,ys),t(M,Zt),t(Zt,Ts),m(e,vo,p),m(e,he,p),t(he,ue),t(ue,ws),t(he,xs),m(e,bo,p),m(e,dt,p),t(dt,Vs),m(e,yo,p),m(e,pt,p),t(pt,Jt),t(Jt,Ms),m(e,To,p),m(e,j,p),t(j,Zs),t(j,ge),t(ge,Js),t(j,Es),t(j,_e),t(_e,Ds),t(j,$s),t(j,ve),t(ve,js),t(j,ks),t(j,be),t(be,Ss),t(j,Ps),t(j,ye),t(ye,Us),t(j,Gs),m(e,wo,p),m(e,W,p),t(W,A),t(A,Et),g(Te,Et,null),t(W,Ws),t(W,Dt),t(Dt,Is),m(e,xo,p),m(e,I,p),t(I,L),t(L,$t),g(we,$t,null),t(I,Bs),t(I,jt),t(jt,kt),t(kt,Xs),m(e,Vo,p),m(e,ct,p),t(ct,Cs),m(e,Mo,p),g(xe,e,p),m(e,Zo,p),m(e,mt,p),t(mt,zs),m(e,Jo,p),m(e,ft,p),t(ft,Ns),m(e,Eo,p),g(Ve,e,p),m(e,Do,p),m(e,F,p),t(F,Rs),t(F,St),t(St,As),t(F,Ls),m(e,$o,p),m(e,ht,p),t(ht,Fs),m(e,jo,p),g(Me,e,p),m(e,ko,p),m(e,ut,p),t(ut,Ys),m(e,So,p),m(e,gt,p),t(gt,Ze),t(Ze,Pt),t(Pt,Y),t(Y,Hs),t(Y,Qs),t(Y,qs),t(Y,Je),t(Ze,Os),t(Ze,Ut),t(Ut,H),t(H,Ks),t(H,en),t(H,tn),t(H,Ee),m(e,Po,p),m(e,B,p),t(B,Q),t(Q,Gt),g(De,Gt,null),t(B,on),t(B,$e),t($e,Wt),t(Wt,sn),t($e,nn),t($e,It),t(It,an),m(e,Uo,p),m(e,J,p),t(J,rn),t(J,Bt),t(Bt,ln),t(J,dn),t(J,Xt),t(Xt,pn),t(J,cn),t(J,je),t(je,Ct),t(Ct,mn),t(J,fn),t(J,_t),t(_t,hn),t(J,un),t(J,vt),t(vt,gn),t(J,_n),t(J,ke),t(ke,zt),t(zt,vn),t(J,bn),m(e,Go,p),g(Se,e,p),m(e,Wo,p),m(e,bt,p),t(bt,yn),m(e,Io,p),g(Pe,e,p),m(e,Bo,p),m(e,yt,p),t(yt,Tn),m(e,Xo,p),m(e,Tt,p),t(Tt,Nt),t(Nt,Rt),t(Rt,q),t(q,wn),t(q,xn),t(q,Vn),t(q,Ue),m(e,Co,p),m(e,X,p),t(X,O),t(O,At),g(Ge,At,null),t(X,Mn),t(X,Lt),t(Lt,Zn),m(e,zo,p),m(e,x,p),g(We,x,null),t(x,Jn),t(x,Ft),t(Ft,En),t(x,Dn),t(x,Ie),t(Ie,$n),t(Ie,wt),t(wt,jn),t(Ie,kn),t(x,Sn),t(x,U),g(Be,U,null),t(U,Pn),t(U,Yt),t(Yt,Un),t(U,Gn),g(K,U,null),t(x,Wn),t(x,ee),g(Xe,ee,null),t(ee,In),t(ee,Ce),t(Ce,Bn),t(Ce,Ht),t(Ht,Xn),t(Ce,Cn),t(x,zn),t(x,te),g(ze,te,null),t(te,Nn),t(te,Ne),t(Ne,Rn),t(Ne,Qt),t(Qt,An),t(Ne,Ln),t(x,Fn),t(x,oe),g(Re,oe,null),t(oe,Yn),t(oe,qt),t(qt,Hn),t(x,Qn),t(x,se),g(Ae,se,null),t(se,qn),t(se,Ot),t(Ot,On),t(x,Kn),t(x,ne),g(Le,ne,null),t(ne,ei),t(ne,Kt),t(Kt,ti),m(e,No,p),m(e,C,p),t(C,ie),t(ie,eo),g(Fe,eo,null),t(C,oi),t(C,to),t(to,si),m(e,Ro,p),m(e,V,p),g(Ye,V,null),t(V,ni),t(V,oo),t(oo,ii),t(V,ai),t(V,He),t(He,ri),t(He,xt),t(xt,li),t(He,di),t(V,pi),t(V,G),g(Qe,G,null),t(G,ci),t(G,so),t(so,mi),t(G,fi),g(ae,G,null),t(V,hi),t(V,re),g(qe,re,null),t(re,ui),t(re,Oe),t(Oe,gi),t(Oe,no),t(no,_i),t(Oe,vi),t(V,bi),t(V,le),g(Ke,le,null),t(le,yi),t(le,et),t(et,Ti),t(et,io),t(io,wi),t(et,xi),t(V,Vi),t(V,de),g(tt,de,null),t(de,Mi),t(de,ao),t(ao,Zi),t(V,Ji),t(V,pe),g(ot,pe,null),t(pe,Ei),t(pe,ro),t(ro,Di),t(V,$i),t(V,ce),g(st,ce,null),t(ce,ji),t(ce,lo),t(lo,ki),m(e,Ao,p),m(e,z,p),t(z,me),t(me,po),g(nt,po,null),t(z,Si),t(z,co),t(co,Pi),m(e,Lo,p),m(e,N,p),g(it,N,null),t(N,Ui),t(N,mo),t(mo,Gi),Fo=!0},p(e,[p]){const at={};p&2&&(at.$$scope={dirty:p,ctx:e}),w.$set(at);const fo={};p&2&&(fo.$$scope={dirty:p,ctx:e}),K.$set(fo);const ho={};p&2&&(ho.$$scope={dirty:p,ctx:e}),ae.$set(ho)},i(e){Fo||(_(w.$$.fragment,e),_(fe.$$.fragment,e),_(Te.$$.fragment,e),_(we.$$.fragment,e),_(xe.$$.fragment,e),_(Ve.$$.fragment,e),_(Me.$$.fragment,e),_(De.$$.fragment,e),_(Se.$$.fragment,e),_(Pe.$$.fragment,e),_(Ge.$$.fragment,e),_(We.$$.fragment,e),_(Be.$$.fragment,e),_(K.$$.fragment,e),_(Xe.$$.fragment,e),_(ze.$$.fragment,e),_(Re.$$.fragment,e),_(Ae.$$.fragment,e),_(Le.$$.fragment,e),_(Fe.$$.fragment,e),_(Ye.$$.fragment,e),_(Qe.$$.fragment,e),_(ae.$$.fragment,e),_(qe.$$.fragment,e),_(Ke.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(st.$$.fragment,e),_(nt.$$.fragment,e),_(it.$$.fragment,e),Fo=!0)},o(e){v(w.$$.fragment,e),v(fe.$$.fragment,e),v(Te.$$.fragment,e),v(we.$$.fragment,e),v(xe.$$.fragment,e),v(Ve.$$.fragment,e),v(Me.$$.fragment,e),v(De.$$.fragment,e),v(Se.$$.fragment,e),v(Pe.$$.fragment,e),v(Ge.$$.fragment,e),v(We.$$.fragment,e),v(Be.$$.fragment,e),v(K.$$.fragment,e),v(Xe.$$.fragment,e),v(ze.$$.fragment,e),v(Re.$$.fragment,e),v(Ae.$$.fragment,e),v(Le.$$.fragment,e),v(Fe.$$.fragment,e),v(Ye.$$.fragment,e),v(Qe.$$.fragment,e),v(ae.$$.fragment,e),v(qe.$$.fragment,e),v(Ke.$$.fragment,e),v(tt.$$.fragment,e),v(ot.$$.fragment,e),v(st.$$.fragment,e),v(nt.$$.fragment,e),v(it.$$.fragment,e),Fo=!1},d(e){o(y),e&&o($),b(w,e),e&&o(T),e&&o(M),b(fe),e&&o(vo),e&&o(he),e&&o(bo),e&&o(dt),e&&o(yo),e&&o(pt),e&&o(To),e&&o(j),e&&o(wo),e&&o(W),b(Te),e&&o(xo),e&&o(I),b(we),e&&o(Vo),e&&o(ct),e&&o(Mo),b(xe,e),e&&o(Zo),e&&o(mt),e&&o(Jo),e&&o(ft),e&&o(Eo),b(Ve,e),e&&o(Do),e&&o(F),e&&o($o),e&&o(ht),e&&o(jo),b(Me,e),e&&o(ko),e&&o(ut),e&&o(So),e&&o(gt),e&&o(Po),e&&o(B),b(De),e&&o(Uo),e&&o(J),e&&o(Go),b(Se,e),e&&o(Wo),e&&o(bt),e&&o(Io),b(Pe,e),e&&o(Bo),e&&o(yt),e&&o(Xo),e&&o(Tt),e&&o(Co),e&&o(X),b(Ge),e&&o(zo),e&&o(x),b(We),b(Be),b(K),b(Xe),b(ze),b(Re),b(Ae),b(Le),e&&o(No),e&&o(C),b(Fe),e&&o(Ro),e&&o(V),b(Ye),b(Qe),b(ae),b(qe),b(Ke),b(tt),b(ot),b(st),e&&o(Ao),e&&o(z),b(nt),e&&o(Lo),e&&o(N),b(it)}}}const gr={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 _r(R){return pr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Vr extends ar{constructor(y){super();rr(this,y,_r,ur,lr,{})}}export{Vr as default,gr as metadata};
