mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-15 21:41:05 -06:00
[PR #20337] [MERGED] feat: add support for passing 'steps' in image generation requests #96611
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20337
Author: @silentoplayz
Created: 1/2/2026
Status: ✅ Merged
Merged: 1/3/2026
Merged by: @tjbck
Base:
dev← Head:feat/image-gen-steps-supportw📝 Commits (1)
fa0313bfeat: add support for passing 'steps' in image generation requests📊 Changes
1 file changed (+13 additions, -4 deletions)
View changed files
📝
backend/open_webui/routers/images.py(+13 -4)📄 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 adds support for a
stepsparameter in the image generation API (CreateImageForm).Previously, the number of denoising steps was hardcoded to rely solely on the global configuration (
IMAGE_STEPS). This change allows thestepsparameter to be passed dynamically in the request (e.g., from an Action function or API call), overriding the global default if provided. This is particularly useful for custom Actions that allow users to adjust image quality/steps on a per-request basis.The change works for both ComfyUI and Automatic1111 image generation engines.
Added
stepsoptional field toCreateImageForminbackend/open_webui/routers/images.py.image_generationsto prioritize the request'sstepsvalue over the globalIMAGE_STEPSconfig if present.Changed
check_image_generationlogic for ComfyUI and Automatic1111 to respect thestepsparameter from the form data.Additional Information
Motivation
image_stepsValve, giving users the flexibility to adjust generation quality (steps) on the fly directly from a Valve or Uservalve, rather than being restricted to the adminImagesettings configuration.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.