congratulations to liuliu on the launch!
Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
31–40 of 184 posts
Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#32Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#33Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#34Could 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.
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.
The problem is that GPUs don't support virtual memory paging, so they can't read files nor decompress nor swap anything unless you write it yourself, which is a lot slower.
Also, ML models (probably) can't be compressed because they already are compressed; learning and compression are the same thing!
Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#35Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#36Earlier 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.
Memory compression? I can't find any good resources to read about it, any hints? I'm having trouble imaging how could it possibly work without totally destroying performance.
There have been a large amount of innovation on fast compression and fast decompression in recent years. Traditional compression tools like gzip or xz are geared towards higher compression ratio, but memory compression tends to favor speed. Check out those algorithms:
* lz4: https://lz4.github.io/lz4/
* Google's snappy: https://github.com/google/snappy
* Facebook's zstd in fast mode: http://facebook.github.io/zstd/#benchmarks
Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#37Hmmm, my ipad keeps crashing and redownloading the sd_v1.4_f16.ckpt file.
Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#38Re: Stretch iPhone to its limit: 2GiB Stable Diffusion model runs locally on device
#39Hmmm, my ipad keeps crashing and redownloading the sd_v1.4_f16.ckpt file.