mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-07-23 11:20:53 -05:00
fix: detect vision patch size for unsplit (HF-format) Qwen3-VL (#1811)
This commit is contained in:
@@ -200,7 +200,11 @@ namespace LLM {
|
|||||||
config.vision.in_channels = tensor_storage.ne[2];
|
config.vision.in_channels = tensor_storage.ne[2];
|
||||||
config.vision.hidden_size = tensor_storage.ne[3];
|
config.vision.hidden_size = tensor_storage.ne[3];
|
||||||
}
|
}
|
||||||
if (contains(name, "visual.patch_embed.bias")) {
|
// HF-format checkpoints keep the patch embed unsplit under a single name.
|
||||||
|
if (contains(name, "visual.patch_embed.proj.weight")) {
|
||||||
|
config.vision.patch_size = static_cast<int>(tensor_storage.ne[0]);
|
||||||
|
}
|
||||||
|
if (contains(name, "visual.patch_embed.bias") || contains(name, "visual.patch_embed.proj.bias")) {
|
||||||
config.vision.hidden_size = tensor_storage.ne[0];
|
config.vision.hidden_size = tensor_storage.ne[0];
|
||||||
}
|
}
|
||||||
if (contains(name, "visual.pos_embed.weight")) {
|
if (contains(name, "visual.pos_embed.weight")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user