Run this model with HF Jobs
Run mlx-community/Bernini-R-1.3B-bf16 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/mlx-community/Bernini-R-1.3B-bf16. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/Bernini-R-1.3B-bf16 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use mlx-community/Bernini-R-1.3B-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Bernini-R-1.3B-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/Bernini-R-1.3B-bf16 --local-dir Bernini-R-1.3B-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Add Bernini-R-1.3B MLX (single-expert Wan2.1-1.3B renderer)
Browse filesFiles changed (6)
- NOTICEAdded+23
- README.mdAdded+81
- config.jsonAdded+48
- model.safetensorsAdded+3
- t5_encoder.safetensorsAdded+3
- vae.safetensorsAdded+3
1234567891011121314151617181920212223bernini-r-mlx (1.3B tier)Apache MLX port of ByteDance Bernini-R-1.3B (the Bernini Renderer, small tier).
This work is licensed under the Apache License, Version 2.0.
It is derived from and depends on the following Apache-2.0 works; their noticesand attributions are retained here:
- ByteDance/Bernini-R-1.3B — the Bernini Renderer, 1.3B tier (weights + reference inference code). https://github.com/bytedance/Bernini · https://huggingface.co/ByteDance/Bernini-R-1.3B-Diffusers Paper: "Bernini: Latent Semantic Planning for Video Diffusion" (arXiv:2605.22344).
- Wan-AI/Wan2.1-T2V-1.3B — the base DiT, 16-channel causal VAE, and UMT5 text encoder that Bernini-R-1.3B fine-tunes / reuses. https://github.com/Wan-Video/Wan2.1
- Qwen2.5-VL-7B-Instruct — the Bernini *planner* (NOT used here; not released as weights).
- mlx-video (Blaizzy/mlx-video) — the MLX Wan backbone reused by this port.
Scope note: only the Bernini *Renderer* is open-sourced upstream. The MLLM semanticplanner (the paper's "latent semantic planning") is not released, so this port runs withUMT5 text conditioning only; the planner-feature channel is absent.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081---license: apache-2.0library_name: mlxpipeline_tag: text-to-videotags: - mlx - text-to-video - video-editing - video-to-video - reference-to-video - wan2.1 - berninibase_model: ByteDance/Bernini-R-1.3B-Diffusers---
# Bernini-R-1.3B (MLX)
Apple MLX port of **[ByteDance/Bernini-R-1.3B](https://huggingface.co/ByteDance/Bernini-R-1.3B-Diffusers)** —the **1.3B** tier of ByteDance's Bernini *Renderer*: a Wan2.1-T2V-1.3B-derived videogenerator/editor with **Segment-Aware 3D RoPE** for multi-reference / editing tasks.The small tier "performs close to the 14B variant on simple tasks such as style transfer,subtitle or watermark removal, and local editing."
Runs on Apple Silicon via [MLX](https://github.com/ml-explore/mlx) + the[mlx-video](https://github.com/Blaizzy/mlx-video) Wan backbone.
> **This is the lowest-cost Bernini tier.** For the higher-quality A14B renderer see> [`mlx-community/Bernini-R-bf16`](https://huggingface.co/mlx-community/Bernini-R-bf16) /> [`-int4`](https://huggingface.co/mlx-community/Bernini-R-int4).
## ⚠️ Scope: renderer only
Only the Renderer ("-R") is open-sourced upstream. The MLLM semantic **planner** (thepaper's headline "latent semantic planning", a Qwen2.5-VL-7B model) is **not released**.This port therefore runs with **UMT5 text conditioning only** — the planner-featurechannel is absent (and carries no weights in the released checkpoint).
## Architecture
| | ||---|---|| Backbone | **Wan2.1-T2V-1.3B**, single expert (30L · dim 1536 · 12H · ffn 8960) || Experts | **one** (`skip_transformer_2: true`, `switch_dit_boundary: 0`) || VAE | 16-ch `AutoencoderKLWan` (stock Wan2.1) || Text encoder | UMT5-xxl || Bernini knobs | `shift 3.0`, `use_src_id_rotary_emb` (SA-3D RoPE — **no extra parameters**) |
Differs from the A14B port only by config: a single 1.3B expert instead of thehigh/low-noise A14B pair. There is no expert-boundary switch.
## Tasks
| Task | Description ||---|---|| `t2v` / `t2i` | text-to-video / image || `r2v` | reference-to-video — generate a subject from up to K reference images (chained APG) || `v2v` | prompt-based video editing (source video injected as conditioning) || `rv2v` | reference + video editing |
## Variants
| Repo | Precision | Transformer | + shared ||---|---|---|---|| `…-1.3B-bf16` | bfloat16 | 2.6 GB | VAE 0.5 GB · UMT5 10.6 GB || `…-1.3B-int4` | 4-bit (group 64) | 0.8 GB | VAE 0.5 GB · UMT5 10.6 GB |
## Provenance & validation
- Architecture: **stock Wan2.1-T2V-1.3B** (verified — diffusers `WanTransformer3DModel` keys, no extra tensors; matches `mlx-video` `wan21_t2v_1_3b` exactly: 30L/1536/12H/8960). Bernini knobs (`switch_dit_boundary 0`, `shift 3.0`, `use_src_id_rotary_emb`) live in the wrapper config; SA-3D RoPE adds **no parameters**.- Converted fp32 → bf16 from `ByteDance/Bernini-R-1.3B-Diffusers`; VAE/UMT5 are the shared stock Wan2.1 components (byte-identical to the A14B port).- Validated on the CPU stream: key contract bijective (825 file tensors = model params minus the derived `freqs` rope buffer); **bf16 forward cosine 0.999983 vs source fp32**; int4 per-pass cosine **0.9943** vs bf16 (group 64, ≥0.99 gate).
## License & attribution
Apache-2.0. Derived from ByteDance Bernini-R, Wan2.1 (Wan-AI), and mlx-video. See `NOTICE`.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748{ "model_type": "t2v", "model_version": "2.1", "patch_size": [ 1, 2, 2 ], "text_len": 512, "in_dim": 16, "dim": 1536, "ffn_dim": 8960, "freq_dim": 256, "text_dim": 4096, "out_dim": 16, "num_heads": 12, "num_layers": 30, "window_size": [ -1, -1 ], "qk_norm": true, "cross_attn_norm": true, "eps": 1e-06, "vae_stride": [ 4, 8, 8 ], "vae_z_dim": 16, "dual_model": false, "boundary": 0.0, "sample_shift": 3.0, "sample_steps": 50, "sample_guide_scale": 5.0, "num_train_timesteps": 1000, "sample_fps": 16, "frame_num": 81, "sample_neg_prompt": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走", "max_area": 0, "t5_vocab_size": 256384, "t5_dim": 4096, "t5_dim_attn": 4096, "t5_dim_ffn": 10240, "t5_num_heads": 64, "t5_num_layers": 24, "t5_num_buckets": 32}123version https://git-lfs.github.com/spec/v1oid sha256:212747be887cfd8b584d0a6f3d83299714af0da411e29716c1820b6d8637956fsize 2838077537123version https://git-lfs.github.com/spec/v1oid sha256:e86ee4199903e00a88dcd43583a43a6eb898cef600e38670f222d7e37d163787size 11361845505123version https://git-lfs.github.com/spec/v1oid sha256:977530e453dbfabbab31e2972e1577d8d7e2840ba7410c81aa3fd421c0cd7414size 507591226NOTICEAdded+23
README.mdAdded+81
config.jsonAdded+48
model.safetensorsAdded+3
t5_encoder.safetensorsAdded+3
vae.safetensorsAdded+3