diff --git a/facefusion/uis/core.py b/facefusion/uis/core.py index e3b338f4..60f7b236 100644 --- a/facefusion/uis/core.py +++ b/facefusion/uis/core.py @@ -25,7 +25,6 @@ UI_LAYOUT_MODULES : List[ModuleType] = [] UI_LAYOUT_METHODS =\ [ 'pre_check', - 'pre_render', 'render', 'listen', 'run' @@ -83,14 +82,14 @@ def launch() -> None: with gradio.Blocks(theme = get_theme(), css = get_css(), title = metadata.get('name') + ' ' + metadata.get('version'), fill_width = True) as ui: for ui_layout in state_manager.get_item('ui_layouts'): ui_layout_module = load_ui_layout_module(ui_layout) - if ui_layout_module.pre_render(): - if ui_layouts_total > 1: - with gradio.Tab(ui_layout): - ui_layout_module.render() - ui_layout_module.listen() - else: + + if ui_layouts_total > 1: + with gradio.Tab(ui_layout): ui_layout_module.render() ui_layout_module.listen() + else: + ui_layout_module.render() + ui_layout_module.listen() for ui_layout in state_manager.get_item('ui_layouts'): ui_layout_module = load_ui_layout_module(ui_layout) diff --git a/facefusion/uis/layouts/benchmark.py b/facefusion/uis/layouts/benchmark.py index 7f501b81..72f75fb6 100644 --- a/facefusion/uis/layouts/benchmark.py +++ b/facefusion/uis/layouts/benchmark.py @@ -23,10 +23,6 @@ def pre_check() -> bool: return False -def pre_render() -> bool: - return True - - def render() -> gradio.Blocks: with gradio.Blocks() as layout: with gradio.Row(): diff --git a/facefusion/uis/layouts/default.py b/facefusion/uis/layouts/default.py index c5cf2d61..b57a9b8d 100755 --- a/facefusion/uis/layouts/default.py +++ b/facefusion/uis/layouts/default.py @@ -8,10 +8,6 @@ def pre_check() -> bool: return True -def pre_render() -> bool: - return True - - def render() -> gradio.Blocks: with gradio.Blocks() as layout: with gradio.Row(): diff --git a/facefusion/uis/layouts/jobs.py b/facefusion/uis/layouts/jobs.py index 740e31e8..ce38cc8f 100755 --- a/facefusion/uis/layouts/jobs.py +++ b/facefusion/uis/layouts/jobs.py @@ -8,10 +8,6 @@ def pre_check() -> bool: return True -def pre_render() -> bool: - return True - - def render() -> gradio.Blocks: with gradio.Blocks() as layout: with gradio.Row(): diff --git a/facefusion/uis/layouts/webcam.py b/facefusion/uis/layouts/webcam.py index 26f7f10f..2351d081 100644 --- a/facefusion/uis/layouts/webcam.py +++ b/facefusion/uis/layouts/webcam.py @@ -8,10 +8,6 @@ def pre_check() -> bool: return True -def pre_render() -> bool: - return True - - def render() -> gradio.Blocks: with gradio.Blocks() as layout: with gradio.Row():