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

Method device

src/diffusers/models/modeling_utils.py:1901–1906  ·  view source on GitHub ↗

`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).

(self)

Source from the content-addressed store, hash-verified

1899
1900 @property
1901 def device(self) -> torch.device:
1902 """
1903 `torch.device`: The device on which the module is (assuming that all the module parameters are on the same
1904 device).
1905 """
1906 return get_parameter_device(self)
1907
1908 @property
1909 def dtype(self) -> torch.dtype:

Callers 15

randn_tensorFunction · 0.45
testing_utils.pyFile · 0.45
_is_torch_fp16_availableFunction · 0.45
_is_torch_fp64_availableFunction · 0.45
from_single_fileMethod · 0.45
unload_lora_weightsMethod · 0.45
enable_group_offloadMethod · 0.45
from_pretrainedMethod · 0.45
toMethod · 0.45
enable_parallelismMethod · 0.45

Calls 1

get_parameter_deviceFunction · 0.85

Tested by 2

_is_torch_fp16_availableFunction · 0.36
_is_torch_fp64_availableFunction · 0.36