Live data from Hacker News

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

liuliu.me

71–80 of 184 posts

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

#71
post #5

Could in-memory compression used to bring down the RAM requirements? There are some performance compressors like Blosch tuned for this: https://www.blosc.org/pages/blosc-in-depth/ “Faster than memcpy” is the slogan.

No. The memory usage is due to huge series of floating point numbers without much redundancy that you could squeeze out with a compressor.

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

#73

Earlier quoted context omitted.

I wonder why the file can’t be distributed inside the app on the App Store. That way downloads would be much more convenient.

Is P2P torrent type of sharing the load possible under AppStore guidelines (be they iOS or Android)? I've honestly never even thought about this being a thing, but with large shared data that doesn't change, why not?

P2P, as in hosted from other people's phones? I think the issue is that people generally wouldn't be happy with P2P data uploads from their phones (compared to P2P on desktop, where internet is cheaper/faster, and battery isn't an issue).

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

#74

Any tips on how you “ If the face is cropped, now I know how to use the inpainting model to fill it in. If the inpainting model doesn’t do its job, you can always use a paint brush to paint it over and do an image-to-image generation again focused in that area.” using the app?

I have a Twitter thread on this: https://twitter.com/liuliu/status/1587978815208407041?s=46&t...

(Note that at that time, there is an implemention bug in inpainting model that caused the weirdness that I need to manually fix)

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

#75

Earlier quoted context omitted.

I wonder why the file can’t be distributed inside the app on the App Store. That way downloads would be much more convenient.

Is P2P torrent type of sharing the load possible under AppStore guidelines (be they iOS or Android)? I've honestly never even thought about this being a thing, but with large shared data that doesn't change, why not?

They are banned on iOS but not on Android.

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

#77
post #5

Could in-memory compression used to bring down the RAM requirements? There are some performance compressors like Blosch tuned for this: https://www.blosc.org/pages/blosc-in-depth/ “Faster than memcpy” is the slogan.

zfp compression might be an interesting thing to try. In fixed rate mode, it supports random access too.

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

#79
post #7

Earlier quoted context omitted.

MacOS has transparent memory compression. Unclear to me if that's made its way to iPhone, but if it hasn't yet it will sooner or later.

My guess is that iPhone is purely “kill app” instead of “compress memory / swap” OOM model. This makes more sense for mobile.

iOS uses memory compression but not swap. iOS devices actually have special CPU instructions to speed up compression of up to page size increments specifically to aid in this model [1]

[1] https://github.com/apple-oss-distributions/xnu/blob/bb611c8f...

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

#80
Congrats on the release!

I gave this and other available applications a try and I don’t understand what people see in ai image generation.

A simple prompt generated a person with 3 nostrils, 7 squished fingers, deformities everywhere I look, it just mashes a bunch of photographs together and generates abominations.

Pay close attention to generated models and you will find details which are simply wrong.

What is the use case that I’m missing?

Post reply on HN