top | item 38967684

Show HN: Run Stable Diffusion Directly on iPhone

162 points| mofle | 2 years ago |apps.apple.com

42 comments

order

outcoldman|2 years ago

Apple released CoreML Stable Diffusion library a little over a year ago [1]. Hugging Face released their version of the example app for the CoreML Stable Diffusion library [2].

The app should be able to run on iPhone 14 Pro, I believe the requirements is about 6-8Gb of RAM. And I was not able to run it on iPhone 13 Mini, because it has only 4Gb of RAM.

- [1] https://github.com/apple/ml-stable-diffusion

- [2] https://github.com/huggingface/swift-coreml-diffusers

tamimio|2 years ago

> The app should be able to run on iPhone 14 Pro

Can’t install it, says device is not supported.

abtinf|2 years ago

How does this compare to Draw Things?

randomifcpfan|2 years ago

Comparing the App Store listings, it looks like this app has a much simpler interface and far fewer features than Draw Things. Some users might prefer the simplicity of this app.

(Draw Things is by far the most advanced app that supports on-device Stable Diffusion on iOS devices and Apple Silicon Macs. It had a non-standard UI, but otherwise is really good.)

https://apps.apple.com/us/app/draw-things-ai-generation/id64...

itsTyrion|2 years ago

To drawing things (yourself) it compares by not stealing. Yes, I know that’s not what you meant but with that name, I couldn’t not write it

Alifatisk|2 years ago

It’s limited to iPhone 15

thebasic|2 years ago

Testing on my iPhone 15 pro - I couldn't find it in the app store with a search but I looked up the developer and was able to download it there. Working so far, first image took a while (a few minutes, as the app warned me), but subsequent images were a bit faster (~1.5 minutes). Phone does get pretty warm though.

liuliu|2 years ago

iPhone 15 Pro with 30 steps at 512x512 resolution (SD v1.5) should take around 35 seconds on iPhone 15 Pro with Draw Things. 1.5 mins are too slow. (I am the author of DT).

lxe|2 years ago

Great work, Sindre! Didn't realize you were in the AI and app space. You've got quite a prolific OSS portfolio spanning decades at this point.

AISnakeOil|2 years ago

Runs pretty slow and hot on my 15 Pro. Seems like a pretty old model as well.

pvarangot|2 years ago

That's your 15 Pro at 100% compute, anything that makes it go to 100% compute for the same amount of time will make it as hot.

hoothin|2 years ago

The storage capacity of Stable Diffusion on my computer has exceeded 100 GB, so I don't consider it a productive option.

eurekin|2 years ago

It really would not work with 14 plus?

yreg|2 years ago

Nice, good job

kobykarp|2 years ago

Stable Diffusion runs on iPhone without any issues on DiffusionHub.io

lxgr|2 years ago

Not locally, though.

makerofthings|2 years ago

I tried using it to generate some sprites for a game I've been thinking about. Kept telling me it couldn't show me the image because it wasn't safe (I asked for robot pirates). Couldn't see a way to turn off the nsfw protection. Uninstalled it :(

WaxProlix|2 years ago

Slightly OT but is there a decent setup for sprite generation out there? Non phone, I mean. It certainly seems like there's been some work in maintaining consistent style and even subjects across runs, does that work with 'character A walking frame 1, character A walking frame 2' etc anywhere yet?

godelski|2 years ago

This is a surprising thing when first working with these models (especially ones implementing NSFW filters, which are noisy). If you go check civitai.com you'll see that there's a lot of... well... porn. There's many LORAs to download but a very useful one ends up being the clothing slider. While I think the intention is to remove clothing, it is helpful in adding clothing. Unfortunately this doesn't look to support LORAs which are essential to getting many of those high quality images you see floating around.

My guess here is that the model is just trained on too many sexy pirates (it also has a propensity for producing asian women, which this model seems to do too). It does look like they support negative prompts but it requires you using "##" to separate positive and negative. Interesting design choice. You'll find these negative prompts helpful: disfigured, low quality, child, sexy, nude, extra limbs, ugly hands; and anything in the same vein. What works best is dependent on the base model and there is variance between different positive prompts. You may also have more success with something like automatic1111 which as long as you feel comfortable doing a git clone (which you're on HN, so I assume you are) then it'll be a better interface, but I don't know if there's a apple arm model or if baremetal has improved since last I checked.

productlordtr|2 years ago

[deleted]

doctorhandshake|2 years ago

What’s surprising about that? Seems about right for a distilled model.

Turing_Machine|2 years ago

1) Just how much space do you think a decent LLM takes up? "lol" indeed.

2) This is 2024. Phones aren't limited to 128K any more. The iPhone 15 Pro and Pro Max can be configured with up to 1 TB of storage.

(no personal connection to this app... I just get tired of people on here gratuitously crapping on interesting stuff that other people have made)

rafram|2 years ago

[deleted]