mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-09 15:36:01 +02:00
Skip the face-stage dtype guard without the qwen-zimage extra
CI's base test job installs the library without that extra, so the test died on `import transformers` before reaching a single assertion. It monkeypatches the Z-Image and SAM loaders rather than calling them, but the modules still have to be importable to be patched, so pytest.importorskip is the right gate: the guard still runs everywhere the extra is present and skips where it cannot. Local runs could not have caught this - the dev environment has the extra. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b0ca2054f6
commit
691f5d88c2
@@ -203,8 +203,12 @@ def test_face_stage_loads_in_its_own_dtype_when_the_global_stage_differs(monkeyp
|
||||
consistently-wrong value.
|
||||
"""
|
||||
import torch
|
||||
import transformers
|
||||
from diffsynth.pipelines import z_image
|
||||
|
||||
# The loaders this asserts on are monkeypatched, not called, but the modules still
|
||||
# have to be importable to be patched -- and CI's base job installs the library
|
||||
# without the qwen-zimage extra.
|
||||
transformers = pytest.importorskip("transformers")
|
||||
z_image = pytest.importorskip("diffsynth.pipelines.z_image")
|
||||
|
||||
from remove_ai_watermarks._internal.sdxl_zimage_pipeline import SdxlZImagePipeline
|
||||
|
||||
|
||||
Reference in New Issue
Block a user