[Lingbot World] Bound image condition storage and extend temporal RoPE (#6838)

Signed-off-by: wtz2333 <2955110911@qq.com>
This commit is contained in:
wtz2333 authored and GitHub committed 2026-09-15 18:49:55 +08:00
1 parent 4a8ac29775
commit a3dee6fdf5
12 files changed
+592 -195

No files matched your search

@@ -1,10 +1,12 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
import json
from pathlib import Path
import pytest
from examples.offline_inference.diffusion import ar_diffusion_streaming_decode as streaming_example
from examples.offline_inference.diffusion import lingbot_world_v2 as example
pytestmark = [pytest.mark.core_model, pytest.mark.cpu, pytest.mark.diffusion]
@@ -22,3 +24,25 @@ def test_offline_ulysses_argument(tmp_path):
args.ulysses_degree = 0
with pytest.raises(ValueError, match="--ulysses-degree"):
example.build_omni_kwargs(args, paths)
@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"
action_script.write_text(json.dumps([[["w"], [], ["a"]] for _ in range(num_blocks)]))
script = streaming_example._load_action_script(action_script)
assert len(script) == num_blocks
assert (
streaming_example._validate_against_checkpoint(script, frames_per_block=3, temporal_compression=4) == num_frames
)
def test_streaming_action_script_rejects_wrong_frame_count_in_eleventh_block(tmp_path):
action_script = tmp_path / "actions.json"
action_script.write_text(json.dumps([[[], [], []] for _ in range(10)] + [[[], []]]))
script = streaming_example._load_action_script(action_script)
with pytest.raises(ValueError, match="block 10 holds 2 frame action lists"):
streaming_example._validate_against_checkpoint(script, frames_per_block=3, temporal_compression=4)