Skip to content

Can't use local model (Solved) #42369

@kabayan

Description

@kabayan

System Info

With v4.57.2,

Who can help?

I can't use local saved model(Qwen3-vl-2b).

File "/opt/venv/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2419, in _from_pretrained
if _is_local and _config.model_type not in [
AttributeError: 'dict' object has no attribute 'model_type'

So I changed below and works.
if _is_local and _config.get("model_type") not in [

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

  1. Load any model by any style (hf download, git etc)
  2. Use AutoProcessor.from_pretrained(download_folder)
  3. Error!

Expected behavior

Just code is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions