Skip to content

Commit ee2f922

Browse files
committed
fix
1 parent cd4ce6e commit ee2f922

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ def unfuse_qkv_projections(self, unet: bool = True, vae: bool = True):
19361936
else:
19371937
self.vae.unfuse_qkv_projections()
19381938
self.fusing_vae = False
1939-
1939+
19401940
def safety_checker_level(self, level):
19411941
"""
19421942
Adjust the safety checker level.

src/diffusers/pipelines/stable_diffusion/safety_checker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)