feat: allow users to specify the number of threads when running on CPU (#1601)

* CPU_NUM_THREADS

* refactor: optimize code, type is already strict

---------

Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
This commit is contained in:
Maxim Saplin
2024-02-25 17:14:17 +01:00
committed by GitHub
co-authored by Manuel Schmid
parent ef1999c52c
commit 4d34f31a72
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ vram_group.add_argument("--always-high-vram", action="store_true")
vram_group.add_argument("--always-normal-vram", action="store_true")
vram_group.add_argument("--always-low-vram", action="store_true")
vram_group.add_argument("--always-no-vram", action="store_true")
vram_group.add_argument("--always-cpu", action="store_true")
vram_group.add_argument("--always-cpu", type=int, nargs="?", metavar="CPU_NUM_THREADS", const=-1)
parser.add_argument("--always-offload-from-vram", action="store_true")