diff --git a/runware/base.py b/runware/base.py index 721c295..10552ef 100644 --- a/runware/base.py +++ b/runware/base.py @@ -1990,6 +1990,7 @@ def _buildVideoRequest(self, requestVideo: IVideoInference) -> Dict[str, Any]: self._addOptionalField(request_object, requestVideo.inputs) self._addProviderSettings(request_object, requestVideo) self._addOptionalField(request_object, requestVideo.safety) + self._addOptionalField(request_object, requestVideo.settings) self._addOptionalField(request_object, requestVideo.advancedFeatures) self._addOptionalField(request_object, requestVideo.acceleratorOptions) diff --git a/runware/types.py b/runware/types.py index 254cb63..c901ef4 100644 --- a/runware/types.py +++ b/runware/types.py @@ -752,6 +752,18 @@ class ISettings(SerializableMixin): turbo: Optional[bool] = None lyrics: Optional[str] = None guidanceType: Optional[str] = None + # Video + draft: Optional[bool] = None + audio: Optional[bool] = None + promptUpsampling: Optional[bool] = None + + def __post_init__(self): + if self.sparseStructure is not None and isinstance(self.sparseStructure, dict): + self.sparseStructure = ISparseStructure(**self.sparseStructure) + if self.shapeSlat is not None and isinstance(self.shapeSlat, dict): + self.shapeSlat = IShapeSlat(**self.shapeSlat) + if self.texSlat is not None and isinstance(self.texSlat, dict): + self.texSlat = ITexSlat(**self.texSlat) @property def request_key(self) -> str: @@ -1217,6 +1229,7 @@ class IBytedanceProviderSettings(BaseProviderSettings): fastMode: Optional[bool] = None # When enabled, speeds up generation by sacrificing some effects. Default: false. RTF: 25-28 (fast) vs 35 (normal) audio: Optional[bool] = None draft: Optional[bool] = None + optimizePromptMode: Optional[str] = None @property def provider_key(self) -> str: @@ -1427,6 +1440,11 @@ class IVideoInference: inputs: Optional[IVideoInputs] = None skipResponse: Optional[bool] = False resolution: Optional[str] = None + settings: Optional[Union[ISettings, Dict[str, Any]]] = None + + def __post_init__(self): + if self.settings is not None and isinstance(self.settings, dict): + self.settings = ISettings(**self.settings) I3dOutputFormat = Literal["GLB", "PLY"]