Spaces:
Running
on
Zero
Running
on
Zero
oyly
commited on
Commit
·
35e2e6a
1
Parent(s):
218c3da
del last loss
Browse files- flux/sampling_lore.py +1 -0
flux/sampling_lore.py
CHANGED
@@ -348,6 +348,7 @@ def denoise_with_noise_optim(
|
|
348 |
trainable_noise.grad *= source_mask[0]
|
349 |
optimizer.step()
|
350 |
print(f"Time {t_curr:.4f} Step {j+1}/{training_epochs}, Loss: {total_loss.item():.6f}")
|
|
|
351 |
torch.cuda.empty_cache()
|
352 |
torch.cuda.synchronize()
|
353 |
|
|
|
348 |
trainable_noise.grad *= source_mask[0]
|
349 |
optimizer.step()
|
350 |
print(f"Time {t_curr:.4f} Step {j+1}/{training_epochs}, Loss: {total_loss.item():.6f}")
|
351 |
+
del total_loss,attn_maps
|
352 |
torch.cuda.empty_cache()
|
353 |
torch.cuda.synchronize()
|
354 |
|