handle os err

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-12-06 07:36:20 -05:00
parent 16ab1e2ae8
commit 2a1fbd904f
+2 -2
View File
@@ -20,10 +20,10 @@ def memory_stats():
mem.update({ 'ram': ram })
except Exception as e:
if not fail_once:
shared.log.error('Memory stats: {e}')
shared.log.error(f'Memory stats: {e}')
errors.display(e, 'Memory stats')
fail_once = True
mem.update({ 'ram': str(e) })
mem.update({ 'ram': { 'error': str(e) } })
try:
s = torch.cuda.mem_get_info()
gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) }