Skip to content

KeyError: 'siglip2_vision_model' when loading Namo-500M-V2 model #14

@IuvenisSapiens

Description

@IuvenisSapiens

Description:
I am encountering an issue while attempting to start a server using the namo command-line tool with the Namo-500M-V2 model. The error seems to stem from an issue in loading the configuration for the vision model component.


Steps to Reproduce:

  1. Install the necessary dependencies and set up the environment.
  2. Run the command: namo server --model checkpoints/Namo-500M-V2
  3. Observe the following error message:
Starting the server...
Traceback (most recent call last):
  File "D:\LocalAIProject\runtime\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\LocalAIProject\runtime\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "D:\LocalAIProject\runtime\Scripts\namo.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\cli.py", line 46, in main
    args.func(args)
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\cli.py", line 12, in handle_server
    start_server(ip=args.ip, port=args.port, model=args.model)
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\openai.py", line 312, in start_server
    global_model = NamoVL(model_path=model_path, device="auto")
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\namo.py", line 30, in __init__
    super().__init__(model_path, processor_path, device)
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\base.py", line 18, in __init__
    self.model = self.load_model(model_path)
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\api\namo.py", line 45, in load_model
    model = NamoForCausalLM.from_pretrained(
  File "D:\LocalAIProject\runtime\lib\site-packages\transformers\modeling_utils.py", line 262, in _wrapper
    return func(*args, **kwargs)
  File "D:\LocalAIProject\runtime\lib\site-packages\transformers\modeling_utils.py", line 3647, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "D:\LocalAIProject\runtime\lib\site-packages\transformers\configuration_utils.py", line 572, in from_pretrained
    return cls.from_dict(config_dict, **kwargs)
  File "D:\LocalAIProject\runtime\lib\site-packages\transformers\configuration_utils.py", line 743, in from_dict
    config = cls(**config_dict)
  File "D:\LocalAIProject\runtime\lib\site-packages\namo\models\configuration_namo.py", line 59, in __init__
    vision_config = CONFIG_MAPPING[vision_config["model_type"]](**vision_config)
  File "D:\LocalAIProject\runtime\lib\site-packages\transformers\models\auto\configuration_auto.py", line 794, in __getitem__
    raise KeyError(key)
KeyError: 'siglip2_vision_model'

Expected Behavior:
The server should start successfully without any errors, and the model should be loaded correctly.

Additional Information:
I have verified that the model files are present in the specified directory. The error specifically points to an issue with the vision model configuration, where siglip2_vision_model is not found in the CONFIG_MAPPING.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions