Skip to content

Commit 0717422

Browse files
committed
Add post init to ISettings
1 parent d3a88b5 commit 0717422

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

runware/types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,14 @@ class ISettings(SerializableMixin):
757757
audio: Optional[bool] = None
758758
promptUpsampling: Optional[bool] = None
759759

760+
def __post_init__(self):
761+
if self.sparseStructure is not None and isinstance(self.sparseStructure, dict):
762+
self.sparseStructure = ISparseStructure(**self.sparseStructure)
763+
if self.shapeSlat is not None and isinstance(self.shapeSlat, dict):
764+
self.shapeSlat = IShapeSlat(**self.shapeSlat)
765+
if self.texSlat is not None and isinstance(self.texSlat, dict):
766+
self.texSlat = ITexSlat(**self.texSlat)
767+
760768
@property
761769
def request_key(self) -> str:
762770
return "settings"

0 commit comments

Comments
 (0)