import{S as ui,i as _i,s as yi,e as s,k as d,w as m,t as l,M as gi,c as n,d as o,m as c,a,x as f,h as r,b as i,N as vi,G as t,g as h,y as u,L as bi,q as _,o as y,B as g,v as wi}from"../../../chunks/vendor-hf-doc-builder.js";import{D as Bo}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as U}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as F}from"../../../chunks/IconCopyLink-hf-doc-builder.js";function Ti(Vl){let B,No,N,A,Wt,me,Ys,Vt,Fs,Go,Z,fe,As,Hs,ue,Ls,qs,_e,Os,Ks,Co,ct,en,Ro,I,Et,tn,on,Bt,sn,nn,Nt,an,Xo,ht,ln,Po,mt,ft,El,$o,ut,rn,So,_t,Gt,pn,zo,J,dn,ye,cn,hn,ge,mn,fn,ve,un,_n,Qo,G,H,Ct,be,yn,Rt,gn,Do,C,L,Xt,we,vn,Pt,bn,Yo,yt,wn,Fo,Te,Ao,gt,Tn,Ho,k,q,Jn,Je,Mn,Zn,$t,x,St,xn,jn,zt,Un,In,Qt,kn,Wn,Dt,Vn,En,j,Yt,Bn,Nn,Ft,Gn,Cn,Me,Rn,Xn,At,T,Ht,Pn,$n,Lt,Sn,zn,qt,Qn,Dn,Ot,Yn,Fn,Kt,An,Hn,vt,Ln,eo,Ze,to,qn,On,oo,Kn,Lo,bt,ea,qo,xe,Oo,R,O,so,je,ta,no,oa,Ko,wt,Ue,ao,sa,na,Ie,es,X,P,lo,aa,la,ke,ra,We,ia,Tt,pa,da,ca,Ve,Ee,ha,ro,ma,fa,ua,Be,ts,$,K,io,Ne,_a,po,ya,os,ee,ga,Ge,va,ba,ss,S,te,co,Ce,wa,ho,Ta,ns,oe,Ja,Jt,Ma,Za,as,W,Re,mo,xa,ja,Xe,Ua,Pe,fo,Ia,ka,$e,Wa,Se,ze,Va,uo,Ea,Ba,Na,Qe,ls,z,se,_o,De,Ga,yo,Ca,rs,v,Ra,go,Xa,Pa,vo,$a,Sa,bo,za,Qa,Mt,Da,Ya,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word">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>)`}}),xe=new U({props:{code:"aW1wb3J0JTIwdG9yY2glMEFpbXBvcnQlMjBpbWFnZWlvJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFRleHRUb1ZpZGVvWmVyb1BpcGVsaW5lJTBBaW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXBpcGUlMjAlM0QlMjBUZXh0VG9WaWRlb1plcm9QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIpJTBBc2VlZCUyMCUzRCUyMDAlMEF2aWRlb19sZW5ndGglMjAlM0QlMjA4JTBBY2h1bmtfc2l6ZSUyMCUzRCUyMDQlMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwcGFuZGElMjBpcyUyMHBsYXlpbmclMjBndWl0YXIlMjBvbiUyMHRpbWVzJTIwc3F1YXJlJTIyJTBBJTBBJTIzJTIwR2VuZXJhdGUlMjB0aGUlMjB2aWRlbyUyMGNodW5rLWJ5LWNodW5rJTBBcmVzdWx0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9tcHQlMkMlMjB2aWRlb19sZW5ndGglM0RsZW4oZnJhbWVfaWRzKSUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvciUyQyUyMGZyYW1lX2lkcyUzRGZyYW1lX2lkcyklMEElMjAlMjAlMjAlMjByZXN1bHQuYXBwZW5kKG91dHB1dC5pbWFnZXMlNUIxJTNBJTVEKSUwQSUwQSUyMyUyMENvbmNhdGVuYXRlJTIwY2h1bmtzJTIwYW5kJTIwc2F2ZSUwQXJlc3VsdCUyMCUzRCUyMG5wLmNvbmNhdGVuYXRlKHJlc3VsdCklMEFyZXN1bHQlMjAlM0QlMjAlNUIociUyMColMjAyNTUpLmFzdHlwZSglMjJ1aW50OCUyMiklMjBmb3IlMjByJTIwaW4lMjByZXN1bHQlNUQlMEFpbWFnZWlvLm1pbXNhdmUoJTIydmlkZW8ubXA0JTIyJTJDJTIwcmVzdWx0JTJDJTIwZnBzJTNENCk=",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>)`}}),je=new F({}),Ie=new U({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)`}}),ke=new U({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)]`}}),Be=new U({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbE5ldFBpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMudGV4dF90b192aWRlb19zeW50aGVzaXMucGlwZWxpbmVfdGV4dF90b192aWRlb196ZXJvJTIwaW1wb3J0JTIwQ3J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NEJTIwJTIyRGFydGglMjBWYWRlciUyMGRhbmNpbmclMjBpbiUyMGElMjBkZXNlcnQlMjIlMEFyZXN1bHQlMjAlM0QlMjBwaXBlKHByb21wdCUzRCU1QnByb21wdCU1RCUyMColMjBsZW4ocG9zZV9pbWFnZXMpJTJDJTIwaW1hZ2UlM0Rwb3NlX2ltYWdlcyUyQyUyMGxhdGVudHMlM0RsYXRlbnRzKS5pbWFnZXMlMEFpbWFnZWlvLm1pbXNhdmUoJTIydmlkZW8ubXA0JTIyJTJDJTIwcmVzdWx0JTJDJTIwZnBzJTNENCk=",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>)`}}),Ne=new F({}),Ce=new F({}),Xe=new U({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)`}}),$e=new U({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)]`}}),Qe=new U({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>)`}}),De=new F({}),He=new U({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)`}}),qe=new U({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)]`}}),et=new U({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQ29udHJvbE5ldFBpcGVsaW5lJTJDJTIwQ29udHJvbE5ldE1vZGVsJTBBZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMudGV4dF90b192aWRlb19zeW50aGVzaXMucGlwZWxpbmVfdGV4dF90b192aWRlb196ZXJvJTIwaW1wb3J0JTIwQ3Jvc3NGcmFtZUF0dG5Qcm9jZXNzb3IlMEElMEElMjMlMjBzZXQlMjBtb2RlbCUyMGlkJTIwdG8lMjBjdXN0b20lMjBtb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BhaW50aW5nJTIwb2YlMjBhJTIwYmVhdXRpZnVsJTIwZ2lybCUyMGF2YXRhciUyMHN0eWxlJTIyJTBBcmVzdWx0JTIwJTNEJTIwcGlwZShwcm9tcHQlM0QlNUJwcm9tcHQlNUQlMjAqJTIwbGVuKGNhbm55X2VkZ2VzKSUyQyUyMGltYWdlJTNEY2FubnlfZWRnZXMlMkMlMjBsYXRlbnRzJTNEbGF0ZW50cykuaW1hZ2VzJTBBaW1hZ2Vpby5taW1zYXZlKCUyMnZpZGVvLm1wNCUyMiUyQyUyMHJlc3VsdCUyQyUyMGZwcyUzRDQp",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>)`}}),ot=new F({}),st=new Bo({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.19.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 (<a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a>).`,name:"text_encoder"},{anchor:"diffusers.TextToVideoZeroPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
A <a href="https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a> to tokenize text.`,name:"tokenizer"},{anchor:"diffusers.TextToVideoZeroPipeline.unet",description:`<strong>unet</strong> (<a href="/docs/diffusers/v0.19.0/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014;
A <a href="/docs/diffusers/v0.19.0/en/api/models/unet3d-cond#diffusers.UNet3DConditionModel">UNet3DConditionModel</a> to denoise the encoded video latents.`,name:"unet"},{anchor:"diffusers.TextToVideoZeroPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/v0.19.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.19.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/v0.19.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/v0.19.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 more details
about a model&#x2019;s potential harms.`,name:"safety_checker"},{anchor:"diffusers.TextToVideoZeroPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPImageProcessor</code>) &#x2014;
A <code>CLIPImageProcessor</code> to extract features from generated images; used as inputs to the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L274"}}),at=new Bo({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 image generation. If not defined, you need to pass <code>prompt_embeds</code>.`,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 <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#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 <code>self.unet.config.sample_size * self.vae_scale_factor</code>) &#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;
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.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 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.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;) from the <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">DDIM</a> paper. Only applies
to the <a href="/docs/diffusers/v0.19.0/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, and is ignored in other schedulers.`,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;
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.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 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>.`,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 video. 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.19.0/en/api/pipelines/text_to_video_zero#diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput">TextToVideoPipelineOutput</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 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.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 is called. If not specified, the callback is 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.19.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L420",returnDescription:`
<p>The output contains a <code>ndarray</code> of the generated video, when <code>output_type</code> != <code>"latent"</code>, otherwise a
latent code of generated videos and a list of <code>bool</code>s indicating whether the corresponding generated
video contains \u201Cnot-safe-for-work\u201D (nsfw) content..</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.19.0/en/api/pipelines/text_to_video_zero#diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput"
>TextToVideoPipelineOutput</a></p>
`}}),lt=new Bo({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 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.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 is called. If not specified, the callback is called at
every step.
extra_step_kwargs &#x2014;
Extra_step_kwargs.
cross_attention_kwargs &#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/cross_attention.py" rel="nofollow"><code>self.processor</code></a>.
num_warmup_steps &#x2014;
number of warmup steps.`,name:"callback_steps"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L346",returnDescription:`
<p>Latents of backward process output at time timesteps[-1].</p>
`,returnType:`
<p>latents</p>
`}}),rt=new Bo({props:{name:"forward_loop",anchor:"diffusers.TextToVideoZeroPipeline.forward_loop",parameters:[{name:"x_t0",val:""},{name:"t0",val:""},{name:"t1",val:""},{name:"generator",val:""}],parametersDescription:[{anchor:"diffusers.TextToVideoZeroPipeline.forward_loop.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L322",returnDescription:`
<p>Forward process applied to x_t0 from time t0 to t1.</p>
`,returnType:`
<p>x_t1</p>
`}}),it=new F({}),pt=new Bo({props:{name:"class diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput",anchor:"diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"},{name:"nsfw_content_detected",val:": typing.Optional[typing.List[bool]]"}],parametersDescription:[{anchor:"diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput.images",description:`<strong>images</strong> (<code>[List[PIL.Image.Image]</code>, <code>np.ndarray</code>]) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or NumPy array of shape <code>(batch_size, height, width, num_channels)</code>.`,name:"images"},{anchor:"diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput.nsfw_content_detected",description:`<strong>nsfw_content_detected</strong> (<code>[List[bool]]</code>) &#x2014;
List indicating whether the corresponding generated image contains &#x201C;not-safe-for-work&#x201D; (nsfw) content or
<code>None</code> if safety checking could not be performed.`,name:"nsfw_content_detected"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py#L174"}}),{c(){B=s("meta"),No=d(),N=s("h1"),A=s("a"),Wt=s("span"),m(me.$$.fragment),Ys=d(),Vt=s("span"),Fs=l("Text2Video-Zero"),Go=d(),Z=s("p"),fe=s("a"),As=l("Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video Generators"),Hs=l(` is by
Levon Khachatryan,
Andranik Movsisyan,
Vahram Tadevosyan,
Roberto Henschel,
`),ue=s("a"),Ls=l("Zhangyang Wang"),qs=l(", Shant Navasardyan, "),_e=s("a"),Os=l("Humphrey Shi"),Ks=l("."),Co=d(),ct=s("p"),en=l("Text2Video-Zero enables zero-shot video generation using either:"),Ro=d(),I=s("ol"),Et=s("li"),tn=l("A textual prompt"),on=d(),Bt=s("li"),sn=l("A prompt combined with guidance from poses or edges"),nn=d(),Nt=s("li"),an=l("Video Instruct-Pix2Pix (instruction-guided video editing)"),Xo=d(),ht=s("p"),ln=l("Results are temporally consistent and closely follow the guidance and textual prompts."),Po=d(),mt=s("p"),ft=s("img"),$o=d(),ut=s("p"),rn=l("The abstract from the paper is:"),So=d(),_t=s("p"),Gt=s("em"),pn=l(`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.`),zo=d(),J=s("p"),dn=l("You can find additional information about Text-to-Video Zero on the "),ye=s("a"),cn=l("project page"),hn=l(", "),ge=s("a"),mn=l("paper"),fn=l(", and "),ve=s("a"),un=l("original codebase"),_n=l("."),Qo=d(),G=s("h2"),H=s("a"),Ct=s("span"),m(be.$$.fragment),yn=d(),Rt=s("span"),gn=l("Usage example"),Do=d(),C=s("h3"),L=s("a"),Xt=s("span"),m(we.$$.fragment),vn=d(),Pt=s("span"),bn=l("Text-To-Video"),Yo=d(),yt=s("p"),wn=l("To generate a video from prompt, run the following python command"),Fo=d(),m(Te.$$.fragment),Ao=d(),gt=s("p"),Tn=l("You can change these parameters in the pipeline call:"),Ho=d(),k=s("ul"),q=s("li"),Jn=l("Motion field strength (see the "),Je=s("a"),Mn=l("paper"),Zn=l(", Sect. 3.3.1):"),$t=s("ul"),x=s("li"),St=s("code"),xn=l("motion_field_strength_x"),jn=l(" and "),zt=s("code"),Un=l("motion_field_strength_y"),In=l(". Default: "),Qt=s("code"),kn=l("motion_field_strength_x=12"),Wn=l(", "),Dt=s("code"),Vn=l("motion_field_strength_y=12"),En=d(),j=s("li"),Yt=s("code"),Bn=l("T"),Nn=l(" and "),Ft=s("code"),Gn=l("T'"),Cn=l(" (see the "),Me=s("a"),Rn=l("paper"),Xn=l(", Sect. 3.3.1)"),At=s("ul"),T=s("li"),Ht=s("code"),Pn=l("t0"),$n=l(" and "),Lt=s("code"),Sn=l("t1"),zn=l(" in the range "),qt=s("code"),Qn=l("{0, ..., num_inference_steps}"),Dn=l(". Default: "),Ot=s("code"),Yn=l("t0=45"),Fn=l(", "),Kt=s("code"),An=l("t1=48"),Hn=d(),vt=s("li"),Ln=l("Video length:"),eo=s("ul"),Ze=s("li"),to=s("code"),qn=l("video_length"),On=l(", the number of frames video_length to be generated. Default: "),oo=s("code"),Kn=l("video_length=8"),Lo=d(),bt=s("p"),ea=l("We an also generate longer videos by doing the processing in a chunk-by-chunk manner:"),qo=d(),m(xe.$$.fragment),Oo=d(),R=s("h3"),O=s("a"),so=s("span"),m(je.$$.fragment),ta=d(),no=s("span"),oa=l("Text-To-Video with Pose Control"),Ko=l(`

To generate a video from prompt with additional pose control
`),wt=s("ol"),Ue=s("li"),ao=s("p"),sa=l("Download a demo video"),na=d(),m(Ie.$$.fragment),es=d(),X=s("ol"),P=s("li"),lo=s("p"),aa=l("Read video containing extracted pose images"),la=d(),m(ke.$$.fragment),ra=d(),We=s("p"),ia=l("To extract pose from actual video, read "),Tt=s("a"),pa=l("ControlNet documentation"),da=l("."),ca=d(),Ve=s("li"),Ee=s("p"),ha=l("Run "),ro=s("code"),ma=l("StableDiffusionControlNetPipeline"),fa=l(" with our custom attention processor"),ua=d(),m(Be.$$.fragment),ts=d(),$=s("h3"),K=s("a"),io=s("span"),m(Ne.$$.fragment),_a=d(),po=s("span"),ya=l("Text-To-Video with Edge Control"),os=d(),ee=s("p"),ga=l(`To generate a video from prompt with additional pose control,
follow the steps described above for pose-guided generation using `),Ge=s("a"),va=l("Canny edge ControlNet model"),ba=l("."),ss=d(),S=s("h3"),te=s("a"),co=s("span"),m(Ce.$$.fragment),wa=d(),ho=s("span"),Ta=l("Video Instruct-Pix2Pix"),ns=d(),oe=s("p"),Ja=l("To perform text-guided video editing (with "),Jt=s("a"),Ma=l("InstructPix2Pix"),Za=l("):"),as=d(),W=s("ol"),Re=s("li"),mo=s("p"),xa=l("Download a demo video"),ja=d(),m(Xe.$$.fragment),Ua=d(),Pe=s("li"),fo=s("p"),Ia=l("Read video from path"),ka=d(),m($e.$$.fragment),Wa=d(),Se=s("li"),ze=s("p"),Va=l("Run "),uo=s("code"),Ea=l("StableDiffusionInstructPix2PixPipeline"),Ba=l(" with our custom attention processor"),Na=d(),m(Qe.$$.fragment),ls=d(),z=s("h3"),se=s("a"),_o=s("span"),m(De.$$.fragment),Ga=d(),yo=s("span"),Ca=l("DreamBooth specialization"),rs=d(),v=s("p"),Ra=l("Methods "),go=s("strong"),Xa=l("Text-To-Video"),Pa=l(", "),vo=s("strong"),$a=l("Text-To-Video with Pose Control"),Sa=l(" and "),bo=s("strong"),za=l("Text-To-Video with Edge Control"),Qa=l(`
can run with custom `),Mt=s("a"),Da=l("DreamBooth"),Ya=l(` models, as shown below for
`),Ye=s("a"),Fa=l("Canny edge ControlNet model"),Aa=l(` and
`),Fe=s("a"),Ha=l("Avatar style DreamBooth"),La=l(" model"),is=d(),V=s("ol"),Ae=s("li"),wo=s("p"),qa=l("Download a demo video"),Oa=d(),m(He.$$.fragment),Ka=d(),Le=s("li"),To=s("p"),el=l("Read video from path"),tl=d(),m(qe.$$.fragment),ol=d(),Oe=s("li"),Ke=s("p"),sl=l("Run "),Jo=s("code"),nl=l("StableDiffusionControlNetPipeline"),al=l(" with custom trained DreamBooth model"),ll=d(),m(et.$$.fragment),ps=d(),ne=s("p"),rl=l("You can filter out some available DreamBooth-trained models with "),tt=s("a"),il=l("this link"),pl=l("."),ds=d(),Q=s("h2"),ae=s("a"),Mo=s("span"),m(ot.$$.fragment),dl=d(),Zo=s("span"),cl=l("TextToVideoZeroPipeline"),cs=d(),b=s("div"),m(st.$$.fragment),hl=d(),xo=s("p"),ml=l("Pipeline for zero-shot text-to-video generation using Stable Diffusion."),fl=d(),nt=s("p"),ul=l("This model inherits from "),Zt=s("a"),_l=l("DiffusionPipeline"),yl=l(`. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).`),gl=d(),le=s("div"),m(at.$$.fragment),vl=d(),jo=s("p"),bl=l("The call function to the pipeline for generation."),wl=d(),re=s("div"),m(lt.$$.fragment),Tl=d(),Uo=s("p"),Jl=l("Perform backward process given list of time steps."),Ml=d(),ie=s("div"),m(rt.$$.fragment),Zl=d(),Io=s("p"),xl=l("Perform DDPM forward process from time t0 to t1. This is the same as adding noise with corresponding variance."),hs=d(),D=s("h2"),pe=s("a"),ko=s("span"),m(it.$$.fragment),jl=d(),Wo=s("span"),Ul=l("TextToVideoPipelineOutput"),ms=d(),Y=s("div"),m(pt.$$.fragment),Il=d(),Vo=s("p"),kl=l("Output class for zero-shot text-to-video pipeline."),this.h()},l(e){const p=gi('[data-svelte="svelte-1phssyn"]',document.head);B=n(p,"META",{name:!0,content:!0}),p.forEach(o),No=c(e),N=n(e,"H1",{class:!0});var us=a(N);A=n(us,"A",{id:!0,class:!0,href:!0});var Bl=a(A);Wt=n(Bl,"SPAN",{});var Nl=a(Wt);f(me.$$.fragment,Nl),Nl.forEach(o),Bl.forEach(o),Ys=c(us),Vt=n(us,"SPAN",{});var Gl=a(Vt);Fs=r(Gl,"Text2Video-Zero"),Gl.forEach(o),us.forEach(o),Go=c(e),Z=n(e,"P",{});var dt=a(Z);fe=n(dt,"A",{href:!0,rel:!0});var Cl=a(fe);As=r(Cl,"Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video Generators"),Cl.forEach(o),Hs=r(dt,` is by
Levon Khachatryan,
Andranik Movsisyan,
Vahram Tadevosyan,
Roberto Henschel,
`),ue=n(dt,"A",{href:!0,rel:!0});var Rl=a(ue);Ls=r(Rl,"Zhangyang Wang"),Rl.forEach(o),qs=r(dt,", Shant Navasardyan, "),_e=n(dt,"A",{href:!0,rel:!0});var Xl=a(_e);Os=r(Xl,"Humphrey Shi"),Xl.forEach(o),Ks=r(dt,"."),dt.forEach(o),Co=c(e),ct=n(e,"P",{});var Pl=a(ct);en=r(Pl,"Text2Video-Zero enables zero-shot video generation using either:"),Pl.forEach(o),Ro=c(e),I=n(e,"OL",{});var xt=a(I);Et=n(xt,"LI",{});var $l=a(Et);tn=r($l,"A textual prompt"),$l.forEach(o),on=c(xt),Bt=n(xt,"LI",{});var Sl=a(Bt);sn=r(Sl,"A prompt combined with guidance from poses or edges"),Sl.forEach(o),nn=c(xt),Nt=n(xt,"LI",{});var zl=a(Nt);an=r(zl,"Video Instruct-Pix2Pix (instruction-guided video editing)"),zl.forEach(o),xt.forEach(o),Xo=c(e),ht=n(e,"P",{});var Ql=a(ht);ln=r(Ql,"Results are temporally consistent and closely follow the guidance and textual prompts."),Ql.forEach(o),Po=c(e),mt=n(e,"P",{});var Dl=a(mt);ft=n(Dl,"IMG",{src:!0,alt:!0}),Dl.forEach(o),$o=c(e),ut=n(e,"P",{});var Yl=a(ut);rn=r(Yl,"The abstract from the paper is:"),Yl.forEach(o),So=c(e),_t=n(e,"P",{});var Fl=a(_t);Gt=n(Fl,"EM",{});var Al=a(Gt);pn=r(Al,`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.`),Al.forEach(o),Fl.forEach(o),zo=c(e),J=n(e,"P",{});var de=a(J);dn=r(de,"You can find additional information about Text-to-Video Zero on the "),ye=n(de,"A",{href:!0,rel:!0});var Hl=a(ye);cn=r(Hl,"project page"),Hl.forEach(o),hn=r(de,", "),ge=n(de,"A",{href:!0,rel:!0});var Ll=a(ge);mn=r(Ll,"paper"),Ll.forEach(o),fn=r(de,", and "),ve=n(de,"A",{href:!0,rel:!0});var ql=a(ve);un=r(ql,"original codebase"),ql.forEach(o),_n=r(de,"."),de.forEach(o),Qo=c(e),G=n(e,"H2",{class:!0});var _s=a(G);H=n(_s,"A",{id:!0,class:!0,href:!0});var Ol=a(H);Ct=n(Ol,"SPAN",{});var Kl=a(Ct);f(be.$$.fragment,Kl),Kl.forEach(o),Ol.forEach(o),yn=c(_s),Rt=n(_s,"SPAN",{});var er=a(Rt);gn=r(er,"Usage example"),er.forEach(o),_s.forEach(o),Do=c(e),C=n(e,"H3",{class:!0});var ys=a(C);L=n(ys,"A",{id:!0,class:!0,href:!0});var tr=a(L);Xt=n(tr,"SPAN",{});var or=a(Xt);f(we.$$.fragment,or),or.forEach(o),tr.forEach(o),vn=c(ys),Pt=n(ys,"SPAN",{});var sr=a(Pt);bn=r(sr,"Text-To-Video"),sr.forEach(o),ys.forEach(o),Yo=c(e),yt=n(e,"P",{});var nr=a(yt);wn=r(nr,"To generate a video from prompt, run the following python command"),nr.forEach(o),Fo=c(e),f(Te.$$.fragment,e),Ao=c(e),gt=n(e,"P",{});var ar=a(gt);Tn=r(ar,"You can change these parameters in the pipeline call:"),ar.forEach(o),Ho=c(e),k=n(e,"UL",{});var jt=a(k);q=n(jt,"LI",{});var Eo=a(q);Jn=r(Eo,"Motion field strength (see the "),Je=n(Eo,"A",{href:!0,rel:!0});var lr=a(Je);Mn=r(lr,"paper"),lr.forEach(o),Zn=r(Eo,", Sect. 3.3.1):"),$t=n(Eo,"UL",{});var rr=a($t);x=n(rr,"LI",{});var ce=a(x);St=n(ce,"CODE",{});var ir=a(St);xn=r(ir,"motion_field_strength_x"),ir.forEach(o),jn=r(ce," and "),zt=n(ce,"CODE",{});var pr=a(zt);Un=r(pr,"motion_field_strength_y"),pr.forEach(o),In=r(ce,". Default: "),Qt=n(ce,"CODE",{});var dr=a(Qt);kn=r(dr,"motion_field_strength_x=12"),dr.forEach(o),Wn=r(ce,", "),Dt=n(ce,"CODE",{});var cr=a(Dt);Vn=r(cr,"motion_field_strength_y=12"),cr.forEach(o),ce.forEach(o),rr.forEach(o),Eo.forEach(o),En=c(jt),j=n(jt,"LI",{});var he=a(j);Yt=n(he,"CODE",{});var hr=a(Yt);Bn=r(hr,"T"),hr.forEach(o),Nn=r(he," and "),Ft=n(he,"CODE",{});var mr=a(Ft);Gn=r(mr,"T'"),mr.forEach(o),Cn=r(he," (see the "),Me=n(he,"A",{href:!0,rel:!0});var fr=a(Me);Rn=r(fr,"paper"),fr.forEach(o),Xn=r(he,", Sect. 3.3.1)"),At=n(he,"UL",{});var ur=a(At);T=n(ur,"LI",{});var E=a(T);Ht=n(E,"CODE",{});var _r=a(Ht);Pn=r(_r,"t0"),_r.forEach(o),$n=r(E," and "),Lt=n(E,"CODE",{});var yr=a(Lt);Sn=r(yr,"t1"),yr.forEach(o),zn=r(E," in the range "),qt=n(E,"CODE",{});var gr=a(qt);Qn=r(gr,"{0, ..., num_inference_steps}"),gr.forEach(o),Dn=r(E,". Default: "),Ot=n(E,"CODE",{});var vr=a(Ot);Yn=r(vr,"t0=45"),vr.forEach(o),Fn=r(E,", "),Kt=n(E,"CODE",{});var br=a(Kt);An=r(br,"t1=48"),br.forEach(o),E.forEach(o),ur.forEach(o),he.forEach(o),Hn=c(jt),vt=n(jt,"LI",{});var Wl=a(vt);Ln=r(Wl,"Video length:"),eo=n(Wl,"UL",{});var wr=a(eo);Ze=n(wr,"LI",{});var gs=a(Ze);to=n(gs,"CODE",{});var Tr=a(to);qn=r(Tr,"video_length"),Tr.forEach(o),On=r(gs,", the number of frames video_length to be generated. Default: "),oo=n(gs,"CODE",{});var Jr=a(oo);Kn=r(Jr,"video_length=8"),Jr.forEach(o),gs.forEach(o),wr.forEach(o),Wl.forEach(o),jt.forEach(o),Lo=c(e),bt=n(e,"P",{});var Mr=a(bt);ea=r(Mr,"We an also generate longer videos by doing the processing in a chunk-by-chunk manner:"),Mr.forEach(o),qo=c(e),f(xe.$$.fragment,e),Oo=c(e),R=n(e,"H3",{class:!0});var vs=a(R);O=n(vs,"A",{id:!0,class:!0,href:!0});var Zr=a(O);so=n(Zr,"SPAN",{});var xr=a(so);f(je.$$.fragment,xr),xr.forEach(o),Zr.forEach(o),ta=c(vs),no=n(vs,"SPAN",{});var jr=a(no);oa=r(jr,"Text-To-Video with Pose Control"),jr.forEach(o),vs.forEach(o),Ko=r(e,`

