How come you always have to install some version of pytorch or tensor flow to run these ml models? When I'm only doing inference shouldn't there be easier ways of doing that, with automatic hardware selection etc. Why aren't models distributed in a standard format like onnx, and inference on different platforms solved once per platform?
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.
Stable Diffusion with Core ML on Apple Silicon
101–110 of 184 posts
Re: Stable Diffusion with Core ML on Apple Silicon
#102Man, this takes a ton of room to do the CoreML conversions - ran out of space doing the unet conversion even though I started with 25GB free. Going on a delete spree to get it up to 50GB free before trying again.
All hail Grand Perspective back in the day, not sure who is carrying the "what's wasting my disk space" torch for free these days. Edit: still alive! https://grandperspectiv.sourceforge.net/
GUI apps for this task like GP and the like are more visually complex than they need to be.
Re: Stable Diffusion with Core ML on Apple Silicon
#103How come you always have to install some version of pytorch or tensor flow to run these ml models? When I'm only doing inference shouldn't there be easier ways of doing that, with automatic hardware selection etc. Why aren't models distributed in a standard format like onnx, and inference on different platforms solved once per platform?
Re: Stable Diffusion with Core ML on Apple Silicon
#104How come you always have to install some version of pytorch or tensor flow to run these ml models? When I'm only doing inference shouldn't there be easier ways of doing that, with automatic hardware selection etc. Why aren't models distributed in a standard format like onnx, and inference on different platforms solved once per platform?
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.
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
#105Earlier quoted context omitted.
How do dreamstudio/craiyon/hugging face manage to do seemingly quicker on their interfaces? Are they hosting these models on super beefy and costly GPUs for free?
M1's single-threaded CPU performance and power efficiency are exceptional; however M1's GPU performance is nothing special compared to normal discrete GPUs. You don't need something super beefy to beat M1 on the GPU side. But also yes, it's gotta be expensive to host these models and I'm not sure where all these subsidies are coming from. I expect that we'll eventually see these things transition to more paid service…
https://explosion.ai/blog/metal-performance-shaders
However the SoC only uses 31W when posting that performance.
Re: Stable Diffusion with Core ML on Apple Silicon
#106Re: Stable Diffusion with Core ML on Apple Silicon
#107Earlier quoted context omitted.
A bit different take is DiffusionBee, if you're curious to try it out in a GUI form. https://diffusionbee.com
does it use the optimised model for Apple chips?
Re: Stable Diffusion with Core ML on Apple Silicon
#108This may sound naive, but what are some use cases of running SD models locally? If the free/cheap options exist (like running SD on powerful servers), then what's the advantage of this new method?
Re: Stable Diffusion with Core ML on Apple Silicon
#109Re: Stable Diffusion with Core ML on Apple Silicon
#110Earlier quoted context omitted.
I’ve used this a fair amount but am not sure it’s much better place to begin than automatic1111, especially for the HN crowd.
automatic1111 does have an M1 workaround in the wiki, but it is incorrect it's correct enough that if you know your way around a CLI, git, and package management you can figure it out