This commit is contained in:
wailovet
2024-06-04 02:46:21 +08:00
parent 9ad47e8bab
commit 22fe4c82ef
+12 -8
View File
@@ -331,9 +331,10 @@ def image_interrogator_node_encode(args_dict):
if llama_cpp_model == "auto":
llama_cpp_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
"ggml_llava1_5-7b-q4_k_m")
else:
llama_cpp_model = os.path.join(
mz_prompt_utils.Utils.get_gguf_models_path(), llama_cpp_model)
mmproj_model_name = mmproj_model
if mmproj_model == "auto":
llama_cpp_model_sha256 = mz_prompt_utils.Utils.file_sha256(
llama_cpp_model)
@@ -350,9 +351,12 @@ def image_interrogator_node_encode(args_dict):
"llama_cpp_model_sha256: ", llama_cpp_model_sha256)
raise Exception(
"未能自动找到对应的mmproj文件 ; Failed to automatically find the corresponding mmproj file.")
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
else:
mmproj_model = os.path.join(
mz_prompt_utils.Utils.get_gguf_models_path(), mmproj_model)
elif select_model_type == "DownloaderSelect":
model_name = model_config.get("model_name")
@@ -360,7 +364,7 @@ def image_interrogator_node_encode(args_dict):
model_name)
mmproj_model = model_config.get("mmproj_model_name", "auto")
mmproj_model_name = mmproj_model
if mmproj_model == "auto":
llama_cpp_model_sha256 = mz_prompt_utils.Utils.file_sha256(
@@ -379,9 +383,9 @@ def image_interrogator_node_encode(args_dict):
if mmproj_model_name is None:
raise Exception(
"未能自动找到对应的mmproj文件 ; Failed to automatically find the corresponding mmproj file")
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
mmproj_model_name)
else:
raise Exception("Unknown select_model_type")