Skip to content

Commit 73a914e

Browse files
leisuzz蒋硕sayakpaul
committed
[bugfix] bugfix for npu free memory (#9640)
* Improve NPU performance * Improve NPU performance * Improve NPU performance * Improve NPU performance * [bugfix] bugfix for npu free memory * [bugfix] bugfix for npu free memory * [bugfix] bugfix for npu free memory --------- Co-authored-by: 蒋硕 <[email protected]> Co-authored-by: Sayak Paul <[email protected]>
1 parent 8df1912 commit 73a914e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/training_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def free_memory():
284284
elif torch.backends.mps.is_available():
285285
torch.mps.empty_cache()
286286
elif is_torch_npu_available():
287-
torch_npu.empty_cache()
287+
torch_npu.npu.empty_cache()
288288

289289

290290
# Adapted from torch-ema https://github.com/fadel/pytorch_ema/blob/master/torch_ema/ema.py#L14

0 commit comments

Comments
 (0)