From 5a163f02a66a75b373fe86bbf8b5f92c0de71ee3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:08:01 +1100 Subject: [PATCH] fix(nodes): fix metadata/workflow serialization --- invokeai/app/invocations/baseinvocation.py | 3 --- .../app/services/workflow_records/workflow_records_common.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/invokeai/app/invocations/baseinvocation.py b/invokeai/app/invocations/baseinvocation.py index 39df4971a6..162b22b28d 100644 --- a/invokeai/app/invocations/baseinvocation.py +++ b/invokeai/app/invocations/baseinvocation.py @@ -830,9 +830,6 @@ class MetadataField(RootModel): root: dict[str, Any] = Field(description="A dictionary of metadata, shape of which is arbitrary") - def model_dump(self, *args, **kwargs) -> dict[str, Any]: - return super().model_dump(*args, **kwargs)["root"] - type_adapter_MetadataField = TypeAdapter(MetadataField) diff --git a/invokeai/app/services/workflow_records/workflow_records_common.py b/invokeai/app/services/workflow_records/workflow_records_common.py index d548656dab..32046328bb 100644 --- a/invokeai/app/services/workflow_records/workflow_records_common.py +++ b/invokeai/app/services/workflow_records/workflow_records_common.py @@ -15,8 +15,5 @@ class WorkflowField(RootModel): root: dict[str, Any] = Field(description="Workflow dict") - def model_dump(self, *args, **kwargs) -> dict[str, Any]: - return super().model_dump(*args, **kwargs)["root"] - type_adapter_WorkflowField = TypeAdapter(WorkflowField)