Skip to content

Commit

Permalink
修复blip推理报错 (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
confused666 authored Nov 23, 2024
1 parent 756344b commit 0a936bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mindnlp/transformers/models/blip/modeling_blip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ def generate(
question_attention_mask = ops.ones(*question_embeds.shape[:-1], dtype=mindspore.int64)

bos_ids = ops.full(
(question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id
(question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id, dtype=mindspore.int64
)

outputs = self.text_decoder.generate(
Expand Down

0 comments on commit 0a936bf

Please sign in to comment.