import{S as fp,i as mp,s as up,e as a,k as p,w as f,t as n,M as yp,c as s,d as o,m as d,a as l,x as m,h as r,b as i,N as _p,G as e,g as h,y as u,L as vp,q as y,o as _,B as v,v as gp}from"../../../chunks/vendor-hf-doc-builder.js";import{D as ys}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as j}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as V}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function bp(fr){let N,oa,G,q,St,ye,_s,Qt,vs,aa,C,L,zt,_e,gs,Dt,bs,sa,M,ve,ws,Ts,ge,Js,Ms,be,Zs,xs,la,yt,js,na,U,Yt,Us,ks,Ft,Is,Es,At,Ws,ra,_t,Bs,ia,vt,gt,mr,pa,bt,Vs,da,wt,Ht,Ns,ca,Tt,Gs,ha,k,qt,we,Cs,Rs,Lt,Te,Xs,$s,Ot,Je,Ps,fa,R,O,Kt,Me,Ss,eo,Qs,ma,K,to,X,oo,zs,Ds,ao,Ys,Fs,Jt,As,Hs,so,$,lo,Ze,qs,Ls,no,ro,Os,Ks,Mt,xe,el,ua,P,ee,io,je,tl,po,ol,ya,S,te,co,Ue,al,ho,sl,_a,Zt,ll,va,ke,ga,xt,nl,ba,I,oe,rl,Ie,il,pl,fo,Z,mo,dl,cl,uo,hl,fl,yo,ml,ul,_o,yl,_l,x,vo,vl,gl,go,bl,wl,Ee,Tl,Jl,bo,T,wo,Ml,Zl,To,xl,jl,Jo,Ul,kl,Mo,Il,El,Zo,Wl,Bl,jt,Vl,xo,We,jo,Nl,Gl,Uo,Cl,wa,Ut,Rl,Ta,Be,Ja,Q,ae,ko,Ve,Xl,Io,$l,Ma,kt,Ne,Eo,Pl,Sl,Ge,Za,z,D,Wo,Ql,zl,Ce,Dl,Re,Yl,It,Fl,Al,Hl,Xe,$e,ql,Bo,Ll,Ol,Kl,Pe,xa,Y,se,Vo,Se,en,No,tn,ja,le,on,Qe,an,sn,Ua,F,ne,Go,ze,ln,Co,nn,ka,re,rn,Et,pn,dn,Ia,E,De,Ro,cn,hn,Ye,fn,Fe,Xo,mn,un,Ae,yn,He,qe,_n,$o,vn,gn,bn,Le,Ea,A,ie,Po,Oe,wn,So,Tn,Wa,g,Jn,Qo,Mn,Zn,zo,xn,jn,Do,Un,kn,Wt,In,En,Ke,Wn,Bn,et,Vn,Nn,Ba,W,tt,Yo,Gn,Cn,ot,Rn,at,Fo,Xn,$n,st,Pn,lt,nt,Sn,Ao,Qn,zn,Dn,rt,Va,pe,Yn,it,Fn,An,Na,H,de,Ho,pt,Hn,qo,qn,Ga,b,dt,Ln,Lo,On,Kn,ct,er,Bt,tr,or,ar,ce,ht,sr,Oo,lr,nr,he,ft,rr,Ko,ir,pr,fe,mt,dr,ea,cr,Ca;return ye=new V({}),_e=new V({}),Me=new V({}),je=new V({}),Ue=new V({}),ke=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBpbWFnZWlvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFRleHRUb1ZpZGVvWmVyb1BpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGUlMjAlM0QlMjBUZXh0VG9WaWRlb1plcm9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMHBhbmRhJTIwaXMlMjBwbGF5aW5nJTIwZ3VpdGFyJTIwb24lMjB0aW1lcyUyMHNxdWFyZSUyMiUwQXJlc3VsdCUyMCUzRCUyMHBpcGUocHJvbXB0JTNEcHJvbXB0KS5pbWFnZXMlMEFyZXN1bHQlMjAlM0QlMjAlNUIociUyMColMjAyNTUpLmFzdHlwZSglMjJ1aW50OCUyMiklMjBmb3IlMjByJTIwaW4lMjByZXN1bHQlNUQlMEFpbWFnZWlvLm1pbXNhdmUoJTIydmlkZW8ubXA0JTIyJTJDJTIwcmVzdWx0JTJDJTIwZnBzJTNENCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> imageio
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> TextToVideoZeroPipeline

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = TextToVideoZeroPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;A panda is playing guitar on times square&quot;</span>
result = pipe(prompt=prompt).images
result = [(r * <span class="hljs-number">255</span>).astype(<span class="hljs-string">&quot;uint8&quot;</span>) <span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> result]
imageio.mimsave(<span class="hljs-string">&quot;video.mp4&quot;</span>, result, fps=<span class="hljs-number">4</span>)`}}),Be=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBpbWFnZWlvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFRleHRUb1ZpZGVvWmVyb1BpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGUlMjAlM0QlMjBUZXh0VG9WaWRlb1plcm9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBc2VlZCUyMCUzRCUyMDAlMEF2aWRlb19sZW5ndGglMjAlM0QlMjA4JTBBY2h1bmtfc2l6ZSUyMCUzRCUyMDQlMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwcGFuZGElMjBpcyUyMHBsYXlpbmclMjBndWl0YXIlMjBvbiUyMHRpbWVzJTIwc3F1YXJlJTIyJTBBJTBBJTIzJTIwR2VuZXJhdGUlMjB0aGUlMjB2aWRlbyUyMGNodW5rLWJ5LWNodW5rJTBBcmVzdWx0JTIwJTNEJTIwJTVCJTVEJTBBY2h1bmtfaWRzJTIwJTNEJTIwbnAuYXJhbmdlKDAlMkMlMjB2aWRlb19sZW5ndGglMkMlMjBjaHVua19zaXplJTIwLSUyMDEpJTBBZ2VuZXJhdG9yJTIwJTNEJTIwdG9yY2guR2VuZXJhdG9yKGRldmljZSUzRCUyMmN1ZGElMjIpJTBBZm9yJTIwaSUyMGluJTIwcmFuZ2UobGVuKGNodW5rX2lkcykpJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoZiUyMlByb2Nlc3NpbmclMjBjaHVuayUyMCU3QmklMjAlMkIlMjAxJTdEJTIwJTJGJTIwJTdCbGVuKGNodW5rX2lkcyklN0QlMjIpJTBBJTIwJTIwJTIwJTIwY2hfc3RhcnQlMjAlM0QlMjBjaHVua19pZHMlNUJpJTVEJTBBJTIwJTIwJTIwJTIwY2hfZW5kJTIwJTNEJTIwdmlkZW9fbGVuZ3RoJTIwaWYlMjBpJTIwJTNEJTNEJTIwbGVuKGNodW5rX2lkcyklMjAtJTIwMSUyMGVsc2UlMjBjaHVua19pZHMlNUJpJTIwJTJCJTIwMSU1RCUwQSUyMCUyMCUyMCUyMCUyMyUyMEF0dGFjaCUyMHRoZSUyMGZpcnN0JTIwZnJhbWUlMjBmb3IlMjBDcm9zcyUyMEZyYW1lJTIwQXR0ZW50aW9uJTBBJTIwJTIwJTIwJTIwZnJhbWVfaWRzJTIwJTNEJTIwJTVCMCU1RCUyMCUyQiUyMGxpc3QocmFuZ2UoY2hfc3RhcnQlMkMlMjBjaF9lbmQpKSUwQSUyMCUyMCUyMCUyMCUyMyUyMEZpeCUyMHRoZSUyMHNlZWQlMjBmb3IlMjB0aGUlMjB0ZW1wb3JhbCUyMGNvbnNpc3RlbmN5JTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yLm1hbnVhbF9zZWVkKHNlZWQpJTBBJTIwJTIwJTIwJTIwb3V0cHV0JTIwJTNEJTIwcGlwZShwcm9tcHQlM0Rwcm9tcHQlMkMlMjB2aWRlb19sZW5ndGglM0RsZW4oZnJhbWVfaWRzKSUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUyMGZyYW1lX2lkcyUzRGZyYW1lX2lkcyklMEElMjAlMjAlMjAlMjByZXN1bHQuYXBwZW5kKG91dHB1dC5pbWFnZXMlNUIxJTNBJTVEKSUwQSUwQSUyMyUyMENvbmNhdGVuYXRlJTIwY2h1bmtzJTIwYW5kJTIwc2F2ZSUwQXJlc3VsdCUyMCUzRCUyMG5wLmNvbmNhdGVuYXRlKHJlc3VsdCklMEFyZXN1bHQlMjAlM0QlMjAlNUIociUyMColMjAyNTUpLmFzdHlwZSglMjJ1aW50OCUyMiklMjBmb3IlMjByJTIwaW4lMjByZXN1bHQlNUQlMEFpbWFnZWlvLm1pbXNhdmUoJTIydmlkZW8ubXA0JTIyJTJDJTIwcmVzdWx0JTJDJTIwZnBzJTNENCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> imageio
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> TextToVideoZeroPipeline
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
pipe = TextToVideoZeroPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
seed = <span class="hljs-number">0</span>
video_length = <span class="hljs-number">8</span>
chunk_size = <span class="hljs-number">4</span>
prompt = <span class="hljs-string">&quot;A panda is playing guitar on times square&quot;</span>

<span class="hljs-comment"># Generate the video chunk-by-chunk</span>
result = []
chunk_ids = np.arange(<span class="hljs-number">0</span>, video_length, chunk_size - <span class="hljs-number">1</span>)
generator = torch.Generator(device=<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(chunk_ids)):
    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Processing chunk <span class="hljs-subst">{i + <span class="hljs-number">1</span>}</span> / <span class="hljs-subst">{<span class="hljs-built_in">len</span>(chunk_ids)}</span>&quot;</span>)
    ch_start = chunk_ids[i]
    ch_end = video_length <span class="hljs-keyword">if</span> i == <span class="hljs-built_in">len</span>(chunk_ids) - <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> chunk_ids[i + <span class="hljs-number">1</span>]
    <span class="hljs-comment"># Attach the first frame for Cross Frame Attention</span>
    frame_ids = [<span class="hljs-number">0</span>] + <span class="hljs-built_in">list</span>(<span class="hljs-built_in">range</span>(ch_start, ch_end))
    <span class="hljs-comment"># Fix the seed for the temporal consistency</span>
    generator.manual_seed(seed)
    output = pipe(prompt=prompt, video_length=<span class="hljs-built_in">len</span>(frame_ids), generator=generator, frame_ids=frame_ids)
    result.append(output.images[<span class="hljs-number">1</span>:])

<span class="hljs-comment"># Concatenate chunks and save</span>
result = np.concatenate(result)
result = [(r * <span class="hljs-number">255</span>).astype(<span class="hljs-string">&quot;uint8&quot;</span>) <span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> result]
imageio.mimsave(<span class="hljs-string">&quot;video.mp4&quot;</span>, result, fps=<span class="hljs-number">4</span>)`}}),Ve=new V({}),Ge=new j({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQSUwQWZpbGVuYW1lJTIwJTNEJTIwJTIyX19hc3NldHNfXyUyRnBvc2VzX3NrZWxldG9uX2dpZnMlMkZkYW5jZTFfY29yci5tcDQlMjIlMEFyZXBvX2lkJTIwJTNEJTIwJTIyUEFJUiUyRlRleHQyVmlkZW8tWmVybyUyMiUwQXZpZGVvX3BhdGglMjAlM0QlMjBoZl9odWJfZG93bmxvYWQocmVwb190eXBlJTNEJTIyc3BhY2UlMjIlMkMlMjByZXBvX2lkJTNEcmVwb19pZCUyQyUyMGZpbGVuYW1lJTNEZmlsZW5hbWUp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

filename = <span class="hljs-string">&quot;__assets__/poses_skeleton_gifs/dance1_corr.mp4&quot;</span>
repo_id = <span class="hljs-string">&quot;PAIR/Text2Video-Zero&quot;</span>
video_path = hf_hub_download(repo_type=<span class="hljs-string">&quot;space&quot;</span>, repo_id=repo_id, filename=filename)`}}),Ce=new j({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwaW1hZ2VpbyUwQSUwQXJlYWRlciUyMCUzRCUyMGltYWdlaW8uZ2V0X3JlYWRlcih2aWRlb19wYXRoJTJDJTIwJTIyZmZtcGVnJTIyKSUwQWZyYW1lX2NvdW50JTIwJTNEJTIwOCUwQXBvc2VfaW1hZ2VzJTIwJTNEJTIwJTVCSW1hZ2UuZnJvbWFycmF5KHJlYWRlci5nZXRfZGF0YShpKSklMjBmb3IlMjBpJTIwaW4lMjByYW5nZShmcmFtZV9jb3VudCklNUQ=",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> imageio

reader = imageio.get_reader(video_path, <span class="hljs-string">&quot;ffmpeg&quot;</span>)
frame_count = <span class="hljs-number">8</span>
pose_images = [Image.fromarray(reader.get_data(i)) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(frame_count)]`}}),Pe=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbE5ldFBpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMudGV4dF90b192aWRlb19zeW50aGVzaXMucGlwZWxpbmVfdGV4dF90b192aWRlb196ZXJvJTIwaW1wb3J0JTIwQ3Jvc3NGcmFtZUF0dG5Qcm9jZXNzb3IlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBY29udHJvbG5ldCUyMCUzRCUyMENvbnRyb2xOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGxseWFzdmllbCUyRnNkLWNvbnRyb2xuZXQtb3BlbnBvc2UlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkNvbnRyb2xOZXRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMjBjb250cm9sbmV0JTNEY29udHJvbG5ldCUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEElMjMlMjBTZXQlMjB0aGUlMjBhdHRlbnRpb24lMjBwcm9jZXNzb3IlMEFwaXBlLnVuZXQuc2V0X2F0dG5fcHJvY2Vzc29yKENyb3NzRnJhbWVBdHRuUHJvY2Vzc29yKGJhdGNoX3NpemUlM0QyKSklMEFwaXBlLmNvbnRyb2xuZXQuc2V0X2F0dG5fcHJvY2Vzc29yKENyb3NzRnJhbWVBdHRuUHJvY2Vzc29yKGJhdGNoX3NpemUlM0QyKSklMEElMEElMjMlMjBmaXglMjBsYXRlbnRzJTIwZm9yJTIwYWxsJTIwZnJhbWVzJTBBbGF0ZW50cyUyMCUzRCUyMHRvcmNoLnJhbmRuKCgxJTJDJTIwNCUyQyUyMDY0JTJDJTIwNjQpJTJDJTIwZGV2aWNlJTNEJTIyY3VkYSUyMiUyQyUyMGR0eXBlJTNEdG9yY2guZmxvYXQxNikucmVwZWF0KGxlbihwb3NlX2ltYWdlcyklMkMlMjAxJTJDJTIwMSUyQyUyMDEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyRGFydGglMjBWYWRlciUyMGRhbmNpbmclMjBpbiUyMGElMjBkZXNlcnQlMjIlMEFyZXN1bHQlMjAlM0QlMjBwaXBlKHByb21wdCUzRCU1QnByb21wdCU1RCUyMColMjBsZW4ocG9zZV9pbWFnZXMpJTJDJTIwaW1hZ2UlM0Rwb3NlX2ltYWdlcyUyQyUyMGxhdGVudHMlM0RsYXRlbnRzKS5pbWFnZXMlMEFpbWFnZWlvLm1pbXNhdmUoJTIydmlkZW8ubXA0JTIyJTJDJTIwcmVzdWx0JTJDJTIwZnBzJTNENCk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel
<span class="hljs-keyword">from</span> diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero <span class="hljs-keyword">import</span> CrossFrameAttnProcessor

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-openpose&quot;</span>, torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
    model_id, controlnet=controlnet, torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Set the attention processor</span>
pipe.unet.set_attn_processor(CrossFrameAttnProcessor(batch_size=<span class="hljs-number">2</span>))
pipe.controlnet.set_attn_processor(CrossFrameAttnProcessor(batch_size=<span class="hljs-number">2</span>))

<span class="hljs-comment"># fix latents for all frames</span>
latents = torch.randn((<span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">64</span>, <span class="hljs-number">64</span>), device=<span class="hljs-string">&quot;cuda&quot;</span>, dtype=torch.float16).repeat(<span class="hljs-built_in">len</span>(pose_images), <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>)

prompt = <span class="hljs-string">&quot;Darth Vader dancing in a desert&quot;</span>
result = pipe(prompt=[prompt] * <span class="hljs-built_in">len</span>(pose_images), image=pose_images, latents=latents).images
imageio.mimsave(<span class="hljs-string">&quot;video.mp4&quot;</span>, result, fps=<span class="hljs-number">4</span>)`}}),Se=new V({}),ze=new V({}),Ye=new j({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQSUwQWZpbGVuYW1lJTIwJTNEJTIwJTIyX19hc3NldHNfXyUyRnBpeDJwaXglMjB2aWRlbyUyRmNhbWVsLm1wNCUyMiUwQXJlcG9faWQlMjAlM0QlMjAlMjJQQUlSJTJGVGV4dDJWaWRlby1aZXJvJTIyJTBBdmlkZW9fcGF0aCUyMCUzRCUyMGhmX2h1Yl9kb3dubG9hZChyZXBvX3R5cGUlM0QlMjJzcGFjZSUyMiUyQyUyMHJlcG9faWQlM0RyZXBvX2lkJTJDJTIwZmlsZW5hbWUlM0RmaWxlbmFtZSk=",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

filename = <span class="hljs-string">&quot;__assets__/pix2pix video/camel.mp4&quot;</span>
repo_id = <span class="hljs-string">&quot;PAIR/Text2Video-Zero&quot;</span>
video_path = hf_hub_download(repo_type=<span class="hljs-string">&quot;space&quot;</span>, repo_id=repo_id, filename=filename)`}}),Ae=new j({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwaW1hZ2VpbyUwQSUwQXJlYWRlciUyMCUzRCUyMGltYWdlaW8uZ2V0X3JlYWRlcih2aWRlb19wYXRoJTJDJTIwJTIyZmZtcGVnJTIyKSUwQWZyYW1lX2NvdW50JTIwJTNEJTIwOCUwQXZpZGVvJTIwJTNEJTIwJTVCSW1hZ2UuZnJvbWFycmF5KHJlYWRlci5nZXRfZGF0YShpKSklMjBmb3IlMjBpJTIwaW4lMjByYW5nZShmcmFtZV9jb3VudCklNUQ=",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> imageio

reader = imageio.get_reader(video_path, <span class="hljs-string">&quot;ffmpeg&quot;</span>)
frame_count = <span class="hljs-number">8</span>
video = [Image.fromarray(reader.get_data(i)) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(frame_count)]`}}),Le=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uSW5zdHJ1Y3RQaXgyUGl4UGlwZWxpbmUlMEFmcm9tJTIwZGlmZnVzZXJzLnBpcGVsaW5lcy50ZXh0X3RvX3ZpZGVvX3N5bnRoZXNpcy5waXBlbGluZV90ZXh0X3RvX3ZpZGVvX3plcm8lMjBpbXBvcnQlMjBDcm9zc0ZyYW1lQXR0blByb2Nlc3NvciUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIydGltYnJvb2tzJTJGaW5zdHJ1Y3QtcGl4MnBpeCUyMiUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25JbnN0cnVjdFBpeDJQaXhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZS51bmV0LnNldF9hdHRuX3Byb2Nlc3NvcihDcm9zc0ZyYW1lQXR0blByb2Nlc3NvcihiYXRjaF9zaXplJTNEMykpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIybWFrZSUyMGl0JTIwVmFuJTIwR29naCUyMFN0YXJyeSUyME5pZ2h0JTIwc3R5bGUlMjIlMEFyZXN1bHQlMjAlM0QlMjBwaXBlKHByb21wdCUzRCU1QnByb21wdCU1RCUyMColMjBsZW4odmlkZW8pJTJDJTIwaW1hZ2UlM0R2aWRlbykuaW1hZ2VzJTBBaW1hZ2Vpby5taW1zYXZlKCUyMmVkaXRlZF92aWRlby5tcDQlMjIlMkMlMjByZXN1bHQlMkMlMjBmcHMlM0Q0KQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionInstructPix2PixPipeline
<span class="hljs-keyword">from</span> diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero <span class="hljs-keyword">import</span> CrossFrameAttnProcessor

model_id = <span class="hljs-string">&quot;timbrooks/instruct-pix2pix&quot;</span>
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.unet.set_attn_processor(CrossFrameAttnProcessor(batch_size=<span class="hljs-number">3</span>))

prompt = <span class="hljs-string">&quot;make it Van Gogh Starry Night style&quot;</span>
result = pipe(prompt=[prompt] * <span class="hljs-built_in">len</span>(video), image=video).images
imageio.mimsave(<span class="hljs-string">&quot;edited_video.mp4&quot;</span>, result, fps=<span class="hljs-number">4</span>)`}}),Oe=new V({}),ot=new j({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGhmX2h1Yl9kb3dubG9hZCUwQSUwQWZpbGVuYW1lJTIwJTNEJTIwJTIyX19hc3NldHNfXyUyRmNhbm55X3ZpZGVvc19tcDQlMkZnaXJsX3R1cm5pbmcubXA0JTIyJTBBcmVwb19pZCUyMCUzRCUyMCUyMlBBSVIlMkZUZXh0MlZpZGVvLVplcm8lMjIlMEF2aWRlb19wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKHJlcG9fdHlwZSUzRCUyMnNwYWNlJTIyJTJDJTIwcmVwb19pZCUzRHJlcG9faWQlMkMlMjBmaWxlbmFtZSUzRGZpbGVuYW1lKQ==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

filename = <span class="hljs-string">&quot;__assets__/canny_videos_mp4/girl_turning.mp4&quot;</span>
repo_id = <span class="hljs-string">&quot;PAIR/Text2Video-Zero&quot;</span>
video_path = hf_hub_download(repo_type=<span class="hljs-string">&quot;space&quot;</span>, repo_id=repo_id, filename=filename)`}}),st=new j({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwaW1hZ2VpbyUwQSUwQXJlYWRlciUyMCUzRCUyMGltYWdlaW8uZ2V0X3JlYWRlcih2aWRlb19wYXRoJTJDJTIwJTIyZmZtcGVnJTIyKSUwQWZyYW1lX2NvdW50JTIwJTNEJTIwOCUwQWNhbm55X2VkZ2VzJTIwJTNEJTIwJTVCSW1hZ2UuZnJvbWFycmF5KHJlYWRlci5nZXRfZGF0YShpKSklMjBmb3IlMjBpJTIwaW4lMjByYW5nZShmcmFtZV9jb3VudCklNUQ=",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> imageio

reader = imageio.get_reader(video_path, <span class="hljs-string">&quot;ffmpeg&quot;</span>)
frame_count = <span class="hljs-number">8</span>
canny_edges = [Image.fromarray(reader.get_data(i)) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(frame_count)]`}}),rt=new j({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbE5ldFBpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMudGV4dF90b192aWRlb19zeW50aGVzaXMucGlwZWxpbmVfdGV4dF90b192aWRlb196ZXJvJTIwaW1wb3J0JTIwQ3Jvc3NGcmFtZUF0dG5Qcm9jZXNzb3IlMEElMEElMjMlMjBzZXQlMjBtb2RlbCUyMGlkJTIwdG8lMjBjdXN0b20lMjBtb2RlbCUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyUEFJUiUyRnRleHQydmlkZW8temVyby1jb250cm9sbmV0LWNhbm55LWF2YXRhciUyMiUwQWNvbnRyb2xuZXQlMjAlM0QlMjBDb250cm9sTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmxsbHlhc3ZpZWwlMkZzZC1jb250cm9sbmV0LWNhbm55JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2KSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25Db250cm9sTmV0UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTIwY29udHJvbG5ldCUzRGNvbnRyb2xuZXQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBJTIzJTIwU2V0JTIwdGhlJTIwYXR0ZW50aW9uJTIwcHJvY2Vzc29yJTBBcGlwZS51bmV0LnNldF9hdHRuX3Byb2Nlc3NvcihDcm9zc0ZyYW1lQXR0blByb2Nlc3NvcihiYXRjaF9zaXplJTNEMikpJTBBcGlwZS5jb250cm9sbmV0LnNldF9hdHRuX3Byb2Nlc3NvcihDcm9zc0ZyYW1lQXR0blByb2Nlc3NvcihiYXRjaF9zaXplJTNEMikpJTBBJTBBJTIzJTIwZml4JTIwbGF0ZW50cyUyMGZvciUyMGFsbCUyMGZyYW1lcyUwQWxhdGVudHMlMjAlM0QlMjB0b3JjaC5yYW5kbigoMSUyQyUyMDQlMkMlMjA2NCUyQyUyMDY0KSUyQyUyMGRldmljZSUzRCUyMmN1ZGElMjIlMkMlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnJlcGVhdChsZW4oY2FubnlfZWRnZXMpJTJDJTIwMSUyQyUyMDElMkMlMjAxKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMm9pbCUyMHBhaW50aW5nJTIwb2YlMjBhJTIwYmVhdXRpZnVsJTIwZ2lybCUyMGF2YXRhciUyMHN0eWxlJTIyJTBBcmVzdWx0JTIwJTNEJTIwcGlwZShwcm9tcHQlM0QlNUJwcm9tcHQlNUQlMjAqJTIwbGVuKGNhbm55X2VkZ2VzKSUyQyUyMGltYWdlJTNEY2FubnlfZWRnZXMlMkMlMjBsYXRlbnRzJTNEbGF0ZW50cykuaW1hZ2VzJTBBaW1hZ2Vpby5taW1zYXZlKCUyMnZpZGVvLm1wNCUyMiUyQyUyMHJlc3VsdCUyQyUyMGZwcyUzRDQp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionControlNetPipeline, ControlNetModel
<span class="hljs-keyword">from</span> diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero <span class="hljs-keyword">import</span> CrossFrameAttnProcessor

<span class="hljs-comment"># set model id to custom model</span>
model_id = <span class="hljs-string">&quot;PAIR/text2video-zero-controlnet-canny-avatar&quot;</span>
controlnet = ControlNetModel.from_pretrained(<span class="hljs-string">&quot;lllyasviel/sd-controlnet-canny&quot;</span>, torch_dtype=torch.float16)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
    model_id, controlnet=controlnet, torch_dtype=torch.float16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Set the attention processor</span>
pipe.unet.set_attn_processor(CrossFrameAttnProcessor(batch_size=<span class="hljs-number">2</span>))
pipe.controlnet.set_attn_processor(CrossFrameAttnProcessor(batch_size=<span class="hljs-number">2</span>))

<span class="hljs-comment"># fix latents for all frames</span>
latents = torch.randn((<span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">64</span>, <span class="hljs-number">64</span>), device=<span class="hljs-string">&quot;cuda&quot;</span>, dtype=torch.float16).repeat(<span class="hljs-built_in">len</span>(canny_edges), <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>)

prompt = <span class="hljs-string">&quot;oil painting of a beautiful girl avatar style&quot;</span>
result = pipe(prompt=[prompt] * <span class="hljs-built_in">len</span>(canny_edges), image=canny_edges, latents=latents).images
imageio.mimsave(<span class="hljs-string">&quot;video.mp4&quot;</span>, result, fps=<span class="hljs-number">4</span>)`}}),pt=new V({}),dt=new ys({props:{name:"class diffusers.TextToVideoZeroPipeline",anchor:"diffusers.TextToVideoZeroPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPImageProcessor"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.TextToVideoZeroPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/v0.18.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.TextToVideoZeroPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.TextToVideoZeroPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.TextToVideoZeroPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/v0.18.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.TextToVideoZeroPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.18.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.18.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.18.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.18.0/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.TextToVideoZeroPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.TextToVideoZeroPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L263"}}),ht=new ys({props:{name:"__call__",anchor:"diffusers.TextToVideoZeroPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]]"},{name:"video_length",val:": typing.Optional[int] = 8"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{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:"motion_field_strength_x",val:": float = 12"},{name:"motion_field_strength_y",val:": float = 12"},{name:"output_type",val:": typing.Optional[str] = 'tensor'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": typing.Optional[int] = 1"},{name:"t0",val:": int = 44"},{name:"t1",val:": int = 47"},{name:"frame_ids",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"diffusers.TextToVideoZeroPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.video_length",description:"<strong>video_length</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; The number of generated video frames",name:"video_length"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.TextToVideoZeroPipeline.__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 image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the 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.TextToVideoZeroPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/v0.18.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.TextToVideoZeroPipeline.__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 image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;numpy&quot;</code>) &#x2014;
The output format of the generated image. Choose between <code>&quot;latent&quot;</code> and <code>&quot;numpy&quot;</code>.`,name:"output_type"},{anchor:"diffusers.TextToVideoZeroPipeline.__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.18.0/en/api/pipelines/stable_diffusion/overview#diffusers.pipelines.stable_diffusion.StableDiffusionPipelineOutput">StableDiffusionPipelineOutput</a> instead of a
plain tuple.`,name:"return_dict"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.motion_field_strength_x",description:`<strong>motion_field_strength_x</strong> (<code>float</code>, <em>optional</em>, defaults to 12) &#x2014;
Strength of motion in generated video along x-axis. See the <a href="https://arxiv.org/abs/2303.13439" rel="nofollow">paper</a>,
Sect. 3.3.1.`,name:"motion_field_strength_x"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.motion_field_strength_y",description:`<strong>motion_field_strength_y</strong> (<code>float</code>, <em>optional</em>, defaults to 12) &#x2014;
Strength of motion in generated video along y-axis. See the <a href="https://arxiv.org/abs/2303.13439" rel="nofollow">paper</a>,
Sect. 3.3.1.`,name:"motion_field_strength_y"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.t0",description:`<strong>t0</strong> (<code>int</code>, <em>optional</em>, defaults to 44) &#x2014;
Timestep t0. Should be in the range [0, num_inference_steps - 1]. See the
<a href="https://arxiv.org/abs/2303.13439" rel="nofollow">paper</a>, Sect. 3.3.1.`,name:"t0"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.t1",description:`<strong>t1</strong> (<code>int</code>, <em>optional</em>, defaults to 47) &#x2014;
Timestep t0. Should be in the range [t0 + 1, num_inference_steps - 1]. See the
<a href="https://arxiv.org/abs/2303.13439" rel="nofollow">paper</a>, Sect. 3.3.1.`,name:"t1"},{anchor:"diffusers.TextToVideoZeroPipeline.__call__.frame_ids",description:`<strong>frame_ids</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Indexes of the frames that are being generated. This is used when generating longer videos
chunk-by-chunk.`,name:"frame_ids"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L399",returnDescription:`
<p>The output contains a ndarray of the generated images, when output_type != \u2018latent\u2019, otherwise a latent
codes of generated image, and a list of <code>bool</code>s denoting whether the corresponding generated image
likely represents \u201Cnot-safe-for-work\u201D (nsfw) content, according to the <code>safety_checker</code>.</p>
`,returnType:`
<p><code>~pipelines.text_to_video_synthesis.TextToVideoPipelineOutput</code></p>
`}}),ft=new ys({props:{name:"backward_loop",anchor:"diffusers.TextToVideoZeroPipeline.backward_loop",parameters:[{name:"latents",val:""},{name:"timesteps",val:""},{name:"prompt_embeds",val:""},{name:"guidance_scale",val:""},{name:"callback",val:""},{name:"callback_steps",val:""},{name:"num_warmup_steps",val:""},{name:"extra_step_kwargs",val:""},{name:"cross_attention_kwargs",val:" = None"}],parametersDescription:[{anchor:"diffusers.TextToVideoZeroPipeline.backward_loop.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.TextToVideoZeroPipeline.backward_loop.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.
extra_step_kwargs &#x2014; extra_step_kwargs.
cross_attention_kwargs &#x2014; cross_attention_kwargs.
num_warmup_steps &#x2014; number of warmup steps.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L330",returnDescription:`
<p>latents of backward process output at time timesteps[-1]</p>
`,returnType:`
<p>latents</p>
`}}),mt=new ys({props:{name:"forward_loop",anchor:"diffusers.TextToVideoZeroPipeline.forward_loop",parameters:[{name:"x_t0",val:""},{name:"t0",val:""},{name:"t1",val:""},{name:"generator",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.18.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L312",returnDescription:`
<p>forward process applied to x_t0 from time t0 to t1.</p>
`,returnType:`
<p>x_t1</p>
`}}),{c(){N=a("meta"),oa=p(),G=a("h1"),q=a("a"),St=a("span"),f(ye.$$.fragment),_s=p(),Qt=a("span"),vs=n("Zero-Shot Text-to-Video Generation"),aa=p(),C=a("h2"),L=a("a"),zt=a("span"),f(_e.$$.fragment),gs=p(),Dt=a("span"),bs=n("Overview"),sa=p(),M=a("p"),ve=a("a"),ws=n("Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video Generators"),Ts=n(` by
Levon Khachatryan,
Andranik Movsisyan,
Vahram Tadevosyan,
Roberto Henschel,
`),ge=a("a"),Js=n("Zhangyang Wang"),Ms=n(", Shant Navasardyan, "),be=a("a"),Zs=n("Humphrey Shi"),xs=n("."),la=p(),yt=a("p"),js=n("Our method Text2Video-Zero enables zero-shot video generation using either"),na=p(),U=a("ol"),Yt=a("li"),Us=n("A textual prompt, or"),ks=p(),Ft=a("li"),Is=n("A prompt combined with guidance from poses or edges, or"),Es=p(),At=a("li"),Ws=n("Video Instruct-Pix2Pix, i.e., instruction-guided video editing."),ra=p(),_t=a("p"),Bs=n("Results are temporally consistent and follow closely the guidance and textual prompts."),ia=p(),vt=a("p"),gt=a("img"),pa=p(),bt=a("p"),Vs=n("The abstract of the paper is the following:"),da=p(),wt=a("p"),Ht=a("em"),Ns=n(`Recent text-to-video generation approaches rely on computationally heavy training and require large-scale video datasets. In this paper, we introduce a new task of zero-shot text-to-video generation and propose a low-cost approach (without any training or optimization) by leveraging the power of existing text-to-image synthesis methods (e.g., Stable Diffusion), making them suitable for the video domain.
Our key modifications include (i) enriching the latent codes of the generated frames with motion dynamics to keep the global scene and the background time consistent; and (ii) reprogramming frame-level self-attention using a new cross-frame attention of each frame on the first frame, to preserve the context, appearance, and identity of the foreground object.
Experiments show that this leads to low overhead, yet high-quality and remarkably consistent video generation. Moreover, our approach is not limited to text-to-video synthesis but is also applicable to other tasks such as conditional and content-specialized video generation, and Video Instruct-Pix2Pix, i.e., instruction-guided video editing.
As experiments show, our method performs comparably or sometimes better than recent approaches, despite not being trained on additional video data.`),ca=p(),Tt=a("p"),Gs=n("Resources:"),ha=p(),k=a("ul"),qt=a("li"),we=a("a"),Cs=n("Project Page"),Rs=p(),Lt=a("li"),Te=a("a"),Xs=n("Paper"),$s=p(),Ot=a("li"),Je=a("a"),Ps=n("Original Code"),fa=p(),R=a("h2"),O=a("a"),Kt=a("span"),f(Me.$$.fragment),Ss=p(),eo=a("span"),Qs=n("Available Pipelines:"),ma=p(),K=a("table"),to=a("thead"),X=a("tr"),oo=a("th"),zs=n("Pipeline"),Ds=p(),ao=a("th"),Ys=n("Tasks"),Fs=p(),Jt=a("th"),As=n("Demo"),Hs=p(),so=a("tbody"),$=a("tr"),lo=a("td"),Ze=a("a"),qs=n("TextToVideoZeroPipeline"),Ls=p(),no=a("td"),ro=a("em"),Os=n("Zero-shot Text-to-Video Generation"),Ks=p(),Mt=a("td"),xe=a("a"),el=n("\u{1F917} Space"),ua=p(),P=a("h2"),ee=a("a"),io=a("span"),f(je.$$.fragment),tl=p(),po=a("span"),ol=n("Usage example"),ya=p(),S=a("h3"),te=a("a"),co=a("span"),f(Ue.$$.fragment),al=p(),ho=a("span"),sl=n("Text-To-Video"),_a=p(),Zt=a("p"),ll=n("To generate a video from prompt, run the following python command"),va=p(),f(ke.$$.fragment),ga=p(),xt=a("p"),nl=n("You can change these parameters in the pipeline call:"),ba=p(),I=a("ul"),oe=a("li"),rl=n("Motion field strength (see the "),Ie=a("a"),il=n("paper"),pl=n(", Sect. 3.3.1):"),fo=a("ul"),Z=a("li"),mo=a("code"),dl=n("motion_field_strength_x"),cl=n(" and "),uo=a("code"),hl=n("motion_field_strength_y"),fl=n(". Default: "),yo=a("code"),ml=n("motion_field_strength_x=12"),ul=n(", "),_o=a("code"),yl=n("motion_field_strength_y=12"),_l=p(),x=a("li"),vo=a("code"),vl=n("T"),gl=n(" and "),go=a("code"),bl=n("T'"),wl=n(" (see the "),Ee=a("a"),Tl=n("paper"),Jl=n(", Sect. 3.3.1)"),bo=a("ul"),T=a("li"),wo=a("code"),Ml=n("t0"),Zl=n(" and "),To=a("code"),xl=n("t1"),jl=n(" in the range "),Jo=a("code"),Ul=n("{0, ..., num_inference_steps}"),kl=n(". Default: "),Mo=a("code"),Il=n("t0=45"),El=n(", "),Zo=a("code"),Wl=n("t1=48"),Bl=p(),jt=a("li"),Vl=n("Video length:"),xo=a("ul"),We=a("li"),jo=a("code"),Nl=n("video_length"),Gl=n(", the number of frames video_length to be generated. Default: "),Uo=a("code"),Cl=n("video_length=8"),wa=p(),Ut=a("p"),Rl=n("We an also generate longer videos by doing the processing in a chunk-by-chunk manner:"),Ta=p(),f(Be.$$.fragment),Ja=p(),Q=a("h3"),ae=a("a"),ko=a("span"),f(Ve.$$.fragment),Xl=p(),Io=a("span"),$l=n("Text-To-Video with Pose Control"),Ma=n(`

To generate a video from prompt with additional pose control
`),kt=a("ol"),Ne=a("li"),Eo=a("p"),Pl=n("Download a demo video"),Sl=p(),f(Ge.$$.fragment),Za=p(),z=a("ol"),D=a("li"),Wo=a("p"),Ql=n("Read video containing extracted pose images"),zl=p(),f(Ce.$$.fragment),Dl=p(),Re=a("p"),Yl=n("To extract pose from actual video, read "),It=a("a"),Fl=n("ControlNet documentation"),Al=n("."),Hl=p(),Xe=a("li"),$e=a("p"),ql=n("Run "),Bo=a("code"),Ll=n("StableDiffusionControlNetPipeline"),Ol=n(" with our custom attention processor"),Kl=p(),f(Pe.$$.fragment),xa=p(),Y=a("h3"),se=a("a"),Vo=a("span"),f(Se.$$.fragment),en=p(),No=a("span"),tn=n("Text-To-Video with Edge Control"),ja=p(),le=a("p"),on=n(`To generate a video from prompt with additional pose control,
follow the steps described above for pose-guided generation using `),Qe=a("a"),an=n("Canny edge ControlNet model"),sn=n("."),Ua=p(),F=a("h3"),ne=a("a"),Go=a("span"),f(ze.$$.fragment),ln=p(),Co=a("span"),nn=n("Video Instruct-Pix2Pix"),ka=p(),re=a("p"),rn=n("To perform text-guided video editing (with "),Et=a("a"),pn=n("InstructPix2Pix"),dn=n("):"),Ia=p(),E=a("ol"),De=a("li"),Ro=a("p"),cn=n("Download a demo video"),hn=p(),f(Ye.$$.fragment),fn=p(),Fe=a("li"),Xo=a("p"),mn=n("Read video from path"),un=p(),f(Ae.$$.fragment),yn=p(),He=a("li"),qe=a("p"),_n=n("Run "),$o=a("code"),vn=n("StableDiffusionInstructPix2PixPipeline"),gn=n(" with our custom attention processor"),bn=p(),f(Le.$$.fragment),Ea=p(),A=a("h3"),ie=a("a"),Po=a("span"),f(Oe.$$.fragment),wn=p(),So=a("span"),Tn=n("DreamBooth specialization"),Wa=p(),g=a("p"),Jn=n("Methods "),Qo=a("strong"),Mn=n("Text-To-Video"),Zn=n(", "),zo=a("strong"),xn=n("Text-To-Video with Pose Control"),jn=n(" and "),Do=a("strong"),Un=n("Text-To-Video with Edge Control"),kn=n(`
can run with custom `),Wt=a("a"),In=n("DreamBooth"),En=n(` models, as shown below for
`),Ke=a("a"),Wn=n("Canny edge ControlNet model"),Bn=n(` and
`),et=a("a"),Vn=n("Avatar style DreamBooth"),Nn=n(" model"),Ba=p(),W=a("ol"),tt=a("li"),Yo=a("p"),Gn=n("Download a demo video"),Cn=p(),f(ot.$$.fragment),Rn=p(),at=a("li"),Fo=a("p"),Xn=n("Read video from path"),$n=p(),f(st.$$.fragment),Pn=p(),lt=a("li"),nt=a("p"),Sn=n("Run "),Ao=a("code"),Qn=n("StableDiffusionControlNetPipeline"),zn=n(" with custom trained DreamBooth model"),Dn=p(),f(rt.$$.fragment),Va=p(),pe=a("p"),Yn=n("You can filter out some available DreamBooth-trained models with "),it=a("a"),Fn=n("this link"),An=n("."),Na=p(),H=a("h2"),de=a("a"),Ho=a("span"),f(pt.$$.fragment),Hn=p(),qo=a("span"),qn=n("TextToVideoZeroPipeline"),Ga=p(),b=a("div"),f(dt.$$.fragment),Ln=p(),Lo=a("p"),On=n("Pipeline for zero-shot text-to-video generation using Stable Diffusion."),Kn=p(),ct=a("p"),er=n("This model inherits from "),Bt=a("a"),tr=n("StableDiffusionPipeline"),or=n(`. Check the superclass documentation for the generic methods
the library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),ar=p(),ce=a("div"),f(ht.$$.fragment),sr=p(),Oo=a("p"),lr=n("Function invoked when calling the pipeline for generation."),nr=p(),he=a("div"),f(ft.$$.fragment),rr=p(),Ko=a("p"),ir=n("Perform backward process given list of time steps"),pr=p(),fe=a("div"),f(mt.$$.fragment),dr=p(),ea=a("p"),cr=n("Perform ddpm forward process from time t0 to t1. This is the same as adding noise with corresponding variance."),this.h()},l(t){const c=yp('[data-svelte="svelte-1phssyn"]',document.head);N=s(c,"META",{name:!0,content:!0}),c.forEach(o),oa=d(t),G=s(t,"H1",{class:!0});var Ra=l(G);q=s(Ra,"A",{id:!0,class:!0,href:!0});var ur=l(q);St=s(ur,"SPAN",{});var yr=l(St);m(ye.$$.fragment,yr),yr.forEach(o),ur.forEach(o),_s=d(Ra),Qt=s(Ra,"SPAN",{});var _r=l(Qt);vs=r(_r,"Zero-Shot Text-to-Video Generation"),_r.forEach(o),Ra.forEach(o),aa=d(t),C=s(t,"H2",{class:!0});var Xa=l(C);L=s(Xa,"A",{id:!0,class:!0,href:!0});var vr=l(L);zt=s(vr,"SPAN",{});var gr=l(zt);m(_e.$$.fragment,gr),gr.forEach(o),vr.forEach(o),gs=d(Xa),Dt=s(Xa,"SPAN",{});var br=l(Dt);bs=r(br,"Overview"),br.forEach(o),Xa.forEach(o),sa=d(t),M=s(t,"P",{});var ut=l(M);ve=s(ut,"A",{href:!0,rel:!0});var wr=l(ve);ws=r(wr,"Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video Generators"),wr.forEach(o),Ts=r(ut,` by
Levon Khachatryan,
Andranik Movsisyan,
Vahram Tadevosyan,
Roberto Henschel,
`),ge=s(ut,"A",{href:!0,rel:!0});var Tr=l(ge);Js=r(Tr,"Zhangyang Wang"),Tr.forEach(o),Ms=r(ut,", Shant Navasardyan, "),be=s(ut,"A",{href:!0,rel:!0});var Jr=l(be);Zs=r(Jr,"Humphrey Shi"),Jr.forEach(o),xs=r(ut,"."),ut.forEach(o),la=d(t),yt=s(t,"P",{});var Mr=l(yt);js=r(Mr,"Our method Text2Video-Zero enables zero-shot video generation using either"),Mr.forEach(o),na=d(t),U=s(t,"OL",{});var Vt=l(U);Yt=s(Vt,"LI",{});var Zr=l(Yt);Us=r(Zr,"A textual prompt, or"),Zr.forEach(o),ks=d(Vt),Ft=s(Vt,"LI",{});var xr=l(Ft);Is=r(xr,"A prompt combined with guidance from poses or edges, or"),xr.forEach(o),Es=d(Vt),At=s(Vt,"LI",{});var jr=l(At);Ws=r(jr,"Video Instruct-Pix2Pix, i.e., instruction-guided video editing."),jr.forEach(o),Vt.forEach(o),ra=d(t),_t=s(t,"P",{});var Ur=l(_t);Bs=r(Ur,"Results are temporally consistent and follow closely the guidance and textual prompts."),Ur.forEach(o),ia=d(t),vt=s(t,"P",{});var kr=l(vt);gt=s(kr,"IMG",{src:!0,alt:!0}),kr.forEach(o),pa=d(t),bt=s(t,"P",{});var Ir=l(bt);Vs=r(Ir,"The abstract of the paper is the following:"),Ir.forEach(o),da=d(t),wt=s(t,"P",{});var Er=l(wt);Ht=s(Er,"EM",{});var Wr=l(Ht);Ns=r(Wr,`Recent text-to-video generation approaches rely on computationally heavy training and require large-scale video datasets. In this paper, we introduce a new task of zero-shot text-to-video generation and propose a low-cost approach (without any training or optimization) by leveraging the power of existing text-to-image synthesis methods (e.g., Stable Diffusion), making them suitable for the video domain.
Our key modifications include (i) enriching the latent codes of the generated frames with motion dynamics to keep the global scene and the background time consistent; and (ii) reprogramming frame-level self-attention using a new cross-frame attention of each frame on the first frame, to preserve the context, appearance, and identity of the foreground object.
Experiments show that this leads to low overhead, yet high-quality and remarkably consistent video generation. Moreover, our approach is not limited to text-to-video synthesis but is also applicable to other tasks such as conditional and content-specialized video generation, and Video Instruct-Pix2Pix, i.e., instruction-guided video editing.
As experiments show, our method performs comparably or sometimes better than recent approaches, despite not being trained on additional video data.`),Wr.forEach(o),Er.forEach(o),ca=d(t),Tt=s(t,"P",{});var Br=l(Tt);Gs=r(Br,"Resources:"),Br.forEach(o),ha=d(t),k=s(t,"UL",{});var Nt=l(k);qt=s(Nt,"LI",{});var Vr=l(qt);we=s(Vr,"A",{href:!0,rel:!0});var Nr=l(we);Cs=r(Nr,"Project Page"),Nr.forEach(o),Vr.forEach(o),Rs=d(Nt),Lt=s(Nt,"LI",{});var Gr=l(Lt);Te=s(Gr,"A",{href:!0,rel:!0});var Cr=l(Te);Xs=r(Cr,"Paper"),Cr.forEach(o),Gr.forEach(o),$s=d(Nt),Ot=s(Nt,"LI",{});var Rr=l(Ot);Je=s(Rr,"A",{href:!0,rel:!0});var Xr=l(Je);Ps=r(Xr,"Original Code"),Xr.forEach(o),Rr.forEach(o),Nt.forEach(o),fa=d(t),R=s(t,"H2",{class:!0});var $a=l(R);O=s($a,"A",{id:!0,class:!0,href:!0});var $r=l(O);Kt=s($r,"SPAN",{});var Pr=l(Kt);m(Me.$$.fragment,Pr),Pr.forEach(o),$r.forEach(o),Ss=d($a),eo=s($a,"SPAN",{});var Sr=l(eo);Qs=r(Sr,"Available Pipelines:"),Sr.forEach(o),$a.forEach(o),ma=d(t),K=s(t,"TABLE",{});var Pa=l(K);to=s(Pa,"THEAD",{});var Qr=l(to);X=s(Qr,"TR",{});var Gt=l(X);oo=s(Gt,"TH",{});var zr=l(oo);zs=r(zr,"Pipeline"),zr.forEach(o),Ds=d(Gt),ao=s(Gt,"TH",{});var Dr=l(ao);Ys=r(Dr,"Tasks"),Dr.forEach(o),Fs=d(Gt),Jt=s(Gt,"TH",{align:!0});var Yr=l(Jt);As=r(Yr,"Demo"),Yr.forEach(o),Gt.forEach(o),Qr.forEach(o),Hs=d(Pa),so=s(Pa,"TBODY",{});var Fr=l(so);$=s(Fr,"TR",{});var Ct=l($);lo=s(Ct,"TD",{});var Ar=l(lo);Ze=s(Ar,"A",{href:!0,rel:!0});var Hr=l(Ze);qs=r(Hr,"TextToVideoZeroPipeline"),Hr.forEach(o),Ar.forEach(o),Ls=d(Ct),no=s(Ct,"TD",{});var qr=l(no);ro=s(qr,"EM",{});var Lr=l(ro);Os=r(Lr,"Zero-shot Text-to-Video Generation"),Lr.forEach(o),qr.forEach(o),Ks=d(Ct),Mt=s(Ct,"TD",{align:!0});var Or=l(Mt);xe=s(Or,"A",{href:!0,rel:!0});var Kr=l(xe);el=r(Kr,"\u{1F917} Space"),Kr.forEach(o),Or.forEach(o),Ct.forEach(o),Fr.forEach(o),Pa.forEach(o),ua=d(t),P=s(t,"H2",{class:!0});var Sa=l(P);ee=s(Sa,"A",{id:!0,class:!0,href:!0});var ei=l(ee);io=s(ei,"SPAN",{});var ti=l(io);m(je.$$.fragment,ti),ti.forEach(o),ei.forEach(o),tl=d(Sa),po=s(Sa,"SPAN",{});var oi=l(po);ol=r(oi,"Usage example"),oi.forEach(o),Sa.forEach(o),ya=d(t),S=s(t,"H3",{class:!0});var Qa=l(S);te=s(Qa,"A",{id:!0,class:!0,href:!0});var ai=l(te);co=s(ai,"SPAN",{});var si=l(co);m(Ue.$$.fragment,si),si.forEach(o),ai.forEach(o),al=d(Qa),ho=s(Qa,"SPAN",{});var li=l(ho);sl=r(li,"Text-To-Video"),li.forEach(o),Qa.forEach(o),_a=d(t),Zt=s(t,"P",{});var ni=l(Zt);ll=r(ni,"To generate a video from prompt, run the following python command"),ni.forEach(o),va=d(t),m(ke.$$.fragment,t),ga=d(t),xt=s(t,"P",{});var ri=l(xt);nl=r(ri,"You can change these parameters in the pipeline call:"),ri.forEach(o),ba=d(t),I=s(t,"UL",{});var Rt=l(I);oe=s(Rt,"LI",{});var ta=l(oe);rl=r(ta,"Motion field strength (see the "),Ie=s(ta,"A",{href:!0,rel:!0});var ii=l(Ie);il=r(ii,"paper"),ii.forEach(o),pl=r(ta,", Sect. 3.3.1):"),fo=s(ta,"UL",{});var pi=l(fo);Z=s(pi,"LI",{});var me=l(Z);mo=s(me,"CODE",{});var di=l(mo);dl=r(di,"motion_field_strength_x"),di.forEach(o),cl=r(me," and "),uo=s(me,"CODE",{});var ci=l(uo);hl=r(ci,"motion_field_strength_y"),ci.forEach(o),fl=r(me,". Default: "),yo=s(me,"CODE",{});var hi=l(yo);ml=r(hi,"motion_field_strength_x=12"),hi.forEach(o),ul=r(me,", "),_o=s(me,"CODE",{});var fi=l(_o);yl=r(fi,"motion_field_strength_y=12"),fi.forEach(o),me.forEach(o),pi.forEach(o),ta.forEach(o),_l=d(Rt),x=s(Rt,"LI",{});var ue=l(x);vo=s(ue,"CODE",{});var mi=l(vo);vl=r(mi,"T"),mi.forEach(o),gl=r(ue," and "),go=s(ue,"CODE",{});var ui=l(go);bl=r(ui,"T'"),ui.forEach(o),wl=r(ue," (see the "),Ee=s(ue,"A",{href:!0,rel:!0});var yi=l(Ee);Tl=r(yi,"paper"),yi.forEach(o),Jl=r(ue,", Sect. 3.3.1)"),bo=s(ue,"UL",{});var _i=l(bo);T=s(_i,"LI",{});var B=l(T);wo=s(B,"CODE",{});var vi=l(wo);Ml=r(vi,"t0"),vi.forEach(o),Zl=r(B," and "),To=s(B,"CODE",{});var gi=l(To);xl=r(gi,"t1"),gi.forEach(o),jl=r(B," in the range "),Jo=s(B,"CODE",{});var bi=l(Jo);Ul=r(bi,"{0, ..., num_inference_steps}"),bi.forEach(o),kl=r(B,". Default: "),Mo=s(B,"CODE",{});var wi=l(Mo);Il=r(wi,"t0=45"),wi.forEach(o),El=r(B,", "),Zo=s(B,"CODE",{});var Ti=l(Zo);Wl=r(Ti,"t1=48"),Ti.forEach(o),B.forEach(o),_i.forEach(o),ue.forEach(o),Bl=d(Rt),jt=s(Rt,"LI",{});var hr=l(jt);Vl=r(hr,"Video length:"),xo=s(hr,"UL",{});var Ji=l(xo);We=s(Ji,"LI",{});var za=l(We);jo=s(za,"CODE",{});var Mi=l(jo);Nl=r(Mi,"video_length"),Mi.forEach(o),Gl=r(za,", the number of frames video_length to be generated. Default: "),Uo=s(za,"CODE",{});var Zi=l(Uo);Cl=r(Zi,"video_length=8"),Zi.forEach(o),za.forEach(o),Ji.forEach(o),hr.forEach(o),Rt.forEach(o),wa=d(t),Ut=s(t,"P",{});var xi=l(Ut);Rl=r(xi,"We an also generate longer videos by doing the processing in a chunk-by-chunk manner:"),xi.forEach(o),Ta=d(t),m(Be.$$.fragment,t),Ja=d(t),Q=s(t,"H3",{class:!0});var Da=l(Q);ae=s(Da,"A",{id:!0,class:!0,href:!0});var ji=l(ae);ko=s(ji,"SPAN",{});var Ui=l(ko);m(Ve.$$.fragment,Ui),Ui.forEach(o),ji.forEach(o),Xl=d(Da),Io=s(Da,"SPAN",{});var ki=l(Io);$l=r(ki,"Text-To-Video with Pose Control"),ki.forEach(o),Da.forEach(o),Ma=r(t,`

To generate a video from prompt with additional pose control
`),kt=s(t,"OL",{});var Ii=l(kt);Ne=s(Ii,"LI",{});var Ya=l(Ne);Eo=s(Ya,"P",{});var Ei=l(Eo);Pl=r(Ei,"Download a demo video"),Ei.forEach(o),Sl=d(Ya),m(Ge.$$.fragment,Ya),Ya.forEach(o),Ii.forEach(o),Za=d(t),z=s(t,"OL",{start:!0});var Fa=l(z);D=s(Fa,"LI",{});var Xt=l(D);Wo=s(Xt,"P",{});var Wi=l(Wo);Ql=r(Wi,"Read video containing extracted pose images"),Wi.forEach(o),zl=d(Xt),m(Ce.$$.fragment,Xt),Dl=d(Xt),Re=s(Xt,"P",{});var Aa=l(Re);Yl=r(Aa,"To extract pose from actual video, read "),It=s(Aa,"A",{href:!0});var Bi=l(It);Fl=r(Bi,"ControlNet documentation"),Bi.forEach(o),Al=r(Aa,"."),Aa.forEach(o),Xt.forEach(o),Hl=d(Fa),Xe=s(Fa,"LI",{});var Ha=l(Xe);$e=s(Ha,"P",{});var qa=l($e);ql=r(qa,"Run "),Bo=s(qa,"CODE",{});var Vi=l(Bo);Ll=r(Vi,"StableDiffusionControlNetPipeline"),Vi.forEach(o),Ol=r(qa," with our custom attention processor"),qa.forEach(o),Kl=d(Ha),m(Pe.$$.fragment,Ha),Ha.forEach(o),Fa.forEach(o),xa=d(t),Y=s(t,"H3",{class:!0});var La=l(Y);se=s(La,"A",{id:!0,class:!0,href:!0});var Ni=l(se);Vo=s(Ni,"SPAN",{});var Gi=l(Vo);m(Se.$$.fragment,Gi),Gi.forEach(o),Ni.forEach(o),en=d(La),No=s(La,"SPAN",{});var Ci=l(No);tn=r(Ci,"Text-To-Video with Edge Control"),Ci.forEach(o),La.forEach(o),ja=d(t),le=s(t,"P",{});var Oa=l(le);on=r(Oa,`To generate a video from prompt with additional pose control,
follow the steps described above for pose-guided generation using `),Qe=s(Oa,"A",{href:!0,rel:!0});var Ri=l(Qe);an=r(Ri,"Canny edge ControlNet model"),Ri.forEach(o),sn=r(Oa,"."),Oa.forEach(o),Ua=d(t),F=s(t,"H3",{class:!0});var Ka=l(F);ne=s(Ka,"A",{id:!0,class:!0,href:!0});var Xi=l(ne);Go=s(Xi,"SPAN",{});var $i=l(Go);m(ze.$$.fragment,$i),$i.forEach(o),Xi.forEach(o),ln=d(Ka),Co=s(Ka,"SPAN",{});var Pi=l(Co);nn=r(Pi,"Video Instruct-Pix2Pix"),Pi.forEach(o),Ka.forEach(o),ka=d(t),re=s(t,"P",{});var es=l(re);rn=r(es,"To perform text-guided video editing (with "),Et=s(es,"A",{href:!0});var Si=l(Et);pn=r(Si,"InstructPix2Pix"),Si.forEach(o),dn=r(es,"):"),es.forEach(o),Ia=d(t),E=s(t,"OL",{});var $t=l(E);De=s($t,"LI",{});var ts=l(De);Ro=s(ts,"P",{});var Qi=l(Ro);cn=r(Qi,"Download a demo video"),Qi.forEach(o),hn=d(ts),m(Ye.$$.fragment,ts),ts.forEach(o),fn=d($t),Fe=s($t,"LI",{});var os=l(Fe);Xo=s(os,"P",{});var zi=l(Xo);mn=r(zi,"Read video from path"),zi.forEach(o),un=d(os),m(Ae.$$.fragment,os),os.forEach(o),yn=d($t),He=s($t,"LI",{});var as=l(He);qe=s(as,"P",{});var ss=l(qe);_n=r(ss,"Run "),$o=s(ss,"CODE",{});var Di=l($o);vn=r(Di,"StableDiffusionInstructPix2PixPipeline"),Di.forEach(o),gn=r(ss," with our custom attention processor"),ss.forEach(o),bn=d(as),m(Le.$$.fragment,as),as.forEach(o),$t.forEach(o),Ea=d(t),A=s(t,"H3",{class:!0});var ls=l(A);ie=s(ls,"A",{id:!0,class:!0,href:!0});var Yi=l(ie);Po=s(Yi,"SPAN",{});var Fi=l(Po);m(Oe.$$.fragment,Fi),Fi.forEach(o),Yi.forEach(o),wn=d(ls),So=s(ls,"SPAN",{});var Ai=l(So);Tn=r(Ai,"DreamBooth specialization"),Ai.forEach(o),ls.forEach(o),Wa=d(t),g=s(t,"P",{});var w=l(g);Jn=r(w,"Methods "),Qo=s(w,"STRONG",{});var Hi=l(Qo);Mn=r(Hi,"Text-To-Video"),Hi.forEach(o),Zn=r(w,", "),zo=s(w,"STRONG",{});var qi=l(zo);xn=r(qi,"Text-To-Video with Pose Control"),qi.forEach(o),jn=r(w," and "),Do=s(w,"STRONG",{});var Li=l(Do);Un=r(Li,"Text-To-Video with Edge Control"),Li.forEach(o),kn=r(w,`
can run with custom `),Wt=s(w,"A",{href:!0});var Oi=l(Wt);In=r(Oi,"DreamBooth"),Oi.forEach(o),En=r(w,` models, as shown below for
`),Ke=s(w,"A",{href:!0,rel:!0});var Ki=l(Ke);Wn=r(Ki,"Canny edge ControlNet model"),Ki.forEach(o),Bn=r(w,` and
`),et=s(w,"A",{href:!0,rel:!0});var ep=l(et);Vn=r(ep,"Avatar style DreamBooth"),ep.forEach(o),Nn=r(w," model"),w.forEach(o),Ba=d(t),W=s(t,"OL",{});var Pt=l(W);tt=s(Pt,"LI",{});var ns=l(tt);Yo=s(ns,"P",{});var tp=l(Yo);Gn=r(tp,"Download a demo video"),tp.forEach(o),Cn=d(ns),m(ot.$$.fragment,ns),ns.forEach(o),Rn=d(Pt),at=s(Pt,"LI",{});var rs=l(at);Fo=s(rs,"P",{});var op=l(Fo);Xn=r(op,"Read video from path"),op.forEach(o),$n=d(rs),m(st.$$.fragment,rs),rs.forEach(o),Pn=d(Pt),lt=s(Pt,"LI",{});var is=l(lt);nt=s(is,"P",{});var ps=l(nt);Sn=r(ps,"Run "),Ao=s(ps,"CODE",{});var ap=l(Ao);Qn=r(ap,"StableDiffusionControlNetPipeline"),ap.forEach(o),zn=r(ps," with custom trained DreamBooth model"),ps.forEach(o),Dn=d(is),m(rt.$$.fragment,is),is.forEach(o),Pt.forEach(o),Va=d(t),pe=s(t,"P",{});var ds=l(pe);Yn=r(ds,"You can filter out some available DreamBooth-trained models with "),it=s(ds,"A",{href:!0,rel:!0});var sp=l(it);Fn=r(sp,"this link"),sp.forEach(o),An=r(ds,"."),ds.forEach(o),Na=d(t),H=s(t,"H2",{class:!0});var cs=l(H);de=s(cs,"A",{id:!0,class:!0,href:!0});var lp=l(de);Ho=s(lp,"SPAN",{});var np=l(Ho);m(pt.$$.fragment,np),np.forEach(o),lp.forEach(o),Hn=d(cs),qo=s(cs,"SPAN",{});var rp=l(qo);qn=r(rp,"TextToVideoZeroPipeline"),rp.forEach(o),cs.forEach(o),Ga=d(t),b=s(t,"DIV",{class:!0});var J=l(b);m(dt.$$.fragment,J),Ln=d(J),Lo=s(J,"P",{});var ip=l(Lo);On=r(ip,"Pipeline for zero-shot text-to-video generation using Stable Diffusion."),ip.forEach(o),Kn=d(J),ct=s(J,"P",{});var hs=l(ct);er=r(hs,"This model inherits from "),Bt=s(hs,"A",{href:!0});var pp=l(Bt);tr=r(pp,"StableDiffusionPipeline"),pp.forEach(o),or=r(hs,`. Check the superclass documentation for the generic methods
the library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),hs.forEach(o),ar=d(J),ce=s(J,"DIV",{class:!0});var fs=l(ce);m(ht.$$.fragment,fs),sr=d(fs),Oo=s(fs,"P",{});var dp=l(Oo);lr=r(dp,"Function invoked when calling the pipeline for generation."),dp.forEach(o),fs.forEach(o),nr=d(J),he=s(J,"DIV",{class:!0});var ms=l(he);m(ft.$$.fragment,ms),rr=d(ms),Ko=s(ms,"P",{});var cp=l(Ko);ir=r(cp,"Perform backward process given list of time steps"),cp.forEach(o),ms.forEach(o),pr=d(J),fe=s(J,"DIV",{class:!0});var us=l(fe);m(mt.$$.fragment,us),dr=d(us),ea=s(us,"P",{});var hp=l(ea);cr=r(hp,"Perform ddpm forward process from time t0 to t1. This is the same as adding noise with corresponding variance."),hp.forEach(o),us.forEach(o),J.forEach(o),this.h()},h(){i(N,"name","hf:doc:metadata"),i(N,"content",JSON.stringify(wp)),i(q,"id","zeroshot-texttovideo-generation"),i(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"),i(q,"href","#zeroshot-texttovideo-generation"),i(G,"class","relative group"),i(L,"id","overview"),i(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"),i(L,"href","#overview"),i(C,"class","relative group"),i(ve,"href","https://arxiv.org/abs/2303.13439"),i(ve,"rel","nofollow"),i(ge,"href","https://www.ece.utexas.edu/people/faculty/atlas-wang"),i(ge,"rel","nofollow"),i(be,"href","https://www.humphreyshi.com"),i(be,"rel","nofollow"),_p(gt.src,mr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/t2v_zero_teaser.png")||i(gt,"src",mr),i(gt,"alt","teaser-img"),i(we,"href","https://text2video-zero.github.io/"),i(we,"rel","nofollow"),i(Te,"href","https://arxiv.org/abs/2303.13439"),i(Te,"rel","nofollow"),i(Je,"href","https://github.com/Picsart-AI-Research/Text2Video-Zero"),i(Je,"rel","nofollow"),i(O,"id","available-pipelines"),i(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"),i(O,"href","#available-pipelines"),i(R,"class","relative group"),i(Jt,"align","center"),i(Ze,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py"),i(Ze,"rel","nofollow"),i(xe,"href","https://huggingface.co/spaces/PAIR/Text2Video-Zero"),i(xe,"rel","nofollow"),i(Mt,"align","center"),i(ee,"id","usage-example"),i(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"),i(ee,"href","#usage-example"),i(P,"class","relative group"),i(te,"id","texttovideo"),i(te,"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"),i(te,"href","#texttovideo"),i(S,"class","relative group"),i(Ie,"href","https://arxiv.org/abs/2303.13439"),i(Ie,"rel","nofollow"),i(Ee,"href","https://arxiv.org/abs/2303.13439"),i(Ee,"rel","nofollow"),i(ae,"id","texttovideo-with-pose-control"),i(ae,"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"),i(ae,"href","#texttovideo-with-pose-control"),i(Q,"class","relative group"),i(It,"href","./stable_diffusion/controlnet"),i(z,"start","2"),i(se,"id","texttovideo-with-edge-control"),i(se,"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"),i(se,"href","#texttovideo-with-edge-control"),i(Y,"class","relative group"),i(Qe,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),i(Qe,"rel","nofollow"),i(ne,"id","video-instructpix2pix"),i(ne,"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"),i(ne,"href","#video-instructpix2pix"),i(F,"class","relative group"),i(Et,"href","./stable_diffusion/pix2pix"),i(ie,"id","dreambooth-specialization"),i(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"),i(ie,"href","#dreambooth-specialization"),i(A,"class","relative group"),i(Wt,"href","../training/dreambooth"),i(Ke,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),i(Ke,"rel","nofollow"),i(et,"href","https://huggingface.co/PAIR/text2video-zero-controlnet-canny-avatar"),i(et,"rel","nofollow"),i(it,"href","https://huggingface.co/models?search=dreambooth"),i(it,"rel","nofollow"),i(de,"id","diffusers.TextToVideoZeroPipeline"),i(de,"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"),i(de,"href","#diffusers.TextToVideoZeroPipeline"),i(H,"class","relative group"),i(Bt,"href","/docs/diffusers/v0.18.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),i(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,c){e(document.head,N),h(t,oa,c),h(t,G,c),e(G,q),e(q,St),u(ye,St,null),e(G,_s),e(G,Qt),e(Qt,vs),h(t,aa,c),h(t,C,c),e(C,L),e(L,zt),u(_e,zt,null),e(C,gs),e(C,Dt),e(Dt,bs),h(t,sa,c),h(t,M,c),e(M,ve),e(ve,ws),e(M,Ts),e(M,ge),e(ge,Js),e(M,Ms),e(M,be),e(be,Zs),e(M,xs),h(t,la,c),h(t,yt,c),e(yt,js),h(t,na,c),h(t,U,c),e(U,Yt),e(Yt,Us),e(U,ks),e(U,Ft),e(Ft,Is),e(U,Es),e(U,At),e(At,Ws),h(t,ra,c),h(t,_t,c),e(_t,Bs),h(t,ia,c),h(t,vt,c),e(vt,gt),h(t,pa,c),h(t,bt,c),e(bt,Vs),h(t,da,c),h(t,wt,c),e(wt,Ht),e(Ht,Ns),h(t,ca,c),h(t,Tt,c),e(Tt,Gs),h(t,ha,c),h(t,k,c),e(k,qt),e(qt,we),e(we,Cs),e(k,Rs),e(k,Lt),e(Lt,Te),e(Te,Xs),e(k,$s),e(k,Ot),e(Ot,Je),e(Je,Ps),h(t,fa,c),h(t,R,c),e(R,O),e(O,Kt),u(Me,Kt,null),e(R,Ss),e(R,eo),e(eo,Qs),h(t,ma,c),h(t,K,c),e(K,to),e(to,X),e(X,oo),e(oo,zs),e(X,Ds),e(X,ao),e(ao,Ys),e(X,Fs),e(X,Jt),e(Jt,As),e(K,Hs),e(K,so),e(so,$),e($,lo),e(lo,Ze),e(Ze,qs),e($,Ls),e($,no),e(no,ro),e(ro,Os),e($,Ks),e($,Mt),e(Mt,xe),e(xe,el),h(t,ua,c),h(t,P,c),e(P,ee),e(ee,io),u(je,io,null),e(P,tl),e(P,po),e(po,ol),h(t,ya,c),h(t,S,c),e(S,te),e(te,co),u(Ue,co,null),e(S,al),e(S,ho),e(ho,sl),h(t,_a,c),h(t,Zt,c),e(Zt,ll),h(t,va,c),u(ke,t,c),h(t,ga,c),h(t,xt,c),e(xt,nl),h(t,ba,c),h(t,I,c),e(I,oe),e(oe,rl),e(oe,Ie),e(Ie,il),e(oe,pl),e(oe,fo),e(fo,Z),e(Z,mo),e(mo,dl),e(Z,cl),e(Z,uo),e(uo,hl),e(Z,fl),e(Z,yo),e(yo,ml),e(Z,ul),e(Z,_o),e(_o,yl),e(I,_l),e(I,x),e(x,vo),e(vo,vl),e(x,gl),e(x,go),e(go,bl),e(x,wl),e(x,Ee),e(Ee,Tl),e(x,Jl),e(x,bo),e(bo,T),e(T,wo),e(wo,Ml),e(T,Zl),e(T,To),e(To,xl),e(T,jl),e(T,Jo),e(Jo,Ul),e(T,kl),e(T,Mo),e(Mo,Il),e(T,El),e(T,Zo),e(Zo,Wl),e(I,Bl),e(I,jt),e(jt,Vl),e(jt,xo),e(xo,We),e(We,jo),e(jo,Nl),e(We,Gl),e(We,Uo),e(Uo,Cl),h(t,wa,c),h(t,Ut,c),e(Ut,Rl),h(t,Ta,c),u(Be,t,c),h(t,Ja,c),h(t,Q,c),e(Q,ae),e(ae,ko),u(Ve,ko,null),e(Q,Xl),e(Q,Io),e(Io,$l),h(t,Ma,c),h(t,kt,c),e(kt,Ne),e(Ne,Eo),e(Eo,Pl),e(Ne,Sl),u(Ge,Ne,null),h(t,Za,c),h(t,z,c),e(z,D),e(D,Wo),e(Wo,Ql),e(D,zl),u(Ce,D,null),e(D,Dl),e(D,Re),e(Re,Yl),e(Re,It),e(It,Fl),e(Re,Al),e(z,Hl),e(z,Xe),e(Xe,$e),e($e,ql),e($e,Bo),e(Bo,Ll),e($e,Ol),e(Xe,Kl),u(Pe,Xe,null),h(t,xa,c),h(t,Y,c),e(Y,se),e(se,Vo),u(Se,Vo,null),e(Y,en),e(Y,No),e(No,tn),h(t,ja,c),h(t,le,c),e(le,on),e(le,Qe),e(Qe,an),e(le,sn),h(t,Ua,c),h(t,F,c),e(F,ne),e(ne,Go),u(ze,Go,null),e(F,ln),e(F,Co),e(Co,nn),h(t,ka,c),h(t,re,c),e(re,rn),e(re,Et),e(Et,pn),e(re,dn),h(t,Ia,c),h(t,E,c),e(E,De),e(De,Ro),e(Ro,cn),e(De,hn),u(Ye,De,null),e(E,fn),e(E,Fe),e(Fe,Xo),e(Xo,mn),e(Fe,un),u(Ae,Fe,null),e(E,yn),e(E,He),e(He,qe),e(qe,_n),e(qe,$o),e($o,vn),e(qe,gn),e(He,bn),u(Le,He,null),h(t,Ea,c),h(t,A,c),e(A,ie),e(ie,Po),u(Oe,Po,null),e(A,wn),e(A,So),e(So,Tn),h(t,Wa,c),h(t,g,c),e(g,Jn),e(g,Qo),e(Qo,Mn),e(g,Zn),e(g,zo),e(zo,xn),e(g,jn),e(g,Do),e(Do,Un),e(g,kn),e(g,Wt),e(Wt,In),e(g,En),e(g,Ke),e(Ke,Wn),e(g,Bn),e(g,et),e(et,Vn),e(g,Nn),h(t,Ba,c),h(t,W,c),e(W,tt),e(tt,Yo),e(Yo,Gn),e(tt,Cn),u(ot,tt,null),e(W,Rn),e(W,at),e(at,Fo),e(Fo,Xn),e(at,$n),u(st,at,null),e(W,Pn),e(W,lt),e(lt,nt),e(nt,Sn),e(nt,Ao),e(Ao,Qn),e(nt,zn),e(lt,Dn),u(rt,lt,null),h(t,Va,c),h(t,pe,c),e(pe,Yn),e(pe,it),e(it,Fn),e(pe,An),h(t,Na,c),h(t,H,c),e(H,de),e(de,Ho),u(pt,Ho,null),e(H,Hn),e(H,qo),e(qo,qn),h(t,Ga,c),h(t,b,c),u(dt,b,null),e(b,Ln),e(b,Lo),e(Lo,On),e(b,Kn),e(b,ct),e(ct,er),e(ct,Bt),e(Bt,tr),e(ct,or),e(b,ar),e(b,ce),u(ht,ce,null),e(ce,sr),e(ce,Oo),e(Oo,lr),e(b,nr),e(b,he),u(ft,he,null),e(he,rr),e(he,Ko),e(Ko,ir),e(b,pr),e(b,fe),u(mt,fe,null),e(fe,dr),e(fe,ea),e(ea,cr),Ca=!0},p:vp,i(t){Ca||(y(ye.$$.fragment,t),y(_e.$$.fragment,t),y(Me.$$.fragment,t),y(je.$$.fragment,t),y(Ue.$$.fragment,t),y(ke.$$.fragment,t),y(Be.$$.fragment,t),y(Ve.$$.fragment,t),y(Ge.$$.fragment,t),y(Ce.$$.fragment,t),y(Pe.$$.fragment,t),y(Se.$$.fragment,t),y(ze.$$.fragment,t),y(Ye.$$.fragment,t),y(Ae.$$.fragment,t),y(Le.$$.fragment,t),y(Oe.$$.fragment,t),y(ot.$$.fragment,t),y(st.$$.fragment,t),y(rt.$$.fragment,t),y(pt.$$.fragment,t),y(dt.$$.fragment,t),y(ht.$$.fragment,t),y(ft.$$.fragment,t),y(mt.$$.fragment,t),Ca=!0)},o(t){_(ye.$$.fragment,t),_(_e.$$.fragment,t),_(Me.$$.fragment,t),_(je.$$.fragment,t),_(Ue.$$.fragment,t),_(ke.$$.fragment,t),_(Be.$$.fragment,t),_(Ve.$$.fragment,t),_(Ge.$$.fragment,t),_(Ce.$$.fragment,t),_(Pe.$$.fragment,t),_(Se.$$.fragment,t),_(ze.$$.fragment,t),_(Ye.$$.fragment,t),_(Ae.$$.fragment,t),_(Le.$$.fragment,t),_(Oe.$$.fragment,t),_(ot.$$.fragment,t),_(st.$$.fragment,t),_(rt.$$.fragment,t),_(pt.$$.fragment,t),_(dt.$$.fragment,t),_(ht.$$.fragment,t),_(ft.$$.fragment,t),_(mt.$$.fragment,t),Ca=!1},d(t){o(N),t&&o(oa),t&&o(G),v(ye),t&&o(aa),t&&o(C),v(_e),t&&o(sa),t&&o(M),t&&o(la),t&&o(yt),t&&o(na),t&&o(U),t&&o(ra),t&&o(_t),t&&o(ia),t&&o(vt),t&&o(pa),t&&o(bt),t&&o(da),t&&o(wt),t&&o(ca),t&&o(Tt),t&&o(ha),t&&o(k),t&&o(fa),t&&o(R),v(Me),t&&o(ma),t&&o(K),t&&o(ua),t&&o(P),v(je),t&&o(ya),t&&o(S),v(Ue),t&&o(_a),t&&o(Zt),t&&o(va),v(ke,t),t&&o(ga),t&&o(xt),t&&o(ba),t&&o(I),t&&o(wa),t&&o(Ut),t&&o(Ta),v(Be,t),t&&o(Ja),t&&o(Q),v(Ve),t&&o(Ma),t&&o(kt),v(Ge),t&&o(Za),t&&o(z),v(Ce),v(Pe),t&&o(xa),t&&o(Y),v(Se),t&&o(ja),t&&o(le),t&&o(Ua),t&&o(F),v(ze),t&&o(ka),t&&o(re),t&&o(Ia),t&&o(E),v(Ye),v(Ae),v(Le),t&&o(Ea),t&&o(A),v(Oe),t&&o(Wa),t&&o(g),t&&o(Ba),t&&o(W),v(ot),v(st),v(rt),t&&o(Va),t&&o(pe),t&&o(Na),t&&o(H),v(pt),t&&o(Ga),t&&o(b),v(dt),v(ht),v(ft),v(mt)}}}const wp={local:"zeroshot-texttovideo-generation",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"usage-example",sections:[{local:"texttovideo",title:"Text-To-Video"},{local:"texttovideo-with-pose-control",title:"Text-To-Video with Pose Control"},{local:"texttovideo-with-edge-control",title:"Text-To-Video with Edge Control"},{local:"video-instructpix2pix",title:"Video Instruct-Pix2Pix"},{local:"dreambooth-specialization",title:"DreamBooth specialization "}],title:"Usage example"},{local:"diffusers.TextToVideoZeroPipeline",title:"TextToVideoZeroPipeline"}],title:"Zero-Shot Text-to-Video Generation "};function Tp(fr){return gp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jp extends fp{constructor(N){super();mp(this,N,Tp,bp,up,{})}}export{jp as default,wp as metadata};
