diff --git a/comfy-nodes/external_checkpoints.py b/comfy-nodes/external_checkpoints.py index b5cc25b..ea9b6ec 100644 --- a/comfy-nodes/external_checkpoints.py +++ b/comfy-nodes/external_checkpoints.py @@ -16,7 +16,7 @@ class ComfyUIDeployExternalCheckpoint: ), }, "optional": { - "default_checkpoint_name": (folder_paths.get_filename_list("checkpoints"), ), + "default_value": (folder_paths.get_filename_list("checkpoints"), ), } } @@ -27,12 +27,12 @@ class ComfyUIDeployExternalCheckpoint: CATEGORY = "deploy" - def run(self, input_id, default_checkpoint_name=None): + def run(self, input_id, default_value=None): import requests import os import uuid - if input_id and input_id.startswith('http'): + if default_value.startswith('http'): unique_filename = str(uuid.uuid4()) + ".safetensors" print(unique_filename) print(folder_paths.folder_names_and_paths["checkpoints"][0][0]) @@ -59,7 +59,7 @@ class ComfyUIDeployExternalCheckpoint: out_file.write(chunk) return (unique_filename,) else: - return (default_checkpoints_name,) + return (default_value,) NODE_CLASS_MAPPINGS = { diff --git a/custom_routes.py b/custom_routes.py index 928fd35..ecf0f3f 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -155,6 +155,9 @@ def send_prompt(sid: str, inputs: StreamingPrompt): # Fix for external text default value if (value["class_type"] == "ComfyUIDeployExternalText"): value['inputs']["default_value"] = new_value + + if (value["class_type"] == "ComfyUIDeployExternalCheckpoint"): + value['inputs']["default_value"] = new_value print(workflow_api)