Re:Stable Diffusion with Core ML on Apple Silicon
by LoganDark on Friday December 02, 2022 @12:45AM
(#33827267)
Seconded, I wish for a way to work with ML models using native code rather than through some Python scripting interface. I believe TensorFlow is there with C++, but it works only with C++ and not through FFI.
[ Parent
| on HN ]
Re:Stable Diffusion with Core ML on Apple Silicon
by danieldk on Friday December 02, 2022 @01:30AM
(#33827524)
PyTorch has libtorch as its purely native library. There are also Rust bindings for libtorch:
https://github.com/LaurentMazare/tch-rs
I used this in the past to make a transformer-based syntax annotator. Fully in Rust, no Python required:
Re:Stable Diffusion with Core ML on Apple Silicon
by ggerganov on Friday December 02, 2022 @12:48AM
(#33827290)
It's one of the reasons I recently ported the Whisper model to plain C/C++. You just clone the repo, run `make [model]` and you are ready to go. No Python, no frameworks, no packages - plain and simple.
Re:Stable Diffusion with Core ML on Apple Silicon
by 0x008 on Friday December 02, 2022 @04:18AM
(#33828428)
If you are okay with using nvidia-ecosystem, check out tensor rt.
Re:Stable Diffusion with Core ML on Apple Silicon
by c7DJTLrn on Friday December 02, 2022 @10:15AM
(#33831553)
It would increase my interest in experimenting with these models 1000% at the least. I really can't be bothered to spend hours fucking around with pip/pipenv/poetry/virtualenv/anaconda/god knows what other flavour of the month package manager is in use. I just want to clone it and run it, like a Go project. I don't want to download some files from a random website and move them into a special directory in the repo only created after running a script with special flags or some bullshit. I want to clone and run.