WalBouss / LeGrad

MIT License
55 stars 5 forks source link

Error with siglip. #3

Open asPagurus opened 2 months ago

asPagurus commented 2 months ago

In your paper you said that you use ViT-B-16 siglip model with webli weights. I try to use ViT-B-16-SigLIP webli but get this error^ AttributeError: 'TimmModel' object has no attribute 'transformer'

I am trying several siglip models but each time get this error.

What I have to do to launch Legrad on siglip models?

M-Salti commented 1 month ago

I was just facing the same error. Turns out you should use compute_legrad_siglip instead of compute_legrad_clip. Or you can use compute_legrad which will route to the appropriate method automatically depending on the model type (clip, siglip, coca). I think the example in the README should use compute_legrad anyway to avoid this error.