mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Memory optimizations. Default to using cudamalloc when torch 2.0 for mem allocation
This commit is contained in:
@@ -813,6 +813,10 @@ class BaseSDTrainProcess(BaseTrainProcess):
|
||||
if isinstance(batch, DataLoaderBatchDTO):
|
||||
batch.cleanup()
|
||||
|
||||
# flush every 10 steps
|
||||
if self.step_num % 10 == 0:
|
||||
flush()
|
||||
|
||||
self.progress_bar.close()
|
||||
self.sample(self.step_num + 1)
|
||||
print("")
|
||||
|
||||
Reference in New Issue
Block a user