Problem loading the checkpoint

#1
by sarahESL - opened

When loading the checkpoint via vision_model = PS3VisionModel.from_pretrained("nvidia/PS3-4K-SigLIP"), I get the following error:

File "/path/to/miniforge3/lib/python3.12/site-packages/transformers/modeling_utils.py", line 40
90, in from_pretrained                                                                                
    model = cls(config, *model_args, **model_kwargs)                                                  
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                  
  File "/path/to/PS3/ps3/modeling_ps3.py", line 808, in __init__                                 
    self.vision_model = PS3VisionEncoder(config)                                                      
                        ^^^^^^^^^^^^^^^^^^^^^^^^                                                      
  File "/path/to/PS3/ps3/modeling_ps3.py", line 90, in __init__                                  
    self.trunk = timm.create_model(                                                                   
                 ^^^^^^^^^^^^^^^^^^                                                                   
  File "/path/to/miniforge3/lib/python3.12/site-packages/timm/models/_factory.py", line 138, in c
reate_model            
    model = create_fn(                             
            ^^^^^^^^^^                                                                                
  File "/path/to/miniforge3/lib/python3.12/site-packages/timm/models/vision_transformer.py", line
 3637, in vit_so400m_patch14_siglip_384            
    model = _create_vision_transformer(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                               
  File "/path/to/miniforge3/lib/python3.12/site-packages/timm/models/vision_transformer.py", line
 2679, in _create_vision_transformer
    return build_model_with_cfg(
           ^^^^^^^^^^^^^^^^^^^^^                                                                      
  File "/path/to/miniforge3/lib/python3.12/site-packages/timm/models/_builder.py", line 445, in b
uild_model_with_cfg                                                                                   
    model = model_cls(**kwargs)                                                                       
            ^^^^^^^^^^^^^^^^^^^                                                                       
  File "/path/to/miniforge3/lib/python3.12/site-packages/timm/models/vision_transformer.py", line
 583, in __init__
    block_fn(                                                                                         
TypeError: Block_w_KVCache.__init__() got an unexpected keyword argument 'scale_attn_norm'

I tried installing ps3 both via pip and the github repo. I get the same error in both cases.

Dependency versions:

timm                     1.0.19
torch                    2.7.1
torchvision              0.22.1
transformers             4.48.0

Hi, it seems to be caused by the timm version. Could you try downgrading timm to 1.0.15?

Sign up or log in to comment