Hi @masaki_yamagishi, what is the command-line you used to start the VideoQuery agent? Did you give it your path to --nanodb ? It would seem that it is not finding it or creating empty database - can you post the terminal log from the program?
That is good that you confirmed NanoDB to be independently working in it’s own server. Also the WebRTC settings only impact the live video view, not the NanoDB widget.
And the output of it is attached. live_llava.txt (110.5 KB)
Errors as below occurred repeatedly.
Traceback (most recent call last):
File “/opt/NanoLLM/nano_llm/plugin.py”, line 201, in run
self.dispatch(input, **kwargs)
File “/opt/NanoLLM/nano_llm/plugin.py”, line 216, in dispatch
outputs = self.process(input, **kwargs)
File “/opt/NanoLLM/nano_llm/plugins/nanodb.py”, line 52, in process
indexes, similarity = self.db.search(input, k=k)
File “/opt/nanodb/nanodb/nanodb.py”, line 61, in search
embedding = self.embed(query)
File “/opt/nanodb/nanodb/nanodb.py”, line 244, in embed
raise RuntimeError(“nanodb was created without an embedding model”)
RuntimeError: nanodb was created without an embedding model
The settings of NanoDB was done and worked correctly, so I don’t know why these errors occurred…
Ok gotcha @masaki_yamagishi, I realize what is going on now: VILA-2.7B used the same openai/clip-vit-large-patch14-336 vision model that the NanoDB was created with, however VILA1.5-3B uses a SigLIP vision encoder that it custom-trained, and the embedding dimensions are different.
I will have to do some rework of NanoDB to support using arbitrary embedding models, and the database will need to be re-indexed with the particular model the VLM is using (should you want to reuse the embeddings and not have to recalculate them)
In the nearer term, I will have to add a flag to the VideoQuery agent to disable reusing the embeddings, and then NanoDB will go back to calculating them with the original CLIP model. Until then, unfortunately I would go back to using VILA-2.7B if you require the live NanoDB integration, sorry about that.
You mean this issue derived from difference of models used NanoDB and Live LLaVA, and if I want to Live LLaVA with NanoDB, I should use Efficient-Large-Model/VILA-2.7b network right now, right?
I tried that with below command, but UI of NanoDB was still disappeared.
The output of this is attached. vila_2_7b_nanodb.txt (159.2 KB)
I found occurring errors repeatedly like below.
Traceback (most recent call last):
File “/opt/NanoLLM/nano_llm/plugin.py”, line 201, in run
self.dispatch(input, **kwargs)
File “/opt/NanoLLM/nano_llm/plugin.py”, line 216, in dispatch
outputs = self.process(input, **kwargs)
File “/opt/NanoLLM/nano_llm/plugins/nanodb.py”, line 52, in process
indexes, similarity = self.db.search(input, k=k)
File “/opt/nanodb/nanodb/nanodb.py”, line 63, in search
indexes, distances = self.index.search(embedding, k=k)
File “/opt/nanodb/nanodb/vector_index.py”, line 156, in search
raise ValueError(f"queries need to use {self.dtype} dtype (was type {queries.dtype})")
ValueError: queries need to use float16 dtype (was type float32)
I’ll have exhibition in this May where I show Live LLaVA, so if you can, please tell next step of method to improve this issue.
Hi @masaki_yamagishi, I made a temporary fix to get it working again with Efficient-Large-Model/VILA1.5-3b and NanoDB - can you try pulling the latest container: