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
e7b69cbe
Commit
e7b69cbe
authored
Aug 21, 2022
by
Patrick von Platen
Browse files
[Safety Checker] Lower adjustment value
parent
3cde8140
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/pipelines/stable_diffusion/safety_checker.py
src/diffusers/pipelines/stable_diffusion/safety_checker.py
+4
-1
No files found.
src/diffusers/pipelines/stable_diffusion/safety_checker.py
View file @
e7b69cbe
...
...
@@ -43,7 +43,10 @@ class StableDiffusionSafetyChecker(PreTrainedModel):
batch_size
=
image_embeds
.
shape
[
0
]
for
i
in
range
(
batch_size
):
result_img
=
{
"special_scores"
:
{},
"special_care"
:
[],
"concept_scores"
:
{},
"bad_concepts"
:
[]}
adjustment
=
0.05
# increase this value to create a stronger `nfsw` filter
# at the cost of increasing the possibility of filtering benign images
adjustment
=
0.0
for
concet_idx
in
range
(
len
(
special_cos_dist
[
0
])):
concept_cos
=
special_cos_dist
[
i
][
concet_idx
]
...
...
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