From 2a1fbd904fb871d1fbd911c9455ccbf26e56eb10 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 6 Dec 2024 07:36:20 -0500 Subject: [PATCH] handle os err Signed-off-by: Vladimir Mandic --- modules/memstats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/memstats.py b/modules/memstats.py index 7836f7636..fd5f152a0 100644 --- a/modules/memstats.py +++ b/modules/memstats.py @@ -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]) }