Update launch.py
Browse files
launch.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from modules import launch_utils
|
2 |
-
import os
|
3 |
import os
|
|
|
|
|
4 |
|
5 |
|
6 |
args = launch_utils.args
|
@@ -30,14 +30,17 @@ start = launch_utils.start
|
|
30 |
def main():
|
31 |
if not args.skip_prepare_environment:
|
32 |
prepare_environment()
|
33 |
-
os.
|
34 |
-
|
|
|
35 |
|
36 |
if args.test_server:
|
37 |
configure_for_tests()
|
38 |
|
39 |
start()
|
40 |
|
|
|
41 |
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
+
import subprocess
|
3 |
+
from modules import launch_utils
|
4 |
|
5 |
|
6 |
args = launch_utils.args
|
|
|
30 |
def main():
|
31 |
if not args.skip_prepare_environment:
|
32 |
prepare_environment()
|
33 |
+
with open(os.devnull, 'w') as devnull:
|
34 |
+
subprocess.run(['sed', '-i', '-e', 's/dict()))/dict())).cuda()/g', '/bushu/ui/repositories/stable-diffusion-stability-ai/ldm/util.py'], stdout=devnull, stderr=devnull)
|
35 |
+
subprocess.run(['sed', '-i', '-e', 's/stable/dict()))/dict())).cuda()/g', '/bushu/ui/repositories/diffusion-stability-stable/ldm/util.py'], stdout=devnull, stderr=devnull)
|
36 |
|
37 |
if args.test_server:
|
38 |
configure_for_tests()
|
39 |
|
40 |
start()
|
41 |
|
42 |
+
__name__ == "__main__"
|
43 |
|
44 |
+
Start = True
|
45 |
+
if Start:
|
46 |
+
main()
|