timm
/

Image Feature Extraction
timm
PyTorch
Safetensors
Transformers

Troubleshooting Dinov3 Model Loading Error

#2
by willieseun - opened

Hey everyone,

I ran into a RuntimeError: Unknown model when trying to load a specific Vision Transformer model using the timm library. I'm hoping someone here might have encountered this before or know the solution!


The Error

Here's the traceback I received:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_46/2528513681.py in <cell line: 0>()
      1 import timm
      2 ----> 3 model = timm.create_model("vit_huge_plus_patch16_dinov3.lvd1689m", pretrained=True)
/usr/local/lib/python3.11/dist-packages/timm/models/_factory.py in create_model(model_name, pretrained, pretrained_cfg, pretrained_cfg_overlay, checkpoint_path, cache_dir, scriptable, exportable, no_jit, **kwargs)
    132     
    133     if not is_model(model_name):
--> 134         raise RuntimeError('Unknown model (%s)' % model_name)
    135     
    136     create_fn = model_entrypoint(model_name)

RuntimeError: Unknown model (vit_huge_plus_patch16_dinov3.lvd1689m)

(Note: The original error message only showed vit_huge_plus_patch16_dinov3 but I'm including the full string I used: "vit_huge_plus_patch16_dinov3.lvd1689m" as that's what seems to be intended.)


πŸ€” Potential Causes and My Environment

It seems like timm doesn't recognize the string "vit_huge_plus_patch16_dinov3.lvd1689m" as a valid model name.

  • Model Naming: This specific model seems to be a DINOv3 implementation, likely hosted on a custom GitHub repository or a specific branch/version of timm.
  • Model Availability: Is this model name only available in a very recent or perhaps a specific development version of timm?
  • Typo: While I've double-checked, it's possible there's a subtle typo in the model name string.

My Environment Details (Approximate):

  • Python Version: Python 3.11
  • timm Version: (Need to check, but likely a standard pip install of a recent stable version).

πŸ’‘ Request for Help

  1. Has anyone successfully loaded the vit_huge_plus_patch16_dinov3.lvd1689m model?
  2. What version of the timm library are you using?
  3. Are there extra steps required (like installing from a specific GitHub URL or adding a custom model path) to make this model available in timm?

Any help would be greatly appreciated! πŸ™

#timm #pytorch #visiontransformer #dinov3 #machinelearning

PyTorch Image Models org
β€’
edited 4 days ago

@willieseun 99% likely you have an older version of timm, check your environment. You need >=1.0.20

@rwightman I tried upgrading still no good

Oh it seems it works now. Thanks!

willieseun changed discussion status to closed

Sign up or log in to comment