Skip to content

Commit

Permalink
fix type-check
Browse files Browse the repository at this point in the history
  • Loading branch information
tc-mb committed Aug 13, 2024
1 parent 47eb0a5 commit 1ca3f06
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/llava/minicpmv-convert-image-encoder-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def bytes_to_unicode():
emb_dim = 4096
elif minicpmv_version == 3:
emb_dim = 3584

default_vision_config = {
"hidden_size": 1152,
"image_size": 980,
Expand All @@ -562,10 +562,9 @@ def bytes_to_unicode():
"patch_size": 14,
}

if minicpmv_version == 2:
vision_config = Idefics2VisionConfig(**default_vision_config)
model = Idefics2VisionTransformer(vision_config)
elif minicpmv_version == 3:
vision_config = Idefics2VisionConfig(**default_vision_config)
model = Idefics2VisionTransformer(vision_config)
if minicpmv_version == 3:
vision_config = SiglipVisionConfig(**default_vision_config)
model = SiglipVisionTransformer(vision_config)

Expand All @@ -581,7 +580,6 @@ def bytes_to_unicode():
has_vision_encoder = True
has_minicpmv_projector = False


if args.text_only:
fname_middle = "text-"
has_vision_encoder = False
Expand Down

0 comments on commit 1ca3f06

Please sign in to comment.