Closed bendeguzvaradi closed 10 months ago
Thank you . It is odd It never threw a bug for me, but you are right. Out of curiosity, what version of diffusers do you have installed?
I was using 0.20.2, but I have also tried it with the newest 0.21.1 version and would throw the same error.
Hi I am not sure what your branching conventions are, but the current version on main gives me an error, Here is my fix.
Fix AttributeError by Changing
safety_checker
toNone
Description
I encountered an AttributeError while using the code from the main branch. The error message indicated that the issue was related to the
safety_checker
parameter being set toFalse
. It appears that the code expects this parameter to beNone
rather than a boolean value.Change
safety_checker=False
tosafety_checker=None
intoolkit/stable_diffusion_model.py
line 215Here, if safety_checker is
False
, it gives me the error:'bool' object has no attribute '__module__'. Did you mean: '__mod__'?
insite-packages/diffusers/pipelines/pipeline_utils.py
line 513, since it checks for None value instead of bool in line 504.Fixes # (issue)
Change
safety_checker=False
tosafety_checker=None
and it works for me.