Instructions to use benc0/SeedVR2-7B-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use benc0/SeedVR2-7B-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir SeedVR2-7B-mlx benc0/SeedVR2-7B-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Upload folder using huggingface_hub
Browse files- README.md +48 -0
- config.json +24 -0
- pos_emb.safetensors +3 -0
- transformer.safetensors +3 -0
- vae.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: mlx
|
| 4 |
+
tags:
|
| 5 |
+
- mlx
|
| 6 |
+
- mlx-swift
|
| 7 |
+
- super-resolution
|
| 8 |
+
- image-upscaling
|
| 9 |
+
- diffusion
|
| 10 |
+
- apple-silicon
|
| 11 |
+
pipeline_tag: image-to-image
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# SeedVR2-7B (MLX-Swift) — fp16
|
| 15 |
+
|
| 16 |
+
**MLX-Swift** weights for **SeedVR2-7B**, ByteDance's one-step diffusion **super-resolution /
|
| 17 |
+
restoration** model (ICLR 2026). For on-device upscaling on Apple Silicon via the
|
| 18 |
+
[`seedvr2-mlx-swift`](https://github.com/xocialize/seedvr2-mlx-swift) package. The larger,
|
| 19 |
+
higher-fidelity sibling of [`mlx-community/SeedVR2-3B-mlx`](https://huggingface.co/mlx-community/SeedVR2-3B-mlx).
|
| 20 |
+
int8 variant: [`SeedVR2-7B-mlx-int8`](https://huggingface.co/benc0/SeedVR2-7B-mlx-int8).
|
| 21 |
+
Sharp checkpoint: [`SeedVR2-7B-sharp-mlx`](https://huggingface.co/benc0/SeedVR2-7B-sharp-mlx).
|
| 22 |
+
|
| 23 |
+
- **Files:** `transformer.safetensors` (DiT, fp16, ~16.5 GB) · `vae.safetensors` (3D-causal-conv VAE, fp16) · `pos_emb.safetensors` (precomputed text embedding, 58×5120) · `config.json`.
|
| 24 |
+
- **Architecture (vs 3B):** vid_dim 3072 (2560), 24 heads (20), 36 layers (32), all layers multimodal, plain MLP (SwiGLU), rope_dim 64.
|
| 25 |
+
- **Precision:** fp16. Parity vs the mflux reference (CPU): transformer reload `t_out` max_abs **0.00e+00 (bit-exact)**.
|
| 26 |
+
- **Memory:** ~17 GB weights resident; recommended 32 GB+ unified memory (use the int8 variant below that).
|
| 27 |
+
|
| 28 |
+
## Usage
|
| 29 |
+
|
| 30 |
+
```swift
|
| 31 |
+
import SeedVR2MLX // github.com/xocialize/seedvr2-mlx-swift
|
| 32 |
+
let upscaler = try SeedVR2Upscaler(directory: weightsDir) // downloaded from this repo
|
| 33 |
+
let out = upscaler.upscale(processedImage: img, seed: 42) // [-1,1], dims padded to /16
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
Python (reference implementation): `mflux-upscale-seedvr2 --model seedvr2-7b --image-path input.png --resolution 2x`
|
| 37 |
+
|
| 38 |
+
## Provenance & license
|
| 39 |
+
|
| 40 |
+
Chain: **ByteDance Seed** — *SeedVR2: One-Step Video Restoration via Diffusion Adversarial
|
| 41 |
+
Post-Training* (ICLR 2026), [ByteDance-Seed/SeedVR](https://github.com/ByteDance-Seed/SeedVR),
|
| 42 |
+
**Apache-2.0** → PyTorch fp16 redistribution [`numz/SeedVR2_comfyUI`](https://huggingface.co/numz/SeedVR2_comfyUI)
|
| 43 |
+
(`seedvr2_ema_7b_fp16.safetensors`; independently verified bitwise against ByteDance's original fp32
|
| 44 |
+
`seedvr2_ema_7b.pth` — all 1128 tensors identical after fp32→fp16 cast) → MLX reference impl
|
| 45 |
+
[`filipstrand/mflux`](https://github.com/filipstrand/mflux) → export via
|
| 46 |
+
[`xocialize/seedvr2-mlx`](https://github.com/xocialize/seedvr2-mlx) tooling. These are
|
| 47 |
+
format-converted weight artifacts (not a new model); Apache-2.0 applies. Credit ByteDance Seed
|
| 48 |
+
(original), cite the paper (arXiv:2506.05301).
|
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "seedvr2",
|
| 3 |
+
"variant": "seedvr2-7b",
|
| 4 |
+
"transformer_overrides": {
|
| 5 |
+
"vid_dim": 3072,
|
| 6 |
+
"heads": 24,
|
| 7 |
+
"num_layers": 36,
|
| 8 |
+
"mm_layers": 36,
|
| 9 |
+
"rope_dim": 64,
|
| 10 |
+
"rope_on_text": false,
|
| 11 |
+
"rope_freqs_for": "pixel",
|
| 12 |
+
"mlp_type": "normal",
|
| 13 |
+
"use_output_ada": false,
|
| 14 |
+
"last_layer_vid_only": false
|
| 15 |
+
},
|
| 16 |
+
"pos_emb_shape": [
|
| 17 |
+
58,
|
| 18 |
+
5120
|
| 19 |
+
],
|
| 20 |
+
"dtype": "float16",
|
| 21 |
+
"upstream": "ByteDance-Seed/SeedVR (Apache-2.0)",
|
| 22 |
+
"mlx_reference": "filipstrand/mflux",
|
| 23 |
+
"pytorch_weights": "numz/SeedVR2_comfyUI"
|
| 24 |
+
}
|
pos_emb.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d2e06cadb10f1f149b5aa781185b250eb60f0e64327f12efd17886cecc9c2984
|
| 3 |
+
size 594008
|
transformer.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:222a0157f6150bea4581baceb4a1dc66f20125c847ed9e72904435378f199c89
|
| 3 |
+
size 16479337469
|
vae.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2efbfb38a82a99a9cd16432ca5d564510678d228ce6209692d528aa32285cfb
|
| 3 |
+
size 501324772
|