Questions
Q:

TypeError: getattr(): attribute name must be string

How to fix TypeError: getattr(): attribute name must be string error.

1 Answers

Accepted

The error message is telling you that the attribute name must be string. try to upgrade diffusers and transformers package,

pip install diffusers
pip install transformers

or

pip install --upgrade diffusers transformers scipy

Still not work then, try to downgrade transformer package to 4.24.0,

pip uninstall transformers  //uninstall transformers package
pip install transformers==4.24.0  //install transformers package 4.24.0