mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(nodes): fix metadata/workflow serialization
This commit is contained in:
parent
f0db4d36e4
commit
5a163f02a6
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user