Buckets:

rtrm's picture
download
raw
21.2 kB
import{s as jt,o as Vt,n as Xt}from"../chunks/scheduler.182ea377.js";import{S as Gt,i as It,g as o,s,p as g,A as St,h as a,f as t,c as i,j as h,q as v,m,k as r,v as d,a as l,r as b,d as w,t as y,u as M,x as Et,y as Nt}from"../chunks/index.008d68e4.js";import{T as Bt}from"../chunks/Tip.4f096367.js";import{I as fe}from"../chunks/IconCopyLink.96bbb92b.js";import{C as ge}from"../chunks/CodeBlock.5ed6eb7b.js";import{D as Yt}from"../chunks/DocNotebookDropdown.bb388256.js";function Rt(ve){let c,u,f='Additionally, we also use <a href="../../optimization/memory#model-offloading">model cpu offloading</a> to reduce the memory usage.';return{c(){c=Et("Since generating videos is more memory intensive we can use the `decode_chunk_size` argument to control how many frames are decoded at once. This will reduce the memory usage. It's recommended to tweak this value based on your GPU memory.\nSetting `decode_chunk_size=1` will decode one frame at a time and will use the least amount of memory but the video might have some flickering.\n"),u=o("p"),u.innerHTML=f},l(p){c=Nt(p,"Since generating videos is more memory intensive we can use the `decode_chunk_size` argument to control how many frames are decoded at once. This will reduce the memory usage. It's recommended to tweak this value based on your GPU memory.\nSetting `decode_chunk_size=1` will decode one frame at a time and will use the least amount of memory but the video might have some flickering.\n"),u=a(p,"P",{"data-svelte-h":!0}),m(u)!=="svelte-dumqni"&&(u.innerHTML=f)},m(p,W){l(p,c,W),l(p,u,W)},p:Xt,d(p){p&&(t(c),t(u))}}}function zt(ve){let c,u,f,p,W,V,qe,se,tt="Stable Video Diffusion",be,X,we,G,nt='<a href="https://static1.squarespace.com/static/6213c340453c3f502425776e/t/655ce779b9d47d342a93c890/1700587395994/stable_video_diffusion.pdf" rel="nofollow">Stable Video Diffusion</a> is a powerful image-to-video generation model that can generate high resolution (576x1024) 2-4 second videos conditioned on the input image.',ye,I,lt="This guide will show you how to use SVD to short generate videos from images.",Me,S,ot="Before you begin, make sure you have the following libraries installed:",Ze,E,Je,J,$,pe,N,Ae,ie,at="Image to Video Generation",Te,B,st=`The are two variants of SVD. <a href="https://huggingface.co/stabilityai/stable-video-diffusion-img2vid" rel="nofollow">SVD</a>
and <a href="https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt" rel="nofollow">SVD-XT</a>. The svd checkpoint is trained to generate 14 frames and the svd-xt checkpoint is further
finetuned to generate 25 frames.`,_e,Y,it="We will use the <code>svd-xt</code> checkpoint for this guide.",ke,R,We,Z,rt='<source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket_generated.webm" type="video/webm"/><source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket_generated.mp4" type="video/mp4"/>',$e,z,mt='<thead><tr><th align="center"><strong>Source Image</strong></th> <th align="center"><strong>Video</strong></th></tr></thead> <tbody><tr><td align="center"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png"/></td> <td align="center"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/output_rocket.gif"/></td></tr></tbody>',Ue,U,xe,T,x,he,F,Ke,re,dt="Torch.compile",Ce,Q,pt="You can achieve a 20-25% speed-up at the expense of slightly increased memory by compiling the UNet as follows:",je,L,Ve,_,C,ce,H,Oe,me,ht="Low-memory",Xe,D,ct="Video generation is very memory intensive as we have to essentially generate <code>num_frames</code> all at once. The mechanism is very comparable to text-to-image generation with a high batch size. To reduce the memory requirement you have multiple options. The following options trade inference speed against lower memory requirement:",Ge,P,ut="<li>enable model offloading: Each component of the pipeline is offloaded to CPU once it’s not needed anymore.</li> <li>enable feed-forward chunking: The feed-forward layer runs in a loop instead of running with a single huge feed-forward batch size</li> <li>reduce <code>decode_chunk_size</code>: This means that the VAE decodes frames in chunks instead of decoding them all together. <strong>Note</strong>: In addition to leading to a small slowdown, this method also slightly leads to video quality deterioration</li>",Ie,q,ft="You can enable them as follows:",Se,A,Ee,K,gt="Including all these tricks should lower the memory requirement to less than 8GB VRAM.",Ne,k,j,ue,O,et,de,vt="Micro-conditioning",Be,ee,bt=`Along with conditioning image Stable Diffusion Video also allows providing micro-conditioning that allows more control over the generated video.
It accepts the following arguments:`,Ye,te,wt="<li><code>fps</code>: The frames per second of the generated video.</li> <li><code>motion_bucket_id</code>: The motion bucket id to use for the generated video. This can be used to control the motion of the generated video. Increasing the motion bucket id will increase the motion of the generated video.</li> <li><code>noise_aug_strength</code>: The amount of noise added to the conditioning image. The higher the values the less the video will resemble the conditioning image. Increasing this value will also increase the motion of the generated video.</li>",Re,ne,yt="Here is an example of using micro-conditioning to generate a video with more motion.",ze,le,Fe,oe,Mt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/output_rocket_with_conditions.gif"/>',Qe;return V=new fe({}),X=new Yt({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/pt/svd.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/pt/pytorch/svd.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers_doc/pt/tensorflow/svd.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/pt/svd.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/pt/pytorch/svd.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/diffusers_doc/pt/tensorflow/svd.ipynb"}]}}),E=new ge({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtcSUyMC1VJTIwZGlmZnVzZXJzJTIwdHJhbnNmb3JtZXJzJTIwYWNjZWxlcmF0ZSUyMA==",highlighted:"!pip install -q -U diffusers transformers accelerate "}}),N=new fe({}),R=new ge({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlVmlkZW9EaWZmdXNpb25QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTJDJTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZVZpZGVvRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLXZpZGVvLWRpZmZ1c2lvbi1pbWcydmlkLXh0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQSUyMyUyMExvYWQlMjB0aGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZzdmQlMkZyb2NrZXQucG5nJTIyKSUwQWltYWdlJTIwJTNEJTIwaW1hZ2UucmVzaXplKCgxMDI0JTJDJTIwNTc2KSklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg0MiklMEFmcmFtZXMlMjAlM0QlMjBwaXBlKGltYWdlJTJDJTIwZGVjb2RlX2NodW5rX3NpemUlM0Q4JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yKS5mcmFtZXMlNUIwJTVEJTBBJTBBZXhwb3J0X3RvX3ZpZGVvKGZyYW1lcyUyQyUyMCUyMmdlbmVyYXRlZC5tcDQlMjIlMkMlMjBmcHMlM0Q3KQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableVideoDiffusionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, export_to_video
pipe = StableVideoDiffusionPipeline.from_pretrained(
<span class="hljs-string">&quot;stabilityai/stable-video-diffusion-img2vid-xt&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
)
pipe.enable_model_cpu_offload()
<span class="hljs-comment"># Load the conditioning image</span>
image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png&quot;</span>)
image = image.resize((<span class="hljs-number">1024</span>, <span class="hljs-number">576</span>))
generator = torch.manual_seed(<span class="hljs-number">42</span>)
frames = pipe(image, decode_chunk_size=<span class="hljs-number">8</span>, generator=generator).frames[<span class="hljs-number">0</span>]
export_to_video(frames, <span class="hljs-string">&quot;generated.mp4&quot;</span>, fps=<span class="hljs-number">7</span>)`}}),U=new Bt({props:{$$slots:{default:[Rt]},$$scope:{ctx:ve}}}),F=new fe({}),L=new ge({props:{code:"LSUyMHBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMkIlMjBwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTJCJTIwcGlwZS51bmV0JTIwJTNEJTIwdG9yY2guY29tcGlsZShwaXBlLnVuZXQlMkMlMjBtb2RlJTNEJTIycmVkdWNlLW92ZXJoZWFkJTIyJTJDJTIwZnVsbGdyYXBoJTNEVHJ1ZSk=",highlighted:`<span class="hljs-deletion">- pipe.enable_model_cpu_offload()</span>
<span class="hljs-addition">+ pipe.to(&quot;cuda&quot;)</span>
<span class="hljs-addition">+ pipe.unet = torch.compile(pipe.unet, mode=&quot;reduce-overhead&quot;, fullgraph=True)</span>`}}),H=new fe({}),A=new ge({props:{code:"LXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEEtZnJhbWVzJTIwJTNEJTIwcGlwZShpbWFnZSUyQyUyMGRlY29kZV9jaHVua19zaXplJTNEOCUyQyUyMGdlbmVyYXRvciUzRGdlbmVyYXRvcikuZnJhbWVzJTVCMCU1RCUwQSUyQnBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMkJwaXBlLnVuZXQuZW5hYmxlX2ZvcndhcmRfY2h1bmtpbmcoKSUwQSUyQmZyYW1lcyUyMCUzRCUyMHBpcGUoaW1hZ2UlMkMlMjBkZWNvZGVfY2h1bmtfc2l6ZSUzRDIlMkMlMjBnZW5lcmF0b3IlM0RnZW5lcmF0b3IlMkMlMjBudW1fZnJhbWVzJTNEMjUpLmZyYW1lcyU1QjAlNUQ=",highlighted:`<span class="hljs-deletion">-pipe.enable_model_cpu_offload()</span>
<span class="hljs-deletion">-frames = pipe(image, decode_chunk_size=8, generator=generator).frames[0]</span>
<span class="hljs-addition">+pipe.enable_model_cpu_offload()</span>
<span class="hljs-addition">+pipe.unet.enable_forward_chunking()</span>
<span class="hljs-addition">+frames = pipe(image, decode_chunk_size=2, generator=generator, num_frames=25).frames[0]</span>`}}),O=new fe({}),le=new ge({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlVmlkZW9EaWZmdXNpb25QaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTJDJTIwZXhwb3J0X3RvX3ZpZGVvJTBBJTBBcGlwZSUyMCUzRCUyMFN0YWJsZVZpZGVvRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLXZpZGVvLWRpZmZ1c2lvbi1pbWcydmlkLXh0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTIwdmFyaWFudCUzRCUyMmZwMTYlMjIlMEEpJTBBcGlwZS5lbmFibGVfbW9kZWxfY3B1X29mZmxvYWQoKSUwQSUwQSUyMyUyMExvYWQlMjB0aGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUwQWltYWdlJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZzdmQlMkZyb2NrZXQucG5nJTIyKSUwQWltYWdlJTIwJTNEJTIwaW1hZ2UucmVzaXplKCgxMDI0JTJDJTIwNTc2KSklMEElMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg0MiklMEFmcmFtZXMlMjAlM0QlMjBwaXBlKGltYWdlJTJDJTIwZGVjb2RlX2NodW5rX3NpemUlM0Q4JTJDJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTIwbW90aW9uX2J1Y2tldF9pZCUzRDE4MCUyQyUyMG5vaXNlX2F1Z19zdHJlbmd0aCUzRDAuMSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyhmcmFtZXMlMkMlMjAlMjJnZW5lcmF0ZWQubXA0JTIyJTJDJTIwZnBzJTNENyk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableVideoDiffusionPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image, export_to_video
pipe = StableVideoDiffusionPipeline.from_pretrained(
<span class="hljs-string">&quot;stabilityai/stable-video-diffusion-img2vid-xt&quot;</span>, torch_dtype=torch.float16, variant=<span class="hljs-string">&quot;fp16&quot;</span>
)
pipe.enable_model_cpu_offload()
<span class="hljs-comment"># Load the conditioning image</span>
image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png&quot;</span>)
image = image.resize((<span class="hljs-number">1024</span>, <span class="hljs-number">576</span>))
generator = torch.manual_seed(<span class="hljs-number">42</span>)
frames = pipe(image, decode_chunk_size=<span class="hljs-number">8</span>, generator=generator, motion_bucket_id=<span class="hljs-number">180</span>, noise_aug_strength=<span class="hljs-number">0.1</span>).frames[<span class="hljs-number">0</span>]
export_to_video(frames, <span class="hljs-string">&quot;generated.mp4&quot;</span>, fps=<span class="hljs-number">7</span>)`}}),{c(){c=o("meta"),u=s(),f=o("h1"),p=o("a"),W=o("span"),g(V.$$.fragment),qe=s(),se=o("span"),se.textContent=tt,be=s(),g(X.$$.fragment),we=s(),G=o("p"),G.innerHTML=nt,ye=s(),I=o("p"),I.textContent=lt,Me=s(),S=o("p"),S.textContent=ot,Ze=s(),g(E.$$.fragment),Je=s(),J=o("h2"),$=o("a"),pe=o("span"),g(N.$$.fragment),Ae=s(),ie=o("span"),ie.textContent=at,Te=s(),B=o("p"),B.innerHTML=st,_e=s(),Y=o("p"),Y.innerHTML=it,ke=s(),g(R.$$.fragment),We=s(),Z=o("video"),Z.innerHTML=rt,$e=s(),z=o("table"),z.innerHTML=mt,Ue=s(),g(U.$$.fragment),xe=s(),T=o("h3"),x=o("a"),he=o("span"),g(F.$$.fragment),Ke=s(),re=o("span"),re.textContent=dt,Ce=s(),Q=o("p"),Q.textContent=pt,je=s(),g(L.$$.fragment),Ve=s(),_=o("h3"),C=o("a"),ce=o("span"),g(H.$$.fragment),Oe=s(),me=o("span"),me.textContent=ht,Xe=s(),D=o("p"),D.innerHTML=ct,Ge=s(),P=o("ul"),P.innerHTML=ut,Ie=s(),q=o("p"),q.textContent=ft,Se=s(),g(A.$$.fragment),Ee=s(),K=o("p"),K.textContent=gt,Ne=s(),k=o("h3"),j=o("a"),ue=o("span"),g(O.$$.fragment),et=s(),de=o("span"),de.textContent=vt,Be=s(),ee=o("p"),ee.textContent=bt,Ye=s(),te=o("ul"),te.innerHTML=wt,Re=s(),ne=o("p"),ne.textContent=yt,ze=s(),g(le.$$.fragment),Fe=s(),oe=o("p"),oe.innerHTML=Mt,this.h()},l(e){const n=St("svelte-1phssyn",document.head);c=a(n,"META",{name:!0,content:!0}),n.forEach(t),u=i(e),f=a(e,"H1",{class:!0});var ae=h(f);p=a(ae,"A",{id:!0,class:!0,href:!0});var Zt=h(p);W=a(Zt,"SPAN",{});var Jt=h(W);v(V.$$.fragment,Jt),Jt.forEach(t),Zt.forEach(t),qe=i(ae),se=a(ae,"SPAN",{"data-svelte-h":!0}),m(se)!=="svelte-dwyljo"&&(se.textContent=tt),ae.forEach(t),be=i(e),v(X.$$.fragment,e),we=i(e),G=a(e,"P",{"data-svelte-h":!0}),m(G)!=="svelte-1vbef9r"&&(G.innerHTML=nt),ye=i(e),I=a(e,"P",{"data-svelte-h":!0}),m(I)!=="svelte-xwqusf"&&(I.textContent=lt),Me=i(e),S=a(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-cwruts"&&(S.textContent=ot),Ze=i(e),v(E.$$.fragment,e),Je=i(e),J=a(e,"H2",{class:!0});var Le=h(J);$=a(Le,"A",{id:!0,class:!0,href:!0});var Tt=h($);pe=a(Tt,"SPAN",{});var _t=h(pe);v(N.$$.fragment,_t),_t.forEach(t),Tt.forEach(t),Ae=i(Le),ie=a(Le,"SPAN",{"data-svelte-h":!0}),m(ie)!=="svelte-qnqgpi"&&(ie.textContent=at),Le.forEach(t),Te=i(e),B=a(e,"P",{"data-svelte-h":!0}),m(B)!=="svelte-d5kpr9"&&(B.innerHTML=st),_e=i(e),Y=a(e,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-ovrr6i"&&(Y.innerHTML=it),ke=i(e),v(R.$$.fragment,e),We=i(e),Z=a(e,"VIDEO",{width:!0,height:!0,"data-svelte-h":!0}),m(Z)!=="svelte-etsswh"&&(Z.innerHTML=rt),$e=i(e),z=a(e,"TABLE",{"data-svelte-h":!0}),m(z)!=="svelte-n37d2y"&&(z.innerHTML=mt),Ue=i(e),v(U.$$.fragment,e),xe=i(e),T=a(e,"H3",{class:!0});var He=h(T);x=a(He,"A",{id:!0,class:!0,href:!0});var kt=h(x);he=a(kt,"SPAN",{});var Wt=h(he);v(F.$$.fragment,Wt),Wt.forEach(t),kt.forEach(t),Ke=i(He),re=a(He,"SPAN",{"data-svelte-h":!0}),m(re)!=="svelte-16x0yxq"&&(re.textContent=dt),He.forEach(t),Ce=i(e),Q=a(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-1avdrs5"&&(Q.textContent=pt),je=i(e),v(L.$$.fragment,e),Ve=i(e),_=a(e,"H3",{class:!0});var De=h(_);C=a(De,"A",{id:!0,class:!0,href:!0});var $t=h(C);ce=a($t,"SPAN",{});var Ut=h(ce);v(H.$$.fragment,Ut),Ut.forEach(t),$t.forEach(t),Oe=i(De),me=a(De,"SPAN",{"data-svelte-h":!0}),m(me)!=="svelte-1pksizj"&&(me.textContent=ht),De.forEach(t),Xe=i(e),D=a(e,"P",{"data-svelte-h":!0}),m(D)!=="svelte-19vtt0c"&&(D.innerHTML=ct),Ge=i(e),P=a(e,"UL",{"data-svelte-h":!0}),m(P)!=="svelte-71ertv"&&(P.innerHTML=ut),Ie=i(e),q=a(e,"P",{"data-svelte-h":!0}),m(q)!=="svelte-xt0ph2"&&(q.textContent=ft),Se=i(e),v(A.$$.fragment,e),Ee=i(e),K=a(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-yldnwm"&&(K.textContent=gt),Ne=i(e),k=a(e,"H3",{class:!0});var Pe=h(k);j=a(Pe,"A",{id:!0,class:!0,href:!0});var xt=h(j);ue=a(xt,"SPAN",{});var Ct=h(ue);v(O.$$.fragment,Ct),Ct.forEach(t),xt.forEach(t),et=i(Pe),de=a(Pe,"SPAN",{"data-svelte-h":!0}),m(de)!=="svelte-1fiwj5x"&&(de.textContent=vt),Pe.forEach(t),Be=i(e),ee=a(e,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-zhhgyp"&&(ee.textContent=bt),Ye=i(e),te=a(e,"UL",{"data-svelte-h":!0}),m(te)!=="svelte-1tco7lo"&&(te.innerHTML=wt),Re=i(e),ne=a(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-1vov4p7"&&(ne.textContent=yt),ze=i(e),v(le.$$.fragment,e),Fe=i(e),oe=a(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-19qaph4"&&(oe.innerHTML=Mt),this.h()},h(){r(c,"name","hf:doc:metadata"),r(c,"content",JSON.stringify(Ft)),r(p,"id","stable-video-diffusion"),r(p,"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"),r(p,"href","#stable-video-diffusion"),r(f,"class","relative group"),r($,"id","image-to-video-generation"),r($,"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"),r($,"href","#image-to-video-generation"),r(J,"class","relative group"),Z.controls="",r(Z,"width","1024"),r(Z,"height","576"),r(x,"id","torchcompile"),r(x,"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"),r(x,"href","#torchcompile"),r(T,"class","relative group"),r(C,"id","lowmemory"),r(C,"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"),r(C,"href","#lowmemory"),r(_,"class","relative group"),r(j,"id","microconditioning"),r(j,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),r(j,"href","#microconditioning"),r(k,"class","relative group")},m(e,n){d(document.head,c),l(e,u,n),l(e,f,n),d(f,p),d(p,W),b(V,W,null),d(f,qe),d(f,se),l(e,be,n),b(X,e,n),l(e,we,n),l(e,G,n),l(e,ye,n),l(e,I,n),l(e,Me,n),l(e,S,n),l(e,Ze,n),b(E,e,n),l(e,Je,n),l(e,J,n),d(J,$),d($,pe),b(N,pe,null),d(J,Ae),d(J,ie),l(e,Te,n),l(e,B,n),l(e,_e,n),l(e,Y,n),l(e,ke,n),b(R,e,n),l(e,We,n),l(e,Z,n),l(e,$e,n),l(e,z,n),l(e,Ue,n),b(U,e,n),l(e,xe,n),l(e,T,n),d(T,x),d(x,he),b(F,he,null),d(T,Ke),d(T,re),l(e,Ce,n),l(e,Q,n),l(e,je,n),b(L,e,n),l(e,Ve,n),l(e,_,n),d(_,C),d(C,ce),b(H,ce,null),d(_,Oe),d(_,me),l(e,Xe,n),l(e,D,n),l(e,Ge,n),l(e,P,n),l(e,Ie,n),l(e,q,n),l(e,Se,n),b(A,e,n),l(e,Ee,n),l(e,K,n),l(e,Ne,n),l(e,k,n),d(k,j),d(j,ue),b(O,ue,null),d(k,et),d(k,de),l(e,Be,n),l(e,ee,n),l(e,Ye,n),l(e,te,n),l(e,Re,n),l(e,ne,n),l(e,ze,n),b(le,e,n),l(e,Fe,n),l(e,oe,n),Qe=!0},p(e,[n]){const ae={};n&2&&(ae.$$scope={dirty:n,ctx:e}),U.$set(ae)},i(e){Qe||(w(V.$$.fragment,e),w(X.$$.fragment,e),w(E.$$.fragment,e),w(N.$$.fragment,e),w(R.$$.fragment,e),w(U.$$.fragment,e),w(F.$$.fragment,e),w(L.$$.fragment,e),w(H.$$.fragment,e),w(A.$$.fragment,e),w(O.$$.fragment,e),w(le.$$.fragment,e),Qe=!0)},o(e){y(V.$$.fragment,e),y(X.$$.fragment,e),y(E.$$.fragment,e),y(N.$$.fragment,e),y(R.$$.fragment,e),y(U.$$.fragment,e),y(F.$$.fragment,e),y(L.$$.fragment,e),y(H.$$.fragment,e),y(A.$$.fragment,e),y(O.$$.fragment,e),y(le.$$.fragment,e),Qe=!1},d(e){e&&(t(u),t(f),t(be),t(we),t(G),t(ye),t(I),t(Me),t(S),t(Ze),t(Je),t(J),t(Te),t(B),t(_e),t(Y),t(ke),t(We),t(Z),t($e),t(z),t(Ue),t(xe),t(T),t(Ce),t(Q),t(je),t(Ve),t(_),t(Xe),t(D),t(Ge),t(P),t(Ie),t(q),t(Se),t(Ee),t(K),t(Ne),t(k),t(Be),t(ee),t(Ye),t(te),t(Re),t(ne),t(ze),t(Fe),t(oe)),t(c),M(V),M(X,e),M(E,e),M(N),M(R,e),M(U,e),M(F),M(L,e),M(H),M(A,e),M(O),M(le,e)}}}const Ft={local:"stable-video-diffusion",sections:[{local:"image-to-video-generation",sections:[{local:"torchcompile",title:"Torch.compile"},{local:"lowmemory",title:"Low-memory"},{local:"microconditioning",title:"Micro-conditioning"}],title:"Image to Video Generation"}],title:"Stable Video Diffusion"};function Qt(ve){return Vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kt extends Gt{constructor(c){super(),It(this,c,Qt,zt,jt,{})}}export{Kt as component};

Xet Storage Details

Size:
21.2 kB
·
Xet hash:
80dd111d6e99c2f77737b05bc4ed341db84008101c7f67df9a7a8bb0db4b4a40

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.