Targets the three design_v3 claims that were most load-bearing AND least exercised (sessions/realtime, training-plane boundary, the WorkUnit-generality falsifier). All fit with no new runtime primitive (127 tests pass). 1. Interactive world-model session (runtime/session.py, §9.8) — the Session plane had ZERO coverage. WorldModelSession drives the causal chunk_rollout loop as a long-lived session: persistent cross-request world state on the Session.kv_handle, frame streaming, transactional step-boundary cancellation (a cancelled act leaves the world resumable), no cross-session smearing. Added only a continuation seam to the chunk loop (init seeds context from a world_context slot; default empty = unchanged one-shot path). 5 tests. 2. End-to-end RL over a cross-model workflow (training/methods/workflow_rl.py, §9.9) — trains BOTH flux-t2i and wan-i2v from ONE final-video reward. Rolls out the whole workflow with SDE capture in both instances; the same final advantage drives FlowGRPO PPO on each stage's transformer; two WeightSyncPlans on two instances. The earlier model (T2I) is trained by a reward on the final video — end-to-end credit across a model boundary — proven causal by a control (constant reward => zero advantage => nothing moves). 4 tests. 3. Heterogeneous WorkUnit co-scheduling (models/tiled/, §9.10) — the §17 falsifier. VAETileLoop makes VAE decode a loop of VAE_TILE units; tiling is exact (== one-shot, C0), and VAE_TILE + DIFFUSION_STEP pipelines interleave bit-identically and co-run in one batch. Validates the mechanism; the economic half (does it pay) stays a port-time measurement. 4 tests. designv4 §9.8–§9.10 + falsifier/layout/closing updates (127 tests, 20 files).
23 lines
972 B
Python
23 lines
972 B
Python
"""Training methods — all on Wan2.1-1.3B, all over the SHARED loops (design_v3 §10)."""
|
|
from __future__ import annotations
|
|
|
|
from .base import TrainingMethod, new_instance, predict_x0
|
|
from .diffusion_nft import DiffusionNFTMethod, build_diffusion_nft
|
|
from .dmd2 import DMD2Method, build_dmd2
|
|
from .finetune import FineTuneMethod, build_finetune
|
|
from .joint_multi_rl import JointMultiExpertRL, build_joint_multi_rl
|
|
from .self_forcing import SelfForcingMethod, build_self_forcing
|
|
from .unified_rl import UnifiedRLMethod, build_unified_rl
|
|
from .workflow_rl import WorkflowRLMethod, build_workflow_rl
|
|
|
|
__all__ = [
|
|
"TrainingMethod", "new_instance", "predict_x0",
|
|
"FineTuneMethod", "build_finetune",
|
|
"DMD2Method", "build_dmd2",
|
|
"DiffusionNFTMethod", "build_diffusion_nft",
|
|
"SelfForcingMethod", "build_self_forcing",
|
|
"UnifiedRLMethod", "build_unified_rl",
|
|
"JointMultiExpertRL", "build_joint_multi_rl",
|
|
"WorkflowRLMethod", "build_workflow_rl",
|
|
]
|