+
*
@@ -155,6 +166,7 @@ export default {
user_img: "",
robot_img: "",
user_call_name: "xxx",
+ width: 512,
// api_url: 'https://inscode-ide.node.inscode.run:8000/v1',
// index_url: 'http://127.0.0.1:8000/search',
// index_name: 'datasea',
@@ -175,6 +187,9 @@ export default {
height: 512,
steps: 20,
sampler: 'DPM++ SDE Karras',
+ showMoreSetting: false,
+ default_prompt: '1girl, (ulzzang-6500:0.7), kpop idol, yae miko, detached sleeves, bare shoulders, pink hair, long hair, cleavage,japanese clothes,breast,best quality, (painting:1.5), (hair ornament:1.35), jewelry, purple eyes, earrings, breasts, torii, cherry blossoms, lantern light, depth of field, detailed face, face focus, ribbon_trim, (looking at viewer:1.25), nontraditional miko, shiny skin, long sleeves, smile, thick lips, game cg, east asian architecture, (blurry background:1.2), sitting, upper body ,',
+ negative_prompt: 'bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger',
}
},
methods: {
@@ -270,16 +285,23 @@ export default {
"user": "AI", "message": '', img: null, viewMode: 'image'
}
const query = this.prompt
+ const negative_prompt = this.negative_prompt
const _this = this
const messages = this.message
- messages.push({ "user": "User", "message": this.prompt })
+ messages.push({ "user": "User", "message": 'prompt:
' + this.prompt + (negative_prompt ? '
' + 'negative_prompt: ' + negative_prompt : '') })
messages.push(currentMsg)
this.loading = true
- this.prompt = ''
+ // this.prompt = ''
this.scrollBottom()
- SDApi.draw(this.config, query).then(res => {
+ const config = JSON.parse(JSON.stringify(this.config))
+ config.width = this.width
+ config.height = this.height
+ config.steps = this.steps
+ config.sampler = this.sampler
+
+ SDApi.draw(config, query, negative_prompt).then(res => {
_this.loading = false
_this.saveHistory()
diff --git a/src/js/sd.js b/src/js/sd.js
index 2bbc8a1ef74679cd42a7614f42db784f9d31d713..64e4fa0e696db933d6cae2560087983ffbda5912 100644
--- a/src/js/sd.js
+++ b/src/js/sd.js
@@ -1,13 +1,13 @@
import axios from "axios";
export default {
- draw (config, prompt) {
+ draw (config, prompt, negative_prompt) {
return new Promise(function(resolve,rejcet){
const data = {
prompt: prompt,
steps: config?.steps??20,
- negative_prompt: config?.negative_prompt??'nsfw bright lantern, brightness, (nipples:1.2), pussy, EasyNegative, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers, fewer fingers, strange fingers, bad hand, bare thighs,hand,bad finger',
+ negative_prompt: negative_prompt??'nsfw',
width: config?.width??512,
height: config?.height??512,
cfg_scale: config?.cfg_scale??6,