Spaces:
Sleeping
Sleeping
Upload convert_url_to_diffusers_sd_gr.py
Browse files
convert_url_to_diffusers_sd_gr.py
CHANGED
|
@@ -291,6 +291,7 @@ def is_repo_exists(repo_id):
|
|
| 291 |
else: return False
|
| 292 |
except Exception as e:
|
| 293 |
print(f"Error: Failed to connect {repo_id}. ")
|
|
|
|
| 294 |
return True # for safe
|
| 295 |
|
| 296 |
|
|
@@ -325,7 +326,6 @@ def convert_url_to_diffusers_repo_sd(dl_url, hf_user, hf_repo, hf_token, civitai
|
|
| 325 |
print(f"Invalid user name: {hf_user}")
|
| 326 |
progress(1, desc=f"Invalid user name: {hf_user}")
|
| 327 |
return gr.update(value=repo_urls, choices=repo_urls), gr.update(value="")
|
| 328 |
-
if hf_token and not os.environ.get("HF_TOKEN"): os.environ['HF_TOKEN'] = hf_token
|
| 329 |
if not civitai_key and os.environ.get("CIVITAI_API_KEY"): civitai_key = os.environ.get("CIVITAI_API_KEY")
|
| 330 |
lora_dict = {lora1: lora1s, lora2: lora2s, lora3: lora3s, lora4: lora4s, lora5: lora5s}
|
| 331 |
new_path = convert_url_to_diffusers_sd(dl_url, civitai_key, is_upload_sf, half, vae, scheduler, lora_dict,
|
|
|
|
| 291 |
else: return False
|
| 292 |
except Exception as e:
|
| 293 |
print(f"Error: Failed to connect {repo_id}. ")
|
| 294 |
+
print(e)
|
| 295 |
return True # for safe
|
| 296 |
|
| 297 |
|
|
|
|
| 326 |
print(f"Invalid user name: {hf_user}")
|
| 327 |
progress(1, desc=f"Invalid user name: {hf_user}")
|
| 328 |
return gr.update(value=repo_urls, choices=repo_urls), gr.update(value="")
|
|
|
|
| 329 |
if not civitai_key and os.environ.get("CIVITAI_API_KEY"): civitai_key = os.environ.get("CIVITAI_API_KEY")
|
| 330 |
lora_dict = {lora1: lora1s, lora2: lora2s, lora3: lora3s, lora4: lora4s, lora5: lora5s}
|
| 331 |
new_path = convert_url_to_diffusers_sd(dl_url, civitai_key, is_upload_sf, half, vae, scheduler, lora_dict,
|