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

[Question] How to load one more vision tower? #1826

Open
zhlhlhlhl opened this issue Jan 22, 2025 · 0 comments
Open

[Question] How to load one more vision tower? #1826

zhlhlhlhl opened this issue Jan 22, 2025 · 0 comments

Comments

@zhlhlhlhl
Copy link

Question

I want to initialize one more vision tower in the llava_arch.py. I added
self.sam_model = SamModel.from_pretrained(model_args.sgtm_sam_model_path,torch_dtype=torch.bfloat16) in the
def initialize_vision_modules(self, model_args, fsdp=None), and I mimic the original code to use def get_vision_tower(self) in the class LlavaMetaForCausalLM(ABC).
However, I checked the self.sam_model that I want to initialize, and the parameters seem to be empty. How can another vision model in this part code be initialized correctly?

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

No branches or pull requests

1 participant