mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-09-04 14:56:36 +02:00
Move hot-path imports to module scope
Address Sourcery review feedback: move face_align and get_one_face imports from inside per-frame functions to module-level to avoid repeated attribute lookup overhead in the processing loop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
bcdd0ce2dd
commit
646b0f816f
@@ -11,6 +11,7 @@ from tqdm import tqdm
|
||||
|
||||
import modules
|
||||
import modules.globals
|
||||
from modules.face_analyser import get_one_face
|
||||
|
||||
FRAME_PROCESSORS_MODULES: List[ModuleType] = []
|
||||
FRAME_PROCESSORS_INTERFACE = [
|
||||
@@ -321,8 +322,6 @@ def _run_pipe_pipeline(
|
||||
bar_fmt = ('{l_bar}{bar}| {n_fmt}/{total_fmt} '
|
||||
'[{elapsed}<{remaining}, {rate_fmt}{postfix}]')
|
||||
|
||||
from modules.face_analyser import get_one_face
|
||||
|
||||
try:
|
||||
with tqdm(total=total_frames, desc='Processing', unit='frame',
|
||||
dynamic_ncols=True, bar_format=bar_fmt) as progress:
|
||||
|
||||
Reference in New Issue
Block a user