Live data from Hacker News

Running Stable Diffusion XL 1.0 in 298MB of RAM

github.com

151–160 of 166 posts

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#151
post #85

Earlier quoted context omitted.

Just like how making weed illegal is virtually impossible because anybody can grow marijuana in their backyard. How many regular people would risk owning turning-complete devices that can run unauthorized software if it would net you jail time if caught? Lots of countries are already itching towards banning VPN, corpo needs be damned. Especially now that the iPhone has shown having a device that can only run approved…

I'm more referring to the fact that stuff like PowerPoint and Minecraft and who knows what are Turing-complete, albeit with awful performance. Theoretically, you can have a totally owned device managed by Big Brother, yet generate AI smut with a general purpose CPU built in PowerPoint. How do you possibly regulate that?

> How do you possibly regulate that?

The government could send an order to the software developer to patch out that turning completeness, and ban the software if it's not complied.

I get what you mean, it's never possible to 100% limit things. But if you limit things 98% so that the general public does not have access that's more than enough for authoritarian purposes.

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#152
post #98

Earlier quoted context omitted.

I love making fun of people that don’t understand percentages… wait, wat?

117. 472% of grade school students are unable to readily convert between fractions and percentages. 38.157% of informally provided statistics are made up on the spot under the assumption nobody will actually check.

9% of people consists entirely of shoulders, elbows and knees

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#153

Earlier quoted context omitted.

"0.5-2x slower" must be a typo on their part right? If something is 0.5x slower, then it is 2x faster. I assume they meant to say "1.5-2x slower".

hi, I'm the author. I have never questioned the clarity of that sentence, at least until today :-) By "0.5x" I mean "0.5 times or 0.5 multiplied by the reference time" where "reference time" is the inference time of OnnxRuntime. So I'm actually meaning "50%". I think the expression "0.5x slower", taken by itself, could be misleading, but in the context of the original sentence it becomes clearer ("while being only 0.…

https://en.wikipedia.org/wiki/Wikipedia:Two_times_does_not_m...

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#154

This would be really cool to have running embedded in a digital photo frame or wall painting.

I've built this a while back, using a previous version that runs Stable Diffusion on a raspberry pi zero 2 w:

https://hackaday.com/2023/09/19/e-paper-news-feed-illustrate...

https://github.com/rvdveen/epaper-slow-generative-art/

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#155
post #15

Earlier quoted context omitted.

"0.5-2x slower" must be a typo on their part right? If something is 0.5x slower, then it is 2x faster. I assume they meant to say "1.5-2x slower".

Maybe they meant 50%-200% slower, in which case the x-factor range would really be 1.5x to 3x?

I think it still wrong, although one may understand what the other person means.

When we say "faster" or "slower" what we usually mean is that we add/remove the percentage to the original amount, which is often cause of misunderstanding.

"Y is 10% faster than X" means that Y goes at 110% the speed of X

"Y is 10% slower than X" means that Y goes at 90% the speed of X

In particular, "Y is N% slower than X" doesn't mean that "X is %N faster than Y" ! (110% of 90% is not 100%)

For example "Y is 100% slower than X" doesn't mean that "X is double as fast as Y", but that Y is not moving at all.

and "Y is 200% slower than X" means... that Y goes in the other direction ? (Maybe back in time, in this case ?)

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#156
post #52

Earlier quoted context omitted.

"0.5-2x slower" must be a typo on their part right? If something is 0.5x slower, then it is 2x faster. I assume they meant to say "1.5-2x slower".

It depends. What do you think if I say it's 1x slower? Is it as fast as the original or does it take twice as long?

Off by one is baked into the language design.

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#157

Earlier quoted context omitted.

hi, I'm the author. I have never questioned the clarity of that sentence, at least until today :-) By "0.5x" I mean "0.5 times or 0.5 multiplied by the reference time" where "reference time" is the inference time of OnnxRuntime. So I'm actually meaning "50%". I think the expression "0.5x slower", taken by itself, could be misleading, but in the context of the original sentence it becomes clearer ("while being only 0.…

https://en.wikipedia.org/wiki/Wikipedia:Two_times_does_not_m...

This is an issue that irritates the hell out of me when I see it and I'm so glad this person wrote it out so plainly.

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#158

I've been using Stable Diffusion on a MBP via invoke.ai. Are there recommendations for better parameterization of SD? I can never match the quality of the images I find on the internet even when using the same prompt and (seemingly) the same knobs (e.g., same Model like Euler A, etc). [edited for clarification]

This is the best I've tried so far, but no mac support I don't think. Its a feature packed fork of Fooocus, which was developed by the orginal ControlNet dev. The quality you can get from small prompts is mind boggling: https://github.com/MoonRide303/Fooocus-MRE For base SD 1.5, I use Volta, because its fast: https://github.com/VoltaML/voltaML-fast-stable-diffusion/com... Really good SD 1.5 image quality comes from g…

Fooocus does quite a bit of prompt massaging for you - there are models that take a few words and turn them into “prompt engineer” level prompts. Makes a huge difference.

Re: Running Stable Diffusion XL 1.0 in 298MB of RAM

#160
post #3

Fascinating. The money quote: "OnnxStream can consume even 55x less memory than OnnxRuntime while being only 0.5-2x slower" The trade-off between (V)RAM use and inference time sounds like it could be advantageous in some scenarios, and not just when RAM is constrained like in the RPi case. I actually wonder if this weight unloading approach can be used to handle larger batch sizes in the same amount of RAM, in effect…

"0.5-2x slower" must be a typo on their part right? If something is 0.5x slower, then it is 2x faster. I assume they meant to say "1.5-2x slower".

It is actually correct, it is slower by 0.5-2x in terms of runtime resulting in a runtime of 1.5-3x. Admittedly it would probably have been less confusing to say that the runtime increased by 0.5-2x to 1.5-3x because slower is more intuitively associated with less while the runtime of course increases.

In terms of throughput it is a decrease by 0.33-0.67x to 0.67-0.33x. That this are the same numbers in reverse order is of course just a coincidence, would the runtime have increased by only 0.2-0.5x to 1.2-1.5x, then the throughput would have decreased by 0.17-0.33x to 0.83-0.67x.

Post reply on HN