Unverified Commit 89e95210 authored by Suraj Patil's avatar Suraj Patil Committed by GitHub
Browse files

fix safety check (#217)

parent 65ea7d6b
......@@ -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:
......
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