mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-24 20:14:58 -05:00
enh: image compression #2615
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 @somnifex on GitHub (Nov 11, 2024).
Originally assigned to: @tjbck on GitHub.
When we take pictures with modern phones or cameras, the image pixels and size are huge. The size of images passed into the API may be several MB or even tens of MB, which can be a disaster for some small VLM (perhaps it's also a disaster for large VLM, as there is too much redundant information in the picture). Can we provide an upfront image processing step to compress the image before passing it to the LLM API according to user settings, reducing its size to KB? (of course, users can also choose not to compress it, lol)
@parniantaghipour commented on GitHub (Nov 11, 2024):
@tjbck Do you think this is helpful?
https://openwebui.com/f/lamkhatinh/image_resizer
@Fusseldieb commented on GitHub (Dec 2, 2024):
This resizes it on the server, solving only part of the problem. Uploading a 5MB file using 4G on a phone still takes a decent amount of time. The solution is client-side resizing/compression.
@123hi123 commented on GitHub (Dec 2, 2024):
is this already sppourt by the newest version?
@spammenotinoz commented on GitHub (Dec 2, 2024):
The function is already supported but you need to download and install it.
I am finding it works as intended. I am not personally impacted by the slow uploads, so this function fixed my issues, especially with Anthropic.
@123hi123 commented on GitHub (Dec 3, 2024):
you say download this? https://openwebui.com/f/lamkhatinh/image_resizer
I thought this feature was included in the latest version.
@tjbck commented on GitHub (Dec 25, 2024):
Added to dev!
@Fusseldieb commented on GitHub (Dec 25, 2024):
@tjbck Does this resize on the server or on the device?
@tjbck commented on GitHub (Dec 25, 2024):
You should be using filter functions for server-side compression, above is for client-side.