v1.3.5
sherlock-project/sherlockv1.3.5Jul 10, 2026by PawelPeczek-Roboflow
AI Summary
This release introduces WebRTC streaming capabilities for models without requiring Workflow JSON, adds an opt-in CUDA memory reclamation watchdog, and fixes a critical SSRF security vulnerability.
Key Highlights
- WebRTC stream API now accepts a plain model_id, eliminating the need for hand-written Workflow JSON.
- New opt-in CUDA memory reclamation watchdog to manage VRAM high-water marks on long-running servers.
- Vision Events block now includes a built-in rate limiter with a cooldown_seconds parameter.
- Initial support for PaddlePaddle's PP-OCRv6 text detection and recognition models.
- Faster custom Python blocks on Modal via WebSocket + msgpack transport.
Breaking Changes
- Vision Events block defaults cooldown_seconds to 1, which changes behavior for existing high-frequency deployments. Set to 0 to restore unthrottled emission.
New Features
- WebRTC streaming API (client.webrtc.stream())
- Flexible VideoFileSource accepting HTTP/HTTPS URLs
- CUDA memory reclamation watchdog
- PP-OCRv6 detection and recognition models
- Vision Events rate limiter
Full Release Notes
# ๐ Added
## ๐น SDK โ stream a model over WebRTC without writing a Workflow
`client.webrtc.stream()` now accepts a plain `model_id`, so getting live predictions over WebRTC no longer requires hand-writing a Workflow JSON (@Erol444, https://github.com/roboflow/inference/pull/2622):
```python
session = client.webrtc.stream(
source=VideoFileSource("cars.mp4"),
model_id="rfdetr-nano",
)
@session.on_frame
def show(frame, data):
detections = sv.Detections.from_inference(data)
...
```
And the video source itself got more flexible โ `VideoFileSource` accepts http(s) URLs alongside local paths (@Erol444, https://github.com/roboflow/inference/pull/2626). Remote files are downloaded off the event loop and cached under `~/.cache/inference-sdk/videos` (override with `INFERENCE_SDK_VIDEO_CACHE_DIR`; download timeout via `INFERENCE_SDK_VIDEO_DOWNLOAD_TIMEOUT`). Downloads land atomically, so an interrupted transfer never poisons the cache โ and `use_cache=False` gives you a session-scoped temp file instead.
## ๐งน CUDA memory reclamation watchdog (opt-in)
Under `USE_INFERENCE_MODELS=True`, PyTorch's CUDA caching allocator keeps freed device blocks in its own pool and never returns them to the driver on its own โ so on a long-running server the VRAM high-water mark of concurrent/batched load is sticky and only ever grows. A new opt-in background daemon periodically returns cached-but-unused CUDA memory via `torch.cuda.empty_cache()`, leaving live allocations untouched (@PawelPeczek-Roboflow, https://github.com/roboflow/inference/pull/2635):
- `ENABLE_CUDA_MEMORY_RECLAMATION_WATCHDOG=True` to enable (default `False`)
- `CUDA_MEMORY_RECLAMATION_WATCHDOG_INTERVAL_SECONDS` to tune the cycle (default `300`, min `5`)
Note the scope: it relieves the *sticky high-water mark* accumulated across sequential requests; it does not prevent an OOM caused by a genuinely oversubscribed concurrent peak.
## โก Faster custom Python blocks on Modal
Modal-backed custom Python block execution ("webexec") switches to a **WebSocket + msgpack** transport by default (@rafel-roboflow, https://github.com/roboflow/inference/pull/2618): binary frames instead of JSON POSTs with base64-encoded images, one persistent connection per workspace with keepalive, and user code shipped only on the first execution โ subsequent calls send a `code_hash` so the Modal container reuses its compiled namespace. The HTTP path got optimizations too, and remains available via `WEBEXEC_TRANSPORT`.
## ๐ฅ Workflow block improvements
- **Vision Events โ built-in rate limiter** (ENT-1438) โ by @rvirani1 in https://github.com/roboflow/inference/pull/2624. Vision Events emits an event per workflow execution, so live streams were unintentionally uploading multiple frames per second. The block now has a `cooldown_seconds` field following the same cooldown pattern as the webhook/email/Slack/Twilio sinks โ int, float (sub-second rates like `0.5`), or a selector.
> [!NOTE]
> `cooldown_seconds` **defaults to 1** (at most one event per second), which changes behavior for existing high-frequency deployments. Set it to `0` to restore unthrottled emission where that's intentional.
## ๐ค PP-OCRv6 โ early support
This release also brings initial support for [PP-OCRv6](https://github.com/PaddlePaddle/PaddleOCR), PaddlePaddle's ultra-lightweight OCR system: text detection (`pp-ocrv6-det`) and text recognition (`pp-ocrv6-rec`) models, plus a `pp-ocrv6` pipeline chaining both stages into end-to-end OCR (@Erol444, https://github.com/roboflow/inference/pull/2530, with text-assembly refinements in https://github.com/roboflow/inference/pull/2639). Treat this as an early integration โ we are still polishing the rough edges, so expect improvements in upcoming releases before relying on it in production.
# ๐ Security โ SSRF fix in URL image loading, please upgrade
This release fixes **GHSA-hjmm-hr52-vrp2** (@PawelPeczek-Roboflow, https://github.com/roboflow/inference/pull/2546). Image loading from caller-supplied URLs previously validated only the hostname string โ it never resolved the host, and it followed redirects without re-validating each hop. An attacker could make the server (or SDK) fetch internal resources: cloud metadata endpoints (`169.254.169.254`), loopback services, and private/link-local hosts โ directly, via a hostname resolving to a private IP, via a redirect, or via DNS rebinding.
The fix adds resolved-IP validation with connection pinning to the validated address and per-hop redirect re-validation.
> [!IMPORTANT]
> If your deployment accepts image URLs from untrusted callers โ especially on cloud instances with a metadata service โ upgrade to this release. And as always: review the hardening guide at **[inference.roboflow.com/install/security](https://inference.roboflow.com/install/security/)** if your server is reachable beyond a single developer machine.
# ๐ง Fixed
* **Phantom predictions from ONNX models under GPU load** โ onnxruntime models now get a default stream synchronisation point (@PawelPeczek-Roboflow, https://github.com/roboflow/inference/pull/2627). Without it, the ONNX session could consume input tensors before the CUDA stream that pre-processed them finished writing (onnxruntime's own input synchronisation is a no-op under the TensorRT execution provider), which surfaced as corrupted or "phantom" detections โ most visibly on Jetson devices.
* **37 small, independent fixes** rolled up from an in-depth engineering review of the codebase โ each one self-contained and narrowly scoped (@PawelPeczek-Roboflow, https://github.com/roboflow/inference/pull/2614).
* **SDK โ WebRTC frame/prediction pairing tolerates pts jitter** (@Erol444, https://github.com/roboflow/inference/pull/2640) โ frames and predictions no longer desynchronise when presentation timestamps wobble.
# ๐ง Maintenance
* Bump `inference-models` to `~=0.30.1` by @Erol444 in https://github.com/roboflow/inference/pull/2641.
* Modal executor operability: deploy webexec straight from the inference Docker image (@grzegorz-roboflow, https://github.com/roboflow/inference/pull/2615), per-`PROJECT` Modal environments enabling staging tests (@grzegorz-roboflow, https://github.com/roboflow/inference/pull/2630), and integration-test fixes (@grzegorz-roboflow, https://github.com/roboflow/inference/pull/2632).
* Developer tooling: introductory profiling toolkit + snippet-extraction skill under `development/profiling` (@dkosowski87, https://github.com/roboflow/inference/pull/2549) and basic code rules for the repo (@dkosowski87, https://github.com/roboflow/inference/pull/2617).
* CI: `skip-claude-review` opt-out label and draft-PR review notice (https://github.com/roboflow/inference/pull/2613), credit-usage warning in the notice (https://github.com/roboflow/inference/pull/2619), and consolidation into one state-aware workflow (https://github.com/roboflow/inference/pull/2621) โ all by @PawelPeczek-Roboflow.
* Test hygiene: fixed a flaky unit test (https://github.com/roboflow/inference/pull/2628) and a dedicated API key for DeepLabV3+ workflow tests (@grzegorz-roboflow, https://github.com/roboflow/inference/pull/2629).
* GPU image apt cleanup was attempted (https://github.com/roboflow/inference/pull/2633) and reverted (https://github.com/roboflow/inference/pull/2644) โ no net change in shipped images.
---
**Full Changelog**: https://github.com/roboflow/inference/compare/v1.3.4...v1.3.5