From 145082cf744bdf40323250f7df0b248aee0b0965 Mon Sep 17 00:00:00 2001 From: SolitaryThinker Date: Tue, 16 Jun 2026 10:57:01 -0700 Subject: [PATCH] =?UTF-8?q?[refactor]=20rename=20package=20mini=5Ffastvide?= =?UTF-8?q?o=20=E2=86=92=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Directory rename (git mv, history preserved) plus rewrite of all references: absolute imports in tests, the zero-dep runner, docstrings, comments, and the README. No behavior change. Run: python3 -m pytest v2/tests/ -q ; python3 v2/run_tests.py ; python3 -m v2.examples --- {mini_fastvideo => v2}/.gitignore | 0 {mini_fastvideo => v2}/README.md | 16 +++++++------- {mini_fastvideo => v2}/__init__.py | 4 ++-- {mini_fastvideo => v2}/_enums.py | 0 {mini_fastvideo => v2}/_types.py | 4 ++-- {mini_fastvideo => v2}/cache/__init__.py | 0 {mini_fastvideo => v2}/cache/classes.py | 0 {mini_fastvideo => v2}/cache/keys.py | 0 {mini_fastvideo => v2}/cache/manager.py | 0 {mini_fastvideo => v2}/card/__init__.py | 0 {mini_fastvideo => v2}/card/instance.py | 0 {mini_fastvideo => v2}/card/specs.py | 4 ++-- {mini_fastvideo => v2}/deploy/__init__.py | 0 {mini_fastvideo => v2}/deploy/card.py | 0 {mini_fastvideo => v2}/deploy/dynamo.py | 0 {mini_fastvideo => v2}/deploy/fleet.py | 0 {mini_fastvideo => v2}/examples.py | 4 ++-- {mini_fastvideo => v2}/extend/__init__.py | 0 {mini_fastvideo => v2}/extend/base.py | 0 {mini_fastvideo => v2}/extend/interceptors.py | 0 {mini_fastvideo => v2}/extend/observers.py | 0 {mini_fastvideo => v2}/extend/registry.py | 0 {mini_fastvideo => v2}/loop/__init__.py | 0 {mini_fastvideo => v2}/loop/contracts.py | 0 {mini_fastvideo => v2}/loop/driver.py | 0 .../loop/policies/__init__.py | 0 {mini_fastvideo => v2}/loop/policies/base.py | 0 {mini_fastvideo => v2}/loop/policies/cfg.py | 0 {mini_fastvideo => v2}/loop/sampler.py | 0 {mini_fastvideo => v2}/memory/__init__.py | 0 {mini_fastvideo => v2}/memory/allocator.py | 0 {mini_fastvideo => v2}/models/__init__.py | 0 {mini_fastvideo => v2}/models/backend.py | 0 .../models/bagel/__init__.py | 0 {mini_fastvideo => v2}/models/bagel/card.py | 0 .../models/bagel/program.py | 0 {mini_fastvideo => v2}/models/common.py | 0 .../models/cosmos3/__init__.py | 0 {mini_fastvideo => v2}/models/cosmos3/card.py | 0 .../models/cosmos3/program.py | 0 .../models/ltx2/__init__.py | 0 {mini_fastvideo => v2}/models/ltx2/card.py | 0 {mini_fastvideo => v2}/models/ltx2/loop.py | 0 {mini_fastvideo => v2}/models/ltx2/program.py | 0 .../models/omni/__init__.py | 0 {mini_fastvideo => v2}/models/omni/ar_loop.py | 0 {mini_fastvideo => v2}/models/omni/pack.py | 0 .../models/wan21/__init__.py | 0 {mini_fastvideo => v2}/models/wan21/card.py | 0 {mini_fastvideo => v2}/models/wan21/loop.py | 0 .../models/wan21/program.py | 0 .../models/wan_causal/__init__.py | 0 .../models/wan_causal/card.py | 0 .../models/wan_causal/loop.py | 0 .../models/wan_causal/program.py | 0 {mini_fastvideo => v2}/parallel/__init__.py | 0 {mini_fastvideo => v2}/parallel/mesh.py | 0 {mini_fastvideo => v2}/parallel/plan.py | 0 {mini_fastvideo => v2}/parallel/validation.py | 0 {mini_fastvideo => v2}/parity/__init__.py | 0 {mini_fastvideo => v2}/parity/aligner.py | 0 .../parity/interleave_gate.py | 0 {mini_fastvideo => v2}/parity/ladder.py | 0 {mini_fastvideo => v2}/program/__init__.py | 0 {mini_fastvideo => v2}/program/specs.py | 0 {mini_fastvideo => v2}/request/__init__.py | 0 {mini_fastvideo => v2}/request/artifacts.py | 0 {mini_fastvideo => v2}/request/cancel.py | 0 {mini_fastvideo => v2}/request/modalpart.py | 0 {mini_fastvideo => v2}/request/params.py | 0 {mini_fastvideo => v2}/request/requests.py | 0 {mini_fastvideo => v2}/request/streams.py | 2 +- {mini_fastvideo => v2}/request/tasks.py | 0 {mini_fastvideo => v2}/run_tests.py | 12 +++++----- {mini_fastvideo => v2}/runtime/__init__.py | 0 .../runtime/async_engine.py | 0 {mini_fastvideo => v2}/runtime/context.py | 0 .../runtime/disaggregated.py | 0 {mini_fastvideo => v2}/runtime/engine.py | 0 {mini_fastvideo => v2}/runtime/pools.py | 0 {mini_fastvideo => v2}/runtime/scheduler.py | 0 {mini_fastvideo => v2}/serving/__init__.py | 0 {mini_fastvideo => v2}/serving/http.py | 0 {mini_fastvideo => v2}/serving/protocol.py | 0 {mini_fastvideo => v2}/serving/server.py | 2 +- .../tests/test_admission.py | 12 +++++----- {mini_fastvideo => v2}/tests/test_cache.py | 8 +++---- .../tests/test_contracts.py | 12 +++++----- .../tests/test_extensions.py | 14 ++++++------ .../tests/test_inference.py | 10 ++++----- .../tests/test_interleave_gate.py | 6 ++--- {mini_fastvideo => v2}/tests/test_omni.py | 10 ++++----- {mini_fastvideo => v2}/tests/test_parity.py | 2 +- {mini_fastvideo => v2}/tests/test_policies.py | 4 ++-- .../tests/test_review_fixes.py | 22 +++++++++---------- {mini_fastvideo => v2}/tests/test_serving.py | 20 ++++++++--------- .../tests/test_serving_fixes.py | 16 +++++++------- {mini_fastvideo => v2}/tests/test_training.py | 8 +++---- {mini_fastvideo => v2}/training/__init__.py | 0 {mini_fastvideo => v2}/training/behavior.py | 0 .../training/methods/__init__.py | 0 .../training/methods/base.py | 0 .../training/methods/diffusion_nft.py | 0 .../training/methods/dmd2.py | 0 .../training/methods/finetune.py | 0 .../training/methods/self_forcing.py | 0 {mini_fastvideo => v2}/training/rewards.py | 0 {mini_fastvideo => v2}/training/rollout.py | 0 .../training/weight_sync.py | 0 {mini_fastvideo => v2}/transport/__init__.py | 0 {mini_fastvideo => v2}/transport/connector.py | 0 {mini_fastvideo => v2}/transport/manifest.py | 0 112 files changed, 96 insertions(+), 96 deletions(-) rename {mini_fastvideo => v2}/.gitignore (100%) rename {mini_fastvideo => v2}/README.md (95%) rename {mini_fastvideo => v2}/__init__.py (91%) rename {mini_fastvideo => v2}/_enums.py (100%) rename {mini_fastvideo => v2}/_types.py (84%) rename {mini_fastvideo => v2}/cache/__init__.py (100%) rename {mini_fastvideo => v2}/cache/classes.py (100%) rename {mini_fastvideo => v2}/cache/keys.py (100%) rename {mini_fastvideo => v2}/cache/manager.py (100%) rename {mini_fastvideo => v2}/card/__init__.py (100%) rename {mini_fastvideo => v2}/card/instance.py (100%) rename {mini_fastvideo => v2}/card/specs.py (98%) rename {mini_fastvideo => v2}/deploy/__init__.py (100%) rename {mini_fastvideo => v2}/deploy/card.py (100%) rename {mini_fastvideo => v2}/deploy/dynamo.py (100%) rename {mini_fastvideo => v2}/deploy/fleet.py (100%) rename {mini_fastvideo => v2}/examples.py (98%) rename {mini_fastvideo => v2}/extend/__init__.py (100%) rename {mini_fastvideo => v2}/extend/base.py (100%) rename {mini_fastvideo => v2}/extend/interceptors.py (100%) rename {mini_fastvideo => v2}/extend/observers.py (100%) rename {mini_fastvideo => v2}/extend/registry.py (100%) rename {mini_fastvideo => v2}/loop/__init__.py (100%) rename {mini_fastvideo => v2}/loop/contracts.py (100%) rename {mini_fastvideo => v2}/loop/driver.py (100%) rename {mini_fastvideo => v2}/loop/policies/__init__.py (100%) rename {mini_fastvideo => v2}/loop/policies/base.py (100%) rename {mini_fastvideo => v2}/loop/policies/cfg.py (100%) rename {mini_fastvideo => v2}/loop/sampler.py (100%) rename {mini_fastvideo => v2}/memory/__init__.py (100%) rename {mini_fastvideo => v2}/memory/allocator.py (100%) rename {mini_fastvideo => v2}/models/__init__.py (100%) rename {mini_fastvideo => v2}/models/backend.py (100%) rename {mini_fastvideo => v2}/models/bagel/__init__.py (100%) rename {mini_fastvideo => v2}/models/bagel/card.py (100%) rename {mini_fastvideo => v2}/models/bagel/program.py (100%) rename {mini_fastvideo => v2}/models/common.py (100%) rename {mini_fastvideo => v2}/models/cosmos3/__init__.py (100%) rename {mini_fastvideo => v2}/models/cosmos3/card.py (100%) rename {mini_fastvideo => v2}/models/cosmos3/program.py (100%) rename {mini_fastvideo => v2}/models/ltx2/__init__.py (100%) rename {mini_fastvideo => v2}/models/ltx2/card.py (100%) rename {mini_fastvideo => v2}/models/ltx2/loop.py (100%) rename {mini_fastvideo => v2}/models/ltx2/program.py (100%) rename {mini_fastvideo => v2}/models/omni/__init__.py (100%) rename {mini_fastvideo => v2}/models/omni/ar_loop.py (100%) rename {mini_fastvideo => v2}/models/omni/pack.py (100%) rename {mini_fastvideo => v2}/models/wan21/__init__.py (100%) rename {mini_fastvideo => v2}/models/wan21/card.py (100%) rename {mini_fastvideo => v2}/models/wan21/loop.py (100%) rename {mini_fastvideo => v2}/models/wan21/program.py (100%) rename {mini_fastvideo => v2}/models/wan_causal/__init__.py (100%) rename {mini_fastvideo => v2}/models/wan_causal/card.py (100%) rename {mini_fastvideo => v2}/models/wan_causal/loop.py (100%) rename {mini_fastvideo => v2}/models/wan_causal/program.py (100%) rename {mini_fastvideo => v2}/parallel/__init__.py (100%) rename {mini_fastvideo => v2}/parallel/mesh.py (100%) rename {mini_fastvideo => v2}/parallel/plan.py (100%) rename {mini_fastvideo => v2}/parallel/validation.py (100%) rename {mini_fastvideo => v2}/parity/__init__.py (100%) rename {mini_fastvideo => v2}/parity/aligner.py (100%) rename {mini_fastvideo => v2}/parity/interleave_gate.py (100%) rename {mini_fastvideo => v2}/parity/ladder.py (100%) rename {mini_fastvideo => v2}/program/__init__.py (100%) rename {mini_fastvideo => v2}/program/specs.py (100%) rename {mini_fastvideo => v2}/request/__init__.py (100%) rename {mini_fastvideo => v2}/request/artifacts.py (100%) rename {mini_fastvideo => v2}/request/cancel.py (100%) rename {mini_fastvideo => v2}/request/modalpart.py (100%) rename {mini_fastvideo => v2}/request/params.py (100%) rename {mini_fastvideo => v2}/request/requests.py (100%) rename {mini_fastvideo => v2}/request/streams.py (96%) rename {mini_fastvideo => v2}/request/tasks.py (100%) rename {mini_fastvideo => v2}/run_tests.py (81%) rename {mini_fastvideo => v2}/runtime/__init__.py (100%) rename {mini_fastvideo => v2}/runtime/async_engine.py (100%) rename {mini_fastvideo => v2}/runtime/context.py (100%) rename {mini_fastvideo => v2}/runtime/disaggregated.py (100%) rename {mini_fastvideo => v2}/runtime/engine.py (100%) rename {mini_fastvideo => v2}/runtime/pools.py (100%) rename {mini_fastvideo => v2}/runtime/scheduler.py (100%) rename {mini_fastvideo => v2}/serving/__init__.py (100%) rename {mini_fastvideo => v2}/serving/http.py (100%) rename {mini_fastvideo => v2}/serving/protocol.py (100%) rename {mini_fastvideo => v2}/serving/server.py (99%) rename {mini_fastvideo => v2}/tests/test_admission.py (84%) rename {mini_fastvideo => v2}/tests/test_cache.py (90%) rename {mini_fastvideo => v2}/tests/test_contracts.py (90%) rename {mini_fastvideo => v2}/tests/test_extensions.py (89%) rename {mini_fastvideo => v2}/tests/test_inference.py (89%) rename {mini_fastvideo => v2}/tests/test_interleave_gate.py (88%) rename {mini_fastvideo => v2}/tests/test_omni.py (91%) rename {mini_fastvideo => v2}/tests/test_parity.py (94%) rename {mini_fastvideo => v2}/tests/test_policies.py (96%) rename {mini_fastvideo => v2}/tests/test_review_fixes.py (83%) rename {mini_fastvideo => v2}/tests/test_serving.py (94%) rename {mini_fastvideo => v2}/tests/test_serving_fixes.py (90%) rename {mini_fastvideo => v2}/tests/test_training.py (93%) rename {mini_fastvideo => v2}/training/__init__.py (100%) rename {mini_fastvideo => v2}/training/behavior.py (100%) rename {mini_fastvideo => v2}/training/methods/__init__.py (100%) rename {mini_fastvideo => v2}/training/methods/base.py (100%) rename {mini_fastvideo => v2}/training/methods/diffusion_nft.py (100%) rename {mini_fastvideo => v2}/training/methods/dmd2.py (100%) rename {mini_fastvideo => v2}/training/methods/finetune.py (100%) rename {mini_fastvideo => v2}/training/methods/self_forcing.py (100%) rename {mini_fastvideo => v2}/training/rewards.py (100%) rename {mini_fastvideo => v2}/training/rollout.py (100%) rename {mini_fastvideo => v2}/training/weight_sync.py (100%) rename {mini_fastvideo => v2}/transport/__init__.py (100%) rename {mini_fastvideo => v2}/transport/connector.py (100%) rename {mini_fastvideo => v2}/transport/manifest.py (100%) diff --git a/mini_fastvideo/.gitignore b/v2/.gitignore similarity index 100% rename from mini_fastvideo/.gitignore rename to v2/.gitignore diff --git a/mini_fastvideo/README.md b/v2/README.md similarity index 95% rename from mini_fastvideo/README.md rename to v2/README.md index e1a272a1c..6d39fabb1 100644 --- a/mini_fastvideo/README.md +++ b/v2/README.md @@ -1,4 +1,4 @@ -# mini-fastvideo +# v2 A scoped, **CPU-testable** realization of the `design_v3.md` model-native runtime — the architecture where *omni is native, train and serve are the same loops by construction, and correctness is a typed @@ -76,9 +76,9 @@ engine never imports `training`. `card/` imports no runtime. ```bash cd /Users/willlin/src/FastVideo-mini -python3 -m pytest mini_fastvideo/tests/ -q # 49 tests -python3 mini_fastvideo/run_tests.py # same suite, ZERO deps (no pytest needed) -python3 -m mini_fastvideo.examples # the design_v3 §15 worked examples +python3 -m pytest v2/tests/ -q # 49 tests +python3 v2/run_tests.py # same suite, ZERO deps (no pytest needed) +python3 -m v2.examples # the design_v3 §15 worked examples ``` Requires only Python 3.10+ and numpy. @@ -111,7 +111,7 @@ DAG-of-engines can express, made native: The diffusion loop is literally `WanDenoiseLoop` (the same step body the engine serves for Wan), bound to the MoT module — one loop definition, reused. The interleave gate generalizes across loop types (`test_omni.py::test_omni_interleave_parity_holds_across_loop_types`). Run it: -`python3 -c "from mini_fastvideo.models import build_omni_engine; ..."` or see `mini_fastvideo/examples.py`. +`python3 -c "from v2.models import build_omni_engine; ..."` or see `v2/examples.py`. Still future work (declared on the spine, not yet built): the packed factored-sequence (`[text|vision|action|sound]`) `LoopState.extension`, joint multi-modality denoise with per-modality @@ -144,9 +144,9 @@ The serving layer is built, not deferred to Dynamo: ```python import asyncio -from mini_fastvideo.models import build_default_engine, build_omni_engine -from mini_fastvideo.runtime import AsyncEngine -from mini_fastvideo.serving import OmniOpenAIServer +from v2.models import build_default_engine, build_omni_engine +from v2.runtime import AsyncEngine +from v2.serving import OmniOpenAIServer async def serve(): eng = build_default_engine(); build_omni_engine(eng) host, port = await OmniOpenAIServer(AsyncEngine(eng)).serve(port=8000) diff --git a/mini_fastvideo/__init__.py b/v2/__init__.py similarity index 91% rename from mini_fastvideo/__init__.py rename to v2/__init__.py index c52374ff1..54993a6b2 100644 --- a/mini_fastvideo/__init__.py +++ b/v2/__init__.py @@ -1,4 +1,4 @@ -"""mini-fastvideo — a scoped, CPU-testable realization of the design_v3 model-native runtime. +"""v2 — a scoped, CPU-testable realization of the design_v3 model-native runtime. > A model card is a (recipe, runtime) pair with a parity obligation. > The model owns loop semantics; the runtime owns loop lifecycle. @@ -12,7 +12,7 @@ omni-ready (multi-loop ModelInstance, ar_decode/chunk_rollout loop kinds) for th Cosmos3 + vllm-omni omni ports. The core is numpy-only and CPU-testable; heavy Wan/LTX neural forwards become lazy torch -adapters (see ``mini_fastvideo/models/*/components.py``) that are off the test path. +adapters (see ``v2/models/*/components.py``) that are off the test path. """ from __future__ import annotations diff --git a/mini_fastvideo/_enums.py b/v2/_enums.py similarity index 100% rename from mini_fastvideo/_enums.py rename to v2/_enums.py diff --git a/mini_fastvideo/_types.py b/v2/_types.py similarity index 84% rename from mini_fastvideo/_types.py rename to v2/_types.py index 3694c9dfe..3573d9eee 100644 --- a/mini_fastvideo/_types.py +++ b/v2/_types.py @@ -1,10 +1,10 @@ -"""Shared lightweight type aliases for mini-fastvideo. +"""Shared lightweight type aliases for v2. The core (card/loop/runtime/cache/parity/program/request/training) is numpy-only and CPU-testable. Tensors are therefore typed structurally as ``TensorLike``: on the CPU test path they are ``numpy.ndarray``; on a GPU box the same code runs with ``torch.Tensor``. The core never imports torch — only model-component -*adapters* do, lazily (see ``mini_fastvideo/card/components.py``). +*adapters* do, lazily (see ``v2/card/components.py``). """ from __future__ import annotations diff --git a/mini_fastvideo/cache/__init__.py b/v2/cache/__init__.py similarity index 100% rename from mini_fastvideo/cache/__init__.py rename to v2/cache/__init__.py diff --git a/mini_fastvideo/cache/classes.py b/v2/cache/classes.py similarity index 100% rename from mini_fastvideo/cache/classes.py rename to v2/cache/classes.py diff --git a/mini_fastvideo/cache/keys.py b/v2/cache/keys.py similarity index 100% rename from mini_fastvideo/cache/keys.py rename to v2/cache/keys.py diff --git a/mini_fastvideo/cache/manager.py b/v2/cache/manager.py similarity index 100% rename from mini_fastvideo/cache/manager.py rename to v2/cache/manager.py diff --git a/mini_fastvideo/card/__init__.py b/v2/card/__init__.py similarity index 100% rename from mini_fastvideo/card/__init__.py rename to v2/card/__init__.py diff --git a/mini_fastvideo/card/instance.py b/v2/card/instance.py similarity index 100% rename from mini_fastvideo/card/instance.py rename to v2/card/instance.py diff --git a/mini_fastvideo/card/specs.py b/v2/card/specs.py similarity index 98% rename from mini_fastvideo/card/specs.py rename to v2/card/specs.py index cc9a8bc3b..37801ebb2 100644 --- a/mini_fastvideo/card/specs.py +++ b/v2/card/specs.py @@ -143,7 +143,7 @@ class ComponentSpec: resident_for: list[str] = field(default_factory=list) # loop_ids that keep this resident mid-request optional_for: set[str] = field(default_factory=set) # tasks that don't need it required_for: set[str] = field(default_factory=set) # tasks that require it - # mini-fastvideo wiring: a factory producing the live component (toy numpy or torch adapter) + # v2 wiring: a factory producing the live component (toy numpy or torch adapter) factory: Callable[..., Any] | None = None @@ -170,7 +170,7 @@ class LoopSpec: # omni-ready (omni-readiness report §4a): shared_weight_components: list[str] = field(default_factory=list) allows_interleaving: bool = True - # mini-fastvideo: the Loop implementation factory (built at bind time) + # v2: the Loop implementation factory (built at bind time) loop_factory: Callable[..., Any] | None = None diff --git a/mini_fastvideo/deploy/__init__.py b/v2/deploy/__init__.py similarity index 100% rename from mini_fastvideo/deploy/__init__.py rename to v2/deploy/__init__.py diff --git a/mini_fastvideo/deploy/card.py b/v2/deploy/card.py similarity index 100% rename from mini_fastvideo/deploy/card.py rename to v2/deploy/card.py diff --git a/mini_fastvideo/deploy/dynamo.py b/v2/deploy/dynamo.py similarity index 100% rename from mini_fastvideo/deploy/dynamo.py rename to v2/deploy/dynamo.py diff --git a/mini_fastvideo/deploy/fleet.py b/v2/deploy/fleet.py similarity index 100% rename from mini_fastvideo/deploy/fleet.py rename to v2/deploy/fleet.py diff --git a/mini_fastvideo/examples.py b/v2/examples.py similarity index 98% rename from mini_fastvideo/examples.py rename to v2/examples.py index 225dd10ff..f42a06a1f 100644 --- a/mini_fastvideo/examples.py +++ b/v2/examples.py @@ -1,6 +1,6 @@ """Worked examples (design_v3 §15), runnable as a demo: - python3 -m mini_fastvideo.examples + python3 -m v2.examples Each prints what it demonstrates. This doubles as living documentation of the API. """ @@ -136,7 +136,7 @@ def example_h_serving_and_fleet() -> None: def main() -> None: print("=" * 78) - print("mini-fastvideo — worked examples (design_v3 §6,§13-16). One runtime, many loops.") + print("v2 — worked examples (design_v3 §6,§13-16). One runtime, many loops.") print("=" * 78) eng = build_default_engine() print(f"registered (recipe, runtime) cards: {list(eng._registry)}") diff --git a/mini_fastvideo/extend/__init__.py b/v2/extend/__init__.py similarity index 100% rename from mini_fastvideo/extend/__init__.py rename to v2/extend/__init__.py diff --git a/mini_fastvideo/extend/base.py b/v2/extend/base.py similarity index 100% rename from mini_fastvideo/extend/base.py rename to v2/extend/base.py diff --git a/mini_fastvideo/extend/interceptors.py b/v2/extend/interceptors.py similarity index 100% rename from mini_fastvideo/extend/interceptors.py rename to v2/extend/interceptors.py diff --git a/mini_fastvideo/extend/observers.py b/v2/extend/observers.py similarity index 100% rename from mini_fastvideo/extend/observers.py rename to v2/extend/observers.py diff --git a/mini_fastvideo/extend/registry.py b/v2/extend/registry.py similarity index 100% rename from mini_fastvideo/extend/registry.py rename to v2/extend/registry.py diff --git a/mini_fastvideo/loop/__init__.py b/v2/loop/__init__.py similarity index 100% rename from mini_fastvideo/loop/__init__.py rename to v2/loop/__init__.py diff --git a/mini_fastvideo/loop/contracts.py b/v2/loop/contracts.py similarity index 100% rename from mini_fastvideo/loop/contracts.py rename to v2/loop/contracts.py diff --git a/mini_fastvideo/loop/driver.py b/v2/loop/driver.py similarity index 100% rename from mini_fastvideo/loop/driver.py rename to v2/loop/driver.py diff --git a/mini_fastvideo/loop/policies/__init__.py b/v2/loop/policies/__init__.py similarity index 100% rename from mini_fastvideo/loop/policies/__init__.py rename to v2/loop/policies/__init__.py diff --git a/mini_fastvideo/loop/policies/base.py b/v2/loop/policies/base.py similarity index 100% rename from mini_fastvideo/loop/policies/base.py rename to v2/loop/policies/base.py diff --git a/mini_fastvideo/loop/policies/cfg.py b/v2/loop/policies/cfg.py similarity index 100% rename from mini_fastvideo/loop/policies/cfg.py rename to v2/loop/policies/cfg.py diff --git a/mini_fastvideo/loop/sampler.py b/v2/loop/sampler.py similarity index 100% rename from mini_fastvideo/loop/sampler.py rename to v2/loop/sampler.py diff --git a/mini_fastvideo/memory/__init__.py b/v2/memory/__init__.py similarity index 100% rename from mini_fastvideo/memory/__init__.py rename to v2/memory/__init__.py diff --git a/mini_fastvideo/memory/allocator.py b/v2/memory/allocator.py similarity index 100% rename from mini_fastvideo/memory/allocator.py rename to v2/memory/allocator.py diff --git a/mini_fastvideo/models/__init__.py b/v2/models/__init__.py similarity index 100% rename from mini_fastvideo/models/__init__.py rename to v2/models/__init__.py diff --git a/mini_fastvideo/models/backend.py b/v2/models/backend.py similarity index 100% rename from mini_fastvideo/models/backend.py rename to v2/models/backend.py diff --git a/mini_fastvideo/models/bagel/__init__.py b/v2/models/bagel/__init__.py similarity index 100% rename from mini_fastvideo/models/bagel/__init__.py rename to v2/models/bagel/__init__.py diff --git a/mini_fastvideo/models/bagel/card.py b/v2/models/bagel/card.py similarity index 100% rename from mini_fastvideo/models/bagel/card.py rename to v2/models/bagel/card.py diff --git a/mini_fastvideo/models/bagel/program.py b/v2/models/bagel/program.py similarity index 100% rename from mini_fastvideo/models/bagel/program.py rename to v2/models/bagel/program.py diff --git a/mini_fastvideo/models/common.py b/v2/models/common.py similarity index 100% rename from mini_fastvideo/models/common.py rename to v2/models/common.py diff --git a/mini_fastvideo/models/cosmos3/__init__.py b/v2/models/cosmos3/__init__.py similarity index 100% rename from mini_fastvideo/models/cosmos3/__init__.py rename to v2/models/cosmos3/__init__.py diff --git a/mini_fastvideo/models/cosmos3/card.py b/v2/models/cosmos3/card.py similarity index 100% rename from mini_fastvideo/models/cosmos3/card.py rename to v2/models/cosmos3/card.py diff --git a/mini_fastvideo/models/cosmos3/program.py b/v2/models/cosmos3/program.py similarity index 100% rename from mini_fastvideo/models/cosmos3/program.py rename to v2/models/cosmos3/program.py diff --git a/mini_fastvideo/models/ltx2/__init__.py b/v2/models/ltx2/__init__.py similarity index 100% rename from mini_fastvideo/models/ltx2/__init__.py rename to v2/models/ltx2/__init__.py diff --git a/mini_fastvideo/models/ltx2/card.py b/v2/models/ltx2/card.py similarity index 100% rename from mini_fastvideo/models/ltx2/card.py rename to v2/models/ltx2/card.py diff --git a/mini_fastvideo/models/ltx2/loop.py b/v2/models/ltx2/loop.py similarity index 100% rename from mini_fastvideo/models/ltx2/loop.py rename to v2/models/ltx2/loop.py diff --git a/mini_fastvideo/models/ltx2/program.py b/v2/models/ltx2/program.py similarity index 100% rename from mini_fastvideo/models/ltx2/program.py rename to v2/models/ltx2/program.py diff --git a/mini_fastvideo/models/omni/__init__.py b/v2/models/omni/__init__.py similarity index 100% rename from mini_fastvideo/models/omni/__init__.py rename to v2/models/omni/__init__.py diff --git a/mini_fastvideo/models/omni/ar_loop.py b/v2/models/omni/ar_loop.py similarity index 100% rename from mini_fastvideo/models/omni/ar_loop.py rename to v2/models/omni/ar_loop.py diff --git a/mini_fastvideo/models/omni/pack.py b/v2/models/omni/pack.py similarity index 100% rename from mini_fastvideo/models/omni/pack.py rename to v2/models/omni/pack.py diff --git a/mini_fastvideo/models/wan21/__init__.py b/v2/models/wan21/__init__.py similarity index 100% rename from mini_fastvideo/models/wan21/__init__.py rename to v2/models/wan21/__init__.py diff --git a/mini_fastvideo/models/wan21/card.py b/v2/models/wan21/card.py similarity index 100% rename from mini_fastvideo/models/wan21/card.py rename to v2/models/wan21/card.py diff --git a/mini_fastvideo/models/wan21/loop.py b/v2/models/wan21/loop.py similarity index 100% rename from mini_fastvideo/models/wan21/loop.py rename to v2/models/wan21/loop.py diff --git a/mini_fastvideo/models/wan21/program.py b/v2/models/wan21/program.py similarity index 100% rename from mini_fastvideo/models/wan21/program.py rename to v2/models/wan21/program.py diff --git a/mini_fastvideo/models/wan_causal/__init__.py b/v2/models/wan_causal/__init__.py similarity index 100% rename from mini_fastvideo/models/wan_causal/__init__.py rename to v2/models/wan_causal/__init__.py diff --git a/mini_fastvideo/models/wan_causal/card.py b/v2/models/wan_causal/card.py similarity index 100% rename from mini_fastvideo/models/wan_causal/card.py rename to v2/models/wan_causal/card.py diff --git a/mini_fastvideo/models/wan_causal/loop.py b/v2/models/wan_causal/loop.py similarity index 100% rename from mini_fastvideo/models/wan_causal/loop.py rename to v2/models/wan_causal/loop.py diff --git a/mini_fastvideo/models/wan_causal/program.py b/v2/models/wan_causal/program.py similarity index 100% rename from mini_fastvideo/models/wan_causal/program.py rename to v2/models/wan_causal/program.py diff --git a/mini_fastvideo/parallel/__init__.py b/v2/parallel/__init__.py similarity index 100% rename from mini_fastvideo/parallel/__init__.py rename to v2/parallel/__init__.py diff --git a/mini_fastvideo/parallel/mesh.py b/v2/parallel/mesh.py similarity index 100% rename from mini_fastvideo/parallel/mesh.py rename to v2/parallel/mesh.py diff --git a/mini_fastvideo/parallel/plan.py b/v2/parallel/plan.py similarity index 100% rename from mini_fastvideo/parallel/plan.py rename to v2/parallel/plan.py diff --git a/mini_fastvideo/parallel/validation.py b/v2/parallel/validation.py similarity index 100% rename from mini_fastvideo/parallel/validation.py rename to v2/parallel/validation.py diff --git a/mini_fastvideo/parity/__init__.py b/v2/parity/__init__.py similarity index 100% rename from mini_fastvideo/parity/__init__.py rename to v2/parity/__init__.py diff --git a/mini_fastvideo/parity/aligner.py b/v2/parity/aligner.py similarity index 100% rename from mini_fastvideo/parity/aligner.py rename to v2/parity/aligner.py diff --git a/mini_fastvideo/parity/interleave_gate.py b/v2/parity/interleave_gate.py similarity index 100% rename from mini_fastvideo/parity/interleave_gate.py rename to v2/parity/interleave_gate.py diff --git a/mini_fastvideo/parity/ladder.py b/v2/parity/ladder.py similarity index 100% rename from mini_fastvideo/parity/ladder.py rename to v2/parity/ladder.py diff --git a/mini_fastvideo/program/__init__.py b/v2/program/__init__.py similarity index 100% rename from mini_fastvideo/program/__init__.py rename to v2/program/__init__.py diff --git a/mini_fastvideo/program/specs.py b/v2/program/specs.py similarity index 100% rename from mini_fastvideo/program/specs.py rename to v2/program/specs.py diff --git a/mini_fastvideo/request/__init__.py b/v2/request/__init__.py similarity index 100% rename from mini_fastvideo/request/__init__.py rename to v2/request/__init__.py diff --git a/mini_fastvideo/request/artifacts.py b/v2/request/artifacts.py similarity index 100% rename from mini_fastvideo/request/artifacts.py rename to v2/request/artifacts.py diff --git a/mini_fastvideo/request/cancel.py b/v2/request/cancel.py similarity index 100% rename from mini_fastvideo/request/cancel.py rename to v2/request/cancel.py diff --git a/mini_fastvideo/request/modalpart.py b/v2/request/modalpart.py similarity index 100% rename from mini_fastvideo/request/modalpart.py rename to v2/request/modalpart.py diff --git a/mini_fastvideo/request/params.py b/v2/request/params.py similarity index 100% rename from mini_fastvideo/request/params.py rename to v2/request/params.py diff --git a/mini_fastvideo/request/requests.py b/v2/request/requests.py similarity index 100% rename from mini_fastvideo/request/requests.py rename to v2/request/requests.py diff --git a/mini_fastvideo/request/streams.py b/v2/request/streams.py similarity index 96% rename from mini_fastvideo/request/streams.py rename to v2/request/streams.py index 41e6b8f1a..da622fd7f 100644 --- a/mini_fastvideo/request/streams.py +++ b/v2/request/streams.py @@ -6,7 +6,7 @@ logs, finals." Event taxonomy: ``request.*``, ``session.*``, ``artifact.*``, stream, byte-range/buffer-ref, codec/container, timestamp range, and preview-vs-final — invalid combinations are unrepresentable. -For mini-fastvideo the Stream is a simple synchronous ordered channel (the core is +For v2 the Stream is a simple synchronous ordered channel (the core is numpy/sync and CPU-testable); a GPU/server deployment swaps in an async channel without changing the event types. """ diff --git a/mini_fastvideo/request/tasks.py b/v2/request/tasks.py similarity index 100% rename from mini_fastvideo/request/tasks.py rename to v2/request/tasks.py diff --git a/mini_fastvideo/run_tests.py b/v2/run_tests.py similarity index 81% rename from mini_fastvideo/run_tests.py rename to v2/run_tests.py index 0b2e64d61..561521da3 100644 --- a/mini_fastvideo/run_tests.py +++ b/v2/run_tests.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -"""Zero-dependency test runner for mini-fastvideo. +"""Zero-dependency test runner for v2. -The mini-fastvideo core is numpy-only and CPU-testable. This runner discovers -``test_*`` functions in ``mini_fastvideo/tests/test_*.py`` and runs them without +The v2 core is numpy-only and CPU-testable. This runner discovers +``test_*`` functions in ``v2/tests/test_*.py`` and runs them without needing pytest installed (it is fully pytest-compatible, so ``pytest`` works too). Usage: - python3 mini_fastvideo/run_tests.py # run all - python3 mini_fastvideo/run_tests.py interleave # run files matching a substring + python3 v2/run_tests.py # run all + python3 v2/run_tests.py interleave # run files matching a substring """ from __future__ import annotations @@ -18,7 +18,7 @@ from pathlib import Path HERE = Path(__file__).resolve().parent TESTS_DIR = HERE / "tests" -REPO_ROOT = HERE.parent # so `import mini_fastvideo` works +REPO_ROOT = HERE.parent # so `import v2` works def _load(path: Path): diff --git a/mini_fastvideo/runtime/__init__.py b/v2/runtime/__init__.py similarity index 100% rename from mini_fastvideo/runtime/__init__.py rename to v2/runtime/__init__.py diff --git a/mini_fastvideo/runtime/async_engine.py b/v2/runtime/async_engine.py similarity index 100% rename from mini_fastvideo/runtime/async_engine.py rename to v2/runtime/async_engine.py diff --git a/mini_fastvideo/runtime/context.py b/v2/runtime/context.py similarity index 100% rename from mini_fastvideo/runtime/context.py rename to v2/runtime/context.py diff --git a/mini_fastvideo/runtime/disaggregated.py b/v2/runtime/disaggregated.py similarity index 100% rename from mini_fastvideo/runtime/disaggregated.py rename to v2/runtime/disaggregated.py diff --git a/mini_fastvideo/runtime/engine.py b/v2/runtime/engine.py similarity index 100% rename from mini_fastvideo/runtime/engine.py rename to v2/runtime/engine.py diff --git a/mini_fastvideo/runtime/pools.py b/v2/runtime/pools.py similarity index 100% rename from mini_fastvideo/runtime/pools.py rename to v2/runtime/pools.py diff --git a/mini_fastvideo/runtime/scheduler.py b/v2/runtime/scheduler.py similarity index 100% rename from mini_fastvideo/runtime/scheduler.py rename to v2/runtime/scheduler.py diff --git a/mini_fastvideo/serving/__init__.py b/v2/serving/__init__.py similarity index 100% rename from mini_fastvideo/serving/__init__.py rename to v2/serving/__init__.py diff --git a/mini_fastvideo/serving/http.py b/v2/serving/http.py similarity index 100% rename from mini_fastvideo/serving/http.py rename to v2/serving/http.py diff --git a/mini_fastvideo/serving/protocol.py b/v2/serving/protocol.py similarity index 100% rename from mini_fastvideo/serving/protocol.py rename to v2/serving/protocol.py diff --git a/mini_fastvideo/serving/server.py b/v2/serving/server.py similarity index 99% rename from mini_fastvideo/serving/server.py rename to v2/serving/server.py index 0b761e4dc..ab8aaf922 100644 --- a/mini_fastvideo/serving/server.py +++ b/v2/serving/server.py @@ -61,7 +61,7 @@ def _ser_artifacts(out: Output) -> dict: class OmniOpenAIServer: - def __init__(self, engine: Any, *, engine_id: str = "mini-fastvideo", max_jobs: int = 512): + def __init__(self, engine: Any, *, engine_id: str = "v2", max_jobs: int = 512): self.engine = engine # an AsyncEngine self.engine_id = engine_id self.jobs: dict[str, dict] = {} # video job store diff --git a/mini_fastvideo/tests/test_admission.py b/v2/tests/test_admission.py similarity index 84% rename from mini_fastvideo/tests/test_admission.py rename to v2/tests/test_admission.py index 10893c38b..d8cf96280 100644 --- a/mini_fastvideo/tests/test_admission.py +++ b/v2/tests/test_admission.py @@ -7,12 +7,12 @@ from __future__ import annotations import numpy as np -from mini_fastvideo.memory import MemoryManager, OutOfMemory -from mini_fastvideo.models import build_default_engine -from mini_fastvideo.models.wan21.loop import latent_shape -from mini_fastvideo.parity import compare_outputs -from mini_fastvideo.request import DiffusionParams, TaskType, make_request -from mini_fastvideo.runtime import AdmissionController, Engine +from v2.memory import MemoryManager, OutOfMemory +from v2.models import build_default_engine +from v2.models.wan21.loop import latent_shape +from v2.parity import compare_outputs +from v2.request import DiffusionParams, TaskType, make_request +from v2.runtime import AdmissionController, Engine def test_memory_manager_reserve_release_and_oom(): diff --git a/mini_fastvideo/tests/test_cache.py b/v2/tests/test_cache.py similarity index 90% rename from mini_fastvideo/tests/test_cache.py rename to v2/tests/test_cache.py index a1ebb6ad1..ce2c388ee 100644 --- a/mini_fastvideo/tests/test_cache.py +++ b/v2/tests/test_cache.py @@ -3,9 +3,9 @@ from __future__ import annotations import numpy as np -from mini_fastvideo.cache import CacheKey, CacheManager, CachePolicy -from mini_fastvideo.cache.classes import FeatureCache, Slab, SlabKVCache -from mini_fastvideo.models.wan_causal import build_wan_causal_card +from v2.cache import CacheKey, CacheManager, CachePolicy +from v2.cache.classes import FeatureCache, Slab, SlabKVCache +from v2.models.wan_causal import build_wan_causal_card def test_feature_cache_reuse_and_adapter_partition(): @@ -55,6 +55,6 @@ def test_cache_manager_materializes_only_declared_classes(): cm = CacheManager.from_card(build_wan_causal_card()) assert cm.has("feature") and cm.has("slab_kv") # a pure bidirectional card declares no KV class - from mini_fastvideo.models.wan21 import build_wan21_card + from v2.models.wan21 import build_wan21_card cm2 = CacheManager.from_card(build_wan21_card()) assert cm2.has("feature") and not cm2.has("slab_kv") # KV is the minority case diff --git a/mini_fastvideo/tests/test_contracts.py b/v2/tests/test_contracts.py similarity index 90% rename from mini_fastvideo/tests/test_contracts.py rename to v2/tests/test_contracts.py index d757caf51..c2f6a2bff 100644 --- a/mini_fastvideo/tests/test_contracts.py +++ b/v2/tests/test_contracts.py @@ -3,18 +3,18 @@ from __future__ import annotations import numpy as np -from mini_fastvideo._enums import ConsistencyLevel, LoopKind, WorkUnitKind -from mini_fastvideo.card import ( +from v2._enums import ConsistencyLevel, LoopKind, WorkUnitKind +from v2.card import ( CardValidationError, CostModel, LoopSpec, ModelCard, RecipeSpec, ) -from mini_fastvideo.cache.keys import CacheKey, content_hash -from mini_fastvideo.models.wan21 import build_wan21_card -from mini_fastvideo.models.wan_causal import build_wan_causal_card -from mini_fastvideo.parallel import ParallelPlan, ParallelValidationError, validate_plan +from v2.cache.keys import CacheKey, content_hash +from v2.models.wan21 import build_wan21_card +from v2.models.wan_causal import build_wan_causal_card +from v2.parallel import ParallelPlan, ParallelValidationError, validate_plan def test_wan_card_validates(): diff --git a/mini_fastvideo/tests/test_extensions.py b/v2/tests/test_extensions.py similarity index 89% rename from mini_fastvideo/tests/test_extensions.py rename to v2/tests/test_extensions.py index 1e7080280..aae06976d 100644 --- a/mini_fastvideo/tests/test_extensions.py +++ b/v2/tests/test_extensions.py @@ -4,19 +4,19 @@ interleave-safe; a module-global version provably is NOT — which is *why* §11 """ from __future__ import annotations -from mini_fastvideo._enums import WorkUnitKind -from mini_fastvideo.card import CostModel -from mini_fastvideo.extend import ( +from v2._enums import WorkUnitKind +from v2.card import CostModel +from v2.extend import ( InterceptorChain, InterceptorConflict, NaNWatch, Profiler, ResidualSkipInterceptor, ) -from mini_fastvideo.models import build_default_engine -from mini_fastvideo.parity import assert_interleave_parity -from mini_fastvideo.request import DiffusionParams, TaskType, make_request -from mini_fastvideo.runtime import Engine +from v2.models import build_default_engine +from v2.parity import assert_interleave_parity +from v2.request import DiffusionParams, TaskType, make_request +from v2.runtime import Engine def _req(prompt, seed): diff --git a/mini_fastvideo/tests/test_inference.py b/v2/tests/test_inference.py similarity index 89% rename from mini_fastvideo/tests/test_inference.py rename to v2/tests/test_inference.py index ded7b3f4b..af01a3a96 100644 --- a/mini_fastvideo/tests/test_inference.py +++ b/v2/tests/test_inference.py @@ -3,11 +3,11 @@ from __future__ import annotations import numpy as np -from mini_fastvideo.models import build_default_engine -from mini_fastvideo.models.ltx2 import BASE_SIGMAS, REFINE_SIGMAS, build_ltx2_card -from mini_fastvideo.models.wan21 import build_wan21_card -from mini_fastvideo.models.wan_causal import build_wan_causal_card -from mini_fastvideo.request import DiffusionParams, OutputSpec, TaskType, make_request +from v2.models import build_default_engine +from v2.models.ltx2 import BASE_SIGMAS, REFINE_SIGMAS, build_ltx2_card +from v2.models.wan21 import build_wan21_card +from v2.models.wan_causal import build_wan_causal_card +from v2.request import DiffusionParams, OutputSpec, TaskType, make_request def _eng(): diff --git a/mini_fastvideo/tests/test_interleave_gate.py b/v2/tests/test_interleave_gate.py similarity index 88% rename from mini_fastvideo/tests/test_interleave_gate.py rename to v2/tests/test_interleave_gate.py index 45294025b..9c69b9f67 100644 --- a/mini_fastvideo/tests/test_interleave_gate.py +++ b/v2/tests/test_interleave_gate.py @@ -6,9 +6,9 @@ this gate is not. """ from __future__ import annotations -from mini_fastvideo.models import build_default_engine -from mini_fastvideo.parity import assert_interleave_parity -from mini_fastvideo.request import DiffusionParams, TaskType, make_request +from v2.models import build_default_engine +from v2.parity import assert_interleave_parity +from v2.request import DiffusionParams, TaskType, make_request def _req(mid, prompt, seed, steps=4): diff --git a/mini_fastvideo/tests/test_omni.py b/v2/tests/test_omni.py similarity index 91% rename from mini_fastvideo/tests/test_omni.py rename to v2/tests/test_omni.py index e2ac91b82..08706ca8b 100644 --- a/mini_fastvideo/tests/test_omni.py +++ b/v2/tests/test_omni.py @@ -8,11 +8,11 @@ from __future__ import annotations import numpy as np -from mini_fastvideo._enums import WorkUnitKind -from mini_fastvideo.models import build_omni_engine -from mini_fastvideo.models.cosmos3 import build_cosmos3_card -from mini_fastvideo.parity import assert_interleave_parity -from mini_fastvideo.request import DiffusionParams, SamplingParams, TaskType, make_request +from v2._enums import WorkUnitKind +from v2.models import build_omni_engine +from v2.models.cosmos3 import build_cosmos3_card +from v2.parity import assert_interleave_parity +from v2.request import DiffusionParams, SamplingParams, TaskType, make_request def _eng(): diff --git a/mini_fastvideo/tests/test_parity.py b/v2/tests/test_parity.py similarity index 94% rename from mini_fastvideo/tests/test_parity.py rename to v2/tests/test_parity.py index 7d089f705..6ce608ade 100644 --- a/mini_fastvideo/tests/test_parity.py +++ b/v2/tests/test_parity.py @@ -3,7 +3,7 @@ from __future__ import annotations import numpy as np -from mini_fastvideo.parity import ConsistencyLevel, ParityAligner, array_diff, bit_identical, within +from v2.parity import ConsistencyLevel, ParityAligner, array_diff, bit_identical, within def test_aligner_no_divergence_on_identical_runs(): diff --git a/mini_fastvideo/tests/test_policies.py b/v2/tests/test_policies.py similarity index 96% rename from mini_fastvideo/tests/test_policies.py rename to v2/tests/test_policies.py index 6da878da7..dbfcd8136 100644 --- a/mini_fastvideo/tests/test_policies.py +++ b/v2/tests/test_policies.py @@ -3,8 +3,8 @@ from __future__ import annotations import numpy as np -from mini_fastvideo.loop.contracts import StepContext -from mini_fastvideo.loop.policies import ( +from v2.loop.contracts import StepContext +from v2.loop.policies import ( AdaptiveGateCFG, BoundaryTimestepRouting, ClassicCFG, diff --git a/mini_fastvideo/tests/test_review_fixes.py b/v2/tests/test_review_fixes.py similarity index 83% rename from mini_fastvideo/tests/test_review_fixes.py rename to v2/tests/test_review_fixes.py index eb17e5df4..d775911f1 100644 --- a/mini_fastvideo/tests/test_review_fixes.py +++ b/v2/tests/test_review_fixes.py @@ -9,17 +9,17 @@ from __future__ import annotations import numpy as np -from mini_fastvideo._enums import WorkUnitKind -from mini_fastvideo.cache import CacheManager -from mini_fastvideo.card import load_card -from mini_fastvideo.loop.contracts import ResourceRequest, ShapeSignature, WorkPlan -from mini_fastvideo.memory import MemoryManager -from mini_fastvideo.models import build_default_engine -from mini_fastvideo.models.common import cached_text_encode -from mini_fastvideo.models.wan21 import build_wan21_card -from mini_fastvideo.parity import compare_outputs -from mini_fastvideo.request import DiffusionParams, Output, TaskType, VideoArtifact, make_request -from mini_fastvideo.runtime import AdmissionController, AdmissionInfeasible, Engine +from v2._enums import WorkUnitKind +from v2.cache import CacheManager +from v2.card import load_card +from v2.loop.contracts import ResourceRequest, ShapeSignature, WorkPlan +from v2.memory import MemoryManager +from v2.models import build_default_engine +from v2.models.common import cached_text_encode +from v2.models.wan21 import build_wan21_card +from v2.parity import compare_outputs +from v2.request import DiffusionParams, Output, TaskType, VideoArtifact, make_request +from v2.runtime import AdmissionController, AdmissionInfeasible, Engine def test_infeasible_reservation_fails_fast_not_busy_spin(): diff --git a/mini_fastvideo/tests/test_serving.py b/v2/tests/test_serving.py similarity index 94% rename from mini_fastvideo/tests/test_serving.py rename to v2/tests/test_serving.py index 752da8faf..c08770821 100644 --- a/mini_fastvideo/tests/test_serving.py +++ b/v2/tests/test_serving.py @@ -10,21 +10,21 @@ import asyncio import numpy as np -from mini_fastvideo._enums import WorkUnitKind -from mini_fastvideo.card import CostModel -from mini_fastvideo.deploy import ( +from v2._enums import WorkUnitKind +from v2.card import CostModel +from v2.deploy import ( DynamoWorkerAdapter, FakeDynamoRuntime, LocalFleet, NoWorkerAvailable, build_deployment_card, ) -from mini_fastvideo.extend import InterceptorChain, ObserverBus -from mini_fastvideo.models import build_default_engine, build_omni_engine, build_wan21_card, build_wan_t2v_program -from mini_fastvideo.request import DiffusionParams, OutputSpec, SamplingParams, TaskType, make_request -from mini_fastvideo.runtime import AsyncEngine, DisaggregatedRunner, Engine, PoolSet, wan_t2v_disaggregated -from mini_fastvideo.serving import OmniOpenAIServer -from mini_fastvideo.transport import ( +from v2.extend import InterceptorChain, ObserverBus +from v2.models import build_default_engine, build_omni_engine, build_wan21_card, build_wan_t2v_program +from v2.request import DiffusionParams, OutputSpec, SamplingParams, TaskType, make_request +from v2.runtime import AsyncEngine, DisaggregatedRunner, Engine, PoolSet, wan_t2v_disaggregated +from v2.serving import OmniOpenAIServer +from v2.transport import ( InProcConnector, InProcKVConnector, ShmFakeConnector, @@ -137,7 +137,7 @@ def _req(seed=1): def test_fleet_least_loaded_routes_around_busy_worker(): - from mini_fastvideo.runtime import RequestState + from v2.runtime import RequestState A, B, cardA, cardB = _two_workers() fleet = LocalFleet("least_loaded") fleet.register("A", A, cardA); fleet.register("B", B, cardB) diff --git a/mini_fastvideo/tests/test_serving_fixes.py b/v2/tests/test_serving_fixes.py similarity index 90% rename from mini_fastvideo/tests/test_serving_fixes.py rename to v2/tests/test_serving_fixes.py index efcac34c1..e706d7f98 100644 --- a/mini_fastvideo/tests/test_serving_fixes.py +++ b/v2/tests/test_serving_fixes.py @@ -3,12 +3,12 @@ from __future__ import annotations import asyncio -from mini_fastvideo.card import CostModel -from mini_fastvideo.deploy import build_deployment_card -from mini_fastvideo.models import build_default_engine, build_wan21_card, build_wan_t2v_program -from mini_fastvideo.request import Cancelled, DiffusionParams, OutputSpec, TaskType, make_request -from mini_fastvideo.runtime import AsyncEngine, PoolSet, wan_t2v_disaggregated -from mini_fastvideo.transport import InProcConnector +from v2.card import CostModel +from v2.deploy import build_deployment_card +from v2.models import build_default_engine, build_wan21_card, build_wan_t2v_program +from v2.request import Cancelled, DiffusionParams, OutputSpec, TaskType, make_request +from v2.runtime import AsyncEngine, PoolSet, wan_t2v_disaggregated +from v2.transport import InProcConnector def _disagg_engine(): @@ -101,8 +101,8 @@ def test_offline_runner_honors_cancellation(): def test_http_rejects_oversized_and_malformed_requests(): - from mini_fastvideo.runtime import AsyncEngine as AE - from mini_fastvideo.serving import OmniOpenAIServer + from v2.runtime import AsyncEngine as AE + from v2.serving import OmniOpenAIServer async def status_of(host, port, raw: bytes) -> int: r, w = await asyncio.open_connection(host, port) diff --git a/mini_fastvideo/tests/test_training.py b/v2/tests/test_training.py similarity index 93% rename from mini_fastvideo/tests/test_training.py rename to v2/tests/test_training.py index b7ba4d17f..74f84889f 100644 --- a/mini_fastvideo/tests/test_training.py +++ b/v2/tests/test_training.py @@ -7,10 +7,10 @@ from __future__ import annotations import numpy as np -from mini_fastvideo._enums import ConsistencyLevel -from mini_fastvideo.models.wan21 import build_wan21_card -from mini_fastvideo.models.wan_causal import build_wan_causal_card -from mini_fastvideo.training import ( +from v2._enums import ConsistencyLevel +from v2.models.wan21 import build_wan21_card +from v2.models.wan_causal import build_wan_causal_card +from v2.training import ( WeightRole, build_diffusion_nft, build_dmd2, diff --git a/mini_fastvideo/training/__init__.py b/v2/training/__init__.py similarity index 100% rename from mini_fastvideo/training/__init__.py rename to v2/training/__init__.py diff --git a/mini_fastvideo/training/behavior.py b/v2/training/behavior.py similarity index 100% rename from mini_fastvideo/training/behavior.py rename to v2/training/behavior.py diff --git a/mini_fastvideo/training/methods/__init__.py b/v2/training/methods/__init__.py similarity index 100% rename from mini_fastvideo/training/methods/__init__.py rename to v2/training/methods/__init__.py diff --git a/mini_fastvideo/training/methods/base.py b/v2/training/methods/base.py similarity index 100% rename from mini_fastvideo/training/methods/base.py rename to v2/training/methods/base.py diff --git a/mini_fastvideo/training/methods/diffusion_nft.py b/v2/training/methods/diffusion_nft.py similarity index 100% rename from mini_fastvideo/training/methods/diffusion_nft.py rename to v2/training/methods/diffusion_nft.py diff --git a/mini_fastvideo/training/methods/dmd2.py b/v2/training/methods/dmd2.py similarity index 100% rename from mini_fastvideo/training/methods/dmd2.py rename to v2/training/methods/dmd2.py diff --git a/mini_fastvideo/training/methods/finetune.py b/v2/training/methods/finetune.py similarity index 100% rename from mini_fastvideo/training/methods/finetune.py rename to v2/training/methods/finetune.py diff --git a/mini_fastvideo/training/methods/self_forcing.py b/v2/training/methods/self_forcing.py similarity index 100% rename from mini_fastvideo/training/methods/self_forcing.py rename to v2/training/methods/self_forcing.py diff --git a/mini_fastvideo/training/rewards.py b/v2/training/rewards.py similarity index 100% rename from mini_fastvideo/training/rewards.py rename to v2/training/rewards.py diff --git a/mini_fastvideo/training/rollout.py b/v2/training/rollout.py similarity index 100% rename from mini_fastvideo/training/rollout.py rename to v2/training/rollout.py diff --git a/mini_fastvideo/training/weight_sync.py b/v2/training/weight_sync.py similarity index 100% rename from mini_fastvideo/training/weight_sync.py rename to v2/training/weight_sync.py diff --git a/mini_fastvideo/transport/__init__.py b/v2/transport/__init__.py similarity index 100% rename from mini_fastvideo/transport/__init__.py rename to v2/transport/__init__.py diff --git a/mini_fastvideo/transport/connector.py b/v2/transport/connector.py similarity index 100% rename from mini_fastvideo/transport/connector.py rename to v2/transport/connector.py diff --git a/mini_fastvideo/transport/manifest.py b/v2/transport/manifest.py similarity index 100% rename from mini_fastvideo/transport/manifest.py rename to v2/transport/manifest.py