external lora
This commit is contained in:
parent
0779136134
commit
7fdfba6b6e
@ -64,7 +64,8 @@ class ComfyUIDeployExternalLora:
|
||||
import os
|
||||
import uuid
|
||||
|
||||
if lora_url and lora_url.startswith("http"):
|
||||
if lora_url:
|
||||
if lora_url.startswith("http"):
|
||||
if lora_save_name:
|
||||
existing_loras = folder_paths.get_filename_list("loras")
|
||||
# Check if lora_save_name exists in the list
|
||||
@ -79,7 +80,12 @@ class ComfyUIDeployExternalLora:
|
||||
folder_paths.folder_names_and_paths["loras"][0][0], lora_save_name
|
||||
)
|
||||
print(destination_path)
|
||||
print("Downloading external lora - " + lora_url + " to " + destination_path)
|
||||
print(
|
||||
"Downloading external lora - "
|
||||
+ lora_url
|
||||
+ " to "
|
||||
+ destination_path
|
||||
)
|
||||
response = requests.get(
|
||||
lora_url,
|
||||
headers={"User-Agent": "Mozilla/5.0"},
|
||||
@ -87,9 +93,13 @@ class ComfyUIDeployExternalLora:
|
||||
)
|
||||
with open(destination_path, "wb") as out_file:
|
||||
out_file.write(response.content)
|
||||
print(f"Ext Lora loading: {lora_url} to {lora_save_name}")
|
||||
return (lora_save_name,)
|
||||
else:
|
||||
print(f"using lora: {default_lora_name}")
|
||||
print(f"Ext Lora loading: {lora_url}")
|
||||
return (lora_url,)
|
||||
else:
|
||||
print(f"Ext Lora loading: {default_lora_name}")
|
||||
return (default_lora_name,)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user