Skip to content

Update clip_encoder.py for s^2#1457

Open
baichuanzhou wants to merge 1 commit intohaotian-liu:mainfrom
baichuanzhou:main
Open

Update clip_encoder.py for s^2#1457
baichuanzhou wants to merge 1 commit intohaotian-liu:mainfrom
baichuanzhou:main

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.

1 participant