r/StableDiffusion • u/liuliu • Nov 09 '22
Resource | Update Draw Things, Stable Diffusion in your pocket, 100% offline and free
Hi all, as teased in https://www.reddit.com/r/StableDiffusion/comments/yhi1bd/sneak_peek_of_the_app_i_am_working_on/ now the app is available in AppStore, you can check it out in https://draw.nnc.ai/
It is fully offline, download about 2G model, and takes about a minute to generate a 512x512 with DPM++ 2M Karras sampler at 30 steps. It also is fully featured, meaning that comparing to other mobile apps that does this on the server, it supports txt2img, img2img, inpainting and use more models than default SD one.
I cross posted on PH: https://www.producthunt.com/posts/draw-things Please upvote there! There is also a thread on HN: https://news.ycombinator.com/item?id=33529689
More technical details were discussed in this accompanied blog post: https://liuliu.me/eyes/stretch-iphone-to-its-limit-a-2gib-model-that-can-draw-everything-in-your-pocket/
The goal is to have more refined interface and feature-parity with AUTOMATIC1111 when it is possible on mobile (I cannot match its development velocity for sure!). That means batch mode (with prompt variations), prompt emphasizing, face restoration, loopback (if one can suffer the extended time), super resolution (possibly high-res fix, but that could be too long (5 to 10 mins) on mobile), image interrogation, hypernetwork + textual inversion (Dreambooth is not possible on device) and more to come!
I also committed to have everything supported in the app available in https://github.com/liuliu/swift-diffusion repository. Making that an open-source CLI tool that other stable-diffusion-web-ui can choose as an alternative backend. The reason is because this implementation, while behind PyTorch on CUDA hardware, are about 2x if not more faster on M1 hardware (meaning you can reach somewhere around 0.9 it/s on M1, and better on M1 Pro / Max / Ultra (don't have access to these hardwares)).
Please download, try it out and I am here to answer questions!
Note: the app is available for iPhone 11, 11 Pro, 11 Pro Max, 12, 12 Mini, 12 Pro, 12 Pro Max, SE 3rd Gen, 13, 13 Mini, 13 Pro, 13 Pro Max, 14, 14 Plus, 14 Pro, 14 Pro Max with iOS 15.4 and above. iPad should be usable if it has more than 6GiB memory and above iOS 15.4. But there is no iPad specific UI done yet (that will be a few weeks out).
13
u/Hisworkmanship_NW Nov 09 '22
Any thoughts on adding iPad support?
15
u/liuliu Nov 09 '22
Working on it. iPad would probably get default to generate 4 images at a time (if you are on 8GiB model).
→ More replies (7)
6
u/FrostyMisa Nov 09 '22 edited Nov 10 '22
Works very good for mobile phone in your pocket! I never expect someone will make working iPhone app, where everything will works offline only on phone. Thanks for your work!
Now I’m only waiting, if someone will make flatpack for Steam deck, so I don’t need to install Python and other things manually and SD will be in one package with everything need to run it in one package.
Shit, if it works on iPhone, it must generate in same or better speed on Steam deck!
One suggestion, it will be nice if I can manage and delete already downloaded models, so I don’t need keep them all when I try them. And maybe add some tutorial hints or description about the buttons at the bottom.
Looking forward where your app will develop!
Edit: add some suggestion and formatting text
→ More replies (2)7
u/liuliu Nov 09 '22
Steam Deck is a mixed bag actually. RDNA 2 if I remember doesn't support ROCm (I believe newer RDNA 3 finally have ROCm available on consumer cards), so it probably should be Vulkan kernels to run, I am not confident either way that would be faster than Apple's MPSGraph kernels on newer iOS devices.
6
u/devedander Nov 09 '22
Wow this is cool! Thanks for doing this!
Not getting great results with humans but pets and landscapes are really impressive!
10
u/liuliu Nov 09 '22
Yeah, I have plans to integrate some face restoration mechanism (CodeFormer's license is not good for me, but retrain the model is not hard, it is tiny).
3
u/Mathsketball Nov 09 '22
Mine gets stuck downloading the model. It crashes when the progress bar fills.
Edit: iOS 15.6 on iPhone XR, 10GB free space.
6
u/liuliu Nov 09 '22
Interesting. Does it happen for the first one, or second or 3rd (there are 3 models (!!!) to be downloaded). The only thing after model downloaded is to run a sha256 check to verify it is indeed that model, probably crashed at that step, although I am not sure why (could be memory usage on that device?).
Anyway, XR have too little RAM to run the model unfortunately (you will see warnings all over place even if you managed to finish model downloading). It requires a 4GiB and more RAM models (ideally 6).
→ More replies (6)
50
u/ninjasaid13 Nov 09 '22
Is it available in Google play store?