add explicit sync for vae preview

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-10-16 19:25:12 -04:00
parent 2cf9938d97
commit a4bc61919d
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict = {}
t0 = time.time()
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"):
elif (devices.backend == "zluda") or (devices.backend == "rocm") or (devices.backend == "cuda"):
torch.cuda.synchronize(devices.device)
latents = kwargs.get('latents', None)
if debug: