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
bed116a1
"...composable_kernel_onnx.git" did not exist on "39d92e7dfdb2893a0e7d0521523c442ec403712c"
Commit
bed116a1
authored
Aug 29, 2023
by
comfyanonymous
Browse files
Remove optimization that caused border.
parent
8ddd081b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
comfy/ldm/modules/diffusionmodules/model.py
comfy/ldm/modules/diffusionmodules/model.py
+4
-9
No files found.
comfy/ldm/modules/diffusionmodules/model.py
View file @
bed116a1
...
...
@@ -85,11 +85,10 @@ class Downsample(nn.Module):
stride
=
2
,
padding
=
0
)
def
forward
(
self
,
x
,
already_padded
=
False
):
def
forward
(
self
,
x
):
if
self
.
with_conv
:
if
not
already_padded
:
pad
=
(
0
,
1
,
0
,
1
)
x
=
torch
.
nn
.
functional
.
pad
(
x
,
pad
,
mode
=
"constant"
,
value
=
0
)
pad
=
(
0
,
1
,
0
,
1
)
x
=
torch
.
nn
.
functional
.
pad
(
x
,
pad
,
mode
=
"constant"
,
value
=
0
)
x
=
self
.
conv
(
x
)
else
:
x
=
torch
.
nn
.
functional
.
avg_pool2d
(
x
,
kernel_size
=
2
,
stride
=
2
)
...
...
@@ -606,9 +605,6 @@ class Encoder(nn.Module):
def
forward
(
self
,
x
):
# timestep embedding
temb
=
None
pad
=
(
0
,
1
,
0
,
1
)
x
=
torch
.
nn
.
functional
.
pad
(
x
,
pad
,
mode
=
"constant"
,
value
=
0
)
already_padded
=
True
# downsampling
h
=
self
.
conv_in
(
x
)
for
i_level
in
range
(
self
.
num_resolutions
):
...
...
@@ -617,8 +613,7 @@ class Encoder(nn.Module):
if
len
(
self
.
down
[
i_level
].
attn
)
>
0
:
h
=
self
.
down
[
i_level
].
attn
[
i_block
](
h
)
if
i_level
!=
self
.
num_resolutions
-
1
:
h
=
self
.
down
[
i_level
].
downsample
(
h
,
already_padded
)
already_padded
=
False
h
=
self
.
down
[
i_level
].
downsample
(
h
)
# middle
h
=
self
.
mid
.
block_1
(
h
,
temb
)
...
...
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