@@ -46,9 +46,9 @@ def __init__(self, config: CLIPConfig):
4646
4747 self .concept_embeds_weights = nn .Parameter (torch .ones (17 ), requires_grad = False )
4848 self .special_care_embeds_weights = nn .Parameter (torch .ones (3 ), requires_grad = False )
49-
49+
5050 self .adjustment = 0.0
51-
51+
5252 def update_safety_checker_Level (self , Level ):
5353 """
5454 Adjust the safety checker level.
@@ -71,7 +71,7 @@ def update_safety_checker_Level(self, Level):
7171 Level = Level_dict [Level ]
7272
7373 # Check if the Level is a float or an integer
74- if isinstance (Level , (float , int )):
74+ if isinstance (Level , (float , int )):
7575 setattr (self , "adjustment" , Level ) # Set the adjustment attribute to the Level value
7676 else :
7777 # Raise an error if Level is not a valid type or predefined string
@@ -86,7 +86,7 @@ def update_safety_checker_Level(self, Level):
8686 " strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling"
8787 " it only for use-cases that involve analyzing network behavior or auditing its results. For more"
8888 " When reducing the filtering strength, take the same action as when disabling the safety checker."
89- " information, please have a look at https://github.com/huggingface/diffusers/pull/254 ."
89+ " information, please have a look at https://github.com/huggingface/diffusers/pull/254 ."
9090 )
9191
9292 @torch .no_grad ()
0 commit comments