fix: external text input
This commit is contained in:
parent
fa2638f66d
commit
8628480362
@ -29,9 +29,9 @@ class ComfyUIDeployExternalNumber:
|
||||
CATEGORY = "number"
|
||||
|
||||
def run(self, input_id, default_value=None):
|
||||
if not input_id or len(input_id.strip()) == 0:
|
||||
if not input_id or not input_id.strip().isdigit():
|
||||
return [default_value]
|
||||
return [input_id]
|
||||
return [int(input_id)]
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyUIDeployExternalNumber": ComfyUIDeployExternalNumber}
|
||||
|
@ -29,9 +29,9 @@ class ComfyUIDeployExternalNumberInt:
|
||||
CATEGORY = "number"
|
||||
|
||||
def run(self, input_id, default_value=None):
|
||||
if not input_id or len(input_id.strip()) == 0:
|
||||
if not input_id or not input_id.strip().isdigit():
|
||||
return [default_value]
|
||||
return [input_id]
|
||||
return [int(input_id)]
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyUIDeployExternalNumberInt": ComfyUIDeployExternalNumberInt}
|
||||
|
@ -2,5 +2,6 @@ export const customInputNodes: Record<string, string> = {
|
||||
ComfyUIDeployExternalText: "string",
|
||||
ComfyUIDeployExternalImage: "string - (public image url)",
|
||||
ComfyUIDeployExternalImageAlpha: "string - (public image url)",
|
||||
ComfyUIDeployExternalNumber: "number"
|
||||
ComfyUIDeployExternalNumber: "float",
|
||||
ComfyUIDeployExternalNumberInt: "integer",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user