Revert xpu.optimize in training

This commit is contained in:
Disty0
2023-06-13 15:36:41 +03:00
parent f510abed39
commit 0d101b9def
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -590,8 +590,7 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi
print(e)
if shared.cmd_opts.use_ipex:
shared.sd_model.train()
shared.sd_model, optimizer = torch.xpu.optimize(shared.sd_model.to(dtype=torch.float32), optimizer=optimizer, dtype=devices.dtype)
pass
else:
scaler = torch.cuda.amp.GradScaler()