Commit a73408b
committed
fix(vibevoice): preserve quantization metadata in sanitize() for quantized model loading
sanitize() drops weight keys not found in the model's current parameter
shapes. Since the model isn't quantized yet at sanitize time, quantization
metadata keys (.scales, .biases) are silently removed. Later,
apply_quantization() checks for these keys to decide which layers to
quantize -- finds nothing -- skips quantization -- and loading fails with
a shape mismatch.
Preserve .scales and .biases keys through sanitization, matching the
existing pattern in chatterbox/s3gen.
Same class of bug as Blaizzy#584 (fish_qwen3_omni sanitize fix).1 parent 6c513de commit a73408b
File tree
2 files changed
+28
-2
lines changed- mlx_audio/tts
- models/vibevoice
- tests
2 files changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1321 | 1346 | | |
1322 | 1347 | | |
1323 | 1348 | | |
| |||
0 commit comments