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)
Originally created by @somnifex on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6848
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)
<!-- gh-comment-id:2469194057 -->
@parniantaghipour commented on GitHub (Nov 11, 2024):
@tjbck Do you think this is helpful?
https://openwebui.com/f/lamkhatinh/image_resizer
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.
<!-- gh-comment-id:2511280059 -->
@Fusseldieb commented on GitHub (Dec 2, 2024):
> @tjbck Do you think this is helpful?
>
> https://openwebui.com/f/lamkhatinh/image_resizer
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.
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.
<!-- gh-comment-id:2513191722 -->
@spammenotinoz commented on GitHub (Dec 2, 2024):
> is this already sppourt by the newest version?
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.
is this already sppourt by the newest version?這是否已由最新版本支援?
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.我發現它按預期工作。我個人沒有受到上傳速度慢的影響,所以這個功能解決了我的問題,特別是與 Anthropic 有關的問題。
<!-- gh-comment-id:2513612319 -->
@123hi123 commented on GitHub (Dec 3, 2024):
> > is this already sppourt by the newest version?這是否已由最新版本支援?
>
> 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.我發現它按預期工作。我個人沒有受到上傳速度慢的影響,所以這個功能解決了我的問題,特別是與 Anthropic 有關的問題。
you say download this? https://openwebui.com/f/lamkhatinh/image_resizer
I thought this feature was included in the latest version.
You should be using filter functions for server-side compression, above is for client-side.
<!-- gh-comment-id:2561666410 -->
@tjbck commented on GitHub (Dec 25, 2024):
You should be using filter functions for server-side compression, above is for client-side.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @somnifex on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6848
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.