mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-09 00:32:31 +08:00
handling
This commit is contained in:
parent
2781473763
commit
9cf5a29d63
@ -84,7 +84,10 @@ Convert one primitive type to another
|
|||||||
if not isinstance(input_value, str):
|
if not isinstance(input_value, str):
|
||||||
raise TypeError("Input is not a string")
|
raise TypeError("Input is not a string")
|
||||||
output_value = input_value.strip().lower() in TRUTHFUL
|
output_value = input_value.strip().lower() in TRUTHFUL
|
||||||
except (TypeError, ValueError) as e:
|
case _:
|
||||||
|
# this should never happen as execution would throw "Value not in list" during validation
|
||||||
|
return io.NodeOutput(input_value)
|
||||||
|
except (TypeError, ValueError, ArithmeticError) as e:
|
||||||
if cls.hidden.unique_id:
|
if cls.hidden.unique_id:
|
||||||
PromptServer.instance.send_progress_text(
|
PromptServer.instance.send_progress_text(
|
||||||
f'Failed to convert "{input_value}" ({type(input_value).__name__}) to "{output_type}":\n{e}',
|
f'Failed to convert "{input_value}" ({type(input_value).__name__}) to "{output_type}":\n{e}',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user