Closed yujonglee closed 1 month ago
It is expected to fail, but we can improve the error message, yeah :) In your app you should check if the text is blank and not try to tokenize in such case.
Actually, for some tokenizers an empty string works, it depends if they add special tokens or not (in Stable Diffusion we actually do tokenize an empty string). Either way, I added a more specific error when it returns zero tokens (3a597615344def7dd2e8f8df2dfe21ad758e094a).
To reproduce: