Remove useless global
This commit is contained in:
@@ -18,8 +18,6 @@ INFERENCE_POOL_SET : InferencePoolSet =\
|
|||||||
|
|
||||||
|
|
||||||
def get_inference_pool(module_name : str, model_names : List[str], model_source_set : DownloadSet) -> InferencePool:
|
def get_inference_pool(module_name : str, model_names : List[str], model_source_set : DownloadSet) -> InferencePool:
|
||||||
global INFERENCE_POOL_SET
|
|
||||||
|
|
||||||
while process_manager.is_checking():
|
while process_manager.is_checking():
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
execution_device_id = state_manager.get_item('execution_device_id')
|
execution_device_id = state_manager.get_item('execution_device_id')
|
||||||
@@ -49,8 +47,6 @@ def create_inference_pool(model_source_set : DownloadSet, execution_device_id :
|
|||||||
|
|
||||||
|
|
||||||
def clear_inference_pool(module_name : str, model_names : List[str]) -> None:
|
def clear_inference_pool(module_name : str, model_names : List[str]) -> None:
|
||||||
global INFERENCE_POOL_SET
|
|
||||||
|
|
||||||
execution_device_id = state_manager.get_item('execution_device_id')
|
execution_device_id = state_manager.get_item('execution_device_id')
|
||||||
execution_providers = resolve_execution_providers(module_name)
|
execution_providers = resolve_execution_providers(module_name)
|
||||||
app_context = detect_app_context()
|
app_context = detect_app_context()
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ from facefusion.vision import count_video_frame_total, detect_video_fps, detect_
|
|||||||
|
|
||||||
BENCHMARK_BENCHMARKS_DATAFRAME : Optional[gradio.Dataframe] = None
|
BENCHMARK_BENCHMARKS_DATAFRAME : Optional[gradio.Dataframe] = None
|
||||||
BENCHMARK_START_BUTTON : Optional[gradio.Button] = None
|
BENCHMARK_START_BUTTON : Optional[gradio.Button] = None
|
||||||
BENCHMARK_CLEAR_BUTTON : Optional[gradio.Button] = None
|
|
||||||
BENCHMARKS : Dict[str, str] =\
|
BENCHMARKS : Dict[str, str] =\
|
||||||
{
|
{
|
||||||
'240p': '.assets/examples/target-240p.mp4',
|
'240p': '.assets/examples/target-240p.mp4',
|
||||||
@@ -32,7 +31,6 @@ BENCHMARKS : Dict[str, str] =\
|
|||||||
def render() -> None:
|
def render() -> None:
|
||||||
global BENCHMARK_BENCHMARKS_DATAFRAME
|
global BENCHMARK_BENCHMARKS_DATAFRAME
|
||||||
global BENCHMARK_START_BUTTON
|
global BENCHMARK_START_BUTTON
|
||||||
global BENCHMARK_CLEAR_BUTTON
|
|
||||||
|
|
||||||
BENCHMARK_BENCHMARKS_DATAFRAME = gradio.Dataframe(
|
BENCHMARK_BENCHMARKS_DATAFRAME = gradio.Dataframe(
|
||||||
headers =
|
headers =
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ def render() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def listen() -> None:
|
def listen() -> None:
|
||||||
global LOG_LEVEL_DROPDOWN
|
|
||||||
|
|
||||||
LOG_LEVEL_DROPDOWN.change(update_log_level, inputs = LOG_LEVEL_DROPDOWN)
|
LOG_LEVEL_DROPDOWN.change(update_log_level, inputs = LOG_LEVEL_DROPDOWN)
|
||||||
logger.get_package_logger().addHandler(LOG_HANDLER)
|
logger.get_package_logger().addHandler(LOG_HANDLER)
|
||||||
tqdm.update = tqdm_update
|
tqdm.update = tqdm_update
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ def load_ui_layout_module(ui_layout : str) -> Any:
|
|||||||
|
|
||||||
|
|
||||||
def get_ui_layouts_modules(ui_layouts : List[str]) -> List[ModuleType]:
|
def get_ui_layouts_modules(ui_layouts : List[str]) -> List[ModuleType]:
|
||||||
global UI_LAYOUT_MODULES
|
|
||||||
|
|
||||||
if not UI_LAYOUT_MODULES:
|
if not UI_LAYOUT_MODULES:
|
||||||
for ui_layout in ui_layouts:
|
for ui_layout in ui_layouts:
|
||||||
ui_layout_module = load_ui_layout_module(ui_layout)
|
ui_layout_module = load_ui_layout_module(ui_layout)
|
||||||
|
|||||||
Reference in New Issue
Block a user