diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-13 14:42:16 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-13 14:42:16 +0000 |
commit | ff73841c608f5f02e6352bb235d9dbf63d922990 (patch) | |
tree | 405246d8f4d0477087ad24c10582eae72741d70f /modules/launch_utils.py | |
parent | e16ebc917dfc902f041963df0d4e99e8141cf82f (diff) | |
download | stable-diffusion-webui-gfx803-ff73841c608f5f02e6352bb235d9dbf63d922990.tar.gz stable-diffusion-webui-gfx803-ff73841c608f5f02e6352bb235d9dbf63d922990.tar.bz2 stable-diffusion-webui-gfx803-ff73841c608f5f02e6352bb235d9dbf63d922990.zip |
mute SDXL imports in the place there SDXL is imported for the first time instead of launch.py
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 183730d2..01ea7c91 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -224,22 +224,6 @@ def run_extensions_installers(settings_file): run_extension_installer(os.path.join(extensions_dir, dirname_extension))
-def mute_sdxl_imports():
- """create fake modules that SDXL wants to import but doesn't actually use for our purposes"""
-
- class Dummy:
- pass
-
- module = Dummy()
- module.LPIPS = None
- sys.modules['taming.modules.losses.lpips'] = module
-
- module = Dummy()
- module.StableDataModuleFromConfig = None
- sys.modules['sgm.data'] = module
-
-
-
def prepare_environment():
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
torch_command = os.environ.get('TORCH_COMMAND', f"pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url {torch_index_url}")
@@ -356,8 +340,6 @@ def configure_for_tests(): def start():
- mute_sdxl_imports()
-
print(f"Launching {'API server' if '--nowebui' in sys.argv else 'Web UI'} with arguments: {' '.join(sys.argv[1:])}")
import webui
if '--nowebui' in sys.argv:
|