Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clip_encoder.py for s^2 #1457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baichuanzhou
Copy link

Calling super().__init__(vision_tower, args, delay_load) will reult in ValueError as the parent class CLIPVisionTower would call load_model method and attemp to access s2_scales while the attribute is still to be defined yet.

By calling load_model after s2_scales is defined in __init__ can resolve this issue.

Calling `super().__init__(vision_tower, args, delay_load)` will reult in `ValueError` as it would tell its parent class `CLIPVisionTower` to call `load_model` method and attemp to access `s2_scales` while the attribute is still to be defined yet.

By calling `load_model` after `s2_scales` is defined can resolve this issue.
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.

None yet

1 participant