fix: avoid narrowing conversion in SigVQ patch embedding and format code

This commit is contained in:
leejet 2026-09-21 01:27:31 +08:00
parent 187b2561ea
commit b56c68617d
4 changed files with 19 additions and 19 deletions

View File

@ -265,7 +265,7 @@ namespace LLaDAImageTE {
struct SigVQConfig {
int64_t image_size = 2048;
int64_t patch_size = 16;
int patch_size = 16;
int64_t in_channels = 3;
int64_t hidden_size = 1536;
int64_t intermediate_size = 6144;

View File

@ -147,7 +147,7 @@ bool ModelLoader::add_file_impl(const std::string& path, const std::string& pref
}
if (tensor.index_in_zip < 0) {
const auto& stamp = physical_files[tensor.file_index];
if (tensor.offset > stamp.size || static_cast<uint64_t>(tensor.nbytes_to_read()) > stamp.size - tensor.offset) { //kcpp int8 fp8
if (tensor.offset > stamp.size || static_cast<uint64_t>(tensor.nbytes_to_read()) > stamp.size - tensor.offset) { // kcpp int8 fp8
LOG_ERROR("tensor '%s' extends beyond its model file", tensor.name.c_str());
return false;
}