MCPcopy Index your code
hub / github.com/huggingface/diffusers / decorator

Function decorator

src/diffusers/utils/testing_utils.py:317–321  ·  view source on GitHub ↗
(test_case)

Source from the content-addressed store, hash-verified

315 """Decorator marking a test that requires torch with a specific version or greater."""
316
317 def decorator(test_case):
318 correct_torch_version = is_torch_available() and is_torch_version(">=", torch_version)
319 return unittest.skipUnless(
320 correct_torch_version, f"test requires torch with the version greater than or equal to {torch_version}"
321 )(test_case)
322
323 return decorator
324

Callers

nothing calls this directly

Calls 11

is_torch_availableFunction · 0.85
is_torch_versionFunction · 0.85
is_peft_availableFunction · 0.85
is_accelerate_availableFunction · 0.85
is_gguf_availableFunction · 0.85
is_torchao_availableFunction · 0.85
is_kernels_availableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…