mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-18 16:55:14 +02:00
tts loader fixes
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
# define ttsfseek _fseeki64
|
||||
#else
|
||||
# define ttsfseek fseeko
|
||||
#endif
|
||||
|
||||
namespace qwen3_tts {
|
||||
|
||||
namespace {
|
||||
@@ -204,7 +210,7 @@ bool load_tensor_data_from_file(
|
||||
|
||||
read_buf.resize(nbytes);
|
||||
|
||||
if (fseek(f, data_offset + offset, SEEK_SET) != 0) {
|
||||
if (ttsfseek(f, data_offset + offset, SEEK_SET) != 0) {
|
||||
error_msg = "Failed to seek to tensor data: " + std::string(name);
|
||||
fclose(f);
|
||||
release_preferred_backend(backend);
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
#include <cctype>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# define ttsfseek _fseeki64
|
||||
#else
|
||||
# define ttsfseek fseeko
|
||||
#endif
|
||||
|
||||
namespace qwen3_tts {
|
||||
|
||||
TTSTransformer::TTSTransformer() = default;
|
||||
@@ -590,7 +596,7 @@ bool TTSTransformer::load_tensor_data(const std::string & path, struct gguf_cont
|
||||
|
||||
read_buf.resize(nbytes);
|
||||
|
||||
if (fseek(f, data_offset + offset, SEEK_SET) != 0) {
|
||||
if (ttsfseek(f, data_offset + offset, SEEK_SET) != 0) {
|
||||
error_msg_ = "Failed to seek to tensor data: " + std::string(name);
|
||||
fclose(f);
|
||||
release_preferred_backend(backend);
|
||||
|
||||
@@ -1210,6 +1210,10 @@ static tts_generation_outputs ttstype_generate_qwen3tts(const tts_generation_inp
|
||||
{
|
||||
printf("\nTTS Generating...");
|
||||
}
|
||||
if(ttsdebugmode==1 && !tts_is_quiet)
|
||||
{
|
||||
qwen3tts_params.print_progress = true;
|
||||
}
|
||||
|
||||
if (custom_reference_audio_pcmf32.empty()) {
|
||||
result = qwen3tts_runner.synthesize(prompt, qwen3tts_params);
|
||||
|
||||
Reference in New Issue
Block a user