From 27a76eea60ccc4bfba4e6b8a2e11d40cc9710b99 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Fri, 9 Jun 2023 11:41:42 +0200 Subject: [PATCH] Turns out mac has a different memory unit --- roop/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roop/core.py b/roop/core.py index 8aaab4a..dbea8db 100755 --- a/roop/core.py +++ b/roop/core.py @@ -95,7 +95,9 @@ def limit_resources() -> None: for gpu in gpus: tensorflow.config.experimental.set_memory_growth(gpu, True) 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': import ctypes kernel32 = ctypes.windll.kernel32