Workflow not working after image generation model query. #19963

Closed
opened 2026-02-21 20:05:09 -05:00 by yindo · 4 comments
Owner

Originally created by @Harshal1000 on GitHub (Oct 27, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

latest version

Cloud or Self Hosted

Cloud

Steps to reproduce

When i add first query as image generation model ex. generate image for dog.
It generate image then when i do some normal queries, it fails to generate response instead giving error.
attaching some of chats.

Image Image Image

✔️ Expected Behavior

Workflow must work seamlessly, without any error.

Actual Behavior

Giving error of bad arguments, kind of backend issue by dify.

Originally created by @Harshal1000 on GitHub (Oct 27, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version latest version ### Cloud or Self Hosted Cloud ### Steps to reproduce When i add first query as image generation model ex. generate image for dog. It generate image then when i do some normal queries, it fails to generate response instead giving error. attaching some of chats. <img width="318" height="695" alt="Image" src="https://github.com/user-attachments/assets/d38c23e5-5aea-4078-a323-f0872bd84b4d" /> <img width="301" height="707" alt="Image" src="https://github.com/user-attachments/assets/08c66b18-77ee-4433-8c8b-e7661976d82f" /> <img width="297" height="705" alt="Image" src="https://github.com/user-attachments/assets/08bf9b02-f581-4ced-9b73-41eab9921ded" /> ### ✔️ Expected Behavior Workflow must work seamlessly, without any error. ### ❌ Actual Behavior Giving error of bad arguments, kind of backend issue by dify.
yindo added the 🐞 bug label 2026-02-21 20:05:09 -05:00
yindo closed this issue 2026-02-21 20:05:09 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 27, 2025):

This is a known bug in Dify where workflows fail with a "bad argument type for built-in operation" error after an image generation model query, especially when switching from image to text queries. The root cause is a type mismatch in the backend: outputs from image generation nodes (like images or objects) aren't always converted or validated properly before being passed to nodes expecting text, which leads to backend failures1.

This issue has been reported by other users and is recognized as a bug, but there is no official fix or documented workaround yet for the cloud version. For self-hosted or plugin-based setups, some users have worked around similar multimodal validation errors by upgrading plugins (OpenAI, Azure OpenAI, OpenRouter) to the latest versions, or by pinning the dify_plugin SDK below version 0.0.1b74 if using custom plugins23. However, these workarounds may not apply to Dify Cloud.

If you need a temporary workaround, try to avoid mixing image and text queries in the same workflow until a fix is released. If you are using any custom plugins, ensure they are updated to the latest versions as per the plugin maintainers' guidance.

If you need more technical details or want to track the issue, you can follow related discussions and plugin updates in the Dify GitHub issues.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Oct 27, 2025): <!-- Answer --> This is a known bug in Dify where workflows fail with a "bad argument type for built-in operation" error after an image generation model query, especially when switching from image to text queries. The root cause is a type mismatch in the backend: outputs from image generation nodes (like images or objects) aren't always converted or validated properly before being passed to nodes expecting text, which leads to backend failures[1](https://github.com/langgenius/dify/blob/dc1ae57dc669f4dbce1daa08b37f2e78068d5074/api/core/workflow/nodes/llm/node.py). This issue has been reported by other users and is recognized as a bug, but there is no official fix or documented workaround yet for the cloud version. For self-hosted or plugin-based setups, some users have worked around similar multimodal validation errors by upgrading plugins (OpenAI, Azure OpenAI, OpenRouter) to the latest versions, or by pinning the `dify_plugin` SDK below version 0.0.1b74 if using custom plugins[2](https://github.com/langgenius/dify/issues/16353)[3](https://github.com/langgenius/dify/issues/16971). However, these workarounds may not apply to Dify Cloud. If you need a temporary workaround, try to avoid mixing image and text queries in the same workflow until a fix is released. If you are using any custom plugins, ensure they are updated to the latest versions as per the plugin maintainers' guidance. If you need more technical details or want to track the issue, you can follow related discussions and plugin updates in the Dify GitHub issues. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ca18da03-b552-4c81-8a66-91ef34f56839?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/27521)
Author
Owner

@Harshal1000 commented on GitHub (Oct 27, 2025):

Its urgent one
We are not gonna do anything.
Please reply

@Harshal1000 commented on GitHub (Oct 27, 2025): Its urgent one We are not gonna do anything. Please reply
Author
Owner

@taha-superr commented on GitHub (Oct 29, 2025):

???

@taha-superr commented on GitHub (Oct 29, 2025): ???
Author
Owner

@dosubot[bot] commented on GitHub (Dec 3, 2025):

Hi, @Harshal1000. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that after using an image generation model query in a Dify Cloud workflow, subsequent text queries fail with a backend "bad arguments" error.
  • This is a known bug caused by type mismatches when switching from image to text nodes.
  • There is currently no official fix for the cloud version; workarounds like updating plugins only apply to self-hosted setups.
  • Users are advised to avoid mixing image and text queries in the same workflow until this is resolved.
  • You have expressed urgency, but no new solution has been provided yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Dec 3, 2025): Hi, @Harshal1000. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that after using an image generation model query in a Dify Cloud workflow, subsequent text queries fail with a backend "bad arguments" error. - This is a known bug caused by type mismatches when switching from image to text nodes. - There is currently no official fix for the cloud version; workarounds like updating plugins only apply to self-hosted setups. - Users are advised to avoid mixing image and text queries in the same workflow until this is resolved. - You have expressed urgency, but no new solution has been provided yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#19963