From 20054b28c3dd33bc19cd396f8f97c19197ae5e9c Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 10 Jul 2024 18:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91ai=20?= =?UTF-8?q?=E4=BD=9C=E5=9B=BE=20other=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/image/index/components/other/index.vue | 295 ++++++++++++++++++ src/views/ai/image/index/index.vue | 12 + src/views/ai/utils/constants.ts | 74 ++++- 3 files changed, 380 insertions(+), 1 deletion(-) create mode 100644 src/views/ai/image/index/components/other/index.vue diff --git a/src/views/ai/image/index/components/other/index.vue b/src/views/ai/image/index/components/other/index.vue new file mode 100644 index 00000000..7a01fe7e --- /dev/null +++ b/src/views/ai/image/index/components/other/index.vue @@ -0,0 +1,295 @@ + + + + diff --git a/src/views/ai/image/index/index.vue b/src/views/ai/image/index/index.vue index a2207be8..16732707 100644 --- a/src/views/ai/image/index/index.vue +++ b/src/views/ai/image/index/index.vue @@ -18,6 +18,12 @@ ref="stableDiffusionRef" @on-draw-complete="handleDrawComplete" /> + +
@@ -33,11 +39,13 @@ import { ImageVO } from '@/api/ai/image' import Dall3 from './components/dall3/index.vue' import Midjourney from './components/midjourney/index.vue' import StableDiffusion from './components/stableDiffusion/index.vue' +import Other from './components/other/index.vue' const imageListRef = ref() // image 列表 ref const dall3Ref = ref() // dall3(openai) ref const midjourneyRef = ref() // midjourney ref const stableDiffusionRef = ref() // stable diffusion ref +const otherRef = ref() // stable diffusion ref // 定义属性 const selectPlatform = ref(AiPlatformEnum.MIDJOURNEY) @@ -53,6 +61,10 @@ const platformOptions = [ { label: 'Stable Diffusion', value: AiPlatformEnum.STABLE_DIFFUSION + }, + { + label: '其他', + value: 'other' } ] diff --git a/src/views/ai/utils/constants.ts b/src/views/ai/utils/constants.ts index 3fadb8bb..cef92964 100644 --- a/src/views/ai/utils/constants.ts +++ b/src/views/ai/utils/constants.ts @@ -20,9 +20,23 @@ export const AiPlatformEnum = { Ollama: 'Ollama', STABLE_DIFFUSION: 'StableDiffusion', // Stability AI MIDJOURNEY: 'Midjourney', // Midjourney - SUNO: 'Suno' // Suno AI + SUNO: 'Suno', // Suno AI + TONG_YI_WAN_XIANG: 'TongYiWanXiang', //// 通义万相 + YI_YAN_IMAGE: 'YiYanImage' //// 百度 image } +export const OtherPlatformEnum:ImageModelVO [] = [ + { + key: AiPlatformEnum.TONG_YI_WAN_XIANG, + name: '通义万相' + }, + { + key: AiPlatformEnum.YI_YAN_IMAGE, + name: '百度图片' + } +] + + /** * AI 图像生成状态的枚举 */ @@ -189,6 +203,64 @@ export const StableDiffusionStylePresets: ImageModelVO[] = [ } ] +export const TongYiWanXiangStylePresets: ImageModelVO[] = [ + { + key: '-1', + name: '上传图像风格' + }, + { + key: '0', + name: '复古漫画' + }, + { + key: '1', + name: '3D童话' + }, + { + key: '2', + name: '二次元' + }, + { + key: '3', + name: '小清新' + }, + { + key: '4', + name: '未来科技' + }, + { + key: '5', + name: '国画古风' + }, + { + key: '6', + name: '将军百战' + }, + { + key: '7', + name: '炫彩卡通' + }, + { + key: '8', + name: '清雅国风' + }, + { + key: '9', + name: '喜迎新年' + } +] + +export const TongYiWanXiangModels: ImageModelVO[] = [ + { + key: 'wanx-v1', + name: 'wanx-v1' + }, + { + key: 'wanx-sketch-to-image-v1', + name: 'wanx-sketch-to-image-v1' + } +] + export const StableDiffusionClipGuidancePresets: ImageModelVO[] = [ { key: 'NONE',