Skip to content

Industry leading face manipulation platform

Vibe coded benchmark command part3

henryruhs45fbac02203e
diff --git a/facefusion/types.py b/facefusion/types.py
index 15978ce4..4afc91d7 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 55e1577d..5f53b7a1 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 ]