From 0f7b7e83bcbb5b5f0bdae2af33668776af11669f Mon Sep 17 00:00:00 2001 From: Disty0 Date: Mon, 12 Aug 2024 01:41:54 +0300 Subject: [PATCH] Fix memory detection when no gpu is present --- modules/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index d747344d7..4e8ba659d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -352,12 +352,12 @@ def temp_disable_extensions(): cmd_opts.controlnet_loglevel = 'WARNING' return disabled +gpu_memory = 0 +offload_mode_default = "none" mem_stat = memory_stats() if "gpu" in mem_stat: gpu_memory = mem_stat['gpu']['total'] -else: - gpu_memory = 0 if not (cmd_opts.lowvram or cmd_opts.medvram): if "gpu" in mem_stat: