Live data from Hacker News

Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device

liuliu.me

181–184 of 184 posts

Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device

#181

Earlier quoted context omitted.

> Also, ML models (probably) can't be compressed because they already are compressed; learning and compression are the same thing! I feel like they're kind of two sides of the same coin: learning is about putting more information in the same data, while compression is about putting the same information in less data. I'm wondering if some lossy floating-point compressor (such as zfp) would work.

> I'm wondering if some lossy floating-point compressor (such as zfp) would work. Well apparently this can work; StableDiffusion comes as 32-bit and 16-bit float versions. I'm kind of surprised they both work, but that's lossy compression.

Sure, but 16-bit float is pretty primitive compression, as it does not exploit any redundancy in the input. zfp groups numbers together in chunks, which means that correlated numbers can be represented more precisely. Its algorithm is described here: https://zfp.readthedocs.io/en/release1.0.0/algorithm.html#lo...

I would like to see if the zfp can be applied to something like Stable Diffusion (or other ML models) and give better results than regular floats at the same size.

Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device

#182
post #159

Update: Draw Things uses “One-time photo selection” which according to Settings > Privacy & Security > Photos “Even if your photos were recently shown to you to select from, the app did not have access to your photo library.” Still, I didn’t realize apps could save to Photos without explicitly asking permission. I don’t recall giving “Draw Things” permissions to access my photo library, yet the app is able to save to…

I use PHPickerViewController: https://developer.apple.com/documentation/photokit/phpickerv... which runs out of the process such that when you want to select a photo into the app, I have no access to any information about your other photos and the location info is erased from what PHPickerViewController passed to me. When save the photo, I only use UIImageWriteToSavedPhotosAlbum ( https://developer.apple.com/document…

Thank you for the detailed explanation. I appreciate it.

Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device

#183
post #26
post #21

This looks so cool! Unfortunately, my 16.1 11pro is crashing before an image can be generated, let me know if I can do anything to debug/test this.

Which generation of iPad is that? Honestly I haven't tested iPad yet, still in designing phase.

My bad I wasn't clear, iPhone 11 Pro on iOS 16.1

Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device

#184
post #144

Earlier quoted context omitted.

It took my battery from 80 to 77% for one generation on the default settings (384^2, 30 iterations). Less than a minute of compute time to complete a generation. Iphone battery health reports a battery at 100% health. This is an iphone SE3. Amazing how huge the difference in energy consumption is for the system in standby vs going full throttle. EDIT: I generated 3 more images; every subsequent generation reduced bat…

My iPhone 12 mini dropped from 76% to 71% and got noticeably warmer. Battery health is way worse than yours, 85%. I wonder if generating a picture uses so much juice that it even drops the percentage while charging... EDIT: Generating a picture while charging did not drop the percentage.

Late to the party but depending on your charger voltage, it may be. e.g. I can charge my mbp on a cheap usb-usb-c charger but as soon as I use it _too_ much, it will stall, or worse, lower.
Post reply on HN