Skip to content

v1.3.5

Latest

Choose a tag to compare

@PawelPeczek-Roboflow PawelPeczek-Roboflow released this 10 Jul 19:49
5d4df41

πŸš€ 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, #2622):

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, #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, #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, #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 #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, 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, #2530, with text-assembly refinements in #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, #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 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, #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, #2614).
  • SDK β€” WebRTC frame/prediction pairing tolerates pts jitter (@Erol444, #2640) β€” frames and predictions no longer desynchronise when presentation timestamps wobble.

🚧 Maintenance


Full Changelog: v1.3.4...v1.3.5