Why warning "A parameter name that contains gamma
will be renamed internally to weight
."
#8
Labels
help wanted
Extra attention is needed
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
The text was updated successfully, but these errors were encountered: