/ Модель

Характеристики

Лицензия
Apache 2.0
Архитектура
i2v · dense
Базовая модель
Wan2.1-FLF2V-14B-720P
Библиотека
mlx
Опубликована
23 сен 2026

Wan2.1-FLF2V-14B-4step-int5-SVD-mlx

Видео из изображенияИзображение, текст → видео
4скачиваний за 30 дней0лайковвеса обновлены23 сен 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Квантованная сборка Wan2.1-FLF2V-14B для генерации видео между начальным и конечным кадрами по текстовому запросу на Apple Silicon через MLX.

bahae98 публикует сборку Wan2.1-FLF2V-14B для генерации видео между первым и последним кадрами на Apple Silicon с использованием MLX. Модель принимает начальное и конечное изображения вместе с текстовым запросом и создаёт промежуточный видеоряд; основная задача — генерация видео по двум опорным кадрам и описанию движения или сцены.

В основе лежит Wan2.1-FLF2V-14B-720P, объединённая с дистиллирующей LoRA lightx2v и сжатая методом int5 с сохранением 32 ведущих сингулярных направлений в bf16. Для генерации используется четыре шага без CFG. Карточка указывает, что сборка занимает около 11 ГБ и запускается в 32 ГБ объединённой памяти; приведённый пример — 832×464 пикселя и 49 кадров. Лицензия — Apache-2.0.

Сборка ориентирована на локальный запуск на Apple Silicon через MLX. Генерация может быть медленной: на M1 Pro указано около 27 минут для примера 832×464×49, а скорость примерно в 14 раз ниже, чем у сравниваемой Wan2.2-TI2V-5B Turbo. Заявленные сравнения качества основаны на одном наборе кадров и одном seed, поэтому не являются полноценным бенчмарком; для крупных движений README рекомендует стандартный режим в четыре шага.

Сценарии применения

  • создание видео между заданными первым и последним кадрами
  • анимация персонажа по паре изображений поз
  • генерация короткого видеоклипа по двум опорным изображениям и текстовому описанию

Ограничения

Генерация ресурсоёмкая и медленная: в README приведено около 27 минут на M1 Pro для ролика 832×464 на 49 кадров; сборка рассчитана на Apple Silicon и MLX. Сравнение качества приведено для одной пары кадров и одного seed, поэтому его нельзя считать полноценным бенчмарком.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Wan2.1-FLF2V-14B — 4-step, int5 + SVD, MLX

First-and-last-frame video generation (FLF2V) with Wan2.1-FLF2V-14B-720P, running natively on Apple Silicon with MLX.

Give it a start image, an end image, and a prompt; it generates the video in between.

  • 4 steps, no CFG: the lightx2v I2V step/CFG-distill LoRA (wan2.1_i2v_lora_rank64_lightx2v_4step) is merged into the weights (all 1749 LoRA tensors, incl. bias/norm deltas). FLF2V-14B is fine-tuned from I2V-14B-720P and shares its architecture, so the I2V LoRA applies directly.
  • int5 + rank-32 SVD: every transformer linear is x @ Q5(W − UV)ᵀ + (x @ Vᵀ) @ Uᵀ: the top-32 singular directions stay in bf16, only the residual is quantized (weights-only SVDQuant). 65.6 GB fp32 → 11 GB.
  • Runs in 32 GB of unified memory (peak footprint 18.9 GB at 832×464×49).

5B vs 14B close-up Top: Wan2.2-TI2V-5B Turbo int4. Bottom: this model. Same Flux-generated start/end poses, prompt and seed.

Quick start

pip install -r requirements.txt        # pins mlx 0.31.2 + the mlx-video fork this was built on
hf download bahae98/Wan2.1-FLF2V-14B-4step-int5-SVD-mlx --local-dir Wan-FLF2V-14B-mlx
cd Wan-FLF2V-14B-mlx
python generate_flf14b.py --first start.png --last end.png \
    --prompt "A woman raises both arms above her head in a stretch, smiling. Static camera." \
    --frames 49 --out out.mp4

The int8 umT5-XXL text encoder is shared by all these Wan MLX models and lives in bahae98/umt5-xxl-enc-int8-mlx; it is downloaded automatically on first use. Prompt embeddings are cached in t5_cache/, so repeating a prompt skips the text encoder entirely.

OptionDefaultNotes
--frames81must be 4n+1 (49 = 3 s at 16 fps)
--max-area832·480output area; aspect ratio follows the first image. 1280*720 is the native 720p
--seed42
--shift5.0flow-matching shift used by the distill LoRA

