Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,23 +46,24 @@ def process():
|
|
46 |
# else:
|
47 |
# print(f"Gradio is already at version {desired_version}")
|
48 |
|
49 |
-
python_script = "entry_with_update.py"
|
|
|
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", "--
|
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})")
|
68 |
subprocess.run(command)# Menjalankan file batch
|
|
|
46 |
# else:
|
47 |
# print(f"Gradio is already at version {desired_version}")
|
48 |
|
49 |
+
# python_script = "entry_with_update.py"
|
50 |
+
python_script = "webui.py"
|
51 |
|
52 |
# Argument yang ingin Anda tambahkan
|
53 |
# 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"]
|
54 |
+
additional_arguments = ["--always-cpu", "--attention-quad", "--always-download-new-model", "--preset", "lcm"]
|
55 |
|
56 |
# Gabungkan semua argumen
|
57 |
PIP0 = ["pip", "install", "--upgrade", "pip"]
|
58 |
PIP1 = ["pip", "install", "-r", "requirements.txt"]
|
59 |
+
# PIP2 = ["pip", "install", "torch_directml"]
|
60 |
command = ["python", python_script] + additional_arguments
|
61 |
|
62 |
# Jalankan skrip menggunakan subprocess
|
63 |
print("Installing..")
|
64 |
subprocess.run(PIP0)
|
65 |
subprocess.run(PIP1)
|
66 |
+
# subprocess.run(PIP2)
|
67 |
|
68 |
print(f"Running.. ({python_script})")
|
69 |
subprocess.run(command)# Menjalankan file batch
|