hustvl / EVF-SAM

Official code of "EVF-SAM: Early Vision-Language Fusion for Text-Prompted Segment Anything Model"
Apache License 2.0
312 stars 13 forks source link

Why warning "A parameter name that contains `gamma` will be renamed internally to `weight`." #8

Open CoderZhangYx opened 3 months ago

CoderZhangYx commented 3 months ago

As mentioned in SAM-2 Issue 85, there are modules named "gamma" in SAM-2's memory encoder, which is conflict with transformers. (transformers forbid module names "gamma" or "beta") To solve this problem, we manually rename "gamma" in SAM-2 modelscript to "weight". The checkpoint can be load properly because transformers api will rename "gamma" in state dict to "weight".

We believe it is rude to modify module name of others' models. Please tell us if you have any other better ways to solve this problem

AmirulOm commented 3 months ago

Having a same problems, following this threads for updates.

My environment :