Fix CUDA VRAM exhaustion during video processing (#1721)

This commit is contained in:
yetval
2026-04-02 22:58:47 -04:00
parent 1edc4bc298
commit 11fb5bfbc6
2 changed files with 9 additions and 2 deletions
+1 -2
View File
@@ -143,8 +143,7 @@ def suggest_execution_threads() -> int:
if 'ROCMExecutionProvider' in modules.globals.execution_providers:
return 1
if 'CUDAExecutionProvider' in modules.globals.execution_providers:
# For CUDA, use more threads for parallel frame processing
return min(cpu_count, 16)
return 2
# For CPU execution, use most cores but leave some for system
return max(4, min(cpu_count - 2, 16))