From dd76cc581cc419da02ee636082bed2ed9491f61b Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 11 Jul 2024 16:54:06 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91ai=20im?= =?UTF-8?q?age=20=E5=A2=9E=E5=8A=A0=E5=8D=83=E5=B8=86=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/image/index/components/other/index.vue | 7 +++++-- src/views/ai/utils/constants.ts | 10 +++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/ai/image/index/components/other/index.vue b/src/views/ai/image/index/components/other/index.vue index 375c15b6..861a1563 100644 --- a/src/views/ai/image/index/components/other/index.vue +++ b/src/views/ai/image/index/components/other/index.vue @@ -83,6 +83,7 @@ import { ImageHotWords, ImageModelVO, OtherPlatformEnum, + QianFanModels, TongYiWanXiangModels } from '@/views/ai/utils/constants' @@ -96,7 +97,7 @@ const prompt = ref('') // 提示词 const width = ref(512) // 图片宽度 const height = ref(512) // 图片高度 const otherPlatform = ref(AiPlatformEnum.TONG_YI) // 平台 -const models = ref(TongYiWanXiangModels) // 模型 +const models = ref(TongYiWanXiangModels) // 模型 TongYiWanXiangModels、QianFanModels const model = ref(models.value[0].key) // 模型 @@ -154,8 +155,10 @@ const settingValues = async (detail: ImageVO) => { /** 平台切换 */ const handlerPlatformChange = async (platform) => { // 切换平台,切换模型、风格 - if (AiPlatformEnum.YI_YAN === platform) { + if (AiPlatformEnum.TONG_YI === platform) { models.value = TongYiWanXiangModels + } else if (AiPlatformEnum.YI_YAN === platform) { + models.value = QianFanModels } else { models.value = [] } diff --git a/src/views/ai/utils/constants.ts b/src/views/ai/utils/constants.ts index 0a88775b..d33493e2 100644 --- a/src/views/ai/utils/constants.ts +++ b/src/views/ai/utils/constants.ts @@ -30,7 +30,7 @@ export const OtherPlatformEnum:ImageModelVO [] = [ }, { key: AiPlatformEnum.YI_YAN, - name: '百度图片' + name: '百度千帆' } ] @@ -259,6 +259,14 @@ export const TongYiWanXiangModels: ImageModelVO[] = [ } ] +export const QianFanModels: ImageModelVO[] = [ + { + key: 'sd_xl', + name: 'sd_xl' + } +] + + export const StableDiffusionClipGuidancePresets: ImageModelVO[] = [ { key: 'NONE', From bb17651915655f16d4ce116d70aa4cee7eb8a199 Mon Sep 17 00:00:00 2001 From: hhhero Date: Fri, 12 Jul 2024 01:39:53 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96]AI:?= =?UTF-8?q?=20=E5=86=99=E4=BD=9C=E6=9B=B4=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/writer/index/components/Left.vue | 30 +++++++------- .../ai/writer/index/components/Right.vue | 41 +++++++++++++------ src/views/ai/writer/index/index.vue | 3 +- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/views/ai/writer/index/components/Left.vue b/src/views/ai/writer/index/components/Left.vue index 7f63d68e..6598bcb1 100644 --- a/src/views/ai/writer/index/components/Left.vue +++ b/src/views/ai/writer/index/components/Left.vue @@ -24,26 +24,28 @@ -
+
-
+
- +
+ +