SK4P3 / blip-image-captioning-docker

BLIP Image Captioning with API
MIT License
3 stars 3 forks source link

checkpoints missing #1

Closed gleblebedev closed 1 year ago

gleblebedev commented 1 year ago

When running the powershell file docker build -t py-worker . it fails on

7 [2/7] ADD ./checkpoints /app/checkpoints

7 sha256:66385eb2b9e14ebca5144f4dc9ed2f54ac7cfa4adfaee182aaf2035af0103d3b

7 ERROR: "/checkpoints" not found: not found

the readme says:

It seems that there is step missing somewhere.

Shall I just drop model_base_caption_capfilt_large.pth in the folder?

SK4P3 commented 1 year ago

yes manually adding the .pth file in the /checkpoints folder should work. Did you run it locally first? It should download everything however it could be broken as its been a while since i made/updated it ;)

gleblebedev commented 1 year ago

It should download everything however it could be broken as its been a while since i made/updated it ;)

It doesn't download the model file, I had to copy it manually from SD. Also i've noticed that documentation says "imgurl" when it actually expects "imgurls" field. Otherwise seems to work fine...

Would be nice not to reload model on each request too:

D00>]) Loading Model... load checkpoint from ./checkpoints/model_large_caption.pth Model to cuda:0 Captioning started ['a video game scene of two knights fighting in a field

gleblebedev commented 1 year ago

In general it still saved me some time. I'm not familiar with python and this docker image helped me to make a prototype app.

Here is how I run it:

docker run -it --rm -p 5000:5000 --gpus=all py-worker

May worth to add this to readme too.

SK4P3 commented 1 year ago

nice! glad it works now.