Live data from Hacker News

Stable Diffusion 2.0

stability.ai

151–160 of 519 posts

Re: Stable Diffusion 2.0

#151
post #50

They apparently tried to combat NSFW generation by filtering the training dataset not to include any.

They know they are going to be the next target in the war on general purpose computing. They're trying to stave it off for as long as possible by signalling to the authorities that they are the good guys. A confrontation is inevitable, though. Right now it costs moderate sums of money to do this level of training. Not always will this be so. If I were an AI-centric organization, I would be racing to position myself a…

Some AI startups backed by the biggest players are already hitting legal/regulatory issues.

Re: Stable Diffusion 2.0

#152
post #61

Earlier quoted context omitted.

> train this from scratch If you're talking about training from scratch and not fine tuning, that won't be cheap or easy to do. You need thousands upon thousands of dollars of GPU compute [1] and a gigantic data set. I trained something nowhere near the scale of Stable Diffusion on Lambda Labs, and my bill was $14,000. [1] Assuming you rent GPUs hourly, because buying the hardware outright will be prohibitively expen…

I have... ~11TBs of free disk space and a 1080ti. Obviously nowhere close to being able to crunch all of Wikimedia Commons, but I'm also not trying to beat Stability AI at their own game. I just want to move the arguments people have about art generators beyond "this is unethical copyright laundering" and "the model is taking reference just like a real human".

I think it's a great idea regardless of practicality / implementation which I think is generally understood to be largely a matter of time, money and hardware. I feel like you write it up so the idea gets out there or you can pitch it to someone if the opportunity arises.

Oh and also I second the fast.ai suggestion, part 2 is 100% focused on implementing stable diffusion from scratch in the python standard library and it's amazing all around. The course is still actively coming out but the first few lessons are freely available already and the rest sounds like it will be made freely available soon.

Re: Stable Diffusion 2.0

#153

Earlier quoted context omitted.

Why do you think it is not open source? The model weights, model architecture, and dataset are all available.

Read the license of the model: https://github.com/Stability-AI/stablediffusion/blob/main/LI... 5. and 7. make it not open source

Seems like it is open source, just not free software.

Re: Stable Diffusion 2.0

#154

Is there a good explanation of how to train this from scratch with a custom dataset[0]? I've been looking around the documentation on Huggingface, but all I could find was either how to train unconditional U-Nets[1], or how to use the pretrained Stable Diffusion model to process image prompts (which I already know how to do). Writing a training loop for CLIP manually wound up with me banging against all sorts of stra…

Ah I am glad to see someone else talking about using public domain images!

Honestly it baffles me that in all this discussion, I rarely see people discussing how to do this with appropriately licensed images. There are some pretty large datasets out there of public images, and doing so might even help encourage more people to contribute to open datasets.

Also if the big ML companies HAD to use open images, they would be forced to figure out sample efficiency for these models. Which is good for the ML community! They would also be motivated to encourage the creation of larger openly licensed datasets, which would be great. I still think if we got twitter and other social media sites to add image license options, then people who want to contribute to open datasets could do so in an easy and socially contagious way. Maybe this would be a good project for mastodon contributors, since that is something we actually have control over. I'd be happy to license my photography with an open license!

It is really a wonderful idea to try to do this with open data. Maybe it won't work very well with current techniques, but that just becomes an engineering problem worth looking at (sample efficiency).

Re: Stable Diffusion 2.0

#155
post #131

Hopefully related: If I'm a photographer wanting to improve resolution of my content for printing, what's my current best bet for upscaling? Is it realistic to make use of this on the command line, feeding it my own images? Or has someone wrapped it in an app or online service?

This thread has a useful app. https://news.ycombinator.com/item?id=32628761

Re: Stable Diffusion 2.0

#156
Awesome. I'm installing on Ubuntu 22.04 right now.

Ran into a few errors with the default instructions related to CUDA version mismatches with my nvidia driver. Now I'm trying without conda at all. Made a venv. I upgraded to the latest that Ubuntu provides and then downloaded and installed the appropriate CUDA from [1].

That got me farther. Then ran into the fact that the xformers binaries I had in my earlier attempts is now incompatible with my current drivers and CUDA, so rebuiding that one. I'm in the 30-minute compile, but did the `pip install ninja` as recommended by [2] and it's running on a few of my 32 threads now. Ope! Done in 5 mins. Test info from `python -m xformers.info` looks good.

Damn still hitting CUDA out of memory issues. I knew I should have bought a bigger GPU back in 2017. Everyone says I have to downgrade pytorch to 1.12.1 for this to not happen. But oh dang that was compiled with a different cuda, oh groan. Maybe I should get conda to work afterall.

`torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 5.93 GiB total capacity; 5.62 GiB already allocated; 15.44 MiB free; 5.67 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF`

Guess I better go read those docs... to be continued.

[1] https://developer.nvidia.com/cuda-downloads?target_os=Linux&...

[2] https://github.com/facebookresearch/xformers

Re: Stable Diffusion 2.0

#157
post #20

Earlier quoted context omitted.

Do pixels have human rights now?

They don't. The training dataset though, may have been obtained through human rights violation. The problem is when the novelty starts to wear out. Then they will start to look for fresh training data which may again incur more human rights violation. If you can ensure that no new training data are obtained that way, then I guess it's okay? (Personally, I don't condone it)

> The problem is when the novelty starts to wear out.

Isn't the main feature of stable diffusion is that it doesn't?

Re: Stable Diffusion 2.0

#158

Earlier quoted context omitted.

I don't understand why so many people call Stable Diffusion open source.

Why do you think it is not open source? The model weights, model architecture, and dataset are all available.

Open source is more than just everything being available. It also depends on the license, and the one Stable Diffusion uses doesn't qualify, for multiple reasons, including the one mentioned upthread.

Re: Stable Diffusion 2.0

#159

Earlier quoted context omitted.

Read the license of the model: https://github.com/Stability-AI/stablediffusion/blob/main/LI... 5. and 7. make it not open source

Seems like it is open source, just not free software.

It's not free software or open source. Check the Open Source Definition: https://opensource.org/osd
Post reply on HN