diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 0c0dc7436..202334038 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -893,7 +893,7 @@ static void mtp_decoding_setup(llama_model * main_model, llama_context * main_ct } draft_is_mtp = true; - speculative_state_setup(main_ctx, mtp_ctx_params, static_cast(main_model->n_gpu_layers()), COMMON_SPECULATIVE_TYPE_DRAFT_MTP); + speculative_state_setup(main_ctx, mtp_ctx_params, -1, COMMON_SPECULATIVE_TYPE_DRAFT_MTP); } //loads a model for speculative decoding. diff --git a/koboldcpp.py b/koboldcpp.py index 6e1a5f697..8e4e3f85d 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -3000,7 +3000,8 @@ def tts_generate(genparams): if not genparams.get("instruction", ""): prompt, ttsinstruction = tts_extract_instruction(prompt) inputs.speaker_instruction = ttsinstruction.encode("UTF-8") - inputs.use_mp3 = genparams.get("use_mp3", False) + response_format_mp3 = True if (genparams.get("response_format")=="mp3") else False + inputs.use_mp3 = genparams.get("use_mp3", response_format_mp3) inputs.prompt = prompt.encode("UTF-8") inputs.speaker_seed = voice aseed = -1 @@ -3089,7 +3090,8 @@ def music_generate_codes(genparams): inputs = music_generation_inputs() inputs.is_planner_mode = True inputs.stereo = genparams.get('stereo', True) - inputs.use_mp3 = genparams.get('use_mp3', False) + response_format_mp3 = True if (genparams.get("response_format")=="mp3") else False + inputs.use_mp3 = genparams.get("use_mp3", response_format_mp3) inputs.gen_codes = genparams.get('gen_codes', False) inputs.rewrite_caption = genparams.get('rewrite_caption', True) inputs.input_json = input_json.encode("UTF-8") @@ -3107,7 +3109,8 @@ def music_generate_audio(genparams): inputs = music_generation_inputs() inputs.is_planner_mode = False inputs.stereo = genparams.get('stereo', True) - inputs.use_mp3 = genparams.get('use_mp3', False) + response_format_mp3 = True if (genparams.get("response_format")=="mp3") else False + inputs.use_mp3 = genparams.get("use_mp3", response_format_mp3) inputs.gen_codes = genparams.get('gen_codes', False) inputs.rewrite_caption = genparams.get('rewrite_caption', True) inputs.input_json = input_json.encode("UTF-8")