diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-04 16:56:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 16:56:35 +0000 |
commit | eeb1de4388773ba92b9920a4f64eb91add2e02ca (patch) | |
tree | 22f5d5e7417f24599a415fd64c9f1652495ce5a3 /modules/import_hook.py | |
parent | d85c2cb2d59f64cbb510a9e5596596de2e4f4dcc (diff) | |
parent | b7deea47eeb033052062621b0005d4321b53bff7 (diff) | |
download | stable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.tar.gz stable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.tar.bz2 stable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.zip |
Merge branch 'master' into gradient-clipping
Diffstat (limited to 'modules/import_hook.py')
-rw-r--r-- | modules/import_hook.py | 5 |
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 |