feat: AMD DML optimization - GPU face detection, detection throttle, pre-load fix

This commit is contained in:
ozp3
2026-03-28 13:09:20 +03:00
parent 9e6f30c0a4
commit eac2ad2307
7 changed files with 52 additions and 17 deletions
+5 -2
View File
@@ -2,7 +2,7 @@ import os
import sys
# single thread doubles cuda performance - needs to be set before torch import
if any(arg.startswith('--execution-provider') for arg in sys.argv):
os.environ['OMP_NUM_THREADS'] = '1'
os.environ['OMP_NUM_THREADS'] = '6'
# reduce tensorflow log level
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import warnings
@@ -291,9 +291,12 @@ def run() -> None:
for frame_processor in get_frame_processors_modules(modules.globals.frame_processors):
if not frame_processor.pre_check():
return
# Pre-load face analyser in main thread before GUI starts
#from modules.face_analyser import get_face_analyser
#get_face_analyser()
limit_resources()
if modules.globals.headless:
start()
else:
window = ui.init(start, destroy, modules.globals.lang)
window.mainloop()
window.mainloop()