mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #19918] [MERGED] fix: enable COMFYUI_WORKFLOW_NODES and IMAGES_EDIT_COMFYUI_WORKFLOW_NODES configuration via env vars #48435
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/19918
Author: @silentoplayz
Created: 12/12/2025
Status: ✅ Merged
Merged: 12/14/2025
Merged by: @tjbck
Base:
dev← Head:fix/comfyuiworkflownodesenv📝 Commits (2)
3f29a11fix: enable COMFYUI_WORKFLOW_NODES loading from environment variables34a6135fix: enable IMAGES_EDIT_COMFYUI_WORKFLOW_NODES loading from environment variables📊 Changes
1 file changed (+15 additions, -3 deletions)
View changed files
📝
backend/open_webui/config.py(+15 -3)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
This PR fixes an issue where
COMFYUI_WORKFLOW_NODESandIMAGES_EDIT_COMFYUI_WORKFLOW_NODESwere not being loaded from environment variables. These configurations were statically initialized as empty lists, preventing users from customizing node mappings via environment variables (e.g., for Docker deployments).We now correctly parse these environment variables as JSON lists. Additionally, this PR fixes a copy-paste error where the PersistentConfig key for
COMFYUI_WORKFLOW_NODESwas incorrectly set to"COMFYUI_WORKFLOW", which likely caused conflicts with the workflow definition itself.Fixed
Fixed
COMFYUI_WORKFLOW_NODESandIMAGES_EDIT_COMFYUI_WORKFLOW_NODESto correctly load JSON list strings from environment variables.Corrected the PersistentConfig key name for
COMFYUI_WORKFLOW_NODESfrom"COMFYUI_WORKFLOW"to"COMFYUI_WORKFLOW_NODES".Additional Information
The fix uses
json.loads(os.environ.get(...))to ensure the complex list/dict structure is correctly parsed from the string environment variable, preventing iteration errors that would occur if the raw string were used directly. This PR seeks to solve the issue highlighted in https://github.com/open-webui/open-webui/discussions/19886.Verification Results
I verified the fix using a python script that mocks the environment variables and imports the config.
Verification Script:
Output:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.