6 ms·
I Made Stable Diffusion XL Smarter by Finetuning It on Bad AI-Generated Images
- kwhitefoot 3y ago> XL Extra Large? 40 times?
- brianjking 3y agoWhat? XL is the current version of Stable Diffusion.
- pbjtime 3y agoIt's already on version 40?
- bckr 3y agoExtra large
- jfoutz 3y agoIt’s a Roman numeral joke.
- ShamelessC 3y agoNot a very good one.
- sschueller 3y ago1024 x 1024 instead of 512 x 512.
- Taek 3y agoXL more likely refers to the parameter count, which is 3 billion instead of <1 billion
- not2b 3y agoNo, I think it is mainly because it's optimized for 1024 x 1024 images, rather than 512 x 512 as the previous version was.
- Our_Benefactors 3y agoIt’s both. More pixel space and more parameters.
- msp26 3y ago>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.
- minimaxir 3y agoIIRC it does merging/weighting behind the scenes.
- Der_Einzige 3y agoSource for this?
- cheald 3y agoI'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/master/extensions-builtin/Lora/networks.py#L285-L313 https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob...
- rabuse 3y agoCreating 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.
- hospitalJail 3y ago>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.
- Sharlin 3y agoYes, 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.
- CuriouslyC 3y agoThe best 1.5 checkpoints are constrained in their output flexibility to achieve the quality they get though, and they don't follow prompts nearly as well as SDXL, so if the model doesn't naturally gravitate towards doing what you want it's very hard to steer it anywhere. SDXL also does a better job with full anatomy, which is the reason shared 1.5 generations tend to be torso up or portrait shots.
- Auracle 3y agoCurrently SDXL is better than SD1.5 checkpoints at pretty much everything other than portraits (or anime drawings) of pretty women. Unfortunately it seems that's all people want to generate, as is evident when you search for SD on Twitter.
- ChatGTP 3y agoStable diffusion doesn’t grant the user a good imagination or taste unfortunately
- politelemon 3y agoPlease 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.
- minimaxir 3y agoI 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_just_released_a_lora_for_stable_diffusion_xl_10/ https://www.reddit.com/r/StableDiffusion/comments/15r5k3i/i_... Civitai has syndicated the LoRA: https://civitai.com/models/128708/sdxl-wrong-lora https://civitai.com/models/128708/sdxl-wrong-lora
- Zetobal 3y agoYou 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.
- Sharlin 3y agoAnd for a good reason. A big hunk of floating-point numbers really shouldn't be able to execute arbitrary code. Or any code at all.
- araes 3y agoThank you for note on this. I had not heard there were already trojan horse malware being slipped into tensor files as python scripts. Apparently torch pickle uses eval on the tensor file with no filter. Heard surprisingly little commentary on this topic. The full explanation of how Safetensors are "Safe" can be found from the developer at: https://github.com/huggingface/safetensors/discussions/111 https://github.com/huggingface/safetensors/discussions/111
- sorenjan 3y agoThis is really interesting. Like mentioned in the article, this is a kind of RLHF, and that's what takes GPT3 from a difficult to use LLM to a chat bot which is able to confuse some people into thinking is has consciousness. It makes it much more usable. I don't know how these models are trained, but hopefully future models will include bad results as negative training data, baking it into the base model. It's only mentioned in passing in the article, but apparently it's possible to merge LoRAs? How would you do that, I'd like to use one LoRA to include my own subjects, this LoRA to make the results better, and maybe a third one for a particular style.
- minimaxir 3y agoMerging LoRAs is essentially taking a weighted average of the LoRA adapter weights. It's more common in other UIs. diffusers is working on a PR for it: https://github.com/huggingface/diffusers/pull/4473 https://github.com/huggingface/diffusers/pull/4473
- Der_Einzige 3y agoThis concept is not new. Lots of "negative embeddings" that you put into negative prompts to fix hands and bad anatomy on civit.ai
- minimaxir 3y agoThat was my previous textual inversion experiment that I mentioned in the post: https://minimaxir.com/2022/11/stable-diffusion-negative-prompt/ https://minimaxir.com/2022/11/stable-diffusion-negative-prom... This submission is about a negative LoRA which does not behave the same way at a technical level.
- deleted 3y ago[deleted]
- theptip 3y agoIn 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.
- minimaxir 3y ago> 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.
- 3y ago
- carbocation 3y agoTangentially 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.
- yantrams 3y agoVery 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 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 https://replicate.com/galleri5/nammeh ( GitHub account needed ) Will publish it to CivitAI soon.
- Footnote7341 3y agoIt became a trend among some data scientists maybe 5 years ago to start recording every keystroke they made on their PC. I'm kind of jealous now when that data is actually kind of useful. I have a large 30,000 image collection of anime art that I like, that I even competitively ranked for aesthetic score 5 years ago that would come in useful for something like this.
- letitgo12345 3y agoSimilar to https://arxiv.org/abs/2307.12950 https://arxiv.org/abs/2307.12950
- usrusr 3y agoMust be the formative years spent in the nineties' contradiction field of "counter culture vs also counter culture, but counter culture that's on MTV": there's something about prompts ending with tag references like "award winning photo for vanity fair" (or whatever the promptist's standard tag suffix turns out to be in these posts) that inspires a very deep desire in me to not be part of this generative image wave.
- minimaxir 3y ago"award winning photo for vanity fair" is more a trick for good photo composition (e.g. rule of threes) than anything else.
- nullc 3y agoI wonder how much of this effect is just undoing stabilities fine tuning against inappropriate images.
- Jackson__ 3y ago>The release went mostly under-the-radar because the generative image AI buzz has cooled down a bit. Everyone in the AI space is too busy with text-generating AI like ChatGPT (including myself!). I disagree with this statement. The release went mostly under the radar for 2 reasons, according to the people I've talked to. 1. Higher vram and compute requirements 2. Perceived lower quality outputs compared to specialized SD1.5 models. If either of these points had been different, it would have gained a lot more popularity I'm sure. But alas, most people now simply wait and see if specialized SDXL models can actually improve upon specialized 1.5 models.
- SV_BubbleTime 3y agoLower quality output. It’s that. I think most people casually associated with it find it as a toy they mess around with for a minute. The hardcore SD fans… are making hardcore I think. XL is bad at porn. Stability got scared of what they created and tried to hedge towards “safety”. Can’t have your Kate Middleton or Emma Watson porn being TOO convincing. People will stick with 1.5 until something is better… for porn.