Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,16 +50,18 @@ def process():
|
|
50 |
|
51 |
# Argument yang ingin Anda tambahkan
|
52 |
# additional_arguments = ["--disable-xformers", "--pytorch-deterministic", "--disable-ipex-hijack", "--disable-header-check", "--disable-async-cuda-allocation", "--disable-attention-upcast", "--always-offload-from-vram", "--all-in-fp32", "--always-no-vram"]
|
53 |
-
additional_arguments = ["--always-cpu", "--attention-quad", "--directml", "--always-download-new-model", "--
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
-
|
|
|
57 |
PIP2 = ["pip", "install", "torch_directml"]
|
58 |
command = ["python", python_script] + additional_arguments
|
59 |
|
60 |
# Jalankan skrip menggunakan subprocess
|
61 |
print("Installing..")
|
62 |
-
subprocess.run(
|
|
|
63 |
subprocess.run(PIP2)
|
64 |
|
65 |
print(f"Running.. ({python_script})")
|
|
|
50 |
|
51 |
# Argument yang ingin Anda tambahkan
|
52 |
# additional_arguments = ["--disable-xformers", "--pytorch-deterministic", "--disable-ipex-hijack", "--disable-header-check", "--disable-async-cuda-allocation", "--disable-attention-upcast", "--always-offload-from-vram", "--all-in-fp32", "--always-no-vram"]
|
53 |
+
additional_arguments = ["--always-cpu", "--attention-quad", "--directml", "--always-download-new-model", "--preset", "lcm"]
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
+
PIP0 = ["pip", "install", "--upgrade", "pip"]
|
57 |
+
PIP1 = ["pip", "install", "-r", "requirements.txt"]
|
58 |
PIP2 = ["pip", "install", "torch_directml"]
|
59 |
command = ["python", python_script] + additional_arguments
|
60 |
|
61 |
# Jalankan skrip menggunakan subprocess
|
62 |
print("Installing..")
|
63 |
+
subprocess.run(PIP0)
|
64 |
+
subprocess.run(PIP1)
|
65 |
subprocess.run(PIP2)
|
66 |
|
67 |
print(f"Running.. ({python_script})")
|