mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-09-25 12:40:41 +00:00
fix: avoid narrowing conversion in SigVQ patch embedding and format code
This commit is contained in:
parent
187b2561ea
commit
b56c68617d
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user