Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
762da54
Add public demo application contracts
jarcherNV Aug 13, 2026
991b66e
Fix linter issues
jarcherNV Aug 13, 2026
72afb61
Add public demo Runner facade
jarcherNV Aug 13, 2026
04a450d
Fix public demo application lifecycle
jarcherNV Aug 13, 2026
cd7f35d
Add public demo IO handler factories
jarcherNV Aug 13, 2026
d118f9e
Adopt public demo Runner in app launch path
jarcherNV Aug 13, 2026
433fd03
Ensure public demo Runner always closes applications
jarcherNV Aug 13, 2026
3b56a0f
Fix public demo cleanup type-check issues
jarcherNV Aug 13, 2026
9bea150
Preserve runner failures during cleanup
jarcherNV Aug 13, 2026
e477546
Unify demo session stop conditions
jarcherNV Aug 13, 2026
baf8578
Harden public demo runner cleanup
jarcherNV Aug 13, 2026
fadac4c
Add named pull input state API
jarcherNV Aug 13, 2026
0ad73e5
Shield async public runner cleanup
jarcherNV Aug 13, 2026
485a9bd
Add output comparison sink
jarcherNV Aug 13, 2026
865f2fa
Preserve runner BaseException failures during cleanup
jarcherNV Aug 13, 2026
d66a8b5
Simplify demo application discovery
jarcherNV Aug 13, 2026
6247dd7
Propagate replay schemas through demo runner
jarcherNV Aug 13, 2026
c6c2dd4
Migrate T2V replay to public demo runner
jarcherNV Aug 13, 2026
a85048c
Extract neutral T2V demo shell
jarcherNV Aug 13, 2026
c571b86
Add integration-owned T2V app entries
jarcherNV Aug 13, 2026
1df1e7e
Remove duplicated T2V demo preset registry
jarcherNV Aug 13, 2026
aa69c9b
Fix public runner cleanup edge cases
jarcherNV Aug 13, 2026
571dd02
Move T2V replay launch into shared demo helper
jarcherNV Aug 13, 2026
c2916fa
Close public apps from RuntimeHost shutdown
jarcherNV Aug 13, 2026
9d7f108
Launch public apps directly from flashdreams-run
jarcherNV Aug 13, 2026
b9e80ab
Add direct WebRTC launch for public T2V apps
jarcherNV Aug 13, 2026
223bf4b
Clean up direct WebRTC app startup failures
jarcherNV Aug 13, 2026
83449e6
Add wan21 and wan22 T2V apps with usage README
jarcherNV Aug 13, 2026
a1c0764
Close apps when external runtime host is already closed
jarcherNV Aug 13, 2026
2e13082
Harden WebRTC manager shutdown cleanup
jarcherNV Aug 13, 2026
36a2a5c
Avoid off-worker app cleanup after closed host
jarcherNV Aug 13, 2026
5b11641
Document external host cleanup contract
jarcherNV Aug 13, 2026
cd3e361
Clean up WebRTC distributed state on startup failure
jarcherNV Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion apps/t2v_demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from aiohttp import web

from flashdreams.demo import Application, DemoAdapterApplication
from flashdreams.runtime import InferenceConfig
from flashdreams.runtime.demo import (
DemoSpec,
Expand Down Expand Up @@ -195,6 +196,28 @@ def launch_t2v(
)


def create_app(config: "T2VDemoRunnerConfig | None" = None) -> Application:
"""Create the default public T2V application without CLI parsing."""
from .runner import RUNNER_T2V

config = RUNNER_T2V if config is None else config
adapter = make_adapter(config.backend)
scenario = _scenario(config, {})
return DemoAdapterApplication(
adapter=adapter,
spec=_spec(
config,
adapter=adapter,
scenario=scenario,
input_mode="replay",
output=NullOutputSpec(),
),
)


createApp = create_app


def _scenario(
config: "T2VDemoRunnerConfig", overrides: dict[str, object]
) -> dict[str, object]:
Expand Down Expand Up @@ -342,4 +365,4 @@ async def playback(_: web.Request) -> web.StreamResponse:
app.router.add_get("/api/t2v/playback", playback)


__all__ = ["T2VWebRTCSessionManager", "launch_t2v"]
__all__ = ["T2VWebRTCSessionManager", "createApp", "create_app", "launch_t2v"]
3 changes: 3 additions & 0 deletions apps/t2v_demo/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ dependencies = ["flashdreams[serving]"]
[project.entry-points."flashdreams.runner_configs"]
t2v = "t2v_demo.runner:RUNNER_T2V"

[project.entry-points."flashdreams.applications"]
t2v = "t2v_demo.app:create_app"

[tool.uv.sources]
flashdreams = { workspace = true }

Expand Down
29 changes: 29 additions & 0 deletions apps/t2v_demo/tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@

from __future__ import annotations

from pathlib import Path

import pytest
import tomli
from t2v_demo import app
from t2v_demo.runner import RUNNER_T2V, T2VDemoRunnerConfig

from flashdreams.demo import Application

pytestmark = pytest.mark.ci_cpu


Expand All @@ -15,6 +20,30 @@ def test_t2v_runner_slug_has_launch_capability() -> None:
assert RUNNER_T2V.launch_capability == "t2v_demo.launch:LAUNCH_CAPABILITY"


def test_t2v_registers_application_entry_point() -> None:
pyproject_path = Path(__file__).parents[1] / "pyproject.toml"
pyproject = tomli.loads(pyproject_path.read_text())

assert pyproject["project"]["entry-points"]["flashdreams.applications"] == {
"t2v": "t2v_demo.app:create_app"
}


def test_t2v_create_app_exposes_public_application() -> None:
public_app = app.create_app(
T2VDemoRunnerConfig(
runner_name="t2v-test",
description="test",
backend="self-forcing",
prompt="A waterfall",
total_blocks=3,
)
)

assert app.createApp is app.create_app
assert isinstance(public_app, Application)


def test_runner_mp4_launch_uses_demo_entrypoint(
monkeypatch: pytest.MonkeyPatch,
) -> None:
Expand Down
Loading
Loading