fix: External Text Input default value not working

This commit is contained in:
bennykok 2024-02-08 23:09:38 +08:00
parent 5ddbfdf44b
commit 4c32248d86
2 changed files with 6 additions and 3 deletions

View File

@ -29,9 +29,7 @@ class ComfyUIDeployExternalText:
CATEGORY = "text"
def run(self, input_id, default_value=None):
if not input_id or len(input_id.strip()) == 0:
return [default_value]
return [input_id]
return [default_value]
NODE_CLASS_MAPPINGS = {"ComfyUIDeployExternalText": ComfyUIDeployExternalText}

View File

@ -91,6 +91,11 @@ export const createRun = withServerPromise(
if (node.inputs["input_id"] === key) {
node.inputs["input_id"] = inputs[key];
}
// Fix for external text default value
if (node.class_type == "ComfyUIDeployExternalText") {
node.inputs["default_value"] = inputs[key];
}
});
}
}