fix: external lora for new comfyui
This commit is contained in:
parent
f85043db07
commit
d34e2e99b1
@ -37,6 +37,10 @@ class ComfyUIDeployExternalLora:
|
|||||||
"STRING",
|
"STRING",
|
||||||
{"multiline": True, "default": ""},
|
{"multiline": True, "default": ""},
|
||||||
),
|
),
|
||||||
|
"lora_url": (
|
||||||
|
"STRING",
|
||||||
|
{"multiline": False, "default": ""},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,12 +51,12 @@ class ComfyUIDeployExternalLora:
|
|||||||
|
|
||||||
CATEGORY = "deploy"
|
CATEGORY = "deploy"
|
||||||
|
|
||||||
def run(self, input_id, default_lora_name=None, lora_save_name=None, display_name=None, description=None):
|
def run(self, input_id, default_lora_name=None, lora_save_name=None, display_name=None, description=None, lora_url=None):
|
||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
if default_lora_name.startswith("http"):
|
if lora_url and lora_url.startswith("http"):
|
||||||
if lora_save_name:
|
if lora_save_name:
|
||||||
existing_loras = folder_paths.get_filename_list("loras")
|
existing_loras = folder_paths.get_filename_list("loras")
|
||||||
# Check if lora_save_name exists in the list
|
# Check if lora_save_name exists in the list
|
||||||
|
@ -289,7 +289,7 @@ def apply_inputs_to_workflow(workflow_api: Any, inputs: Any, sid: str = None):
|
|||||||
value['inputs']["images"] = new_value
|
value['inputs']["images"] = new_value
|
||||||
|
|
||||||
if value["class_type"] == "ComfyUIDeployExternalLora":
|
if value["class_type"] == "ComfyUIDeployExternalLora":
|
||||||
value["inputs"]["default_lora_name"] = new_value
|
value["inputs"]["lora_url"] = new_value
|
||||||
|
|
||||||
if value["class_type"] == "ComfyUIDeployExternalSlider":
|
if value["class_type"] == "ComfyUIDeployExternalSlider":
|
||||||
value["inputs"]["default_value"] = new_value
|
value["inputs"]["default_value"] = new_value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user