[Model] Add LingBot World Ulysses sequence parallelism (#6841)
Signed-off-by: wtz2333 <2955110911@qq.com> Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk>
This commit is contained in:
1 parent
de9a133d48
commit
02aaa34059
8 files changed
+659
-45
No files matched your search
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from examples.offline_inference.diffusion import lingbot_world_v2 as example
|
||||
|
||||
pytestmark = [pytest.mark.core_model, pytest.mark.cpu, pytest.mark.diffusion]
|
||||
|
||||
|
||||
def test_offline_ulysses_argument(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"
|
||||
)
|
||||
assert example.parse_args(argv).ulysses_degree == 1
|
||||
args = example.parse_args([*argv, "--ulysses-degree", "4"])
|
||||
kwargs = example.build_omni_kwargs(args, paths)
|
||||
assert kwargs["ulysses_degree"] == 4 and kwargs["tensor_parallel_size"] == 1
|
||||
args.ulysses_degree = 0
|
||||
with pytest.raises(ValueError, match="--ulysses-degree"):
|
||||
example.build_omni_kwargs(args, paths)
|
||||
Reference in new issue
Block a user