To solve TypeError: getattr(): attribute name must be string error you need to upgrade diffusers will resolve this error.