Skip to content

Commit c805f15

Browse files
committed
Fix: Ensure CPU is set as default device when CUDA is not used
Signed-off-by: Palaniappan R <palaniappan.r.mail@gmail.com>
1 parent 2eb108d commit c805f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/vectorstores/faiss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(
3131
):
3232
self.embeddings_model_name = embeddings_model_name
3333

34-
model_kwargs = {"device": "cuda"} if use_cuda else {}
34+
model_kwargs = {"device": "cuda"} if use_cuda else {"device": "cpu"}
3535

3636
self.embedding_model: Union[
3737
HuggingFaceEmbeddings, GoogleGenerativeAIEmbeddings, VertexAIEmbeddings

0 commit comments

Comments
 (0)