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
71666f24
Commit
71666f24
authored
May 20, 2023
by
comfyanonymous
Browse files
Fix padding in Blur.
parent
36af98d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy_extras/nodes_post_processing.py
comfy_extras/nodes_post_processing.py
+1
-1
No files found.
comfy_extras/nodes_post_processing.py
View file @
71666f24
...
...
@@ -105,7 +105,7 @@ class Blur:
image
=
image
.
permute
(
0
,
3
,
1
,
2
)
# Torch wants (B, C, H, W) we use (B, H, W, C)
padded_image
=
F
.
pad
(
image
,
(
blur_radius
,
blur_radius
,
blur_radius
,
blur_radius
),
'reflect'
)
blurred
=
F
.
conv2d
(
image
,
kernel
,
padding
=
kernel_size
//
2
,
groups
=
channels
)[:,:,
blur_radius
:
-
blur_radius
,
blur_radius
:
-
blur_radius
]
blurred
=
F
.
conv2d
(
padded_
image
,
kernel
,
padding
=
kernel_size
//
2
,
groups
=
channels
)[:,:,
blur_radius
:
-
blur_radius
,
blur_radius
:
-
blur_radius
]
blurred
=
blurred
.
permute
(
0
,
2
,
3
,
1
)
return
(
blurred
,)
...
...
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