FastFrames-L on MLX

An unofficial, experimental Apple Silicon inference port of Apple's FastFrames-L 14B. It generates 832 ร— 480 H.264 video at 16 fps from a text prompt. The repository provides the inference and quantization code. Setup downloads the required checkpoints from their original repositories.

For non-commercial scientific research and academic development under the Apple Machine Learning Research Model License Agreement.

Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.

Tested setup

Mac Studio M5 Max with 64 GiB of unified memory, Python 3.13, MLX 0.32.2 and FFmpeg with libx264. The standard MLX attention path is the default. The optional Metal/NAX path was tested on the M5 Max.

Clone or download this repository, then run these commands from its root.

python3.13 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python - <<'PY'
from huggingface_hub import snapshot_download

snapshot_download(
    "apple/FastFrames-L",
    revision="d18ec5f054bb03f6b8e561a63d52af3142b5b81d",
    local_dir="weights",
    allow_patterns=[
        "fastframes-l/dit.safetensors",
        "fastframes-l/kv_refiner.safetensors",
        "fastframes-l/pixel_decoder.safetensors",
    ],
)
snapshot_download(
    "mlx-community/FastFrames-S-bf16-mlx",
    revision="08b95d8bd4b77d09b56d732f998d000b0c6b8835",
    local_dir="dependencies/FastFrames-S",
    allow_patterns=["ff_ref.py", "umt5_xxl.safetensors"],
)
snapshot_download(
    "Wan-AI/Wan2.1-T2V-1.3B",
    revision="37ec512624d61f7aa208f7ea8140a131f93afc9a",
    local_dir="dependencies/Wan2.1-T2V-1.3B",
    allow_patterns=["google/umt5-xxl/*"],
)
PY
mkdir -p output

Allow about 42 GB for the source weights and a further 15.4 GB to keep the optional Q8 checkpoint alongside them.

Generate a short BF16 clip

python generate.py "A red wooden sailboat glides across a calm pond at golden hour." \
  output/sailboat-bf16.mp4 --seed 42 --latent-frames 5

Generate a five-second Q8 clip

Run the quantizer once to build weights/fastframes-l/dit-q8.safetensors.

python quantize.py
python generate.py "A red wooden sailboat glides across a calm pond at golden hour." \
  output/sailboat-q8.mp4 --seed 42 --latent-frames 21 --dit q8 --eval-every 4 --compile-ffn

Add --attention nax to use the experimental Metal kernel on the tested M5 Max configuration. Generation writes an MP4 and an adjacent JSON file containing timings and peak MLX allocations. Five latent frames produce 17 video frames. Twenty-one latent frames produce 81.

What this port changes

  • Uses MLX for the frame-causal 40-layer FastFrames-L generator and KV refiner, with the released L-specific denoising schedule and 5120-to-1536 pixel decoder bridge.
  • Reuses the FastFrames-S MLX reference implementation and Wan umT5-XXL text encoder. The L generator, KV refiner and decoder use Apple's FastFrames-L checkpoints.
  • Optionally packs 400 generator projection matrices with 8-bit affine quantization in groups of 64. Other generator parameters, activations, KV cache, refiner and decoder remain in floating point. The generator checkpoint shrinks from 28.58 GB to 15.40 GB.
  • Supports grouping evaluations across layers, compiling the Q8 feed-forward function and using an optional NAX self-attention kernel.

Local measurements

The table reports the elapsed time from Python startup through MP4 export, with source weights already on local storage. Peak memory is the MLX allocation reported during generation.

Configuration Frames Elapsed Peak MLX
BF16, standard MLX 17 24.1 s 40.2 GiB
BF16, standard MLX 41 51.9 s 47.4 GiB
Q8, NAX, 4-layer evaluation, compiled FFN 81 75.5 s 47.2 GiB

The last row is the mean of two local runs on one sailboat prompt. A matched pair of runs with the feed-forward compiler disabled averaged 80.6 s, with the same peak MLX allocation. All four decoded Q8 clips matched pixel for pixel on that prompt. This is a small reproducibility check. CUDA output parity, other Mac models and broad quality evaluation remain unverified.

The release was also tested in a fresh environment. The BF16 sailboat clip (17 frames) and the Q8 Metal sailboat clip (81 frames) matched the earlier decoded frames exactly. The standard MLX Q8 path generated an 81-frame fox clip in 77.8 s with a peak MLX allocation of 47.2 GiB. All three H.264 files decoded at 832 ร— 480 and 16 fps.

Attribution

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for finaltv971/fastframes-l-mlx

Finetuned
(4)
this model