Skip to content

Industry leading face manipulation platform

Remove useless global

henryruhs106c1f20b363
diff --git a/facefusion/inference_manager.py b/facefusion/inference_manager.py
index 8c24f7ef..f93d7e85 100644
--- a/facefusion/inference_manager.py
+++ b/facefusion/inference_manager.py
@@ -18,8 +18,6 @@ INFERENCE_POOL_SET : InferencePoolSet =\
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():
sleep(0.5)
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:
- global INFERENCE_POOL_SET
-
execution_device_id = state_manager.get_item('execution_device_id')
execution_providers = resolve_execution_providers(module_name)
app_context = detect_app_context()
diff --git a/facefusion/uis/components/benchmark.py b/facefusion/uis/components/benchmark.py
index a9b409ad..1fa50a75 100644
--- a/facefusion/uis/components/benchmark.py
+++ b/facefusion/uis/components/benchmark.py
@@ -16,7 +16,6 @@ from facefusion.vision import count_video_frame_total, detect_video_fps, detect_
BENCHMARK_BENCHMARKS_DATAFRAME : Optional[gradio.Dataframe] = None
BENCHMARK_START_BUTTON : Optional[gradio.Button] = None
-BENCHMARK_CLEAR_BUTTON : Optional[gradio.Button] = None
BENCHMARKS : Dict[str, str] =\
{
'240p': '.assets/examples/target-240p.mp4',
@@ -32,7 +31,6 @@ BENCHMARKS : Dict[str, str] =\
def render() -> None:
global BENCHMARK_BENCHMARKS_DATAFRAME
global BENCHMARK_START_BUTTON
- global BENCHMARK_CLEAR_BUTTON
BENCHMARK_BENCHMARKS_DATAFRAME = gradio.Dataframe(
headers =
diff --git a/facefusion/uis/components/terminal.py b/facefusion/uis/components/terminal.py
index d476446e..8ba8ff85 100644
--- a/facefusion/uis/components/terminal.py
+++ b/facefusion/uis/components/terminal.py
@@ -38,8 +38,6 @@ def render() -> None:
def listen() -> None:
- global LOG_LEVEL_DROPDOWN
-
LOG_LEVEL_DROPDOWN.change(update_log_level, inputs = LOG_LEVEL_DROPDOWN)
logger.get_package_logger().addHandler(LOG_HANDLER)
tqdm.update = tqdm_update
diff --git a/facefusion/uis/core.py b/facefusion/uis/core.py
index c01b6bab..22c37b91 100644
--- a/facefusion/uis/core.py
+++ b/facefusion/uis/core.py
@@ -41,8 +41,6 @@ def load_ui_layout_module(ui_layout : str) -> Any:
def get_ui_layouts_modules(ui_layouts : List[str]) -> List[ModuleType]:
- global UI_LAYOUT_MODULES
-
if not UI_LAYOUT_MODULES:
for ui_layout in ui_layouts:
ui_layout_module = load_ui_layout_module(ui_layout)