From afaf3b960ee0c35bf8fc80b493c2a98ddb07f427 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 19 Apr 2026 19:00:35 +0800 Subject: [PATCH] try to make kokoro take less graph size --- otherarch/ttscpp/src/kokoro_model.cpp | 4 ++-- otherarch/ttscpp/src/kokoro_model.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/otherarch/ttscpp/src/kokoro_model.cpp b/otherarch/ttscpp/src/kokoro_model.cpp index c7543ac93..eef44ae00 100644 --- a/otherarch/ttscpp/src/kokoro_model.cpp +++ b/otherarch/ttscpp/src/kokoro_model.cpp @@ -1489,7 +1489,7 @@ struct kokoro_duration_context * build_new_duration_kokoro_context(struct kokoro kctx->backend_cpu = ggml_backend_cpu_init(); kctx->set_threads(); kctx->build_schedule(); - kctx->buf_compute_meta.resize(ggml_tensor_overhead()*model->max_duration_nodes()*5 + ggml_graph_overhead_custom(model->max_duration_nodes()*5, false)); + kctx->buf_compute_meta.resize(ggml_tensor_overhead()*model->max_duration_nodes()*2 + ggml_graph_overhead_custom(model->max_duration_nodes()*2, false)); return kctx; } @@ -1499,6 +1499,6 @@ struct kokoro_context * build_new_kokoro_context(struct kokoro_model * model, in kctx->backend_cpu = ggml_backend_cpu_init(); kctx->set_threads(); kctx->build_schedule(); - kctx->buf_compute_meta.resize(ggml_tensor_overhead()*model->max_gen_nodes()*30 + ggml_graph_overhead_custom(model->max_gen_nodes()*30, false)); + kctx->buf_compute_meta.resize(ggml_tensor_overhead()*model->max_gen_nodes()*20 + ggml_graph_overhead_custom(model->max_gen_nodes()*20, false)); return kctx; } diff --git a/otherarch/ttscpp/src/kokoro_model.h b/otherarch/ttscpp/src/kokoro_model.h index 808f78761..aa35291b7 100644 --- a/otherarch/ttscpp/src/kokoro_model.h +++ b/otherarch/ttscpp/src/kokoro_model.h @@ -332,7 +332,7 @@ struct kokoro_duration_context : runner_context { struct ggml_tensor * token_types = nullptr; void build_schedule() { - runner_context::build_schedule(model->max_duration_nodes()*5); + runner_context::build_schedule(model->max_duration_nodes()*2); } }; @@ -410,7 +410,7 @@ struct kokoro_context : runner_context { struct ggml_tensor * uv_noise_data; void build_schedule() { - runner_context::build_schedule(model->max_gen_nodes()*30); + runner_context::build_schedule(model->max_gen_nodes()*20); } };