model path retrieval

This commit is contained in:
Pablerdo
2025-03-21 13:42:50 -04:00
parent 0d877571d9
commit f75570b9a6
+8 -3
View File
@@ -1,4 +1,9 @@
import json
import folder_paths
from pathlib import Path
llama_model_path = Path(folder_paths.folder_names_and_paths["zepta/llama-2-7b-chat.Q8_0.gguf"])
class MergePrompts():
@classmethod
@@ -31,8 +36,8 @@ class MergePrompts():
# Initialize LLama model (adjust path to your model)
try:
model_path = "zepta/llama-2-7b-chat.Q8_0.gguf" # Path to your LLama model
llm = Llama(model_path=model_path, n_ctx=4096)
# model_path = "zepta/llama-2-7b-chat.Q8_0.gguf" # Path to your LLama model
llm = Llama(model_path=llama_model_path, n_ctx=4096)
except Exception as e:
return f"Error loading LLama model: {str(e)}"
@@ -51,7 +56,7 @@ class MergePrompts():
print(generalSa2VAPrompt)
print("--------------------------------")
# Format subjects and their descriptions
subject_descriptions = ""