Skip to content

Commit 47326af

Browse files
committed
Merge branch 'concedo_experimental' into kcpp_sd_perf_flags
2 parents e69878c + 56c0926 commit 47326af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+80532
-430
lines changed

.github/workflows/kcpp-build-release-arm64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
--add-data './taesd_xl.embd:.' \
8888
--add-data './taesd_f.embd:.' \
8989
--add-data './taesd_3.embd:.' \
90+
--add-data './kokoro_ipa.embd:.' \
9091
--add-data './rwkv_vocab.embd:.' \
9192
--add-data './rwkv_world_vocab.embd:.' \
9293
--version-file './version.txt' \

.github/workflows/kcpp-build-release-macos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
make LLAMA_METAL=1 LLAMA_PORTABLE=1
3737
chmod +x './create_ver_file.sh'
3838
. create_ver_file.sh
39-
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './json_to_gbnf.py:.' --add-data './LICENSE.md:.' --add-data './MIT_LICENSE_GGML_SDCPP_LLAMACPP_ONLY.md:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './taesd_f.embd:.' --add-data './taesd_3.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
39+
pyinstaller --noconfirm --onefile --collect-all customtkinter --collect-all psutil --add-data './koboldcpp_default.so:.' --add-data './ggml-metal-merged.metal:.' --add-data './kcpp_adapters:./kcpp_adapters' --add-data './koboldcpp.py:.' --add-data './json_to_gbnf.py:.' --add-data './LICENSE.md:.' --add-data './MIT_LICENSE_GGML_SDCPP_LLAMACPP_ONLY.md:.' --add-data './klite.embd:.' --add-data './kcpp_docs.embd:.' --add-data './kcpp_sdui.embd:.' --add-data './taesd.embd:.' --add-data './taesd_xl.embd:.' --add-data './taesd_f.embd:.' --add-data './taesd_3.embd:.' --add-data './kokoro_ipa.embd:.' --add-data './rwkv_vocab.embd:.' --add-data './rwkv_world_vocab.embd:.' --version-file './version.txt' --clean --console koboldcpp.py -n "koboldcpp-mac-arm64"
4040
4141
- name: Test
4242
id: test

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ set_target_properties(whisper_adapter PROPERTIES POSITION_INDEPENDENT_CODE ON)
474474

475475
add_library(tts_adapter
476476
otherarch/tts_adapter.cpp)
477-
target_include_directories(tts_adapter PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools ./vendor/stb ./vendor ./tools ./common)
477+
target_include_directories(tts_adapter PUBLIC . ./ggml/include ./ggml/src ./ggml/src/ggml-cpu ./include ./otherarch ./otherarch/tools ./vendor/stb ./vendor ./otherarch/ttscpp/include ./otherarch/ttscpp/src ./tools ./common)
478478
target_compile_features(tts_adapter PUBLIC cxx_std_17) # don't bump
479479
target_link_libraries(tts_adapter PRIVATE common2 ggml ${LLAMA_EXTRA_LIBS})
480480
set_target_properties(tts_adapter PROPERTIES POSITION_INDEPENDENT_CODE ON)

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ ifdef KCPP_SANITIZE
5555
CFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
5656
CXXFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
5757
endif
58-
CFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c11 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
59-
CXXFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c++17 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
58+
CFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c11 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
59+
CXXFLAGS += -I. -Iggml/include -Iggml/src -Iggml/src/ggml-cpu -Iinclude -Isrc -I./common -I./vendor -I./vendor/stb -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/ttscpp/include -I./otherarch/ttscpp/src -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only -std=c++17 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_CPU -DGGML_USE_CPU_REPACK
6060
ifndef KCPP_DEBUG
6161
CFLAGS += -DNDEBUG -s
6262
CXXFLAGS += -DNDEBUG -s
@@ -684,7 +684,7 @@ whispercpp_cublas.o: otherarch/whispercpp/whisper_adapter.cpp
684684
$(CXX) $(CXXFLAGS) $(CUBLAS_FLAGS) $(HIPFLAGS) -c $< -o $@
685685

