Skip to content

API for getting intermediate image and text features, forward_intermediates()#1035

Merged
rwightman merged 8 commits intomainfrom
intermediates
Mar 1, 2025
Merged

API for getting intermediate image and text features, forward_intermediates()#1035
rwightman merged 8 commits intomainfrom
intermediates

Conversation

@rwightman
Copy link
Copy Markdown
Collaborator

@rwightman rwightman commented Feb 22, 2025

Compatible with timm approach (passes through to timm image encoders) and adding to builtin image and text...

This is a different approach than #731, but as with timm, I found the idea of integrating the output_hidden_states approach to be like HF Transformers to be a bit of a headache and risk too many regressions. This approach duplicates some code, but it makes typing less problematic, and keeps the main forward functions lean for training, normal use.

@rwightman rwightman marked this pull request as draft February 22, 2025 23:06
@rwightman rwightman marked this pull request as ready for review February 24, 2025 23:10
@rwightman rwightman merged commit c4fba83 into main Mar 1, 2025
4 checks passed
@rwightman rwightman deleted the intermediates branch March 1, 2025 00:30
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.

1 participant