Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix:Set CUDA_VISIBLE_DEVICES In DefaultEmbedding (#7465)

Stephen Hu65537b8200e5
diff --git a/rag/llm/embedding_model.py b/rag/llm/embedding_model.py
index 03cfcf0b02..5c978040b6 100644
--- a/rag/llm/embedding_model.py
+++ b/rag/llm/embedding_model.py
@@ -57,6 +57,7 @@ class Base(ABC):
class DefaultEmbedding(Base):
+ os.environ['CUDA_VISIBLE_DEVICES'] = '0'
_model = None
_model_name = ""
_model_lock = threading.Lock()