From 5da9def874340a3f98eac96b313e00194ec7b959 Mon Sep 17 00:00:00 2001 From: wailovet Date: Sat, 1 Jun 2024 03:49:40 +0800 Subject: [PATCH] 'update' --- v1/init.py | 11 ++++------- v1/mz_phi3.py | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/v1/init.py b/v1/init.py index 3005954..bcb43a6 100644 --- a/v1/init.py +++ b/v1/init.py @@ -1,5 +1,4 @@ from ..mz_prompt_utils import Utils - NODE_CLASS_MAPPINGS = { } @@ -8,11 +7,12 @@ NODE_DISPLAY_NAME_MAPPINGS = { } -import importlib +import importlib from . import mz_llama3 from . import mz_phi3 from .. import mz_llama_cpp from .. import mz_llama_core_nodes +from . import mz_deprecated AUTHOR_NAME = u"MinusZone" @@ -75,7 +75,7 @@ class MZ_LLama3CLIPTextEncode: FUNCTION = "encode" CATEGORY = CATEGORY_NAME - def encode(self, **kwargs): + def encode(self, **kwargs): kwargs["llama_cpp_model"] = kwargs.get( "llama_cpp_model", "").replace("[downloaded]", "") @@ -176,12 +176,9 @@ class MZ_BaseLLamaCPPCLIPTextEncode: CATEGORY = CATEGORY_NAME def encode(self, **kwargs): - importlib.reload(mz_llama3) - kwargs["llama_cpp_model"] = kwargs.get( "llama_cpp_model", "").replace("[downloaded]", "") - - text = mz_llama_cpp.base_query_beautify_prompt_text(kwargs) + text = mz_deprecated.base_query_beautify_prompt_text(kwargs) conditionings = None clip = kwargs.get("clip", None) if clip is not None: diff --git a/v1/mz_phi3.py b/v1/mz_phi3.py index 1d904a2..a85dfc4 100644 --- a/v1/mz_phi3.py +++ b/v1/mz_phi3.py @@ -1,6 +1,7 @@ import json from .. import mz_prompt_utils from .. import mz_llama_cpp +from . import mz_deprecated phi3_models = [ "Phi-3-mini-4k-instruct-q4.gguf" @@ -46,7 +47,7 @@ def query_beautify_prompt_text(args_dict): model_file = mz_prompt_utils.Utils.hf_download_model(model_url) args_dict["llama_cpp_model"] = model_file - full_response = mz_llama_cpp.base_query_beautify_prompt_text( + full_response = mz_deprecated.base_query_beautify_prompt_text( args_dict=args_dict) return full_response