mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Merge branch 'cast_intel' of https://github.com/simonlui/ComfyUI
This commit is contained in:
commit
ae87543653
@ -488,6 +488,8 @@ def cast_to_device(tensor, device, dtype, copy=False):
|
|||||||
elif tensor.dtype == torch.bfloat16:
|
elif tensor.dtype == torch.bfloat16:
|
||||||
if hasattr(device, 'type') and device.type.startswith("cuda"):
|
if hasattr(device, 'type') and device.type.startswith("cuda"):
|
||||||
device_supports_cast = True
|
device_supports_cast = True
|
||||||
|
elif is_intel_xpu():
|
||||||
|
device_supports_cast = True
|
||||||
|
|
||||||
if device_supports_cast:
|
if device_supports_cast:
|
||||||
if copy:
|
if copy:
|
||||||
|
Loading…
Reference in New Issue
Block a user