Skip to content

Commit 2ace663

Browse files
committed
fix(diffusers/xpu): Set device to XPU and ignore CUDA request when on Intel
Signed-off-by: Richard Palethorpe <[email protected]>
1 parent 5e82bd4 commit 2ace663

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/python/diffusers/backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
FRAMES = os.environ.get("FRAMES", "64")
3939

4040
if XPU:
41-
import intel_extension_for_pytorch as ipex
42-
43-
print(ipex.xpu.get_device_name(0))
41+
print(torch.xpu.get_device_name(0))
4442

4543
# If MAX_WORKERS are specified in the environment use it, otherwise default to 1
4644
MAX_WORKERS = int(os.environ.get('PYTHON_GRPC_MAX_WORKERS', '1'))

0 commit comments

Comments
 (0)