Turns out mac has a different memory unit
This commit is contained in:
parent
583aee95cb
commit
27a76eea60
@ -95,7 +95,9 @@ def limit_resources() -> None:
|
|||||||
for gpu in gpus:
|
for gpu in gpus:
|
||||||
tensorflow.config.experimental.set_memory_growth(gpu, True)
|
tensorflow.config.experimental.set_memory_growth(gpu, True)
|
||||||
if roop.globals.max_memory:
|
if roop.globals.max_memory:
|
||||||
memory = roop.globals.max_memory * 1024 * 1024 * 1024
|
memory = roop.globals.max_memory * 1024 ** 3
|
||||||
|
if platform.system().lower() == 'darwin':
|
||||||
|
memory = roop.globals.max_memory * 1024 ** 6
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
import ctypes
|
import ctypes
|
||||||
kernel32 = ctypes.windll.kernel32
|
kernel32 = ctypes.windll.kernel32
|
||||||
|
Loading…
Reference in New Issue
Block a user