This commit is contained in:
henryruhs
2025-06-16 11:44:22 +02:00
parent 0feecfd9d7
commit 56d714368a
2 changed files with 7 additions and 6 deletions

View File

@@ -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_thread_count')
state_manager.sync_item('execution_queue_count') state_manager.sync_item('execution_queue_count')
yield from benchmarker.run() for benchmark in benchmarker.run():
yield [ list(benchmark_set.values()) for benchmark_set in benchmark ]

View File

@@ -3,7 +3,7 @@ from typing import Optional
import gradio import gradio
from facefusion import wording from facefusion import wording
from facefusion.benchmarker import BENCHMARKS import facefusion.choices
from facefusion.uis.core import register_ui_component from facefusion.uis.core import register_ui_component
BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP : Optional[gradio.CheckboxGroup] = None BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP : Optional[gradio.CheckboxGroup] = None
@@ -16,15 +16,15 @@ def render() -> None:
BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP = gradio.CheckboxGroup( BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP = gradio.CheckboxGroup(
label = wording.get('uis.benchmark_resolutions_checkbox_group'), label = wording.get('uis.benchmark_resolutions_checkbox_group'),
choices = list(BENCHMARKS.keys()), choices = facefusion.choices.benchmark_resolutions,
value = list(BENCHMARKS.keys()) value = facefusion.choices.benchmark_resolutions
) )
BENCHMARK_CYCLES_SLIDER = gradio.Slider( BENCHMARK_CYCLES_SLIDER = gradio.Slider(
label = wording.get('uis.benchmark_cycles_slider'), label = wording.get('uis.benchmark_cycles_slider'),
value = 5, value = 5,
step = 1, step = 1,
minimum = 1, minimum = min(facefusion.choices.benchmark_cycles_range),
maximum = 10 maximum = max(facefusion.choices.benchmark_cycles_range)
) )
register_ui_component('benchmark_resolutions_checkbox_group', BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP) register_ui_component('benchmark_resolutions_checkbox_group', BENCHMARK_RESOLUTIONS_CHECKBOX_GROUP)
register_ui_component('benchmark_cycles_slider', BENCHMARK_CYCLES_SLIDER) register_ui_component('benchmark_cycles_slider', BENCHMARK_CYCLES_SLIDER)