-
Notifications
You must be signed in to change notification settings - Fork 198
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
Wand silently crashes if hugging face transformers library is imported immediately before Wand import #536
Comments
Works as expected for me on Fedora with both ImageMagick 6 & 7. However, PDF & with Image(filename='/path/to/filename.pdf') as wand_img:
wand_img.save(filename='/path/to/page-%04d.png') |
Good to know. Maybe it's OS specific. My specs: |
I think this may be caused by pytorch (a dependency of transformers) bundling its own version of libiomp5. I've been hitting segfaults if torch is imported before wand on macs recently. This started when the system libomp was been upgraded to 12.0.0 (from homebrew). Debugging the stacktrace revealed that libiomp5 bundled with torch was in the call stack. I just raised this as an issue against pytorch here: pytorch/pytorch#60094 |
Good point @alext ! Mixing OpenMP & OpenCL libraries can be deadly. As wand loads libraries through |
Rebooting this issue after a year. Can anyone with a M1 chip retest this with the latest |
There is still a segfault when using a M1 chip, even with the latest master branch:
Same code works fine without
|
Try disabling OMP with |
The following code behaves as expected:
However, if the libraries are imported in the opposite order, Wand will silently terminate on line 6:
transformers version 4.6.1
Wand version 0.6.6
The text was updated successfully, but these errors were encountered: