Skip to content

Commit 0a936bf

Browse files
authored
修复blip推理报错 (#1838)
1 parent 756344b commit 0a936bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mindnlp/transformers/models/blip/modeling_blip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ def generate(
16791679
question_attention_mask = ops.ones(*question_embeds.shape[:-1], dtype=mindspore.int64)
16801680

16811681
bos_ids = ops.full(
1682-
(question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id
1682+
(question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id, dtype=mindspore.int64
16831683
)
16841684

16851685
outputs = self.text_decoder.generate(

0 commit comments

Comments
 (0)