fix: external number input

This commit is contained in:
bennykok 2024-04-25 18:36:15 +08:00
parent cd5e4a5d01
commit c8dc189f99

View File

@ -29,7 +29,7 @@ class ComfyUIDeployExternalNumberInt:
CATEGORY = "number" CATEGORY = "number"
def run(self, input_id, default_value=None): def run(self, input_id, default_value=None):
if not input_id or not input_id.strip().isdigit(): if not input_id or (isinstance(input_id, str) and not input_id.strip().isdigit()):
return [default_value] return [default_value]
return [int(input_id)] return [int(input_id)]