diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-12 21:12:25 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-12 21:12:25 +0000 |
commit | a04c95512148fc6df64535a995fbc8f499cae206 (patch) | |
tree | 13bdc123cacf4a32e08f624df3c21c70e8652052 /modules/launch_utils.py | |
parent | 5cf623c58ef3c158e8b25f7c3d516ffc16769fa4 (diff) | |
download | stable-diffusion-webui-gfx803-a04c95512148fc6df64535a995fbc8f499cae206.tar.gz stable-diffusion-webui-gfx803-a04c95512148fc6df64535a995fbc8f499cae206.tar.bz2 stable-diffusion-webui-gfx803-a04c95512148fc6df64535a995fbc8f499cae206.zip |
fix importlib.machinery issue on github's autotests #yolo
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index aa9d1880..4f48f3a1 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -227,13 +227,14 @@ def run_extensions_installers(settings_file): def mute_sdxl_imports():
"""create fake modules that SDXL wants to import but doesn't actually use for our purposes"""
- import importlib
+ class Dummy:
+ pass
- module = importlib.util.module_from_spec(importlib.machinery.ModuleSpec('taming.modules.losses.lpips', None))
+ module = Dummy()
module.LPIPS = None
sys.modules['taming.modules.losses.lpips'] = module
- module = importlib.util.module_from_spec(importlib.machinery.ModuleSpec('sgm.data', None))
+ module = Dummy()
module.StableDataModuleFromConfig = None
sys.modules['sgm.data'] = module
|