Spaces:
Running on Zero
Running on Zero
File size: 604 Bytes
46d16df 0ea6ca2 46d16df | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """L1 tests for device autodetect — no torch needed if we mock importlib."""
from __future__ import annotations
import ace_pipeline as ap
def test_detect_device_returns_one_of_cuda_mps_cpu():
device = ap.detect_device()
assert device in {"cuda", "mps", "cpu"}
def test_vram_limit_for_mps_is_none():
"""MPS has no torch.mps.mem_get_info; return None so DiffSynth-style gates
short-circuit instead of crashing (z-image-studio paid this debug cycle)."""
assert ap.vram_limit_for("mps") is None
def test_vram_limit_for_cpu_is_none():
assert ap.vram_limit_for("cpu") is None
|