Add support for providerSettings in vectorize taskType#248
Open
Sirsho1997 wants to merge 2 commits intomainfrom
Open
Add support for providerSettings in vectorize taskType#248Sirsho1997 wants to merge 2 commits intomainfrom
Sirsho1997 wants to merge 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds support for providerSettings in the vectorize task type and refactors provider settings handling across multiple task types. The implementation consolidates duplicate provider settings methods into a single unified method and modernizes the vectorize implementation to follow the pattern used by 3D inference.
Changes:
- Added
VectorizeProviderSettingstype alias and new optional fields toIVectorize(width, height, positivePrompt, providerSettings) - Refactored
_vectorizemethod to useprocess_image()pattern instead ofuploadImage(), with new helper methods for cleaner code structure - Consolidated task-specific provider settings methods (
_addImageProviderSettings,_addTextProviderSettings,_addAudioProviderSettings) into a single_addProviderSettings()method that accepts a Union of payload types
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| runware/types.py | Added VectorizeProviderSettings type alias; added optional fields (width, height, positivePrompt, providerSettings) to IVectorize dataclass; cleaned up formatting |
| runware/base.py | Refactored _vectorize with helper methods (_processVectorizeInputs, _buildVectorizeRequest); consolidated provider settings methods into unified _addProviderSettings(); updated all call sites to use new method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
IVectorize:width,height,positivePrompt,providerSettings(optional)IVectorize.inputsoptional (prompt-only vectorize e.g. recraft:v4@vector)VectorizeProviderSettingstype alias (IRecraftProviderSettings) in types_processVectorizeInputsand_buildVectorizeRequestin base (vectorize follows video/3D flow)_addProviderSettings(request_object, payload)for image, image background removal, image upscale, vectorize, video, audio, text (replaces_addImageProviderSettings,_addAudioProviderSettings,_addTextProviderSettings)Changed
process_imagewhen present; optional and added with_addOptionalField_addProviderSettingspayload type:Union[IImageInference, IImageBackgroundRemoval, IImageUpscale, IVectorize, IVideoInference, IAudioInference, ITextInference]