Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM]Fix bug in offload_unlocked_models() call #6450

Merged
merged 2 commits into from
May 29, 2024

Conversation

lstein
Copy link
Collaborator

@lstein lstein commented May 28, 2024

Summary

When lazy offloading is false, the model locker's unlock() method was asking offload_unlocked_models to free up VRAM sufficient to load the model that is being unlocked. This was incorrect. The method should be called with a size of 0, which will have the effect of removing models until VRAM is less than or equal to max_vram_cache.

Related Issues / Discussions

Please see #6439 (review) for @RyanJDick 's discovery of this bug.

QA Instructions

Merge Plan

Merge when approved.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added python PRs that change python files backend PRs that change backend files labels May 28, 2024
@lstein lstein mentioned this pull request May 28, 2024
3 tasks
RyanJDick
RyanJDick approved these changes May 28, 2024
@lstein lstein enabled auto-merge (squash) May 29, 2024 02:52
@lstein lstein merged commit 21a60af into main May 29, 2024
14 checks passed
@lstein lstein deleted the lstein/bugfix/offload-unlocked-models-bug branch May 29, 2024 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend PRs that change backend files python PRs that change python files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants