Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
89e95210
Unverified
Commit
89e95210
authored
Aug 19, 2022
by
Suraj Patil
Committed by
GitHub
Aug 19, 2022
Browse files
fix safety check (#217)
parent
65ea7d6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/stable_diffusion/safety_checker.py
src/diffusers/pipelines/stable_diffusion/safety_checker.py
+1
-1
No files found.
src/diffusers/pipelines/stable_diffusion/safety_checker.py
View file @
89e95210
...
...
@@ -62,7 +62,7 @@ class StableDiffusionSafetyChecker(PreTrainedModel):
result
.
append
(
result_img
)
has_nsfw_concepts
=
[
len
(
res
ult
[
i
]
[
"bad_concepts"
])
>
0
or
i
in
range
(
len
(
result
))
]
has_nsfw_concepts
=
[
len
(
res
[
"bad_concepts"
])
>
0
f
or
res
in
result
]
for
idx
,
has_nsfw_concept
in
enumerate
(
has_nsfw_concepts
):
if
has_nsfw_concept
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment