The AI Journey (lots of art)
I doubt anybody will ever read this whole thing but some people might scroll past it and enjoy the images so I'm going to post it.
This is journey to solve the problem I mentioned in my previous post: I want to use Animagine for CGs in my game, because it looks amazing, but it gives a really big challenge generating NSFW art. For this reason, I dove deep into the world of AI.
My Goal
I needed a process that will allow me to generates images that 1: Look artistically consistent with Animagine, and 2: It can't give me a huge fucking hassle generating NSFW art.
My prompt:
- Generate my character, in a coffee shop, leaning forward, with a downblouse.
I chose this prompt because a downblouse a relatively complex image. Not too simple. But also not too crazy. If a model can't do a downblouse, it won't be useful for anything else in the future.
Reference Art(Animagine 3 XL)
All the rest of the art in my game will be generated using Animagine. So I need my final output to look similar to Animagine art. This is the Animagine image I will use as a reference:
First Attempt
I spent a ton of time trying to understand Stable Diffusion. There are 2 versions people use. SDXL and SD 1.5. SDXL is newer and better (Animagine is based on SDXL) but 1.5 has a much bigger community with more plugins. So I decided to start with 1.5. I used a model called Counterfeit 3 which is based on 1.5.
I put in my prompt, and here's what I got:
Wow. Holy shit. I almost quit immediately. It looks fucking horrid.
I did a ton of work adjusting the prompt, adding plugins, etc... And I got it to output something I actually liked:
And I wanted to test out more complex prompts, such as having her be embarassed and cover her chest:
It worked pretty good. I was happy with it. But there's a problem here. It looks absolutely nothing like the reference image. Also, the backgrounds are really ugly compared to the reference image. The background is also ugly and yellow and every image I generated seemed to have this same dull background. I almost stopped here and just decided that this would be good enough.
Enter Pony
But then I started to read about Pony. Pony is an SDXL model (not 1.5). SDXL can produce higher resolution images, and this can fix the ugly backgrounds and overall result in higher quality art with more detail.
That sounds pretty good. So I loaded in Pony and generated an image:
Holy fuck this looks awful. Absolute barf. You can see the backgrounds are much higher quality, but the actual character art is so so terrible compared to the reference image. There is no way I could use this.
I did a lot of work on the prompt and locating plugins, and I got something that looked pretty ok:
But it still just really doesn't look like the reference image. Also, this image was by far the best out of many really really bad ones. I wasn't feeling too confident on Pony.
But I had an idea. I was using the name of a particular character to generate these images. However, you can see in the reference art, the actual character isn't
that noticeable. If you know who it is, you can kind of tell, but the hair and stuff really are pretty different.
So my idea was to stop referencing this character directly, and just try to reference "An anime girl with short brown hair." This is what I got:
Honestly this looks pretty good. But it is not consistent with the reference image. Completely different art style. I could probably accept this, but I wouldn't be happy about it.
Pony Checkpoints
That's when I learned about something called Checkpoints. These are models that were trained on top of another model. Usually somebody does this to keep most of the original model, but produce a stronger style (eg: more Anime-ish rather than more Lifelike)
So I downloaded a few Pony checkpoints and got to work.
The first one I downloaded was called Autism Mix:
The art style for this one is really beautiful, and it looks really good, but it is not consistent with the reference image. Also, the other images generated for this one had issues. Overall I might have used this one if I didn't find anything better.
PD For Anime
Then I found one that sounded really promising. It was called Pony Diffusion for Anime (PD For Anime) and it is supposed to be a checkpoint of Pony but with a strong anime art style.
I gave it a try:
This looks both really good and really bad. It looks good because it is the closest thing to the reference image yet. It has an anime style face with flat features. It also didn't complain about the downblouse. But it also looks terrible because the colors are just awful and oversaturated and burnt.
I did what I could to reduce the saturation, and ended up with this:
It looks better but really still not acceptable. Also the backgrounds seem to have lost all detail.
Confetti
I found one called Confetti. I started it with the "Brown hair girl" prompt rather than referencing my specific character. This is what it gave me:
This looks actually pretty good. Stylistically it's great and it's very consistent with my reference image. Also, the backgrounds have pretty good detail. I like this one, but I did not like how I've completely lost the original reference character. There's no way you can tell which character I'm referencing from this image.
So I tried adding the character's name back in to the prompt:
And it just looks really really bad. Just not what I'm looking for. At this point, I'm considering sticking with "brown haired girl" and just losing the character reference. But I have a few more to try
7th Anime PD
This one actually looks awesome. However the art style still doesn't match very well with the reference image. And this model also generated much more of a "painted" style overall, resulting in some of the other images that it generated just not looking great.
I also noticed there is no nipple in the downblouse here. This usually means the model is fighting me. I can't remember exactly if that's why I scrapped this one. I do still like this style and would use it if I could get nsfw generation to work without pain.
Mugen
At this point it's like 3am and I'm tired and this is the 10th model I've done. Each model requires a lot of work and adjustment to try and get it at its best. So I load up this new one called MugenMix or something like that.
Wait... wow. That looks extremely similar to the reference image. It kept the character reference almost exactly to the reference image. It looks a little bit burned and oversatured but I can deal with that.
I need to figure out if this is the one. So I tested the NSFW filter with something more explicit:
Wow. I really like this. It gave me zero problems generating NSFW art. But it still has some issues. First off, the face doesn't match the reference image very well. And overall it still looks oversaturated. I did a lot more refinement on this model and came up with this:
This looks really good and it's almost certainly going to be the model that I use. Not perfect, still kind of shiny and oversaturated, but much better than every other model.
Something New - Animagine + Pony Mergers
Then, in the early depths of the morning, something catches my eye. I see a model called Reponygine 3. I read that it is a merger of the Animagine 3 model with Pony XL. Could this solve all my issues? Animagine has the art style I love, but Pony is much less strict about NSFW artwork.
This could be it, I gave it a try:
And I generated another:
This second image was very important. Some models are really bad at understanding complex instructions. "Removing bra" gets completely discarded by Animagine, and other models also struggle with it. This model understood it perfectly and generated this image on this first try.
This looks visually really good and really consistent with Animagine. But it had 2 major issues: the first is that it kept generating lolis. My reference character is a full grown adult and so this would not work. The other issue is that it really just lacks detail and the lighting is unimpressive.
So That Was It
Mugen generated some great art, better than everything else, and that's what I decided to go with... wait. What's that?
Refiners
This is when I discovered what is called a Refiner. A refiner is a special step in the generation process where 1 model generates the first part of your image, and a 2nd model completes the image.
This is exciting. Can I use Mugen to generate the NSFW concepts of the image, and then force Animagine to actually fill in the art? This might be a way that I can literally force Animagine to draw NSFW art, because it needs to complete what Mugen started.
This requires weighting the models. Eg: Tell it what % of the image Mugen should generate first, and then Animagine will finish off the rest.
I give it a try:
This looks good. But not great. The face does not match the reference image, and it looks a little too 3D. I decide to tone down the % of generation for Mugen and given Animagine more time:
WTF IT ADDED A SHIRT. This is what I'm talking about. Animagine just does not want to generate NSFW art. It literally added a shirt into the image even though my prompt was just things like "Topless, no shirt".
This was annoying, but if yous top for a second and look at the photo, you notice 2 things. 1: The background art looks great. It has the quality of Animagine's backgrounds.
And most importantly 2:
This looks extremely close to the reference image. Scroll ALL the way back up to the top of this post and you will see it is almost an exact match. That's exciting.
So I start tweaking things. I need to give Animagine
as little time as possible to put a goddamn shirt into the image. I need to get Mugen to generate almost the entire thing, but leave just enough for Animagine to fill in the face details, but no shirt.
And I finally get it. The perfect mix:
Perfect facial match to the reference image, perfect art style match, beautiful background, and fully NSFW. This is it. I finally got it.
It's not perfect. Actually, this image generated with no nipples. Just blank tits. I had to use another step in the AI process to generate the nipples (called Inpainting). And that's a little bit concerning. Because it means I will still be fighting with the AI in the future. However, I can always fall back to Mugen alone if needed.
Thanks for reading (or just scrolling through the art), I hope you enjoyed it.
Updates to the game will proceed in the next few days. None of the art depicted in this post will be a part of the game.