Skip to content

Forced weight download for dinov2 from torch hub #149

@barwojcik

Description

@barwojcik

Issue

When model is initialized from hugging face like this:

model = MapAnything.from_pretrained("facebook/map-anything").to(device)

it forces weights download for dinov2_vitg14 from torch hub. It's redundant, as the weights are already included in hugging face checkpoint.

Cause

It looks like DINOv2Encoder from uniception always loads weights from torch hub, and forces the download when they are missing from hub's cache. It seems that there is no way to pass pretrained=False to torch.hub.load() inside this class. I'm going to raise the issue at https://github.com/castacks/UniCeption

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions