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)