[Core] add clean up method for diffusion engine (#219)

Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
This commit is contained in:
Jiangyun Zhu authored and GitHub committed 2025-12-08 03:52:07 +00:00
1 parent 02b1b36c6d
commit aa689e6af0
13 files changed
+309 -10

No files matched your search

+13 -2
View File
@@ -1,9 +1,20 @@
import os
import sys
from pathlib import Path
import pytest
import torch
# ruff: noqa: E402
REPO_ROOT = Path(__file__).resolve().parents[2]
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))
from vllm_omni import Omni
models = ["Tongyi-MAI/Z-Image-Turbo"]
os.environ["VLLM_TEST_CLEAN_GPU_MEMORY"] = "1"
models = ["Tongyi-MAI/Z-Image-Turbo", "riverclouds/qwen_image_random"]
@pytest.mark.parametrize("model_name", models)
@@ -25,4 +36,4 @@ def test_diffusion_model(model_name: str):
# check image size
assert images[0].width == width
assert images[0].height == height
images[0].save("z_image_output.png")
images[0].save("image_output.png")