Live data from Hacker News

I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

minimaxir.com

21–30 of 66 posts

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#21

Please consider posting the LoRa on civitai.com as well as the stable diffusion Reddit. These results look pretty good, looking forward to trying it out. I hadn't realized that the generative images buzz was dying out, since I'm using it regularly I guess it is always in buzz for me.

Agreed I feel like, and I do this a lot as well, people have a tendency to track their habits and assume everyone follows that. From my perspective, the gen image buzz is still as hot as ever!

If I lacked excitement for SDXL it was because it felt like the there was no massive jump in image quality to me. Sure the size doubling is great, but it also presents a problem, as I don't always want to generate 1024x1024 images. I still use third party trained 1.5 models because they create damned good outputs and I have like 5 different upscaling solutions and at least one will add new detail as things are upscaled.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#22
post #8

>A minor weakness with LoRAs is that you can only have one active at a time Uh this isn't true at all, at least with auto1111.

IIRC it does merging/weighting behind the scenes.

I'm pretty sure that it's just serially summing the network weights, which results in an accumulated offset to the self-attention layers of the transformer. It's not doing any kind of analysis of multiple networks prior to application to make them "play nice" together; it's just looping and summing.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob...

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#24
In general I'm really interested by the concept of personalized RLHF. As we have more and more interactions with a given generative AI system, it seems we'll start to have enough interaction data to meaningfully steer the output towards our personal preferences. I hope the UIs improve to make this as transparent as possible.

Just thinking about how to productize this flow, it should be quite easy to implement the "thumbs up/down" feedback option on every image generated in the UI, plus an optional text label to override "wrong". Then when you have enough HF (or nightly) you could have a batch job to re-train a new LoRA with your updated preferences.

In principle you could collect HF from the implicit tree-traversal that happens when you generate N candidate images from a prompt and then pick one to refine. Or more explicitly, have a quick UI to rank/score a batch, or a trash bin in the digital workspace to discard images you don't like at each iteration of refinement (batching that negative feedback to update your project/global LoRA later).

Going further I wonder what the fastest possible iteration loop for feedback would be? For images in particular you should be able to wire up a very short feedback loop with keypresses in response to image generation. What happens if you strap yourself to that rig for a few hours and collect ~10k preferences at 1/s? Can you get the model to be substantially more likely to output the sort of images that you're personally going to like? Also sounds pretty intense, I'm getting Clockwork Orange vibes.

I didn't spot in the article, how many `wrong` images were there? From a quick skim of the code it looks like maybe 6 per keyword with 13 keywords, so not many at all. ~100 is surprisingly little feedback to steer the model this well.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#25
post #9

Creating art with stable diffusion has become such a fun hobby of mine. The difference between SD 1.5/2.0 and SDXL is massive, and it's impressive how quickly the quality is improving with this stuff.

>The difference between SD 1.5/2.0 and SDXL is massive,

Can you explain?

I havent used SDXL yet, but I spent a ton of time in 1.5.

So far I gathered:

>Higher res

>higher 'quality'

But given I was using realistic vision 3 for so long, I never had a quality issue. With upscaling, I never needed higher res.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#26

Please consider posting the LoRa on civitai.com as well as the stable diffusion Reddit. These results look pretty good, looking forward to trying it out. I hadn't realized that the generative images buzz was dying out, since I'm using it regularly I guess it is always in buzz for me.

I posted the original release to /r/StableDiffusion but all the comments are "why not compatable with A1111?" and I can't find a good script to do the conversion: https://www.reddit.com/r/StableDiffusion/comments/15r5k3i/i_... Civitai has syndicated the LoRA: https://civitai.com/models/128708/sdxl-wrong-lora

You will get more users if you provide a safetensors file instead of bin and pickletensors a lot of people have gotten really scared by the malware scare that was going through social media a few months ago.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#27
post #24

In general I'm really interested by the concept of personalized RLHF. As we have more and more interactions with a given generative AI system, it seems we'll start to have enough interaction data to meaningfully steer the output towards our personal preferences. I hope the UIs improve to make this as transparent as possible. Just thinking about how to productize this flow, it should be quite easy to implement the "th…

> I didn't spot in the article, how many `wrong` images were there? From a quick skim of the code it looks like maybe 6 per keyword with 13 keywords, so not many at all. ~100 is surprisingly little feedback to steer the model this well.

Correct: 6 CFG values * 13 keywords = 78 images. Some of them aren't as useful though; apparently "random text" results in old-school SMS applications sometimes!

LoRAs only need 4-5 images to work well, although that was for older/smaller Stable Diffusion which is why I used more images and trained the LoRA a bit longer for SDXL. The Ugly Sonic LoRA in comparison used about 14 images and I suspect it overfit.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#28
Tangentially related: for reasons I don't yet really understand, the LORAs that I build for Stable Diffusion XL only work well if I give a pretty generic negative prompt.

These are fine-tuned on 6 photos of my face, and if I use them with positive prompts, the generated characters don't look much like me. But if I add generic negative terms like "low quality", suddenly the depiction of my face is almost exactly right.

I've trained several models and this has been true across a range of learning rates and number of training epochs.

To me, this feels like it will somehow ultimately be connected to whatever is driving minimaxir's observations in this post.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#29
Very cool. Will give this idea a spin soon. I'm a bit of a scientist myself too :)

Here's something interesting I did few days ago.

- Generated images using mixture of different styles of prompts with SDXL Base Model ( using Diffusers )

- Trained a LoRA with them

- Generated again with this LoRA + Prompts used to generate the training set.

Ended up with results with enhanced effects - glitchier, weirder, high def.

Results => https://imgur.com/gallery/vUobKPK

I’m gonna train another LoRA with these generations and repeat the process obviously!

This is a pretty neat way to bypass the 77 token limit in Diffusers and develop tons of more styles now that I think about it.

You can play around with the LoRA at https://replicate.com/galleri5/nammeh ( GitHub account needed )

Will publish it to CivitAI soon.

Re: I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images

#30
post #9

Creating art with stable diffusion has become such a fun hobby of mine. The difference between SD 1.5/2.0 and SDXL is massive, and it's impressive how quickly the quality is improving with this stuff.

>The difference between SD 1.5/2.0 and SDXL is massive, Can you explain? I havent used SDXL yet, but I spent a ton of time in 1.5. So far I gathered: >Higher res >higher 'quality' But given I was using realistic vision 3 for so long, I never had a quality issue. With upscaling, I never needed higher res.

Yes, currently SDXL doesn't really beat the best SD1.5 checkpoints quality-wise. But it (and the currently available checkpoints) shows awesome promise, so give it a six months or so.
Post reply on HN