mahmoodlab/UNI

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

Closed this issue · 2 comments

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

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

@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: