Skip to content

Conversation

@jcheng5
Copy link

@jcheng5 jcheng5 commented Nov 22, 2025

On Windows, creating symlinks requires either administrator privileges or developer mode. When these aren't available, hub_download() fails silently:

  • Files download successfully to blobs/
  • file.symlink() fails and returns FALSE
  • Warnings are generated but ignored
  • snapshots/ directory remains empty
  • Applications can't find model files

This PR fixes the problem by putting the files directly in snapshots when file.symlink() fails. This is less space efficient when there are multiple snapshots for a model, but it does work.

The Python huggingface_hub implementation has similar behavior to this.

Creating both blob and snapshot folders when symlinks
aren't supported is just taking double the space for
no reason. This change follows the Python package's
logic for handling this case--just don't have a blobs
folder.
@jcheng5
Copy link
Author

jcheng5 commented Nov 22, 2025

Fixes #10

@jcheng5
Copy link
Author

jcheng5 commented Nov 22, 2025

I only tested this on Windows, in 1) non-Admin, non-Developer mode, and 2) Admin, non-Developer mode. (No Mac or Linux)

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