Hm, when I run the example, I get this error: > expected scalar type BFloat16 but found Float Has anyone seen this error? It's pretty hard to google for.
Update: I solved this error more properly by upgrading to the latest version. Thanks bfirsh.
Run Stable Diffusion on Your M1 Mac’s GPU
181–190 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#182Earlier quoted context omitted.
Nice. We'll get this guide updated for this fork. Everything's moving so fast it's hard to keep track! We struggled to get Conda working reliably for people, which it looks like lstein's fork recommends. I'll see if we can get it working with plain pip.
Running lstein's fork with these requirements[0] but seeing this output[1]. Same steps as original guide otherwise. Anyone got any ideas? [0] https://github.com/bfirsh/stable-diffusion/blob/392cda328a69... [1] https://gist.github.com/bfirsh/594c50fd9b2e6b173e31de753a842...
EDIT: https://github.com/lstein/stable-diffusion/issues/293#issuec... fixed it for me.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#183Re: Run Stable Diffusion on Your M1 Mac’s GPU
#184Are we being pranked? I just followed the steps but the image output from my prompt is just a single frame of Rick Astley... EDIT: It was a false-positive (honest!) on the NSFW filter. To disable it, edit txt2img.py around line 325. Comment this line out: x_checked_image, has_nsfw_concept = check_safety(x_samples_ddim) And replace it with: x_checked_image = x_samples_ddim
That means the NSFW filter kicked in IIRC from reading the code. Change your prompt, or remove the filter from the code.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#185It's insane to me how fast this is moving. I jumped through a bunch of hoops 2-3 days ago to get this running on my M1 Mac's GPU and now it's way easier. I imagine we will have a nice GUI (I'm aware of the web-ui, I haven't set it up yet) packaged in an mac .app by the end of next week. Really cool stuff.
Just yesterday I read another comment on HN saying we will have to wait another decade before being able train it in someone "basement"( https://news.ycombinator.com/item?id=32658941 ). I made a bookmark for myself ( https://datum.alwaysdata.net/?explorer_view=quest&quest_id=q... ) to look for data that help estimate when it will be feasible to run Stable Diffusion "at home". I guess it's already outdated!
If the model file just vanished from everyone's hard drive one day, and cloud providers installed heuristics to detect and ban image dataset training, retraining the model file would actually take decades for any consumer, even an enthusiast with a dozen powerful GPUs. The image dataset alone is 240TB.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#186It's insane to me how fast this is moving. I jumped through a bunch of hoops 2-3 days ago to get this running on my M1 Mac's GPU and now it's way easier. I imagine we will have a nice GUI (I'm aware of the web-ui, I haven't set it up yet) packaged in an mac .app by the end of next week. Really cool stuff.
I hope this kickstarts some kind of M1 migration. There are so many ML projects I'd like to try, but they all depend on CUDA.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#187Earlier quoted context omitted.
img2img runs in 6 seconds on my GeForce 3080 12 GB. 6+ it\s depending on how much GPU memory is available. If I have any electron apps running it slows down dramatically.
Curious about: 1. Image size 2. Steps 3. What your numbers are for text2img 4. (most importantly) are you including the 30 seconds or so it takes to load the model initially? i.e. if you were to run 10 prompts and then divide the total time by 10, what are your numbers?
I also have a 3080 and as far as I remember (not at my pc right now) it was 3-10 secs for img2img 512px cfg13 50 steps batch size 1 dimm sampler.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#188How long does it take to generate a single image? Is it in the 30 min type range or a few mins? It's hypothetically "possible" to run e.g. OPT175B on a consumer GPU via Huggingface Accelerate, but in practice it takes like 30 mins to generate a single token.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#189Running into this error `RuntimeError: expected scalar type BFloat16 but found Float` when I run `txt2img.py`
Confirming I'm stuck on the same error when running the tutorial-instructed python scripts/txt2img.py command RuntimeError: expected scalar type BFloat16 but found Float
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#190Earlier quoted context omitted.
Yep, I was just thinking the same thing. M1/M2 appears to be a huge untapped resource for ML stuff as this proves. I maxed out my MBP Max and this is probably the first time I'm actually fully using the GPU cores and it's pretty freaking cool. Creating landscapes or fictional characters (think D&D) is already super fun, I look forward to playing with img2img some more as well.
The performance gap to the top-end Nvidia cards will get much larger as they release new cards later this year, though.