Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dd76cc58
authored
Jul 11, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】ai image 增加千帆模型
parent
93362805
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
src/views/ai/image/index/components/other/index.vue
+5
-2
src/views/ai/utils/constants.ts
+9
-1
No files found.
src/views/ai/image/index/components/other/index.vue
View file @
dd76cc58
...
@@ -83,6 +83,7 @@ import {
...
@@ -83,6 +83,7 @@ import {
ImageHotWords
,
ImageHotWords
,
ImageModelVO
,
ImageModelVO
,
OtherPlatformEnum
,
OtherPlatformEnum
,
QianFanModels
,
TongYiWanXiangModels
TongYiWanXiangModels
}
from
'@/views/ai/utils/constants'
}
from
'@/views/ai/utils/constants'
...
@@ -96,7 +97,7 @@ const prompt = ref<string>('') // 提示词
...
@@ -96,7 +97,7 @@ const prompt = ref<string>('') // 提示词
const
width
=
ref
<
number
>
(
512
)
// 图片宽度
const
width
=
ref
<
number
>
(
512
)
// 图片宽度
const
height
=
ref
<
number
>
(
512
)
// 图片高度
const
height
=
ref
<
number
>
(
512
)
// 图片高度
const
otherPlatform
=
ref
<
string
>
(
AiPlatformEnum
.
TONG_YI
)
// 平台
const
otherPlatform
=
ref
<
string
>
(
AiPlatformEnum
.
TONG_YI
)
// 平台
const
models
=
ref
<
ImageModelVO
[]
>
(
TongYiWanXiangModels
)
// 模型
const
models
=
ref
<
ImageModelVO
[]
>
(
TongYiWanXiangModels
)
// 模型
TongYiWanXiangModels、QianFanModels
const
model
=
ref
<
string
>
(
models
.
value
[
0
].
key
)
// 模型
const
model
=
ref
<
string
>
(
models
.
value
[
0
].
key
)
// 模型
...
@@ -154,8 +155,10 @@ const settingValues = async (detail: ImageVO) => {
...
@@ -154,8 +155,10 @@ const settingValues = async (detail: ImageVO) => {
/** 平台切换 */
/** 平台切换 */
const
handlerPlatformChange
=
async
(
platform
)
=>
{
const
handlerPlatformChange
=
async
(
platform
)
=>
{
// 切换平台,切换模型、风格
// 切换平台,切换模型、风格
if
(
AiPlatformEnum
.
YI_YAN
===
platform
)
{
if
(
AiPlatformEnum
.
TONG_YI
===
platform
)
{
models
.
value
=
TongYiWanXiangModels
models
.
value
=
TongYiWanXiangModels
}
else
if
(
AiPlatformEnum
.
YI_YAN
===
platform
)
{
models
.
value
=
QianFanModels
}
else
{
}
else
{
models
.
value
=
[]
models
.
value
=
[]
}
}
...
...
src/views/ai/utils/constants.ts
View file @
dd76cc58
...
@@ -30,7 +30,7 @@ export const OtherPlatformEnum:ImageModelVO [] = [
...
@@ -30,7 +30,7 @@ export const OtherPlatformEnum:ImageModelVO [] = [
},
},
{
{
key
:
AiPlatformEnum
.
YI_YAN
,
key
:
AiPlatformEnum
.
YI_YAN
,
name
:
'百度
图片
'
name
:
'百度
千帆
'
}
}
]
]
...
@@ -259,6 +259,14 @@ export const TongYiWanXiangModels: ImageModelVO[] = [
...
@@ -259,6 +259,14 @@ export const TongYiWanXiangModels: ImageModelVO[] = [
}
}
]
]
export
const
QianFanModels
:
ImageModelVO
[]
=
[
{
key
:
'sd_xl'
,
name
:
'sd_xl'
}
]
export
const
StableDiffusionClipGuidancePresets
:
ImageModelVO
[]
=
[
export
const
StableDiffusionClipGuidancePresets
:
ImageModelVO
[]
=
[
{
{
key
:
'NONE'
,
key
:
'NONE'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment