Skip to content

Commit 89e9521

Browse files
authored
fix safety check (huggingface#217)
1 parent 65ea7d6 commit 89e9521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/stable_diffusion/safety_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def forward(self, clip_input, images):
6262

6363
result.append(result_img)
6464

65-
has_nsfw_concepts = [len(result[i]["bad_concepts"]) > 0 or i in range(len(result))]
65+
has_nsfw_concepts = [len(res["bad_concepts"]) > 0 for res in result]
6666

6767
for idx, has_nsfw_concept in enumerate(has_nsfw_concepts):
6868
if has_nsfw_concept:

0 commit comments

Comments
 (0)