diff --git a/modules/devices.py b/modules/devices.py index 70fe1271b..4a47644f5 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -228,6 +228,9 @@ def get_stats(): force = True if reason is None: reason = 'oom' + if debug: + fn = f'{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access + log.trace(f'GC: run={force} fast={fast} used={used_gpu} threshold={threshold} fn={fn}') if force: # actual gc collected = gc.collect() if not fast else 0 # python gc