选择 Nano Banana Pro 模型生成图片的 bug #146

Open
opened 2026-02-13 17:27:56 -06:00 by mirrors · 0 comments
Owner

Originally created by @CLannadZSY on GitHub (Feb 5, 2026).

  1. 只使用 prompt 生成图片时. response.images 有图片

  2. 使用 prompt + files 生成图片时, response.images 为空, 无图片

# 测试生成图片代码
response = await client.generate_content(
    prompt=task['input_prompt'],
    files=task['input_images'],
    model=Model.G_3_0_PRO,
)

for i, image in enumerate(response.images):
    await image.save()

我 debug 了一下. 主要出在 client.py 445行.

if get_nested_value(candidate, [12, 7, 0]):

# 使用 Nano Banana Pro 模型 + 上传了 files  + prompt,  response.images 的结果坐标发生了变化. 
# 不再是 [12, 7, 0], 而是 [12, 0, '8', 0]
Originally created by @CLannadZSY on GitHub (Feb 5, 2026). 1. 只使用 prompt 生成图片时. response.images 有图片 2. 使用 prompt + files 生成图片时, response.images 为空, 无图片 ```python # 测试生成图片代码 response = await client.generate_content( prompt=task['input_prompt'], files=task['input_images'], model=Model.G_3_0_PRO, ) for i, image in enumerate(response.images): await image.save() ``` 我 debug 了一下. 主要出在 client.py 445行. ```python if get_nested_value(candidate, [12, 7, 0]): # 使用 Nano Banana Pro 模型 + 上传了 files + prompt, response.images 的结果坐标发生了变化. # 不再是 [12, 7, 0], 而是 [12, 0, '8', 0] ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#146
No description provided.