User Name
Password
AppleNova Forums » Programmer's Nook »

Stable Diffusion


Register Members List Calendar Search FAQ Posting Guidelines
Stable Diffusion
Page 1 of 2 [1] 2  Next Thread Tools
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-06, 22:29

Does anybody know if Stable Diffusion can be run on a Mac?

https://arstechnica.com/information-...-online-again/

...

Steve Jobs ate my cat's watermelon.
Captain Drew on Twitter
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-07, 02:20

Possibly it technically maybe could, but certainly not very well at all.

Virtually all of the popular machine learning libraries require a modern NVIDIA GPU to do the heavy computational lifting, and since Apple and NVIDIA's relationship soured long ago, there have been no working macOS drivers for NVIDIA cards since macOS High Sierra 10.13.6 (~4 years ago). Some ML libraries have operations that can run on the CPU, but even among those available, even the fastest CPUs usually pale in comparison to even low-tier modern GPUs.

I also read that article earlier, and I'm thinking about installing all the dependencies into the Linux drive of my current Hackintosh to give it a try. I have an NVIDIA 3060 Ti in there which falls into that "low-tier modern" category that I warm up from time to time for 3D renderings. It won't be fast, but it'll probably get the job done.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-07, 13:16

Thanks Brad, I was suspicious about the hardware requirements to make this work. Doesn't it look like a LOT of fun??!!


...
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2022-09-07, 19:00

Tangentially related: Has anyone played around with DALL-E 2 or any of the other OpenAI tools?

Friend was using Codex and it produced working C and C++ code based on input queries (and the programs actually did the things requested).
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-07, 19:25

I have a friend who is a MAESTRO at making pop culture monstrosities on CRAIYON - things that make you go "wow that is so wrong, and so funny". I try to do the same and fail. He's got the knack.

Wonder if I could get him to start an Instagram account with them?


...

Steve Jobs ate my cat's watermelon.
Captain Drew on Twitter
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-07, 21:04

Oh yeah. I have a whole folder with a million stupid things I've made from DALL-E mini and CRAIYON.

Some of the ones that came out mostly okay as expected…

barack obama in star trek uniform
barack obama in starfleet uniform
BTS as star wars jedi
captain picard as a bored ape nft
captain picard as a medieval woodcut
captain picard in the style of a picasso painting
darth vader as a medieval angel painting
darth vader clown
darth vader fighting pikachu
darth vader in a medieval woodcut
darth vader in star trek uniform
Spock as a bored ape NFT
spock eating a hot dog
super mario as a bored ape NFT
the rock in star trek

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-07, 21:48

I've also spent time playing with text synthesis tools to generate stories, usually based on some work-related subject, that I've shared with colleagues. You give these tools a couple sentences, and they try to generate more text based on that. Some of them are eerily good.

One of my recent attempts was almost too perfect. The bold part was the only input I gave it. The rest it generated on its own.

Quote:
write me a 4chan greentext

> be me
> writing backend APIs for Red Hat OpenShift cloud services

> it gets pretty fucking hard to keep track of them sometimes.
> i have no fucking idea what the fuck these are.
> i literally just checked my codebase. i have more git repos than i have lines of code.
> if you think i'm being dramatic,
> i am not
> my git repo has more branches than i do commits.
> and more branches than commits than my own code commits.
> and there's one more branch than my commits.
> there's a good chance i don't know what the hell it does
> but i don't fucking care.
> i'm just glad there's no PR's for it yet.
> and for the people who are going to shit on me,
> let me just tell you something about how much time i spend on writing code
> that no one will ever fucking use.
> first of all, what i really fucking care about is building things that people will actually use.
> we work in a really competitive business. we spend a lot of money and invest a lot of our time
> building out our open source cloud infrastructure
> because that's the way to differentiate our product and build an ecosystem of customers.
> we have very little time to do that.
> we have very little time to build new features, bugfixes and support and maintain existing functionality.
> so that when some shit happens,
> like an Amazon cloud outage or a Windows S2S connection goes down
> we can roll our system back immediately and continue working.
> that's why we have like a dozen fucking git repos
> and most of them don't even have any code in them.
> we build this cloud infrastructure to get shit done
> and it's not a fucking hobby.
> i would much rather have a bunch of code
> that no one is using but works really well
I actually have ranted among peers about the assortment of services and git repos and branches I have to deal with on a regular basis.

