[Bug]更新3.5.18版本后,astrbot_plugin_comfyui插件无法返回图片
发生了什么
与bot对话发送了图片生成请求,查看文件夹,temp_0.png正确生成了,但是bot无法返回图片。退回3.5.17版本后一切正常。
如何复现?
AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
3.5.18,linux的docker和windows一键部署包都测试有此情况
操作系统
Windows
报错日志
[12:54:36] [Core] [INFO] [core.event_bus:50]: [aiocqhttp] Raven/570655308: 画个美女
[12:54:36] [Core] [DBUG] [method.star_request:50]: plugin -> session_controller - handle_session_control_agent
[12:54:36] [Core] [DBUG] [method.star_request:50]: plugin -> session_controller - handle_empty_mention
[12:54:36] [Core] [DBUG] [method.star_request:50]: plugin -> astrbot_plugin_apis - match_api
[12:54:36] [Core] [DBUG] [method.star_request:50]: plugin -> combine_messages - handle_message
[12:54:39] [Core] [DBUG] [astrbot_plugin_combine_messages.main:133]: 消息 1372387081 被标记为 T(处理)
[12:54:39] [Core] [DBUG] [astrbot_plugin_combine_messages.main:180]: 消息 1372387081 等待结果用时: 2.501秒, 结果: T
[12:54:39] [Core] [DBUG] [astrbot_plugin_combine_messages.main:246]: 只有一条消息,不需要合并: 画个美女...
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> astrbot_plugin_gallery - auto_collect_image
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> astrbot_plugin_gallery - handle_match
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> KeyReply - handle_all_messages
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> lyricnext - on_message
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> astrbot_plugin_memelite_rs - meme_handle
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> prefix_filter - filter_prefix_messages
[12:54:39] [Core] [DBUG] [method.star_request:50]: plugin -> astrbot - on_message
[12:54:39] [Core] [DBUG] [pipeline.context:33]: hook(on_llm_request) -> astrbot_plugin_knowledge_base - kb_on_llm_request
[12:54:39] [Core] [WARN] [core.llm_enhancer:85]: 用户默认知识库 'general' 不存在,跳过 LLM 请求增强。
[12:54:39] [Core] [DBUG] [pipeline.context:33]: hook(on_llm_request) -> astrbot_plugin_mnemosyne - query_memory
[12:54:39] [Core] [DBUG] [pipeline.context:33]: hook(on_llm_request) -> time_prompt - add_time_prompt
[12:54:39] [Core] [DBUG] [pipeline.context:33]: hook(on_llm_request) -> astrbot - decorate_llm_req
[12:54:39] [Core] [DBUG] [agent_runner.tool_loop_agent:60]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING
[12:54:43] [Core] [DBUG] [sources.openai_source:111]: completion: ChatCompletion(id='chatcmpl-202507011254397920358335tNJlohv', choices=[Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content='', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_8042dbaf142e481ca82d2bf22b24bb82', function=Function(arguments='{"prompt":"beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece"}', name='comfyui_txt2img'), type='function')]))], created=1751345683, model='gemini-2.5-flash', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=149, prompt_tokens=3978, total_tokens=4127, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=0, reasoning_tokens=115, rejected_prediction_tokens=None, text_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0, text_tokens=3978, image_tokens=0), input_tokens=0, output_tokens=0, input_tokens_details=None))
[12:54:43] [Core] [DBUG] [agent_runner.tool_loop_agent:109]: LLMResp: LLMResponse(role='tool', result_chain=None, tools_call_args=[{'prompt': 'beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece'}], tools_call_name=['comfyui_txt2img'], tools_call_ids=['call_8042dbaf142e481ca82d2bf22b24bb82'], raw_completion=ChatCompletion(id='chatcmpl-202507011254397920358335tNJlohv', choices=[Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content='', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_8042dbaf142e481ca82d2bf22b24bb82', function=Function(arguments='{"prompt":"beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece"}', name='comfyui_txt2img'), type='function')]))], created=1751345683, model='gemini-2.5-flash', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=149, prompt_tokens=3978, total_tokens=4127, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=0, reasoning_tokens=115, rejected_prediction_tokens=None, text_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0, text_tokens=3978, image_tokens=0), input_tokens=0, output_tokens=0, input_tokens_details=None)), _new_record=None, _completion_text='', is_chunk=False)
[12:54:43] [Core] [INFO] [agent_runner.tool_loop_agent:184]: Agent 使用工具: ['comfyui_txt2img']
[12:54:43] [Core] [INFO] [agent_runner.tool_loop_agent:256]: 使用工具:comfyui_txt2img,参数:{'prompt': 'beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece'}
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:50]: ==================================================
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:51]: 收到图片生成请求
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:52]: 原始提示词: beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:53]: 请求尺寸: NonexNone
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:54]: 平台: PlatformMetadata(name='aiocqhttp', description='适用于 OneBot 标准的消息平台适配器,支持反向 WebSockets。', id='3978431390', default_config_tmpl=None, adapter_display_name=None)
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:59]: 添加 safe tag 后的提示词: safe, beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.main:60]: ==================================================
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:152]: ==================================================
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:153]: 开始生成图片
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:154]: 正向提示词: safe, beautiful girl, anime style, high quality, detailed eyes, perfect face, masterpiece
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:155]: 反向提示词: lowres,(bad),bad feet,bad hands, text,error,fewer,extra fingers ,missing fingers ,worst quality,jpeg artifacts,low quality,watermark,unfinished,displeasing,oldest,early,signature,artistic error,username,scan,[abstract],english text,shiny hair,mosaic censoring, bar censor,
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:156]: 图片尺寸: 768x1024
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:157]: 迭代步数: 20
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:158]: 随机种子: 749276577668169
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:159]: ==================================================
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 6
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 105
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 17
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 72
[12:54:43] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 129
[12:54:45] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 117
[12:54:45] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 120
[12:54:45] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 115
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 116
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 108
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 7
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 26
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 127
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 27
[12:54:46] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 60
[12:54:48] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: 1
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:101]: 当前执行节点: save_image_websocket_node
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:104]: 接收到图片数据
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:109]: 已保存第 1 张图片
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:97]: 任务执行完成
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.comfyui_api:173]: 成功生成 1 张图片
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.main:73]: 图片已保存到: D:\AstrBotLauncher-0.1.5.5\AstrBot\data\plugins\astrbot_plugin_comfyui\output\temp_0.png
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.main:76]: 准备返回 1 张图片
[12:54:49] [Core] [DBUG] [agent_runner.tool_loop_agent:60]: Agent state transition: AgentState.RUNNING -> AgentState.DONE
[12:54:49] [Core] [INFO] [astrbot_plugin_comfyui.main:78]: 图片返回完成
[12:54:49] [Core] [DBUG] [pipeline.scheduler:79]: pipeline 执行完毕。
你愿意提交 PR 吗?
- [ ] 是的,我愿意提交 PR!
Code of Conduct
- [x] 我已阅读并同意遵守该项目的 行为准则。
可以提供一下这个插件的 GitHub 仓库吗?
Soulter @.***
感谢回复,地址如下: https://github.com/yuan199696/astrbot_plugin_comfyui
这个插件出现同样问题:https://github.com/nichinichisou0609/astrbot_plugin_gemini_artist
更新3.5.19后修复