From 411818d0f94f2a8b1fe791052f60efab187527b8 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 30 May 2023 22:44:48 +0200 Subject: [PATCH] Need to return at least 2 cores for default --- run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.py b/run.py index 65749b4..19a10be 100644 --- a/run.py +++ b/run.py @@ -34,7 +34,7 @@ parser.add_argument('--gpu', help='use gpu', dest='gpu', action='store_true', de parser.add_argument('--keep-fps', help='maintain original fps', dest='keep_fps', action='store_true', default=False) parser.add_argument('--keep-frames', help='keep frames directory', dest='keep_frames', action='store_true', default=False) parser.add_argument('--max-memory', help='set max memory', default=16, type=int) -parser.add_argument('--max-cores', help='number of cores to use', dest='cores_count', type=int, default=psutil.cpu_count() - 2) +parser.add_argument('--max-cores', help='number of cores to use', dest='cores_count', type=int, default=max(psutil.cpu_count() - 2, 2)) for name, value in vars(parser.parse_args()).items(): args[name] = value