Create and Fuck your AI Slut -70% OFF
x

Mod Lab Rats 2 Reformulate GenAI Mod Thread

May 23, 2023
266
184
119
lol, yeah the model name is quite suggestive,
Which GenAI mod do you use?
Don't suppose you've got a maswoo-style json customised for pornmaster?

I'm currently implementing model specific jsons in my mod and ripping off maswoo's code and jsons shamelessly.
 

gimb

Newbie
Feb 17, 2018
16
8
179
lol, yeah the model name is quite suggestive, it's easy to find as it's one of the most popular nsfw models on civitai, and I find it's one of the better ones at doing both, sex scenes and non sex scenes.
It also understand quite nicely the clothing prompts, the only problem I'm having is with the suit jacket, which the model refuses to understand that the girl should be wearing a shirt under the jacket,and gives a picture of a girl with jacket and bare boobs 90% of the time, but I'm still tweaking my profile to try to solve it.
And it doesn't help that negative prompts are apparently not working on the mod, (the picture generated is the same, no matter what I put on the neg prompt).
The clothing prompt is because the current logic only prompts withe the uppermost piece of clothing for it to work the whole clothing prompt logic has to be re written. i have some prototype logic written for maasows mod but its not ready yet.

The other issue with the negative prompts is that your likely using a 1.0 cfg with the DMD2 speed lora. A 1.0 cfg ignores negative prompts. To fix this you can increase it to around 1.5 however the generation will be slower.
 
  • Like
Reactions: Magister Crudi

Muji-k

New Member
Mar 1, 2018
10
3
91
Which GenAI mod do you use?
Don't suppose you've got a maswoo-style json customised for pornmaster?

I'm currently implementing model specific jsons in my mod and ripping off maswoo's code and jsons shamelessly.
I made a mishmash of many profiles that come with the 0.3 GenAI. And now I'm slowly customizing as I play the game. It's still an early work and it doesn't always get it right, but it's getting better the more I tweak it.

You are welcome to use it and tweak it to your own liking if you want. The lora in this profile is not optional though, you need to have 'dmd2_sdxl_4step_lora' installed, if you don't want to use it you can remove it from the positive_prompt_prefix, but then, you will need to raise the steps to around 25 and CFG to 7.0, also change the sampler and scheduler, increasing generation times by a lot... The only problem is that this lora sometimes messes up the generation (around 1 in 20), and I don't know what causes it, and I need to skip that image generation, sometimes it gives me a fuzzy white empty picture, and very rarely some body horror.

The embeddings (Stable_Yogis_PDXL_Positives, Stable_Yogis_PDXL_Negatives-neg) are a little more optional, but I find that they help a lot, but if you don't want them you can also remove them from prompt_prefix.
 
Last edited:
  • Like
Reactions: Magister Crudi

Muji-k

New Member
Mar 1, 2018
10
3
91
The clothing prompt is because the current logic only prompts withe the uppermost piece of clothing for it to work the whole clothing prompt logic has to be re written. i have some prototype logic written for maasows mod but its not ready yet.

The other issue with the negative prompts is that your likely using a 1.0 cfg with the DMD2 speed lora. A 1.0 cfg ignores negative prompts. To fix this you can increase it to around 1.5 however the generation will be slower.
the lower pieces of clothing are being passed to the positive prompt though, as i can see them on the GenAI screen...

I didn't know that DMD2 ignored the neg prompts with low cfg, thanks for the info. I tried raising to 1.5 but then the number of times it messed up the generation increased so I left at 1.0...
Still it's good to know as I was thinking it was a mod problem, not a problem with the lora
 
May 23, 2023
266
184
119
Here's Stephanie (Ookami) in the lab.

Do you think it's unfair to suspect she may have found some off label uses for her lab instruments?
 

waaazzzaaa

New Member
Nov 3, 2022
6
5
127
I thought you were using CyberPony too. Don't you get age appearances as either young hotties or old hags with nothing in between?
I put cyberpony positive/negatives in append for everyone under 30. Otherwise yeah, hags and hotties lol.

If you're using 'Africa' instead of 'African' as a racial prompt it would do that, but didn't you change it to 'Black'?
It's what had me change Afircan to (black)... rarely fully rendered African. Usually something like "Afric~city"


Do you use a utility (e.g. MSI Afterburner) to throttle your GPU?
Reason I ask is because I use MSI to stop the GPU temp going over 80C and last time I updated the driver it cleared the setting. I immediately got quicker responses but, as I soon discovered, at the cost of 85+C GPU temps.
I don't think throttling is my issue, GPU spikes are only at the beginning and end of a render. (I watch Taskmanager GPU tab a lot... trying to fugue this all out) Does throttling help renders?

If you want to focus on eyes use . Using ADetailer only for certain characters would take some extra coding and is beyond the scope of 'Append'.
Oooh, thanks, I'll try that
 
May 23, 2023
266
184
119
It's what had me change Afircan to (black)... rarely fully rendered African. Usually something like "Afric~city"
Yeah, it doesn't usually get the word quite right. Lily's tops are more likely to say "beached" or "bleacd" than "bleached".
I often get a mashed up version of someone's name on their top (or written on something in the background) too.

Does throttling help renders?
Probably the opposite unless your GPU is hitting its max operating temp.
I've got my PC in an non-aircon room and we're coming up to the Australian summer here so I like to maintain a bit of margin between its temperature and its theoretical max. I'm told the further below max you keep it the longer it lasts too, though TBH I'm yet to fry a GPU and usually have to update perfectly healthy ones because they won't run the software I want.

Mind you, a friend of mine once burned his whole PC and some of his bedroom probably due to an overheated GPU. When I asked when he last cleaned the dust out of the case he answered "Huh? Doesn't the fan do that?".

BTW, I just updated the Nvidia driver and am getting (slightly) faster image generation too. This time it didn't touch the MSI settings. So thanks for the tip.
 

elpe

Newbie
Feb 8, 2021
26
56
114
I'm getting good results for an Hentai based list of model and loras. How dificult would it be to add new ankerpoints for promts. Like making doggy and on knees or blowjob and titjob diferent instances.
 

Muji-k

New Member
Mar 1, 2018
10
3
91
I'm getting good results for an Hentai based list of model and loras. How dificult would it be to add new ankerpoints for promts. Like making doggy and on knees or blowjob and titjob diferent instances.
It seems that a merge was just done in the dev branch of the game to allow exactly for that ( ).
The mod probably still need some changes though, to account for that, but I believe it's highly likely that this will be in the next version....
 

elpe

Newbie
Feb 8, 2021
26
56
114
Yeah I found the central file that you would need to change, maybe it's even enought to change just this one (_position_definitions) but I never worked on renpy and I don't know how to repack the script fiel without a lot of hoops that I would need to learn. If someone knows how I would try it and share.
 

busoni

Newbie
Mar 15, 2022
27
22
85
I'm getting good results for an Hentai based list of model and loras. How dificult would it be to add new ankerpoints for promts. Like making doggy and on knees or blowjob and titjob diferent instances.
I first did this checking if it was a sex scene or not so it could show doggy sex or just bending over at the office :D, everything is doggy. Then it would be the "missionary" for sleeping vs "missionary sex" and many others. the positions repeat a lot and do not translate well. Then when I wanted specific images for "Show me your tits", or "give me your panties", I looked into labels. Now I check for the label called and associate it with a custom pose in the prompt file. This really expands the mod but you end up having to "babysit" sooooo many position prompts :D only recommended when you've got your desired checkpoint picked, otherwise you will be in a never endind cycle of tweaking the prompt for the right result, changing checkpoint and seeing it doesnt work anymore. I leave the basic references for label based detection:


Code:
def detect_label(label_name, abnormal):
       
        if label_name == "demand_strip_tits_label.start_stripping":
            store.current_label_name = label_name
           
        elif label_name == "demand_panties_label.start_stripping":
            store.current_label_name = label_name
           
        elif label_name == "sleeping_walk_in_label":
            store.current_label_name = label_name
           
        else:
            store.current_label_name = ""
           
    config.label_callbacks.append(detect_label)

Code:
 position_data = PositionData()
           
            current_position = current_person.position
            position_key = current_position
            # Access the stored label name
            if store.current_label_name == "demand_strip_tits_label.start_stripping":
                position_key = "strip_tits"
           
            elif store.current_label_name == "demand_panties_label.start_stripping":
                position_key = "panties"
           
            elif store.current_label_name == "sleeping_walk_in_label":
                position_key = "sleepwalkin"
           
           
            else:
                position_key = current_person.position
Edit to add some of my results. Using a merge of a couple of different checkpoints (ps, the braid is cause try as I may, the braided crown half the time would create an actual crown :D, I gave up the hassle so now that hairstyle is just a braid).
 
Last edited:
May 23, 2023
266
184
119
only recommended when you've got your desired checkpoint picked, otherwise you will be in a never endind cycle of tweaking the prompt for the right result,
Yeah, I get the same, time consuming, problem.

You can shortcut it a little by taking note of all the sex positions in the game then using A1111 to try to find an acceptable match, but I've found no checkpoints that give decent renditions of all positions and some positions don't seem to work with any of them. And it can be tricky to make the simple prompts you test in A1111 work with the more complex and variable ones generated by the game.

