Fix UI
This commit is contained in:
@@ -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 ]
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user