From a4e51759b91e3b7d973300e3a5909b28273ac9b1 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Tue, 2 Sep 2025 14:26:35 +0300 Subject: [PATCH] Force synchronize with ipex --- modules/processing_callbacks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/processing_callbacks.py b/modules/processing_callbacks.py index 447358226..46067e0c2 100644 --- a/modules/processing_callbacks.py +++ b/modules/processing_callbacks.py @@ -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: