Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: This script to download and symlink the model files #34

Open
wrzwicky opened this issue Nov 10, 2024 · 0 comments
Open

Suggestion: This script to download and symlink the model files #34

wrzwicky opened this issue Nov 10, 2024 · 0 comments

Comments

@wrzwicky
Copy link

I made a little utility to download and symlink the two model files so that generate.py just works with no arguments. The function hf_hub_download() used here is equivalent to huggingface-cli download in your instructions.

Verified on Windows, but should work on every platform.

import os
from huggingface_hub import hf_hub_download

oasis_st = hf_hub_download(repo_id="Etched/oasis-500m", filename="oasis500m.safetensors")
print(oasis_st)
os.symlink(oasis_st, "oasis500m.safetensors")

vit_st = hf_hub_download(repo_id="Etched/oasis-500m", filename="vit-l-20.safetensors")
print(vit_st)
os.symlink(vit_st, "vit-l-20.safetensors")
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

No branches or pull requests

1 participant