Skip to content

Conversation

@michaelfeil
Copy link
Owner

@michaelfeil michaelfeil commented Oct 23, 2024

Closes #437

@michaelfeil michaelfeil changed the title Vision fix Vision fix for non-clip models Oct 23, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR enhances the TIMM class in torch_vision.py for improved compatibility and performance with various vision model types, accompanied by corresponding updates to the test suite.

  • Modified encode_core method in TIMM class to handle different processing paths based on is_colipali flag
  • Updated tokenize_lengths method to ensure correct data types for input tensors
  • Introduced parameterization in test_clip_like_model function to test multiple model types
  • Replaced specific CLIP imports with generic AutoModel and AutoProcessor in test file
  • Updated main block in test file to use new image sample URL and test both CLIP-like and ColPali models

2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (02480ab) to head (6118a77).

Files with missing lines Patch % Lines
...mb/infinity_emb/transformer/vision/torch_vision.py 60.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
- Coverage   79.22%   79.18%   -0.05%     
==========================================
  Files          41       41              
  Lines        3245     3248       +3     
==========================================
+ Hits         2571     2572       +1     
- Misses        674      676       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil merged commit 4fc18bf into main Oct 23, 2024
@michaelfeil michaelfeil deleted the vision-fix branch October 23, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

float16 for image embeddings

3 participants