From 44ea27c8094095bbffd88fa3befdfaa55ba4bc50 Mon Sep 17 00:00:00 2001 From: Isotr0py Date: Wed, 23 Sep 2026 06:22:17 +0000 Subject: [PATCH] fix pre-commit Signed-off-by: Isotr0py --- tests/diffusion/models/qwen_image_21/test_decode_graph.py | 4 +--- tests/diffusion/offloader/test_sequential_backend.py | 2 +- .../models/qwen_image_21/qwen_image_21_transformer.py | 3 +-- vllm_omni/diffusion/offloader/sequential_backend.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/diffusion/models/qwen_image_21/test_decode_graph.py b/tests/diffusion/models/qwen_image_21/test_decode_graph.py index e0ccfb17c..ea1141597 100644 --- a/tests/diffusion/models/qwen_image_21/test_decode_graph.py +++ b/tests/diffusion/models/qwen_image_21/test_decode_graph.py @@ -205,9 +205,7 @@ def test_replay_uses_active_request_and_layout(graph_case): register(manager, second) assert decode(manager, second) is None output = decode(manager, first) - expected = ( - torch.ones_like(output).sin() + first[0]["cond"]["key"].mean() + first[0]["cond"]["value"].mean() + 2 - ) + expected = torch.ones_like(output).sin() + first[0]["cond"]["key"].mean() + first[0]["cond"]["value"].mean() + 2 torch.testing.assert_close(output, expected) # Once the owner's cache is released, the key is free to adopt. del first diff --git a/tests/diffusion/offloader/test_sequential_backend.py b/tests/diffusion/offloader/test_sequential_backend.py index 26117604b..7c676d858 100644 --- a/tests/diffusion/offloader/test_sequential_backend.py +++ b/tests/diffusion/offloader/test_sequential_backend.py @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project +# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project """Unit tests for SequentialOffloadBackend.""" diff --git a/vllm_omni/diffusion/models/qwen_image_21/qwen_image_21_transformer.py b/vllm_omni/diffusion/models/qwen_image_21/qwen_image_21_transformer.py index b351e052b..d4e06c3b0 100644 --- a/vllm_omni/diffusion/models/qwen_image_21/qwen_image_21_transformer.py +++ b/vllm_omni/diffusion/models/qwen_image_21/qwen_image_21_transformer.py @@ -920,8 +920,7 @@ class QwenImage21Transformer2DModel(CachedTransformer): self, max_entries=cuda_graph_max_decode_graphs, model_level_offload=( - od_config.enable_cpu_offload - or getattr(od_config, "enable_distributed_layerwise_offload", False) + od_config.enable_cpu_offload or getattr(od_config, "enable_distributed_layerwise_offload", False) ), ) if self.enable_cuda_graph_decode diff --git a/vllm_omni/diffusion/offloader/sequential_backend.py b/vllm_omni/diffusion/offloader/sequential_backend.py index 13e15e186..8023480ba 100644 --- a/vllm_omni/diffusion/offloader/sequential_backend.py +++ b/vllm_omni/diffusion/offloader/sequential_backend.py @@ -420,8 +420,7 @@ class ModelLevelOffloadBackend(OffloadBackend): # plain move semantics so offloading actually frees DiT VRAM # while the encoders run. persistent_dit_staging=( - self.device.type == "cuda" - and any(getattr(dit, "enable_cuda_graph_decode", False) for dit in dits) + self.device.type == "cuda" and any(getattr(dit, "enable_cuda_graph_decode", False) for dit in dits) ), ) except BaseException: