1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

fix safety check (#217)

This commit is contained in:
Suraj Patil
2022-08-19 18:04:58 +05:30
committed by GitHub
parent 65ea7d6b62
commit 89e9521048

View File

@@ -62,7 +62,7 @@ class StableDiffusionSafetyChecker(PreTrainedModel):
result.append(result_img)
has_nsfw_concepts = [len(result[i]["bad_concepts"]) > 0 or i in range(len(result))]
has_nsfw_concepts = [len(res["bad_concepts"]) > 0 for res in result]
for idx, has_nsfw_concept in enumerate(has_nsfw_concepts):
if has_nsfw_concept: