From 40443a98f52e9227dc15eb150487c96bda0245d2 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:44:50 +0800 Subject: [PATCH] show available RAM, fixed SD vae tiling noise --- koboldcpp.py | 15 +++++++++++---- otherarch/sdcpp/ggml_extend.hpp | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index b99694b01..3a469945d 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1213,10 +1213,6 @@ def fetch_gpu_properties(testCL,testCU,testVK): MaxMemory[0] = max(lowestclmem,MaxMemory[0]) except Exception: pass - if MaxMemory[0]>0: - print(f"Detected Free GPU Memory: {int(MaxMemory[0]/1024/1024)} MB (Set GPU layers manually if incorrect)") - else: - print("Unable to determine GPU Memory") return def auto_set_backend_cli(): @@ -6672,6 +6668,17 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False): args.threads = get_default_threads() print(f"Auto Set Threads: {args.threads}") + if MaxMemory[0]>0: + print(f"Detected Available GPU Memory: {int(MaxMemory[0]/1024/1024)} MB") + else: + print("Unable to determine GPU Memory") + try: + import psutil + vmem = psutil.virtual_memory() + print(f"Detected Available RAM: {int(vmem.available/1024/1024)} MB") + except Exception: + print("Unable to determine available RAM") + init_library() # Note: if blas does not exist and is enabled, program will crash. print("==========") time.sleep(1) diff --git a/otherarch/sdcpp/ggml_extend.hpp b/otherarch/sdcpp/ggml_extend.hpp index f121c1f8c..44bfbffb0 100644 --- a/otherarch/sdcpp/ggml_extend.hpp +++ b/otherarch/sdcpp/ggml_extend.hpp @@ -604,6 +604,7 @@ typedef std::function on_tile_process; // Tiling __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const int scale, const int tile_size, const float tile_overlap_factor, on_tile_process on_processing) { + output = ggml_set_f32(output, 0); int input_width = (int)input->ne[0]; int input_height = (int)input->ne[1]; int output_width = (int)output->ne[0];