Deep-Live-Cam
Deep-Live-Cam copied to clipboard
DirectML: More than 1 execution thread crashes video processing
Using "python run.py --execution-provider dml --execution-threads 1" works for DirectML video processing.
Going any higher on execution-threads than 1 crashes on this line:
[DLC.FACE-SWAPPER] Progressing...
Processing: 0%| | 0/38 [00:00<?, ?frame/s, execution_providers=['DmlExecutionProvider'], execution_threads=2, max_mem
I also tried installing different onnxruntime-directml versions.
Using
"python run.py --execution-provider dml --execution-threads 1"works for DirectML video processing.Going any higher on execution-threads than 1 crashes on this line:
[DLC.FACE-SWAPPER] Progressing... Processing: 0%| | 0/38 [00:00<?, ?frame/s, execution_providers=['DmlExecutionProvider'], execution_threads=2, max_memYes, I have more than 1 thread available, don't ask. I also tried installing different onnxruntime-directml versions.
Probably out of vram, as threads count determine how many instances can run parallel. Eg: 3thread mean 3x vram usage. What gpu are you using?? Using --max-memory (vram of your gpu) flag may help.
@skrohit22087 AMD RX 5600 XT (6 GB of VRAM)
--execution-threads 1 --max-memory 6 works the same
--execution-threads 2 --max-memory 6 crashes.
Same here with AMD RX 7900 XT:
It crashes as soon as I set execution-threads higher than 1 (with dml). Tried lots of combinations with max-memory, but couldn't get it to work.
@nicolasxbx @MysteryInAustralia "The DirectML execution provider does not support the use of memory pattern optimizations or parallel execution in onnxruntime." according to https://github.com/microsoft/onnxruntime-openenclave/blob/openenclave-public/docs/execution_providers/DirectML-ExecutionProvider.md