From f8f1740668edd4c5e6b8549422b075e59d944bbf Mon Sep 17 00:00:00 2001 From: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:51:09 -0400 Subject: [PATCH] Set Defaults to 1 --- invokeai/app/invocations/math.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invokeai/app/invocations/math.py b/invokeai/app/invocations/math.py index 3ed325802e..ad676e824c 100644 --- a/invokeai/app/invocations/math.py +++ b/invokeai/app/invocations/math.py @@ -182,8 +182,8 @@ class IntegerMathInvocation(BaseInvocation): operation: INTEGER_OPERATIONS = InputField( default="ADD", description="The operation to perform", ui_choice_labels=INTEGER_OPERATIONS_LABELS ) - a: int = InputField(default=0, description=FieldDescriptions.num_1) - b: int = InputField(default=0, description=FieldDescriptions.num_2) + a: int = InputField(default=1, description=FieldDescriptions.num_1) + b: int = InputField(default=1, description=FieldDescriptions.num_2) @field_validator("b") def no_unrepresentable_results(cls, v: int, info: ValidationInfo): @@ -256,8 +256,8 @@ class FloatMathInvocation(BaseInvocation): operation: FLOAT_OPERATIONS = InputField( default="ADD", description="The operation to perform", ui_choice_labels=FLOAT_OPERATIONS_LABELS ) - a: float = InputField(default=0, description=FieldDescriptions.num_1) - b: float = InputField(default=0, description=FieldDescriptions.num_2) + a: float = InputField(default=1, description=FieldDescriptions.num_1) + b: float = InputField(default=1, description=FieldDescriptions.num_2) @field_validator("b") def no_unrepresentable_results(cls, v: float, info: ValidationInfo):