Skip to content

miditok unknown attribute #7

@pyramid3d

Description

@pyramid3d

I get this error when running the example from the readme.

Traceback (most recent call last):
  File "text2midi/example.py", line 57, in <module>
    generated_midi = r_tokenizer.decode(output_list)
  File "text2midi/venv/lib/python3.13/site-packages/miditok/midi_tokenizer.py", line 1949, in decode
    score = self._tokens_to_score(tokens, programs)
  File "text2midi/venv/lib/python3.13/site-packages/miditok/tokenizations/remi.py", line 391, in _tokens_to_score
    dur_offset = 2 if self.config.use_velocities else 1
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TokenizerConfig' object has no attribute 'use_velocities'. Did you mean: 'num_velocities'?

Where do you set the tokenizer config for remi?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions