The SafeTensorsWriter in vendor/ruvector/.../export.js zero-initialises its
output buffer and then copies the JSON header in without overwriting the
padding zone, so the bytes between the JSON's last '}' and the declared
8-byte-aligned header length are left as 0x00 instead of the spec-required
0x20 (space). Strict readers — the Rust safetensors crate, Candle, and
the safetensors.torch.load_file Python helper that wraps the Rust binding —
reject the file with 'trailing characters at line 1 column N+1'. This is
why model.safetensors at huggingface.co/ruvnet/wifi-densepose-pretrained
currently fails to load anywhere outside our hand-rolled JS / Python
parsers (both of which strip trailing NULs before json.loads).
The utility opens a .safetensors file, locates the header zone, detects
NUL padding, and rewrites just the padding bytes with 0x20. Declared
header length, JSON content, and every tensor byte are preserved — only
the padding bytes flip from NUL to space, so the SHA-256 of the tensor
data is unchanged. Idempotent (a clean file reports 'already clean' and
exits 0 without rewriting), supports --dry-run, accepts multiple paths.