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

Weights are saved twice after running the walkthrough notebook: models--MahmoodLab--UNI and models--MahmoodLab--uni #14

Open
GeorgeBatch opened this issue Mar 26, 2024 · 2 comments

Comments

@GeorgeBatch
Copy link
Contributor

Dear authors,

I ran the walkthrough notebook, and the model was downloaded twice (see screenshot).

  1. I get the symbolic link
    assets/ckpts/vit_large_patch16_224.dinov2.uni_mass100k/pytorch_model.bin pointing to a file in .cache/huggingface/hub/models--MahmoodLab--UNI/.

  2. The other downloaded model is in .cache/huggingface/hub/models--MahmoodLab--uni/

I think there are 2 different places in the code, one with capital letters "UNI" and one with non-capital letters "uni". They do not link to each other since each folder weighs 1.2 GB, while together, they occupy 2.4 GB.

Best wishes,
George

Screenshot 2024-03-26 at 15 07 46

@Richarizardd
Copy link
Contributor

Hi @GeorgeBatch - are you still running into this issue? It may be due to the repo being renamed (should be stable now).

@GeorgeBatch
Copy link
Contributor Author

GeorgeBatch commented Jul 1, 2024

@Richarizardd, I think the issue was due to renaming, as you said.

I think it's also because of the inconsistency in the instructions:

  • Automatic download: model = timm.create_model("hf-hub:MahmoodLab/uni", pretrained=True, init_values=1e-5, dynamic_img_size=True)
  • Manual download: hf_hub_download("MahmoodLab/UNI", filename="pytorch_model.bin", local_dir=local_dir, force_download=True)

I tried, and it works now to do the automatic download with capital letters in the name "MahmoodLab/UNI". This way, the naming matches with both the manual download name and the repo link on HuggingFace.

Proposed changes to instructions:

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

2 participants