docs/source/en/api/models/anyflow_far_transformer3d.md
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:
torch.nn.attention.flex_attention, supporting chunk-wise autoregressive
generation as introduced in FAR.far_patch_embedding) for context (already-generated) frames,
warm-started from the full-resolution patch_embedding at construction time via trilinear interpolation.AnyFlowTransformer3DModel) — every forward call conditions on both the source
timestep t and the target timestep r.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"
)
[[autodoc]] AnyFlowFARTransformer3DModel
[[autodoc]] models.transformers.transformer_anyflow_far.AnyFlowFARTransformerOutput