diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-24 17:24:27 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-24 17:24:27 +0000 |
commit | 28189985e6f56dc725938a3f0e4d2462dad74bc5 (patch) | |
tree | 880bd69bbf0f29d0015ef66a4bf028a83390dcaf /modules/interrogate.py | |
parent | dac45299dd57c6cb240424b93fd28a085605bd90 (diff) | |
download | stable-diffusion-webui-gfx803-28189985e6f56dc725938a3f0e4d2462dad74bc5.tar.gz stable-diffusion-webui-gfx803-28189985e6f56dc725938a3f0e4d2462dad74bc5.tar.bz2 stable-diffusion-webui-gfx803-28189985e6f56dc725938a3f0e4d2462dad74bc5.zip |
remove fairscale requirement, add fake fairscale to make BLIP not complain about it
Diffstat (limited to 'modules/interrogate.py')
-rw-r--r-- | modules/interrogate.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/interrogate.py b/modules/interrogate.py index 236e6983..9f063197 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -82,9 +82,16 @@ class InterrogateModels: return self.loaded_categories
+ def create_fake_fairscale(self):
+ class FakeFairscale:
+ def checkpoint_wrapper(self):
+ pass
+
+ sys.modules["fairscale.nn.checkpoint.checkpoint_activations"] = FakeFairscale
+
def load_blip_model(self):
- with paths.Prioritize("BLIP"):
- import models.blip
+ create_fake_fairscale()
+ import models.blip
files = modelloader.load_models(
model_path=os.path.join(paths.models_path, "BLIP"),
|