Instructions to use xocialize/SCAIL-2-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use xocialize/SCAIL-2-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir SCAIL-2-bf16 xocialize/SCAIL-2-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: zai-org/SCAIL-2
|
| 4 |
+
tags:
|
| 5 |
+
- mlx
|
| 6 |
+
- video
|
| 7 |
+
- character-animation
|
| 8 |
+
- image-to-video
|
| 9 |
+
- wan2.1
|
| 10 |
+
- work-in-progress
|
| 11 |
+
library_name: mlx
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# SCAIL-2 — MLX (work in progress)
|
| 15 |
+
|
| 16 |
+
> ## ⚠️ WIP — pre-release conversion, expect changes
|
| 17 |
+
>
|
| 18 |
+
> These are Apple-MLX conversions of [zai-org/SCAIL-2](https://huggingface.co/zai-org/SCAIL-2)
|
| 19 |
+
> for the [xocialize/scail-2-mlx](https://github.com/xocialize/scail-2-mlx) port,
|
| 20 |
+
> published from our own namespace while the port is under active development.
|
| 21 |
+
> File formats, key layouts, and dtypes **may change without notice**. Quantized
|
| 22 |
+
> (q8/q4) variants, golden end-to-end validation against the PyTorch reference,
|
| 23 |
+
> and an mlx-community release are planned but not done. Use for
|
| 24 |
+
> experimentation, not production.
|
| 25 |
+
|
| 26 |
+
**SCAIL-2** (Zhipu AI, [arXiv 2512.05905](https://arxiv.org/abs/2512.05905)) is an
|
| 27 |
+
end-to-end controlled character-animation model: a reference character image +
|
| 28 |
+
a driving video → the character performing that motion. Cross-identity
|
| 29 |
+
replacement, multi-character scenes, and animal driving, with no intermediate
|
| 30 |
+
pose representations required. The backbone is a Wan2.1-I2V-14B fork with a
|
| 31 |
+
3-segment (reference / video / pose) RoPE design and dual mask conditioning.
|
| 32 |
+
|
| 33 |
+
## Files
|
| 34 |
+
|
| 35 |
+
| file | component | dtype | size |
|
| 36 |
+
|---|---|---|---|
|
| 37 |
+
| `dit.safetensors` | SCAIL2 DiT (14B, Wan2.1-I2V fork) | bf16 | 33 GB |
|
| 38 |
+
| `umt5.safetensors` | umT5-XXL text encoder | bf16 | 11 GB |
|
| 39 |
+
| `clip.safetensors` | open-clip xlm-roberta ViT-H/14 visual tower | fp16 | 1.2 GB |
|
| 40 |
+
| `vae.safetensors` | Wan2.1 VAE (16-ch) | fp32 | 0.5 GB |
|
| 41 |
+
|
| 42 |
+
Keys follow the [scail-2-mlx](https://github.com/xocialize/scail-2-mlx) module
|
| 43 |
+
tree (MLX `nn.Sequential` uses `.layers.N`; conv weights are NDHWC/NHWC).
|
| 44 |
+
Tokenizer: use `google/umt5-xxl` (or the `umt5-xxl/` directory bundled with the
|
| 45 |
+
original checkpoint).
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
git clone https://github.com/xocialize/scail-2-mlx && cd scail-2-mlx
|
| 51 |
+
uv venv --python 3.12 .venv
|
| 52 |
+
uv pip install -e refs/mlx-video -e .
|
| 53 |
+
hf download xocialize/SCAIL-2-MLX --local-dir weights/mlx
|
| 54 |
+
|
| 55 |
+
.venv/bin/python scripts/generate.py \
|
| 56 |
+
--weights-dir weights/mlx \
|
| 57 |
+
--image ref.jpg --mask-image ref_mask.jpg \
|
| 58 |
+
--pose driving.mp4 --mask-video driving_mask.mp4 \
|
| 59 |
+
--prompt "the girl is dancing" \
|
| 60 |
+
--target-h 480 --target-w 832 --save-file out.mp4
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
Requires Apple Silicon with ≥ 64 GB unified memory at bf16 (active ~34 GB,
|
| 64 |
+
peak ~47 GB at 832×480×65 frames; ~3.7 min/step on an M5 Max — perf work
|
| 65 |
+
ongoing). Driving-input preprocessing (masks / pose renders) comes from the
|
| 66 |
+
upstream [SCAIL-Pose](https://github.com/zai-org/SCAIL-Pose) toolchain.
|
| 67 |
+
|
| 68 |
+
## Conversion provenance & fidelity
|
| 69 |
+
|
| 70 |
+
Converted by [`recipes/convert_scail2.py`](https://github.com/xocialize/scail-2-mlx/blob/main/recipes/convert_scail2.py)
|
| 71 |
+
from the original FSDP checkpoint via upstream `convert.py` key remapping
|
| 72 |
+
(1307/1307 strict key match). Component-level parity vs the PyTorch reference
|
| 73 |
+
(fp32, CPU): CLIP visual max_abs 2.7e-4 on real weights; chunked causal VAE
|
| 74 |
+
decode < 5e-4 per frame (canonical 1+(T−1)·4 frame mapping — see
|
| 75 |
+
[Blaizzy/mlx-video#38](https://github.com/Blaizzy/mlx-video/pull/38)); DiT
|
| 76 |
+
forward parity-locked at fp32 on the CPU oracle. End-to-end golden comparison
|
| 77 |
+
against the PyTorch pipeline is **pending**.
|
| 78 |
+
|
| 79 |
+
## License
|
| 80 |
+
|
| 81 |
+
Weights: converted from `zai-org/SCAIL-2` (model card: MIT; source repository:
|
| 82 |
+
Apache-2.0 — this card is marked Apache-2.0, the stricter of the two, pending
|
| 83 |
+
upstream clarification). Conversion code: Apache-2.0. Derived from SCAIL-2
|
| 84 |
+
(Zhipu AI), Wan2.1 (Alibaba), open-clip.
|