Metadata-Version: 2.4
Name: studio-workers
Version: 1.4.0
Summary: Studio workflow job workers
Author: Kawika Ohumukini
License-Expression: LicenseRef-Studio-Use-License
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.28.1
Requires-Dist: psutil>=5.9.0
Requires-Dist: jsonpath-ng>=1.6.0
Requires-Dist: Pillow>=10.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: mutagen>=1.47.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Provides-Extra: audio
Requires-Dist: chatterbox-tts; extra == "audio"
Requires-Dist: torch; extra == "audio"
Requires-Dist: soundfile; extra == "audio"
Requires-Dist: setuptools<81,>=78.1.1; extra == "audio"
Provides-Extra: comfyui
Requires-Dist: websocket-client>=1.6.0; extra == "comfyui"
Provides-Extra: video
Requires-Dist: openai-whisper>=20231117; extra == "video"
Requires-Dist: faster-whisper>=1.0.0; extra == "video"
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
Requires-Dist: pytest-httpx>=0.30.0; extra == "test"
Requires-Dist: pytest-xdist>=3.0.0; extra == "test"
Requires-Dist: respx>=0.21.0; extra == "test"
Requires-Dist: freezegun>=1.2.0; extra == "test"
Requires-Dist: pyright>=1.1.405; extra == "test"
Requires-Dist: flake8>=7.1.1; extra == "test"
Requires-Dist: python-dotenv>=1.2.2; extra == "test"
Dynamic: license-file

# studio-workers

Native (no-Docker) workers for [SelfHostHub Studio](https://www.skool.com/selfhosthub). Run any Studio worker engine directly on the host, pointed at your Studio API. This is the supported path for GPU work on Apple Silicon, where Docker cannot reach the Mac GPU, and for installing workers on demand inside a single GPU pod.

## Install

Pick the extra for the engine you want to run:

```bash
pip install "studio-workers[audio]"    # TTS (Chatterbox, torch)
pip install "studio-workers[video]"    # transcription and video (whisper)
pip install "studio-workers[comfyui]"  # ComfyUI bridge
pip install "studio-workers"           # general + transfer (CPU only)
```

The `[audio]` extra currently requires Python 3.12: its Chatterbox dependency chain does not yet resolve on 3.13 (the install fails with an `llvmlite` build error). The other extras run on 3.12+.

## Version pinning

Install the `studio-workers` version that matches your Studio release; the release notes name it. The API checks the worker version at registration and refuses a mismatch.

## Check the install

```bash
studio-workers doctor --engine audio
```

`doctor` fails loudly when a GPU host would silently run on CPU: it asserts torch sees MPS on Apple Silicon and CUDA when an NVIDIA driver is present.

## Run

```bash
SHS_API_BASE_URL=https://your-studio-api \
SHS_PUBLIC_BASE_URL=https://your-studio \
SHS_WORKER_SHARED_SECRET=... \
SHS_WORKSPACE_ROOT=/path/to/workspace \
studio-workers run --type audio
```

(`python -m studio_workers.worker` with `SHS_WORKER_TYPE` set still works; `run` is the same loop.)

The worker polls the API for jobs over HTTP; no inbound port is required. See your Studio instance's worker access documentation for the sanctioned connection paths.

## Third-party software

Installing an engine extra pulls third-party packages (torch, Chatterbox TTS, whisper, ComfyUI dependencies) from their own upstreams under their own licenses; model weights download on first run.
