Adityadn commited on
Commit
a1a8268
·
verified ·
1 Parent(s): f7bdc68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -46,19 +46,21 @@ def process():
46
  # else:
47
  # print(f"Gradio is already at version {desired_version}")
48
 
49
- python_script = "webui.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", "--directml", "--always-download-new-model", "--theme light", "--preset lcm"]
54
 
55
  # Gabungkan semua argumen
56
  PIP = ["pip", "install", "-r", "requirements.txt"]
 
57
  command = ["python", python_script] + additional_arguments
58
 
59
  # Jalankan skrip menggunakan subprocess
60
  print("Installing..")
61
  subprocess.run(PIP)
 
62
 
63
  print(f"Running.. ({python_script})")
64
  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
 
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", "--theme light", "--preset lcm"]
54
 
55
  # Gabungkan semua argumen
56
  PIP = ["pip", "install", "-r", "requirements.txt"]
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(PIP)
63
+ subprocess.run(PIP2)
64
 
65
  print(f"Running.. ({python_script})")
66
  subprocess.run(command)# Menjalankan file batch