try to make kokoro take less graph size

This commit is contained in:
Concedo 2026-04-19 19:00:35 +08:00
parent 2336c3e549
commit afaf3b960e
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}

View file

@ -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);
}
};