EvanTHU commited on
Commit
1538bbb
·
verified ·
1 Parent(s): 1e46cc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -544,6 +544,9 @@ linear_proj = mm_backbone_mlp_model.mm_projector
544
 
545
  # 1. Load the pretrained weights
546
  pretrained_llm_checkpoint = lazy_load(pretrained_llm_path)
 
 
 
547
  # 2. Load the fine-tuned LoRA weights
548
  lora_checkpoint = lazy_load(lora_path)
549
  for key, value in lora_checkpoint.items():
 
544
 
545
  # 1. Load the pretrained weights
546
  pretrained_llm_checkpoint = lazy_load(pretrained_llm_path)
547
+ for key, value in pretrained_llm_checkpoint.items():
548
+ if isinstance(value, torch.Tensor):
549
+ pretrained_llm_checkpoint[key] = value.to('cpu')
550
  # 2. Load the fine-tuned LoRA weights
551
  lora_checkpoint = lazy_load(lora_path)
552
  for key, value in lora_checkpoint.items():