SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
549 stars 124 forks source link

[question/bug?] Do chromaDB module can work on CPU? #71

Closed valden80 closed 1 year ago

valden80 commented 1 year ago

When I starting extras with this command line: python server.py --cpu --enable-modules=caption,summarize,classify,chromadb it still using GPU. (For chromaDB only, other modules use CPU.)

This is intended behavior or bug? I already read help files to find info about this, but don't get any answer from them...

virt-10 commented 1 year ago

run one of the commands below before starting the sever with --cpu

for linux export CUDA_VISIBLE_DEVICES=""

for windows cmd set CUDA_VISIBLE_DEVICES=""

for windows powershell $env:CUDA_VISIBLE_DEVICES=""

this is my bash script for linux

#!/usr/bin/bash

# activates conda env
eval "$(conda shell.bash hook)"
conda activate extras

# tells pytorch that we do not have a gpu
export CUDA_VISIBLE_DEVICES=""

# run server on cpu
python server.py --enable-modules=summarize,classify,silero-tts,chromadb,caption --listen --cpu
Cohee1207 commented 1 year ago

There were updates to make chroma respect --cpu flag. Update and check, please