mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 05:47:50 -05:00
[GH-ISSUE #20864] issue: IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE is ignored when clicking the IMAGE button on LLM response. The prompt is sent directly to ComfyUI without translation/enhancement. #34846
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @karoldydo on GitHub (Jan 22, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20864
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.7.2
Ollama Version (if applicable)
0.14.3
Operating System
Ubuntu 24.04.3 LTS
Browser (if applicable)
Chrome 144.0.7559.97
Confirmation
README.md.Expected Behavior
Prompt should be processed through IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE and translated to English before being sent to ComfyUI.
Actual Behavior
Prompt is sent to ComfyUI in original language (Polish), causing poor image generation results.
Steps to Reproduce
ENABLE_IMAGE_PROMPT_GENERATION=trueIMAGE_PROMPT_GENERATION_PROMPT_TEMPLATEwith translation instructionsLogs & Screenshots
open-webui logs:
ollama logs:
comfyui logs:
flux_fp8_simple:
COMFYUI_WORKFLOW_NODES:
Two screenshots:


The main problem is that the FLUX 1 understand only the english any other langauge is problematic, that's why it is important that prompt should go first via LLM than to ComfyUI
In both generation the original prompt (translated to english was):
Additional Information
Link to code that is probably problematic:
2b26355002/backend/open_webui/utils/images/comfyui.py (L156)Link to similar discussion: https://github.com/open-webui/open-webui/discussions/16830
TASK_MODEL:
IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE:
@owui-terminator[bot] commented on GitHub (Jan 22, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
by batcheej • Jan 16, 2026 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@tjbck commented on GitHub (Jan 22, 2026):
@silentoplayz @micahdbak able to reproduce?
@silentoplayz commented on GitHub (Jan 22, 2026):
Here's my evaluation (forgive me if it's not worth while, but it's likely just an easy fix too):
No matter what I tried during my attempts to reproduce this issue, my prompts sent to the model within a chat would get handed over to the task model (Current Model) and translated directly into English before sending that prompt over to ComfyUI to generate the image and return it back to me with a response in the chat.
Because I use Portainer for managing my containers / Docker stacks, I have set the following environment variable for my Open WebUI instance:
I opted to prompt for Chinese here, as I am used to seeing the English language as an American. If the environment variable worked, the prompt sent to ComfyUI should theoretically be entirely in the Chinese language. The prompt I used is indeed a valid prompt template and follows the convention / structure of the DEFAULT_IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE found in Open WebUI's codebase.
For more background info, I run my Open WebUI instance with
ENABLE_PERSISTENT_CONFIG="true", so to test this issue, I added the new environment variables that I was missing, which include the following:I also set to
ENABLE_PERSISTENT_CONFIGtofalsebefore starting up the stack. When the stack fully started and I didn't see any movement in the logs for Open WebUI, I stopped the stack again before settingENABLE_PERSISTENT_CONFIGback totrueagain and starting the stack once more. This gives me peace of mind, knowing that theDEFAULT_IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATEenvironment variable SHOULD be set now if it wasn't before.The model always translates to English on my end.
All this to say, the env var is ignored once a database value exists. I may have had it set at some point and then blanked it out. This could be a contributing factor if someone set a value via env var expecting it to work, but the database has a different value.
Update - The UI setting itself works
If I go into the
Interfacesettings via the admin panel and adjust theImage Prompt Generation Promptsetting to the following and generate an image in a chat, the image is generated in the language I want it to.Blanking the
Image Prompt Generation Promptsetting back to empty (Default) does as expected.@silentoplayz commented on GitHub (Jan 22, 2026):
OP, FLUX absolutely understands languages other than English. Drop any of the non-English prompts from this thread straight into ComfyUI and you’ll get visually identical results to the English versions. They converge to roughly the same image, proving the model's multi-language understanding capability.
@karoldydo commented on GitHub (Jan 22, 2026):
Little update from my side - I've double check my configuration and everything seems to be alright, but:
and the translations and improving prompt start working...
I've no idea why ministral-3:8b is just passing throught the prompt.
If I will discover something will keep you up to infomring, for now the workaround is to change a model.