Force synchronize with ipex

This commit is contained in:
Disty0
2025-09-02 14:26:35 +03:00
parent aa9a5a678e
commit a4e51759b9
+3 -1
View File
@@ -54,7 +54,9 @@ def diffusers_callback_legacy(step: int, timestep: int, latents: typing.Union[to
def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict = {}):
t0 = time.time()
if devices.backend == "zluda" or (devices.backend == "rocm" and sys.platform == "win32"):
if devices.backend == "ipex": # xe driver on linux needs this
torch.xpu.synchronize(devices.device)
elif devices.backend == "zluda" or (devices.backend == "rocm" and sys.platform == "win32"):
torch.cuda.synchronize(devices.device)
latents = kwargs.get('latents', None)
if debug: