Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds type and strength optional fields to the IInputReference dataclass, enabling sketch-style reference support for image inference. It also adds processing logic to convert local file paths in IInputReference.image to base64 before sending API requests.
Changes:
- Added
type: Optional[str]andstrength: Optional[float]fields toIInputReferenceintypes.py. - Added image processing loop in
_imageInferenceto runprocess_imageonIInputReferenceitems withininputs.referenceImages. - Minor whitespace cleanup in
IInputsclass.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| runware/types.py | Added type and strength fields to IInputReference; whitespace cleanup in IInputs |
| runware/base.py | Imported IInputReference; added loop to process reference images within inputs.referenceImages for image inference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR adds type and strength fields to the IInputReference dataclass, allowing sketch-style reference images in image inference. It also adds processing logic in _imageInference to handle IInputReference items in inputs.referenceImages by running each item's image through process_image.
Changes:
- Added optional
type(str) andstrength(float) fields toIInputReferenceintypes.py. - Added logic in
base.py_imageInferenceto iterateinputs.referenceImages, processingIInputReference.imageindividually while handling plain strings/Files via the existingprocess_imagepath.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
runware/types.py |
Added type and strength optional fields to IInputReference; minor whitespace cleanup in IInputs. |
runware/base.py |
Imported IInputReference; added per-item image processing for inputs.referenceImages in _imageInference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…ss_images into _process_media_list()
Added
IInputReference:typeandstrength(for sketch-style refs).inputs.referenceImagescan beIInputReferenceitems; eachimageis run throughprocess_imagebefore send