[PR #4300] [MERGED] feat: added support for the new Flux image gen model using ComfyUI #60301

Closed
opened 2026-05-06 03:00:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/4300
Author: @JohnTheNerd
Created: 8/2/2024
Status: Merged
Merged: 8/2/2024
Merged by: @tjbck

Base: devHead: flux-image-gen


📝 Commits (1)

  • ad6e8ed added support for the new Flux image gen model using ComfyUI

📊 Changes

3 files changed (+196 additions, -9 deletions)

View changed files

📝 backend/apps/images/main.py (+15 -1)
📝 backend/apps/images/utils/comfyui.py (+163 -8)
📝 backend/config.py (+18 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

added support for the new Flux image gen model using ComfyUI

Added

this PR adds three environment variables:

  • COMFYUI_FLUX: determines whether Flux is used, the workflow is completely different so this is necessary.
  • COMFYUI_FLUX_WEIGHT_DTYPE: sets the weight precision for Flux. you will probably want to set this to "fp8_e4m3fn" as the fp16 weights take up about 24GB of VRAM. optional, defaults to "default".
  • COMFYUI_FLUX_FP8_CLIP: Flux requires two CLIP models downloaded, one of which is available in fp8 and fp16. set to true if you are using the fp8 CLIP weights.

Changed

n/a

Deprecated

n/a

Removed

n/a

Fixed

n/a

Security

n/a

Breaking Changes

n/a


Additional Information

docs at https://github.com/open-webui/docs/pull/169

Screenshots or Videos

image

(image was generated using 8bpw weight precision, it can actually do better but I don't have the spare VRAM)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/4300 **Author:** [@JohnTheNerd](https://github.com/JohnTheNerd) **Created:** 8/2/2024 **Status:** ✅ Merged **Merged:** 8/2/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `flux-image-gen` --- ### 📝 Commits (1) - [`ad6e8ed`](https://github.com/open-webui/open-webui/commit/ad6e8edcd365327369c596fb49a922e378a364dc) added support for the new Flux image gen model using ComfyUI ### 📊 Changes **3 files changed** (+196 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/images/main.py` (+15 -1) 📝 `backend/apps/images/utils/comfyui.py` (+163 -8) 📝 `backend/config.py` (+18 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for validating the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description added support for the new Flux image gen model using ComfyUI ### Added this PR adds three environment variables: - COMFYUI_FLUX: determines whether Flux is used, the workflow is completely different so this is necessary. - COMFYUI_FLUX_WEIGHT_DTYPE: sets the weight precision for Flux. you will probably want to set this to "fp8_e4m3fn" as the fp16 weights take up about 24GB of VRAM. optional, defaults to "default". - COMFYUI_FLUX_FP8_CLIP: Flux requires two CLIP models downloaded, one of which is available in fp8 and fp16. set to true if you are using the fp8 CLIP weights. ### Changed n/a ### Deprecated n/a ### Removed n/a ### Fixed n/a ### Security n/a ### Breaking Changes n/a --- ### Additional Information docs at https://github.com/open-webui/docs/pull/169 ### Screenshots or Videos ![image](https://github.com/user-attachments/assets/75f2a725-d8ce-4c89-940a-5afc7c499402) (image was generated using 8bpw weight precision, it can actually do better but I don't have the spare VRAM) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 03:00:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#60301