Face Parsing Bisenet BF16
MLX port of the BiSeNet face-parsing model (ResNet18 backbone, 19-class CelebAMask-HQ segmentation — 79999iter.pth, from zllrunning/face-parsing.PyTorch, as redistributed by TMElyralab/MuseTalk in...
Model source
- Kind
- Other
- File size
- 25.4 MB
- Base model
- TMElyralab/MuseTalk
- Version
- vRevision 5f2aa21
- Updated
- Nov 1, 2026
- Downloads
- 36
- Source
- Hugging Face
Source description
mlx-community/face-parsing-bisenet-bf16
MLX port of the BiSeNet face-parsing model (ResNet18 backbone, 19-class CelebAMask-HQ
segmentation — 79999_iter.pth, from
zllrunning/face-parsing.PyTorch, as
redistributed by TMElyralab/MuseTalk in
face-parse-bisent/). Used by MuseTalk to build the blend mask when compositing a regenerated
mouth back into a frame.
Converted from PyTorch to MLX-native bf16 safetensors. Weights only — the model definition lives
in the Swift consumer (xocialize/musetalk-mlx-swift,
MuseTalk.BiSeNet).
Parity
Versus the PyTorch reference (CPU): argmax (parse map) agreement 100.0000% on a fixed input;
feat_out logit max_abs 8.7e-2 at bf16 (8.3e-6 at fp32) — the logit noise is washed out by the
argmax, so the segmentation is identical. bf16 chosen because the output is a class argmax (robust)
and it halves the footprint (~27 MB).
Layout
model.safetensors 160 tensors, bf16, MLX-native keys
config.json architecture / n_classes (19) / input 512 / key convention
Keys are MLX-native: the diffusers/torch downsample.0/.1 Sequential is renamed to
downsample.conv/.bn, num_batches_tracked dropped, conv weights transposed (O,I,H,W)→(O,H,W,I).
The 19 classes follow the CelebAMask-HQ label order (0 background; 1 skin; ... 11–13 lips/mouth; ...).
Use with MLX (Swift)
import MuseTalk // xocialize/musetalk-mlx-swift
let net = BiSeNet()
net.train(false) // BatchNorm: running stats
try MuseTalkWeights.load(net, from: weightsURL) // model.safetensors
let logits = net(faceNCHW) // (B, 19, H, W); argmax over axis 1 -> parse map
License
MIT (mirrors upstream face-parsing.PyTorch / MuseTalk).
Sources
1 source
Sources
1 sourceVerified Nov 1
Download files
Model artifacts
1 artifact
Model artifacts
1 artifactmodel.safetensors
safetensors · BF16 (unverified) · 25.4 MB · SHA-256 2a8f088ca96b…2e4a · Hugging Face
Download fileSource excerpts
3 excerpts
Source excerpts
3 excerpts--- library_name: mlx license: mit pipeline_tag: image-segmentation base_model: TMElyralab/MuseTalk tags: - mlx - face-parsing - bisenet - segmentation --- # mlx-community/face-parsing-bisenet-bf16 MLX port of the **BiSeNet face-parsing** model (ResNet18 backbone, 19-class CelebAMask-HQ segmentation — `79999_iter.pth`, from [zllrunning/face-parsing.PyTorch](https://github.com/zllrunning/face-parsing.PyTorch), as redistributed by [TMElyralab/MuseTalk](https://huggingface.co/TMElyralab/MuseTalk) in `face-parse-bisent/`). Used by MuseTalk to build the blend mask when compositing a regenerated mouth back into a frame. Converted from PyTorch to MLX-native bf16 safetensors. Weights only — the model definition lives in the Swift consumer ([`xocialize/musetalk-mlx-swift`](https://github.com/xocialize/musetalk-mlx-swift), `MuseTalk.BiSeNet`). ## Parity Versus the PyTorch reference (CPU): **argmax (parse map) agreement 100.0000%** on a fixed input; `feat_out` logit `max_abs` 8.7e-2 at bf16 (8.3e-6 at fp32) — the logit noise is washed out by the argmax, so the segmentation is identical. bf16 chosen because the output is a class argmax (robust) and it halves the footprint (~27 MB). ## Layout ``` model.safetensors 160 tensors, bf16, MLX-native keys config.json architecture / n_classes (19) / input 512 / key convention ``` Keys are MLX-native: the diffusers/torch `downsample.0/.1` Sequential is renamed to `downsample.conv/.bn`, `num_batches_tracked` dropped, conv weights transposed `(O,I,H,W)→(O,H,W,I)`. The 19 classes follow the CelebAMask-HQ label order (0 background; 1 skin; … 11–13 lips/mouth; …). ## Use with MLX (Swift) ```swift import MuseTalk // xocialize/musetalk-mlx-swift let net = BiSeNet() net.train(false) // BatchNorm: running stats try MuseTalkWeights.load(net, from: weightsURL) // model.safetensors let logits = net(faceNCHW) // (B, 19, H, W); argmax over axis 1 -> parse map ``` ## License MIT (mirrors upstream face-parsing.PyTorch / MuseTalk).
Source context: 36 downloads · 0 likes · Pipeline image-segmentation · Library mlx · Repo mlx-community/face-parsing-bisenet-bf16
Source context: 41 downloads · 0 likes · Pipeline image-segmentation · Library mlx · Repo mlx-community/face-parsing-bisenet-bf16
