From 2f3308dd63d9b39bc466cd91e53564d332b0aeb4 Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Tue, 24 Feb 2026 21:18:58 -0500 Subject: [PATCH 1/4] allow settings and dict for videoInference, add new settings params, update bytedance providerSettings --- runware/base.py | 1 + runware/types.py | 10 ++++++++++ 2 files changed, 11 insertions(+) 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..30e4f28 100644 --- a/runware/types.py +++ b/runware/types.py @@ -752,6 +752,10 @@ class ISettings(SerializableMixin): turbo: Optional[bool] = None lyrics: Optional[str] = None guidanceType: Optional[str] = None + # Video + draft: Optional[bool] = None + save_audio: Optional[bool] = None + promptUpsampling: Optional[bool] = None @property def request_key(self) -> str: @@ -1217,6 +1221,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: @@ -1425,9 +1430,14 @@ class IVideoInference: advancedFeatures: Optional[IVideoAdvancedFeatures] = None acceleratorOptions: Optional[IAcceleratorOptions] = None inputs: Optional[IVideoInputs] = None + settings: Optional[Union[ISettings, Dict[str, Any]]] = None skipResponse: Optional[bool] = False resolution: Optional[str] = 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"] From d3a88b59636b7145137cbf1880537157ae6b76ae Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Wed, 25 Feb 2026 11:52:17 -0500 Subject: [PATCH 2/4] fix naming conv --- runware/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runware/types.py b/runware/types.py index 30e4f28..76d79a8 100644 --- a/runware/types.py +++ b/runware/types.py @@ -754,7 +754,7 @@ class ISettings(SerializableMixin): guidanceType: Optional[str] = None # Video draft: Optional[bool] = None - save_audio: Optional[bool] = None + audio: Optional[bool] = None promptUpsampling: Optional[bool] = None @property From 0717422dca1b30d1c8e5eb219e1cfbe9514b1041 Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Wed, 25 Feb 2026 11:56:16 -0500 Subject: [PATCH 3/4] Add post init to ISettings --- runware/types.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runware/types.py b/runware/types.py index 76d79a8..932be64 100644 --- a/runware/types.py +++ b/runware/types.py @@ -757,6 +757,14 @@ class ISettings(SerializableMixin): 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: return "settings" From 05fdde364bc9adb5898fa4c96239fd3a33226c1a Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Wed, 25 Feb 2026 12:09:12 -0500 Subject: [PATCH 4/4] fixes --- runware/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runware/types.py b/runware/types.py index 932be64..c901ef4 100644 --- a/runware/types.py +++ b/runware/types.py @@ -1438,9 +1438,9 @@ class IVideoInference: advancedFeatures: Optional[IVideoAdvancedFeatures] = None acceleratorOptions: Optional[IAcceleratorOptions] = None inputs: Optional[IVideoInputs] = None - settings: Optional[Union[ISettings, Dict[str, Any]]] = 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):