add account for reserved VRAM gap by CudaMallocAsync on extra memory

This commit is contained in:
Balladie 2025-12-06 12:25:11 +00:00
parent 3c8456223c
commit 970c107ff8

View File

@ -572,6 +572,9 @@ if args.reserve_vram is not None:
EXTRA_RESERVED_VRAM = args.reserve_vram * 1024 * 1024 * 1024
logging.debug("Reserving {}MB vram for other applications.".format(EXTRA_RESERVED_VRAM / (1024 * 1024)))
if is_nvidia() and not args.disable_cuda_malloc:
EXTRA_RESERVED_VRAM += 32 * 1024 * 1024
def extra_reserved_memory():
return EXTRA_RESERVED_VRAM