From 461e474394013e03b5b00d35241cdac1e4078f76 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:58:34 +1100 Subject: [PATCH] fix(nodes): fix embedded workflows with IDs This model was a bit too strict, and raised validation errors when workflows we expect to *not* have an ID (eg, an embedded workflow) have one. Now it strips unknown attributes, allowing those workflows to load. --- .../app/services/workflow_records/workflow_records_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/services/workflow_records/workflow_records_common.py b/invokeai/app/services/workflow_records/workflow_records_common.py index b7a1fba729..e7f3d4295f 100644 --- a/invokeai/app/services/workflow_records/workflow_records_common.py +++ b/invokeai/app/services/workflow_records/workflow_records_common.py @@ -65,7 +65,7 @@ class WorkflowWithoutID(BaseModel): nodes: list[dict[str, JsonValue]] = Field(description="The nodes of the workflow.") edges: list[dict[str, JsonValue]] = Field(description="The edges of the workflow.") - model_config = ConfigDict(extra="forbid") + model_config = ConfigDict(extra="ignore") WorkflowWithoutIDValidator = TypeAdapter(WorkflowWithoutID)