Spaces:
Paused
Paused
launch app with launch.py step 2/5/3
Browse files
launch.py
CHANGED
@@ -72,15 +72,15 @@ def ini_args():
|
|
72 |
return args
|
73 |
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
os.environ['GRADIO_TEMP_DIR'] = config.temp_path
|
86 |
|
@@ -90,7 +90,7 @@ if config.temp_path_cleanup_on_launch:
|
|
90 |
if result:
|
91 |
print("[Cleanup] Cleanup successful")
|
92 |
else:
|
93 |
-
print(f"[Cleanup] Failed to delete content of temp dir.")
|
94 |
|
95 |
|
96 |
def download_models(default_model, previous_default_models, checkpoint_downloads, embeddings_downloads, lora_downloads):
|
|
|
72 |
return args
|
73 |
|
74 |
|
75 |
+
prepare_environment()
|
76 |
+
build_launcher()
|
77 |
+
args = ini_args()
|
78 |
|
79 |
+
if args.gpu_device_id is not None:
|
80 |
+
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.gpu_device_id)
|
81 |
+
print("Set device to:", args.gpu_device_id)
|
82 |
|
83 |
+
from modules import config
|
84 |
|
85 |
os.environ['GRADIO_TEMP_DIR'] = config.temp_path
|
86 |
|
|
|
90 |
if result:
|
91 |
print("[Cleanup] Cleanup successful")
|
92 |
else:
|
93 |
+
print(f"[Cleanup] Failed to delete content of temp dir.")
|
94 |
|
95 |
|
96 |
def download_models(default_model, previous_default_models, checkpoint_downloads, embeddings_downloads, lora_downloads):
|