-
Notifications
You must be signed in to change notification settings - Fork 366
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
[llava] How to clear imagepaths ? #643
Comments
FYI @SignalRT |
@dchatel, In my knowledge there is no LlavaAPI to reset images from the context (I could be wrong). Right now the option that I can think about is to create a new context / executor when the user prompts new images. Here you have the example modified: @AsakusaRinne , If this is OK to you I can make a PR with this change. |
I will review if there is a better way to manage this. |
Maybe a good way would be to clear the image embeds when ImagePaths is cleared?... |
ImagePath it's clearing right now automatically at the end of InferInternal:
I'm trying some options searching for "continuity" adding or changing images during conversation. I get something way better, but I need to solve some cases before to make a PR. |
Will llama_kv_cache_seq_rm can help? When embding image/prompt, we can get n_past, will it can be recorded as the positison. (I could be wrong). `// Removes all tokens that belong to the specified sequence and have positions in [p0, p1) LLAMA_API bool llama_kv_cache_seq_rm( |
@IntptrMax, it’s what I’m working on, I also introduce the capability to add images in the middle of conversation that’s something that is not possible with master code. I expect to have the complete solution this week. |
@dchatel , @IntptrMax In this PR #664 I introduce the idea to clear the images and to change the images during conversation. |
How to clear the embedded images from the context ?
Apparently, calling
executor.ImagePaths.Clear()
has no effect on the private variable_embeds
The text was updated successfully, but these errors were encountered: