Skip to content

Commit 05fef0c

Browse files
Update optimum/intel/ipex/modeling_base.py
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
1 parent 2eba14e commit 05fef0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimum/intel/ipex/modeling_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _from_pretrained(
204204
**kwargs,
205205
):
206206
if not getattr(config, "torchscript", False):
207-
raise ValueError("`torchscript` should be set to True to load TorchScript model")
207+
raise ValueError("`config.torchscript` should be set to `True`, if your model is not a TorchScript model and needs to be traced please set `export=True` when loading it with `.from_pretrained()`")
208208

209209
# Load the model from local directory
210210
if os.path.isdir(model_id):

0 commit comments

Comments
 (0)