Skip to content

Automatic weights download#185

Open
michal1000w wants to merge 6 commits intonikopueringer:mainfrom
michal1000w:automatic_downloads
Open

Automatic weights download#185
michal1000w wants to merge 6 commits intonikopueringer:mainfrom
michal1000w:automatic_downloads

Conversation

@michal1000w
Copy link

@michal1000w michal1000w commented Mar 17, 2026

What does this change?

This change automatically downloads weights of the model if they are not present in the checkpoints folder, removing the need of manual download and setup

How was it tested?

Checked all synthetic tests and manual tests passed

Checklist

  • uv run pytest passes
  • uv run ruff check passes
  • uv run ruff format --check passes

@JamesNyeVRGuy
Copy link
Contributor

Generally a good idea, resolve your conflicts and pass the lint and I will read again

@michal1000w michal1000w force-pushed the automatic_downloads branch 2 times, most recently from c567c4e to 7360bd8 Compare March 26, 2026 09:25
@michal1000w michal1000w force-pushed the automatic_downloads branch from 7360bd8 to 7090a6c Compare March 26, 2026 09:38
@michal1000w michal1000w force-pushed the automatic_downloads branch from 7090a6c to 0417f96 Compare March 26, 2026 09:53
@michal1000w
Copy link
Author

Generally a good idea, resolve your conflicts and pass the lint and I will read again

Now it should be rebased to the new main. All tests seems to pass now

@nikopueringer
Copy link
Owner

@JamesNyeVRGuy What do you think? Shall I squash and merge?

Copy link
Contributor

@JamesNyeVRGuy JamesNyeVRGuy left a comment

Choose a reason for hiding this comment

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

Nice work — the core design is solid and the test coverage is thorough. A few things to address before merge:

Suggestions:

  • The branching in create_engine (backend.py lines ~308-325) is subtle — in the auto/None path, assets are downloaded before resolve_backend so that _auto_detect_backend can find the MLX weights and choose MLX. In the explicit path, resolve_backend runs first. This ordering matters but isn't obvious; a short comment explaining why would help future readers.
  • The .to(model_precision) change in inference_engine.py looks like a separate bug fix. Worth calling out in the PR description or splitting into its own commit so it's easier to bisect later.

Minor observation (non-blocking):

  • _extract_path_from_output matches any line whose path ends in .safetensors — could pick up a stray log line. Probably fine in practice but worth being aware of.

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.

3 participants