gemini-2.5-flash-image-preview有时候没有返回出图片出来。 #9121
Replies: 16 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
No matter how many times I try again, it cannot be generated. It is OK to put this diagram locally to call the API, but it will be successful in one go. |
Beta Was this translation helpful? Give feedback.
-
你遇到的 gemini-2.5-flash-image-preview 图片偶尔不返回、无报错,主要原因是旧版本 Lobe Chat 对该模型的图片输出支持不完整。近期的更新(PR #8940 和 #8944)已经修复了图片流处理和模型识别问题,确保 gemini-2.5-flash-image-preview 能稳定返回图片结果,并正确处理图片流事件 详情见此 和此。 建议升级到最新版本(包含上述修复),这样可以解决你遇到的图片偶尔不显示的问题。如果升级后仍有问题,可以检查 Docker 服务端日志和浏览器网络响应,确认图片流是否被正确返回和渲染。 To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
后面尝试发现是所有图都不行,我清空文件库的文件后,反而可以了,每上传到了18张图,之后所有对话处理图都不行,每次都去清空一下文件库。 |
Beta Was this translation helpful? Give feedback.
-
Later I tried to find that all the pictures were not good. After I cleared the files in the file library, I was fine. For every 18 pictures were uploaded, all the dialogue processing pictures were not good. |
Beta Was this translation helpful? Give feedback.
-
应该说每次不行的时候,都要去清空文件库。有时几张图就不行了。 |
Beta Was this translation helpful? Give feedback.
-
It should be said that every time it doesn't work, you have to clear the file library. Sometimes a few pictures won't work. |
Beta Was this translation helpful? Give feedback.
-
试试英文生图,这是 google 官方 bug,中文就是概率性不出图。 |
Beta Was this translation helpful? Give feedback.
-
Try the English raw pictures, this is an official Google bug, but the Chinese one is probabilistic and does not produce pictures. |
Beta Was this translation helpful? Give feedback.
-
@tjx666 但最好有个错误提示,我本地单独去调用是没出现过这种,而且最神奇是,我只要清理一下文件库里的文件,就百分百没问题。。 |
Beta Was this translation helpful? Give feedback.
-
@tjx666 But it is best to have an error message. This has never happened when I call it locally. And the most amazing thing is that as long as I clean up the files in the file library, there will be no problem. . |
Beta Was this translation helpful? Give feedback.
-
有没有稳定的复现方法? 感觉不太应该和文件库有关系。 这个问题严格来讲不叫错误,只是 chat 中 gemini 没回复给你图片, 是模型本身的问题。 aihubmix 走的也是官方 api, 有时候就是官方 api 没有返回图片: {"candidates":[{"content":{"parts":[{"text":"给"}],"role":"model"},"avgLogprobs":-7.264101028442383}],"model
Version":"gemini-2.5-flash-image-preview","responseId":"78yyaNb1HdbrlOoP3Ln54Ac","usageMetadata":{"trafficTy
pe":"ON_DEMAND"},"sdkHttpResponse":{"headers":{"cache-control":"no-cache","connection":"keep-alive","content
-type":"text/event-stream","date":"Sat, 30 Aug 2025 10:05:37
GMT","transfer-encoding":"chunked","x-aihubmix-request-id":"2025083010053538953900512244623"}}}
[chunk 1] 2025-8-30 18:5:37.319
{"candidates":[{"content":{"parts":[{"text":","}],"role":"model"},"avgLogprobs":-1.6824884414672852}],"mode
lVersion":"gemini-2.5-flash-image-preview","responseId":"78yyaNb1HdbrlOoP3Ln54Ac","usageMetadata":{"trafficT
ype":"ON_DEMAND"},"sdkHttpResponse":{"headers":{"cache-control":"no-cache","connection":"keep-alive","conten
t-type":"text/event-stream","date":"Sat, 30 Aug 2025 10:05:37
GMT","transfer-encoding":"chunked","x-aihubmix-request-id":"2025083010053538953900512244623"}}}
[chunk 2] 2025-8-30 18:5:37.319
{"candidates":[{"content":{"parts":[{"text":"希望你喜欢!"}],"role":"model"},"avgLogprobs":-0.92568763097127
28}],"modelVersion":"gemini-2.5-flash-image-preview","responseId":"78yyaNb1HdbrlOoP3Ln54Ac","usageMetadata":
{"trafficType":"ON_DEMAND"},"sdkHttpResponse":{"headers":{"cache-control":"no-cache","connection":"keep-aliv
e","content-type":"text/event-stream","date":"Sat, 30 Aug 2025 10:05:37
GMT","transfer-encoding":"chunked","x-aihubmix-request-id":"2025083010053538953900512244623"}}}
[chunk 3] 2025-8-30 18:5:37.323
{"candidates":[{"content":{"parts":[{"text":" \n"}],"role":"model"},"finishReason":"STOP","avgLogprobs":-0.4
720354378223419}],"modelVersion":"gemini-2.5-flash-image-preview","responseId":"78yyaNb1HdbrlOoP3Ln54Ac","us
ageMetadata":{"promptTokenCount":1515,"candidatesTokenCount":7,"totalTokenCount":1522,"trafficType":"ON_DEMA
ND","promptTokensDetails":[{"modality":"IMAGE","tokenCount":1290},{"modality":"TEXT","tokenCount":225}],"can
didatesTokensDetails":[{"modality":"TEXT","tokenCount":7}]},"sdkHttpResponse":{"headers":{"cache-control":"n
o-cache","connection":"keep-alive","content-type":"text/event-stream","date":"Sat, 30 Aug 2025 10:05:37
GMT","transfer-encoding":"chunked","x-aihubmix-request-id":"2025083010053538953900512244623"}}} |
Beta Was this translation helpful? Give feedback.
-
Is there a stable reproduction method? It doesn't feel that it should have something to do with the file library. aihubmix also goes to the official API, sometimes it is the official API and does not return the picture: [chunk 0]
{
"candidates": [
{
"content": {
"parts": [
{
"text": "Give"
}
],
"role": "model"
},
"avgLogprobs": -7.264101028442383
}
],
"modelVersion": "gemini-2.5-flash-image-preview",
"responseId": "78yyaNb1HdbrlOoP3Ln54Ac",
"usageMetadata": {
"trafficType": "ON_DEMAND"
},
"sdkHttpResponse": {
"headers": {
"cache-control": "no-cache",
"connection": "keep-alive",
"content-type": "text/event-stream",
"date": "Sat, 30 Aug 2025 10:05:37 GMT",
"transfer-encoding": "chunked",
"x-aihubmix-request-id": "2025083010053538953900512244623"
}
}
}
[chunk 1] 2025-8-30 18:5:37.319
{
"candidates": [
{
"content": {
"parts": [
{
"text": ","
}
],
"role": "model"
},
"avgLogprobs": -1.6824884414672852
}
],
"modelVersion": "gemini-2.5-flash-image-preview",
"responseId": "78yyaNb1HdbrlOoP3Ln54Ac",
"usageMetadata": {
"trafficType": "ON_DEMAND"
},
"sdkHttpResponse": {
"headers": {
"cache-control": "no-cache",
"connection": "keep-alive",
"content-type": "text/event-stream",
"date": "Sat, 30 Aug 2025 10:05:37 GMT",
"transfer-encoding": "chunked",
"x-aihubmix-request-id": "2025083010053538953900512244623"
}
}
}
[chunk 2] 2025-8-30 18:5:37.319
{
"candidates": [
{
"content": {
"parts": [
{
"text": "I hope you like it!"
}
],
"role": "model"
},
"avgLogprobs": -0.9256876309712728
}
],
"modelVersion": "gemini-2.5-flash-image-preview",
"responseId": "78yyaNb1HdbrlOoP3Ln54Ac",
"usageMetadata": {
"trafficType": "ON_DEMAND"
},
"sdkHttpResponse": {
"headers": {
"cache-control": "no-cache",
"connection": "keep-alive",
"content-type": "text/event-stream",
"date": "Sat, 30 Aug 2025 10:05:37 GMT",
"transfer-encoding": "chunked",
"x-aihubmix-request-id": "2025083010053538953900512244623"
}
}
}
[chunk 3] 2025-8-30 18:5:37.323 (final block)
{
"candidates": [
{
"content": {
"parts": [
{
"text": " \n"
}
],
"role": "model"
},
"finishReason": "STOP",
"avgLogprobs": -0.4720354378223419
}
],
"modelVersion": "gemini-2.5-flash-image-preview",
"responseId": "78yyaNb1HdbrlOoP3Ln54Ac",
"usageMetadata": {
"promptTokenCount": 1515,
"candidatesTokenCount": 7,
"totalTokenCount": 1522,
"trafficType": "ON_DEMAND",
"promptTokensDetails": [
{
"modality": "IMAGE",
"tokenCount": 1290
},
{
"modality": "TEXT",
"tokenCount": 225
}
],
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 7
}
]
},
"sdkHttpResponse": {
"headers": {
"cache-control": "no-cache",
"connection": "keep-alive",
"content-type": "text/event-stream",
"date": "Sat, 30 Aug 2025 10:05:37 GMT",
"transfer-encoding": "chunked",
"x-aihubmix-request-id": "2025083010053538953900512244623"
}
}
}
From the formatted output, you can clearly see:
- All parts contain only text fields, no inlineData (image data fields)
- candidatesTokensDetails only has the TEXT mode, confirm that the model only outputs text
- The input contains image (1290 tokens) and text (225 tokens), but the output only has text (7 tokens) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
这个得等 google 官方更新模型修复 ![]() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
📦 部署环境
Docker
📦 部署模式
服务端模式(lobe-chat-database 镜像)
📌 软件版本
V1.117.1
💻 系统环境
Windows
🌐 浏览器
Chrome
🐛 问题描述
我用的是AiHubMax的gemini-2.5-flash-image-preview,有时候不会返回图片出来,也没什么错误,很奇怪。无论重试多少次,都无法生成,我这个图放到本地调用AiHubMax API是可以的,一下就成功。
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
No response
Beta Was this translation helpful? Give feedback.
All reactions