Other results haven't been quite as close to home, but they still tend to be believable as stories, like...

Quote:
write me a 4chan greentext

> be me
> trying to diagnose an openshift performance issue

> get called out on 4chan
> get an email from a friend asking "what the fuck did you do?"
> explain it to my manager, who was sympathetic
> get a call from the CTO
> apologize
> get called into a meeting with the CTO, VP of engineering, VP of operations, and our COO.
> explain everything, from the "weird problem" and my research
> get called a faggot
> feel like an ass
> have my boss come into my cube and explain the seriousness of the situation to me
> get laid off
or…

Quote:
write me a 4chan greentext

> be me
> writing open source enterprise cloud monitoring software from home
, on my laptop, from bed
> and get paid hourly for it
> but because that's what I'm best at
> that's how I get my kicks
> and in my spare time I have to write
> articles on
> social justice
> in order to pay for my bills
> even though I don't even believe in this shit
> and my dad is a cop
> so I am literally a product of my environment
> the best I can do is talk about shit online
> and if I can do that while paying off my student loans, great
> but in order to do that
> I need to write more shit
> on my blog
> and get paid for it
> but I don't want to
> because I'm not into this shit
> and I hate the topic
> but it pays the bills
> so I have to
> because I'm not
> a successful white liberal

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-10, 20:37

womp, womp