Performance (M1 Pro, 32 GB)

832×464, 49 frames, 4 steps:

StageTimeMLX peak
CLIP (both frames)3.5 s1.6 GB
VAE encode70 s16.4 GB
Denoise, per step~350 s17.2 GB
VAE decode60 s19.5 GB
Total~27 minfootprint 18.9 GB

Attention cost grows with the square of the token count, so smaller --max-area / fewer frames speed it up a lot.

Quality notes

Measured quantization error (relative Frobenius, per block): int5 ≈ 0.036–0.041. On real layers, int4 = 0.092, int4 + SVD = 0.087, int5 = 0.045, int5 + SVD = 0.042, int6 = 0.023 (svd_errors.json lists every layer).

Compared with Wan2.2-TI2V-5B Turbo (int4) on a pose-change pair: faces stay coherent through the motion (the 5B visibly melts mid-clip), the motion is spread over the whole clip instead of finishing early, the last frame lands much closer to the target (7.0 vs 14.5 mean abs diff /255), the background stays put (2.5 vs 9.4 drift) and detail is kept (−9% vs −27% sharpness). The cost is speed: ~14× slower than the 5B. One seed, one pair: indicative, not a benchmark.

Correctness

Each ported piece was checked against the reference PyTorch Wan code:

ComponentCheckResult
CLIP ViT-H/14 image tower (clip_vision.py)vs wan/modules/clip.py, penultimate block0.6% rel. err (ref runs attention in bf16)
Transformer block (I2V cross-attn, RoPE, modulation)vs WanAttentionBlock, same dequantized weightscos 0.99995
img_emb + FLF emb_pos (1, 514, 1280)vs MLPProjexact
VAE decode (vae21_stream.py)vs WanVAE_.decode1.5e-6 rel. err, 1+4(T−1) frames

vae21_stream.py also fixes two issues in mlx-video's Wan2.1 VAE: its decode is non-causal (T latents → 4T frames, so frame 0 is not the start image), and its encode builds the whole clip into one lazy graph (31.5 GB peak; the per-chunk version gives identical output at 16.4 GB).

Files

config.json                  model + quantization config
transformer/misc.safetensors embeddings, img_emb, head (bf16)
transformer/block_XX.safetensors  40 blocks, int5 + SVD
clip_vision_f16.safetensors  CLIP ViT-H/14 image tower (31 blocks)
vae.safetensors              Wan2.1 VAE (fp32, encoder + decoder)
generate_flf14b.py           inference
flf14b_model.py              FLF2V model on top of mlx-video's WanModel
svd_linear.py                SVDQuantLinear
clip_vision.py               CLIP image tower
vae21_stream.py              causal per-chunk VAE encode/decode
build_flf14b.py              how the weights were made (streams the fp32 source from the Hub
                             via HTTP range reads, merges the LoRA, quantizes block by block)

Fewer steps / other distill LoRAs (experimental)

python generate_flf14b.py ... --steps 2                      # same model, 2 steps (~2x faster)
python generate_flf14b.py ... --steps 2 --sampler lcm \
    --swap-lora Wan_2_1_T2V_14B_720p_rCM_lora_average_rank_94_bf16.safetensors

--swap-lora (lora_swap.py) replaces the merged lightx2v LoRA with another distill LoRA at load time: -lightx2v and +new are appended as extra low-rank rows to each block's SVD branch (exact, no requantization); layers the new LoRA does not cover keep lightx2v. Tested with Kijai's rCM extraction (Kijai/WanVideo_comfy, LoRAs/rCM/...720p_rCM_lora_average_rank_94) on a raising-arms pose change, 832x464x49:

SetupTimeResult
lightx2v, 4 steps (default)27 minclean
rCM, 2 steps, LCM13.7 minface OK, arms ghost/transparent during motion
rCM, 1 step7.7 minmid-clip is a blurred blend of both poses

For large motions keep the default 4 steps. (The rCM LoRA is extracted from the T2V model and does not touch the image-conditioning layers.)

Sampling

Matches lightx2v's step-distill scheduler: sigmas warp([1, .75, .5, .25]) with shift 5 (= timesteps 1000, 937.5, 833.3, 625), Euler to 0, one forward pass per step, no negative prompt.

License

Apache-2.0, same as the base model and the LoRA.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Ревизия весов
4264e95

0 моделей