exception handler for memmon

This commit is contained in:
Vladimir Mandic
2024-02-25 08:09:43 -05:00
parent ffb8f16b7b
commit f73e3a3bcf
2 changed files with 11 additions and 7 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
# Change Log for SD.Next
## Update for 2024-02-24
## Update for 2024-02-25
- **Image2Video**
- new module for creating videos from images
@@ -19,6 +19,7 @@
- **Fixes**
- improve model offload compatibility
- fix extra networks refresh
- exception handler around vram memory stats gather
- improve ZLUDA installer with `--use-zluda` cli param, thanks @lshqqytiger
## Update for 2024-02-22
+9 -6
View File
@@ -28,12 +28,15 @@ class MemUsageMonitor():
def reset(self):
if not self.disabled:
torch.cuda.reset_peak_memory_stats(self.device)
self.data['retries'] = 0
self.data['oom'] = 0
# torch.cuda.reset_accumulated_memory_stats(self.device)
# torch.cuda.reset_max_memory_allocated(self.device)
# torch.cuda.reset_max_memory_cached(self.device)
try:
torch.cuda.reset_peak_memory_stats(self.device)
self.data['retries'] = 0
self.data['oom'] = 0
# torch.cuda.reset_accumulated_memory_stats(self.device)
# torch.cuda.reset_max_memory_allocated(self.device)
# torch.cuda.reset_max_memory_cached(self.device)
except Exception:
pass
def read(self):
if not self.disabled: