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).
50
u/ninjasaid13 Nov 09 '22
Is it available in Google play store?
13
u/Hisworkmanship_NW Nov 09 '22
Any thoughts on adding iPad support?
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
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!
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.
3
u/randomrealname Nov 09 '22
Is this available anywhere in the world, I just entered my phone number but haven't got a link? i am in the UK.
3
u/FrezNelson Nov 09 '22
Thank you for making this! I noticed the app can run negative prompts, which I haven’t tried before but I’ve heard can be helpful in fine-tuning generations. Just wondering what the syntax is to do this?
3
u/Moffittk Nov 10 '22
Crashes every time I try and generate with the defaults on a iPad Pro.
3
u/herrtutu Nov 10 '22
Would it be possible to import our own checkpoint files, somehow into the app ?
5
u/JiraSuxx2 Nov 09 '22
Why do you need my phonenumber?
2
u/brandonpuet Nov 10 '22
How much storage do the models take up and does it get deleted when you also delete the app?
2
u/tragic_mask Nov 10 '22
How can I use img2img? Even I load a photo from camera roll, it still does txt2img using just my prompt
2
u/developeruk Nov 10 '22
This is amazing and free!
I feel i should pay for this. I would for an iPad version with inpainting etc
2
u/Pretend-Marsupial258 Dec 02 '22
Awesome app! You did a wonderful job with it.
Quick question: Is there a way to import new models that are not already in the app? Can it use safetensors files?
127
u/naccib Nov 09 '22
So not only you’ve ported the SD model to Swift, made it distributable and did all of this on your own neural network framework?
Congratulations, this is astounding work. More info about the author’s framework: https://liuliu.me/tech/nnc-a-proof-of-concept/
37
u/0xblacknote Nov 09 '22
Oh my gosh oh my gosh oh my gosh, it's working!
13
u/redscel Nov 09 '22
Now can we add our own checkpoints please? ;)
25
u/veril Nov 09 '22 edited Nov 09 '22
This is neat. Good variety of models available, using iPhone 13 Pro on my first test, it took me ~70 seconds for SD 1.4, 30 steps, DPM++ 2M Karras @ 512x512. Confirmed full offline, works perfectly in airplane mode.
2
u/TWIISTED-STUDIOS Nov 10 '22
Can we get a -1 as a random seed rather than clicking the seed to change it
10
u/lazyzefiris Nov 09 '22
Even though I don't have an iPhone or even use for minute-long generations on the go, I must say... Wow, that's a great job you did there. And from what I see, it's not just porting existing code, but actually figuring out some mobile-specific optimizations. That's impressive.
10
u/Polyglot-Onigiri Nov 09 '22
Interesting…….checks app category weather app.
9
u/Deathmarkedadc Nov 10 '22
We're so close on being able to run SD on pregnancy test kit now than ever.
23
u/camaudio Nov 09 '22
Any chance at an Android release in the near future?
8
u/redscel Nov 09 '22
Well done, this is great. Thanks for not packing it with ads.
6
u/shinigamixbox Nov 09 '22
Cool, TY. Are you planning on a native iPad (Pro) version?
5
u/[deleted] Nov 09 '22
My question for you today, sir, is whether it is nsfw or not?
4
u/MarkusRight Nov 09 '22
iPhone only, dang
4
u/HolyZesto Nov 10 '22
I was wondering when this would happen and I wasn’t expecting it to be this week from one person lol. 10/10 work here. Would love to be able to import our own checkpoints but other than that this is as amazing as I can imagine on a phone.
7
u/anemoiasorrow Nov 10 '22
Will this be available on android anytime soon?
7
u/Remarkable-Spite-423 Nov 10 '22
Android pls
1
u/lucid8 Nov 10 '22
Mirroring some of the comments on https://news.ycombinator.com/item?id=33539192 , would be nice to have a “photo with a camera to img2img” feature!
Anyway, it’s amazing you successfully rewrote this for iOS. Wouldn’t have expected the mobile apps to arrive so soon, but here we are! What a time to be alive!
1
u/Avieshek Nov 10 '22
Is this version 4 ? Not comfortable dropping my phone number (from India btw) - an AppStore link would be much appreciated.
1
u/Count-Mortas Nov 10 '22
I'm loving it!!!! I think ill be spending most of my day hooked in this app lol.
I just have question, why is a large part of the characters head is always cut off from the screen when it's not portrait? Do you also face that issue?
1
u/CrudeDiatribe Nov 11 '22
u/liuliu sorry if you have commented on this elsewhere, but:
In light of the recent (and warranted) concern about the lack of security in .ckpt model files (as they are Python pickles), I am wondering if you converted the models your app uses via unpickling or some other process.
1
u/Heliogabulus Nov 21 '22
This is amazing!! I’ve been playing with it for a while on my iPad Pro but still don’t really know how to do things like inpainting. Tried loading different models and clicking various buttons but each time it just regenerates the image or generates a new one (depending on what I do). I know that it’s probably just me so…
Is there a manual, tutorial or help file I can access that explains what each of the buttons do and how to do things like inpainting in the app?
1
u/FunnyJoke7138659 Nov 29 '22
Quick question: how do I use the inpainting feature?
1
u/chuckythreezzzz Dec 08 '22
Is there a way to create AI images with your own face similar to lensa?
1
u/armadillobelly Dec 10 '22
Extremely impressive work. Does it use the new Core ML optimization? Also how does img2img work. The UI doesn’t have a way to use a photo after uploading.
1
u/HermanCainsGhost Jan 07 '23 edited Jan 07 '23
Absolutely fantastic work. You are now my main workflow for how to use SD.
Feature requests:
I think this is a great piece of software, and you could literally charge for it. I certainly would have bought it if it weren't free
This is absolutely phenomenal work.
If you ever need beta testers, I am open to do so - I'm a mobile dev and have been for years (mostly React Native though, but I have done a non-trivial amount of Swift work too).
By far the best app I've seen in the past year.
1
u/sahrommohd Jan 26 '23
How to use embeddings (.pt) with Draw Things?
1
u/Passionsmash Jan 27 '23
Phenomenal work!
Playing around on iPhone SE (Second Generation) iOS 16.3 image generation takes 3-5 minutes on the device and it's processor heavy so it's a battery killer. Can't run it on the MacBook Pro (Retina, 13-inch, Mid 2014), can't update to OS Monterey. Wondering how long image generation takes on the newer Macs.
Is there a significant improvement in generation time by using the M1 chip on a newer mac? How about the M2 or M2 Pro or M2 Max?
1
u/moom5656 Mar 05 '23
How to tune the "CFG" parameter in MacOS version?
1
u/Googuy_ Mar 25 '23
Nice work! But for macOS version, how to delete the downloaded models?
1
u/Kitty-cat-fox Mar 28 '23
I see this app has Lora support now, but I downloaded one onto my phone (along with a checkpoint model) from Civitai and I did what the UI told me to do but it's not showing up in the list of models. Even after turning my phone off and on again it's still won't let me select it even though it's downloaded onto my phone and in the Draw things folder.
1
u/deozyris Apr 02 '23
Hi u/liuliu I have some questions:
Thanks so much for this great app!!
3
u/BuffMcBigHuge Nov 09 '22
Incredible work, very impressive!
3
u/chrkrose Nov 10 '22 edited Nov 10 '22
You are an ANGEL, thank u so much for this.
ETA: for some reason it keeps crashing whenever I try to generate something or it seems to finish the generation but then the image doesn’t show up. Idk if it’s my phone (I have an iPhone 11) or the app. Gonna give it another try later!
3
u/BigChungulingus Nov 10 '22
This is absolutely insane work. Holy shit!
3
u/[deleted] Nov 10 '22 edited Dec 03 '24
advise sense stocking disgusted intelligent oil fuzzy lock quarrelsome steep
This post was mass deleted and anonymized with Redact
1
u/Low_Government_681 Nov 09 '22
what about iphone XR ? it is not supported at all ?
2
u/V4r0m4st3r Nov 09 '22
Will there be an app in the iPad format?
2
u/[deleted] Nov 10 '22
This is great! Thanks for making this!
2
u/[deleted] Nov 10 '22 edited Nov 10 '22
How is this possible? Like on every level? Amazing.
Seriously, how does it work offline? and who is funding this?
2
u/IrishWilly Nov 10 '22
Does your app support, or know of other apps that have a great UI but do the actual image generation remotely? Getting it to run locally is an amazing advance. Having an option in the same app to connect to a remote backend would be super useful for me. Can mess around locally, and then do run batches / more intense operations remotely, even if the remote option required payment.
2
u/Cultural_Contract512 Nov 10 '22
I’m loving using the app! It would be really valuable if it were able to run in the background. It seems right now that when I background it, the render stops or at least slows to a crawl.
2
u/andzlatin Nov 10 '22
This is impressive! Never thought this would actually be possible on a phone. Now, until an Android version comes out, I'm going to have to use Stable Horde on my phone for the time being. Good luck with the project!
2
u/multipleparadox Mar 25 '23
I found this app recently, it is awesome to be able to use SD on the go, truly amazing work.
Commenting to try to bring more visibility to this as people don’t talk enough about this IMHO!
Also, for OP u/liuliu, any chances for a faceRestore functionality eventually?
2
u/NightEnLight Apr 11 '23 edited Apr 11 '23
does it supports Prompt Editing like Automatic1111's SD Web UI? With PE you define a (part of a) prompt of the form [prompt A:prompt B:step] Mind the brackets and the colons! prompt A and prompt B are two prompts, as usual, and step is a number between 0.0 and 1.0 (1.0 is exclusive, or you use an integer, see wiki for more). In a nutshell, step is the percentage of iteration steps, prompt A is used before switching to prompt B.
2
u/lililuv Jul 03 '23
great app.. so awesome.. i don't have enough knowledge to install stable diffusion on mac browser.. your app so helpful
i wonder can it add some extension? "ROOP" for example.. (image to face swap)
2
u/CloudyStarsInTheSky Jan 03 '24
Will you ever make an android Port?
2
u/Skaratak Aug 14 '24 edited Aug 14 '24
Hey! After some initial issues it seems to work well for me and the speed is also good with the ML stuff enabled. M1Max 32GB needs just under 2min for a nicely detailed 1600x1280 (no upscaling) with 2M Karras at 20 Samples, that is solid, on A1111 WebUI it needed twice as long and the fans were louder. GPU getting used well. The GUI is also nice, but compared to A1111 more cluttered and I have some suggestions what could be improved:
Thanks for your great work!
1
u/Alternative_Cash_386 Mar 17 '24
The app crashes when generating ….
1
u/vasco747 May 08 '24
Comparing the same model in automatic1111 and Draw Things, I can’t make it look realistic in Draw Things, while in Automatic1111 it looks realistic. Am I missing something?
1
u/PurpleUpbeat2820 Jun 11 '24
I love this app. Thank you so much for writing it!
1
u/Ptizzl Nov 10 '22 edited Nov 10 '22
App looks awesome but it just generates gray images like this one for me. Tried numerous different checkpoints.
Anything I should do differently?
Edit: should mention I have iPhone 13 Pro.
Edit 2: works now. I did update my phone from an earlier 16 build to 16.1 so maybe that was the cause.
1
u/Delumine Nov 10 '22
Pure admiration reading the paper, you’re a genius!
1
u/Hero_Of_Shadows Nov 10 '22
Cool
1
u/aeschenkarnos Nov 10 '22
This is great, however it wants to download a 1.6 GB file and if for whatever reason that disconnects during the download, it wants to restart it from scratch. Would it be possible please to implement some kind of piecewise download management?
1
u/SueedBeyg Nov 10 '22
This app looks great! I'm blown away by how much work this must have taken.
Is there a repo for the iOS app itself (not the underlying reimplementation, the actual iOS app) somewhere like GitHub? I noticed a couple wonky issues with the UI on my iPhone 12 Mini (settings page is positioned too high up for some reason and some buttons overlap) and was planning to open a GitHub issue for it or something.
1
u/[deleted] Nov 10 '22
Just downloaded on my 13 ProMax. I'll post back with my first result.
1
u/Ooze3d Nov 10 '22 edited Nov 10 '22
This is truly awesome. Thank you so much!!
EDIT: It's crashing on an iPhone 12 with no other app in the background. Probably a problem on my end.
1
u/gunbladezero Nov 11 '22
Mine crashes just as it says it's finished downloading the model... (iphone 11)
1
u/Cralex-Kokiri Nov 12 '22
This is the first thing in a while that’s making me want a new phone, since my SE (2020) just isn’t powerful enough. I know someone with a SE 2022, which I’m guessing would run it fairly well.
With that in mind, the settings screen is a bit too high on my phone and (I’m guessing) on SE 2022 units as well. Screenshot
1
u/Cultural_Contract512 Nov 12 '22
Would love access to the awesome new ckpt Dungeons and Diffusion, many many folks like me are excited for the D&D-character race-specific model!
1
u/[deleted] Nov 14 '22
Curious how this will perform on my M2 iPad Pro 16gb ram
1
u/BorisThe_Animal Dec 07 '22
It has an option to load a picture from photos, but I can't seem to find any way to use these photos as a basis for a new image
1
u/nativenoble Dec 13 '22
Do you have some examples how to calculate with your images similar to Lensa?
1
u/7TonRobot Jan 06 '23
Thank you for all your hard work!!
1
u/Nugundam0079 Jan 21 '23
Here's hoping for Android. I have an ipad gen 9 this works on but it takes up a ton of space. My S8 Ultra with it's expandable storage is a much better fit for this app.
1
u/sahrommohd Jan 27 '23
Incredible!
1
u/[deleted] Feb 22 '23
is it possible to run on an intel mac?
1
u/vkbest1982 Mar 10 '23 edited Mar 10 '23
I have trained some Textual Inversion (.pt) in Automatic 1111 but I cant import to this app. I doesnt get error but the Textual inversion is not added and the cell for a second changes its background to red and shake. I need convert the .pt to something different?
1
u/ChrisFox-NJ Apr 14 '23
Works fine on my M1 Mac, my M1 iPad Pro, my iPhone 12 but also on my iPhone XS
1
u/spider853 Apr 18 '23
Great acheivement and a great article.
I like how you wrote at the start that it wasn't that hard then went straight to the deep rabbit hole )
1
u/JustMellie24 Apr 26 '23
So no Samsung port?
1
u/JanDeBoterman Apr 28 '23
Why not on Android??
1
u/indiangirlai Jun 17 '23
deforum or video generation features? :) loving the app so far 🤍
1
u/thereluctantpoet Oct 11 '23
This works incredibly on M2 macbook air! Only just starting to learn the capabilities, but colour me impressed right now. Excellent app, and thank you so much for sharing!
1
u/hudlumr Feb 03 '24 edited Feb 03 '24
Hi. How do I keep the same seed when generating different images? My batch is set at 1 and my Generate at 2 for now. It has been as high as 4 Generations. None of that matters though because the seed is only applied to the first generation. I have tried choosing the seed number from the list and I tried entering it manually with the result being that it is applied to the first generation only.
You created an awesome client. I use it all the time.
Keep up the great work.
0
u/[deleted] Nov 09 '22
[deleted] — view deleted comment