TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Stable Diffusion with Core ML on Apple Silicon

723 pointsby 2bitover 2 years ago

21 comments

sorenjanover 2 years ago
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?
评论 #33829423 未加载
评论 #33825310 未加载
评论 #33828612 未加载
评论 #33827267 未加载
评论 #33825485 未加载
评论 #33828418 未加载
评论 #33830099 未加载
评论 #33827427 未加载
toshover 2 years ago
Atila from Apple on the expected performance:<p>&gt; For distilled StableDiffusion 2 which requires 1 to 4 iterations instead of 50, the same M2 device should generate an image in &lt;&lt;1 second<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;atiorh&#x2F;status&#x2F;1598399408160342039" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;atiorh&#x2F;status&#x2F;1598399408160342039</a>
评论 #33823128 未加载
评论 #33822799 未加载
评论 #33822812 未加载
评论 #33823035 未加载
评论 #33823167 未加载
评论 #33822865 未加载
syspecover 2 years ago
There&#x27;s also <a href="https:&#x2F;&#x2F;draw.nnc.ai&#x2F;" rel="nofollow">https:&#x2F;&#x2F;draw.nnc.ai&#x2F;</a> - which is an iOS &#x2F; iPad app running Stable Diffusion.<p>The author has a detailed blogpost outlining how he modified the model to use Metal on iOS devices. <a href="https:&#x2F;&#x2F;liuliu.me&#x2F;eyes&#x2F;stretch-iphone-to-its-limit-a-2gib-model-that-can-draw-everything-in-your-pocket&#x2F;" rel="nofollow">https:&#x2F;&#x2F;liuliu.me&#x2F;eyes&#x2F;stretch-iphone-to-its-limit-a-2gib-mo...</a>
评论 #33827159 未加载
cloogshicerover 2 years ago
I think it&#x27;s sad that Apple doesn&#x27;t even give attribution to any of the authors. If you copy the Bibtex from this site, the Author field is just empty. Their names are also not mentioned anywhere on this site.<p>This site is purely a marketing effort.
评论 #33831971 未加载
评论 #33831774 未加载
评论 #33828954 未加载
neonateover 2 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;ml-stable-diffusion" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;ml-stable-diffusion</a>
评论 #33823374 未加载
wilsongoodeover 2 years ago
I’ve been using InvokeAI: <a href="https:&#x2F;&#x2F;github.com&#x2F;invoke-ai&#x2F;InvokeAI" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;invoke-ai&#x2F;InvokeAI</a><p>Great support for M1, basically since the beginning. The install is painless.<p>Release video for InvokeAI 2.2: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hIYBfDtKaus" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hIYBfDtKaus</a>
mark_l_watsonover 2 years ago
Great stuff. I like that they give directions for both Swift and Python<p>This gets you text descriptions to images.<p>I have seen models that given a picture, then generate similar pictures. I want this because while I have many pictures of my grandmothers, I only have a couple of pictures of my grandfathers and it would be nice to generate a few more.<p>Core ML is so well done. A year ago I wrote a book on Swift AI and used Core ML in several examples.
评论 #33824227 未加载
zimpenfishover 2 years ago
Man, 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.
评论 #33825746 未加载
评论 #33824257 未加载
darkteflonover 2 years ago
For the uninitiated, which MacOS GUI app is this library most likely to show up in first&#x2F;best? DiffusionBee?
评论 #33825253 未加载
tamersalamaover 2 years ago
I can&#x27;t get fine-tune the model ron Apple Silicon due to PyTorch supportability issues. I don&#x27;t have high-hopes it will be supported.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;pytorch&#x2F;pytorch&#x2F;issues&#x2F;77794" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pytorch&#x2F;pytorch&#x2F;issues&#x2F;77794</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;pytorch&#x2F;pytorch&#x2F;issues&#x2F;77764" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pytorch&#x2F;pytorch&#x2F;issues&#x2F;77764</a>
pkageover 2 years ago
How does this compare with using the Hugging Face `diffusers` package with MPS acceleration through PyTorch Nightly? I was under the impression that that used CoreML under the hood as well to convert the models so they ran on the Neural Engine.
评论 #33822986 未加载
评论 #33822951 未加载
joss82over 2 years ago
Would it be possible to run 2 SD instances in parallel on a single M1&#x2F;M2 chip?<p>One on the GPU and another on the ML core?
noduermeover 2 years ago
Can anyone explain in relatively lay terms how Apple&#x27;s neural cores differ from a GPU? If they can run stable diffusion so much faster, which normally runs on a GPU, why aren&#x27;t they used to run shaders for AAA games?
评论 #33831597 未加载
behnamohover 2 years ago
This may sound naive, but what are some use cases of running SD models locally? If the free&#x2F;cheap options exist (like running SD on powerful servers), then what&#x27;s the advantage of this new method?
评论 #33823553 未加载
评论 #33823875 未加载
评论 #33823953 未加载
评论 #33823473 未加载
评论 #33826775 未加载
评论 #33823501 未加载
评论 #33824435 未加载
评论 #33827718 未加载
评论 #33823985 未加载
dustedcodesover 2 years ago
What are some good resources to get into working with this and learning the basics around ML to get some fundamental understanding of how this works?
评论 #33829644 未加载
sirabenover 2 years ago
While running locally on an M1 Pro is nice, recently I&#x27;ve switched over to a Runpod[0] instance running Stable Diffusion instead. The main reasons being high workloads placed on the laptop degrade the battery faster and it takes ~40s to render a single image. On an A5000 it takes mere seconds to do 40 steps. The cost is around $0.2&#x2F;hr.<p>[0] <a href="https:&#x2F;&#x2F;runpod.io" rel="nofollow">https:&#x2F;&#x2F;runpod.io</a>
评论 #33832378 未加载
personjerryover 2 years ago
Can&#x27;t wait to see this integrated into automatic1111 so I can use it as a normie
calrizienover 2 years ago
Where is the community for this project?
tomr75over 2 years ago
anyone know how to link this to a GUI?
wellthisisgreatover 2 years ago
Macbook Air M1 &#x2F; 16GB RAM took 3.56 to generate an image, this is pretty wild
评论 #33828112 未加载
Viluskaranover 2 years ago
8 gb ram
评论 #33831564 未加载