Skip to content

fix(config): keep a Hugging Face model ID out of path normalisation - #617

Open
fg618455-droid wants to merge 1 commit into
isair:developfrom
fg618455-droid:upstream-pr/whisper-model-id
Open

fix(config): keep a Hugging Face model ID out of path normalisation#617
fg618455-droid wants to merge 1 commit into
isair:developfrom
fg618455-droid:upstream-pr/whisper-model-id

Conversation

@fg618455-droid

Copy link
Copy Markdown

Summary

  • whisper_model accepts a size name (`medium`), a Hugging Face repo ID (`owner/model`), or a local directory, but every value went through path expansion.
  • On Windows, path expansion rewrote the separator in a repo ID like deepdml/faster-whisper-large-v3-turbo-ct2 to a backslash, and the loader then rejected the result as an invalid model size, so no model outside the built-in size names could be used on that platform.
  • Expansion now only applies to what is recognisably a path (a tilde, an absolute path, or something that exists on disk); everything else is treated as an identifier and passed through unchanged.

Test plan

  • pytest tests/test_config_path_expansion.py (7 tests, new coverage for the size/repo-ID/path distinction)
  • Verified against the real model: deepdml/faster-whisper-large-v3-turbo-ct2 loads correctly with HF_HUB_OFFLINE=1 on Windows after this fix

whisper_model accepts a size name, a repo ID, or a directory, but every
value went through path expansion. On Windows that rewrote the separator
in "owner/model" to a backslash, and the loader rejected the result as an
invalid model size, so no model outside the built-in size names could be
used on that platform.

Expansion now applies to what is recognisably a path: a tilde, an absolute
path, or something that exists on disk. Everything else is an identifier
and is passed through as written.

@fg618455-droid fg618455-droid left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review (APPROVE not permitted on own PR via API): clean, well-scoped fix for a real Windows-only bug (path normalisation mangling a Hugging Face repo ID's separator). Minimal diff, good test coverage (repo-ID pass-through + still-normalises-a-real-directory), verified against the real model end-to-end per the PR description. No blocking issues; CI green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant