Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runware/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
18 changes: 18 additions & 0 deletions runware/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +760 to +766
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISettings.__post_init__ now explicitly accepts dict values for sparseStructure, shapeSlat, and texSlat, but the field type annotations are still Optional[ISparseStructure] / Optional[IShapeSlat] / Optional[ITexSlat]. This makes the public API and type hints inconsistent with actual supported inputs. Consider updating those annotations to include Dict[str, Any] (or otherwise constraining inputs and removing the conversion) so users and static type checkers have an accurate contract.

Copilot uses AI. Check for mistakes.

@property
def request_key(self) -> str:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Comment on lines +1443 to +1447
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IVideoInference.settings is newly supported as a dict via __post_init__, but there are no unit tests covering the conversion (dict -> ISettings) and the resulting serialized shape. Adding tests in tests/test_types.py for constructing IVideoInference(settings={...}) and asserting settings becomes an ISettings (and serializes as expected) would prevent regressions.

Copilot uses AI. Check for mistakes.


I3dOutputFormat = Literal["GLB", "PLY"]
Expand Down