xocialize commited on
Commit
9dbcb30
·
verified ·
1 Parent(s): f2ec911

Add SeedVR2-3B MLX-Swift weights (int8)

Browse files
Files changed (5) hide show
  1. README.md +39 -0
  2. config.json +4 -0
  3. pos_emb.safetensors +3 -0
  4. transformer.safetensors +3 -0
  5. vae.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - quantized
11
+ - apple-silicon
12
+ pipeline_tag: image-to-image
13
+ ---
14
+
15
+ # SeedVR2-3B (MLX-Swift) — int8
16
+
17
+ **int8-quantized** MLX-Swift weights for **SeedVR2-3B** (ByteDance, ICLR 2026) — one-step
18
+ diffusion **super-resolution**. The **on-device** variant: ~half the size, near-lossless.
19
+ For the [`seedvr2-mlx-swift`](https://github.com/xocialize/seedvr2-mlx-swift) package
20
+ (MLXEngine / ForgeUpscaler). fp16 base: [`SeedVR2-3B-mlx`](https://huggingface.co/mlx-community/SeedVR2-3B-mlx).
21
+
22
+ - **Quantization:** transformer DiT Linears int8, group size 64 (the small `vid_in.proj` and the VAE are kept fp16). Declared in `config.json` (`"quantization": {"bits": 8, "group_size": 64}`); the loader applies it automatically.
23
+ - **Files:** `transformer.safetensors` (int8, **~3.9 GB** vs 7.9 GB fp16) · `vae.safetensors` (fp16) · `pos_emb.safetensors` · `config.json`.
24
+ - **Quality:** int8 `t_out` cosine vs fp16 = **0.9999749** (near-lossless; int4 by contrast degrades this model to ~22.7 dB — use int8 on-device). Reload round-trip cosine **1.0**.
25
+
26
+ ## Usage
27
+
28
+ ```swift
29
+ import SeedVR2MLX
30
+ let upscaler = try SeedVR2Upscaler(directory: weightsDir) // detects int8 from config, applies quantize on load
31
+ let out = upscaler.upscale(processedImage: img, seed: 42)
32
+ ```
33
+
34
+ ## Provenance & license
35
+
36
+ **ByteDance Seed** (*SeedVR2*, ICLR 2026, [ByteDance-Seed/SeedVR](https://github.com/ByteDance-Seed/SeedVR), **Apache-2.0**)
37
+ → fp16 [`numz/SeedVR2_comfyUI`](https://huggingface.co/numz/SeedVR2_comfyUI) → MLX ref
38
+ [`filipstrand/mflux`](https://github.com/filipstrand/mflux) → MLX-Swift port + int8 conversion by
39
+ **MVS Collective (xocialize)**. Format/precision-converted weights (not a new model); Apache-2.0 applies.
config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"model_type":"seedvr2","variant":"seedvr2-3b","transformer_overrides":{},
2
+ "pos_emb_shape":[58,5120],"dtype":"int8",
3
+ "quantization":{"bits":8,"group_size":64},
4
+ "upstream":"ByteDance-Seed/SeedVR (Apache-2.0)","mlx_reference":"filipstrand/mflux"}
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:4f0d2b3786440d50b94cf7566cd244c4626f3f418d903f75e8422bfd48023dec
3
+ size 4217529094
vae.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2efbfb38a82a99a9cd16432ca5d564510678d228ce6209692d528aa32285cfb
3
+ size 501324772