fix occasional clip segfault, fix glm4 (+1 squashed commits)

Squashed commits:

[bd71cd688] GLM4 fix wip
This commit is contained in:
Concedo 2025-04-29 00:43:47 +08:00
parent e659cadf48
commit 4d8a7a6594
5 changed files with 28 additions and 12 deletions

View file

@ -1663,7 +1663,7 @@ struct clip_model_loader {
}
}
bool handle_older_qwen25vl(projector_type & proj_type)
bool should_upgrade_older_qwen25vl(projector_type proj_type)
{
bool check1 = false;
bool check2 = false;
@ -1672,7 +1672,6 @@ struct clip_model_loader {
if(proj_type==PROJECTOR_TYPE_QWEN2VL && check1 && check2)
{
printf("\nWARNING: OLD QWEN2.5VL PROJECTOR DETECTED! Trying to patch in support, but please obtain a new Qwen2.5VL Projector!\n\n");
proj_type = PROJECTOR_TYPE_QWEN25VL;
return true;
}
return false;
@ -1717,7 +1716,11 @@ struct clip_model_loader {
|| ctx_clip.proj_type == PROJECTOR_TYPE_LDP
|| ctx_clip.proj_type == PROJECTOR_TYPE_LDPV2;
q25vl_migrated = handle_older_qwen25vl(ctx_clip.proj_type);
q25vl_migrated = should_upgrade_older_qwen25vl(ctx_clip.proj_type);
if(q25vl_migrated)
{
ctx_clip.proj_type = PROJECTOR_TYPE_QWEN25VL;
}
{
std::string mm_patch_merge_type;