Model card instructions no longer working.

#8
by RimBlock - opened

Not sure if this is still being updated but just in case it is...

Following the instructions in the model card results in errors. After a little searching it seems these maybe related to the transformers version used.

Transformers version I have installed is 5.2.0.

Suspect changing the transformers version in the model card install details to a specific working version would resolve.

Happy to provide more environment details if required.

Warnings / Errors:

  1. torch_dtype is deprecated! Use dtype instead!

Easy fix to script on model card ...
torch_dtype=torch_dtype,
to:
dtype=torch_dtype,

  1. AttributeError: 'SegmentationModel' object has no attribute 'all_tied_weights_keys'.

Full error message:
Loading weights: 100%|β–ˆ| 54/54 [00:00<00:00, 2057.45it/s, Materializing param=model.sincnet.wav_norm1d.we
Traceback (most recent call last):
File "/home/fast-whisper-user/transcription/test_program.py", line 12, in
pipe = pipeline(
^^^^^^^^^
File "/home/fast-whisper-user/transcription/transcription_env/lib64/python3.12/site-packages/transformers/pipelines/init.py", line 1028, in pipeline
return pipeline_class(model=model, task=task, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fast-whisper-user/.cache/huggingface/modules/transformers_modules/kotoba_hyphen_tech/kotoba_hyphen_whisper_hyphen_v2_dot_2/9d33482a0eb9b57f1ad80708e8ac5538246d8355/kotoba_whisper.py", line 88, in init
self.model_speaker_diarization = SpeakerDiarization(
^^^^^^^^^^^^^^^^^^^
File "/home/fast-whisper-user/.cache/huggingface/modules/transformers_modules/kotoba_hyphen_tech/kotoba_hyphen_whisper_hyphen_v2_dot_2/9d33482a0eb9b57f1ad80708e8ac5538246d8355/kotoba_whisper.py", line 45, in init
self.pipeline._segmentation.model = SegmentationModel().from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fast-whisper-user/transcription/transcription_env/lib64/python3.12/site-packages/transformers/modeling_utils.py", line 4073, in from_pretrained
loading_info = cls._finalize_model_loading(model, load_config, loading_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fast-whisper-user/transcription/transcription_env/lib64/python3.12/site-packages/transformers/modeling_utils.py", line 4214, in _finalize_model_loading
model._adjust_tied_keys_with_tied_pointers(loading_info.missing_and_mismatched())
File "/home/fast-whisper-user/transcription/transcription_env/lib64/python3.12/site-packages/transformers/modeling_utils.py", line 4458, in _adjust_tied_keys_with_tied_pointers
self.all_tied_weights_keys.update(tied_weights_keys_by_pointers)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fast-whisper-user/transcription/transcription_env/lib64/python3.12/site-packages/torch/nn/modules/module.py", line 1965, in getattr
raise AttributeError(
AttributeError: 'SegmentationModel' object has no attribute 'all_tied_weights_keys'. Did you mean: '_tied_weights_keys'?

Sign up or log in to comment