mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Fix torch.linalg.solve with IPEX & Diffusers UniPC
This commit is contained in:
@@ -685,12 +685,7 @@ class UniPC:
|
||||
if order == 2:
|
||||
rhos_p = torch.tensor([0.5], device=b.device)
|
||||
else:
|
||||
if shared.cmd_opts.use_ipex:
|
||||
#Running torch.linalg.solve on XPU crashes the GPU.
|
||||
rhos_p = torch.linalg.solve(R[:-1, :-1].to("cpu"), b[:-1].to("cpu"))
|
||||
rhos_p = rhos_p.to(b.device)
|
||||
else:
|
||||
rhos_p = torch.linalg.solve(R[:-1, :-1], b[:-1])
|
||||
rhos_p = torch.linalg.solve(R[:-1, :-1], b[:-1])
|
||||
else:
|
||||
D1s = None
|
||||
|
||||
@@ -700,12 +695,7 @@ class UniPC:
|
||||
if order == 1:
|
||||
rhos_c = torch.tensor([0.5], device=b.device)
|
||||
else:
|
||||
if shared.cmd_opts.use_ipex:
|
||||
#Running torch.linalg.solve on XPU crashes the GPU.
|
||||
rhos_c = torch.linalg.solve(R.to("cpu"), b.to("cpu"))
|
||||
rhos_c = rhos_c.to(b.device)
|
||||
else:
|
||||
rhos_c = torch.linalg.solve(R, b)
|
||||
rhos_c = torch.linalg.solve(R, b)
|
||||
|
||||
model_t = None
|
||||
if self.predict_x0:
|
||||
|
||||
Reference in New Issue
Block a user