MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / backend_supports_training

Function backend_supports_training

src/diffusers/utils/testing_utils.py:914–921  ·  view source on GitHub ↗
(device: str)

Source from the content-addressed store, hash-verified

912# These are callables which return boolean behaviour flags and can be used to specify some
913# device agnostic alternative where the feature is unsupported.
914def backend_supports_training(device: str):
915 if not is_torch_available():
916 return False
917
918 if device not in BACKEND_SUPPORTS_TRAINING:
919 device = "default"
920
921 return BACKEND_SUPPORTS_TRAINING[device]
922
923
924# Guard for when Torch is not available

Calls 1

is_torch_availableFunction · 0.85

Tested by

no test coverage detected