LAVIS icon indicating copy to clipboard operation
LAVIS copied to clipboard

Suppress missing key warning when loading partial model weights in BLIP2

Open dxli94 opened this issue 1 year ago • 0 comments

ViT (if not finetuned) and LLM weights are not stored in the current BLIP2 checkpoints.

The default load_checkpoint() in BaseModel raises warning on missing keys, which causes confusion.

Proposed solution is to overwrite load_checkpoint() in BLIP2. This solution is not meant to be universal and it shouldn't in general to avoid neglecting missing key by accident.

dxli94 avatar Feb 13 '23 15:02 dxli94