mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
maximum_batch_area for xformers.
Remove useless code.
This commit is contained in:
parent
7a9268185c
commit
678f933d38
@ -312,6 +312,11 @@ def maximum_batch_area():
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
memory_free = get_free_memory() / (1024 * 1024)
|
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)
|
area = ((memory_free - 1024) * 0.9) / (0.6)
|
||||||
return int(max(area, 0))
|
return int(max(area, 0))
|
||||||
|
|
||||||
|
4
nodes.py
4
nodes.py
@ -105,15 +105,13 @@ class ConditioningSetArea:
|
|||||||
|
|
||||||
CATEGORY = "conditioning"
|
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 = []
|
c = []
|
||||||
for t in conditioning:
|
for t in conditioning:
|
||||||
n = [t[0], t[1].copy()]
|
n = [t[0], t[1].copy()]
|
||||||
n[1]['area'] = (height // 8, width // 8, y // 8, x // 8)
|
n[1]['area'] = (height // 8, width // 8, y // 8, x // 8)
|
||||||
n[1]['strength'] = strength
|
n[1]['strength'] = strength
|
||||||
n[1]['set_area_to_bounds'] = False
|
n[1]['set_area_to_bounds'] = False
|
||||||
n[1]['min_sigma'] = min_sigma
|
|
||||||
n[1]['max_sigma'] = max_sigma
|
|
||||||
c.append(n)
|
c.append(n)
|
||||||
return (c, )
|
return (c, )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user