-
Notifications
You must be signed in to change notification settings - Fork 640
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
unexpected keys #275
Comments
I'm attempting to use it with python 3.11.7. It's not an option to use a lower python version unfortunately. pip -m install torch torchvision opencv-python==4.6.0.66 timm einops==0.6.0 imutils==0.5.4 --user If I try and pip install timm==0.6.12 I get
|
Using with python 3.10 has no issues. How can I get this working with python 3.11.7? |
It seems that timm needed to be modified to work with python 3.11, huggingface/pytorch-image-models@9ecab46 Now that timm is updated, MiDaS no longer works. Where would I need to modify the Midas code, or is it the model itself that would need updating? |
Based on the first error you posted, it looks like maybe the newer versions of the timm library don't include weights for the self.load_state_dict(parameters, strict=False) If that doesn't work, you could try explicitly removing those keys from the loaded If that doesn't work, then (shameless plug) I have a script that can load the beit models and doesn't depend on timm. It also has support for the depth-anything models which tend to give better results if you don't specifically need beit. Also, for really good (but slow) depth results, it's worth checking out the marigold model if you haven't already. |
Thanks very much, I'll give those things a try 👍 |
I had this same error today, inside a bare-bones python I was able to get this repository working and producing sensible output by I tried several more recent versions but jumping back a few versions at a time, |
with the model path set to use the dpt_beit_large_512.pt model I downloaded, I get the following error :
The text was updated successfully, but these errors were encountered: