fix(#894): actionable diagnostic when --model gets a non-RVF file#919
Merged
Conversation
Users who downloaded ruvnet/wifi-densepose-pretrained and passed model.safetensors / model-q4.bin / model.rvf.jsonl to --model hit a bare "Progressive loader init failed: invalid magic at offset 0: expected 0x52564653, got 0x77455735" and were stuck — the server then silently fell back to signal heuristics (which over-count, feeding "is it fake" reports). The HF files are a different *format* and encoder architecture than the RVF binary container the progressive loader expects, so they can't load directly. Now the load-failure path detects the common cases (safetensors header, JSONL manifest, quantized .bin blob) and emits a plain explanation naming the format, what --model actually expects (RVF `RVFS` container from wifi-densepose-train), and that it's continuing with heuristics — with a pointer to #894. Pure, testable `diagnose_model_load_error()` + 4 unit tests (run under the default `--no-default-features` CI). Full crate unit suite: 429 + 114 passed, 0 failed. Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (#894)
Users download
ruvnet/wifi-densepose-pretrained, pass a file to--model, and get:…then the server silently falls back to signal heuristics (which over-count — "10 persons when 1 present" — exactly what feeds "is it fake" reports). The cryptic magic error gives no path forward.
Root cause (unchanged): the HF files (
model.safetensors,model-q{2,4,8}.bin,model.rvf.jsonl) are a different format and encoder architecture than the RVF binary container (RVFSmagic0x52564653) the--modelprogressive loader expects. They can't load directly — a format-only convert would load-but-emit-garbage.Fix (scoped, honest)
This PR doesn't claim to make the HF model loadable (that needs a matching-architecture RVF export, tracked separately). It makes the failure actionable: the load-error path now detects the common cases and explains plainly —
safetensors(8-byte LE header +{).rvf.jsonlmanifest.binblob (model-q4.bin)…naming the format, stating what
--modelactually expects (an RVF container fromwifi-densepose-train), that the HF files are a different format/architecture, that the server is continuing on heuristics, and linking #894.Tests
Pure
diagnose_model_load_error(path, data, err)+ 4 unit tests under a plain#[cfg(test)]module (so they run in the default--no-default-featuresCI):safetensors_is_named_and_points_at_894,quantized_bin_is_identified,jsonl_manifest_is_identified,unknown_format_still_gives_guidance.Verification
cargo test -p wifi-densepose-sensing-server --no-default-features→ new tests pass; full crate unit suite 429 + 114 passed, 0 failed.🤖 Generated with claude-flow