mirror of
https://github.com/invoke-ai/InvokeAI
synced 2025-07-25 21:05:37 +00:00
fix(nodes): fix metadata/workflow serialization
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user