refactor(plugin)!: rename to default_value for external text or image

This commit is contained in:
BennyKok 2023-12-21 00:43:27 +08:00
parent 06f427ef70
commit c77d201e88
2 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ class ComfyUIDeployExternalImage:
), ),
}, },
"optional": { "optional": {
"default_image": ("IMAGE",), "default_value": ("IMAGE",),
} }
} }
@ -25,8 +25,8 @@ class ComfyUIDeployExternalImage:
CATEGORY = "image" CATEGORY = "image"
def run(self, input_id, default_image=None): def run(self, input_id, default_value=None):
image = default_image image = default_value
try: try:
if input_id.startswith('http'): if input_id.startswith('http'):
import requests import requests

View File

@ -14,7 +14,7 @@ class ComfyUIDeployExternalText:
), ),
}, },
"optional": { "optional": {
"default_text": ( "default_value": (
"STRING", "STRING",
{"multiline": True, "default": ""}, {"multiline": True, "default": ""},
), ),
@ -28,9 +28,9 @@ class ComfyUIDeployExternalText:
CATEGORY = "text" CATEGORY = "text"
def run(self, input_id, default_text=None): def run(self, input_id, default_value=None):
if not input_id or len(input_id.strip()) == 0: if not input_id or len(input_id.strip()) == 0:
return [default_text] return [default_value]
return [input_id] return [input_id]