One of the things that bothered me about generating nudes for some people is that the AI just can't do some celebrities' faces very well, although even in those cases it seems to understand their body decently otherwise. I have now learned how to train the AI to recognize faces in a much more believable way. Here's an example. This is how Stable Diffusion 1.5 originally renders Karen Gillan's face:
And now after 120,000 generations of training, based on 52 images pulled from google image search and her subreddit, this is how it sees Karen Gillan's face:
Unfortunately, it's still not perfect. This is using a method called "textual inversion" which trains a new series of inputs, without actually changing the model itself. There's another type of training that can then further refine the model itself called "hyerpnetwork" training, which I may do to further improve this result. The face usually comes out pretty well, but is often giving a "resting bitch face", and more distant shots don't always look that great.
However, I also found a site that has different AI models you can use to render images using the same input data, and one of them is trained on porn. I suspect this is the same model the above poster was using for that Saoirse Ronan image, or something similar if not. Using that new model, and the above Karen Gillan embedding, as well as the process I was already using for higher quality results, I get this:
That's a pretty nice result! Still got some of that resting bitch face, and it's not a perfect likeness, but it's close enough to work for me. I could potentially further refine this result if I wanted to by switching back to the main Stable Diffusion 1.5 model and using inpainting on the face to get closer to the better realism achieved by the main model, but in this particular case I don't think it's necessary.
As a side note, there is a better version of Stable Diffusion, 2.1, which generates some absolutely gorgeous imagery compared to 1.5, but unfortunately it seems to have a nsfw filter baked into the model that neither training type seems to be capable of reversing (I'm getting barbie doll like images, with nips that look painted on). There is another training method called dreambooth which is more complicated and modifies the entire model at once, but every time I've tried it my GPU has fallen just short of the VRAM needed to train the 768x768 quality the model is designed for. Maybe I can find a way to reduce VRAM usage on my PC to work on that, but for now I'll keep using 1.5 and the porn model based on 1.5 unless someone comes out with a custom model trained on 2.1 that I can use. The results can still be good, but it does take more work to get a good high resolution result with 1.5 than it does for 2.1.
Also note: training of any of these things takes a long time. Like 20+ total hours of GPU time to reach the quality I did here, and I'm not keeping the GPU running at all hours of the day as my room reaches like 85F if I do that, so it won't be very often that I'll be able to put out a new celebrity at this level of quality, but I'm hoping to improve the quality of the images posted here over time.
Also worth mentioning that since this is based on porn images, sometimes the bodies are a bit more perfect than they might look in reality. The base model still seems to generate a more realistic depiction of celebrity's nude bodies, but this model still seems to get relatively close, even if it's like a more ideal version of what we might think they look like underneath. I have some other nude-based AI models that handle the body a bit more realistically, but the images aren't usually as high quality on those, but I may switch it up for variety once in a while.