From 45fbac02203ecb02deebf8e4ebeffbc43a998de7 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sun, 15 Jun 2025 20:23:52 +0200 Subject: [PATCH] Vibe coded benchmark command part3 --- facefusion/types.py | 10 ++++++++++ facefusion/uis/components/benchmark.py | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/facefusion/types.py b/facefusion/types.py index 15978ce..4afc91d 100755 --- a/facefusion/types.py +++ b/facefusion/types.py @@ -100,6 +100,16 @@ LogLevelSet : TypeAlias = Dict[LogLevel, int] TableHeaders = List[str] TableContents = List[List[Any]] +BenchmarkSet = TypedDict('BenchmarkSet', +{ + 'target_path' : str, + 'benchmark_cycles' : int, + 'average_run' : float, + 'fastest_run' : float, + 'slowest_run' : float, + 'relative_fps' : float +}) + FaceDetectorModel = Literal['many', 'retinaface', 'scrfd', 'yolo_face'] FaceLandmarkerModel = Literal['many', '2dfan4', 'peppa_wutz'] FaceDetectorSet : TypeAlias = Dict[FaceDetectorModel, List[str]] diff --git a/facefusion/uis/components/benchmark.py b/facefusion/uis/components/benchmark.py index 55e1577..5f53b7a 100644 --- a/facefusion/uis/components/benchmark.py +++ b/facefusion/uis/components/benchmark.py @@ -56,4 +56,5 @@ def start(benchmark_resolutions : List[str], benchmark_cycles : int) -> Generato state_manager.sync_item('execution_thread_count') state_manager.sync_item('execution_queue_count') - yield from benchmarker.run() + for benchmarks in benchmarker.run_with_progress(): + yield [ list(benchmark.values()) for benchmark in benchmarks ]