aboutsummaryrefslogtreecommitdiff
path: root/modules/import_hook.py
diff options
context:
space:
mode:
authorunknown <mcgpapu@gmail.com>2022-12-25 02:03:55 -0600
committerunknown <mcgpapu@gmail.com>2022-12-25 02:03:55 -0600
commit876da1259965130603f2a7fea505cfa0fce09e2e (patch)
treeccb8b89d64480a4bd224b311702ffeb13b8fe754 /modules/import_hook.py
parentd6fdfde9d70f1b86b696240fb0a0c8f2a4d024f6 (diff)
parentc6f347b81f584b6c0d44af7a209983284dbb52d2 (diff)
Merge branch 'master' of github.com:AUTOMATIC1111/stable-diffusion-webui
Diffstat (limited to 'modules/import_hook.py')
-rw-r--r--modules/import_hook.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/import_hook.py b/modules/import_hook.py
new file mode 100644
index 00000000..28c67dfa
--- /dev/null
+++ b/modules/import_hook.py
@@ -0,0 +1,5 @@
+import sys
+
+# this will break any attempt to import xformers which will prevent stability diffusion repo from trying to use it
+if "--xformers" not in "".join(sys.argv):
+ sys.modules["xformers"] = None