686686
#tts objects
687-
tts_default.o: otherarch/tts_adapter.cpp
687+
tts_default.o: otherarch/tts_adapter.cpp otherarch/ttscpp/src/ttscpp.cpp otherarch/ttscpp/src/ttstokenizer.cpp otherarch/ttscpp/src/ttssampler.cpp otherarch/ttscpp/src/parler_model.cpp otherarch/ttscpp/src/dac_model.cpp otherarch/ttscpp/src/ttsutil.cpp otherarch/ttscpp/src/ttsargs.cpp otherarch/ttscpp/src/ttst5_encoder_model.cpp otherarch/ttscpp/src/phonemizer.cpp otherarch/ttscpp/src/tts_model.cpp otherarch/ttscpp/src/kokoro_model.cpp otherarch/ttscpp/src/dia_model.cpp otherarch/ttscpp/src/orpheus_model.cpp otherarch/ttscpp/src/snac_model.cpp otherarch/ttscpp/src/general_neural_audio_codec.cpp
688688
$(CXX) $(CXXFLAGS) -c $< -o $@
689689

690690
embeddings_default.o: otherarch/embeddings_adapter.cpp
@@ -729,6 +729,8 @@ mainvk: tools/main/main.cpp common/arg.cpp build-info.h ggml_v4_vulkan.o ggml-cp
729729
$(CXX) $(CXXFLAGS) -DGGML_USE_VULKAN -DSD_USE_VULKAN $(filter-out %.h,$^) -o $@ $(LDFLAGS)
730730
embedding: examples/embedding/embedding.cpp common/arg.cpp build-info.h ggml.o ggml-cpu.o ggml-ops.o ggml-vec.o ggml-binops.o ggml-unops.o llama.o console.o llavaclip_default.o llava.o ggml-backend_default.o ggml-backend-reg_default.o ggml-repack.o $(OBJS_FULL) $(OBJS)
731731
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
732+
ttscppmain: otherarch/ttscpp/cli/cli.cpp otherarch/ttscpp/cli/playback.cpp otherarch/ttscpp/cli/playback.h otherarch/ttscpp/cli/write_file.cpp otherarch/ttscpp/cli/write_file.h otherarch/ttscpp/cli/vad.cpp otherarch/ttscpp/cli/vad.h otherarch/ttscpp/src/ttscpp.cpp otherarch/ttscpp/src/ttstokenizer.cpp otherarch/ttscpp/src/ttssampler.cpp otherarch/ttscpp/src/parler_model.cpp otherarch/ttscpp/src/dac_model.cpp otherarch/ttscpp/src/ttsutil.cpp otherarch/ttscpp/src/ttsargs.cpp otherarch/ttscpp/src/ttst5_encoder_model.cpp otherarch/ttscpp/src/phonemizer.cpp otherarch/ttscpp/src/tts_model.cpp otherarch/ttscpp/src/kokoro_model.cpp otherarch/ttscpp/src/dia_model.cpp otherarch/ttscpp/src/orpheus_model.cpp otherarch/ttscpp/src/snac_model.cpp otherarch/ttscpp/src/general_neural_audio_codec.cpp ggml.o ggml-cpu.o ggml-ops.o ggml-vec.o ggml-binops.o ggml-unops.o llama.o console.o llavaclip_default.o llava.o ggml-backend_default.o ggml-backend-reg_default.o ggml-repack.o $(OBJS_FULL) $(OBJS)
733+
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
732734

733735
ggml/src/ggml-vulkan-shaders.cpp:
734736
ifdef VULKAN_BUILD

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ and it will install everything required. Alternatively, you can download the abo
191191
- KoboldCpp code and other files are also under the AGPL v3.0 License unless otherwise stated
192192
- Llama.cpp source repo is at https://github.com/ggml-org/llama.cpp (MIT)
193193
- Stable-diffusion.cpp source repo is at https://github.com/leejet/stable-diffusion.cpp (MIT)
194+
- TTS.cpp source repo is at https://github.com/mmwillet/TTS.cpp (MIT)
194195
- KoboldCpp source repo is at https://github.com/LostRuins/koboldcpp (AGPL)
195196
- KoboldAI Lite source repo is at https://github.com/LostRuins/lite.koboldai.net (AGPL)
196197
- For any further enquiries, contact @concedo on discord, or LostRuins on github.

