Vision-CAIR commited on
Commit
ba2c60d
β€’
1 Parent(s): 8ce2d36

Update minigpt4/conversation/conversation.py

Browse files
minigpt4/conversation/conversation.py CHANGED
@@ -139,9 +139,9 @@ class Chat:
139
  conv.append_message(conv.roles[1], None)
140
  embs = self.get_context_emb(conv, img_list)
141
 
142
- current_max_len = embs.shape[1] + max_new_tokens + 100
143
- begin_idx = max(0, current_max_len - max_length)
144
- embs = embs[:, begin_idx:]
145
  outputs = self.model.llama_model.generate(
146
  inputs_embeds=embs,
147
  max_new_tokens=max_new_tokens,
 
139
  conv.append_message(conv.roles[1], None)
140
  embs = self.get_context_emb(conv, img_list)
141
 
142
+ # current_max_len = embs.shape[1] + max_new_tokens + 100
143
+ # begin_idx = max(0, current_max_len - max_length)
144
+ # embs = embs[:, begin_idx:]
145
  outputs = self.model.llama_model.generate(
146
  inputs_embeds=embs,
147
  max_new_tokens=max_new_tokens,