Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -429,10 +429,10 @@ class GuiSD:
|
|
429 |
else:
|
430 |
url_upscaler = UPSCALER_DICT_GUI[upscaler_model_path]
|
431 |
|
432 |
-
if not os.path.exists(f"./
|
433 |
download_things(DIRECTORY_UPSCALERS, url_upscaler, HF_TOKEN)
|
434 |
|
435 |
-
upscaler_model = f"./
|
436 |
|
437 |
logging.getLogger("ultralytics").setLevel(logging.INFO if adetailer_verbose else logging.ERROR)
|
438 |
|
@@ -712,10 +712,12 @@ def process_upscale(image, upscaler_name, upscaler_size):
|
|
712 |
name_upscaler = UPSCALER_DICT_GUI[upscaler_name]
|
713 |
|
714 |
if "https://" in str(name_upscaler):
|
715 |
-
|
716 |
-
if not os.path.exists(name_upscaler):
|
717 |
download_things(DIRECTORY_UPSCALERS, name_upscaler, HF_TOKEN)
|
718 |
|
|
|
|
|
719 |
scaler_beta = load_upscaler_model(model=name_upscaler, tile=0, tile_overlap=8, device="cuda", half=True)
|
720 |
image_up = scaler_beta.upscale(image, upscaler_size, True)
|
721 |
|
|
|
429 |
else:
|
430 |
url_upscaler = UPSCALER_DICT_GUI[upscaler_model_path]
|
431 |
|
432 |
+
if not os.path.exists(f"./{DIRECTORY_UPSCALERS}/{url_upscaler.split('/')[-1]}"):
|
433 |
download_things(DIRECTORY_UPSCALERS, url_upscaler, HF_TOKEN)
|
434 |
|
435 |
+
upscaler_model = f"./{DIRECTORY_UPSCALERS}/{url_upscaler.split('/')[-1]}"
|
436 |
|
437 |
logging.getLogger("ultralytics").setLevel(logging.INFO if adetailer_verbose else logging.ERROR)
|
438 |
|
|
|
712 |
name_upscaler = UPSCALER_DICT_GUI[upscaler_name]
|
713 |
|
714 |
if "https://" in str(name_upscaler):
|
715 |
+
|
716 |
+
if not os.path.exists(f"./{DIRECTORY_UPSCALERS}/{name_upscaler.split('/')[-1]}"):
|
717 |
download_things(DIRECTORY_UPSCALERS, name_upscaler, HF_TOKEN)
|
718 |
|
719 |
+
name_upscaler = f"./{DIRECTORY_UPSCALERS}/{name_upscaler.split('/')[-1]}"
|
720 |
+
|
721 |
scaler_beta = load_upscaler_model(model=name_upscaler, tile=0, tile_overlap=8, device="cuda", half=True)
|
722 |
image_up = scaler_beta.upscale(image, upscaler_size, True)
|
723 |
|