I figure the best answer is to train checkpoints and/or Loras specifically to LR2 positions. I've started work on a Lora but it's pretty slow going, not least because I'm simultaneously trying to get up to speed with the game, SD and Onetrainer. And of course Loras give mixed results with different checkpoints.
 

busoni

Newbie
Mar 15, 2022
27
22
85
You can shortcut it a little by taking note of all the sex positions in the game then using A1111 to try to find an acceptable match, but I've found no checkpoints that give decent renditions of all positions and some positions don't seem to work with any of them. And it can be tricky to make the simple prompts you test in A1111 work with the more complex and variable ones generated by the game.
Sixtynine was absolutely impossible for me, I ended up settling for a solo photo from behind, but it didn't change much from the pre-doggy photo and it was not satisfying. Finally yesterday I got a prompt that worked for it. I think I got now all the positions (regular ones not event ones) fixed up, but I keep trying to improve them. I'm finally happy with the checkpoint so I'm now working on this.

In regards to positions, the models that best worked for me are the NovaXL. I use a blend of NovaMature, Nova3dcg and smoothmix.

I ended up using the zxy to find the models that gave me the best results and lean onto them. Though I have to admit it is stupidly addictive to try different checkpoints. I don't know how civitai didn't kick my ass, I downloaded SO MANY over the last two weeks... some even more than once since I discarded them, and later learn about merging and thought "oh this one could be great for details!" :D

Not sure if playing the game with the mod will be fun, but tweaking with it has been a blast* to far ^_^
Next frontier is handling the threesomes, got a rough outline, we'll see if Claude cooperates.
 
  • Like
Reactions: Magister Crudi

elpe

Newbie
Feb 8, 2021
26
56
114
I first did this checking if it was a sex scene or not so it could show doggy sex or just bending over at the office :D, everything is doggy. Then it would be the "missionary" for sleeping vs "missionary sex" and many others. the positions repeat a lot and do not translate well. Then when I wanted specific images for "Show me your tits", or "give me your panties", I looked into labels. Now I check for the label called and associate it with a custom pose in the prompt file. This really expands the mod but you end up having to "babysit" sooooo many position prompts :D only recommended when you've got your desired checkpoint picked, otherwise you will be in a never endind cycle of tweaking the prompt for the right result, changing checkpoint and seeing it doesnt work anymore. I leave the basic references for label based detection:


Code:
def detect_label(label_name, abnormal):
     
        if label_name == "demand_strip_tits_label.start_stripping":
            store.current_label_name = label_name
         
        elif label_name == "demand_panties_label.start_stripping":
            store.current_label_name = label_name
         
        elif label_name == "sleeping_walk_in_label":
            store.current_label_name = label_name
         
        else:
            store.current_label_name = ""
         
    config.label_callbacks.append(detect_label)

Code:
 position_data = PositionData()
         
            current_position = current_person.position
            position_key = current_position
            # Access the stored label name
            if store.current_label_name == "demand_strip_tits_label.start_stripping":
                position_key = "strip_tits"
         
            elif store.current_label_name == "demand_panties_label.start_stripping":
                position_key = "panties"
         
            elif store.current_label_name == "sleeping_walk_in_label":
                position_key = "sleepwalkin"
         
         
            else:
                position_key = current_person.position
Edit to add some of my results. Using a merge of a couple of different checkpoints (ps, the braid is cause try as I may, the braided crown half the time would create an actual crown :D, I gave up the hassle so now that hairstyle is just a braid).
Mind sharing the file? To be honest I don't know what file the code here reffers to. I'm not very familiar with this stuff. Also mind if i got your promt file for your results. Im working on my own using kimoigaijin style and waiIllustriousSDXL_v150.
 
  • Like
Reactions: Magister Crudi
May 23, 2023
266
184
119
Not sure if playing the game with the mod will be fun, but tweaking with it has been a blast* to far ^_^
Yeah, I'm more addicted to playing with the mod than playing with the game. I think it's mostly because of the learning curve. I've never messed with AI image making before and had no idea how much there was to it nor how diverse and devoted the community around it is.

Next frontier is handling the threesomes,
Yeah, I found that a real challenge.

First is that the game's threesome 'menu' selections don't result in .currentPosition that's consistent or an obvious match to the menu options.

Second is trying to get the checkpoint to produce three distinct characters of the appropriate genders. Not only do I often get MMF but also FFF, MFFF and other combos and usually some are identical twins/triplets.

If you figure out how to pull in descriptions of all participants AND get the checkpoint to reproduce them please accept my sincere admiration and tell me your secret.
 
Last edited:
  • Like
Reactions: busoni and elpe

busoni

Newbie
Mar 15, 2022
27
22
85
Mind sharing the file? To be honest I don't know what file the code here reffers to. I'm not very familiar with this stuff. Also mind if i got your promt file for your results. Im working on my own using kimoigaijin style and waiIllustriousSDXL_v150.
The code is part of one of the files, I've modded the mod extensively. I was giving you the bit because I thought you were looking into adding the code to your modifications. I think you could incorporate this check in SD_Cache in vanilla to pass the position when defining the values. I would recommend using some A.I. agent like Claude. for little bits like this, they do a decent job. Just remember to make backups. they fix almost as many things as they break :D

I attach my .json file for the prompts. You'll see it has sections that are not on the original promt files, like a dedicated loras, or sections for face details and such. those are part of the changes I've been doing to the mod to create a bit more varied faces. I think they can be there and ignored and it won't break the vanilla mod, just remember to move the lora from its section to the positive or style sections if you wanna use it.

I've set the link to the base nova mature xl, but the name of the checkpoint is my personal blend, just use your own and see if you get good results :) let us know how it goes.

If you figure out how to pull in descriptions of all participants AND get the checkpoint to reproduce them please accept my sincere admiration and tell me your secret.
I was thinking to have separate "prompt generators" for scenes with multiple people. was gonna start with 2, get the details, and create custom "poses" in the prompt file for the interactions. then try to build the prompt with details of A + action + details with B.

It's always easier before starting, then it gets bad :D
 

gimb

Newbie
Feb 17, 2018
16
8
179
So after trying to get backgrounds to work with img2img i finally have a version that handles that decently well
 
  • Like
Reactions: Muji-k
May 23, 2023
266
184
119
So it is just enought to change the promts to display positions like blowjob? No changes in the games files?
Not sure what you're asking here.

If you mean checkpoint/lora training, what I'm doing is using LR2 specific prompts that aren't natural English (e.g. LR2_69, LR2_kneeling_oral) to avoid confusing the checkpoints with other stuff they might have been trained with that don't match the game. Then I'll include those prompts in the json for the LR2 trained checkpoint to be substituted in GenAI for the prompts the game provides.

If you mean the A1111 testing, that's to find the best combo of prompts and strengths for a given LR2 position to give a good chance of getting the image you want with the checkpoint you're using. Once you've found the best match you can for that checkpoint you have to put it in as a substitute prompt in the json.
 
May 23, 2023
266
184
119
So after trying to get backgrounds to work with img2img i finally have a version that handles that decently well
Yeah, they look good (albeit a bit colourless), but how well do they match the game locations?

The modded version of AnotherMikes GenAI I've been working on uses the currentPerson.location of the girl to detect location, but the problem with that is the game often doesn't update it when the girl moves, so you'll be talking to her in the lab and the background will show the shop she just left. A fix for that is on my 'to do' list, but it's not straightforward. Using the MC location to generate background would be better but would still show the wrong location for 'watcher' scenes, such as social media posts, selfies and the spy cam.

I'm using CyberRealistic Pony to generate realistic images and I'm fairly happy with what it gives me, though it has trouble differentiating between a hardware store and a sex shop.
 

elpe

Newbie
Feb 8, 2021
26
56
114
The code is part of one of the files, I've modded the mod extensively. I was giving you the bit because I thought you were looking into adding the code to your modifications. I think you could incorporate this check in SD_Cache in vanilla to pass the position when defining the values. I would recommend using some A.I. agent like Claude. for little bits like this, they do a decent job. Just remember to make backups. they fix almost as many things as they break :D

I attach my .json file for the prompts. You'll see it has sections that are not on the original promt files, like a dedicated loras, or sections for face details and such. those are part of the changes I've been doing to the mod to create a bit more varied faces. I think they can be there and ignored and it won't break the vanilla mod, just remember to move the lora from its section to the positive or style sections if you wanna use it.

I've set the link to the base nova mature xl, but the name of the checkpoint is my personal blend, just use your own and see if you get good results :) let us know how it goes.



I was thinking to have separate "prompt generators" for scenes with multiple people. was gonna start with 2, get the details, and create custom "poses" in the prompt file for the interactions. then try to build the prompt with details of A + action + details with B.

It's always easier before starting, then it gets bad :D
Thanks but to be honest it would be way more simple for me to take a look at the changes you made to vanilla (vanilla mod?) then to your promts. I can see what you did there but not were you connected your promts to. In the og mod the options for tieing promts to are very limited. Are that the things you guys call checkpoints, if so yes I want to know how to create more. Sorry I'm a noob to this. What did you change and were, what file. Was it of the mod was it of the game. I hope I don't come of as rude :) that is not my intention. For me SD_Cache is only a file of the mod. I guess it reffers to Stable Diffiusion. If you could share that file that would be great.