mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-20 01:31:42 +02:00
tts can now set a length limit
This commit is contained in:
@@ -478,6 +478,7 @@ static int cts_offset = 151672;
|
||||
static int space_id = 151670;
|
||||
static int code_terminate_id = 151670;
|
||||
static int nthreads = 4;
|
||||
static int tts_max_len = 4096;
|
||||
|
||||
bool ttstype_load_model(const tts_load_model_inputs inputs)
|
||||
{
|
||||
@@ -522,6 +523,8 @@ bool ttstype_load_model(const tts_load_model_inputs inputs)
|
||||
|
||||
nthreads = inputs.threads;
|
||||
|
||||
tts_max_len = inputs.ttsmaxlen;
|
||||
|
||||
tts_model_params.use_mmap = false;
|
||||
tts_model_params.use_mlock = false;
|
||||
tts_model_params.n_gpu_layers = inputs.gpulayers; //offload if possible
|
||||
@@ -871,7 +874,7 @@ tts_generation_outputs ttstype_generate(const tts_generation_inputs inputs)
|
||||
|
||||
// main loop
|
||||
n_decode = 0;
|
||||
n_predict = 4096; //max 4096 tokens
|
||||
n_predict = tts_max_len; //max 4096 tokens
|
||||
|
||||
while (n_decode <= n_predict)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user