Skip to content

Commit 14206fd

Browse files
authoredSep 2, 2024
fix: fix clip tokenizer (leejet#383)
1 parent e410aeb commit 14206fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎clip.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class CLIPTokenizer {
388388
std::string token_str = token.str();
389389
std::u32string utf32_token;
390390
for (int i = 0; i < token_str.length(); i++) {
391-
char b = token_str[i];
391+
unsigned char b = token_str[i];
392392
utf32_token += byte_encoder[b];
393393
}
394394
auto bpe_strs = bpe(utf32_token);

0 commit comments

Comments
 (0)
Please sign in to comment.