Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion examples/offline_inference/diffusion/lingbot_world_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def build_omni_kwargs(
"tensor_parallel_size": args.tensor_parallel_size,
"ulysses_degree": args.ulysses_degree,
"enforce_eager": args.enforce_eager,
"model_config": {"lingbot_action_root": str(paths.action_root)},
"stage_0_model_config": {"lingbot_action_root": str(paths.action_root)},
}


Expand Down
19 changes: 19 additions & 0 deletions tests/examples/offline_inference/test_lingbot_world_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ def test_offline_ulysses_argument(tmp_path):
example.build_omni_kwargs(args, paths)


def test_action_root_uses_stage_scoped_model_config(tmp_path):
argv = ["--image", "frame.jpg", "--action-dir", "forward", "--prompt", "A lake"]
paths = example.LingBotPaths(
tmp_path / "frame.jpg", tmp_path / "forward", tmp_path, Path("forward"), 9, tmp_path / "out.mp4"
)
kwargs = example.build_omni_kwargs(example.parse_args(argv), paths)

assert kwargs["stage_0_model_config"] == {"lingbot_action_root": str(paths.action_root)}
assert "model_config" not in kwargs
assert set(kwargs) == {
"model",
"flow_shift",
"tensor_parallel_size",
"ulysses_degree",
"enforce_eager",
"stage_0_model_config",
}


@pytest.mark.parametrize(("num_blocks", "num_frames"), [(10, 117), (11, 129)])
def test_streaming_action_script_accepts_long_rollouts(tmp_path, num_blocks, num_frames):
action_script = tmp_path / "actions.json"
Expand Down
Loading