fix(engine): prioritize SafeTensors engine for .safetensors files (Issue #112) - #122
Merged
Merged
Conversation
…sue #112) - SafeTensors files (.safetensors) ALWAYS use SafeTensors engine regardless of source - Move file extension detection to highest priority over model ID detection - Prevents HuggingFace SafeTensors files from incorrectly using HuggingFace engine - Add comprehensive tests for SafeTensors priority and file extension precedence - Fixes Issue #112: SafeTensors files should use SafeTensors engine Resolves user report of SafeTensors files being incorrectly routed to HuggingFace engine. Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
Michael-A-Kuykendall
added a commit
that referenced
this pull request
Dec 19, 2025
…sue #112) (#122) - SafeTensors files (.safetensors) ALWAYS use SafeTensors engine regardless of source - Move file extension detection to highest priority over model ID detection - Prevents HuggingFace SafeTensors files from incorrectly using HuggingFace engine - Add comprehensive tests for SafeTensors priority and file extension precedence - Fixes Issue #112: SafeTensors files should use SafeTensors engine Resolves user report of SafeTensors files being incorrectly routed to HuggingFace engine. Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
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.
Summary
Changes
select_backend()to prioritize file extensions firstTest Coverage
test_issue_112_safetensors_engine_selectionpassesIssue Resolution
Fixes Issue #112: SafeTensors files should use SafeTensors engine
Previously, a file like
/path/to/org/model/pytorch_model.safetensorswould be incorrectly routed to the HuggingFace engine due to the slash pattern matching. Now it correctly uses the SafeTensors engine.🤖 Generated with Claude Code