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
7990ae18
Unverified
Commit
7990ae18
authored
Apr 26, 2024
by
Jedrzej Kosinski
Committed by
GitHub
Apr 26, 2024
Browse files
Fix error when more cond masks passed in than batch size (#3353)
parent
16eabdf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/samplers.py
comfy/samplers.py
+1
-1
No files found.
comfy/samplers.py
View file @
7990ae18
...
...
@@ -34,7 +34,7 @@ def get_area_and_mult(conds, x_in, timestep_in):
mask
=
conds
[
'mask'
]
assert
(
mask
.
shape
[
1
]
==
x_in
.
shape
[
2
])
assert
(
mask
.
shape
[
2
]
==
x_in
.
shape
[
3
])
mask
=
mask
[:,
area
[
2
]:
area
[
0
]
+
area
[
2
],
area
[
3
]:
area
[
1
]
+
area
[
3
]]
*
mask_strength
mask
=
mask
[:
input_x
.
shape
[
0
]
,
area
[
2
]:
area
[
0
]
+
area
[
2
],
area
[
3
]:
area
[
1
]
+
area
[
3
]]
*
mask_strength
mask
=
mask
.
unsqueeze
(
1
).
repeat
(
input_x
.
shape
[
0
]
//
mask
.
shape
[
0
],
input_x
.
shape
[
1
],
1
,
1
)
else
:
mask
=
torch
.
ones_like
(
input_x
)
...
...
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