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

Function backend_supports_training

tests/testing_utils.py:1536–1543  ·  view source on GitHub ↗
(device: str)

Source from the content-addressed store, hash-verified

1534# These are callables which return boolean behaviour flags and can be used to specify some
1535# device agnostic alternative where the feature is unsupported.
1536def backend_supports_training(device: str):
1537 if not is_torch_available():
1538 return False
1539
1540 if device not in BACKEND_SUPPORTS_TRAINING:
1541 device = "default"
1542
1543 return BACKEND_SUPPORTS_TRAINING[device]
1544
1545
1546# Guard for when Torch is not available

Calls 1

is_torch_availableFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…