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
678f933d
Commit
678f933d
authored
May 06, 2023
by
comfyanonymous
Browse files
maximum_batch_area for xformers.
Remove useless code.
parent
7a926818
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
comfy/model_management.py
comfy/model_management.py
+6
-1
nodes.py
nodes.py
+1
-3
No files found.
comfy/model_management.py
View file @
678f933d
...
...
@@ -312,6 +312,11 @@ def maximum_batch_area():
return
0
memory_free
=
get_free_memory
()
/
(
1024
*
1024
)
if
xformers_enabled
():
#TODO: this needs to be tweaked
area
=
50
*
memory_free
else
:
#TODO: this formula is because AMD sucks and has memory management issues which might be fixed in the future
area
=
((
memory_free
-
1024
)
*
0.9
)
/
(
0.6
)
return
int
(
max
(
area
,
0
))
...
...
nodes.py
View file @
678f933d
...
...
@@ -105,15 +105,13 @@ class ConditioningSetArea:
CATEGORY
=
"conditioning"
def
append
(
self
,
conditioning
,
width
,
height
,
x
,
y
,
strength
,
min_sigma
=
0.0
,
max_sigma
=
99.0
):
def
append
(
self
,
conditioning
,
width
,
height
,
x
,
y
,
strength
):
c
=
[]
for
t
in
conditioning
:
n
=
[
t
[
0
],
t
[
1
].
copy
()]
n
[
1
][
'area'
]
=
(
height
//
8
,
width
//
8
,
y
//
8
,
x
//
8
)
n
[
1
][
'strength'
]
=
strength
n
[
1
][
'set_area_to_bounds'
]
=
False
n
[
1
][
'min_sigma'
]
=
min_sigma
n
[
1
][
'max_sigma'
]
=
max_sigma
c
.
append
(
n
)
return
(
c
,
)
...
...
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