diff --git a/modules/models.py b/modules/models.py index 55b14092f6..1e248a51c5 100644 --- a/modules/models.py +++ b/modules/models.py @@ -26,6 +26,8 @@ from modules.models_settings import get_model_metadata from modules.relative_imports import RelativeImport +from ipex_llm.transformers import AutoModelForCausalLM, AutoModel, AutoModelForSeq2SeqLM + transformers.logging.set_verbosity_error() local_rank = None @@ -323,8 +325,6 @@ def AutoAWQ_loader(model_name): def ipex_llm_loader(model_name): - from ipex_llm.transformers import AutoModelForCausalLM, AutoModel, AutoModelForSeq2SeqLM - path_to_model = Path(f'{shared.args.model_dir}/{model_name}') config = AutoConfig.from_pretrained(path_to_model, trust_remote_code=shared.args.trust_remote_code)