Closed bryanhughes closed 7 months ago
@bryanhughes I have been migrating to the newer model builder workflow in MLC, and this issue should have been fixed last night in commit https://github.com/dusty-nv/jetson-containers/commit/8fc4f936b3057e1a8c96f0225d1ef317f5ad49d0 and the latest dustynv/local_llm:r36.2.0
container image - when did you last pull it?
EDIT: due to discrepancy in the line numbers from your stack traceback vs the latest source, it would appear you aren't running the latest container image
@dusty-nv Thanks! Yeah, I just pulled a new container and now it works, except now it looks like the demo is missing the file path.jpg
in the data directory.
21:49:00 | INFO | resetting chat history
>> PROMPT: /data/images/path.jpg
>> PROMPT: what does the sign say?
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/local_llm/local_llm/__main__.py", line 92, in <module>
embedding, position = chat_history.embed_chat()
File "/opt/local_llm/local_llm/history.py", line 304, in embed_chat
entry[embed_key] = self.embed(entry[key], type=key, template=role_template)
File "/opt/local_llm/local_llm/history.py", line 190, in embed
return self.embedding_functions[type].func(input, template)
File "/opt/local_llm/local_llm/history.py", line 243, in embed_image
embeddings.append(self.model.embed_image(image, return_tensors='np'))
File "/opt/local_llm/local_llm/local_llm.py", line 124, in embed_image
embedding = self.vision(image, crop=crop, hidden_state=self.config.mm_vision_select_layer)
File "/opt/local_llm/local_llm/vision/clip_hf.py", line 58, in __call__
image = load_image(image)
File "/opt/local_llm/local_llm/utils/image.py", line 45, in load_image
image = PIL.Image.open(path).convert('RGB')
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 3247, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/data/images/path.jpg'
bryan@mimzy-jetson:~/git/jetson-containers$ ll data/images/
dogs.jpg fruit.jpg .gitkeep hoover.jpg lake.jpg stable-diffusion/
Ahh thanks @bryanhughes, added that image to the repo in https://github.com/dusty-nv/jetson-containers/commit/d8992335108db11b4e003db0d4cf03cf2a1cb5b6 and merged these recent changes into master. You don't need to rebuild the container to get path.jpg (just run git pull
on your jetson-containers repo), because it's under the jetson-containers/data
dir and that gets mounted into the containers (for storing your models, test images, ect)
I did a git pull origin master
and did not see the file path.jpg
. Here is the directly listing of jetson-containers/data
bryan@mimzy-jetson:~/git/jetson-containers$ ll data/images/
dogs.jpg fruit.jpg .gitkeep hoover.jpg lake.jpg stable-diffusion/
DOH. Gotta love technology. I just did another pull and got several changes.
Thanks! I will close this one now.
The container fails with the following error:
In more detail:
Looking at the
/data
directory that is mounted in the container, I do find the shared library:The python code seems to be using the wrong path to the shared library. Not exactly sure where
self.module_path
is set.