Quote:
RuntimeError: CUDA out of memory. Tried to allocate 1.50 GiB (GPU 0; 7.79 GiB total capacity; 5.62 GiB already allocated; 678.25 MiB free; 5.74 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Setting everything up was pretty easy for me since it's all Python and git repos, and I work in Python and git repos daily. Unfortunately, it looks like my low-tier GPU might not have enough memory. I'll try to fiddle around with options to make it happy...

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-10, 21:24

Success!

Apparently it thinks "applenova: the house that jack built" deserves to be album art for some kind of European death metal band.



It's about the same speed as the free online services, but at least I can safely feed it anything I feel like from the privacy of my local computer.

such as...




The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-10, 21:45



OMG - let the requests begin O.o


...
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-10, 21:49

How fast is it?

Goldblum boy band
iphone sandwich
kitten backpack
batman lingerie

...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-10, 22:37

Why not! I'm shoving these into imgur galleries.

I'm generating these in batches of 10 at a resolution of 512x512. Each batch takes almost 2 minutes to complete. So, 11-12 seconds each? Not great, not terrible.

drew is a cardboard pirate who makes amazing props (1m53.159s)
Goldblum boy band (1m53.558s)
iphone sandwich (1m54.105s) not as interesting results on this one... can't win 'em all!
kitten backpack (1m53.723s)
batman lingerie (1m53.743s) LOL maybe NSFW

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-10, 22:43

It can also take an existing image plus a text prompt together as input, and it will try to generate output making the prompt sort of fit the image as a template.

I drew the mascot for my project at work (it's a tardigrade sitting on a cloud... a "cloudigrade"), and I used that with a short prompt that just describes itself to generate some impressive, surreal, and sometimes cute variations. Those 20 were hand-picked from a much larger pool of images because most of the ones this tool spat our were just nightmare fuel.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-10, 23:19

Wow, some of these are really cute.

Okay I found my friend Rick's cues from Craiyon. Here are a few:

Alf shaped bong

Courtroom sketch of Elmo testifying against Osama Bin Laden
(amazing)

Duran Duran eating durian
(great)

Ukiyo-e painting of Alfred E. Neuman
(really good)

Hand jobs of the future

LoFi Golden Corral to relax to
(lofi is a good general prefix)

Ronald McDonald giving birth in a bathtub with a midwife

Bill Cosby caught on trail cam
(lol)





...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-11, 00:22

Those are some clever prompts! Let's see how my version stacks up...

Alf shaped bong only one of these looks like my boy Gordon Shumway
Courtroom sketch of Elmo testifying against Osama Bin Laden a few good ones here
Duran Duran eating durian
Ukiyo-e painting of Alfred E. Neuman not the same MAD lad I grew up with, but still interesting!
Hand jobs of the future surprisingly safe for work
LoFi Golden Corral to relax to I definitely could have had dinner as a kid in one of these in an alternate universe
Ronald McDonald giving birth in a bathtub with a midwife I guess these are NSFW
Bill Cosby caught on trail cam

Not a ton of great results across the board, but I certainly see the potential for greatness.

The model I downloaded and used is Hugging Face's Stable Diffusion v1.4 which is 4GB. That feels pretty tiny considering all it contains. This model is trained on the LAION-5B data set which contains 5.85 billion image-text pairs. That's a lot of input! It takes folks like Hugging Face a very long time and an absurd amount of computation to train a good model on this much data, but the longer they let it train, the better the results you tend to get out. Supposedly newer versions soon trained for even longer will be released in the not-too-distant future. I'll try to keep an eye out for that news and update my system when it arrives.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-11, 04:30

Let me poach my friend's results and post them to Imgur so you can compare. Craiyon is doing some pretty remarkable stuff now. I think some of your trail cam pics were really good. The Ronald McDonald pics were nightmares come to life. His Elmos were better, all of his, actually, but theirs is public and is getting a ton of training, but I'm not sure if there's curation? Is there a way to tell the black box that it's on the right track?


...
  quote
709
¡Damned!
 
Join Date: May 2004
Location: Purgatory.
 
2022-09-12, 09:26

Well I didn't expect to be crying with laughter so early this morning. Absolutely hilarious.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-12, 13:23

OMG

I just read about the seeds that people are using and they're far more verbose than I realized they can be.

Can you try this one?

slender woman brunette white gown robot android sketch watercolour clouds platform intricate illustration Moebius gireaud futuristic starfield


...
  quote
709
¡Damned!
 
Join Date: May 2004
Location: Purgatory.
 
2022-09-12, 14:12

Just saw this link posted by Gruber. Requires a M1/M2 though.

Quote:
Diffusion Bee is the easiest way to run Stable Diffusion locally on your M1 Mac. Comes with a one-click installer. No dependencies or technical knowledge needed.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-12, 15:32

Is It Safe??


...
  quote
709
¡Damned!
 
Join Date: May 2004
Location: Purgatory.
 
2022-09-12, 15:50

¯\_(ツ)_/¯
  quote
709
¡Damned!
 
Join Date: May 2004
Location: Purgatory.
 
2022-09-12, 19:21

Here ya go Drew.

Tried a half-dozen horizontal and a half-dozen vertical. VERY addicting.
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-12, 20:21

Holy SHIT. Thank you! This is pretty incredible. I wonder if that seed would deliver the same results from machine to machine. I don't think it would. Really tempted to try and install this. Wow.

...


... <--- computer generated
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2022-09-12, 21:47

Quote:
Originally Posted by drewprops View Post
Holy SHIT. Thank you! This is pretty incredible. I wonder if that seed would deliver the same results from machine to machine. I don't think it would. Really tempted to try and install this. Wow.

...


... <--- computer generated
would depend on how the algorithms implement random seeding from machine to machine (etc) for deterministic output. But would think they are predictable from computer to computer? It’s not all that different from production (business) applications and also is important for reproducibility.

Seen a man standin' over a dead dog lyin' by the highway in a ditch
He's lookin' down kinda puzzled pokin' that dog with a stick
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-12, 22:33

Quote:
Originally Posted by tomoe View Post
would depend on how the algorithms implement random seeding from machine to machine (etc) for deterministic output. But would think they are predictable from computer to computer? It’s not all that different from production (business) applications and also is important for reproducibility.
Yes, the output is deterministic. Any computer using the exact same model, software, seed, and other arguments should produce the exact same results.

(Assuming all flavors of this software allow you to provide the random seed value; the version I was playing with over the weekend definitely did.)

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
kscherer
The Ban Hammer
 
Join Date: Aug 2004
Location: Boyzeee
 
2022-09-13, 10:43

From the images I've seen you guys posting, I'm thinking we'll soon be able to fire most of the world's artists and send them packing! I mean, who needs them, right?

Is there anything computers won't be able to do?

- AppleNova is the best Mac-users forum on the internet. We are smart, educated, capable, and helpful. We are also loaded with smart-alecks! :)
- Blessed are the peacemakers, for they shall be called sons of God. (Mat 5:9)
  quote
drewprops
Space Pirate
 
Join Date: May 2004
Location: Atlanta
 
2022-09-13, 12:23

How do you know that I'm not actually a computer already?

...
  quote
kscherer
The Ban Hammer
 
Join Date: Aug 2004
Location: Boyzeee
 
2022-09-13, 12:27

Quote:
Originally Posted by drewprops View Post
How do you know that I'm not actually a computer already?

...

Quote:
Originally Posted by drewprops View Post
... <--- computer generated

I don't.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-13, 12:51

Quote:
Originally Posted by drewprops View Post
How do you know that I'm not actually a computer already?

...
There's been a running gag on Reddit for as many years as I can remember that you are the only human posting. Everyone else and I are bots. Sometimes it feels true. Sometimes it actually is true. There are tons of bots on Reddit (and Twitter and probably all other major social networks).

Quote:
Originally Posted by kscherer View Post
From the images I've seen you guys posting, I'm thinking we'll soon be able to fire most of the world's artists and send them packing! I mean, who needs them, right?

Is there anything computers won't be able to do?
This is actually a legitimate concern, and some art-sharing sites are already discussing and debating how to identify, discourage, block, or ban users who submit AI/ML-generated art as their own. This has been a hotly growing topic over the last few months since DALL-E mini took the world by storm.

Ultimately, though, the output is only as good as the input. Stable Diffusion is so good because the models have been trained on billions of labeled images that someone else already made. Photographs. Paintings. Drawings. Scans. Screenshots. Computer graphics. You name it. Remove the artist from the equation, and the whole thing stagnates and stops. These systems are very interesting and really good at synthesizing new-ish things based on old things, but they cannot generate anything truly original in a meaningful way. New vocabulary, new images, and new concepts are still the domain of the human mind. Although a tool like this could spit out something completely random abstract, it's going to be based on preexisting art. It still needs us to interpret, judge and accept or reject as good or bad, and apply meaning to it, and that work would have to be fed back into the models on a massive scale, rinse, and repeat.

So, in the general sense, artists and hobbyists and genuinely creative types aren't going to be out of job for a long time, but there are certainly lots of niches where you do just want something vaguely derivative of something else, and this synthetic art is plenty good enough.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2022-09-13, 13:00

By the way, you know how captchas have been asking you to identify cars and crosswalks and traffic signals and trees over the past many years? Every time you answer one, you are providing labels to those images so that Google (and friends) can feed them into their own machine-learning models. They are building a massive library of billions of driving-related images to help power the software of self-driving cars. Google isn't relying solely on that torrent of data to drive a car, but they are using it to double-check their own custom AI software's behaviors.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Page 1 of 2 [1] 2  Next

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
How stable are Hackintoshes? Luca Purchasing Advice 40 2009-07-25 16:13
Hackintosh users: How stable is your system? turtle Third-Party Products 11 2008-06-28 07:16
Don't tell me Leopard is stable! ezkcdude Apple Products 30 2008-02-20 17:37
Dynamic Assignation vs. Stable URL drewprops Programmer's Nook 9 2005-12-11 18:25


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 17:23.


Powered by vBulletin®
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2022, AppleNova