rename define

This commit is contained in:
Concedo 2025-10-20 10:08:39 +08:00
parent d7da1eb35c
commit 49535fdfed
2 changed files with 6 additions and 6 deletions

View file

@ -17,7 +17,7 @@
#include "model.h"
#include "stable-diffusion.h"
#include "util.h"
#ifndef KCPP_BAKE_SD_VOCAB
#ifndef KCPP_NO_BAKE_SD_VOCAB
#include "vocab.hpp"
#include "vocab_qwen.hpp"
#include "vocab_umt5.hpp"
@ -2056,7 +2056,7 @@ void ModelLoader::set_wtype_override(ggml_type wtype, std::string prefix) {
}
std::string ModelLoader::load_merges() {
#ifndef KCPP_BAKE_SD_VOCAB
#ifndef KCPP_NO_BAKE_SD_VOCAB
std::string merges_utf8_str(reinterpret_cast<const char*>(merges_utf8_c_str), sizeof(merges_utf8_c_str));
return merges_utf8_str;
#else
@ -2065,7 +2065,7 @@ std::string ModelLoader::load_merges() {
}
std::string ModelLoader::load_qwen2_merges() {
#ifndef KCPP_BAKE_SD_VOCAB
#ifndef KCPP_NO_BAKE_SD_VOCAB
std::string merges_utf8_str(reinterpret_cast<const char*>(qwen2_merges_utf8_c_str), sizeof(qwen2_merges_utf8_c_str));
return merges_utf8_str;
#else
@ -2074,7 +2074,7 @@ std::string ModelLoader::load_qwen2_merges() {
}
std::string ModelLoader::load_t5_tokenizer_json() {
#ifndef KCPP_BAKE_SD_VOCAB
#ifndef KCPP_NO_BAKE_SD_VOCAB
std::string json_str(reinterpret_cast<const char*>(t5_tokenizer_json_str), sizeof(t5_tokenizer_json_str));
return json_str;
#else
@ -2083,7 +2083,7 @@ std::string ModelLoader::load_t5_tokenizer_json() {
}
std::string ModelLoader::load_umt5_tokenizer_json() {
#ifndef KCPP_BAKE_SD_VOCAB
#ifndef KCPP_NO_BAKE_SD_VOCAB
std::string json_str(reinterpret_cast<const char*>(umt5_tokenizer_json_str), sizeof(umt5_tokenizer_json_str));
return json_str;
#else

View file

@ -13,7 +13,7 @@
#include <algorithm>
#include <filesystem>
#define KCPP_BAKE_SD_VOCAB
#define KCPP_NO_BAKE_SD_VOCAB
#include "model_adapter.h"