KeyError: 'disk' when loading ETH-CVG/lightglue_disk
Hello everybody!
I was trying to use the "LightGlueForKeypointMatching" class using Disk as the keypoint extractor but
when loading as mentioned on the documentation:
'''
from transformers import LightGlueForKeypointMatching
model = LightGlueForKeypointMatching.from_pretrained("ETH-CVG/lightglue_disk", trust_remote_code=True)
'''
it fails with:
KeyError: 'disk'
I have the most recent transformers and kornia version in my env (kornia==0.8.1 and transformers==4.53.2) and my Python version is 3.9.13
I tryed to load it using the stevenbucaille Disk keypoint extractor:
"
model = LightGlueForKeypointMatching.from_pretrained("stevenbucaille/disk", trust_remote_code=True)
"
But results were horrible even with simple images, due to using a model of type "disk" to instantiate a model of type "lightglue" and some weights of LightGlueForKeypointMatching not being initiallized from the model checkpoint at stevenbucaille/disk. I also used the AutoModel loading withand without the trust_remote_code and the same KeyError: "disk" appeared:
'''
from transformers import AutoModel
model = AutoModel.from_pretrained("ETH-CVG/lightglue_disk", trust_remote_code=True)
'''
Any help will be more than welcomed, maybe I am doing something wrong or maybe this is an issue that needs to be opened.
Thanks in advance to everyone participating in this discussion :)
Hi
@jcorton
,
Please install transformers from the main branch as the commit allowing LightGlue with DISK is not included yet in a version.uv pip install git+https://github.com/huggingface/transformers.git
I'll update model card to mention that, thank you for your comment