DirectML fix some samplers (unipc, euler, etc)

This commit is contained in:
Seunghoon Lee
2024-05-09 01:46:39 +09:00
parent 0b420eaf44
commit 78e5747a92
6 changed files with 142 additions and 97 deletions
+2
View File
@@ -62,6 +62,8 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
def diffusers_callback(pipe, step: int, timestep: int, kwargs: dict):
latents = kwargs.get('latents', None)
if torch.is_tensor(latents) and latents.device.type == "privateuseone":
torch.dml.synchronize_tensor(latents) # DML synchronize
debug_callback(f'Callback: step={step} timestep={timestep} latents={latents.shape if latents is not None else None} kwargs={list(kwargs)}')
shared.state.sampling_step = step
if shared.state.interrupted or shared.state.skipped: