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

Function _is_torchao_tensor

src/diffusers/hooks/group_offloading.py:38–43  ·  view source on GitHub ↗
(tensor: torch.Tensor)

Source from the content-addressed store, hash-verified

36
37
38def _is_torchao_tensor(tensor: torch.Tensor) -> bool:
39 if not is_torchao_available():
40 return False
41 from torchao.utils import TorchAOBaseTensor
42
43 return isinstance(tensor, TorchAOBaseTensor)
44
45
46def _get_torchao_inner_tensor_names(tensor: torch.Tensor) -> list[str]:

Callers 4

_to_cpuMethod · 0.85
_offload_to_memoryMethod · 0.85

Calls 1

is_torchao_availableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…