You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "infer_style.py", line 118, in
content_image_prompt = generate_caption(content_image) # 生成图像的文本描述
File "infer_style.py", line 49, in generate_caption
generated_ids = model.generate(
File "/home/ad/anaconda3/envs/cclappt38/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/ad/anaconda3/envs/cclappt38/lib/python3.8/site-packages/transformers/models/blip_2/modeling_blip_2.py", line 2316, in generate
inputs_embeds[special_image_mask] = language_model_inputs.flatten()
RuntimeError: shape mismatch: value tensor of shape [65536] cannot be broadcast to indexing result of shape [0]
The text was updated successfully, but these errors were encountered:
python infer_style.py
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00, 2.03s/it]
Inputs shape: torch.Size([1, 3, 224, 224])
Inputs: {'pixel_values': tensor([[[[ 1.4336, 1.4629, 1.4629, ..., 1.6533, 1.6533, 1.6533],
[ 1.4482, 1.4629, 1.4629, ..., 1.6533, 1.6533, 1.6533],
[ 1.4629, 1.4629, 1.4775, ..., 1.6533, 1.6533, 1.6533],
...,
[ 0.4121, 0.4558, 0.4705, ..., -0.1427, -0.2449, -0.2886],
[ 0.4851, 0.4558, 0.4414, ..., -0.2156, -0.2449, -0.1864],
[ 0.2515, 0.3098, 0.1785, ..., -0.2156, -0.2595, -0.2156]],
Traceback (most recent call last):
File "infer_style.py", line 118, in
content_image_prompt = generate_caption(content_image) # 生成图像的文本描述
File "infer_style.py", line 49, in generate_caption
generated_ids = model.generate(
File "/home/ad/anaconda3/envs/cclappt38/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/ad/anaconda3/envs/cclappt38/lib/python3.8/site-packages/transformers/models/blip_2/modeling_blip_2.py", line 2316, in generate
inputs_embeds[special_image_mask] = language_model_inputs.flatten()
RuntimeError: shape mismatch: value tensor of shape [65536] cannot be broadcast to indexing result of shape [0]
The text was updated successfully, but these errors were encountered: