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
1900e511
"vscode:/vscode.git/clone" did not exist on "a38dd795120e1884e3396d41bf44e44fd9b1eba0"
Commit
1900e511
authored
May 20, 2024
by
comfyanonymous
Browse files
Fix potential issue.
parent
276f8fce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
comfy/ldm/modules/attention.py
comfy/ldm/modules/attention.py
+2
-2
No files found.
comfy/ldm/modules/attention.py
View file @
1900e511
...
...
@@ -625,7 +625,7 @@ class SpatialTransformer(nn.Module):
x
=
self
.
norm
(
x
)
if
not
self
.
use_linear
:
x
=
self
.
proj_in
(
x
)
x
=
x
.
movedim
(
1
,
-
1
).
flatten
(
1
,
2
).
contiguous
()
x
=
x
.
movedim
(
1
,
3
).
flatten
(
1
,
2
).
contiguous
()
if
self
.
use_linear
:
x
=
self
.
proj_in
(
x
)
for
i
,
block
in
enumerate
(
self
.
transformer_blocks
):
...
...
@@ -633,7 +633,7 @@ class SpatialTransformer(nn.Module):
x
=
block
(
x
,
context
=
context
[
i
],
transformer_options
=
transformer_options
)
if
self
.
use_linear
:
x
=
self
.
proj_out
(
x
)
x
=
x
.
reshape
(
x
.
shape
[
0
],
h
,
w
,
x
.
shape
[
-
1
]).
movedim
(
-
1
,
1
).
contiguous
()
x
=
x
.
reshape
(
x
.
shape
[
0
],
h
,
w
,
x
.
shape
[
-
1
]).
movedim
(
3
,
1
).
contiguous
()
if
not
self
.
use_linear
:
x
=
self
.
proj_out
(
x
)
return
x
+
x_in
...
...
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