Skip to content

Add model delete from hf cache logic #249

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

Merged
merged 5 commits into from
Apr 29, 2025
Merged

Conversation

deep1401
Copy link
Contributor

@deep1401 deep1401 requested review from aliasaria and dadmobile April 28, 2025 15:55
Copy link
Member

@dadmobile dadmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a gotcha case but let's merge this as I think it is an edge case that won't get worse!

)
print("If you want to delete the model from the HuggingFace cache, you must delete it from:")
print("~/.cache/huggingface/hub/")
if delete_from_cache:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of importing there are ways a model could not have an info.json and not be a huggingface model. But I guess that's fine...it will get caught by the except. I don't think many people are using import except for huggingface and ollama.

@deep1401 deep1401 merged commit 65accc3 into main Apr 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting Models form the Local Models list don't delete the Model from the Cache
2 participants