From 7009b2ed80d466a5bba7ec4f84da5bcff3327774 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Wed, 16 Aug 2023 17:43:26 +0200 Subject: [PATCH] Remove the underscores --- roop/core.py | 2 +- roop/processors/frame/core.py | 4 ++-- roop/processors/frame/{__modules__ => modules}/__init__.py | 0 .../frame/{__modules__ => modules}/face_enhancer.py | 0 .../processors/frame/{__modules__ => modules}/face_swapper.py | 0 .../frame/{__modules__ => modules}/frame_enhancer.py | 0 roop/uis/{__components__ => components}/__init__.py | 0 roop/uis/{__components__ => components}/execution.py | 0 roop/uis/{__components__ => components}/face_analyser.py | 0 roop/uis/{__components__ => components}/face_selector.py | 0 roop/uis/{__components__ => components}/output.py | 0 roop/uis/{__components__ => components}/output_settings.py | 0 roop/uis/{__components__ => components}/preview.py | 0 roop/uis/{__components__ => components}/processor.py | 0 roop/uis/{__components__ => components}/settings.py | 0 roop/uis/{__components__ => components}/source.py | 0 roop/uis/{__components__ => components}/target.py | 0 roop/uis/{__components__ => components}/temp_frame.py | 0 roop/uis/{__components__ => components}/trim_frame.py | 0 roop/uis/core.py | 2 +- roop/uis/{__layouts__ => layouts}/default.py | 2 +- 21 files changed, 5 insertions(+), 5 deletions(-) rename roop/processors/frame/{__modules__ => modules}/__init__.py (100%) rename roop/processors/frame/{__modules__ => modules}/face_enhancer.py (100%) rename roop/processors/frame/{__modules__ => modules}/face_swapper.py (100%) rename roop/processors/frame/{__modules__ => modules}/frame_enhancer.py (100%) rename roop/uis/{__components__ => components}/__init__.py (100%) rename roop/uis/{__components__ => components}/execution.py (100%) rename roop/uis/{__components__ => components}/face_analyser.py (100%) rename roop/uis/{__components__ => components}/face_selector.py (100%) rename roop/uis/{__components__ => components}/output.py (100%) rename roop/uis/{__components__ => components}/output_settings.py (100%) rename roop/uis/{__components__ => components}/preview.py (100%) rename roop/uis/{__components__ => components}/processor.py (100%) rename roop/uis/{__components__ => components}/settings.py (100%) rename roop/uis/{__components__ => components}/source.py (100%) rename roop/uis/{__components__ => components}/target.py (100%) rename roop/uis/{__components__ => components}/temp_frame.py (100%) rename roop/uis/{__components__ => components}/trim_frame.py (100%) rename roop/uis/{__layouts__ => layouts}/default.py (85%) diff --git a/roop/core.py b/roop/core.py index 1181d0cfa..672fada04 100755 --- a/roop/core.py +++ b/roop/core.py @@ -92,7 +92,7 @@ def suggest_execution_providers_choices() -> List[str]: def suggest_ui_layouts_choices() -> List[str]: - return list_module_names('roop/uis/__layouts__') + return list_module_names('roop/uis/layouts') def suggest_execution_thread_count_default() -> int: diff --git a/roop/processors/frame/core.py b/roop/processors/frame/core.py index 07a41725e..55a81f514 100644 --- a/roop/processors/frame/core.py +++ b/roop/processors/frame/core.py @@ -27,7 +27,7 @@ def load_frame_processor_module(frame_processor: str) -> Any: try: - frame_processor_module = importlib.import_module(f'roop.processors.frame.__modules__.{frame_processor}') + frame_processor_module = importlib.import_module(f'roop.processors.frame.modules.{frame_processor}') for method_name in FRAME_PROCESSORS_METHODS: if not hasattr(frame_processor_module, method_name): raise NotImplementedError @@ -57,7 +57,7 @@ def clear_frame_processors_modules() -> None: def list_frame_processors_names() -> Optional[List[str]]: - return list_module_names('roop/processors/frame/__modules__') + return list_module_names('roop/processors/frame/modules') def multi_process_frame(source_path: str, temp_frame_paths: List[str], process_frames: Callable[[str, List[str], Any], None], update: Callable[[], None]) -> None: diff --git a/roop/processors/frame/__modules__/__init__.py b/roop/processors/frame/modules/__init__.py similarity index 100% rename from roop/processors/frame/__modules__/__init__.py rename to roop/processors/frame/modules/__init__.py diff --git a/roop/processors/frame/__modules__/face_enhancer.py b/roop/processors/frame/modules/face_enhancer.py similarity index 100% rename from roop/processors/frame/__modules__/face_enhancer.py rename to roop/processors/frame/modules/face_enhancer.py diff --git a/roop/processors/frame/__modules__/face_swapper.py b/roop/processors/frame/modules/face_swapper.py similarity index 100% rename from roop/processors/frame/__modules__/face_swapper.py rename to roop/processors/frame/modules/face_swapper.py diff --git a/roop/processors/frame/__modules__/frame_enhancer.py b/roop/processors/frame/modules/frame_enhancer.py similarity index 100% rename from roop/processors/frame/__modules__/frame_enhancer.py rename to roop/processors/frame/modules/frame_enhancer.py diff --git a/roop/uis/__components__/__init__.py b/roop/uis/components/__init__.py similarity index 100% rename from roop/uis/__components__/__init__.py rename to roop/uis/components/__init__.py diff --git a/roop/uis/__components__/execution.py b/roop/uis/components/execution.py similarity index 100% rename from roop/uis/__components__/execution.py rename to roop/uis/components/execution.py diff --git a/roop/uis/__components__/face_analyser.py b/roop/uis/components/face_analyser.py similarity index 100% rename from roop/uis/__components__/face_analyser.py rename to roop/uis/components/face_analyser.py diff --git a/roop/uis/__components__/face_selector.py b/roop/uis/components/face_selector.py similarity index 100% rename from roop/uis/__components__/face_selector.py rename to roop/uis/components/face_selector.py diff --git a/roop/uis/__components__/output.py b/roop/uis/components/output.py similarity index 100% rename from roop/uis/__components__/output.py rename to roop/uis/components/output.py diff --git a/roop/uis/__components__/output_settings.py b/roop/uis/components/output_settings.py similarity index 100% rename from roop/uis/__components__/output_settings.py rename to roop/uis/components/output_settings.py diff --git a/roop/uis/__components__/preview.py b/roop/uis/components/preview.py similarity index 100% rename from roop/uis/__components__/preview.py rename to roop/uis/components/preview.py diff --git a/roop/uis/__components__/processor.py b/roop/uis/components/processor.py similarity index 100% rename from roop/uis/__components__/processor.py rename to roop/uis/components/processor.py diff --git a/roop/uis/__components__/settings.py b/roop/uis/components/settings.py similarity index 100% rename from roop/uis/__components__/settings.py rename to roop/uis/components/settings.py diff --git a/roop/uis/__components__/source.py b/roop/uis/components/source.py similarity index 100% rename from roop/uis/__components__/source.py rename to roop/uis/components/source.py diff --git a/roop/uis/__components__/target.py b/roop/uis/components/target.py similarity index 100% rename from roop/uis/__components__/target.py rename to roop/uis/components/target.py diff --git a/roop/uis/__components__/temp_frame.py b/roop/uis/components/temp_frame.py similarity index 100% rename from roop/uis/__components__/temp_frame.py rename to roop/uis/components/temp_frame.py diff --git a/roop/uis/__components__/trim_frame.py b/roop/uis/components/trim_frame.py similarity index 100% rename from roop/uis/__components__/trim_frame.py rename to roop/uis/components/trim_frame.py diff --git a/roop/uis/core.py b/roop/uis/core.py index 92a12d060..92c14cda1 100644 --- a/roop/uis/core.py +++ b/roop/uis/core.py @@ -29,7 +29,7 @@ def init() -> None: def load_ui_layout_module(ui_layout: str) -> Any: try: - ui_layout_module = importlib.import_module(f'roop.uis.__layouts__.{ui_layout}') + ui_layout_module = importlib.import_module(f'roop.uis.layouts.{ui_layout}') for method_name in UI_LAYOUT_METHODS: if not hasattr(ui_layout_module, method_name): raise NotImplementedError diff --git a/roop/uis/__layouts__/default.py b/roop/uis/layouts/default.py similarity index 85% rename from roop/uis/__layouts__/default.py rename to roop/uis/layouts/default.py index 37d7ef985..e02fe850f 100644 --- a/roop/uis/__layouts__/default.py +++ b/roop/uis/layouts/default.py @@ -1,6 +1,6 @@ import gradio -from roop.uis.__components__ import processor, execution, temp_frame, settings, source, target, preview, trim_frame, face_analyser, face_selector, output_settings, output +from roop.uis.components import processor, execution, temp_frame, settings, source, target, preview, trim_frame, face_analyser, face_selector, output_settings, output def render() -> gradio.Blocks: