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
4ee9aad6
"...lm-evaluation-harness.git" did not exist on "bb433af7379f5a792d9057ccf7c86a5b68a8a69b"
Commit
4ee9aad6
authored
Apr 21, 2024
by
comfyanonymous
Browse files
Speed up Sharpen node.
parent
644a3ae5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
comfy_extras/nodes_post_processing.py
comfy_extras/nodes_post_processing.py
+2
-1
No files found.
comfy_extras/nodes_post_processing.py
View file @
4ee9aad6
...
...
@@ -227,6 +227,7 @@ class Sharpen:
return
(
image
,)
batch_size
,
height
,
width
,
channels
=
image
.
shape
image
=
image
.
to
(
comfy
.
model_management
.
get_torch_device
())
kernel_size
=
sharpen_radius
*
2
+
1
kernel
=
gaussian_kernel
(
kernel_size
,
sigma
,
device
=
image
.
device
)
*
-
(
alpha
*
10
)
...
...
@@ -241,7 +242,7 @@ class Sharpen:
result
=
torch
.
clamp
(
sharpened
,
0
,
1
)
return
(
result
,)
return
(
result
.
to
(
comfy
.
model_management
.
intermediate_device
())
,)
class
ImageScaleToTotalPixels
:
upscale_methods
=
[
"nearest-exact"
,
"bilinear"
,
"area"
,
"bicubic"
,
"lanczos"
]
...
...
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