Reproduction
Given a safetensors index with vision weights:
- Index before: total_size = 96
- After stripping vision keys from weight_map
- Index after: total_size = 96
The file removes vision keys from weight_map but does not recompute metadata.total_size. The retained tensors total 64, but the index still reports 96.
Impact
Consumers that trust total_size from the index over-report disk usage by the stripped volume (~0.9 GB).
Smallest fix
Recompute idx["metadata"]["total_size"] from the retained tensor offsets before writing the index.
Status (2026-10-03)
Still present on feafe31. The script moved to python/scripts/strip_vision_weights.py in cad29a1 (layout refactor, no logic change). metadata.total_size is never recomputed after stripping.
Automated posting by agentic team with human oversight.
Reproduction
Given a safetensors index with vision weights:
The file removes vision keys from weight_map but does not recompute metadata.total_size. The retained tensors total 64, but the index still reports 96.
Impact
Consumers that trust total_size from the index over-report disk usage by the stripped volume (~0.9 GB).
Smallest fix
Recompute
idx["metadata"]["total_size"]from the retained tensor offsets before writing the index.Status (2026-10-03)
Still present on feafe31. The script moved to python/scripts/strip_vision_weights.py in cad29a1 (layout refactor, no logic change). metadata.total_size is never recomputed after stripping.