Skip to content

Commit e7b69cb

Browse files
[Safety Checker] Lower adjustment value
1 parent 3cde814 commit e7b69cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffusers/pipelines/stable_diffusion/safety_checker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def forward(self, clip_input, images):
4343
batch_size = image_embeds.shape[0]
4444
for i in range(batch_size):
4545
result_img = {"special_scores": {}, "special_care": [], "concept_scores": {}, "bad_concepts": []}
46-
adjustment = 0.05
46+
47+
# increase this value to create a stronger `nfsw` filter
48+
# at the cost of increasing the possibility of filtering benign images
49+
adjustment = 0.0
4750

4851
for concet_idx in range(len(special_cos_dist[0])):
4952
concept_cos = special_cos_dist[i][concet_idx]

0 commit comments

Comments
 (0)