Added dict coercion for refImages in imageInference#310
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the IInputs dataclass in runware/types.py to allow inputs.referenceImages to be provided as plain dictionaries (in addition to str, File, and IInputReference) and coerces those dict entries into IInputReference instances during __post_init__. This aligns IInputs with existing patterns in the codebase where dict payloads are normalized into dataclass instances for downstream processing (e.g., media normalization).
Changes:
- Expanded the
IInputs.referenceImagestype to acceptDict[str, Any]. - Added
__post_init__coercion that converts dict entries inreferenceImagesintoIInputReference.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changed
IInputs.referenceImagesnow acceptsDict[str, Any]entries and coerces them toIInputReferenceinIInputs.__post_init__