Replace hard-coded cuda generator with current_omni_platform.device_type (#1677)

Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
This commit is contained in:
Daniel Huang authored and GitHub committed 2026-03-05 06:53:30 +00:00
1 parent 58eb1c68db
commit 24c80070d6
3 files changed
+7 -4

No files matched your search

+2 -1
View File
@@ -17,6 +17,7 @@ import torch
from tests.utils import hardware_test
from vllm_omni.inputs.data import OmniDiffusionSamplingParams
from vllm_omni.platforms import current_omni_platform
# ruff: noqa: E402
REPO_ROOT = Path(__file__).resolve().parents[2]
@@ -63,7 +64,7 @@ def test_teacache(model_name: str):
width=width,
num_inference_steps=num_inference_steps,
guidance_scale=0.0,
generator=torch.Generator("cuda").manual_seed(42),
generator=torch.Generator(current_omni_platform.device_type).manual_seed(42),
num_outputs_per_prompt=1, # Single output for speed
),
)