Open JueLuo99 opened 1 month ago
To enable LibrePhotos to work completely offline by manually downloading and placing the required machine learning models, you can follow the steps outlined below. This guide assumes that you have access to the Internet initially to download the models and then configure LibrePhotos to run in an offline environment.
Manually download the necessary models from their respective URLs. Below is a list of models used by LibrePhotos, along with their download links:
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/places365.tar.gz
https://download.pytorch.org/models/resnet18-5c106cde.pth
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt_onnx.tar.gz
https://huggingface.co/derneuere/librephotos_models/resolve/main/blip_large.tar.gz?download=true
https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF/resolve/main/mistral-7b-v0.1.Q5_K_M.gguf?download=true
https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q5_K_M.gguf?download=true
Once the models are downloaded, place them in the following directory:
<LibrePhotos Media Root Directory>/data_models/
For example, if your MEDIA_ROOT
is set to /var/lib/librephotos
, then the models should be placed in /var/lib/librephotos/data_models/
.
<MEDIA_ROOT>/data_models/im2txt/
<MEDIA_ROOT>/data_models/clip-embeddings/
<MEDIA_ROOT>/data_models/places365/
<MEDIA_ROOT>/data_models/resnet18-5c106cde.pth
<MEDIA_ROOT>/data_models/im2txt_onnx/
<MEDIA_ROOT>/data_models/blip/
<MEDIA_ROOT>/data_models/mistral-7b-v0.1.Q5_K_M.gguf
<MEDIA_ROOT>/data_models/mistral-7b-instruct-v0.2.Q5_K_M.gguf
Ensure that all models are correctly placed and unpacked in their respective directories. The structure should look something like this:
data_models/
├── im2txt/
├── clip-embeddings/
├── places365/
├── resnet18-5c106cde.pth
├── im2txt_onnx/
├── blip/
├── mistral-7b-v0.1.Q5_K_M.gguf
└── mistral-7b-instruct-v0.2.Q5_K_M.gguf
You can now run LibrePhotos without an active Internet connection. The application will use the models you manually downloaded and placed in the data_models
directory.
The current version requires an Internet connection to download the models when it is first used after deployment.
Will the future add ways to deploy without the Internet? This will make LibrePhotos a completely offline usable project.
Can I download and place these models in the specified location manually?
I didn't find where to download and place them in the documentation.
Thanks for any help.