Problems ..
Hello, linux ubuntu here, did all the install process as explained under linux section. All good, no errors so far. Then, from the venv i launched python app.py ~/Downloads/test/test.png and got the following error:
Loading CLIP π
Loading tokenizer πͺ
Loading LLM π€
Loading image adapter πΌοΈ
Traceback (most recent call last):
File "/home/ai/Desktop/joy-caption-pre-alpha/app.py", line 179, in
main()
File "/home/ai/Desktop/joy-caption-pre-alpha/app.py", line 149, in main
models = load_models()
^^^^^^^^^^^^^
File "/home/ai/Desktop/joy-caption-pre-alpha/app.py", line 49, in load_models
image_adapter.load_state_dict(torch.load(CHECKPOINT_PATH / "image_adapter.pt", map_location="cpu", weights_only=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ai/Desktop/joy-caption-pre-alpha/venv/lib/python3.12/site-packages/torch/serialization.py", line 1113, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. Re-running torch.load
with weights_only
set to False
will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
Please file an issue with the following so that we can make weights_only=True
compatible with your use case: WeightsUnpickler error: Unsupported operand 118
Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.
Also checked my ptorch version:
(venv) ai@ai-Z490-AORUS-ELITE-AC:~/Desktop/joy-caption-pre-alpha$ python -c "import torch; print(torch.version)"
2.4.1+cu121
What can be done here? Thank you!
Thank you for your fast reply. This has fixed the issue, the LFS absence .. maybe include that under requirements, so ppl know that with it it will work and without - a little workaround. Thank you for your hard work - this is fantastic piece of software :)