def convert_token_to_id(self, token):
        """ Converts a token (str) in an id using the vocab. """
        if token in self.special_tokens:
            return self.special_tokens[token]
        return self.sp_model.PieceToId(token)
 Converts a token (str) in an id using the vocab. 
diffsynth/prompters/kolors_prompter.py