From f029de6e4698325754ebe1128ad12c288ea84d9e Mon Sep 17 00:00:00 2001 From: YellowRoseCx <80486540+YellowRoseCx@users.noreply.github.com> Date: Mon, 14 Oct 2024 08:10:41 -0400 Subject: [PATCH] Merge pull request #69 from matoro/main (#1165) Fix gpulayers autodetection for cublas & clblast backends --- koboldcpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index 50c002eeb4107..65ebfbd24e7ff 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -4088,7 +4088,7 @@ def main(launch_args,start_server=True): fetch_gpu_properties(False,True,True) pass if args.gpulayers==-1: - if MaxMemory[0] > 0 and (not args.usecpu) and (args.usecublas or (args.usevulkan is not None) or args.useclblast or sys.platform=="darwin"): + if MaxMemory[0] > 0 and (not args.usecpu) and ((args.usecublas is not None) or (args.usevulkan is not None) or (args.useclblast is not None) or sys.platform=="darwin"): extract_modelfile_params(args.model_param,args.sdmodel,args.whispermodel,args.mmproj) layeramt = autoset_gpu_layers(args.contextsize,args.sdquant,args.blasbatchsize) print(f"Auto Recommended GPU Layers: {layeramt}")