To generate a video from prompt with additional pose control
`),wt=n(e,"OL",{});var Ur=a(wt);Ue=n(Ur,"LI",{});var bs=a(Ue);ao=n(bs,"P",{});var Ir=a(ao);sa=r(Ir,"Download a demo video"),Ir.forEach(o),na=c(bs),f(Ie.$$.fragment,bs),bs.forEach(o),Ur.forEach(o),es=c(e),X=n(e,"OL",{start:!0});var ws=a(X);P=n(ws,"LI",{});var Ut=a(P);lo=n(Ut,"P",{});var kr=a(lo);aa=r(kr,"Read video containing extracted pose images"),kr.forEach(o),la=c(Ut),f(ke.$$.fragment,Ut),ra=c(Ut),We=n(Ut,"P",{});var Ts=a(We);ia=r(Ts,"To extract pose from actual video, read "),Tt=n(Ts,"A",{href:!0});var Wr=a(Tt);pa=r(Wr,"ControlNet documentation"),Wr.forEach(o),da=r(Ts,"."),Ts.forEach(o),Ut.forEach(o),ca=c(ws),Ve=n(ws,"LI",{});var Js=a(Ve);Ee=n(Js,"P",{});var Ms=a(Ee);ha=r(Ms,"Run "),ro=n(Ms,"CODE",{});var Vr=a(ro);ma=r(Vr,"StableDiffusionControlNetPipeline"),Vr.forEach(o),fa=r(Ms," with our custom attention processor"),Ms.forEach(o),ua=c(Js),f(Be.$$.fragment,Js),Js.forEach(o),ws.forEach(o),ts=c(e),$=n(e,"H3",{class:!0});var Zs=a($);K=n(Zs,"A",{id:!0,class:!0,href:!0});var Er=a(K);io=n(Er,"SPAN",{});var Br=a(io);f(Ne.$$.fragment,Br),Br.forEach(o),Er.forEach(o),_a=c(Zs),po=n(Zs,"SPAN",{});var Nr=a(po);ya=r(Nr,"Text-To-Video with Edge Control"),Nr.forEach(o),Zs.forEach(o),os=c(e),ee=n(e,"P",{});var xs=a(ee);ga=r(xs,`To generate a video from prompt with additional pose control,
follow the steps described above for pose-guided generation using `),Ge=n(xs,"A",{href:!0,rel:!0});var Gr=a(Ge);va=r(Gr,"Canny edge ControlNet model"),Gr.forEach(o),ba=r(xs,"."),xs.forEach(o),ss=c(e),S=n(e,"H3",{class:!0});var js=a(S);te=n(js,"A",{id:!0,class:!0,href:!0});var Cr=a(te);co=n(Cr,"SPAN",{});var Rr=a(co);f(Ce.$$.fragment,Rr),Rr.forEach(o),Cr.forEach(o),wa=c(js),ho=n(js,"SPAN",{});var Xr=a(ho);Ta=r(Xr,"Video Instruct-Pix2Pix"),Xr.forEach(o),js.forEach(o),ns=c(e),oe=n(e,"P",{});var Us=a(oe);Ja=r(Us,"To perform text-guided video editing (with "),Jt=n(Us,"A",{href:!0});var Pr=a(Jt);Ma=r(Pr,"InstructPix2Pix"),Pr.forEach(o),Za=r(Us,"):"),Us.forEach(o),as=c(e),W=n(e,"OL",{});var It=a(W);Re=n(It,"LI",{});var Is=a(Re);mo=n(Is,"P",{});var $r=a(mo);xa=r($r,"Download a demo video"),$r.forEach(o),ja=c(Is),f(Xe.$$.fragment,Is),Is.forEach(o),Ua=c(It),Pe=n(It,"LI",{});var ks=a(Pe);fo=n(ks,"P",{});var Sr=a(fo);Ia=r(Sr,"Read video from path"),Sr.forEach(o),ka=c(ks),f($e.$$.fragment,ks),ks.forEach(o),Wa=c(It),Se=n(It,"LI",{});var Ws=a(Se);ze=n(Ws,"P",{});var Vs=a(ze);Va=r(Vs,"Run "),uo=n(Vs,"CODE",{});var zr=a(uo);Ea=r(zr,"StableDiffusionInstructPix2PixPipeline"),zr.forEach(o),Ba=r(Vs," with our custom attention processor"),Vs.forEach(o),Na=c(Ws),f(Qe.$$.fragment,Ws),Ws.forEach(o),It.forEach(o),ls=c(e),z=n(e,"H3",{class:!0});var Es=a(z);se=n(Es,"A",{id:!0,class:!0,href:!0});var Qr=a(se);_o=n(Qr,"SPAN",{});var Dr=a(_o);f(De.$$.fragment,Dr),Dr.forEach(o),Qr.forEach(o),Ga=c(Es),yo=n(Es,"SPAN",{});var Yr=a(yo);Ca=r(Yr,"DreamBooth specialization"),Yr.forEach(o),Es.forEach(o),rs=c(e),v=n(e,"P",{});var w=a(v);Ra=r(w,"Methods "),go=n(w,"STRONG",{});var Fr=a(go);Xa=r(Fr,"Text-To-Video"),Fr.forEach(o),Pa=r(w,", "),vo=n(w,"STRONG",{});var Ar=a(vo);$a=r(Ar,"Text-To-Video with Pose Control"),Ar.forEach(o),Sa=r(w," and "),bo=n(w,"STRONG",{});var Hr=a(bo);za=r(Hr,"Text-To-Video with Edge Control"),Hr.forEach(o),Qa=r(w,`
can run with custom `),Mt=n(w,"A",{href:!0});var Lr=a(Mt);Da=r(Lr,"DreamBooth"),Lr.forEach(o),Ya=r(w,` models, as shown below for
`),Ye=n(w,"A",{href:!0,rel:!0});var qr=a(Ye);Fa=r(qr,"Canny edge ControlNet model"),qr.forEach(o),Aa=r(w,` and
`),Fe=n(w,"A",{href:!0,rel:!0});var Or=a(Fe);Ha=r(Or,"Avatar style DreamBooth"),Or.forEach(o),La=r(w," model"),w.forEach(o),is=c(e),V=n(e,"OL",{});var kt=a(V);Ae=n(kt,"LI",{});var Bs=a(Ae);wo=n(Bs,"P",{});var Kr=a(wo);qa=r(Kr,"Download a demo video"),Kr.forEach(o),Oa=c(Bs),f(He.$$.fragment,Bs),Bs.forEach(o),Ka=c(kt),Le=n(kt,"LI",{});var Ns=a(Le);To=n(Ns,"P",{});var ei=a(To);el=r(ei,"Read video from path"),ei.forEach(o),tl=c(Ns),f(qe.$$.fragment,Ns),Ns.forEach(o),ol=c(kt),Oe=n(kt,"LI",{});var Gs=a(Oe);Ke=n(Gs,"P",{});var Cs=a(Ke);sl=r(Cs,"Run "),Jo=n(Cs,"CODE",{});var ti=a(Jo);nl=r(ti,"StableDiffusionControlNetPipeline"),ti.forEach(o),al=r(Cs," with custom trained DreamBooth model"),Cs.forEach(o),ll=c(Gs),f(et.$$.fragment,Gs),Gs.forEach(o),kt.forEach(o),ps=c(e),ne=n(e,"P",{});var Rs=a(ne);rl=r(Rs,"You can filter out some available DreamBooth-trained models with "),tt=n(Rs,"A",{href:!0,rel:!0});var oi=a(tt);il=r(oi,"this link"),oi.forEach(o),pl=r(Rs,"."),Rs.forEach(o),ds=c(e),Q=n(e,"H2",{class:!0});var Xs=a(Q);ae=n(Xs,"A",{id:!0,class:!0,href:!0});var si=a(ae);Mo=n(si,"SPAN",{});var ni=a(Mo);f(ot.$$.fragment,ni),ni.forEach(o),si.forEach(o),dl=c(Xs),Zo=n(Xs,"SPAN",{});var ai=a(Zo);cl=r(ai,"TextToVideoZeroPipeline"),ai.forEach(o),Xs.forEach(o),cs=c(e),b=n(e,"DIV",{class:!0});var M=a(b);f(st.$$.fragment,M),hl=c(M),xo=n(M,"P",{});var li=a(xo);ml=r(li,"Pipeline for zero-shot text-to-video generation using Stable Diffusion."),li.forEach(o),fl=c(M),nt=n(M,"P",{});var Ps=a(nt);ul=r(Ps,"This model inherits from "),Zt=n(Ps,"A",{href:!0});var ri=a(Zt);_l=r(ri,"DiffusionPipeline"),ri.forEach(o),yl=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),gl=c(M),le=n(M,"DIV",{class:!0});var $s=a(le);f(at.$$.fragment,$s),vl=c($s),jo=n($s,"P",{});var ii=a(jo);bl=r(ii,"The call function to the pipeline for generation."),ii.forEach(o),$s.forEach(o),wl=c(M),re=n(M,"DIV",{class:!0});var Ss=a(re);f(lt.$$.fragment,Ss),Tl=c(Ss),Uo=n(Ss,"P",{});var pi=a(Uo);Jl=r(pi,"Perform backward process given list of time steps."),pi.forEach(o),Ss.forEach(o),Ml=c(M),ie=n(M,"DIV",{class:!0});var zs=a(ie);f(rt.$$.fragment,zs),Zl=c(zs),Io=n(zs,"P",{});var di=a(Io);xl=r(di,"Perform DDPM forward process from time t0 to t1. This is the same as adding noise with corresponding variance."),di.forEach(o),zs.forEach(o),M.forEach(o),hs=c(e),D=n(e,"H2",{class:!0});var Qs=a(D);pe=n(Qs,"A",{id:!0,class:!0,href:!0});var ci=a(pe);ko=n(ci,"SPAN",{});var hi=a(ko);f(it.$$.fragment,hi),hi.forEach(o),ci.forEach(o),jl=c(Qs),Wo=n(Qs,"SPAN",{});var mi=a(Wo);Ul=r(mi,"TextToVideoPipelineOutput"),mi.forEach(o),Qs.forEach(o),ms=c(e),Y=n(e,"DIV",{class:!0});var Ds=a(Y);f(pt.$$.fragment,Ds),Il=c(Ds),Vo=n(Ds,"P",{});var fi=a(Vo);kl=r(fi,"Output class for zero-shot text-to-video pipeline."),fi.forEach(o),Ds.forEach(o),this.h()},h(){i(B,"name","hf:doc:metadata"),i(B,"content",JSON.stringify(Ji)),i(A,"id","text2videozero"),i(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"),i(A,"href","#text2videozero"),i(N,"class","relative group"),i(fe,"href","https://huggingface.co/papers/2303.13439"),i(fe,"rel","nofollow"),i(ue,"href","https://www.ece.utexas.edu/people/faculty/atlas-wang"),i(ue,"rel","nofollow"),i(_e,"href","https://www.humphreyshi.com"),i(_e,"rel","nofollow"),vi(ft.src,El="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/t2v_zero_teaser.png")||i(ft,"src",El),i(ft,"alt","teaser-img"),i(ye,"href","https://text2video-zero.github.io/"),i(ye,"rel","nofollow"),i(ge,"href","https://arxiv.org/abs/2303.13439"),i(ge,"rel","nofollow"),i(ve,"href","https://github.com/Picsart-AI-Research/Text2Video-Zero"),i(ve,"rel","nofollow"),i(H,"id","usage-example"),i(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(H,"href","#usage-example"),i(G,"class","relative group"),i(L,"id","texttovideo"),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","#texttovideo"),i(C,"class","relative group"),i(Je,"href","https://arxiv.org/abs/2303.13439"),i(Je,"rel","nofollow"),i(Me,"href","https://arxiv.org/abs/2303.13439"),i(Me,"rel","nofollow"),i(O,"id","texttovideo-with-pose-control"),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","#texttovideo-with-pose-control"),i(R,"class","relative group"),i(Tt,"href","./stable_diffusion/controlnet"),i(X,"start","2"),i(K,"id","texttovideo-with-edge-control"),i(K,"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(K,"href","#texttovideo-with-edge-control"),i($,"class","relative group"),i(Ge,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),i(Ge,"rel","nofollow"),i(te,"id","video-instructpix2pix"),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","#video-instructpix2pix"),i(S,"class","relative group"),i(Jt,"href","./stable_diffusion/pix2pix"),i(se,"id","dreambooth-specialization"),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","#dreambooth-specialization"),i(z,"class","relative group"),i(Mt,"href","../training/dreambooth"),i(Ye,"href","https://huggingface.co/lllyasviel/sd-controlnet-canny"),i(Ye,"rel","nofollow"),i(Fe,"href","https://huggingface.co/PAIR/text2video-zero-controlnet-canny-avatar"),i(Fe,"rel","nofollow"),i(tt,"href","https://huggingface.co/models?search=dreambooth"),i(tt,"rel","nofollow"),i(ae,"id","diffusers.TextToVideoZeroPipeline"),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","#diffusers.TextToVideoZeroPipeline"),i(Q,"class","relative group"),i(Zt,"href","/docs/diffusers/v0.19.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),i(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ie,"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"),i(pe,"id","diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput"),i(pe,"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(pe,"href","#diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput"),i(D,"class","relative group"),i(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 m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t(Ot,Yn),t(T,Fn),t(T,Kt),t(Kt,An),t(k,Hn),t(k,vt),t(vt,Ln),t(vt,eo),t(eo,Ze),t(Ze,to),t(to,qn),t(Ze,On),t(Ze,oo),t(oo,Kn),h(e,Lo,p),h(e,bt,p),t(bt,ea),h(e,qo,p),u(xe,e,p),h(e,Oo,p),h(e,R,p),t(R,O),t(O,so),u(je,so,null),t(R,ta),t(R,no),t(no,oa),h(e,Ko,p),h(e,wt,p),t(wt,Ue),t(Ue,ao),t(ao,sa),t(Ue,na),u(Ie,Ue,null),h(e,es,p),h(e,X,p),t(X,P),t(P,lo),t(lo,aa),t(P,la),u(ke,P,null),t(P,ra),t(P,We),t(We,ia),t(We,Tt),t(Tt,pa),t(We,da),t(X,ca),t(X,Ve),t(Ve,Ee),t(Ee,ha),t(Ee,ro),t(ro,ma),t(Ee,fa),t(Ve,ua),u(Be,Ve,null),h(e,ts,p),h(e,$,p),t($,K),t(K,io),u(Ne,io,null),t($,_a),t($,po),t(po,ya),h(e,os,p),h(e,ee,p),t(ee,ga),t(ee,Ge),t(Ge,va),t(ee,ba),h(e,ss,p),h(e,S,p),t(S,te),t(te,co),u(Ce,co,null),t(S,wa),t(S,ho),t(ho,Ta),h(e,ns,p),h(e,oe,p),t(oe,Ja),t(oe,Jt),t(Jt,Ma),t(oe,Za),h(e,as,p),h(e,W,p),t(W,Re),t(Re,mo),t(mo,xa),t(Re,ja),u(Xe,Re,null),t(W,Ua),t(W,Pe),t(Pe,fo),t(fo,Ia),t(Pe,ka),u($e,Pe,null),t(W,Wa),t(W,Se),t(Se,ze),t(ze,Va),t(ze,uo),t(uo,Ea),t(ze,Ba),t(Se,Na),u(Qe,Se,null),h(e,ls,p),h(e,z,p),t(z,se),t(se,_o),u(De,_o,null),t(z,Ga),t(z,yo),t(yo,Ca),h(e,rs,p),h(e,v,p),t(v,Ra),t(v,go),t(go,Xa),t(v,Pa),t(v,vo),t(vo,$a),t(v,Sa),t(v,bo),t(bo,za),t(v,Qa),t(v,Mt),t(Mt,Da),t(v,Ya),t(v,Ye),t(Ye,Fa),t(v,Aa),t(v,Fe),t(Fe,Ha),t(v,La),h(e,is,p),h(e,V,p),t(V,Ae),t(Ae,wo),t(wo,qa),t(Ae,Oa),u(He,Ae,null),t(V,Ka),t(V,Le),t(Le,To),t(To,el),t(Le,tl),u(qe,Le,null),t(V,ol),t(V,Oe),t(Oe,Ke),t(Ke,sl),t(Ke,Jo),t(Jo,nl),t(Ke,al),t(Oe,ll),u(et,Oe,null),h(e,ps,p),h(e,ne,p),t(ne,rl),t(ne,tt),t(tt,il),t(ne,pl),h(e,ds,p),h(e,Q,p),t(Q,ae),t(ae,Mo),u(ot,Mo,null),t(Q,dl),t(Q,Zo),t(Zo,cl),h(e,cs,p),h(e,b,p),u(st,b,null),t(b,hl),t(b,xo),t(xo,ml),t(b,fl),t(b,nt),t(nt,ul),t(nt,Zt),t(Zt,_l),t(nt,yl),t(b,gl),t(b,le),u(at,le,null),t(le,vl),t(le,jo),t(jo,bl),t(b,wl),t(b,re),u(lt,re,null),t(re,Tl),t(re,Uo),t(Uo,Jl),t(b,Ml),t(b,ie),u(rt,ie,null),t(ie,Zl),t(ie,Io),t(Io,xl),h(e,hs,p),h(e,D,p),t(D,pe),t(pe,ko),u(it,ko,null),t(D,jl),t(D,Wo),t(Wo,Ul),h(e,ms,p),h(e,Y,p),u(pt,Y,null),t(Y,Il),t(Y,Vo),t(Vo,kl),fs=!0},p:bi,i(e){fs||(_(me.$$.fragment,e),_(be.$$.fragment,e),_(we.$$.fragment,e),_(Te.$$.fragment,e),_(xe.$$.fragment,e),_(je.$$.fragment,e),_(Ie.$$.fragment,e),_(ke.$$.fragment,e),_(Be.$$.fragment,e),_(Ne.$$.fragment,e),_(Ce.$$.fragment,e),_(Xe.$$.fragment,e),_($e.$$.fragment,e),_(Qe.$$.fragment,e),_(De.$$.fragment,e),_(He.$$.fragment,e),_(qe.$$.fragment,e),_(et.$$.fragment,e),_(ot.$$.fragment,e),_(st.$$.fragment,e),_(at.$$.fragment,e),_(lt.$$.fragment,e),_(rt.$$.fragment,e),_(it.$$.fragment,e),_(pt.$$.fragment,e),fs=!0)},o(e){y(me.$$.fragment,e),y(be.$$.fragment,e),y(we.$$.fragment,e),y(Te.$$.fragment,e),y(xe.$$.fragment,e),y(je.$$.fragment,e),y(Ie.$$.fragment,e),y(ke.$$.fragment,e),y(Be.$$.fragment,e),y(Ne.$$.fragment,e),y(Ce.$$.fragment,e),y(Xe.$$.fragment,e),y($e.$$.fragment,e),y(Qe.$$.fragment,e),y(De.$$.fragment,e),y(He.$$.fragment,e),y(qe.$$.fragment,e),y(et.$$.fragment,e),y(ot.$$.fragment,e),y(st.$$.fragment,e),y(at.$$.fragment,e),y(lt.$$.fragment,e),y(rt.$$.fragment,e),y(it.$$.fragment,e),y(pt.$$.fragment,e),fs=!1},d(e){o(B),e&&o(No),e&&o(N),g(me),e&&o(Go),e&&o(Z),e&&o(Co),e&&o(ct),e&&o(Ro),e&&o(I),e&&o(Xo),e&&o(ht),e&&o(Po),e&&o(mt),e&&o($o),e&&o(ut),e&&o(So),e&&o(_t),e&&o(zo),e&&o(J),e&&o(Qo),e&&o(G),g(be),e&&o(Do),e&&o(C),g(we),e&&o(Yo),e&&o(yt),e&&o(Fo),g(Te,e),e&&o(Ao),e&&o(gt),e&&o(Ho),e&&o(k),e&&o(Lo),e&&o(bt),e&&o(qo),g(xe,e),e&&o(Oo),e&&o(R),g(je),e&&o(Ko),e&&o(wt),g(Ie),e&&o(es),e&&o(X),g(ke),g(Be),e&&o(ts),e&&o($),g(Ne),e&&o(os),e&&o(ee),e&&o(ss),e&&o(S),g(Ce),e&&o(ns),e&&o(oe),e&&o(as),e&&o(W),g(Xe),g($e),g(Qe),e&&o(ls),e&&o(z),g(De),e&&o(rs),e&&o(v),e&&o(is),e&&o(V),g(He),g(qe),g(et),e&&o(ps),e&&o(ne),e&&o(ds),e&&o(Q),g(ot),e&&o(cs),e&&o(b),g(st),g(at),g(lt),g(rt),e&&o(hs),e&&o(D),g(it),e&&o(ms),e&&o(Y),g(pt)}}}const Ji={local:"text2videozero",sections:[{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"},{local:"diffusers.pipelines.text_to_video_synthesis.pipeline_text_to_video_zero.TextToVideoPipelineOutput",title:"TextToVideoPipelineOutput"}],title:"Text2Video-Zero"};function Mi(Vl){return wi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ii extends ui{constructor(B){super();_i(this,B,Mi,Ti,yi,{})}}export{Ii as default,Ji as metadata};
