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
chenpangpang
ComfyUI
Commits
b4e915e7
Commit
b4e915e7
authored
Jan 10, 2024
by
comfyanonymous
Browse files
Skip SAG when latent is too small.
parent
1a57423d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
comfy_extras/nodes_sag.py
comfy_extras/nodes_sag.py
+2
-0
No files found.
comfy_extras/nodes_sag.py
View file @
b4e915e7
...
...
@@ -143,6 +143,8 @@ class SelfAttentionGuidance:
sigma
=
args
[
"sigma"
]
model_options
=
args
[
"model_options"
]
x
=
args
[
"input"
]
if
min
(
cfg_result
.
shape
[
2
:])
<=
4
:
#skip when too small to add padding
return
cfg_result
# create the adversarially blurred image
degraded
=
create_blur_map
(
uncond_pred
,
uncond_attn
,
sag_sigma
,
sag_threshold
)
...
...
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