Buckets:
| import{s as Gt,o as Wt,n as Le}from"../chunks/scheduler.53228c21.js";import{S as Rt,i as Vt,e as c,s as a,c as y,q as Un,H as Ct,h as Pt,a as d,d as t,b as l,f as k,g,j as u,r as Jn,u as $t,k as x,w as Nt,l as o,m as r,n as _,t as w,o as M,p as b}from"../chunks/index.cac5d66a.js";import{C as Et}from"../chunks/CopyLLMTxtMenu.1fd09aaf.js";import{D as P}from"../chunks/Docstring.fd907bc4.js";import{C as Qe}from"../chunks/CodeBlock.606cbaf4.js";import{E as Zt}from"../chunks/ExampleCodeBlock.0d1557f5.js";import{H as be,E as zt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.73be37fc.js";import{H as Qt,a as nt}from"../chunks/HfOption.6b51ddef.js";function Ht(A){let s,h;return s=new Qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93RkFSUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctRkFSLVdhbjIuMS0xLjNCLURpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwKCUwQSUyMCUyMCUyMCUyMCUyMkFuJTIwYXN0cm9uYXV0JTIwcnVucyUyMHNtb290aGx5JTIwYW5kJTIwYXBwZWFycyUyMGFsbW9zdCUyMHdlaWdodGxlc3MlMjBvbiUyMHRoZSUyMGx1bmFyJTIwc3VyZmFjZSUyQyUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmFzJTIwc2VlbiUyMGZyb20lMjBhJTIwbG93LWFuZ2xlJTIwc2hvdCUyMHRoYXQlMjBoaWdobGlnaHRzJTIwdGhlJTIwdmFzdCUyQyUyMGRlc29sYXRlJTIwYmFja2dyb3VuZCUyMG9mJTIwdGhlJTIwbW9vbi4lMjIlMEEpJTBBdmlkZW8lMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0JTJDJTIwbnVtX2ZyYW1lcyUzRDgxKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyYW55Zmxvd19mYXJfdDJ2Lm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowFARPipeline | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| pipe = AnyFlowFARPipeline.from_pretrained( | |
| <span class="hljs-string">"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| prompt = ( | |
| <span class="hljs-string">"An astronaut runs smoothly and appears almost weightless on the lunar surface, "</span> | |
| <span class="hljs-string">"as seen from a low-angle shot that highlights the vast, desolate background of the moon."</span> | |
| ) | |
| video = pipe(prompt, num_inference_steps=<span class="hljs-number">4</span>, num_frames=<span class="hljs-number">81</span>).frames[<span class="hljs-number">0</span>] | |
| export_to_video(video, <span class="hljs-string">"anyflow_far_t2v.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){y(s.$$.fragment)},l(i){g(s.$$.fragment,i)},m(i,f){_(s,i,f),h=!0},p:Le,i(i){h||(w(s.$$.fragment,i),h=!0)},o(i){M(s.$$.fragment,i),h=!1},d(i){b(s,i)}}}function Lt(A){let s,h;return s=new Qe({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMEV4YW1wbGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUyMGZyb20lMjB0aGUlMjBBbnlGbG93JTIwcmVwby4lMEFmaXJzdF9mcmFtZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGTlZsYWJzJTJGQW55RmxvdyUyRm1haW4lMkZhc3NldHMlMkZldmFsdWF0aW9uJTJGZXhhbXBsZSUyRmltYWdlcyUyRjEuanBnJTIyJTBBKS5yZXNpemUoKDgzMiUyQyUyMDQ4MCkpJTBBYXJyJTIwJTNEJTIwbnAuYXNhcnJheShmaXJzdF9mcmFtZSkuYXN0eXBlKCUyMmZsb2F0MzIlMjIpJTIwJTJGJTIwMjU1LjAlMjAlMjAlMjMlMjAoNDgwJTJDJTIwODMyJTJDJTIwMyklMEFjb250ZXh0X3RlbnNvciUyMCUzRCUyMHRvcmNoLmZyb21fbnVtcHkoYXJyKS5wZXJtdXRlKDIlMkMlMjAwJTJDJTIwMSkudW5zcXVlZXplKDApLnVuc3F1ZWV6ZSgxKS50byglMjJjdWRhJTIyKSUyMCUyMCUyMyUyMCgxJTJDJTIwMSUyQyUyMDMlMkMlMjA0ODAlMkMlMjA4MzIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwKCUwQSUyMCUyMCUyMCUyMCUyMkElMjB0b3dlcmluZyUyQyUyMGJhdHRsZS1zY2FycmVkJTIwaHVtYW5vaWQlMjByb2JvdCUyQyUyMHJlbWluaXNjZW50JTIwb2YlMjBhJTIwVHJhbnNmb3JtZXIlMjB3aXRoJTIwcG93ZXJmdWwlMkMlMjBzZWdtZW50ZWQlMjBhcm1vciUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmFuZCUyMGdsb3dpbmclMjByZWQlMjBvcHRpY3MlMkMlMjB3YWxraW5nJTIwdGhyb3VnaCUyMHRoZSUyMHNrZWxldGFsJTIwcmVtYWlucyUyMG9mJTIwYSUyMGNpdHklMjBydWluLiUyMFR3aXN0ZWQlMjBtZXRhbCUyMGFuZCUyMHNoYXR0ZXJlZCUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmNvbmNyZXRlJTIwY3J1bmNoJTIwdW5kZXIlMjBpdHMlMjBoZWF2eSUyMHN0ZXBzJTJDJTIwYXMlMjB0aGUlMjByb2JvdCUyMHNjYW5zJTIwdGhlJTIwZGVzb2xhdGUlMkMlMjBkdXN0LWNob2tlZCUyMHNreWxpbmUlMjB1bmRlciUyMGFuJTIwZGFyayUyMHNreS4lMjIlMEEpJTBBdmlkZW8lMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRHByb21wdCUyQyUwQSUyMCUyMCUyMCUyMHZpZGVvJTNEY29udGV4dF90ZW5zb3IlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfZmFyX2kydi5tcDQlMjIlMkMlMjBmcHMlM0QxNik=",highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowFARPipeline | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image | |
| pipe = AnyFlowFARPipeline.from_pretrained( | |
| <span class="hljs-string">"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-comment"># Example conditioning image from the AnyFlow repo.</span> | |
| first_frame = load_image( | |
| <span class="hljs-string">"https://raw.githubusercontent.com/NVlabs/AnyFlow/main/assets/evaluation/example/images/1.jpg"</span> | |
| ).resize((<span class="hljs-number">832</span>, <span class="hljs-number">480</span>)) | |
| arr = np.asarray(first_frame).astype(<span class="hljs-string">"float32"</span>) / <span class="hljs-number">255.0</span> <span class="hljs-comment"># (480, 832, 3)</span> | |
| context_tensor = torch.from_numpy(arr).permute(<span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>).unsqueeze(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">1</span>).to(<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># (1, 1, 3, 480, 832)</span> | |
| prompt = ( | |
| <span class="hljs-string">"A towering, battle-scarred humanoid robot, reminiscent of a Transformer with powerful, segmented armor "</span> | |
| <span class="hljs-string">"and glowing red optics, walking through the skeletal remains of a city ruin. Twisted metal and shattered "</span> | |
| <span class="hljs-string">"concrete crunch under its heavy steps, as the robot scans the desolate, dust-choked skyline under an dark sky."</span> | |
| ) | |
| video = pipe( | |
| prompt=prompt, | |
| video=context_tensor, | |
| num_inference_steps=<span class="hljs-number">4</span>, | |
| num_frames=<span class="hljs-number">81</span>, | |
| ).frames[<span class="hljs-number">0</span>] | |
| export_to_video(video, <span class="hljs-string">"anyflow_far_i2v.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){y(s.$$.fragment)},l(i){g(s.$$.fragment,i)},m(i,f){_(s,i,f),h=!0},p:Le,i(i){h||(w(s.$$.fragment,i),h=!0)},o(i){M(s.$$.fragment,i),h=!1},d(i){b(s,i)}}}function Xt(A){let s,h;return s=new Qe({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfdmlkZW8lMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMEV4YW1wbGUlMjBjb25kaXRpb25pbmclMjBjbGlwJTIwZnJvbSUyMHRoZSUyMEFueUZsb3clMjByZXBvJTIwJUUyJTgwJTk0JTIwdGFrZSUyMHRoZSUyMGZpcnN0JTIwOSUyMGZyYW1lcyUyMCgzJTIwbGF0ZW50JTIwZnJhbWVzJTIwYXQlMjBWQUUlMjB0ZW1wb3JhbCUyMHN0cmlkZSUyMDQpLiUwQWNvbnRleHRfZnJhbWVzJTIwJTNEJTIwbG9hZF92aWRlbyglMEElMjAlMjAlMjAlMjAlMjJodHRwcyUzQSUyRiUyRnJhdy5naXRodWJ1c2VyY29udGVudC5jb20lMkZOVmxhYnMlMkZBbnlGbG93JTJGbWFpbiUyRmFzc2V0cyUyRmV2YWx1YXRpb24lMkZleGFtcGxlJTJGdmlkZW9zJTJGMi5tcDQlMjIlMEEpJTVCJTNBOSU1RCUwQWFyciUyMCUzRCUyMG5wLnN0YWNrKCU1Qm5wLmFzYXJyYXkoZi5yZXNpemUoKDgzMiUyQyUyMDQ4MCkpKSUyMGZvciUyMGYlMjBpbiUyMGNvbnRleHRfZnJhbWVzJTVEKS5hc3R5cGUoJTIyZmxvYXQzMiUyMiklMjAlMkYlMjAyNTUuMCUwQWNvbnRleHRfdGVuc29yJTIwJTNEJTIwdG9yY2guZnJvbV9udW1weShhcnIpLnBlcm11dGUoMCUyQyUyMDMlMkMlMjAxJTJDJTIwMikudW5zcXVlZXplKDApLnRvKCUyMmN1ZGElMjIpJTIwJTIwJTIzJTIwKDElMkMlMjA5JTJDJTIwMyUyQyUyMDQ4MCUyQyUyMDgzMiklMEElMEFwcm9tcHQlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwJTIyQSUyMGZvY3VzZWQlMjB0cmFpbCUyMHJ1bm5lcidzJTIwcG93ZXJmdWwlMjBzdHJpZGVzJTIwdGhyb3VnaCUyMGElMjBkZW5zZSUyQyUyMHN1bi1kYXBwbGVkJTIwZm9yZXN0LiUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMlRoZSUyMGNhbWVyYSUyMHRyYWNrcyUyMGFsb25nc2lkZSUyQyUyMGhpZ2hsaWdodGluZyUyMG11c2N1bGFyJTIwZXhlcnRpb24lMkMlMjBzd2VhdCUyQyUyMGFuZCUyMGRldGVybWluZWQlMjBmYWNpYWwlMjBleHByZXNzaW9uLiUyMiUwQSklMEF2aWRlbyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwdmlkZW8lM0Rjb250ZXh0X3RlbnNvciUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2ZyYW1lcyUzRDgxJTJDJTBBJTIwJTIwJTIwJTIwJTIzJTIwT3ZlcnJpZGUlMjBjaHVua19wYXJ0aXRpb24lMjBzbyUyMHRoZSUyMGZpcnN0JTIwY2h1bmslMjBjb3ZlcnMlMjBleGFjdGx5JTIwdGhlJTIwMyUyMGxhdGVudCUyMGNvbnRleHQlMjBmcmFtZXMuJTBBJTIwJTIwJTIwJTIwY2h1bmtfcGFydGl0aW9uJTNEJTVCMyUyQyUyMDMlMkMlMjAzJTJDJTIwMyUyQyUyMDMlMkMlMjAzJTJDJTIwMyU1RCUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfZmFyX3Yydi5tcDQlMjIlMkMlMjBmcHMlM0QxNik=",highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowFARPipeline | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_video | |
| pipe = AnyFlowFARPipeline.from_pretrained( | |
| <span class="hljs-string">"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-comment"># Example conditioning clip from the AnyFlow repo — take the first 9 frames (3 latent frames at VAE temporal stride 4).</span> | |
| context_frames = load_video( | |
| <span class="hljs-string">"https://raw.githubusercontent.com/NVlabs/AnyFlow/main/assets/evaluation/example/videos/2.mp4"</span> | |
| )[:<span class="hljs-number">9</span>] | |
| arr = np.stack([np.asarray(f.resize((<span class="hljs-number">832</span>, <span class="hljs-number">480</span>))) <span class="hljs-keyword">for</span> f <span class="hljs-keyword">in</span> context_frames]).astype(<span class="hljs-string">"float32"</span>) / <span class="hljs-number">255.0</span> | |
| context_tensor = torch.from_numpy(arr).permute(<span class="hljs-number">0</span>, <span class="hljs-number">3</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>).unsqueeze(<span class="hljs-number">0</span>).to(<span class="hljs-string">"cuda"</span>) <span class="hljs-comment"># (1, 9, 3, 480, 832)</span> | |
| prompt = ( | |
| <span class="hljs-string">"A focused trail runner's powerful strides through a dense, sun-dappled forest. "</span> | |
| <span class="hljs-string">"The camera tracks alongside, highlighting muscular exertion, sweat, and determined facial expression."</span> | |
| ) | |
| video = pipe( | |
| prompt=prompt, | |
| video=context_tensor, | |
| num_inference_steps=<span class="hljs-number">4</span>, | |
| num_frames=<span class="hljs-number">81</span>, | |
| <span class="hljs-comment"># Override chunk_partition so the first chunk covers exactly the 3 latent context frames.</span> | |
| chunk_partition=[<span class="hljs-number">3</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>], | |
| ).frames[<span class="hljs-number">0</span>] | |
| export_to_video(video, <span class="hljs-string">"anyflow_far_v2v.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){y(s.$$.fragment)},l(i){g(s.$$.fragment,i)},m(i,f){_(s,i,f),h=!0},p:Le,i(i){h||(w(s.$$.fragment,i),h=!0)},o(i){M(s.$$.fragment,i),h=!1},d(i){b(s,i)}}}function St(A){let s,h,i,f,v,m;return s=new nt({props:{id:"anyflow-far",option:"t2v",$$slots:{default:[Ht]},$$scope:{ctx:A}}}),i=new nt({props:{id:"anyflow-far",option:"i2v",$$slots:{default:[Lt]},$$scope:{ctx:A}}}),v=new nt({props:{id:"anyflow-far",option:"v2v",$$slots:{default:[Xt]},$$scope:{ctx:A}}}),{c(){y(s.$$.fragment),h=a(),y(i.$$.fragment),f=a(),y(v.$$.fragment)},l(p){g(s.$$.fragment,p),h=l(p),g(i.$$.fragment,p),f=l(p),g(v.$$.fragment,p)},m(p,j){_(s,p,j),r(p,h,j),_(i,p,j),r(p,f,j),_(v,p,j),m=!0},p(p,j){const S={};j&2&&(S.$$scope={dirty:j,ctx:p}),s.$set(S);const Z={};j&2&&(Z.$$scope={dirty:j,ctx:p}),i.$set(Z);const q={};j&2&&(q.$$scope={dirty:j,ctx:p}),v.$set(q)},i(p){m||(w(s.$$.fragment,p),w(i.$$.fragment,p),w(v.$$.fragment,p),m=!0)},o(p){M(s.$$.fragment,p),M(i.$$.fragment,p),M(v.$$.fragment,p),m=!1},d(p){p&&(t(h),t(f)),b(s,p),b(i,p),b(v,p)}}}function qt(A){let s,h="Examples:",i,f,v;return f=new Qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctV2FuMi4xLVQyVi0xNEItRGlmZnVzZXJzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwcmVkJTIwcGFuZGElMjBlYXRpbmclMjBiYW1ib28lMjBpbiUyMGElMjBmb3Jlc3QlMkMlMjBjaW5lbWF0aWMlMjBsaWdodGluZyUyMiUwQXZpZGVvJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUyMG51bV9mcmFtZXMlM0QzMykuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfdDJ2Lm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| <span class="hljs-meta">>>> </span>pipe = AnyFlowPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"A red panda eating bamboo in a forest, cinematic lighting"</span> | |
| <span class="hljs-meta">>>> </span>video = pipe(prompt, num_inference_steps=<span class="hljs-number">4</span>, num_frames=<span class="hljs-number">33</span>).frames[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>export_to_video(video, <span class="hljs-string">"anyflow_t2v.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"python",wrap:!1}}),{c(){s=c("p"),s.textContent=h,i=a(),y(f.$$.fragment)},l(m){s=d(m,"P",{"data-svelte-h":!0}),u(s)!=="svelte-kvfsh7"&&(s.textContent=h),i=l(m),g(f.$$.fragment,m)},m(m,p){r(m,s,p),r(m,i,p),_(f,m,p),v=!0},p:Le,i(m){v||(w(f.$$.fragment,m),v=!0)},o(m){M(f.$$.fragment,m),v=!1},d(m){m&&(t(s),t(i)),b(f,m)}}}function Dt(A){let s,h="Examples:",i,f,v;return f=new Qe({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMFNpbmdsZS1mcmFtZSUyMEkyViUzQSUyMHdyYXAlMjB0aGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUyMGFzJTIwYSUyMCgxJTJDJTIwMSUyQyUyMDMlMkMlMjBIJTJDJTIwVyklMjB0ZW5zb3IlMjBpbiUyMCU1QjAlMkMlMjAxJTVELiUwQWZpcnN0X2ZyYW1lJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJwYXRoJTJGdG8lMkZmaXJzdF9mcmFtZS5wbmclMjIpLnJlc2l6ZSgoODMyJTJDJTIwNDgwKSklMEFhcnIlMjAlM0QlMjBucC5hc2FycmF5KGZpcnN0X2ZyYW1lKS5hc3R5cGUoJTIyZmxvYXQzMiUyMiklMjAlMkYlMjAyNTUuMCUwQWNvbnRleHQlMjAlM0QlMjB0b3JjaC5mcm9tX251bXB5KGFycikucGVybXV0ZSgyJTJDJTIwMCUyQyUyMDEpLnVuc3F1ZWV6ZSgwKS51bnNxdWVlemUoMSkudG8oJTIyY3VkYSUyMiklMEElMEF2aWRlbyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEJTIyYSUyMGNhdCUyMHdhbGtzJTIwYWNyb3NzJTIwYSUyMHN1bmxpdCUyMGxhd24lMjIlMkMlMEElMjAlMjAlMjAlMjB2aWRlbyUzRGNvbnRleHQlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfZmFyLm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowFARPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image | |
| <span class="hljs-meta">>>> </span>pipe = AnyFlowFARPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| <span class="hljs-meta">... </span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Single-frame I2V: wrap the conditioning image as a (1, 1, 3, H, W) tensor in [0, 1].</span> | |
| <span class="hljs-meta">>>> </span>first_frame = load_image(<span class="hljs-string">"path/to/first_frame.png"</span>).resize((<span class="hljs-number">832</span>, <span class="hljs-number">480</span>)) | |
| <span class="hljs-meta">>>> </span>arr = np.asarray(first_frame).astype(<span class="hljs-string">"float32"</span>) / <span class="hljs-number">255.0</span> | |
| <span class="hljs-meta">>>> </span>context = torch.from_numpy(arr).permute(<span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>).unsqueeze(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">1</span>).to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>video = pipe( | |
| <span class="hljs-meta">... </span> prompt=<span class="hljs-string">"a cat walks across a sunlit lawn"</span>, | |
| <span class="hljs-meta">... </span> video=context, | |
| <span class="hljs-meta">... </span> num_inference_steps=<span class="hljs-number">4</span>, | |
| <span class="hljs-meta">... </span> num_frames=<span class="hljs-number">81</span>, | |
| <span class="hljs-meta">... </span>).frames[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>export_to_video(video, <span class="hljs-string">"anyflow_far.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"python",wrap:!1}}),{c(){s=c("p"),s.textContent=h,i=a(),y(f.$$.fragment)},l(m){s=d(m,"P",{"data-svelte-h":!0}),u(s)!=="svelte-kvfsh7"&&(s.textContent=h),i=l(m),g(f.$$.fragment,m)},m(m,p){r(m,s,p),r(m,i,p),_(f,m,p),v=!0},p:Le,i(m){v||(w(f.$$.fragment,m),v=!0)},o(m){M(f.$$.fragment,m),v=!1},d(m){m&&(t(s),t(i)),b(f,m)}}}function Yt(A){let s,h,i,f,v,m,p,j='<div class="flex flex-wrap space-x-1"><a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/loaders/lora_pipeline.py"><img alt="LoRA" src="https://img.shields.io/badge/LoRA-supported-green"/></a></div>',S,Z,q,D,tt='<a href="https://huggingface.co/papers/2605.13724" rel="nofollow">AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation</a> from NVIDIA, National University of Singapore, and Massachusetts Institute of Technology, by Yuchao Gu, Guian Fang, Yuxin Jiang, Weijia Mao, Song Han, Han Cai, Mike Zheng Shou.',Xe,Y,st="<p><strong>TL;DR:</strong> AnyFlow is the first any-step video diffusion framework built on flow maps, which enables a single model (bidirectional or causal) to adapt to arbitrary inference budgets.</p>",Se,O,ot="<em>Few-step video generation has been significantly advanced by consistency models. However, their performance often degrades in any-step video diffusion models due to the fixed-point formulation. To address this limitation, we present AnyFlow, the first any-step video diffusion distillation framework built on flow maps. Instead of learning only the mapping z_t → z_0, AnyFlow learns transitions z_t → z_r over arbitrary time intervals, enabling a single model to adapt to different inference budgets. We design an improved forward flow map training recipe that fine-tunes pretrained video diffusion models into flow map models, and introduce Flow Map Backward Simulation to enable on-policy distillation for flow map models. Extensive experiments across both bidirectional and causal architectures, at scales ranging from 1.3B to 14B, on text-to-video and image-to-video tasks demonstrate that AnyFlow outperforms consistency-based baselines while preserving high fidelity and flexible sampling under varying step budgets.</em>",qe,K,at='The AnyFlow pipelines were contributed by the AnyFlow Team. The original code is available on <a href="https://github.com/NVlabs/AnyFlow" rel="nofollow">GitHub</a>, the project page is at <a href="https://nvlabs.github.io/AnyFlow" rel="nofollow">nvlabs.github.io/AnyFlow</a>, and pretrained models can be found in the <a href="https://huggingface.co/collections/nvidia/anyflow" rel="nofollow">nvidia/anyflow</a> collection on Hugging Face.',De,ee,lt="Available Models:",Ye,ne,it='<thead><tr><th>Checkpoint</th> <th>Backbone</th> <th>Description</th></tr></thead> <tbody><tr><td><a href="https://huggingface.co/nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers" rel="nofollow"><code>nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers</code></a></td> <td>Wan2.1 1.3B</td> <td>Bidirectional T2V</td></tr> <tr><td><a href="https://huggingface.co/nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers" rel="nofollow"><code>nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers</code></a></td> <td>Wan2.1 14B</td> <td>Bidirectional T2V</td></tr> <tr><td><a href="https://huggingface.co/nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers" rel="nofollow"><code>nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers</code></a></td> <td>FAR + Wan2.1 1.3B</td> <td>Causal T2V / I2V / V2V</td></tr> <tr><td><a href="https://huggingface.co/nvidia/AnyFlow-FAR-Wan2.1-14B-Diffusers" rel="nofollow"><code>nvidia/AnyFlow-FAR-Wan2.1-14B-Diffusers</code></a></td> <td>FAR + Wan2.1 14B</td> <td>Causal T2V / I2V / V2V</td></tr></tbody>',Oe,N,rt="<p><code>AnyFlowPipeline</code> is designed for bidirectional diffusion models in text-to-video (T2V) generation. <code>AnyFlowFARPipeline</code> is a chunk-wise causal diffusion model that supports text-to-video (T2V) generation, image-to-video (I2V) generation, and video continuation (V2V).</p>",Ke,te,en,se,nn,oe,tn,ae,pt=`The causal pipeline selects between T2V / I2V / V2V via the <code>video</code> (or <code>video_latents</code>) argument: | |
| omit both for plain text-to-video, or pass <code>video=<tensor></code> of shape <code>(B, T, C, H, W)</code> in <code>[0, 1]</code> | |
| with <code>T = 4n + 1</code> to condition on existing frames. Use a single conditioning frame for I2V and a longer | |
| clip for V2V continuation. If you already have pre-encoded latents in the model layout, pass them via | |
| <code>video_latents=<tensor></code> to skip VAE encoding. <code>video</code> and <code>video_latents</code> are mutually exclusive.`,sn,E,ct=`<p>The released checkpoints bake <code>chunk_partition=[1, 3, 3, 3, 3, 3, 3, 2]</code> (sum 21) into the transformer | |
| config, matched to the canonical 81 raw frames (21 latent frames at the VAE temporal stride of 4). When | |
| you change <code>num_frames</code>, pass a matching <code>chunk_partition</code> summing to <code>(num_frames - 1) // 4 + 1</code>, | |
| otherwise the pipeline raises a <code>ValueError</code>.</p>`,on,z,an,le,ln,ie,dt='<li>Classifier-free guidance is fused into the released checkpoints, so inference does not run a second guided forward pass. Keep the default <code>guidance_scale=1.0</code> unless your own checkpoint requires otherwise.</li> <li><code>FlowMapEulerDiscreteScheduler</code> is general-purpose. You can attach it to any flow-map-distilled checkpoint via <code>from_pretrained(..., scheduler=FlowMapEulerDiscreteScheduler.from_config(...))</code>.</li> <li><code>AnyFlowPipeline</code> uses <a href="../models/anyflow_transformer3d"><code>AnyFlowTransformer3DModel</code></a> (bidirectional). <code>AnyFlowFARPipeline</code> uses <a href="../models/anyflow_far_transformer3d"><code>AnyFlowFARTransformer3DModel</code></a>, which adds a compressed-frame patch embedding and the FAR causal block-mask.</li> <li>LoRA loading is supported via <code>WanLoraLoaderMixin</code>, the same mixin used by the upstream Wan pipelines.</li> <li>For training recipes (forward flow-map training and on-policy distillation), refer to the original AnyFlow training framework at <a href="https://github.com/NVlabs/AnyFlow" rel="nofollow"><code>NVlabs/AnyFlow</code></a>; training is out of scope for diffusers.</li>',rn,re,pn,U,pe,Fn,ve,mt=`Bidirectional text-to-video generation pipeline for AnyFlow flow-map-distilled checkpoints, introduced in | |
| <a href="https://huggingface.co/papers/2605.13724" rel="nofollow">AnyFlow</a>.`,jn,C,An,cn,It='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>z</mi><mi>t</mi></msub><mo>→</mo><msub><mi>z</mi><mi>r</mi></msub></mrow><annotation encoding="application/x-tex">z_t \\to z_r</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.04398em;">z</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2806em;"><span style="top:-2.55em;margin-left:-0.044em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">t</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">→</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.04398em;">z</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:-0.044em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.02778em;">r</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',dn,mn,Bt='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>z</mi><mi>t</mi></msub><mo>→</mo><msub><mi>z</mi><mn>0</mn></msub></mrow><annotation encoding="application/x-tex">z_t \\to z_0</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.04398em;">z</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2806em;"><span style="top:-2.55em;margin-left:-0.044em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">t</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">→</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.04398em;">z</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:-0.044em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">0</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',un,Te,ut="AnyFlowFARPipeline",xn,kn,Ue,ft=`Sampling is plain Euler in mean-velocity form (<code>z_r = z_t - (t - r) * u</code>) with no re-noising. The released NVIDIA | |
| checkpoints fold classifier-free guidance into the model weights, so the default <code>guidance_scale=1.0</code> is the | |
| recommended setting.`,Cn,Je,ht=`This model inherits from [<em>DiffusionPipeline</em>]. Check the superclass documentation for the generic methods | |
| implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,$n,I,ce,Zn,Fe,yt="The call function to the pipeline for generation.",In,Q,Bn,H,de,Gn,je,gt="Encodes the prompt into text encoder hidden states.",Wn,B,me,Rn,Ae,_t="Encode a pixel-space video into AnyFlow’s latent layout.",Vn,xe,wt=`Mirrors the single-helper convention of other diffusers pipelines (cf. | |
| <code>WanImageToVideoPipeline.encode_image</code>): wraps preprocessing, VAE encoding, and latent normalization into one | |
| call. Output layout is <code>(B, T_latent, C, H, W)</code>, which is what the AnyFlow transformer expects for | |
| conditioning frames.`,fn,ue,hn,T,fe,Pn,ke,Mt=`Causal (FAR-based) text-to-video / image-to-video / video-to-video pipeline for AnyFlow checkpoints, introduced in | |
| <a href="https://huggingface.co/papers/2605.13724" rel="nofollow">AnyFlow</a>.`,Nn,Ce,bt=`The pipeline drives a chunk-wise autoregressive sampling loop: each chunk is denoised with flow-map steps while | |
| attending only to past chunks via block-sparse causal attention, and intermediate KV cache is reused across chunks.`,En,$e,vt="The task mode (T2V / I2V / V2V) is selected by which conditioning argument is passed to <code>__call__</code>:",zn,Ze,Tt=`<li>both <code>video=None</code> and <code>video_latents=None</code> — pure text-to-video.</li> <li><code>video=<tensor of shape (B, T, C, H, W) in [0, 1] with T = 4n + 1></code> — pre-VAE conditioning frames; the pipeline | |
| VAE-encodes them. Pass a single-frame video for I2V or a multi-frame clip for V2V.</li> <li><code>video_latents=<latent tensor of shape (B, T_latent, C, H_latent, W_latent)></code> — already-encoded latents in the | |
| FAR layout (skips the VAE encode step).</li>`,Qn,Ie,Ut=`The FAR backbone is the causal Wan2.1 variant introduced by <a href="https://huggingface.co/papers/2503.19325" rel="nofollow">FAR</a>. | |
| Inference is plain Euler in mean-velocity form per chunk with no re-noising. Joint T2V / I2V / V2V is supported by | |
| a single distilled model.`,Hn,Be,Jt=`This model inherits from [<em>DiffusionPipeline</em>]. Check the superclass documentation for the generic methods | |
| implemented for all pipelines (downloading, saving, running on a particular device, etc.).`,Ln,G,he,Xn,Ge,Ft="The call function to the pipeline for generation.",Sn,L,qn,X,ye,Dn,We,jt="Encodes the prompt into text encoder hidden states.",Yn,W,ge,On,Re,At="Encode a pixel-space video into AnyFlow’s latent layout.",Kn,Ve,xt=`Mirrors the single-helper convention of other diffusers pipelines (cf. | |
| <code>WanImageToVideoPipeline.encode_image</code>): wraps preprocessing, VAE encoding, and latent normalization into one | |
| call. Output layout is <code>(B, T_latent, C, H, W)</code>, which is what the AnyFlow transformer expects for | |
| conditioning frames.`,yn,_e,gn,R,we,et,Pe,kt="Output class for AnyFlow pipelines.",_n,Me,wn,He,Mn;return v=new Et({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),Z=new be({props:{title:"AnyFlow",local:"anyflow",headingTag:"h1"}}),te=new be({props:{title:"Generation with AnyFlow (Bidirectional T2V)",local:"generation-with-anyflow-bidirectional-t2v",headingTag:"h3"}}),se=new Qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctV2FuMi4xLVQyVi0xLjNCLURpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwKCUwQSUyMCUyMCUyMCUyMCUyMkFuJTIwYXN0cm9uYXV0JTIwcnVucyUyMHNtb290aGx5JTIwYW5kJTIwYXBwZWFycyUyMGFsbW9zdCUyMHdlaWdodGxlc3MlMjBvbiUyMHRoZSUyMGx1bmFyJTIwc3VyZmFjZSUyQyUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMmFzJTIwc2VlbiUyMGZyb20lMjBhJTIwbG93LWFuZ2xlJTIwc2hvdCUyMHRoYXQlMjBoaWdobGlnaHRzJTIwdGhlJTIwdmFzdCUyQyUyMGRlc29sYXRlJTIwYmFja2dyb3VuZCUyMG9mJTIwdGhlJTIwbW9vbi4lMjAlMjIlMEElMjAlMjAlMjAlMjAlMjJUaGUlMjBtb29uJ3MlMjBjcmF0ZXJzJTIwYW5kJTIwcm9ja3klMjB0ZXJyYWluJTIwYXJlJTIwY2xlYXJseSUyMHZpc2libGUlMkMlMjBjcmVhdGluZyUyMGElMjBzdGFyayUyMGNvbnRyYXN0JTIwYWdhaW5zdCUyMCUyMiUwQSUyMCUyMCUyMCUyMCUyMnRoZSUyMHJ1bm5pbmclMjBhc3Ryb25hdXQlMjB3aG8lMjBtb3ZlcyUyMHdpdGglMjBncmFjZWZ1bCUyQyUyMGZsdWlkJTIwbW90aW9ucy4lMjIlMEEpJTBBdmlkZW8lMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q0JTJDJTIwbnVtX2ZyYW1lcyUzRDgxKS5mcmFtZXMlNUIwJTVEJTBBZXhwb3J0X3RvX3ZpZGVvKHZpZGVvJTJDJTIwJTIyYW55Zmxvd190MnYubXA0JTIyJTJDJTIwZnBzJTNEMTYp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowPipeline | |
| <span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| pipe = AnyFlowPipeline.from_pretrained( | |
| <span class="hljs-string">"nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers"</span>, torch_dtype=torch.bfloat16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| prompt = ( | |
| <span class="hljs-string">"An astronaut runs smoothly and appears almost weightless on the lunar surface, "</span> | |
| <span class="hljs-string">"as seen from a low-angle shot that highlights the vast, desolate background of the moon. "</span> | |
| <span class="hljs-string">"The moon's craters and rocky terrain are clearly visible, creating a stark contrast against "</span> | |
| <span class="hljs-string">"the running astronaut who moves with graceful, fluid motions."</span> | |
| ) | |
| video = pipe(prompt, num_inference_steps=<span class="hljs-number">4</span>, num_frames=<span class="hljs-number">81</span>).frames[<span class="hljs-number">0</span>] | |
| export_to_video(video, <span class="hljs-string">"anyflow_t2v.mp4"</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),oe=new be({props:{title:"Generation with AnyFlow (FAR Causal)",local:"generation-with-anyflow-far-causal",headingTag:"h3"}}),z=new Qt({props:{id:"anyflow-far",options:["t2v","i2v","v2v"],$$slots:{default:[St]},$$scope:{ctx:A}}}),le=new be({props:{title:"Notes",local:"notes",headingTag:"h2"}}),re=new be({props:{title:"AnyFlowPipeline",local:"diffusers.AnyFlowPipeline",headingTag:"h2"}}),pe=new P({props:{name:"class diffusers.AnyFlowPipeline",anchor:"diffusers.AnyFlowPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"transformer",val:": AnyFlowTransformer3DModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMapEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.AnyFlowPipeline.tokenizer",description:`<strong>tokenizer</strong> ([<em>AutoTokenizer</em>]) — | |
| Tokenizer from <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a>.`,name:"tokenizer"},{anchor:"diffusers.AnyFlowPipeline.text_encoder",description:`<strong>text_encoder</strong> ([<em>UMT5EncoderModel</em>]) — | |
| <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> text encoder.`,name:"text_encoder"},{anchor:"diffusers.AnyFlowPipeline.transformer",description:`<strong>transformer</strong> ([<em>AnyFlowTransformer3DModel</em>]) — | |
| Bidirectional flow-map 3D Transformer.`,name:"transformer"},{anchor:"diffusers.AnyFlowPipeline.vae",description:`<strong>vae</strong> ([<em>AutoencoderKLWan</em>]) — | |
| VAE that encodes/decodes videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.AnyFlowPipeline.scheduler",description:`<strong>scheduler</strong> ([<em>FlowMapEulerDiscreteScheduler</em>]) — | |
| Flow-map sampler. The pipeline drives <code>scheduler.step(..., timestep, sample, r_timestep)</code> per inference | |
| step.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L80"}}),ce=new P({props:{name:"__call__",anchor:"diffusers.AnyFlowPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"video",val:": typing.Optional[torch.Tensor] = None"},{name:"video_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_frames",val:": int = 81"},{name:"num_inference_steps",val:": int = 50"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 1.0"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"},{name:"use_mean_velocity",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AnyFlowPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the video generation. If not defined, pass <code>prompt_embeds</code> instead.`,name:"prompt"},{anchor:"diffusers.AnyFlowPipeline.__call__.video",description:`<strong>video</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-VAE conditioning frames of shape <code>(B, T, C, H, W)</code> in <code>[0, 1]</code>. When provided, the pipeline | |
| VAE-encodes them and keeps the corresponding latent prefix fixed during sampling. Mutually exclusive | |
| with <code>video_latents</code>.`,name:"video"},{anchor:"diffusers.AnyFlowPipeline.__call__.video_latents",description:`<strong>video_latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-encoded VAE latents in the AnyFlow layout <code>(B, T_latent, C, H_latent, W_latent)</code>. Skips VAE | |
| encoding on the pipeline side. Mutually exclusive with <code>video</code>.`,name:"video_latents"},{anchor:"diffusers.AnyFlowPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to avoid during video generation. Ignored when not using guidance | |
| (<code>guidance_scale < 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AnyFlowPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) — | |
| The height in pixels of the generated video.`,name:"height"},{anchor:"diffusers.AnyFlowPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) — | |
| The width in pixels of the generated video.`,name:"width"},{anchor:"diffusers.AnyFlowPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) — | |
| The number of frames in the generated video. Must satisfy <code>(num_frames - 1) % vae_scale_factor_temporal == 0</code>.`,name:"num_frames"},{anchor:"diffusers.AnyFlowPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) — | |
| The number of denoising steps. Distilled AnyFlow checkpoints support any-step sampling, so values as | |
| low as <code>1</code>, <code>2</code>, <code>4</code>, or <code>8</code> are typical. Ignored when <code>sigmas</code> or <code>timesteps</code> is provided.`,name:"num_inference_steps"},{anchor:"diffusers.AnyFlowPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) — | |
| Custom sigma schedule for any-step sampling, in <code>[0, 1]</code> and ordered from noisy to clean. Length | |
| determines the effective <code>num_inference_steps</code>; the scheduler appends the terminal <code>0</code> sigma.`,name:"sigmas"},{anchor:"diffusers.AnyFlowPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[float]</code>, <em>optional</em>) — | |
| Custom timestep schedule for any-step sampling, in the same units as <code>self.scheduler.timesteps</code> (i.e. | |
| scaled by <code>num_train_timesteps</code>). Mutually exclusive with <code>sigmas</code>.`,name:"timesteps"},{anchor:"diffusers.AnyFlowPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) — | |
| Classifier-free guidance scale. The released AnyFlow checkpoints fuse CFG into the weights during | |
| training; keep at <code>1.0</code> unless you know your checkpoint expects otherwise.`,name:"guidance_scale"},{anchor:"diffusers.AnyFlowPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) — | |
| The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.AnyFlowPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| 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.AnyFlowPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents to use as inputs. If not provided, latents are sampled from the supplied | |
| <code>generator</code>.`,name:"latents"},{anchor:"diffusers.AnyFlowPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to tweak text inputs (e.g., prompt weighting). If not | |
| provided, embeddings are generated from <code>prompt</code>.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"np"</code>) — | |
| The output format. One of <code>"pil"</code>, <code>"np"</code>, <code>"pt"</code>, or <code>"latent"</code>.`,name:"output_type"},{anchor:"diffusers.AnyFlowPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to return an <code>AnyFlowPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.AnyFlowPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.AnyFlowPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function or <code>PipelineCallback</code> called at the end of each inference step. See | |
| <a href="../callbacks"><code>callbacks</code></a> for details.`,name:"callback_on_step_end"},{anchor:"diffusers.AnyFlowPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>["latents"]</code>) — | |
| The tensor inputs forwarded to the callback. Must be a subset of <code>self._callback_tensor_inputs</code>.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.AnyFlowPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) — | |
| The maximum text-encoder sequence length. Longer prompts are truncated.`,name:"max_sequence_length"},{anchor:"diffusers.AnyFlowPipeline.__call__.use_mean_velocity",description:`<strong>use_mean_velocity</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| When <code>True</code>, the flow-map model is conditioned on both the source timestep <code>t</code> and the target timestep | |
| <code>r</code> to predict a mean velocity, matching the training-time behavior. Disable to mirror raw Euler | |
| stepping (<code>r = t</code>).`,name:"use_mean_velocity"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L379",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <code>AnyFlowPipelineOutput</code> is returned, otherwise a <code>tuple</code> whose first | |
| element is the generated video.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~AnyFlowPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),Q=new Zt({props:{anchor:"diffusers.AnyFlowPipeline.__call__.example",$$slots:{default:[qt]},$$scope:{ctx:A}}}),de=new P({props:{name:"encode_prompt",anchor:"diffusers.AnyFlowPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": torch.device | None = None"},{name:"dtype",val:": torch.dtype | None = None"}],parametersDescription:[{anchor:"diffusers.AnyFlowPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| 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.AnyFlowPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device`,name:"device"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> — (<code>torch.dtype</code>, <em>optional</em>): | |
| torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L179"}}),me=new P({props:{name:"encode_video",anchor:"diffusers.AnyFlowPipeline.encode_video",parameters:[{name:"video",val:": Tensor"},{name:"height",val:": int"},{name:"width",val:": int"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L359"}}),ue=new be({props:{title:"AnyFlowFARPipeline",local:"diffusers.AnyFlowFARPipeline",headingTag:"h2"}}),fe=new P({props:{name:"class diffusers.AnyFlowFARPipeline",anchor:"diffusers.AnyFlowFARPipeline",parameters:[{name:"tokenizer",val:": AutoTokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"transformer",val:": AnyFlowFARTransformer3DModel"},{name:"vae",val:": AutoencoderKLWan"},{name:"scheduler",val:": FlowMapEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.AnyFlowFARPipeline.tokenizer",description:`<strong>tokenizer</strong> ([<em>AutoTokenizer</em>]) — | |
| Tokenizer from <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a>.`,name:"tokenizer"},{anchor:"diffusers.AnyFlowFARPipeline.text_encoder",description:`<strong>text_encoder</strong> ([<em>UMT5EncoderModel</em>]) — | |
| <a href="https://huggingface.co/google/umt5-xxl" rel="nofollow">google/umt5-xxl</a> text encoder.`,name:"text_encoder"},{anchor:"diffusers.AnyFlowFARPipeline.transformer",description:`<strong>transformer</strong> ([<em>AnyFlowFARTransformer3DModel</em>]) — | |
| FAR causal flow-map 3D Transformer.`,name:"transformer"},{anchor:"diffusers.AnyFlowFARPipeline.vae",description:`<strong>vae</strong> ([<em>AutoencoderKLWan</em>]) — | |
| VAE that encodes/decodes videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.AnyFlowFARPipeline.scheduler",description:`<strong>scheduler</strong> ([<em>FlowMapEulerDiscreteScheduler</em>]) — | |
| Flow-map sampler.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L92"}}),he=new P({props:{name:"__call__",anchor:"diffusers.AnyFlowFARPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"video",val:": typing.Optional[torch.Tensor] = None"},{name:"video_latents",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"height",val:": int = 480"},{name:"width",val:": int = 832"},{name:"num_frames",val:": int = 81"},{name:"num_inference_steps",val:": int = 50"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"timesteps",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 1.0"},{name:"num_videos_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.Tensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'np'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int, typing.Dict], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 512"},{name:"use_mean_velocity",val:": bool = True"},{name:"use_kv_cache",val:": bool = True"},{name:"chunk_partition",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"diffusers.AnyFlowFARPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the video generation. If not defined, pass <code>prompt_embeds</code> instead.`,name:"prompt"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.video",description:`<strong>video</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-VAE conditioning frames of shape <code>(B, T, C, H, W)</code> in <code>[0, 1]</code> (<code>T = 4n + 1</code>). When provided, the | |
| pipeline VAE-encodes them and keeps the corresponding latent prefix fixed during sampling. Mutually | |
| exclusive with <code>video_latents</code>.`,name:"video"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.video_latents",description:`<strong>video_latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-encoded VAE latents in the FAR layout <code>(B, T_latent, C, H_latent, W_latent)</code>. Skips VAE encoding on | |
| the pipeline side. Mutually exclusive with <code>video</code>.`,name:"video_latents"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to avoid during video generation. Ignored when not using guidance | |
| (<code>guidance_scale < 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) — | |
| The height in pixels of the generated video.`,name:"height"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, defaults to <code>832</code>) — | |
| The width in pixels of the generated video.`,name:"width"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, defaults to <code>81</code>) — | |
| The number of frames in the generated video. Must satisfy <code>(num_frames - 1) % vae_scale_factor_temporal == 0</code>.`,name:"num_frames"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>50</code>) — | |
| The number of denoising steps per chunk. Distilled AnyFlow-FAR checkpoints support any-step sampling | |
| (1, 2, 4, 8, …). Ignored when <code>sigmas</code> or <code>timesteps</code> is provided.`,name:"num_inference_steps"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) — | |
| Custom sigma schedule for any-step sampling, in <code>[0, 1]</code> and ordered from noisy to clean. Length | |
| determines the effective <code>num_inference_steps</code>; the scheduler appends the terminal <code>0</code> sigma.`,name:"sigmas"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>List[float]</code>, <em>optional</em>) — | |
| Custom timestep schedule for any-step sampling, in the same units as <code>self.scheduler.timesteps</code> (i.e. | |
| scaled by <code>num_train_timesteps</code>). Mutually exclusive with <code>sigmas</code>.`,name:"timesteps"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) — | |
| Classifier-free guidance scale. The released AnyFlow checkpoints fuse CFG into the weights during | |
| training; keep at <code>1.0</code> unless the checkpoint requires otherwise.`,name:"guidance_scale"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) — | |
| The number of videos to generate per prompt.`,name:"num_videos_per_prompt"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) — | |
| Generator used to seed sampling.`,name:"generator"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents. If not provided, latents are sampled from the supplied <code>generator</code>.`,name:"latents"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. If not provided, embeddings are generated from <code>prompt</code>.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"np"</code>) — | |
| Output format. One of <code>"pil"</code>, <code>"np"</code>, <code>"pt"</code>, or <code>"latent"</code>.`,name:"output_type"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to return an <code>AnyFlowPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function or <code>PipelineCallback</code> called at the end of each inference step.`,name:"callback_on_step_end"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>["latents"]</code>) — | |
| Tensor inputs forwarded to the callback. Must be a subset of <code>self._callback_tensor_inputs</code>.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.max_sequence_length",description:`<strong>max_sequence_length</strong> (<code>int</code>, defaults to <code>512</code>) — | |
| The maximum text-encoder sequence length.`,name:"max_sequence_length"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.use_mean_velocity",description:`<strong>use_mean_velocity</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| When <code>True</code>, condition the flow-map model on both the source timestep <code>t</code> and the target timestep <code>r</code> | |
| to predict a mean velocity. Disable to mirror raw Euler stepping.`,name:"use_mean_velocity"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.use_kv_cache",description:`<strong>use_kv_cache</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| Reuse the FAR attention KV cache across causal chunks. Disable only for debugging.`,name:"use_kv_cache"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.chunk_partition",description:`<strong>chunk_partition</strong> (<code>List[int]</code>, <em>optional</em>) — | |
| Per-chunk frame counts. Defaults to <code>self.transformer.config.chunk_partition</code> (matched to the released | |
| 81-frame checkpoints). When you change <code>num_frames</code>, supply a <code>chunk_partition</code> that sums to | |
| <code>(num_frames - 1) // vae_scale_factor_temporal + 1</code>.`,name:"chunk_partition"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L447",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, an <code>AnyFlowPipelineOutput</code> is returned, otherwise a <code>tuple</code> whose first | |
| element is the generated video.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~AnyFlowPipelineOutput</code> or <code>tuple</code></p> | |
| `}}),L=new Zt({props:{anchor:"diffusers.AnyFlowFARPipeline.__call__.example",$$slots:{default:[Dt]},$$scope:{ctx:A}}}),ye=new P({props:{name:"encode_prompt",anchor:"diffusers.AnyFlowFARPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_videos_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"max_sequence_length",val:": int = 226"},{name:"device",val:": torch.device | None = None"},{name:"dtype",val:": torch.dtype | None = None"}],parametersDescription:[{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| 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.AnyFlowFARPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to use classifier free guidance or not.`,name:"do_classifier_free_guidance"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.num_videos_per_prompt",description:`<strong>num_videos_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| Number of videos that should be generated per prompt. torch device to place the resulting embeddings on`,name:"num_videos_per_prompt"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device`,name:"device"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> — (<code>torch.dtype</code>, <em>optional</em>): | |
| torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L196"}}),ge=new P({props:{name:"encode_video",anchor:"diffusers.AnyFlowFARPipeline.encode_video",parameters:[{name:"video",val:": Tensor"},{name:"height",val:": int"},{name:"width",val:": int"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L379"}}),_e=new be({props:{title:"AnyFlowPipelineOutput",local:"diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput",headingTag:"h2"}}),we=new P({props:{name:"class diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput",anchor:"diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput",parameters:[{name:"frames",val:": Tensor"}],parametersDescription:[{anchor:"diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput.frames",description:`<strong>frames</strong> (<code>torch.Tensor</code>, <code>np.ndarray</code>, or list[list[PIL.Image.Image]]) — | |
| list of video outputs - It can be a nested list of length <code>batch_size,</code> with each sub-list containing | |
| denoised PIL image sequences of length <code>num_frames.</code> It can also be a NumPy array or Torch tensor of shape | |
| <code>(batch_size, num_frames, channels, height, width)</code>.`,name:"frames"}],source:"https://github.com/huggingface/diffusers/blob/vr_13822/src/diffusers/pipelines/anyflow/pipeline_output.py#L23"}}),Me=new zt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/anyflow.md"}}),{c(){s=c("meta"),h=a(),i=c("p"),f=a(),y(v.$$.fragment),m=a(),p=c("div"),p.innerHTML=j,S=a(),y(Z.$$.fragment),q=a(),D=c("p"),D.innerHTML=tt,Xe=a(),Y=c("blockquote"),Y.innerHTML=st,Se=a(),O=c("p"),O.innerHTML=ot,qe=a(),K=c("p"),K.innerHTML=at,De=a(),ee=c("p"),ee.textContent=lt,Ye=a(),ne=c("table"),ne.innerHTML=it,Oe=a(),N=c("blockquote"),N.innerHTML=rt,Ke=a(),y(te.$$.fragment),en=a(),y(se.$$.fragment),nn=a(),y(oe.$$.fragment),tn=a(),ae=c("p"),ae.innerHTML=pt,sn=a(),E=c("blockquote"),E.innerHTML=ct,on=a(),y(z.$$.fragment),an=a(),y(le.$$.fragment),ln=a(),ie=c("ul"),ie.innerHTML=dt,rn=a(),y(re.$$.fragment),pn=a(),U=c("div"),y(pe.$$.fragment),Fn=a(),ve=c("p"),ve.innerHTML=mt,jn=a(),C=c("p"),An=Un("AnyFlow learns arbitrary-interval transitions"),cn=new Ct(!1),dn=Un(" rather than the fixed"),mn=new Ct(!1),un=Un(` mapping | |
| of consistency models, so a single distilled checkpoint can be evaluated at 1, 2, 4, 8, 16… NFE without | |
| retraining. This pipeline operates over the full video tensor in one bidirectional pass; for chunk-wise | |
| autoregressive (causal) generation use `),Te=c("code"),Te.textContent=ut,xn=Un("."),kn=a(),Ue=c("p"),Ue.innerHTML=ft,Cn=a(),Je=c("p"),Je.innerHTML=ht,$n=a(),I=c("div"),y(ce.$$.fragment),Zn=a(),Fe=c("p"),Fe.textContent=yt,In=a(),y(Q.$$.fragment),Bn=a(),H=c("div"),y(de.$$.fragment),Gn=a(),je=c("p"),je.textContent=gt,Wn=a(),B=c("div"),y(me.$$.fragment),Rn=a(),Ae=c("p"),Ae.textContent=_t,Vn=a(),xe=c("p"),xe.innerHTML=wt,fn=a(),y(ue.$$.fragment),hn=a(),T=c("div"),y(fe.$$.fragment),Pn=a(),ke=c("p"),ke.innerHTML=Mt,Nn=a(),Ce=c("p"),Ce.textContent=bt,En=a(),$e=c("p"),$e.innerHTML=vt,zn=a(),Ze=c("ul"),Ze.innerHTML=Tt,Qn=a(),Ie=c("p"),Ie.innerHTML=Ut,Hn=a(),Be=c("p"),Be.innerHTML=Jt,Ln=a(),G=c("div"),y(he.$$.fragment),Xn=a(),Ge=c("p"),Ge.textContent=Ft,Sn=a(),y(L.$$.fragment),qn=a(),X=c("div"),y(ye.$$.fragment),Dn=a(),We=c("p"),We.textContent=jt,Yn=a(),W=c("div"),y(ge.$$.fragment),On=a(),Re=c("p"),Re.textContent=At,Kn=a(),Ve=c("p"),Ve.innerHTML=xt,yn=a(),y(_e.$$.fragment),gn=a(),R=c("div"),y(we.$$.fragment),et=a(),Pe=c("p"),Pe.textContent=kt,_n=a(),y(Me.$$.fragment),wn=a(),He=c("p"),this.h()},l(e){const n=Pt("svelte-u9bgzb",document.head);s=d(n,"META",{name:!0,content:!0}),n.forEach(t),h=l(e),i=d(e,"P",{}),k(i).forEach(t),f=l(e),g(v.$$.fragment,e),m=l(e),p=d(e,"DIV",{style:!0,"data-svelte-h":!0}),u(p)!=="svelte-1aq9wr9"&&(p.innerHTML=j),S=l(e),g(Z.$$.fragment,e),q=l(e),D=d(e,"P",{"data-svelte-h":!0}),u(D)!=="svelte-qmpkmt"&&(D.innerHTML=tt),Xe=l(e),Y=d(e,"BLOCKQUOTE",{"data-svelte-h":!0}),u(Y)!=="svelte-c5833j"&&(Y.innerHTML=st),Se=l(e),O=d(e,"P",{"data-svelte-h":!0}),u(O)!=="svelte-h6gs9e"&&(O.innerHTML=ot),qe=l(e),K=d(e,"P",{"data-svelte-h":!0}),u(K)!=="svelte-1anb5yd"&&(K.innerHTML=at),De=l(e),ee=d(e,"P",{"data-svelte-h":!0}),u(ee)!=="svelte-kc0ge7"&&(ee.textContent=lt),Ye=l(e),ne=d(e,"TABLE",{"data-svelte-h":!0}),u(ne)!=="svelte-qom90v"&&(ne.innerHTML=it),Oe=l(e),N=d(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),u(N)!=="svelte-1ieyb9r"&&(N.innerHTML=rt),Ke=l(e),g(te.$$.fragment,e),en=l(e),g(se.$$.fragment,e),nn=l(e),g(oe.$$.fragment,e),tn=l(e),ae=d(e,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-14uyjbc"&&(ae.innerHTML=pt),sn=l(e),E=d(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),u(E)!=="svelte-dh2knh"&&(E.innerHTML=ct),on=l(e),g(z.$$.fragment,e),an=l(e),g(le.$$.fragment,e),ln=l(e),ie=d(e,"UL",{"data-svelte-h":!0}),u(ie)!=="svelte-1dplx07"&&(ie.innerHTML=dt),rn=l(e),g(re.$$.fragment,e),pn=l(e),U=d(e,"DIV",{class:!0});var F=k(U);g(pe.$$.fragment,F),Fn=l(F),ve=d(F,"P",{"data-svelte-h":!0}),u(ve)!=="svelte-1j4p51p"&&(ve.innerHTML=mt),jn=l(F),C=d(F,"P",{});var $=k(C);An=Jn($,"AnyFlow learns arbitrary-interval transitions"),cn=$t($,!1),dn=Jn($," rather than the fixed"),mn=$t($,!1),un=Jn($,` mapping | |
| of consistency models, so a single distilled checkpoint can be evaluated at 1, 2, 4, 8, 16… NFE without | |
| retraining. This pipeline operates over the full video tensor in one bidirectional pass; for chunk-wise | |
| autoregressive (causal) generation use `),Te=d($,"CODE",{"data-svelte-h":!0}),u(Te)!=="svelte-1i1aby9"&&(Te.textContent=ut),xn=Jn($,"."),$.forEach(t),kn=l(F),Ue=d(F,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-dkbgur"&&(Ue.innerHTML=ft),Cn=l(F),Je=d(F,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-1cama1m"&&(Je.innerHTML=ht),$n=l(F),I=d(F,"DIV",{class:!0});var V=k(I);g(ce.$$.fragment,V),Zn=l(V),Fe=d(V,"P",{"data-svelte-h":!0}),u(Fe)!=="svelte-50j04k"&&(Fe.textContent=yt),In=l(V),g(Q.$$.fragment,V),V.forEach(t),Bn=l(F),H=d(F,"DIV",{class:!0});var bn=k(H);g(de.$$.fragment,bn),Gn=l(bn),je=d(bn,"P",{"data-svelte-h":!0}),u(je)!=="svelte-16q0ax1"&&(je.textContent=gt),bn.forEach(t),Wn=l(F),B=d(F,"DIV",{class:!0});var Ne=k(B);g(me.$$.fragment,Ne),Rn=l(Ne),Ae=d(Ne,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-1bk09z5"&&(Ae.textContent=_t),Vn=l(Ne),xe=d(Ne,"P",{"data-svelte-h":!0}),u(xe)!=="svelte-soi4bz"&&(xe.innerHTML=wt),Ne.forEach(t),F.forEach(t),fn=l(e),g(ue.$$.fragment,e),hn=l(e),T=d(e,"DIV",{class:!0});var J=k(T);g(fe.$$.fragment,J),Pn=l(J),ke=d(J,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-tzopax"&&(ke.innerHTML=Mt),Nn=l(J),Ce=d(J,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-kt54yw"&&(Ce.textContent=bt),En=l(J),$e=d(J,"P",{"data-svelte-h":!0}),u($e)!=="svelte-s5pnn6"&&($e.innerHTML=vt),zn=l(J),Ze=d(J,"UL",{"data-svelte-h":!0}),u(Ze)!=="svelte-kk9xrh"&&(Ze.innerHTML=Tt),Qn=l(J),Ie=d(J,"P",{"data-svelte-h":!0}),u(Ie)!=="svelte-1iby0mh"&&(Ie.innerHTML=Ut),Hn=l(J),Be=d(J,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-1cama1m"&&(Be.innerHTML=Jt),Ln=l(J),G=d(J,"DIV",{class:!0});var Ee=k(G);g(he.$$.fragment,Ee),Xn=l(Ee),Ge=d(Ee,"P",{"data-svelte-h":!0}),u(Ge)!=="svelte-50j04k"&&(Ge.textContent=Ft),Sn=l(Ee),g(L.$$.fragment,Ee),Ee.forEach(t),qn=l(J),X=d(J,"DIV",{class:!0});var vn=k(X);g(ye.$$.fragment,vn),Dn=l(vn),We=d(vn,"P",{"data-svelte-h":!0}),u(We)!=="svelte-16q0ax1"&&(We.textContent=jt),vn.forEach(t),Yn=l(J),W=d(J,"DIV",{class:!0});var ze=k(W);g(ge.$$.fragment,ze),On=l(ze),Re=d(ze,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-1bk09z5"&&(Re.textContent=At),Kn=l(ze),Ve=d(ze,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-soi4bz"&&(Ve.innerHTML=xt),ze.forEach(t),J.forEach(t),yn=l(e),g(_e.$$.fragment,e),gn=l(e),R=d(e,"DIV",{class:!0});var Tn=k(R);g(we.$$.fragment,Tn),et=l(Tn),Pe=d(Tn,"P",{"data-svelte-h":!0}),u(Pe)!=="svelte-vsp4oj"&&(Pe.textContent=kt),Tn.forEach(t),_n=l(e),g(Me.$$.fragment,e),wn=l(e),He=d(e,"P",{}),k(He).forEach(t),this.h()},h(){x(s,"name","hf:doc:metadata"),x(s,"content",Ot),Nt(p,"float","right"),x(N,"class","tip"),x(E,"class","important"),cn.a=dn,mn.a=un,x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){o(document.head,s),r(e,h,n),r(e,i,n),r(e,f,n),_(v,e,n),r(e,m,n),r(e,p,n),r(e,S,n),_(Z,e,n),r(e,q,n),r(e,D,n),r(e,Xe,n),r(e,Y,n),r(e,Se,n),r(e,O,n),r(e,qe,n),r(e,K,n),r(e,De,n),r(e,ee,n),r(e,Ye,n),r(e,ne,n),r(e,Oe,n),r(e,N,n),r(e,Ke,n),_(te,e,n),r(e,en,n),_(se,e,n),r(e,nn,n),_(oe,e,n),r(e,tn,n),r(e,ae,n),r(e,sn,n),r(e,E,n),r(e,on,n),_(z,e,n),r(e,an,n),_(le,e,n),r(e,ln,n),r(e,ie,n),r(e,rn,n),_(re,e,n),r(e,pn,n),r(e,U,n),_(pe,U,null),o(U,Fn),o(U,ve),o(U,jn),o(U,C),o(C,An),cn.m(It,C),o(C,dn),mn.m(Bt,C),o(C,un),o(C,Te),o(C,xn),o(U,kn),o(U,Ue),o(U,Cn),o(U,Je),o(U,$n),o(U,I),_(ce,I,null),o(I,Zn),o(I,Fe),o(I,In),_(Q,I,null),o(U,Bn),o(U,H),_(de,H,null),o(H,Gn),o(H,je),o(U,Wn),o(U,B),_(me,B,null),o(B,Rn),o(B,Ae),o(B,Vn),o(B,xe),r(e,fn,n),_(ue,e,n),r(e,hn,n),r(e,T,n),_(fe,T,null),o(T,Pn),o(T,ke),o(T,Nn),o(T,Ce),o(T,En),o(T,$e),o(T,zn),o(T,Ze),o(T,Qn),o(T,Ie),o(T,Hn),o(T,Be),o(T,Ln),o(T,G),_(he,G,null),o(G,Xn),o(G,Ge),o(G,Sn),_(L,G,null),o(T,qn),o(T,X),_(ye,X,null),o(X,Dn),o(X,We),o(T,Yn),o(T,W),_(ge,W,null),o(W,On),o(W,Re),o(W,Kn),o(W,Ve),r(e,yn,n),_(_e,e,n),r(e,gn,n),r(e,R,n),_(we,R,null),o(R,et),o(R,Pe),r(e,_n,n),_(Me,e,n),r(e,wn,n),r(e,He,n),Mn=!0},p(e,[n]){const F={};n&2&&(F.$$scope={dirty:n,ctx:e}),z.$set(F);const $={};n&2&&($.$$scope={dirty:n,ctx:e}),Q.$set($);const V={};n&2&&(V.$$scope={dirty:n,ctx:e}),L.$set(V)},i(e){Mn||(w(v.$$.fragment,e),w(Z.$$.fragment,e),w(te.$$.fragment,e),w(se.$$.fragment,e),w(oe.$$.fragment,e),w(z.$$.fragment,e),w(le.$$.fragment,e),w(re.$$.fragment,e),w(pe.$$.fragment,e),w(ce.$$.fragment,e),w(Q.$$.fragment,e),w(de.$$.fragment,e),w(me.$$.fragment,e),w(ue.$$.fragment,e),w(fe.$$.fragment,e),w(he.$$.fragment,e),w(L.$$.fragment,e),w(ye.$$.fragment,e),w(ge.$$.fragment,e),w(_e.$$.fragment,e),w(we.$$.fragment,e),w(Me.$$.fragment,e),Mn=!0)},o(e){M(v.$$.fragment,e),M(Z.$$.fragment,e),M(te.$$.fragment,e),M(se.$$.fragment,e),M(oe.$$.fragment,e),M(z.$$.fragment,e),M(le.$$.fragment,e),M(re.$$.fragment,e),M(pe.$$.fragment,e),M(ce.$$.fragment,e),M(Q.$$.fragment,e),M(de.$$.fragment,e),M(me.$$.fragment,e),M(ue.$$.fragment,e),M(fe.$$.fragment,e),M(he.$$.fragment,e),M(L.$$.fragment,e),M(ye.$$.fragment,e),M(ge.$$.fragment,e),M(_e.$$.fragment,e),M(we.$$.fragment,e),M(Me.$$.fragment,e),Mn=!1},d(e){e&&(t(h),t(i),t(f),t(m),t(p),t(S),t(q),t(D),t(Xe),t(Y),t(Se),t(O),t(qe),t(K),t(De),t(ee),t(Ye),t(ne),t(Oe),t(N),t(Ke),t(en),t(nn),t(tn),t(ae),t(sn),t(E),t(on),t(an),t(ln),t(ie),t(rn),t(pn),t(U),t(fn),t(hn),t(T),t(yn),t(gn),t(R),t(_n),t(wn),t(He)),t(s),b(v,e),b(Z,e),b(te,e),b(se,e),b(oe,e),b(z,e),b(le,e),b(re,e),b(pe),b(ce),b(Q),b(de),b(me),b(ue,e),b(fe),b(he),b(L),b(ye),b(ge),b(_e,e),b(we),b(Me,e)}}}const Ot='{"title":"AnyFlow","local":"anyflow","sections":[{"title":"Generation with AnyFlow (Bidirectional T2V)","local":"generation-with-anyflow-bidirectional-t2v","sections":[],"depth":3},{"title":"Generation with AnyFlow (FAR Causal)","local":"generation-with-anyflow-far-causal","sections":[],"depth":3},{"title":"Notes","local":"notes","sections":[],"depth":2},{"title":"AnyFlowPipeline","local":"diffusers.AnyFlowPipeline","sections":[],"depth":2},{"title":"AnyFlowFARPipeline","local":"diffusers.AnyFlowFARPipeline","sections":[],"depth":2},{"title":"AnyFlowPipelineOutput","local":"diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput","sections":[],"depth":2}],"depth":1}';function Kt(A){return Wt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rs extends Rt{constructor(s){super(),Vt(this,s,Kt,Yt,Gt,{})}}export{rs as component}; | |
Xet Storage Details
- Size:
- 80.3 kB
- Xet hash:
- 1e884ada9ff6ee110e5da08b8620822b84f8ced7caec5068d431a89016ae8bc7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.