mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
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.
This commit is contained in:
parent
f0c70fe3f1
commit
461e474394
@ -65,7 +65,7 @@ class WorkflowWithoutID(BaseModel):
|
|||||||
nodes: list[dict[str, JsonValue]] = Field(description="The nodes of the workflow.")
|
nodes: list[dict[str, JsonValue]] = Field(description="The nodes of the workflow.")
|
||||||
edges: list[dict[str, JsonValue]] = Field(description="The edges 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)
|
WorkflowWithoutIDValidator = TypeAdapter(WorkflowWithoutID)
|
||||||
|
Loading…
Reference in New Issue
Block a user