diff --git a/components/toTop/toTop.vue b/components/toTop/toTop.vue index 7811168..464041e 100644 --- a/components/toTop/toTop.vue +++ b/components/toTop/toTop.vue @@ -2,7 +2,7 @@ - + diff --git a/pages/ai/paint/paint.vue b/pages/ai/paint/paint.vue index 78a964c..e3b72f6 100644 --- a/pages/ai/paint/paint.vue +++ b/pages/ai/paint/paint.vue @@ -2,15 +2,19 @@ - - 绘画提示词 - - - - - 请输入提示词! - - + + + + 绘画关键词 + + + + + + + 请输入关键词! + + @@ -66,6 +70,64 @@ 请选择画布大小! + + + + 高级设置 + + + + + + + + 反向词 + + + + 种子(随机种子为-1) + + + + 生成数量 + + + + + 关键词相关性 + {{formData.sfgScale ?? 7}} + + + + + + 绘画步骤 + {{formData.steps ?? 20}} + + + + + + 差异强度 + {{formData.eta ?? 0}} + + + + + 采样方法 + + + + @@ -89,6 +151,13 @@ modelName: undefined, styleName: undefined, promptText: undefined, + negativePrompt: undefined, //反向词 + seed: -1, //种子 + batchSize: 1, //批量数量 + sfgScale: 7, //精细度 + steps: 20, //采样步骤 + eta: 0, //差异强度 + samplerIndex: "Euler a", //采样器 }, checkData:{ checkPrompt: undefined, //true填了内容;false未填内容 @@ -123,7 +192,29 @@ width: 512 } ], - } + advancedSetting: false, + samplerIndexArr: [ + {text:"Euler a", value:"Euler a"}, + {text:"Euler", value:"Euler"}, + {text:"LMS", value:"LMS"}, + {text:"Heun", value:"Heun"}, + {text:"DPM2", value:"DPM2"}, + {text:"DPM2 a", value:"DPM2 a"}, + {text:"DPM++ 2S a", value:"DPM++ 2S a"}, + {text:"DPM++ 2M", value:"DPM++ 2M"}, + {text:"DPM++ SDE", value:"DPM++ SDE"}, + {text:"DPM fast", value:"DPM fast"}, + {text:"DPM adaptive", value:"DPM adaptive"}, + {text:"LMS Karras", value:"LMS Karras"}, + {text:"DPM2 Karras", value:"DPM2 Karras"}, + {text:"DPM2 a Karras", value:"DPM2 a Karras"}, + {text:"DPM++ 2S a Karras", value:"DPM++ 2S a Karras"}, + {text:"DPM++ 2M Karras", value:"DPM++ 2M Karras"}, + {text:"DPM++ SDE Karras", value:"DPM++ SDE Karras"}, + {text:"DDIM", value:"DDIM"}, + {text:"PLMS", value:"PLMS"} + ], + } }, created() { //this.base64ToPath(); @@ -140,6 +231,15 @@ this.formData.modelName = undefined; this.formData.styleName = undefined; this.formData.promptText = undefined; + this.advancedSetting = false; + this.formData.sfgScale = undefined; + this.formData.negativePrompt = undefined; + this.formData.seed = -1; + this.formData.batchSize = 1; + this.formData.sfgScale = 7; + this.formData.steps = 20; + this.formData.eta = 0; + this.formData.samplerIndex = "Euler a"; this.size_active = 0; this.style_active = 0; this.prompt_active = 0; @@ -147,7 +247,18 @@ this.checkUserCanAiPaint(); }, methods: { - + openAdvancedSetting(e) { + //TODO 判断VIP + this.advancedSetting = e.detail.value; + this.formData.sfgScale = undefined; + this.formData.negativePrompt = undefined; + this.formData.seed = -1; + this.formData.batchSize = 1; + this.formData.sfgScale = 7; + this.formData.steps = 20; + this.formData.eta = 0; + this.formData.samplerIndex = `Euler a`; + }, //翻译 //判断是否登录 @@ -226,6 +337,13 @@ prompt: that.formData.promptText, modelName: that.formData.modelName, styleName: that.formData.styleName, + negativePrompt: that.formData.negativePrompt, //反向词 + seed: that.formData.seed, //种子 + batchSize: that.formData.batchSize, //批量数量 + sfgScale: that.formData.sfgScale, //精细度 + steps: that.formData.steps, //采样步骤 + eta: that.formData.eta, //差异强度 + samplerIndex: that.formData.samplerIndex, //采样器 painterId: that.userInfo.id, painterName: that.userInfo.username, appType: 0, @@ -394,10 +512,44 @@ padding: 0 10px; } -.title { - font-size: 28rpx; - line-height: 48rpx; + +.head { + display: flex; + flex-direction: row; + justify-content: space-between; + margin-bottom: 15rpx; + + .left { + display: flex; + flex-direction: row; + align-items: center; + + .title { + font-size: 28rpx; + + .tip-vip-icon { + margin-left: 20rpx; + } + } + } + + .right { + display: flex; + flex-direction: row; + align-items: center; + + .title { + margin-right: 15rpx; + font-size: 24rpx; + line-height: 48rpx; + color: $uni-primary; + } + .icon { + line-height: 48rpx; + } + } } + .size { width: 100%; @@ -425,78 +577,6 @@ } } - .head { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 15rpx; - - .left { - display: flex; - flex-direction: row; - align-items: center; - - - } - - .right { - display: flex; - flex-direction: row; - align-items: center; - - .title { - margin-right: 15rpx; - } - } - } - } - - .play { - width: 92%; - margin: 15rpx auto; - - .lists { - display: flex; - flex-direction: row; - - .item { - background-color: #FFDEE0; - padding: 10rpx 30rpx; - border-radius: 10rpx; - height: 30rpx; - color: #F22E38; - border: 1rpx solid #F22E38; - margin-bottom: 10rpx; - font-size: 24rpx; - } - } - - .head { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 30rpx; - - .left { - display: flex; - flex-direction: row; - align-items: center; - - .title { - font-size: 28rpx; - } - } - - .right { - display: flex; - flex-direction: row; - align-items: center; - - .title { - margin-right: 15rpx; - } - } - } } .style { @@ -526,32 +606,6 @@ } } - .head { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 20rpx; - - .left { - display: flex; - flex-direction: row; - align-items: center; - - .title { - font-size: 28rpx; - } - } - - .right { - display: flex; - flex-direction: row; - align-items: center; - - .title { - margin-right: 15rpx; - } - } - } } .keywords { @@ -586,90 +640,6 @@ } - .head { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 15rpx; - - .left { - display: flex; - flex-direction: row; - align-items: center; - - .title { - font-size: 28rpx; - } - } - - .right { - display: flex; - flex-direction: row; - align-items: center; - - .title { - margin-right: 15rpx; - font-size: 24rpx; - line-height: 48rpx; - color: $uni-primary; - } - .icon { - line-height: 48rpx; - } - } - } - } - - .btn-action { - width: 90%; - position: fixed; - bottom: 0rpx; - left: 4%; - height: 120rpx; - - .btn-group { - display: flex; - flex-direction: row; - justify-content: space-between; - - .rand { - width: 40%; - - .u-button { - height: 100rpx; - } - } - - .start { - width: 55%; - - .btn-normal { - height: 100rpx; - line-height: normal; - font-size: 28rpx; - border-radius: 50rpx; - background-color: #f22e38; - border: none; - color: #f4f4f5; - display: flex; - flex-direction: column; - justify-content: center; - box-shadow: 3rpx 3rpx 10rpx #dd6161; - - .title { - font-weight: bolder; - } - - .small { - font-size: 24rpx; - } - } - - .btn-normal::after { - border: initial; - } - } - } } .styleBox{ @@ -724,6 +694,46 @@ bottom: 0; } } + + .advanced-setting { + margin-top: 20rpx; + padding-bottom: 100rpx; + + .form-item { + + input { + color: rgb(51, 51, 51); + } + + .uni-input { + border: 2rpx solid $uni-border-1; + border-radius: 10rpx; + border-color: rgb(229, 229, 229); + font-size: 28rpx; + padding: 10rpx 20rpx; + } + + .form-label { + font-size: 28rpx; + margin: 10rpx 0; + line-height: 38rpx; + + } + + .display-flex-sb { + display: flex; + justify-content: space-between; + + .right-title { + color: $uni-primary; + } + + } + + } + + } + .bottom { width: calc(100% - 40rpx); position: fixed; diff --git a/pages/ai/paint/paintDetail.vue b/pages/ai/paint/paintDetail.vue index 890e7af..cb16705 100644 --- a/pages/ai/paint/paintDetail.vue +++ b/pages/ai/paint/paintDetail.vue @@ -1,5 +1,5 @@