The causal (FAR) 3D Transformer used by AnyFlowFARPipeline —
AnyFlowFARTransformer3DModel
The causal (FAR) 3D Transformer used by AnyFlowFARPipeline —
the FAR variant of AnyFlow. See the
AnyFlowFARPipeline page for paper, authors, and released checkpoints. It extends
the v0.35.1 Wan2.1 backbone with three additions:
- FAR causal block-mask via
torch.nn.attention.flex_attention, supporting chunk-wise autoregressive generation as introduced in FAR. - Compressed-frame patch embedding (
far_patch_embedding) for context (already-generated) frames, warm-started from the full-resolutionpatch_embeddingat construction time via trilinear interpolation. - Dual-timestep flow-map embedding (same as
AnyFlowTransformer3DModel) — every forward call conditions on both the source timesteptand the target timestepr.
The default chunk schedule (chunk_partition) is stored in the model config; the released NVIDIA AnyFlow-FAR
checkpoints use [1, 3, 3, 3, 3, 3, 3, 2] for the canonical 81-frame setting. forward accepts a per-call
chunk_partition override, so the same checkpoint also handles other num_frames configurations without
retraining.
from diffusers import AnyFlowFARTransformer3DModel
# Causal AnyFlow checkpoint (FAR):
transformer = AnyFlowFARTransformer3DModel.from_pretrained(
"nvidia/AnyFlow-FAR-Wan2.1-1.3B-Diffusers", subfolder="transformer"
)
AnyFlowFARTransformer3DModel
[[autodoc]] AnyFlowFARTransformer3DModel
AnyFlowFARTransformerOutput
[[autodoc]] models.transformers.transformer_anyflow_far.AnyFlowFARTransformerOutput
Source and license
Source: Diffusers documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.