EVF-SAM icon indicating copy to clipboard operation
EVF-SAM copied to clipboard

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

Open CoderZhangYx opened this issue 6 months ago • 1 comments

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

CoderZhangYx avatar Aug 05 '24 05:08 CoderZhangYx