convert_hf_to_gguf.py

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,12 @@ def _find_param(self, obj: dict[str, Any], keys: Iterable[str], optional: bool =
13341334
return None
13351335
raise KeyError(f"could not find any of: {keys}")
13361336

1337+
def tensor_force_quant(self, name, new_name, bid, n_dims):
1338+
del bid, name, n_dims # unused
1339+
if ".patch_embd.weight" in new_name:
1340+
return gguf.GGMLQuantizationType.F16 if self.ftype == gguf.LlamaFileType.MOSTLY_F16 else gguf.GGMLQuantizationType.F32
1341+
return False
1342+
13371343

13381344
@ModelBase.register("GPTNeoXForCausalLM")
13391345
class GPTNeoXModel(TextModel):
@@ -2305,10 +2311,9 @@ def set_gguf_parameters(self):
23052311
self.gguf_writer.add_vision_use_gelu(True)
23062312

23072313
def tensor_force_quant(self, name, new_name, bid, n_dims):
2308-
del bid, new_name, n_dims # unused
23092314
if ".embeddings." in name:
23102315
return gguf.GGMLQuantizationType.F32
2311-
return False
2316+
return super().tensor_force_quant(name, new_name, bid, n_dims)
23122317

23132318
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
23142319
del bid # unused
@@ -3296,12 +3301,9 @@ def set_gguf_parameters(self):
32963301
self.gguf_writer.add_vision_attention_layernorm_eps(self.global_config.get("rms_norm_eps", 1e-6))
32973302

32983303
def tensor_force_quant(self, name, new_name, bid, n_dims):
3299-
del bid, name, n_dims # unused
3300-
if ".patch_embd." in new_name:
3301-
return gguf.GGMLQuantizationType.F16
33023304
if ".position_embd." in new_name:
33033305
return gguf.GGMLQuantizationType.F32
3304-
return False
3306+
return super().tensor_force_quant(name, new_name, bid, n_dims)
33053307

33063308
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
33073309
del bid # unused
@@ -3374,10 +3376,9 @@ def generate_extra_tensors(self) -> Iterable[tuple[str, Tensor]]:
33743376
yield ("audio_tower.embed_positions.weight", pos_embd)
33753377

33763378
def tensor_force_quant(self, name, new_name, bid, n_dims):
3377-
del bid, new_name, n_dims # unused
33783379
if ".conv" in name and ".weight" in name:
33793380
return gguf.GGMLQuantizationType.F16
3380-
return False
3381+
return super().tensor_force_quant(name, new_name, bid, n_dims)
33813382

33823383
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
33833384
if name.startswith("thinker."):
@@ -3423,12 +3424,9 @@ def set_gguf_parameters(self):
34233424
self.gguf_writer.add_vision_projector_scale_factor(int(1.0 / downsample_ratio))
34243425

34253426
def tensor_force_quant(self, name, new_name, bid, n_dims):
3426-
del bid, name, n_dims # unused
3427-
if ".patch_embd." in new_name:
3428-
return gguf.GGMLQuantizationType.F16
34293427
if ".position_embd." in new_name:
34303428
return gguf.GGMLQuantizationType.F32
3431-
return False
3429+
return super().tensor_force_quant(name, new_name, bid, n_dims)
34323430

34333431
def _mapping_interns1_name(self, name):
34343432
names_map = {
@@ -5062,13 +5060,12 @@ def set_gguf_parameters(self):
50625060
self.gguf_writer.add_vision_projector_scale_factor(proj_scale_factor)
50635061

50645062
def tensor_force_quant(self, name, new_name, bid, n_dims):
5065-
del bid, new_name, n_dims # unused
50665063
# related to https://github.com/ggml-org/llama.cpp/issues/13025
50675064
if "input_projection" in name:
50685065
return gguf.GGMLQuantizationType.F16
50695066
if ".embeddings." in name:
50705067
return gguf.GGMLQuantizationType.F32
5071-
return False
5068+
return super().tensor_force_quant(name, new_name, bid, n_dims)
50725069

50735070
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
50745071
del bid # unused
@@ -7727,10 +7724,9 @@ def set_gguf_parameters(self):
77277724
self.gguf_writer.add_audio_attention_layernorm_eps(self.hparams.get("layer_norm_eps", 1e-5))
77287725

77297726
def tensor_force_quant(self, name, new_name, bid, n_dims):
7730-
del bid, new_name, n_dims # unused
77317727
if ".conv" in name and ".weight" in name:
77327728
return gguf.GGMLQuantizationType.F16
7733-
return False
7729+
return super().tensor_force_quant(name, new_name, bid, n_dims)
77347730

77357731
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
77367732
del bid # unused
@@ -8251,8 +8247,7 @@ def set_gguf_parameters(self):
82518247
self.gguf_writer.add_rope_scaling_orig_ctx_len(rope_scaling.get("original_max_position_embeddings", 4096))
82528248

82538249

8254-
@ModelBase.register("Lfm2ForCausalLM")
8255-
@ModelBase.register("LFM2ForCausalLM")
8250+
@ModelBase.register("Lfm2ForCausalLM", "LFM2ForCausalLM")
82568251
class LFM2Model(TextModel):
82578252
model_arch = gguf.MODEL_ARCH.LFM2
82588253

@@ -8287,13 +8282,55 @@ def set_gguf_parameters(self):
82878282
self._add_feed_forward_length()
82888283

82898284
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
8285+
is_vision_tensor = "vision_tower" in name or "multi_modal_projector" in name
8286+
if is_vision_tensor:
8287+
# skip vision tensors
8288+
return []
8289+
8290+
name = name.replace("language_model.", "")
8291+
82908292
# conv op requires 2d tensor
82918293
if 'conv.conv' in name:
82928294
data_torch = data_torch.squeeze(1)
82938295

82948296
return [(self.map_tensor_name(name), data_torch)]
82958297

82968298

8299+
@ModelBase.register("Lfm2VlForConditionalGeneration")
8300+
class LFM2VLModel(MmprojModel):
8301+
def __init__(self, *args, **kwargs):
8302+
super().__init__(*args, **kwargs)
8303+
assert self.hparams_vision is not None
8304+
# TODO(tarek): for dynamic resolution image_size is not specified, setting here for compatibility
8305+
self.hparams_vision["image_size"] = 256
8306+
8307+
def set_gguf_parameters(self):
8308+
super().set_gguf_parameters()
8309+
self.gguf_writer.add_clip_projector_type(gguf.VisionProjectorType.LFM2)
8310+
self.gguf_writer.add_vision_attention_layernorm_eps(self.find_vparam(["layer_norm_eps"]))
8311+
self.gguf_writer.add_vision_projector_scale_factor(self.global_config.get("downsample_factor", 2))
8312+
self.gguf_writer.add_vision_use_gelu(True)
8313+
# python notation, e.g. for vision_feature_layer == -1, we pick last layer -> vision_feature_layers_to_drop = 0
8314+
vision_feature_layers_to_drop = -(self.global_config.get("vision_feature_layer", -1) + 1)
8315+
self.gguf_writer.add_vision_block_count(self.find_vparam(self.n_block_keys) - vision_feature_layers_to_drop)
8316+
8317+
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
8318+
del bid # unused
8319+
is_vision_tensor = "vision_tower" in name or "multi_modal_projector" in name
8320+
8321+
if is_vision_tensor:
8322+
# remove "model." prefix
8323+
name = name.replace("model.vision_tower.", "vision_tower.")
8324+
name = name.replace("model.multi_modal_projector.", "multi_modal_projector.")
8325+
8326+
if "patch_embedding.weight" in name:
8327+
data_torch = data_torch.view(data_torch.shape[0], 16, 16, 3).permute(0, 3, 1, 2)
8328+
8329+
return [(self.map_tensor_name(name), data_torch)]
8330+
8331+
return [] # skip other tensors
8332+
8333+
82978334
@ModelBase.register("SmallThinkerForCausalLM")
82988335
class SmallThinkerModel(TextModel):
82998336
model_arch = gguf.MODEL_ARCH.SMALLTHINKER

examples/diffusion/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

expose.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ struct tts_generation_inputs
249249
const char * prompt = nullptr;
250250
const int speaker_seed = 0;
251251
const int audio_seed = 0;
252+
const char * custom_speaker_voice = "";
252253
const char * custom_speaker_text = "";
253254
const char * custom_speaker_data = "";
254255
};

ggml/include/ggml.h

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,18 @@ extern "C" {
553553
GGML_OP_GLU,
554554

555555
GGML_OP_COUNT,
556+
557+
//kcpp: dirtypatch of unofficial ops for ttscpp
558+
GGML_OP_UPSCALE_LINEAR, // linear interpolate
559+
GGML_OP_RECIPROCAL,
560+
GGML_OP_ROUND,
561+
GGML_OP_MOD,
562+
GGML_OP_CUMSUM,
563+
GGML_OP_STFT,
564+
GGML_OP_AA_STFT,
565+
GGML_OP_ISTFT,
566+
GGML_OP_AA_ISTFT,
567+
GGML_OP_CONV_TRANSPOSE_1D_TTS,
556568
};
557569

558570
enum ggml_unary_op {
@@ -2475,6 +2487,76 @@ extern "C" {
24752487
GGML_API void ggml_threadpool_params_init (struct ggml_threadpool_params * p, int n_threads);
24762488
GGML_API bool ggml_threadpool_params_match (const struct ggml_threadpool_params * p0, const struct ggml_threadpool_params * p1);
24772489

2490+
//kcpp: dirtypatch of ttscpp additions
2491+
GGML_API struct ggml_tensor * ggml_round(
2492+
struct ggml_context * ctx,
2493+
struct ggml_tensor * a);
2494+
GGML_API struct ggml_tensor * ggml_round_inplace(
2495+
struct ggml_context * ctx,
2496+
struct ggml_tensor * a);
2497+
// This is a floating point mod by the mod_val parameter
2498+
GGML_API struct ggml_tensor * ggml_mod(
2499+
struct ggml_context * ctx,
2500+
struct ggml_tensor * a,
2501+
float mod_val);
2502+
GGML_API struct ggml_tensor * ggml_mod_inplace(
2503+
struct ggml_context * ctx,
2504+
struct ggml_tensor * a,
2505+
float mod_val);
2506+
// reciprocal of each value in tensor a
2507+
GGML_API struct ggml_tensor * ggml_reciprocal(
2508+
struct ggml_context * ctx,
2509+
struct ggml_tensor * a);
2510+
GGML_API struct ggml_tensor * ggml_reciprocal_inplace(
2511+
struct ggml_context * ctx,
2512+
struct ggml_tensor * a);
2513+
// cumulative sums along first axis (ne0)
2514+
GGML_API struct ggml_tensor * ggml_cumsum(
2515+
struct ggml_context * ctx,
2516+
struct ggml_tensor * a);
2517+
GGML_API struct ggml_tensor * ggml_conv_1d_dw_tts(
2518+
struct ggml_context * ctx,
2519+
struct ggml_tensor * a, // convolution kernel
2520+
struct ggml_tensor * b, // data
2521+
int s0, // stride
2522+
int p0, // padding
2523+
int d0); // dilation
2524+
GGML_API struct ggml_tensor * ggml_conv_transpose_1d_tts(
2525+
struct ggml_context * ctx,
2526+
struct ggml_tensor * a, // convolution kernel
2527+
struct ggml_tensor * b, // data
2528+
int s0, // stride
2529+
int p0, // padding
2530+
int d0, // dilation
2531+
int op0, // output padding
2532+
int g0); // groups
2533+
GGML_API struct ggml_tensor * ggml_conv_1d_tts(
2534+
struct ggml_context * ctx,
2535+
struct ggml_tensor * a, // convolution kernel
2536+
struct ggml_tensor * b, // data
2537+
int s0, // stride
2538+
int p0, // padding
2539+
int d0); // dilation
2540+
GGML_API struct ggml_tensor * ggml_stft(
2541+
struct ggml_context * ctx,
2542+
struct ggml_tensor * a,
2543+
struct ggml_tensor * w, // the window
2544+
int filter_length,
2545+
int hop_length,
2546+
bool compute_abs_and_angle);
2547+
GGML_API struct ggml_tensor * ggml_istft(
2548+
struct ggml_context * ctx,
2549+
struct ggml_tensor * a, // magnitude + phase
2550+
struct ggml_tensor * w,
2551+
int filter_length,
2552+
int hop_length,
2553+
bool from_abs_and_angle);
2554+
GGML_API struct ggml_tensor * ggml_upscale_linear(
2555+
struct ggml_context * ctx,
2556+
struct ggml_tensor * a,
2557+
int scale_factor);
2558+
//end kcpp dirtypatch
2559+
24782560
#ifdef __cplusplus
24792561
}
24802562
#endif

0 commit comments

Comments
 (0)