Skip to content

Commit

Permalink
Merge pull request #40 from sgwhat/init-ipex-fix
Browse files Browse the repository at this point in the history
Hotfix ipex import related error
  • Loading branch information
sgwhat committed Jul 24, 2024
2 parents d3f9222 + 3461a27 commit ad7c93a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ad7c93a

Please sign in to comment.