flagged the loader as not implemented, for now

This commit is contained in:
softcookiepp
2026-11-02 14:25:51 -08:00
parent 1fe6904ad7
commit 01e3eb6e36
4 changed files with 36 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
import comfy
import comfy.model_management
# Patched version of comfy.model_management.get_torch_device that allows vulkan devices to be treated as default
def get_torch_device_patched():
global directml_enabled
global cpu_state
if directml_enabled:
global directml_device
return directml_device
if cpu_state == CPUState.MPS:
return torch.device("mps")
if cpu_state == CPUState.CPU:
return torch.device("cpu")
else:
if True:
# for now, just see if this works c:
return torch.device(f"vulkan:0")
else:
if is_intel_xpu():
return torch.device("xpu", torch.xpu.current_device())
elif is_ascend_npu():
return torch.device("npu", torch.npu.current_device())
elif is_mlu():
return torch.device("mlu", torch.mlu.current_device())
else:
return torch.device(torch.cuda.current_device())
comfy.model_management.get_torch_device = get_torch_device_patched