Signed-off-by: Vladimir Mandic <mandic00@live.com>
pull/4089/head
Vladimir Mandic 2025-07-31 17:33:44 -04:00
parent fe14bae537
commit b120778c4f
3 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@ scripts_postproc = None
def register_runners():
global scripts_txt2img, scripts_img2img, scripts_control, scripts_current, scripts_postproc
global scripts_txt2img, scripts_img2img, scripts_control, scripts_current, scripts_postproc # pylint: disable=global-statement
scripts_txt2img = scripts_manager.scripts_txt2img
scripts_img2img = scripts_manager.scripts_img2img
scripts_control = scripts_manager.scripts_control

View File

@ -87,8 +87,8 @@ elif cmd_opts.use_directml:
devices.backend = devices.get_backend(cmd_opts)
devices.device = devices.get_optimal_device()
mem_stat = memory_stats()
cpu_memory = mem_stat['ram']['total'] if "ram" in mem_stat else 0
gpu_memory = mem_stat['gpu']['total'] if "gpu" in mem_stat else 0
cpu_memory = round(mem_stat['ram']['total'] if "ram" in mem_stat else 0)
gpu_memory = round(mem_stat['gpu']['total'] if "gpu" in mem_stat else 0)
native = backend == Backend.DIFFUSERS
if not files_cache.do_cache_folders:
log.warning('File cache disabled: ')

View File

@ -8,7 +8,6 @@ def get_default_modes(cmd_opts, mem_stat):
default_diffusers_offload_max_gpu_memory = 0.6
default_diffusers_offload_always = ''
default_diffusers_offload_never = ''
cpu_memory = round(mem_stat['ram']['total'] if "ram" in mem_stat else 0)
gpu_memory = round(mem_stat['gpu']['total'] if "gpu" in mem_stat else 0)
if not (cmd_opts.lowvram or cmd_opts.medvram):
if "gpu" in mem_stat: