mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #20911] [MERGED] perf: parallelize image loading in image_edits endpoint #48874
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/20911
Author: @sjhddh
Created: 1/23/2026
Status: ✅ Merged
Merged: 1/27/2026
Merged by: @tjbck
Base:
dev← Head:fix/images-parallel-loading📝 Commits (1)
79486b6perf: parallelize image loading in image_edits endpoint📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/images.py(+2 -1)📄 Description
Summary
Use
asyncio.gather()to load multiple images concurrently in theimage_editsendpoint instead of loading them sequentially.Problem
When editing multiple images, the current implementation loads them one by one:
This means if you have 5 images that each take 1 second to load, the total time is 5 seconds.
Solution
Use
asyncio.gather()to load all images in parallel:With this change, all 5 images load concurrently, reducing total time to ~1 second.
Changed
image_editsendpoint now usesasyncio.gather()for parallel executionFixed
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.