Ir para o conteúdo
ModelListadosExterno
Baixar

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...

TipoOtherModelo baseTMElyralab/MuseTalkVersãoRevision 5f2aa21Bnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
25,4 MB
Modelo base
TMElyralab/MuseTalk
Versão
vRevision 5f2aa21
Atualizado
1 de nov. de 2026
Downloads
36
Fonte
Hugging Face

Descrição da fonte

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).

Fontes

1 fonte
Hugging FacePrimárioVersão 5f2aa216736b9a98eb366e56bcbad472548247f4
huggingface.co/mlx-community/face-parsing-bisenet-bf16/tree/5f2aa216736b9a98eb366e56bcbad472548247f4

Verificado 1 de nov.

Download files

Repository files

File inventory only; completeness is unverified.

Artefatos de modelo

1 artefato

model.safetensors

safetensors · BF16 (unverified) · 25,4 MB · SHA-256 2a8f088ca96b…2e4a · Hugging Face

Download file

Trechos de fonte

3 trechos

--- 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