mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #16779] [MERGED] Fix: Free VRAM memory when updating embedding / reranking models #39869
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/16779
Author: @mahenning
Created: 8/21/2025
Status: ✅ Merged
Merged: 8/21/2025
Merged by: @tjbck
Base:
dev← Head:fix--clean-unload-embed/reranker-models📝 Commits (6)
39fe385Correctly unloads embedding/reranker modelscd02ff2Fix if checks6663fc3Unloads only if internal models are used.b3de329Chage torch import to conditional importc821c3eFormattingf2e78d7More formatting📊 Changes
2 files changed (+53 additions, -24 deletions)
View changed files
📝
backend/open_webui/main.py(+13 -8)📝
backend/open_webui/routers/retrieval.py(+40 -16)📄 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:
devbranch.Changelog Entry
Description
Fixed
Additional Information
torch.cuda.empty_cache()won’t drop that.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.