From 61f6479ea9a85fd12b830be2dfe71a51db34b121 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Mon, 22 Apr 2024 12:19:30 +0300 Subject: [PATCH] restore 1.8.0-style naming of scripts --- modules/script_loading.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/script_loading.py b/modules/script_loading.py index 7cbba71de..cccb30966 100644 --- a/modules/script_loading.py +++ b/modules/script_loading.py @@ -8,9 +8,7 @@ loaded_scripts = {} def load_module(path): - module_name, _ = os.path.splitext(os.path.basename(path)) - full_module_name = "scripts." + module_name - module_spec = importlib.util.spec_from_file_location(full_module_name, path) + module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path) module = importlib.util.module_from_spec(module_spec) module_spec.loader.exec_module(module)