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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user