Skip to content

Support loading local model directories#137

Draft
dewana-sl wants to merge 1 commit into
KittenML:mainfrom
dewana-sl:load-local-models
Draft

Support loading local model directories#137
dewana-sl wants to merge 1 commit into
KittenML:mainfrom
dewana-sl:load-local-models

Conversation

@dewana-sl
Copy link
Copy Markdown

@dewana-sl dewana-sl commented May 21, 2026

Summary

Adds local model-directory loading for users who have already downloaded KittenTTS model assets.

Details

  • Adds load_from_local(model_path, backend=None).
  • Allows KittenTTS("/path/to/model-dir") when the path exists locally.
  • Validates config.json, model file, and voices file before constructing the ONNX model.
  • Keeps Hugging Face imports lazy so local loading can be imported without the download client path being initialized.
  • Documents the local-directory usage in the README.

Addresses #132 and covers the local-cache/repeated-download pain behind #20.

Validation

  • python3 -m unittest -q
  • Editable install in a fresh virtualenv with declared package dependencies.
  • Import smoke for kittentts, KittenTTS, load_from_local, and normalize_text.
  • Real inference smoke from a cached local kitten-tts-nano-0.8-int8 snapshot directory.

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.

2 participants