ValueError: current limit exceeds maximum limit #1886
Replies: 1 comment
|
This is a known macOS-specific failure in The current code applies this to every non-Windows system: resource.setrlimit(resource.RLIMIT_DATA, (memory, memory))Some macOS/Python combinations reject that The minimal local fix is to apply if platform.system().lower() == "windows":
import ctypes
kernel32 = ctypes.windll.kernel32
kernel32.SetProcessWorkingSetSize(
-1, ctypes.c_size_t(memory), ctypes.c_size_t(memory)
)
elif platform.system().lower() == "linux":
import resource
resource.setrlimit(resource.RLIMIT_DATA, (memory, memory))In other words, skip that call on Darwin/macOS. This is also the approach in #1849.
Related links: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Does anyone experienced and fixed below value error:
Deep-Live-Cam/run.py", line 99, in
core.run()
File "/x/Deep-Live-Cam/modules/core.py", line 347, in run
limit_resources()
File "/xDeep-Live-Cam/modules/core.py", line 188, in limit_resources
resource.setrlimit(resource.RLIMIT_DATA, (memory, memory))
ValueError: current limit exceeds maximum limit
I'm using MacBook Air M2 8gb ram
I tried running this code but Terminal and Python crashes: python run.py --execution-provider coreml --max-memory 0
All reactions