Skip to content

Commit 53f3c64

Browse files
author
蒋硕
committed
NPU implementation for FLUX
1 parent ad90fa1 commit 53f3c64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/dreambooth/train_dreambooth_flux.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ def log_validation(
193193
del pipeline
194194
if torch.cuda.is_available():
195195
torch.cuda.empty_cache()
196+
elif is_torch_npu_available():
197+
torch_npu.npu.empty_cache()
196198

197199
return images
198200

0 commit comments

Comments
 (0)