minimax preview

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-31 17:13:11 +02:00
parent b8ba831a56
commit bed6bfc530
12 changed files with 52 additions and 24 deletions
+10 -7
View File
@@ -56,13 +56,7 @@ def diffusers_callback_legacy(step: int, timestep: int, latents: torch.FloatTens
time.sleep(0.1)
def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict | None = None):
if kwargs is None:
kwargs = {}
t0 = time.time()
from modules.lora import lora_stack
lora_stack.on_step(step)
def torch_sync():
if shared.opts.torch_sync:
if devices.backend == "ipex":
torch.xpu.synchronize(devices.device)
@@ -70,6 +64,15 @@ def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict | No
torch.cuda.synchronize(devices.device)
time.sleep(0.001) # 1ms yield frees GIL for the preview thread
def diffusers_callback(pipe, step: int = 0, timestep: int = 0, kwargs: dict | None = None):
if kwargs is None:
kwargs = {}
t0 = time.time()
from modules.lora import lora_stack
lora_stack.on_step(step)
torch_sync()
t1 = time.time()
if shared.state.paused: