Hiya! It's been a while, sorry I've been away for so long. My new game syrup town has eaten up a lot more of my time than I'd hoped it would but I've also been working on decensoring things.
My plan was to (mostly) automate it through several steps. Here's the workflow:
- Take the regular image and convert it to png, hitomi.la's image sizes are a bit bigger than the usual SDXL sizes but it works fine for uncensoring at 1200x1600.
- Use Kohya to auto-caption the images, then use a python script I wrote to inject those captions into the image's png data.
- Do a bulk img2img on all the images at 0.55 denoising with an appropriate style lora, for these ones I used a lora by ginger juju on civitai. The full image doesn't look great but we only need a small part of it.
- Overlay the original images atop the new ones and erase the mosaics.
- If there's still any decensoring or areas that don't match up to the original, I'll do another img2img pass at 0.45 denoising until it looks alright.
Here's an example of that process:
View attachment 3868681
View attachment 3868682
View attachment 3868683
If anyone wants to replicate this, such as for HU or other games, I'm using webui forge:
You must be registered to see the links
Using a checkpoint called autismMix:
You must be registered to see the links
And from there using additional models to try and match the styles of the images I've been decensoring.
For the actual captioning Forge does have an extension to caption your images, but it wasn't working so I used a tool called Kohya instead and removed all the instances of "censored" from the tags it generated:
You must be registered to see the links
As I was working a lot of my time was eaten up trying to search for the best way for me to do this, the big time sinks have been:
- I was trying to find an adetailer model, a tool that would let me tell the AI to zoom in and only do an img2img replacement on a single part, to detect mosaic censorship areas. There isn't one, so I started looking into how to train an adetailer model myself, but no dice there either.
- I wrote some more python scripts trying to find a way to identify mosaic censored areas, crop the image around those areas, and save their positions to later inject them back onto the originals, then feather the edges
- From there I fell down a rabbit hole of trying to learn how to use machine learning to detect and erase areas of an image where a mosaic pattern of censorship is present. Unfortunately that idea went bust and my best scripts would just erase chunks of the images seemingly at random.
- I wasted some time writing a script that would try to crop the images to match the sizes SDXL usually uses
And of course inpainting would probably work overall better than doing these bulk img2img runs, but I wasn't able to make a program that would detect mosaic areas, let alone mark them for inpainting.
Finally, I also made an APK for version 32. Now that I know how to make them, provided there aren't any major issues that pop up, I'll be making APK versions for all my other games as well in the future:
Mega
Thanks for all your patience!