[PR #136] [MERGED] Can specify root directory when loading model #460

Closed
opened 2026-10-31 21:15:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openai/CLIP/pull/136
Author: @kcosta42
Created: 8/6/2021
Status: ✅ Merged
Merged: 8/9/2021
Merged by: @jongwook

Base: main ← Head: patch-1


📝 Commits (2)

  • 53e1d0b Can specify root directory when loading model
  • 6599907 specifying download_root instead

📊 Changes

1 file changed (+7 additions, -4 deletions)

View changed files

📝 clip/clip.py (+7 -4)

📄 Description

The clip.load() function did not have any option to specify the root directory used in the internal _download() function.

This PR add keywords args to the function which allow the user to specify a custom cache directory.

Example:

import clip

model = clip.load("ViT-B/32", root="/path/to/cache")

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openai/CLIP/pull/136 **Author:** [@kcosta42](https://github.com/kcosta42) **Created:** 8/6/2021 **Status:** ✅ Merged **Merged:** 8/9/2021 **Merged by:** [@jongwook](https://github.com/jongwook) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (2) - [`53e1d0b`](https://github.com/openai/CLIP/commit/53e1d0b6aaf91423d1bf91248205b73198caa760) Can specify root directory when loading model - [`6599907`](https://github.com/openai/CLIP/commit/6599907d3e3c809b8c1a85fa317774241c0b4740) specifying download_root instead ### 📊 Changes **1 file changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `clip/clip.py` (+7 -4) </details> ### 📄 Description The `clip.load()` function did not have any option to specify the `root` directory used in the internal `_download()` function. This PR add keywords args to the function which allow the user to specify a custom cache directory. Example: ```py import clip model = clip.load("ViT-B/32", root="/path/to/cache") ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 21:15:12 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#460
No description provided.