From ed72d51969e20877d53432b979d1a4db566894e5 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:22:31 +1000 Subject: [PATCH] fix(nodes): fix primitives defaults for collections --- invokeai/app/invocations/primitives.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/invokeai/app/invocations/primitives.py b/invokeai/app/invocations/primitives.py index 8089b9d5e2..d002ba8ddc 100644 --- a/invokeai/app/invocations/primitives.py +++ b/invokeai/app/invocations/primitives.py @@ -109,7 +109,7 @@ class IntegerCollectionInvocation(BaseInvocation): """A collection of integer primitive values""" collection: list[int] = InputField( - default=0, description="The collection of integer values", ui_type=UIType.IntegerCollection + default_factory=list, description="The collection of integer values", ui_type=UIType.IntegerCollection ) def invoke(self, context: InvocationContext) -> IntegerCollectionOutput: @@ -261,7 +261,7 @@ class ImageCollectionInvocation(BaseInvocation): """A collection of image primitive values""" collection: list[ImageField] = InputField( - default=0, description="The collection of image values", ui_type=UIType.ImageCollection + default_factory=list, description="The collection of image values", ui_type=UIType.ImageCollection ) def invoke(self, context: InvocationContext) -> ImageCollectionOutput: @@ -451,7 +451,9 @@ class ConditioningCollectionInvocation(BaseInvocation): """A collection of conditioning tensor primitive values""" collection: list[ConditioningField] = InputField( - default=0, description="The collection of conditioning tensors", ui_type=UIType.ConditioningCollection + default_factory=list, + description="The collection of conditioning tensors", + ui_type=UIType.ConditioningCollection, ) def invoke(self, context: InvocationContext) -> ConditioningCollectionOutput: