Buckets:

HuggingFaceDocBuilder's picture
download
raw
79.7 kB
import{s as Qn,o as Ln,n as K}from"../chunks/scheduler.53228c21.js";import{S as qn,i as Dn,e as f,s as a,c as g,q as xt,H as Vn,h as Sn,a as h,d as o,b as l,f as x,g as y,j as b,r as kt,u as En,k as j,w as Hn,l as i,m as p,n as _,t as w,o as M,p as v}from"../chunks/index.cac5d66a.js";import{C as Xn}from"../chunks/CopyLLMTxtMenu.4912207d.js";import{D as P}from"../chunks/Docstring.1e7ac4f3.js";import{C as ee}from"../chunks/CodeBlock.606cbaf4.js";import{E as Pn}from"../chunks/ExampleCodeBlock.ccf7d2a9.js";import{H as O,E as Yn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.323ee77a.js";import{H as rn,a as Xe}from"../chunks/HfOption.6b51ddef.js";function On(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy5ob29rcyUyMGltcG9ydCUyMGFwcGx5X2dyb3VwX29mZmxvYWRpbmclMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LVdhbjIuMS1UMlYtMTRCLURpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpJTBBYXBwbHlfZ3JvdXBfb2ZmbG9hZGluZyhwaXBlLnRyYW5zZm9ybWVyJTJDJTIwb25sb2FkX2RldmljZSUzRCUyMmN1ZGElMjIlMkMlMjBvZmZsb2FkX3R5cGUlM0QlMjJsZWFmX2xldmVsJTIyKSUwQXBpcGUudmFlLmVuYWJsZV9zbGljaW5nKCklMEFwaXBlLnZhZS5lbmFibGVfdGlsaW5nKCk=",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.hooks <span class="hljs-keyword">import</span> apply_group_offloading
pipe = AnyFlowPipeline.from_pretrained(
<span class="hljs-string">&quot;nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
)
apply_group_offloading(pipe.transformer, onload_device=<span class="hljs-string">&quot;cuda&quot;</span>, offload_type=<span class="hljs-string">&quot;leaf_level&quot;</span>)
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function Kn(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBJTBBcGlwZSUyMCUzRCUyMEFueUZsb3dQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIybnZpZGlhJTJGQW55Rmxvdy1XYW4yLjEtVDJWLTE0Qi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGUudHJhbnNmb3JtZXIlMjAlM0QlMjB0b3JjaC5jb21waWxlKHBpcGUudHJhbnNmb3JtZXIlMkMlMjBtb2RlJTNEJTIybWF4LWF1dG90dW5lLW5vLWN1ZGFncmFwaHMlMjIp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowPipeline
pipe = AnyFlowPipeline.from_pretrained(
<span class="hljs-string">&quot;nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
pipe.transformer = torch.<span class="hljs-built_in">compile</span>(pipe.transformer, mode=<span class="hljs-string">&quot;max-autotune-no-cudagraphs&quot;</span>)`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function es(A){let n,r,t,u;return n=new Xe({props:{id:"optimization",option:"memory",$$slots:{default:[On]},$$scope:{ctx:A}}}),t=new Xe({props:{id:"optimization",option:"inference speed",$$slots:{default:[Kn]},$$scope:{ctx:A}}}),{c(){g(n.$$.fragment),r=a(),g(t.$$.fragment)},l(c){y(n.$$.fragment,c),r=l(c),y(t.$$.fragment,c)},m(c,d){_(n,c,d),p(c,r,d),_(t,c,d),u=!0},p(c,d){const m={};d&2&&(m.$$scope={dirty:d,ctx:c}),n.$set(m);const $={};d&2&&($.$$scope={dirty:d,ctx:c}),t.$set($)},i(c){u||(w(n.$$.fragment,c),w(t.$$.fragment,c),u=!0)},o(c){M(n.$$.fragment,c),M(t.$$.fragment,c),u=!1},d(c){c&&o(r),v(n,c),v(t,c)}}}function ts(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctV2FuMi4xLVQyVi0xLjNCLURpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyQSUyMHJlZCUyMHBhbmRhJTIwZWF0aW5nJTIwYmFtYm9vJTIwaW4lMjBhJTIwZm9yZXN0JTJDJTIwY2luZW1hdGljJTIwbGlnaHRpbmclMjIlMEF2aWRlbyUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQlMkMlMjBudW1fZnJhbWVzJTNEMzMpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",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">&quot;nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
prompt = <span class="hljs-string">&quot;A red panda eating bamboo in a forest, cinematic lighting&quot;</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>]
export_to_video(video, <span class="hljs-string">&quot;out.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function ns(A){let n,r;return n=new Xe({props:{id:"anyflow-bidi",option:"usage",$$slots:{default:[ts]},$$scope:{ctx:A}}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p(t,u){const c={};u&2&&(c.$$scope={dirty:u,ctx:t}),n.$set(c)},i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function ss(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93RkFSUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctRkFSLVdhbjIuMS0xLjNCLURpZmZ1c2VycyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBJTBBdmlkZW8lMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMHByb21wdCUzRCUyMkElMjBjYXQlMjBzdXJmaW5nJTIwYSUyMHdhdmUlMkMlMjBzdW5zZXQlMjIlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMm91dC5tcDQlMjIlMkMlMjBmcHMlM0QxNik=",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">&quot;nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
video = pipe(
prompt=<span class="hljs-string">&quot;A cat surfing a wave, sunset&quot;</span>,
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">&quot;out.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function os(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMFdyYXAlMjB0aGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUyMGFzJTIwYSUyMG9uZS1mcmFtZSUyMHZpZGVvJTIwdGVuc29yJTNBJTIwKDElMkMlMjAxJTJDJTIwMyUyQyUyMEglMkMlMjBXKSUyMGluJTIwJTVCMCUyQyUyMDElNUQuJTBBZmlyc3RfZnJhbWUlMjAlM0QlMjBsb2FkX2ltYWdlKCUyMnBhdGglMkZ0byUyRmZpcnN0X2ZyYW1lLnBuZyUyMikucmVzaXplKCg4MzIlMkMlMjA0ODApKSUwQWFyciUyMCUzRCUyMG5wLmFzYXJyYXkoZmlyc3RfZnJhbWUpLmFzdHlwZSglMjJmbG9hdDMyJTIyKSUyMCUyRiUyMDI1NS4wJTIwJTIwJTIzJTIwKDQ4MCUyQyUyMDgzMiUyQyUyMDMpJTBBY29udGV4dF90ZW5zb3IlMjAlM0QlMjB0b3JjaC5mcm9tX251bXB5KGFycikucGVybXV0ZSgyJTJDJTIwMCUyQyUyMDEpLnVuc3F1ZWV6ZSgwKS51bnNxdWVlemUoMSkudG8oJTIyY3VkYSUyMiklMEElMEF2aWRlbyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEJTIyYSUyMGNhdCUyMHdhbGtzJTIwYWNyb3NzJTIwYSUyMHN1bmxpdCUyMGxhd24lMjIlMkMlMEElMjAlMjAlMjAlMjB2aWRlbyUzRGNvbnRleHRfdGVuc29yJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDQlMkMlMEElMjAlMjAlMjAlMjBudW1fZnJhbWVzJTNEODElMkMlMEEpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",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">&quot;nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-comment"># Wrap the conditioning image as a one-frame video tensor: (1, 1, 3, H, W) in [0, 1].</span>
first_frame = load_image(<span class="hljs-string">&quot;path/to/first_frame.png&quot;</span>).resize((<span class="hljs-number">832</span>, <span class="hljs-number">480</span>))
arr = np.asarray(first_frame).astype(<span class="hljs-string">&quot;float32&quot;</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">&quot;cuda&quot;</span>)
video = pipe(
prompt=<span class="hljs-string">&quot;a cat walks across a sunlit lawn&quot;</span>,
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">&quot;out.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function as(A){let n,r;return n=new ee({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfdmlkZW8lMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMENvbnRleHQlMjBjbGlwJTIwJUUyJTgwJTk0JTIwOSUyMHJhdyUyMGZyYW1lcyUyMG1hcCUyMHRvJTIwMyUyMGxhdGVudCUyMGZyYW1lcyUyMCg5JTIwJTNEJTIwNCVDMiVCNzIlMjAlMkIlMjAxJTJDJTIwMyUyMCUzRCUyMDIlMjAlMkIlMjAxKS4lMEFjb250ZXh0X2ZyYW1lcyUyMCUzRCUyMGxvYWRfdmlkZW8oJTIycGF0aCUyRnRvJTJGY29udGV4dC5tcDQlMjIpJTVCJTNBOSU1RCUwQWFyciUyMCUzRCUyMG5wLnN0YWNrKCU1Qm5wLmFzYXJyYXkoZi5yZXNpemUoKDgzMiUyQyUyMDQ4MCkpKSUyMGZvciUyMGYlMjBpbiUyMGNvbnRleHRfZnJhbWVzJTVEKS5hc3R5cGUoJTIyZmxvYXQzMiUyMiklMjAlMkYlMjAyNTUuMCUwQSUyMyUyMG5wLnN0YWNrJTIwZ2l2ZXMlMjAoVCUyQyUyMEglMkMlMjBXJTJDJTIwQyklMjAlM0QlMjAoOSUyQyUyMDQ4MCUyQyUyMDgzMiUyQyUyMDMpJTIwJUUyJTg2JTkyJTIwcGVybXV0ZSUyMHRvJTIwKFQlMkMlMjBDJTJDJTIwSCUyQyUyMFcpJTIwdGhlbiUyMGFkZCUyMGJhdGNoLiUwQWNvbnRleHRfdGVuc29yJTIwJTNEJTIwdG9yY2guZnJvbV9udW1weShhcnIpLnBlcm11dGUoMCUyQyUyMDMlMkMlMjAxJTJDJTIwMikudW5zcXVlZXplKDApLnRvKCUyMmN1ZGElMjIpJTIwJTIwJTIzJTIwKDElMkMlMjA5JTJDJTIwMyUyQyUyMDQ4MCUyQyUyMDgzMiklMEElMEF2aWRlbyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEJTIyY29udGludWUlMjB0aGUlMjBzdG9yeSUyMiUyQyUwQSUyMCUyMCUyMCUyMHZpZGVvJTNEY29udGV4dF90ZW5zb3IlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSUyMCUyMCUyMCUyMCUyMyUyME92ZXJyaWRlJTIwY2h1bmtfcGFydGl0aW9uJTIwc28lMjB0aGUlMjBmaXJzdCUyMGNodW5rJTIwY292ZXJzJTIwZXhhY3RseSUyMHRoZSUyMDMlMjBsYXRlbnQlMjBjb250ZXh0JTIwZnJhbWVzLiUwQSUyMCUyMCUyMCUyMGNodW5rX3BhcnRpdGlvbiUzRCU1QjMlMkMlMjAzJTJDJTIwMyUyQyUyMDMlMkMlMjAzJTJDJTIwMyUyQyUyMDMlNUQlMkMlMEEpLmZyYW1lcyU1QjAlNUQlMEFleHBvcnRfdG9fdmlkZW8odmlkZW8lMkMlMjAlMjJvdXQubXA0JTIyJTJDJTIwZnBzJTNEMTYp",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">&quot;nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-comment"># Context clip — 9 raw frames map to 3 latent frames (9 = 4·2 + 1, 3 = 2 + 1).</span>
context_frames = load_video(<span class="hljs-string">&quot;path/to/context.mp4&quot;</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">&quot;float32&quot;</span>) / <span class="hljs-number">255.0</span>
<span class="hljs-comment"># np.stack gives (T, H, W, C) = (9, 480, 832, 3) → permute to (T, C, H, W) then add batch.</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">&quot;cuda&quot;</span>) <span class="hljs-comment"># (1, 9, 3, 480, 832)</span>
video = pipe(
prompt=<span class="hljs-string">&quot;continue the story&quot;</span>,
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">&quot;out.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"py",wrap:!1}}),{c(){g(n.$$.fragment)},l(t){y(n.$$.fragment,t)},m(t,u){_(n,t,u),r=!0},p:K,i(t){r||(w(n.$$.fragment,t),r=!0)},o(t){M(n.$$.fragment,t),r=!1},d(t){v(n,t)}}}function ls(A){let n,r,t,u,c,d;return n=new Xe({props:{id:"anyflow-far",option:"t2v",$$slots:{default:[ss]},$$scope:{ctx:A}}}),t=new Xe({props:{id:"anyflow-far",option:"i2v",$$slots:{default:[os]},$$scope:{ctx:A}}}),c=new Xe({props:{id:"anyflow-far",option:"v2v",$$slots:{default:[as]},$$scope:{ctx:A}}}),{c(){g(n.$$.fragment),r=a(),g(t.$$.fragment),u=a(),g(c.$$.fragment)},l(m){y(n.$$.fragment,m),r=l(m),y(t.$$.fragment,m),u=l(m),y(c.$$.fragment,m)},m(m,$){_(n,m,$),p(m,r,$),_(t,m,$),p(m,u,$),_(c,m,$),d=!0},p(m,$){const te={};$&2&&(te.$$scope={dirty:$,ctx:m}),n.$set(te);const W={};$&2&&(W.$$scope={dirty:$,ctx:m}),t.$set(W);const ne={};$&2&&(ne.$$scope={dirty:$,ctx:m}),c.$set(ne)},i(m){d||(w(n.$$.fragment,m),w(t.$$.fragment,m),w(c.$$.fragment,m),d=!0)},o(m){M(n.$$.fragment,m),M(t.$$.fragment,m),M(c.$$.fragment,m),d=!1},d(m){m&&(o(r),o(u)),v(n,m),v(t,m),v(c,m)}}}function is(A){let n,r="Examples:",t,u,c;return u=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd1BpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBBbnlGbG93UGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm52aWRpYSUyRkFueUZsb3ctV2FuMi4xLVQyVi0xNEItRGlmZnVzZXJzJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSkudG8oJTIyY3VkYSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJBJTIwcmVkJTIwcGFuZGElMjBlYXRpbmclMjBiYW1ib28lMjBpbiUyMGElMjBmb3Jlc3QlMkMlMjBjaW5lbWF0aWMlMjBsaWdodGluZyUyMiUwQXZpZGVvJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUyMG51bV9mcmFtZXMlM0QzMykuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfdDJ2Lm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = AnyFlowPipeline.from_pretrained(
<span class="hljs-meta">... </span> <span class="hljs-string">&quot;nvidia/AnyFlow-Wan2.1-T2V-14B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A red panda eating bamboo in a forest, cinematic lighting&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;anyflow_t2v.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"python",wrap:!1}}),{c(){n=f("p"),n.textContent=r,t=a(),g(u.$$.fragment)},l(d){n=h(d,"P",{"data-svelte-h":!0}),b(n)!=="svelte-kvfsh7"&&(n.textContent=r),t=l(d),y(u.$$.fragment,d)},m(d,m){p(d,n,m),p(d,t,m),_(u,d,m),c=!0},p:K,i(d){c||(w(u.$$.fragment,d),c=!0)},o(d){M(u.$$.fragment,d),c=!1},d(d){d&&(o(n),o(t)),v(u,d)}}}function rs(A){let n,r="Examples:",t,u,c;return u=new ee({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQW55Rmxvd0ZBUlBpcGVsaW5lJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUyQyUyMGxvYWRfaW1hZ2UlMEElMEFwaXBlJTIwJTNEJTIwQW55Rmxvd0ZBUlBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJudmlkaWElMkZBbnlGbG93LUZBUi1XYW4yLjEtMS4zQi1EaWZmdXNlcnMlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMFNpbmdsZS1mcmFtZSUyMEkyViUzQSUyMHdyYXAlMjB0aGUlMjBjb25kaXRpb25pbmclMjBpbWFnZSUyMGFzJTIwYSUyMCgxJTJDJTIwMSUyQyUyMDMlMkMlMjBIJTJDJTIwVyklMjB0ZW5zb3IlMjBpbiUyMCU1QjAlMkMlMjAxJTVELiUwQWZpcnN0X2ZyYW1lJTIwJTNEJTIwbG9hZF9pbWFnZSglMjJwYXRoJTJGdG8lMkZmaXJzdF9mcmFtZS5wbmclMjIpLnJlc2l6ZSgoODMyJTJDJTIwNDgwKSklMEFhcnIlMjAlM0QlMjBucC5hc2FycmF5KGZpcnN0X2ZyYW1lKS5hc3R5cGUoJTIyZmxvYXQzMiUyMiklMjAlMkYlMjAyNTUuMCUwQWNvbnRleHQlMjAlM0QlMjB0b3JjaC5mcm9tX251bXB5KGFycikucGVybXV0ZSgyJTJDJTIwMCUyQyUyMDEpLnVuc3F1ZWV6ZSgwKS51bnNxdWVlemUoMSkudG8oJTIyY3VkYSUyMiklMEElMEF2aWRlbyUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwcHJvbXB0JTNEJTIyYSUyMGNhdCUyMHdhbGtzJTIwYWNyb3NzJTIwYSUyMHN1bmxpdCUyMGxhd24lMjIlMkMlMEElMjAlMjAlMjAlMjB2aWRlbyUzRGNvbnRleHQlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMG51bV9mcmFtZXMlM0Q4MSUyQyUwQSkuZnJhbWVzJTVCMCU1RCUwQWV4cG9ydF90b192aWRlbyh2aWRlbyUyQyUyMCUyMmFueWZsb3dfZmFyLm1wNCUyMiUyQyUyMGZwcyUzRDE2KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AnyFlowFARPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video, load_image
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = AnyFlowFARPipeline.from_pretrained(
<span class="hljs-meta">... </span> <span class="hljs-string">&quot;nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers&quot;</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>).to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </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">&gt;&gt;&gt; </span>first_frame = load_image(<span class="hljs-string">&quot;path/to/first_frame.png&quot;</span>).resize((<span class="hljs-number">832</span>, <span class="hljs-number">480</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>arr = np.asarray(first_frame).astype(<span class="hljs-string">&quot;float32&quot;</span>) / <span class="hljs-number">255.0</span>
<span class="hljs-meta">&gt;&gt;&gt; </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">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = pipe(
<span class="hljs-meta">... </span> prompt=<span class="hljs-string">&quot;a cat walks across a sunlit lawn&quot;</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">&gt;&gt;&gt; </span>export_to_video(video, <span class="hljs-string">&quot;anyflow_far.mp4&quot;</span>, fps=<span class="hljs-number">16</span>)`,lang:"python",wrap:!1}}),{c(){n=f("p"),n.textContent=r,t=a(),g(u.$$.fragment)},l(d){n=h(d,"P",{"data-svelte-h":!0}),b(n)!=="svelte-kvfsh7"&&(n.textContent=r),t=l(d),y(u.$$.fragment,d)},m(d,m){p(d,n,m),p(d,t,m),_(u,d,m),c=!0},p:K,i(d){c||(w(u.$$.fragment,d),c=!0)},o(d){M(u.$$.fragment,d),c=!1},d(d){d&&(o(n),o(t)),v(u,d)}}}function ps(A){let n,r,t,u,c,d,m,$='<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>',te,W,ne,se,pn='<a href="https://huggingface.co/papers/2605.13724" rel="nofollow">AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation</a> by Yuchao Gu, Guian Fang and collaborators at <a href="https://sites.google.com/view/showlab" rel="nofollow">NUS ShowLab</a> in collaboration with NVIDIA.',Oe,oe,cn="<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>",Ke,ae,dn='The original training code is at <a href="https://github.com/NVlabs/AnyFlow" rel="nofollow"><code>NVlabs/AnyFlow</code></a>. The project page is at <a href="https://nvlabs.github.io/AnyFlow" rel="nofollow">nvlabs.github.io/AnyFlow</a>.',et,le,mn="The following AnyFlow checkpoints are supported:",tt,ie,un='<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, lightweight</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, full quality</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>',nt,re,fn='All four are grouped under the <a href="https://huggingface.co/collections/nvidia/anyflow" rel="nofollow"><code>nvidia/anyflow</code></a> Hugging Face collection.',st,N,hn="<p>Choose <code>AnyFlowPipeline</code> for traditional bidirectional text-to-video generation. Choose <code>AnyFlowFARPipeline</code> for streaming I2V, video continuation (V2V), or any setup that benefits from frame-by-frame autoregressive sampling.</p>",ot,z,gn="<p>AnyFlow supports any-step sampling: a single distilled checkpoint can be evaluated at 1, 2, 4, 8, 16… NFE without retraining. Quality scales monotonically with steps in our benchmarks.</p>",at,pe,lt,Q,it,ce,rt,L,pt,de,ct,me,yn=`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=&lt;tensor&gt;</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=&lt;tensor&gt;</code> to skip VAE encoding. <code>video</code> and <code>video_latents</code> are mutually exclusive.`,dt,q,_n=`<p><code>AnyFlowFARPipeline.default_chunk_partition = [1, 3, 3, 3, 3, 3, 3, 2]</code> (sum 21) is matched to the
released checkpoints’ canonical 81 raw frames (21 latent frames at the VAE temporal stride of 4). When
you change <code>num_frames</code>, you must also pass a matching <code>chunk_partition</code> summing to
<code>(num_frames - 1) // 4 + 1</code>, otherwise the pipeline raises an <code>AssertionError</code>.</p>`,mt,D,ut,ue,ft,fe,wn='<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>',ht,he,gt,F,ge,Ct,je,Mn=`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> by Yuchao Gu, Guian Fang et al.`,Wt,k,Gt,yt,Nn='<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>',_t,wt,zn='<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>',Mt,xe,vn="AnyFlowFARPipeline",It,Zt,ke,bn=`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.`,Bt,Ce,Tn=`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.).`,Rt,G,ye,Vt,We,An="The call function to the pipeline for generation.",Et,S,Pt,H,_e,Nt,Ge,Fn="Encodes the prompt into text encoder hidden states.",zt,I,we,Qt,Ie,Un="Encode a pixel-space video into AnyFlow’s latent layout.",Lt,Ze,Jn=`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.`,vt,Me,bt,T,ve,qt,Be,$n=`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> by Yuchao Gu, Guian Fang et al.`,Dt,Re,jn=`The pipeline drives a frame-level autoregressive sampling loop over chunks: 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.`,St,Ve,xn="The task mode (T2V / I2V / V2V) is selected by which conditioning argument is passed to <code>__call__</code>:",Ht,Ee,kn=`<li>both <code>video=None</code> and <code>video_latents=None</code> — pure text-to-video.</li> <li><code>video=&lt;tensor of shape (B, T, C, H, W) in [0, 1] with T = 4n + 1&gt;</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=&lt;latent tensor of shape (B, T_latent, C, H_latent, W_latent)&gt;</code> — already-encoded latents in the
FAR layout (skips the VAE encode step).</li>`,Xt,Pe,Cn=`The FAR backbone is the causal Wan2.1 variant introduced by FAR (Gu et al., 2025; arXiv:2503.19325). 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.`,Yt,Ne,Wn=`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.).`,Ot,Z,be,Kt,ze,Gn="The call function to the pipeline for generation.",en,X,tn,Y,Te,nn,Qe,In="Encodes the prompt into text encoder hidden states.",sn,B,Ae,on,Le,Zn="Encode a pixel-space video into AnyFlow-FAR’s latent layout.",an,qe,Bn="Mirrors the single-helper convention of other diffusers pipelines. Output layout is <code>(B, T_latent, C, H_latent, W_latent)</code> — the per-frame layout the FAR rollout consumes.",Tt,Fe,At,R,Ue,ln,De,Rn="Output class for AnyFlow pipelines.",Ft,Je,Ut,Ye,Jt;return c=new Xn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),W=new O({props:{title:"AnyFlow",local:"anyflow",headingTag:"h1"}}),pe=new O({props:{title:"Optimizing Memory and Inference Speed",local:"optimizing-memory-and-inference-speed",headingTag:"h3"}}),Q=new rn({props:{id:"optimization",options:["memory","inference speed"],$$slots:{default:[es]},$$scope:{ctx:A}}}),ce=new O({props:{title:"Generation with AnyFlow (Bidirectional T2V)",local:"generation-with-anyflow-bidirectional-t2v",headingTag:"h3"}}),L=new rn({props:{id:"anyflow-bidi",options:["usage"],$$slots:{default:[ns]},$$scope:{ctx:A}}}),de=new O({props:{title:"Generation with AnyFlow (FAR Causal)",local:"generation-with-anyflow-far-causal",headingTag:"h3"}}),D=new rn({props:{id:"anyflow-far",options:["t2v","i2v","v2v"],$$slots:{default:[ls]},$$scope:{ctx:A}}}),ue=new O({props:{title:"Notes",local:"notes",headingTag:"h2"}}),he=new O({props:{title:"AnyFlowPipeline",local:"diffusers.AnyFlowPipeline",headingTag:"h2"}}),ge=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>]) &#x2014;
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>]) &#x2014;
<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>]) &#x2014;
Bidirectional flow-map 3D Transformer.`,name:"transformer"},{anchor:"diffusers.AnyFlowPipeline.vae",description:`<strong>vae</strong> ([<em>AutoencoderKLWan</em>]) &#x2014;
VAE that encodes/decodes videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.AnyFlowPipeline.scheduler",description:`<strong>scheduler</strong> ([<em>FlowMapEulerDiscreteScheduler</em>]) &#x2014;
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_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L80"}}),ye=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:"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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
The prompt or prompts to avoid during video generation. Ignored when not using guidance
(<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AnyFlowPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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.`,name:"num_inference_steps"},{anchor:"diffusers.AnyFlowPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
A <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow"><code>torch.Generator</code></a> to make
generation deterministic.`,name:"generator"},{anchor:"diffusers.AnyFlowPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>&quot;np&quot;</code>) &#x2014;
The output format. One of <code>&quot;pil&quot;</code>, <code>&quot;np&quot;</code>, <code>&quot;pt&quot;</code>, or <code>&quot;latent&quot;</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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>[&quot;latents&quot;]</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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_13745/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>
`}}),S=new Pn({props:{anchor:"diffusers.AnyFlowPipeline.__call__.example",$$slots:{default:[is]},$$scope:{ctx:A}}}),_e=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>) &#x2014;
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>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.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>) &#x2014;
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) &#x2014;
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>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.AnyFlowPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L179"}}),we=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_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow.py#L359"}}),Me=new O({props:{title:"AnyFlowFARPipeline",local:"diffusers.AnyFlowFARPipeline",headingTag:"h2"}}),ve=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>]) &#x2014;
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>]) &#x2014;
<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>]) &#x2014;
FAR causal flow-map 3D Transformer.`,name:"transformer"},{anchor:"diffusers.AnyFlowFARPipeline.vae",description:`<strong>vae</strong> ([<em>AutoencoderKLWan</em>]) &#x2014;
VAE that encodes/decodes videos to and from latent representations.`,name:"vae"},{anchor:"diffusers.AnyFlowFARPipeline.scheduler",description:`<strong>scheduler</strong> ([<em>FlowMapEulerDiscreteScheduler</em>]) &#x2014;
Flow-map sampler.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L92"}}),be=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:"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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
The prompt or prompts to avoid during video generation. Ignored when not using guidance
(<code>guidance_scale &lt; 1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, defaults to <code>480</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
The number of denoising steps per chunk. Distilled AnyFlow-FAR checkpoints support any-step sampling
(1, 2, 4, 8, &#x2026;).`,name:"num_inference_steps"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, defaults to <code>1.0</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
Generator used to seed sampling.`,name:"generator"},{anchor:"diffusers.AnyFlowFARPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>&quot;np&quot;</code>) &#x2014;
Output format. One of <code>&quot;pil&quot;</code>, <code>&quot;np&quot;</code>, <code>&quot;pt&quot;</code>, or <code>&quot;latent&quot;</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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>[&quot;latents&quot;]</code>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
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>) &#x2014;
Per-chunk frame counts. Defaults to <code>default_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_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L440",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>
`}}),X=new Pn({props:{anchor:"diffusers.AnyFlowFARPipeline.__call__.example",$$slots:{default:[rs]},$$scope:{ctx:A}}}),Te=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>) &#x2014;
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>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is
less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.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>) &#x2014;
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) &#x2014;
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>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>, <em>optional</em>):
torch device`,name:"device"},{anchor:"diffusers.AnyFlowFARPipeline.encode_prompt.dtype",description:`<strong>dtype</strong> &#x2014; (<code>torch.dtype</code>, <em>optional</em>):
torch dtype`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L202"}}),Ae=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_13745/src/diffusers/pipelines/anyflow/pipeline_anyflow_far.py#L384"}}),Fe=new O({props:{title:"AnyFlowPipelineOutput",local:"diffusers.pipelines.anyflow.pipeline_output.AnyFlowPipelineOutput",headingTag:"h2"}}),Ue=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]]) &#x2014;
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_13745/src/diffusers/pipelines/anyflow/pipeline_output.py#L23"}}),Je=new Yn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/anyflow.md"}}),{c(){n=f("meta"),r=a(),t=f("p"),u=a(),g(c.$$.fragment),d=a(),m=f("div"),m.innerHTML=$,te=a(),g(W.$$.fragment),ne=a(),se=f("p"),se.innerHTML=pn,Oe=a(),oe=f("p"),oe.innerHTML=cn,Ke=a(),ae=f("p"),ae.innerHTML=dn,et=a(),le=f("p"),le.textContent=mn,tt=a(),ie=f("table"),ie.innerHTML=un,nt=a(),re=f("p"),re.innerHTML=fn,st=a(),N=f("blockquote"),N.innerHTML=hn,ot=a(),z=f("blockquote"),z.innerHTML=gn,at=a(),g(pe.$$.fragment),lt=a(),g(Q.$$.fragment),it=a(),g(ce.$$.fragment),rt=a(),g(L.$$.fragment),pt=a(),g(de.$$.fragment),ct=a(),me=f("p"),me.innerHTML=yn,dt=a(),q=f("blockquote"),q.innerHTML=_n,mt=a(),g(D.$$.fragment),ut=a(),g(ue.$$.fragment),ft=a(),fe=f("ul"),fe.innerHTML=wn,ht=a(),g(he.$$.fragment),gt=a(),F=f("div"),g(ge.$$.fragment),Ct=a(),je=f("p"),je.innerHTML=Mn,Wt=a(),k=f("p"),Gt=xt("AnyFlow learns arbitrary-interval transitions"),yt=new Vn(!1),_t=xt(" rather than the fixed"),wt=new Vn(!1),Mt=xt(` 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 frame-level
autoregressive (causal) generation use `),xe=f("code"),xe.textContent=vn,It=xt("."),Zt=a(),ke=f("p"),ke.innerHTML=bn,Bt=a(),Ce=f("p"),Ce.innerHTML=Tn,Rt=a(),G=f("div"),g(ye.$$.fragment),Vt=a(),We=f("p"),We.textContent=An,Et=a(),g(S.$$.fragment),Pt=a(),H=f("div"),g(_e.$$.fragment),Nt=a(),Ge=f("p"),Ge.textContent=Fn,zt=a(),I=f("div"),g(we.$$.fragment),Qt=a(),Ie=f("p"),Ie.textContent=Un,Lt=a(),Ze=f("p"),Ze.innerHTML=Jn,vt=a(),g(Me.$$.fragment),bt=a(),T=f("div"),g(ve.$$.fragment),qt=a(),Be=f("p"),Be.innerHTML=$n,Dt=a(),Re=f("p"),Re.textContent=jn,St=a(),Ve=f("p"),Ve.innerHTML=xn,Ht=a(),Ee=f("ul"),Ee.innerHTML=kn,Xt=a(),Pe=f("p"),Pe.textContent=Cn,Yt=a(),Ne=f("p"),Ne.innerHTML=Wn,Ot=a(),Z=f("div"),g(be.$$.fragment),Kt=a(),ze=f("p"),ze.textContent=Gn,en=a(),g(X.$$.fragment),tn=a(),Y=f("div"),g(Te.$$.fragment),nn=a(),Qe=f("p"),Qe.textContent=In,sn=a(),B=f("div"),g(Ae.$$.fragment),on=a(),Le=f("p"),Le.textContent=Zn,an=a(),qe=f("p"),qe.innerHTML=Bn,Tt=a(),g(Fe.$$.fragment),At=a(),R=f("div"),g(Ue.$$.fragment),ln=a(),De=f("p"),De.textContent=Rn,Ft=a(),g(Je.$$.fragment),Ut=a(),Ye=f("p"),this.h()},l(e){const s=Sn("svelte-u9bgzb",document.head);n=h(s,"META",{name:!0,content:!0}),s.forEach(o),r=l(e),t=h(e,"P",{}),x(t).forEach(o),u=l(e),y(c.$$.fragment,e),d=l(e),m=h(e,"DIV",{style:!0,"data-svelte-h":!0}),b(m)!=="svelte-1aq9wr9"&&(m.innerHTML=$),te=l(e),y(W.$$.fragment,e),ne=l(e),se=h(e,"P",{"data-svelte-h":!0}),b(se)!=="svelte-ybfj0"&&(se.innerHTML=pn),Oe=l(e),oe=h(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-h6gs9e"&&(oe.innerHTML=cn),Ke=l(e),ae=h(e,"P",{"data-svelte-h":!0}),b(ae)!=="svelte-jsjde6"&&(ae.innerHTML=dn),et=l(e),le=h(e,"P",{"data-svelte-h":!0}),b(le)!=="svelte-4ajns7"&&(le.textContent=mn),tt=l(e),ie=h(e,"TABLE",{"data-svelte-h":!0}),b(ie)!=="svelte-1a9jpg1"&&(ie.innerHTML=un),nt=l(e),re=h(e,"P",{"data-svelte-h":!0}),b(re)!=="svelte-1256td8"&&(re.innerHTML=fn),st=l(e),N=h(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),b(N)!=="svelte-jkzw74"&&(N.innerHTML=hn),ot=l(e),z=h(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),b(z)!=="svelte-1v66f63"&&(z.innerHTML=gn),at=l(e),y(pe.$$.fragment,e),lt=l(e),y(Q.$$.fragment,e),it=l(e),y(ce.$$.fragment,e),rt=l(e),y(L.$$.fragment,e),pt=l(e),y(de.$$.fragment,e),ct=l(e),me=h(e,"P",{"data-svelte-h":!0}),b(me)!=="svelte-14uyjbc"&&(me.innerHTML=yn),dt=l(e),q=h(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),b(q)!=="svelte-n8dfez"&&(q.innerHTML=_n),mt=l(e),y(D.$$.fragment,e),ut=l(e),y(ue.$$.fragment,e),ft=l(e),fe=h(e,"UL",{"data-svelte-h":!0}),b(fe)!=="svelte-1dplx07"&&(fe.innerHTML=wn),ht=l(e),y(he.$$.fragment,e),gt=l(e),F=h(e,"DIV",{class:!0});var J=x(F);y(ge.$$.fragment,J),Ct=l(J),je=h(J,"P",{"data-svelte-h":!0}),b(je)!=="svelte-1nsztcf"&&(je.innerHTML=Mn),Wt=l(J),k=h(J,"P",{});var C=x(k);Gt=kt(C,"AnyFlow learns arbitrary-interval transitions"),yt=En(C,!1),_t=kt(C," rather than the fixed"),wt=En(C,!1),Mt=kt(C,` 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 frame-level
autoregressive (causal) generation use `),xe=h(C,"CODE",{"data-svelte-h":!0}),b(xe)!=="svelte-1i1aby9"&&(xe.textContent=vn),It=kt(C,"."),C.forEach(o),Zt=l(J),ke=h(J,"P",{"data-svelte-h":!0}),b(ke)!=="svelte-dkbgur"&&(ke.innerHTML=bn),Bt=l(J),Ce=h(J,"P",{"data-svelte-h":!0}),b(Ce)!=="svelte-1cama1m"&&(Ce.innerHTML=Tn),Rt=l(J),G=h(J,"DIV",{class:!0});var V=x(G);y(ye.$$.fragment,V),Vt=l(V),We=h(V,"P",{"data-svelte-h":!0}),b(We)!=="svelte-50j04k"&&(We.textContent=An),Et=l(V),y(S.$$.fragment,V),V.forEach(o),Pt=l(J),H=h(J,"DIV",{class:!0});var $e=x(H);y(_e.$$.fragment,$e),Nt=l($e),Ge=h($e,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-16q0ax1"&&(Ge.textContent=Fn),$e.forEach(o),zt=l(J),I=h(J,"DIV",{class:!0});var E=x(I);y(we.$$.fragment,E),Qt=l(E),Ie=h(E,"P",{"data-svelte-h":!0}),b(Ie)!=="svelte-1bk09z5"&&(Ie.textContent=Un),Lt=l(E),Ze=h(E,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-soi4bz"&&(Ze.innerHTML=Jn),E.forEach(o),J.forEach(o),vt=l(e),y(Me.$$.fragment,e),bt=l(e),T=h(e,"DIV",{class:!0});var U=x(T);y(ve.$$.fragment,U),qt=l(U),Be=h(U,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-1wqvmlv"&&(Be.innerHTML=$n),Dt=l(U),Re=h(U,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-mzbp6"&&(Re.textContent=jn),St=l(U),Ve=h(U,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-s5pnn6"&&(Ve.innerHTML=xn),Ht=l(U),Ee=h(U,"UL",{"data-svelte-h":!0}),b(Ee)!=="svelte-kk9xrh"&&(Ee.innerHTML=kn),Xt=l(U),Pe=h(U,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-b1aj9h"&&(Pe.textContent=Cn),Yt=l(U),Ne=h(U,"P",{"data-svelte-h":!0}),b(Ne)!=="svelte-1cama1m"&&(Ne.innerHTML=Wn),Ot=l(U),Z=h(U,"DIV",{class:!0});var Se=x(Z);y(be.$$.fragment,Se),Kt=l(Se),ze=h(Se,"P",{"data-svelte-h":!0}),b(ze)!=="svelte-50j04k"&&(ze.textContent=Gn),en=l(Se),y(X.$$.fragment,Se),Se.forEach(o),tn=l(U),Y=h(U,"DIV",{class:!0});var $t=x(Y);y(Te.$$.fragment,$t),nn=l($t),Qe=h($t,"P",{"data-svelte-h":!0}),b(Qe)!=="svelte-16q0ax1"&&(Qe.textContent=In),$t.forEach(o),sn=l(U),B=h(U,"DIV",{class:!0});var He=x(B);y(Ae.$$.fragment,He),on=l(He),Le=h(He,"P",{"data-svelte-h":!0}),b(Le)!=="svelte-1onazvx"&&(Le.textContent=Zn),an=l(He),qe=h(He,"P",{"data-svelte-h":!0}),b(qe)!=="svelte-a9hu3q"&&(qe.innerHTML=Bn),He.forEach(o),U.forEach(o),Tt=l(e),y(Fe.$$.fragment,e),At=l(e),R=h(e,"DIV",{class:!0});var jt=x(R);y(Ue.$$.fragment,jt),ln=l(jt),De=h(jt,"P",{"data-svelte-h":!0}),b(De)!=="svelte-vsp4oj"&&(De.textContent=Rn),jt.forEach(o),Ft=l(e),y(Je.$$.fragment,e),Ut=l(e),Ye=h(e,"P",{}),x(Ye).forEach(o),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",cs),Hn(m,"float","right"),j(N,"class","tip"),j(z,"class","tip"),j(q,"class","important"),yt.a=_t,wt.a=Mt,j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(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,s){i(document.head,n),p(e,r,s),p(e,t,s),p(e,u,s),_(c,e,s),p(e,d,s),p(e,m,s),p(e,te,s),_(W,e,s),p(e,ne,s),p(e,se,s),p(e,Oe,s),p(e,oe,s),p(e,Ke,s),p(e,ae,s),p(e,et,s),p(e,le,s),p(e,tt,s),p(e,ie,s),p(e,nt,s),p(e,re,s),p(e,st,s),p(e,N,s),p(e,ot,s),p(e,z,s),p(e,at,s),_(pe,e,s),p(e,lt,s),_(Q,e,s),p(e,it,s),_(ce,e,s),p(e,rt,s),_(L,e,s),p(e,pt,s),_(de,e,s),p(e,ct,s),p(e,me,s),p(e,dt,s),p(e,q,s),p(e,mt,s),_(D,e,s),p(e,ut,s),_(ue,e,s),p(e,ft,s),p(e,fe,s),p(e,ht,s),_(he,e,s),p(e,gt,s),p(e,F,s),_(ge,F,null),i(F,Ct),i(F,je),i(F,Wt),i(F,k),i(k,Gt),yt.m(Nn,k),i(k,_t),wt.m(zn,k),i(k,Mt),i(k,xe),i(k,It),i(F,Zt),i(F,ke),i(F,Bt),i(F,Ce),i(F,Rt),i(F,G),_(ye,G,null),i(G,Vt),i(G,We),i(G,Et),_(S,G,null),i(F,Pt),i(F,H),_(_e,H,null),i(H,Nt),i(H,Ge),i(F,zt),i(F,I),_(we,I,null),i(I,Qt),i(I,Ie),i(I,Lt),i(I,Ze),p(e,vt,s),_(Me,e,s),p(e,bt,s),p(e,T,s),_(ve,T,null),i(T,qt),i(T,Be),i(T,Dt),i(T,Re),i(T,St),i(T,Ve),i(T,Ht),i(T,Ee),i(T,Xt),i(T,Pe),i(T,Yt),i(T,Ne),i(T,Ot),i(T,Z),_(be,Z,null),i(Z,Kt),i(Z,ze),i(Z,en),_(X,Z,null),i(T,tn),i(T,Y),_(Te,Y,null),i(Y,nn),i(Y,Qe),i(T,sn),i(T,B),_(Ae,B,null),i(B,on),i(B,Le),i(B,an),i(B,qe),p(e,Tt,s),_(Fe,e,s),p(e,At,s),p(e,R,s),_(Ue,R,null),i(R,ln),i(R,De),p(e,Ft,s),_(Je,e,s),p(e,Ut,s),p(e,Ye,s),Jt=!0},p(e,[s]){const J={};s&2&&(J.$$scope={dirty:s,ctx:e}),Q.$set(J);const C={};s&2&&(C.$$scope={dirty:s,ctx:e}),L.$set(C);const V={};s&2&&(V.$$scope={dirty:s,ctx:e}),D.$set(V);const $e={};s&2&&($e.$$scope={dirty:s,ctx:e}),S.$set($e);const E={};s&2&&(E.$$scope={dirty:s,ctx:e}),X.$set(E)},i(e){Jt||(w(c.$$.fragment,e),w(W.$$.fragment,e),w(pe.$$.fragment,e),w(Q.$$.fragment,e),w(ce.$$.fragment,e),w(L.$$.fragment,e),w(de.$$.fragment,e),w(D.$$.fragment,e),w(ue.$$.fragment,e),w(he.$$.fragment,e),w(ge.$$.fragment,e),w(ye.$$.fragment,e),w(S.$$.fragment,e),w(_e.$$.fragment,e),w(we.$$.fragment,e),w(Me.$$.fragment,e),w(ve.$$.fragment,e),w(be.$$.fragment,e),w(X.$$.fragment,e),w(Te.$$.fragment,e),w(Ae.$$.fragment,e),w(Fe.$$.fragment,e),w(Ue.$$.fragment,e),w(Je.$$.fragment,e),Jt=!0)},o(e){M(c.$$.fragment,e),M(W.$$.fragment,e),M(pe.$$.fragment,e),M(Q.$$.fragment,e),M(ce.$$.fragment,e),M(L.$$.fragment,e),M(de.$$.fragment,e),M(D.$$.fragment,e),M(ue.$$.fragment,e),M(he.$$.fragment,e),M(ge.$$.fragment,e),M(ye.$$.fragment,e),M(S.$$.fragment,e),M(_e.$$.fragment,e),M(we.$$.fragment,e),M(Me.$$.fragment,e),M(ve.$$.fragment,e),M(be.$$.fragment,e),M(X.$$.fragment,e),M(Te.$$.fragment,e),M(Ae.$$.fragment,e),M(Fe.$$.fragment,e),M(Ue.$$.fragment,e),M(Je.$$.fragment,e),Jt=!1},d(e){e&&(o(r),o(t),o(u),o(d),o(m),o(te),o(ne),o(se),o(Oe),o(oe),o(Ke),o(ae),o(et),o(le),o(tt),o(ie),o(nt),o(re),o(st),o(N),o(ot),o(z),o(at),o(lt),o(it),o(rt),o(pt),o(ct),o(me),o(dt),o(q),o(mt),o(ut),o(ft),o(fe),o(ht),o(gt),o(F),o(vt),o(bt),o(T),o(Tt),o(At),o(R),o(Ft),o(Ut),o(Ye)),o(n),v(c,e),v(W,e),v(pe,e),v(Q,e),v(ce,e),v(L,e),v(de,e),v(D,e),v(ue,e),v(he,e),v(ge),v(ye),v(S),v(_e),v(we),v(Me,e),v(ve),v(be),v(X),v(Te),v(Ae),v(Fe,e),v(Ue),v(Je,e)}}}const cs='{"title":"AnyFlow","local":"anyflow","sections":[{"title":"Optimizing Memory and Inference Speed","local":"optimizing-memory-and-inference-speed","sections":[],"depth":3},{"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 ds(A){return Ln(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ms extends qn{constructor(n){super(),Dn(this,n,ds,ps,Qn,{})}}export{Ms as component};

Xet Storage Details

Size:
79.7 kB
·
Xet hash:
b2c55fd169d89d3612528c5c0da6938138e4eb52e37cf17972cfcbcb4e58ffac

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