"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "3f329a426a09d0bf3f96095301042a5903bc78eb"
Commit e7b69cbe authored by Patrick von Platen's avatar Patrick von Platen
Browse files

[Safety Checker] Lower adjustment value

parent 3cde8140
...@@ -43,7 +43,10 @@ class StableDiffusionSafetyChecker(PreTrainedModel): ...@@ -43,7 +43,10 @@ class StableDiffusionSafetyChecker(PreTrainedModel):
batch_size = image_embeds.shape[0] batch_size = image_embeds.shape[0]
for i in range(batch_size): for i in range(batch_size):
result_img = {"special_scores": {}, "special_care": [], "concept_scores": {}, "bad_concepts": []} result_img = {"special_scores": {}, "special_care": [], "concept_scores": {}, "bad_concepts": []}
adjustment = 0.05
# increase this value to create a stronger `nfsw` filter
# at the cost of increasing the possibility of filtering benign images
adjustment = 0.0
for concet_idx in range(len(special_cos_dist[0])): for concet_idx in range(len(special_cos_dist[0])):
concept_cos = special_cos_dist[i][concet_idx] concept_cos = special_cos_dist[i][concet_idx]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment