From 466f86c45aed8312e957481682405493a5fac568 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 4 Jul 2026 07:26:56 +0000 Subject: [PATCH] Skip the krea-2 forward roundtrip test on hosts without diffusers spec.forward imports Krea2Pipeline for prepare_position_ids, so the test needs a real diffusers install; the backend CI matrix runs without one and failed on the import. Same importorskip guard the sigmas gather test already uses. --- studio/backend/tests/test_diffusion_krea2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/studio/backend/tests/test_diffusion_krea2.py b/studio/backend/tests/test_diffusion_krea2.py index f2bfcac2f0..82649c1a6e 100644 --- a/studio/backend/tests/test_diffusion_krea2.py +++ b/studio/backend/tests/test_diffusion_krea2.py @@ -6,6 +6,8 @@ import json import sys from types import SimpleNamespace +import pytest + from core.inference.diffusion_krea2 import ( KREA2_FAMILY_NAME, _load_model_index, @@ -187,6 +189,9 @@ def test_krea2_spec_registered_with_authors_targets(): def test_krea2_collate_and_forward_roundtrip(): + # spec.forward imports Krea2Pipeline (prepare_position_ids), so this needs a real + # diffusers install; CI hosts run the backend suite without one. + pytest.importorskip("diffusers") import torch from core.training.diffusion_dit_trainer import _SPECS