Skip to content

Commit a80c368

Browse files
Davids048SolitaryThinkerRandNMR73XOR-opjzhang38
committed
[docs] Add Dreamverse integration provenance
Apply Dreamverse monorepo changes for stack slice 1/13 from the source branch. Source-Branch: will/dreamverse-monorepo Source-SHA: 03d3e61 Dreamverse-Stack: 1/13 Co-authored-by: SolitaryThinker <wlsaidhi@gmail.com> Co-authored-by: Matthew Noto <99706358+RandNMR73@users.noreply.github.com> Co-authored-by: XOR-op <17672363+XOR-op@users.noreply.github.com> Co-authored-by: Zhang Peiyuan <42993249+jzhang38@users.noreply.github.com>
1 parent 636d3b7 commit a80c368

33 files changed

Lines changed: 10822 additions & 339 deletions

.agents/STATUS.md

Lines changed: 0 additions & 94 deletions
This file was deleted.
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# Dreamverse Integration — Memory Index
2+
3+
Living knowledge base for the FastVideo ↔ Dreamverse ↔ Dynamo integration.
4+
Tracks the public API refactor (PRs 0-17), the LTX-2 streaming server
5+
upstream, the Dreamverse switch from `FastVideo-internal` to public
6+
`FastVideo`, and the NVFP4 quantization landing.
7+
8+
**Last reconciled:** 2026-05-06 (**D-26** EXECUTED — rebased
9+
`will/dreamverse-monorepo` directly onto `origin/main` (`c17d33bf`)
10+
via `git rebase origin/main`; 66 commits cleanly replayed; force-
11+
pushed via `--force-with-lease`. New tip `83829c5e`. Local backup
12+
branch `will/dreamverse-monorepo-pre-main-rebase-backup-20260506`
13+
preserved at the pre-rebase tip `2ee839a3`. PR #1288 on
14+
`will/ltx2_sr_port` is untouched. The branch is now ready to open
15+
as a single PR against main.
16+
17+
**Earlier — D-21** EXECUTED — chunk-stutter root cause
18+
analysis + NVENC build path + opt-in `--nvenc` flag + benchmark regression
19+
test. 3 parallel explore agents confirmed apps/dreamverse matches
20+
FastVideo-internal byte-for-byte on NVFP4 + torch.compile coverage; stutter
21+
is NOT a regression. Software libx264 encoding consumes ~22% of segment
22+
wall-time. Built ffmpeg with NVENC support; B200 silicon doesn't have NVENC
23+
encoder hardware so the path is currently moot on this dev host but works
24+
on RTX 50-series / T4 / A10 deploys. Benchmark captured libx264 ultrafast
25+
at 611ms median (8.25x realtime in isolation). Open follow-ups D-22/D-23/D-24.
26+
27+
**Earlier — D-20** EXECUTED — segment-2 BrokenPipe
28+
root cause was a TWO-direction silent drop of LTX-2 audio kwargs in
29+
public `VideoGenerator` (inbound `SamplingParam.update()` rejected
30+
`audio_num_frames`/`ltx2_audio_clean_latent`/etc. as unknown fields and
31+
`logger.error`'d, outbound result dict didn't surface
32+
`ltx2_audio_latents` from `output_batch.extra`). Ported the
33+
FastVideo-internal extra-overrides routing block + made `update()`
34+
strict + added regression test (7 tests, all pass) + landed 4 commits
35+
on `will/dreamverse-monorepo` @ `5eaf0a13` (11 commits ahead of
36+
`fbd823df`). End-to-end verified on GPU4: `Cached audio latents shape
37+
=(1, 8, 126, 16) for segment 2`, `Segment 2: relayed av chunks=22,
38+
bytes=3.8MB`, no BrokenPipeError. Public-API fix needs cherry-pick to
39+
`will/ltx2_sr_port` for PR #1288 — see open-threads.md item D-20-CP.
40+
**D-19** EXECUTED previously: Dreamverse migration landed on
41+
`will/dreamverse-monorepo` @ `c1fe5d4c` (5 commits ahead of
42+
`will/ltx2_sr_port` HEAD `fbd823df`). 164 files, 53,294 LOC, 31,725
43+
files under `apps/dreamverse/`. e2e PASSES against migrated code (8/8
44+
Playwright in 5.1s, `/proc/$PID/cwd` verified). Significant deviation
45+
from [integration-plan.md](integration-plan.md): the plan's "DELETE
46+
generic-merged from Dreamverse, import public substitutes" assumption
47+
was invalid (public APIs aren't drop-ins) — generic-merged files now
48+
carried PRODUCT-LOCAL inside `apps/dreamverse/server/`. Public
49+
`fastvideo.entrypoints.streaming.*` reverts to `fbd823df` state. See
50+
[decisions-log.md D-19](decisions-log.md#d-19) +
51+
[D-20](decisions-log.md#d-20) for full context.).
52+
FastVideo `will/ltx2_sr_port` @ HEAD (post-D-17 STACK.md removal +
53+
integration-review.md addition + integration-plan.md addition + D-18
54+
reconciliation). Dreamverse `will/integrate-public-fastvideo` @ `ec8ef92`.
55+
PRs #1257 / #1258 / #1284 / #1286 MERGED to main. **PR #1287 CLOSED
56+
(in favor of consolidation); PR #1288 OPEN as the single mega-PR
57+
landing the entire `will/ltx2_sr_port` chain at once** (LTX-2 SR
58+
runtime + NVFP4 + `generate_async`/Dynamo contract + agents memory dir).
59+
Split branches kept as historical bookmarks; STACK.md model **abandoned**
60+
see [decisions-log.md D-17](decisions-log.md#d-17). Local backup
61+
`will/ltx2_sr_port-pre-1286-rebase` @ `1baa60bb` preserves the
62+
pre-rebase chain.
63+
64+
## Fresh-context onboarding (read in order)
65+
66+
If you're an agent picking up this work for the first time, do these
67+
**5 things in this order**. Once done, you have full context to continue
68+
any open thread, commit correctly, push, and propagate to the open PR.
69+
70+
1. **Confirm worktree state** — run the "First 60 seconds" block in
71+
[runbook.md](runbook.md). Tells you the branch is right, services
72+
are up, and PR #1286's head matches what this dir claims.
73+
74+
2. **Read [state.md](state.md)** — single-page snapshot of branch tips,
75+
live services, test status, pre-existing failures, "do not pop"
76+
stashes.
77+
78+
3. **Read [pr-roadmap.md](pr-roadmap.md)** — what PRs landed, what's in
79+
flight, what's planned. Identifies the active open PR (currently
80+
#1286) and where it sits in the dependency chain.
81+
82+
4. **Read [open-threads.md](open-threads.md)** — prioritized work items
83+
with effort estimates and dependencies. The "Recommended pull order"
84+
section is a ready-made TODO list if you need one.
85+
86+
5. **Skim [runbook.md](runbook.md) end-to-end** — operational how-to:
87+
verify, commit (with co-author trailers), push, propagate to PR
88+
#1286, maintain the memory dir, and the "Common pitfalls" section
89+
that catches the recurring traps.
90+
91+
Skip the deep-context docs (design / streaming-server / cross-repo /
92+
quantization / decisions-log) until you need them — they're indexed in
93+
the "Deep-dive reading guide" below.
94+
95+
Final check: run the "Self-test" block at the bottom of
96+
[runbook.md](runbook.md). If you can answer all 8 questions from this
97+
dir alone, you're ready. If you can't, the gap is a memory-dir bug —
98+
file it in [open-threads.md](open-threads.md) before continuing.
99+
100+
## Deep-dive reading guide
101+
102+
| Question / task | File |
103+
|---|---|
104+
| "What's running right now? What just landed?" | [state.md](state.md) |
105+
| "How do I commit / push / propagate to PR #1286?" | [runbook.md](runbook.md) |
106+
| "Why is the schema typed this way? What's the philosophy?" | [design.md](design.md) |
107+
| "What PRs landed? In flight? Planned?" | [pr-roadmap.md](pr-roadmap.md) |
108+
| "Streaming server, `generate_async`, `build_app` routes?" | [streaming-server.md](streaming-server.md) |
109+
| "How does Dreamverse use FastVideo? What about Dynamo?" | [cross-repo-surfaces.md](cross-repo-surfaces.md) |
110+
| "NVFP4? Layer profiles? `LinearBase` fallback? AbsMaxFP8?" | [quantization.md](quantization.md) |
111+
| "Why was decision X made? What's resolved vs. open?" | [decisions-log.md](decisions-log.md) |
112+
| "What should I work on next? Priority order?" | [open-threads.md](open-threads.md) |
113+
| "Who should be co-authored on commits in this scope?" | [authors.md](authors.md) |
114+
| "How do we execute the Dreamverse → FastVideo monorepo merge?" | [integration-plan.md](integration-plan.md)**CURRENT** |
115+
| "Historical drift audit + Option-D evaluation (deprecated by D-18)" | [integration-review.md](integration-review.md) (DEPRECATED) |
116+
117+
## Repo + worktree paths
118+
119+
| Repo | Path | Active branch |
120+
|---|---|---|
121+
| FastVideo (public) | `/home/william5lin/FastVideo` | `will/ltx2_sr_port` |
122+
| Dreamverse | `/home/william5lin/Dreamverse` | `will/integrate-public-fastvideo` |
123+
| FastVideo-internal (read-only ref) | `/home/william5lin/FastVideo-internal` | their `main` |
124+
| Dynamo (read-only ref) | `/home/william5lin/dynamo` | upstream |
125+
126+
## Glossary
127+
128+
- **NVFP4**: NVIDIA's specific block-scaled FP4 (e2m1 mantissa, fp32 alpha,
129+
`layout_128x4` scale layout, group size 16). Distinct from MX-FP4 / OCP-FP4.
130+
- **`GeneratorConfig`**: typed init-time public config (model_path, engine,
131+
pipeline). Replaces flat `from_pretrained(**kwargs)`.
132+
- **`GenerationRequest`**: typed per-call request (prompt, inputs, sampling,
133+
runtime, output, stage_overrides, state, plan, extensions). Replaces flat
134+
`generate_video(**kwargs)`.
135+
- **`ServeConfig`** / **`RunConfig`**: top-level YAML envelopes. ServeConfig
136+
for `fastvideo serve`; RunConfig for offline `fastvideo generate`.
137+
- **`InferencePreset`**: model-owned named preset (e.g. `ltx2_two_stage`)
138+
defining stage topology + per-stage defaults + valid override types.
139+
- **`ContinuationState`**: opaque round-trip state envelope `{kind, payload}`.
140+
Hybrid: server-held for streaming WS, client-round-trip for stateless HTTP.
141+
- **`generate_async`**: future canonical async exec API (PR 7.10) yielding
142+
`VideoProgressEvent` / `VideoPartialEvent` / `VideoFinalEvent`. Substrate
143+
for streaming server, OpenAI server, AND Dynamo backend.
144+
- **`build_app`**: FastAPI app factory in
145+
`fastvideo.entrypoints.streaming.server`. Currently exposes only
146+
`/health` + `/v1/stream`. FE-required `/healthz`+`/readyz`+`/status`
147+
migration is open follow-up #1.
148+
- **`LLMProvider`**: protocol abstraction for prompt enhancer providers
149+
(cerebras, cerebras_ifm, groq). Public schema currently restricts to
150+
`Literal["cerebras", "groq"]`; `cerebras_ifm` is internal-only.
151+
- **`compat.py`**: legacy kwargs translation layer (~370 lines). Scheduled
152+
for death across PRs 14-17.
153+
- **`prepare_for_compile`**: duck-type protocol method called via
154+
`getattr(module, "prepare_for_compile", None)` before `torch.compile`.
155+
Currently only Gemma3 implements it.
156+
- **`SubprocessGpuPool`**: PR 7.6 public replacement for the internal
157+
`realtime/local_runtime.GPUPool`. Per-GPU subprocess workers, typed
158+
`GeneratorConfig` boundary.
159+
- **PR 5.5**: streaming server subpackage skeleton — adds
160+
`fastvideo/entrypoints/streaming/` parallel to `openai/`.
161+
- **PR 7.10**: the unlock PR. Closes Q-5 (audio re-encode), Q-9 (Dynamo
162+
progress), and PR 7.5's mid-segment cancellation TODO simultaneously.
163+
164+
## Live process map (as of 2026-05-03)
165+
166+
| Port | Service | Source |
167+
|---|---|---|
168+
| 8009 | `dreamverse-server` | running, `/readyz` 200, 1 warmed GPU worker |
169+
| 5274 | `next-server` (dev) | running |
170+
| 8000 | unknown FastAPI | not in handoff — verify before launching new BE |
171+
172+
## How this directory is maintained
173+
174+
- Source of truth for the integration story. Update when state changes.
175+
- Each file has a "Last updated" header; bump when you edit.
176+
- Cross-reference siblings via relative links; do NOT duplicate content.
177+
- New entries: register in `../index.jsonl`.
178+
- These files supersede the untracked source docs in the repo root and
179+
`.agents/exploration/` — see [state.md](state.md) "Untracked but
180+
present" section for disposition.
181+
182+
## Source documents (archived 2026-05-03)
183+
184+
The 7 source docs that this directory consolidates have been moved into
185+
[`source-archive/`](source-archive/). They remain available for agents
186+
who want the full unsynthesized rationale, but the synthesized memory
187+
files in this dir are the canonical source of truth.
188+
189+
| Source doc | Lines | Synthesized into |
190+
|---|---|---|
191+
| [`source-archive/apirefactor.md`](source-archive/apirefactor.md) | 838 | [design.md](design.md) |
192+
| [`source-archive/PR-plan.md`](source-archive/PR-plan.md) | 1145 | [pr-roadmap.md](pr-roadmap.md) |
193+
| [`source-archive/dreamverse_review.md`](source-archive/dreamverse_review.md) | 390 | [state.md](state.md) + [decisions-log.md](decisions-log.md) |
194+
| [`source-archive/handoff-nvfp4-launch-demo.md`](source-archive/handoff-nvfp4-launch-demo.md) | 518 | [state.md](state.md) + [quantization.md](quantization.md) + [open-threads.md](open-threads.md) |
195+
| [`source-archive/streaming-server-upstream-plan.md`](source-archive/streaming-server-upstream-plan.md) | 539 | [streaming-server.md](streaming-server.md) + [decisions-log.md](decisions-log.md) |
196+
| [`source-archive/dreamverse_integration.md`](source-archive/dreamverse_integration.md) | 285 | [cross-repo-surfaces.md](cross-repo-surfaces.md) |
197+
| [`source-archive/video-generator-config-api-design.md`](source-archive/video-generator-config-api-design.md) | 93 | [design.md](design.md) (early-draft material) |
198+
| `.agents/exploration/pr-link-review.md` | 29 | already promoted to `.agents/skills/review-pr-link/` (kept in exploration dir) |
199+
200+
See [`source-archive/README.md`](source-archive/README.md) for the
201+
archive policy.

0 commit comments

Comments
 (0)