diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 7fc93c3c8a53a77ef4f27b6ca70553ae361c6dbb..41c9b775e6bb38df98afcf06ff701f1ac3d58f0d 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -170,6 +170,9 @@ App.Data.defaultGameStateVariables = { seeAnimation: false, animFPS: 12, aiApiUrl: "http://localhost:7860", + aiCustomStylePos: "", + aiCustomStyleNeg: "", + aiStyle: 1, aiUpscale: true, showAgeDetail: 1, showAppraisal: 1, diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 494572b98b44a61a398dee874948849a60e39335..98e40ee8fe126a06037d39fea417de888989d0a9 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "4.0.0-alpha.26", commitHash: null, - release: 1201, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1202, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/art/genAI/pubicHairPromptPart.js b/src/art/genAI/pubicHairPromptPart.js index 272687e1eaec9e1a3dcfe77b24d80a20c05ac159..288e73f8f11fa5449ec1492b4668d7b98855376e 100644 --- a/src/art/genAI/pubicHairPromptPart.js +++ b/src/art/genAI/pubicHairPromptPart.js @@ -6,7 +6,8 @@ App.Art.GenAI.PubicHairPromptPart = class PubicHairPromptPart extends App.Art.Ge if (this.slave.pubicHStyle === "waxed" || this.slave.pubicHStyle === "bald" || this.slave.pubicHStyle === "hairless" || this.slave.physicalAge < Math.min(this.slave.pubertyAgeXX, this.slave.pubertyAgeXY)) { return; } - return `${this.slave.pubicHColor} ${this.slave.pubicHStyle} pubic hair`; + const style = (this.slave.pubicHStyle === "bushy in the front and neat in the rear" ? "bushy" : this.slave.pubicHStyle); // less complicated prompt works better for the long style + return `${this.slave.pubicHColor} ${style} pubic hair`; } /** diff --git a/src/art/genAI/stylePromptPart.js b/src/art/genAI/stylePromptPart.js index 4b76eb204c98a1c1690eb55731921767c3b424e1..af36231ed334abe72bdb757d92356d875acbfccb 100644 --- a/src/art/genAI/stylePromptPart.js +++ b/src/art/genAI/stylePromptPart.js @@ -3,13 +3,27 @@ App.Art.GenAI.StylePromptPart = class StylePromptPart extends App.Art.GenAI.Prom * @returns {string} */ positive() { - return "<lora:FilmVelvia3:0.6> <lora:LowRA:0.5> 8k photography, dark theme, black background"; + switch (V.aiStyle) { + case 0: // custom + return V.aiCustomStylePos; + case 1: // photorealistic + return "<lora:FilmVelvia3:0.6> <lora:LowRA:0.5> 8k photography, dark theme, black background"; + case 2: // anime/hentai + return "2d, anime, hentai, dark theme, black background"; + } } /** * @returns {string} */ negative() { - return "greyscale, monochrome, cg, render, unreal engine"; + switch (V.aiStyle) { + case 0: // custom + return V.aiCustomStyleNeg; + case 1: // photorealistic + return "greyscale, monochrome, cg, render, unreal engine"; + case 2: // anime/hentai + return "greyscale, monochrome, photography, 3d render, text, speech bubble"; + } } }; diff --git a/src/gui/options/options.js b/src/gui/options/options.js index 1a59807928caef0ccafa250c135d595e9f60398a..c14be95b2c8c79c6a76f5140a6db0c5e18c19a2a 100644 --- a/src/gui/options/options.js +++ b/src/gui/options/options.js @@ -1232,6 +1232,22 @@ App.UI.artOptions = function() { options.addComment("This is highly experimental. Please follow the setup instructions below."); options.addCustom(App.UI.DOM.stableDiffusionInstallationGuide("Stable Diffusion Installation Guide")); options.addOption("API URL", "aiApiUrl").showTextBox().addComment("The URL of the Automatic 1111 Stable Diffusion API."); + options.addOption("AI style prompting", "aiStyle") + .addValueList([ + ["Photorealistic", 1], + ["Anime/Hentai", 2], + ["Custom", 0] + ]); + if (V.aiStyle === 0) { + options.addOption("AI custom style positive prompt", "aiCustomStylePos").showTextBox({large: true, forceString: true}) + .addComment("Include desired LoRA triggers (<code><lora:LowRA:0.5></code>) and general style prompts relevant to your chosen model ('<code>hand drawn, dark theme, black background</code>'), but no slave-specific prompts"); + options.addOption("AI custom style positive prompt", "aiCustomStyleNeg").showTextBox({large: true, forceString: true}) + .addComment("Include undesired general style prompts relevant to your chosen model ('<code>greyscale, photography, forest, low camera angle</code>'), but no slave-specific prompts"); + } else if (V.aiStyle === 1) { + options.addComment("For best results, use an appropriately-trained photorealistic base model, such as MajicMIX or Life Like Diffusion."); + } else if (V.aiStyle === 2) { + options.addComment("For best results, use an appropriately-trained hentai base model, such as Hassaku."); + } options.addOption("Upscaling/highres fix", "aiUpscale") .addValue("Enabled", true).on().addValue("Disabled", false).off() .addComment("Use AI upscaling to produce higher-resolution images. Significantly increases both time to generate and image quality."); diff --git a/src/gui/options/stableDiffusionInstallationGuide.js b/src/gui/options/stableDiffusionInstallationGuide.js index f4bb0e214915c062a467a3f8e221b94566bfe3ab..c764e95e767dad530525fc21a977f337e814d93e 100644 --- a/src/gui/options/stableDiffusionInstallationGuide.js +++ b/src/gui/options/stableDiffusionInstallationGuide.js @@ -23,7 +23,7 @@ Stable Diffusion is an AI model for generating images given a text prompt. Autom <li><a href="https://civitai.com/models/33208?modelVersionId=112969">Film Velvia v3</a></li> </ul> -<p>Note that MajicMix is heavily biased towards Asian girls; if you have a more diverse arcology, you may prefer a different base model like <a href="https://civitai.com/models/16804">Life Like Diffusion</a>. Your results may vary with other models, since generated prompts are tuned primarily for these models, but don't be afraid to try others.</p> +<p>Note that MajicMix is a photorealistic model heavily biased towards Asian girls; if you have a more diverse arcology, you may prefer a different base model like <a href="https://civitai.com/models/16804">Life Like Diffusion</a>, or you might want to try a different style entirely, like <a href="https://civitai.com/models/2583?modelVersionId=106922">Hassaku</a> for an anime style. Your results may vary with other models, since generated prompts are tuned primarily for these models, but don't be afraid to experiment.</p> <h2>4. Place the models in their corresponding directories</h2> <p>Next, you need to place the models in the appropriate directories in the Stable Diffusion WebUI:</p>