Skip to content
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

Any known issue with 2025-01-09 on CPU using transformers getting stuck during image encoding? #235

Open
geoffroy-noel-ddh opened this issue Jan 28, 2025 · 5 comments

Comments

@geoffroy-noel-ddh
Copy link

geoffroy-noel-ddh commented Jan 28, 2025

The example transformer code on the README.md stalls on two different machines. I'm using the example code as is, the only change is the path to the image (1092x1040, png).

I stopped the execution after 8 minutes. The trace shows that the execution was in encode_image() > _run_vision_encoder() > vision_encoder() > mlp() > linear().

Is anyone able to confirm whether that code works on CPU or if this is a known issues.

Previous version of the model (2024-08-26), using associated transformer code works well on the same input image, using the exact same python environment, on the same machine. It completes in 23s.

System

  • Ubuntu 24.10
  • i7-1260P
  • 32G RAM
  • python 3.12.7
pip install transformers torch einops pillow pyvips pyvips-binary torchvision
certifi==2024.12.14
cffi==1.17.1
charset-normalizer==3.4.1
einops==0.8.0
filelock==3.17.0
fsspec==2024.12.0
huggingface-hub==0.28.0
idna==3.10
Jinja2==3.1.5
MarkupSafe==3.0.2
mpmath==1.3.0
networkx==3.4.2
numpy==2.2.2
nvidia-cublas-cu12==12.4.5.8
nvidia-cuda-cupti-cu12==12.4.127
nvidia-cuda-nvrtc-cu12==12.4.127
nvidia-cuda-runtime-cu12==12.4.127
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.2.1.3
nvidia-curand-cu12==10.3.5.147
nvidia-cusolver-cu12==11.6.1.9
nvidia-cusparse-cu12==12.3.1.170
nvidia-nccl-cu12==2.21.5
nvidia-nvjitlink-cu12==12.4.127
nvidia-nvtx-cu12==12.4.127
packaging==24.2
pillow==11.1.0
pycparser==2.22
pyvips==2.2.3
pyvips-binary==8.16.0
PyYAML==6.0.2
regex==2024.11.6
requests==2.32.3
safetensors==0.5.2
setuptools==75.8.0
sympy==1.13.1
tokenizers==0.21.0
torch==2.5.1
torchvision==0.20.1
tqdm==4.67.1
transformers==4.48.1
triton==3.1.0
typing_extensions==4.12.2
urllib3==2.3.0
@geoffroy-noel-ddh geoffroy-noel-ddh changed the title Known issue about 2025-01-09 on CPU using transformers getting stuck? Any known issue with 2025-01-09 on CPU using transformers getting stuck during image encoding? Jan 28, 2025
@autmoate
Copy link

I confirm that I encountered similar issues with rev. 2025-01-09 on different machines

  • Win10 with py3.11.5 besides pip also tried with conda
  • tried the same on Win11 with py3.12.7 (pip and conda)
  • tried WSL and Ubuntu
  • rev. 2024-08-26 works well

This is also discussed here:
https://huggingface.co/vikhyatk/moondream2/discussions/53
and here:
https://huggingface.co/vikhyatk/moondream2/discussions/59

@parsakhaz
Copy link
Contributor

@autmoate @geoffroy-noel-ddh Sorry to hear that you're running into issues. Windows requires some additional steps w/ the latest revision - do you have FFMPEG and Pyvips installed to your machine? Detailed steps on getting the latest revision running are available here.

@autmoate
Copy link

Thanks a Lot for your reply and yes I was aware of the pyvips and pyvips-binary install. But I‘ll follow again the instructions you provided and I‘ll have a look at ffmpeg. Will give it another try next week hopefully.
Thanks for your hints and help. 🤞

@geoffroy-noel-ddh
Copy link
Author

@autmoate @geoffroy-noel-ddh Sorry to hear that you're running into issues. Windows requires some additional steps w/ the latest revision - do you have FFMPEG and Pyvips installed to your machine? Detailed steps on getting the latest revision running are available here.

Hi, you can find all the answers in my description at the top. I'm using Ubuntu, pyvips and pyvips-binary.

ffmpeg is also installed on the machine. Although I did not see in the documentation you've linked or the readme any mention of ffmpeg. So it's not clear whether that's a moondream requirement.

@geoffroy-noel-ddh
Copy link
Author

geoffroy-noel-ddh commented Feb 1, 2025

@parsakhaz Does the example code at the bottom of the README work for you? Have you tried to reproduce it? If it works, can you tell what step exactly is missing from my description above as I believe it follows the installation instructions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants