All notable changes to this project will be documented in this file.
- Replace polling with asyncio.Future for O(1) message routing via
_pending_operationsHashMap - Add semaphore to limit concurrent requests (default 15, env
RUNWARE_MAX_CONCURRENT_REQUESTS) - Add jitter on reconnect to prevent thundering herd
- Increase
PING_TIMEOUT_DURATIONfrom 10s to 30s for stability - Graceful cancellation of pending operations on disconnect
- Added
post_inittoIImageInference,IImageCaption,IImageUpscale,IVideoInference,I3dInference,IAudioInference,IVideoBackgroundRemoval - Added
promptExtend: Optional[bool]toISettings - Added
IBytedanceProviderSettings.optimizePromptMode: Optional[str] - Added
settingstoIVideoInferencedataclass - Added
draft: Optional[bool],audio: Optional[bool], andpromptUpsampling: Optional[bool]toISettingsdataclass - Added
post_inittoISettingsdataclass
- Added
IRGBdataclass (rgb: List[int]) with validation (exactly 3 elements, each 0–255) - Added
IRecraftProviderSettingswithstyleId: Optional[str],colors: Optional[List[IRGB]],backgroundColor: Optional[IRGB]; added asImageProviderSettings. - Added
ISettings.lyrics: Optional[str]andISettings.guidanceType: Optional[str]. - Added
negativePrompt,seed,steps,CFGScale, andsettingstoIAudioInferencedataclass. - Added
IAudioSpeechdataclass (text,voice,speed,volume,pitch,emotion,tone: Optional[List[str]]). - Added
channels: Optional[int]toIAudioSettings. - Added
speech: Optional[IAudioSpeech]andsettings: Optional[ISettings]toIAudioInference. - Added
languageBoost: Optional[str]andturbo: Optional[bool]toISettings. - Added
edit,color,lightDirection,lightType,season(allOptional[str]) toIBriaProviderSettings.
- Added
IKlingMultiPrompt: new dataclass withprompt: strandduration: floatfor Kling multiPrompt payloads.
fileToBase64(): allowapplication/octet-streamas MIME type for.glband.plyfiles when MIME cannot be guessed.- Recursive serialization in
SerializableMixin.serialize(): replaced flatasdict+ None filter with a recursive implementation that:- Skips
Noneand keys starting with_ - Recursively serializes nested
SerializableMixininstances - Serializes lists/tuples of
SerializableMixinas lists of dicts (e.g. formultiPromptand other list payloads).
- Skips
- Added
ISparseStructure,IShapeSlat,ITexSlat(guidanceStrength, guidanceRescale, steps, rescaleT). - Added
I3dInference.settings: Optional[ISettings]andoutputQuality: Optional[int]. - Added
I3dInputs.meshFile: Optional[Union[str, File]].
- Extended
ISettingswith 3D fields: textureSize, decimationTarget, remesh, resolution, sparseStructure, shapeSlat, texSlat.
- Added support for textInference task type (TEXT_INFERENCE in ETaskType enum)
- Added
ITextInferenceMessagewith role and content for chat messages - Added
ITextInferenceUsagefor token usage (promptTokens, completionTokens, totalTokens, thinkingTokens) - Added
IGoogleTextProviderSettingswith thinkingLevel for Gemini - Added
TextProviderSettingstype alias for text inference provider settings - Added
ITextInferencefor requests (model, messages, taskUUID, deliveryMethod, maxTokens, temperature, topP, topK, seed, stopSequences, includeCost, providerSettings) - Added
ITextfor responses (taskType, taskUUID, text, finishReason, usage, cost, status) - Added
textInference()to Runware - Added
_buildTextRequest,_requestText,_handleInitialTextResponsein base - Added
_addTextProviderSettingsfor provider settings (matching image/video/audio pattern) - Added
getResponse()support forList[IText]when polling textInference tasks - Added
TEXT_INITIAL_TIMEOUTfor async delivery (configurable via RUNWARE_TEXT_INITIAL_TIMEOUT) - Added
TEXT_POLLING_DELAYfor polling cadence (configurable via RUNWARE_TEXT_POLLING_DELAY) - Added
IVideoInference.scheduler: Optional[str] = None
- Enabled async delivery for text inference (returns IAsyncTaskResponse and uses getResponse() for polling)
- Added support for "3dInference" task type
- Added
I3dInputsdataclass with image and mask parameters for 3D inference inputs - Added
I3dOutputFormattype: Literal["GLB", "PLY"] - Added
I3dInferencedataclass for 3D inference requests (model, positivePrompt, seed, inputs, outputFormat, etc.) - Added
IObjectdataclass with uuid and url for 3D output files - Added
I3dOutputdataclass withfiles: Optional[List[IObject]] = Nonefor 3D output files in responses - Added
I3ddataclass for 3D inference responses (taskType, taskUUID, cost, status, seed, outputs) - Added
inference3d()method to Runware for 3D inference - Added
getResponse()support forList[I3d]when polling 3dInference tasks - Added
_handleInitial3dResponse,_process3dInputs,_build3dRequest,_request3din base - Added
IUltralyticsdataclass with the following parameters:maskBlur: Optional[int]maskPadding: Optional[int]confidence: Optional[float]positivePrompt: Optional[str]negativePrompt: Optional[str]steps: Optional[int]CFGScale: Optional[float]strength: Optional[float]
- Added
IImageInference.ultralytics: Optional[IUltralytics] - Added
quality: Optional[str] = NonetoISettings - Added
audio: Optional[bool] = NonetoIViduProviderSettings
- Split
IOutputinto media-specific output types:IOutput(video: draftId, videoId) andI3dOutput(3D: files)
- Added
IOutputdataclass with the following parameters:draftId: Optional[str] = NonevideoId: Optional[str] = None
- Added
IVideo.outputs: Optional[IOutput] = Noneto support draft ID in video responses - Added
IVideoInputs.draftId: Optional[str] = Nonefor passing draft task ID in video inference inputs for bytedance:seedance@1.5-pro - Added
IVideoInputs.videoId: Optional[str] = Nonefor passing video ID in video inference inputs for openai:3@1 - Added
IBytedanceProviderSettings.draft: Optional[bool] = Noneto enable draft mode for Seedance video generation - Added
IInputs.mask: Optional[Union[str, File]] = None - Added
ISourcefulProviderSettingswith the following parameters:transparency: Optional[bool] = NoneenhancePrompt: Optional[bool] = NonefontInputs: Optional[List[Dict[str, Any]]] = None
- Added
IInputs.superResolutionReferences: Optional[List[Union[str, File]]] = Nonefor super resolution guidance in image-to-image inference
- Enhanced
instantiateDataclass()function to automatically handle nested dataclasses
- Updated
IBriaProviderSettings.preserveAudiodefault fromOptional[bool] = TruetoNone - Updated
IBriaProviderSettings.autoTrimdefault fromOptional[bool] = FalsetoNone
- Added
taskUUIDattribute toIUploadModelBaseTypeto allow passingtaskUUIDfrom user inmodelUpload()method
- Added
_retry_with_reconnect()method that wraps all public API methods for automatic reconnection on authentication errors (up to 10 retries) - Added
MAX_RETRY_ATTEMPTSconstant inrunware/utils.pyfor retry mechanism configuration - Added
IMireloProviderSettingswithstartOffset: Optional[int] = Noneparameter - Added
ISettings.layers: Optional[int] = Noneparameter - Added
ISettings.trueCFGScale: Optional[float] = Noneparameter - Added
IAudio.videoUUID: Optional[str] = Nonefield - Added
IAudio.videoURL: Optional[str] = Nonefield - Added
IAudio.seed: Optional[int] = Nonefield
- Fixed duplicate heartbeat tasks by cancelling existing task before creating new one in
runware/server.py - Fixed connection loss detection during request waits with session UUID tracking
- Fixed
conflictTaskUUIDerror handling to extracttaskTypeanddeliveryMethodfrom error context instead of relying on global message state
- Refactored retry logic: Removed redundant
asyncRetrycalls from 9 methods and them wrapped with_retry_with_reconnect
- Added
MODEL_UPLOAD_TIMEOUTconstant inrunware/utils.pywith 15-minute default (900000ms) for large model uploads - Added
RUNWARE_MODEL_UPLOAD_TIMEOUTenvironment variable support for configuring model upload timeout
- Updated
_modelUpload()inrunware/base.pyto useMODEL_UPLOAD_TIMEOUTinstead of general timeout to prevent timeouts during large LoRA model uploads
- Added
IWanAnimatedataclass with the following parameters:mode: Optional[str] = NoneretargetPose: Optional[bool] = NoneprevSegCondFrames: Optional[int] = None
- Added
VideoAdvancedFeatureTypesunion type:VideoAdvancedFeatureTypes = IWanAnimate - Updated
IVideoAdvancedFeaturesto supportadvancedFeature: Optional[VideoAdvancedFeatureTypes] = Nonefor incorporating WanAnimate features - Added
IVideoInputs.referenceVoices: Optional[List[str]] = None - Added
IKlingAIProviderSettings.characterOrientation: Optional[str] = None
- Fixed NoneType error when initial requests timeout by returning
IAsyncTaskResponseobject instead of processing None values - Added error handling in
_handleInitialVideoResponse,_handleInitialImageResponse, and_handleInitialAudioResponseto handle empty/None initial responses - Added validation in
instantiateDataclassList()method to raise descriptive error whendata_listis None or empty - Improved error messages for timeout scenarios with detailed context including TaskUUID and delivery method
- Refactored serialization: Removed
BaseRequestFieldclass and movedto_request_dict()method toSerializableMixin - Updated multiple dataclasses to inherit from
SerializableMixininstead ofBaseRequestField:IAcceleratorOptionsISafetyISettingsIInputsIVideoInputsIAudioSettingsIVideoSpeechSettingsIAudioInputs
- Updated
IVideoAdvancedFeatures.serialize()method to properly handleadvancedFeatureserialization usingto_request_dict()
- Added
audioparameter toIBytedanceProviderSettings(providerSettings.bytedance.audio) - Added new parameters to
IBriaProviderSettings:preserveAudioautoTrim
- Added
IBriaMaskSettingswith the following parameters:foregroundpromptframeIndexkeyPoints
- Added validation in
_pollResults(): ifnumber_resultsis None, thennumber_results = 1
- Added
IBlackForestLabsProviderSettingswithsafetyToleranceparameter - Added new
ISettingsclass with the following parameters:temperaturesystemPrompttopP
- Added
searchparameter toIGoogleProviderSettings - Added new parameters to
IAlibabaProviderSettings:promptExtendaudioshotType
- Updated
IInputs.referencesdefault value fromfield(default_factory=list)toNone - Updated
IVideoInputs.referencesdefault value fromfield(default_factory=list)toNone
- Added provider setting for Alibaba:
alibaba.promptEnhancer - Added
IAudioInputandISpeechInputtoIVideoInputsfor video inference - Added
ISyncProviderSettingsto video inference - Added
soundparameter toIKlingAIProviderSettings(providerSetting.Kling.sound)
- Updated
referenceImagestype fromOptional[List[IInputReference]]toOptional[List[Union[str, File, IInputReference]]]inIInputs - Renamed
IPixverseSpeechSettingstoIVideoSpeechSettingswith backward compatibility - Made
numberResultsoptional invideoInference