diff --git a/koboldcpp.py b/koboldcpp.py index 4202f7f1d..471481c68 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -64,7 +64,7 @@ dry_seq_break_max = 128 extra_images_max = 4 # global vars -KcppVersion = "1.99.2" +KcppVersion = "1.99.3" showdebug = True kcpp_instance = None #global running instance global_memory = {"tunnel_url": "", "restart_target":"", "input_to_exit":False, "load_complete":False, "restart_override_config_target":""} diff --git a/otherarch/ttscpp/src/kokoro_model.h b/otherarch/ttscpp/src/kokoro_model.h index 00ef1b6ae..808f78761 100644 --- a/otherarch/ttscpp/src/kokoro_model.h +++ b/otherarch/ttscpp/src/kokoro_model.h @@ -302,7 +302,7 @@ struct kokoro_model : tts_model { compute_tensor_meta_cb = &fn; prep_constants(meta_ctx); prep_layers(meta_ctx); - tts_model::setup_from_file(meta_ctx, load_context, cpu_only, "kokoro", 1.6, post_load_tensor_bytes + 4096); //add some extra space + tts_model::setup_from_file(meta_ctx, load_context, cpu_only, "kokoro", 1.6, post_load_tensor_bytes); } }; diff --git a/otherarch/ttscpp/src/tts_model.cpp b/otherarch/ttscpp/src/tts_model.cpp index 13dcb875a..d4e5f6087 100644 --- a/otherarch/ttscpp/src/tts_model.cpp +++ b/otherarch/ttscpp/src/tts_model.cpp @@ -104,10 +104,16 @@ void tts_model::prep_buffers_and_context(bool cpu_only, float size_offset, uint3 } size_t ctx_size = ggml_tensor_overhead() * (tensor_meta.n_tensors * size_offset); struct ggml_init_params params = { - /*.mem_size =*/ ctx_size + 4096, + /*.mem_size =*/ ctx_size, /*.mem_buffer =*/ NULL, /*.no_alloc =*/ true, }; + if(dedicated_add_on_size>13000) + { + printf("Clamp TTS addon memory %zu to 13000\n",dedicated_add_on_size); + dedicated_add_on_size = 13000; + } + printf("TTS Memory Requested: %zu, with buffer %zu + %zu\n",ctx_size,tensor_meta.n_bytes,dedicated_add_on_size); ctx = ggml_init(params); buf = ggml_backend_buft_alloc_buffer(buffer, tensor_meta.n_bytes + dedicated_add_on_size); }