MCPcopy Create free account
hub / github.com/huggingface/diffusers / _get_group_onload_device

Function _get_group_onload_device

src/diffusers/hooks/group_offloading.py:1021–1025  ·  view source on GitHub ↗
(module: torch.nn.Module)

Source from the content-addressed store, hash-verified

1019
1020
1021def _get_group_onload_device(module: torch.nn.Module) -> torch.device:
1022 top_level_group_offload_hook = _get_top_level_group_offload_hook(module)
1023 if top_level_group_offload_hook is not None:
1024 return top_level_group_offload_hook.config.onload_device
1025 raise ValueError("Group offloading is not enabled for the provided module.")
1026
1027
1028def _compute_group_hash(group_id):

Callers 2

_execution_deviceMethod · 0.85
get_parameter_deviceFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…