Commit 516119ad authored by comfyanonymous's avatar comfyanonymous
Browse files

Print min and max values in validation error message.

parent 3c76f430
...@@ -328,9 +328,9 @@ def validate_inputs(prompt, item, validated): ...@@ -328,9 +328,9 @@ def validate_inputs(prompt, item, validated):
if len(info) > 1: if len(info) > 1:
if "min" in info[1] and val < info[1]["min"]: if "min" in info[1] and val < info[1]["min"]:
return (False, "Value smaller than min. {}, {}".format(class_type, x)) return (False, "Value {} smaller than min of {}. {}, {}".format(val, info[1]["min"], class_type, x))
if "max" in info[1] and val > info[1]["max"]: if "max" in info[1] and val > info[1]["max"]:
return (False, "Value bigger than max. {}, {}".format(class_type, x)) return (False, "Value {} bigger than max of {}. {}, {}".format(val, info[1]["max"], class_type, x))
if hasattr(obj_class, "VALIDATE_INPUTS"): if hasattr(obj_class, "VALIDATE_INPUTS"):
input_data_all = get_input_data(inputs, obj_class, unique_id) input_data_all = get_input_data(inputs, obj_class, unique_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment