Skip to content

Share demo WebRTC plumbing across models (#424) - #426

Closed
jarcherNV wants to merge 7 commits into
dev/jarcher/inference-runtime-apifrom
dev/jarcher/webrtc-share
Closed

Share demo WebRTC plumbing across models (#424)#426
jarcherNV wants to merge 7 commits into
dev/jarcher/inference-runtime-apifrom
dev/jarcher/webrtc-share

Conversation

@jarcherNV

Copy link
Copy Markdown
Collaborator

Create a follow-up branch to consolidate the demo WebRTC path so OmniDreams and LingBot can use the same shared server/session construction, with model-specific behavior supplied through small adapter hooks. Cherry-pick the NVENC probing fix needed before refactoring the WebRTC stack.

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR consolidates OmniDreams WebRTC application and session construction into shared runtime-demo plumbing while retaining model-specific behavior through adapter hooks, and it restores the active PyTorch CUDA device after hardware-encoder probing.

  • Adds shared WebRTC manager options, application extensions, routes, and pending-session-input helpers.
  • Moves the OmniDreams live runtime into the demo package and adapts it to the shared manager.
  • Preserves LingBot behavior while tightening runtime output-layout validation and related typing.
  • Adds coverage for shared route construction, manager hooks, pending input, and CUDA-device restoration.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the follow-up review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
flashdreams/flashdreams/runtime/demo/webrtc.py Introduces shared WebRTC manager options, route helpers, application extensions, and adapter-driven session lifecycle hooks without an eligible blocking defect.
integrations/omnidreams/omnidreams/demo/live_runtime.py Extracts the OmniDreams live runtime into the shared-demo package while preserving its model, distributed, scene, postprocessing, and encoder lifecycle.
integrations/omnidreams/omnidreams/demo/webrtc.py Replaces the model-specific manager and app builder with declarative shared-manager options and route hooks.
flashdreams/flashdreams/serving/webrtc/encoders.py Restores the previously active PyTorch CUDA device after NVENC capability probing.
integrations/lingbot/lingbot/runtime.py Adds explicit validation and narrowing for configured video tensor layouts.

Sequence Diagram

sequenceDiagram
  participant Browser
  participant App as Shared WebRTC App
  participant Manager as Shared Session Manager
  participant Hooks as Model Adapter Hooks
  participant Runtime as Model Runtime
  Browser->>App: WebRTC offer / session input
  App->>Manager: Dispatch request
  Manager->>Hooks: Read and validate pending input
  Manager->>Runtime: Reset for session
  Runtime-->>Manager: Generate video chunks
  Manager-->>Browser: WebRTC video and telemetry
Loading

Reviews (7): Last reviewed commit: "Document demo and runtime API boundaries" | Re-trigger Greptile

Introduce experimental WebRTC app-extension and manager-options shapes so demo
adapters can provide static browser resources, model routes, supported controls,
session-input hooks, reset behavior, and chunk metadata without owning a full
WebRTC server wrapper. Keep the existing adapter hooks compatible and add
fake-model coverage for the new shared path.
Replace the OmniDreams demo-specific WebRTC manager and app wrapper with shared
WebRTC manager options and app-extension hooks. Keep OmniDreams-owned
postprocess routes and session-input parsing in the demo layer while preserving
the shared manager/app construction path.
Add experimental shared WebRTC route descriptors and pending session input
storage under flashdreams.runtime.demo.

Move the OmniDreams demo WebRTC route wiring onto those shared helpers while
keeping model-specific postprocess parsing and validation in the demo.

Add focused fake-model coverage for shared route registration, JSON payload
hooks, pending input storage, and session-input error mapping.
Add an additive OmniDreams demo live runtime module for the new shared demo
path, leaving legacy omnidreams.webrtc modules unchanged.

Update the new OmniDreams demo adapter, scenario spec, and WebRTC hooks to use
the demo-owned runtime/config/session-input types instead of importing from the
legacy WebRTC session module.

Add a focused guard test so omnidreams.demo files do not depend on
omnidreams.webrtc.session.
Add module-level descriptions across the experimental runtime and shared demo
API files to clarify each file's ownership boundary.

Document the OmniDreams demo files, including the demo-owned live runtime, so
the split between model-specific generation logic and shared WebRTC
serving/session code is clear.

Update the OmniDreams demo README wording to describe the shared WebRTC launcher
and session manager path.
@jarcherNV

Copy link
Copy Markdown
Collaborator Author

Closing this PR as this work is no longer needed.

@jarcherNV jarcherNV closed this Aug 7, 2026
@jarcherNV
jarcherNV deleted the dev/jarcher/webrtc-share branch August 7, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants