Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
from .base import *
from .logging_config import *
from .async_retry import *
from .version import __version__

__all__ = ["Runware"]
__version__ = "0.4.33"
7 changes: 6 additions & 1 deletion runware/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Environment,
ListenerType,
)
from .version import __version__

class RunwareServer(RunwareBase):
def __init__(
Expand All @@ -47,13 +48,17 @@ def __init__(
self._retry_delay: int = retry_delay
self._heartbeat_task: Optional[asyncio.Task] = None
self._tasks: Dict[str, asyncio.Task] = {}
self._additional_headers: Dict[str, str] = {
"X-SDK-Type": "python",
"X-SDK-Version": __version__
Copy link
Contributor

Choose a reason for hiding this comment

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

str(__version__) or f"{__version__}"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is already a str in runware/version.py

}

async def connect(self):
self.logger.info("Connecting to Runware server from server")
self._last_pong_time = time.perf_counter()

try:
self._ws = await websockets.connect(self._url)
self._ws = await websockets.connect(self._url, additional_headers=self._additional_headers)
self._ws.close_timeout = 1
self._ws.max_size = None
self.logger.info(f"Connected to WebSocket URL: {self._url}")
Expand Down
9 changes: 9 additions & 0 deletions runware/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,15 @@ class IVideoInference:
inputs: Optional[IVideoInputs] = None
skipResponse: Optional[bool] = False

def __post_init__(self):
if self.skipResponse:
warnings.warn(
"The 'skipResponse' parameter is deprecated and will be removed in a future release. "
"Use 'getResponse(taskUUID=taskUUID)' instead to retrieve results asynchronously.",
DeprecationWarning,
stacklevel=3
)


@dataclass
class IAudioInputs(BaseRequestField):
Expand Down
2 changes: 2 additions & 0 deletions runware/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version__ = "0.4.33"
Copy link
Contributor

@teith teith Dec 2, 2025

Choose a reason for hiding this comment

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

why can't we keep it in __init__.py?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It kept crashing due to circular imports!


4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
version="0.4.33",
author="Runware Inc.",
author_email="python.sdk@runware.ai",
description="The Python Runware SDK is used to run image inference with the Runware API, powered by the Runware inference platform. It can be used to generate images with text-to-image and image-to-image. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports upscaling, background removal, inpainting and outpainting, and a series of other ControlNet models.",
description="The Python Runware SDK is used to interact with the Runware API, powered by the Runware inference platform. It supports image generation, video generation, image upscale, video upscale, image caption, video caption, image background removal, video background removal, audio generation, and more. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports inpainting, outpainting, and a series of other ControlNet models.",
long_description=long_description,
long_description_content_type="text/markdown",
keywords=["Runware", "stable diffusion", "text to image", "image to text"],
keywords=["Runware", "stable diffusion", "text to image", "image to text", "text to video", "image to video", "video generation", "text to audio", "audio generation", "image upscale", "video upscale", "background removal"],
url="https://github.com/runware/sdk-python",
project_urls={
"Documentation": "https://docs.runware.ai/",
Expand Down