Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is \n behind the <image> or <video> token needed? #38

Closed
pmtheman opened this issue Feb 11, 2025 · 2 comments
Closed

Is \n behind the <image> or <video> token needed? #38

pmtheman opened this issue Feb 11, 2025 · 2 comments

Comments

@pmtheman
Copy link

Thanks for your work!
In the code from the official repository, there is no \n behind the token.
I don't know whether it is a requirement?

@2U1
Copy link
Owner

2U1 commented Feb 11, 2025

Yes for the consistency with my other repository, it is needed after the <image> token or <video> token.
Or you could just modify the lines here.

if is_video:
input_string = input_string.replace(LLAVA_VIDEO_TOKEN+'\n', VISION_START_TOKEN+DEFAULT_VIDEO_TOKEN+VISION_END_TOKEN)
else:
input_string = input_string.replace(LLAVA_IMAGE_TOKEN+'\n', VISION_START_TOKEN+DEFAULT_IMAGE_TOKEN+VISION_END_TOKEN)

@2U1
Copy link
Owner

2U1 commented Feb 18, 2025

I've updated the code to handle if there are no "\n" behind the <image> or <video> token.

@2U1 2U1 closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants