Source: Dreamverse repo at will/integrate-public-fastvideo @ ec8ef92.\n\nCarry the generic-merged backend modules as Dreamverse product-local code because the public streaming APIs are not drop-in compatible with the product runtime yet. Revert the Phase 2 public compatibility shims so FastVideo's public streaming surface returns to the pre-migration state.\n\nCo-authored-by: Junda (David) Su <90978028+Davids048@users.noreply.github.com>\nCo-authored-by: Matthew Noto <99706358+RandNMR73@users.noreply.github.com>\nCo-authored-by: XOR-op <17672363+XOR-op@users.noreply.github.com>\nCo-authored-by: Zhang Peiyuan <42993249+jzhang38@users.noreply.github.com>
23 lines
833 B
Python
23 lines
833 B
Python
"""Runtime service singletons.
|
|
|
|
Assigned by ``main.lifespan`` at server startup and read by routes and the
|
|
session controller via attribute access (``runtime.gpu_pool``). Do NOT import
|
|
these names directly (``from runtime import gpu_pool``) — ``from``-import
|
|
copies the current binding, freezing it at ``None`` before lifespan runs.
|
|
"""
|
|
# pyright: reportMissingImports=false
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from gpu_pool import GPUPool
|
|
from session_logger import SessionEventLogger
|
|
from prompt_enhancer import PromptEnhancer
|
|
from prompt_safety import PromptSafetyFilter
|
|
|
|
gpu_pool: GPUPool | None = None
|
|
prompt_enhancer: PromptEnhancer | None = None
|
|
session_event_logger: SessionEventLogger | None = None
|
|
prompt_safety_filter: PromptSafetyFilter | None = None
|