Skip to content

Add support for providerSettings in vectorize taskType#248

Open
Sirsho1997 wants to merge 2 commits intomainfrom
feature-recraftProviderSettings
Open

Add support for providerSettings in vectorize taskType#248
Sirsho1997 wants to merge 2 commits intomainfrom
feature-recraftProviderSettings

Conversation

@Sirsho1997
Copy link
Collaborator

@Sirsho1997 Sirsho1997 commented Feb 25, 2026

Added

  • IVectorize: width, height, positivePrompt, providerSettings (optional)
  • IVectorize.inputs optional (prompt-only vectorize e.g. recraft:v4@vector)
  • VectorizeProviderSettings type alias (IRecraftProviderSettings) in types
  • _processVectorizeInputs and _buildVectorizeRequest in base (vectorize follows video/3D flow)
  • Single _addProviderSettings(request_object, payload) for image, image background removal, image upscale, vectorize, video, audio, text (replaces _addImageProviderSettings, _addAudioProviderSettings, _addTextProviderSettings)

Changed

  • Vectorize: inputs resolved via process_image when present; optional and added with _addOptionalField
  • _addProviderSettings payload type: Union[IImageInference, IImageBackgroundRemoval, IImageUpscale, IVectorize, IVideoInference, IAudioInference, ITextInference]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 VectorizeProviderSettings type alias and new optional fields to IVectorize (width, height, positivePrompt, providerSettings)
  • Refactored _vectorize method to use process_image() pattern instead of uploadImage(), 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.

@Sirsho1997 Sirsho1997 requested a review from teith February 25, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants