diff --git a/api/test/test_test.go b/api/test/test_test.go new file mode 100644 index 00000000..88efd3c2 --- /dev/null +++ b/api/test/test_test.go @@ -0,0 +1,10 @@ +package test + +import ( + "fmt" + "testing" +) + +func Test(t *testing.T) { + fmt.Println("test") +} diff --git a/web/src/assets/iconfont/iconfont.css b/web/src/assets/iconfont/iconfont.css index f7f73129..b9a0d9e8 100644 --- a/web/src/assets/iconfont/iconfont.css +++ b/web/src/assets/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4125778 */ - src: url('iconfont.woff2?t=1756954977612') format('woff2'), - url('iconfont.woff?t=1756954977612') format('woff'), - url('iconfont.ttf?t=1756954977612') format('truetype'); + src: url('iconfont.woff2?t=1757465848673') format('woff2'), + url('iconfont.woff?t=1757465848673') format('woff'), + url('iconfont.ttf?t=1757465848673') format('truetype'); } .iconfont { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-action:before { + content: "\e658"; +} + +.icon-dancing:before { + content: "\e659"; +} + +.icon-running:before { + content: "\e65e"; +} + +.icon-shuziren:before { + content: "\e6df"; +} + .icon-cube:before { content: "\e72c"; } diff --git a/web/src/assets/iconfont/iconfont.js b/web/src/assets/iconfont/iconfont.js index f93ed5a1..563edbcb 100644 --- a/web/src/assets/iconfont/iconfont.js +++ b/web/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4125778='',(a=>{var l=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var h,t,i,o,z,m=function(l,c){c.parentNode.insertBefore(l,c)};if(l&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,c=document.createElement("div");c.innerHTML=a._iconfont_svg_string_4125778,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?m(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),h()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=h,o=a.document,z=!1,v(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,p())})}function p(){z||(z=!0,i())}function v(){try{o.documentElement.doScroll("left")}catch(l){return void setTimeout(v,50)}p()}})(window); \ No newline at end of file +window._iconfont_svg_string_4125778='',(a=>{var l=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var h,t,i,o,z,m=function(l,c){c.parentNode.insertBefore(l,c)};if(l&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,c=document.createElement("div");c.innerHTML=a._iconfont_svg_string_4125778,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?m(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),h()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=h,o=a.document,z=!1,v(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,p())})}function p(){z||(z=!0,i())}function v(){try{o.documentElement.doScroll("left")}catch(l){return void setTimeout(v,50)}p()}})(window); \ No newline at end of file diff --git a/web/src/assets/iconfont/iconfont.json b/web/src/assets/iconfont/iconfont.json index d3660737..98b2f5f5 100644 --- a/web/src/assets/iconfont/iconfont.json +++ b/web/src/assets/iconfont/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "5215282", + "name": "动作", + "font_class": "action", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "7250581", + "name": "跳舞", + "font_class": "dancing", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "8153037", + "name": "动作", + "font_class": "running", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "42680536", + "name": "数字人", + "font_class": "shuziren", + "unicode": "e6df", + "unicode_decimal": 59103 + }, { "icon_id": "544492", "name": "cube", diff --git a/web/src/assets/iconfont/iconfont.ttf b/web/src/assets/iconfont/iconfont.ttf index 2be98cba..d7f3fb58 100644 Binary files a/web/src/assets/iconfont/iconfont.ttf and b/web/src/assets/iconfont/iconfont.ttf differ diff --git a/web/src/assets/iconfont/iconfont.woff b/web/src/assets/iconfont/iconfont.woff index ff153c0d..08e5884d 100644 Binary files a/web/src/assets/iconfont/iconfont.woff and b/web/src/assets/iconfont/iconfont.woff differ diff --git a/web/src/assets/iconfont/iconfont.woff2 b/web/src/assets/iconfont/iconfont.woff2 index 474ebe33..7fe58757 100644 Binary files a/web/src/assets/iconfont/iconfont.woff2 and b/web/src/assets/iconfont/iconfont.woff2 differ diff --git a/web/src/assets/img/jimeng/central_orbit.webp b/web/src/assets/img/jimeng/central_orbit.webp new file mode 100644 index 00000000..f79fbbfb Binary files /dev/null and b/web/src/assets/img/jimeng/central_orbit.webp differ diff --git a/web/src/assets/img/jimeng/clockwise_swivel.webp b/web/src/assets/img/jimeng/clockwise_swivel.webp new file mode 100644 index 00000000..a4909cf1 Binary files /dev/null and b/web/src/assets/img/jimeng/clockwise_swivel.webp differ diff --git a/web/src/assets/img/jimeng/counterclockwise_swivel.webp b/web/src/assets/img/jimeng/counterclockwise_swivel.webp new file mode 100644 index 00000000..9d906b59 Binary files /dev/null and b/web/src/assets/img/jimeng/counterclockwise_swivel.webp differ diff --git a/web/src/assets/img/jimeng/crane_push.webp b/web/src/assets/img/jimeng/crane_push.webp new file mode 100644 index 00000000..191c0fac Binary files /dev/null and b/web/src/assets/img/jimeng/crane_push.webp differ diff --git a/web/src/assets/img/jimeng/dynamic_orbit.webp b/web/src/assets/img/jimeng/dynamic_orbit.webp new file mode 100644 index 00000000..b1ea633e Binary files /dev/null and b/web/src/assets/img/jimeng/dynamic_orbit.webp differ diff --git a/web/src/assets/img/jimeng/handheld.webp b/web/src/assets/img/jimeng/handheld.webp new file mode 100644 index 00000000..07eeaaf8 Binary files /dev/null and b/web/src/assets/img/jimeng/handheld.webp differ diff --git a/web/src/assets/img/jimeng/hitchcock_dolly_in.webp b/web/src/assets/img/jimeng/hitchcock_dolly_in.webp new file mode 100644 index 00000000..0788c08a Binary files /dev/null and b/web/src/assets/img/jimeng/hitchcock_dolly_in.webp differ diff --git a/web/src/assets/img/jimeng/hitchcock_dolly_out.webp b/web/src/assets/img/jimeng/hitchcock_dolly_out.webp new file mode 100644 index 00000000..f9b62e5c Binary files /dev/null and b/web/src/assets/img/jimeng/hitchcock_dolly_out.webp differ diff --git a/web/src/assets/img/jimeng/quick_pull_back.webp b/web/src/assets/img/jimeng/quick_pull_back.webp new file mode 100644 index 00000000..fc6a9e05 Binary files /dev/null and b/web/src/assets/img/jimeng/quick_pull_back.webp differ diff --git a/web/src/assets/img/jimeng/rapid_push_pull.webp b/web/src/assets/img/jimeng/rapid_push_pull.webp new file mode 100644 index 00000000..101ad199 Binary files /dev/null and b/web/src/assets/img/jimeng/rapid_push_pull.webp differ diff --git a/web/src/assets/img/jimeng/robo_arm.webp b/web/src/assets/img/jimeng/robo_arm.webp new file mode 100644 index 00000000..347a2e99 Binary files /dev/null and b/web/src/assets/img/jimeng/robo_arm.webp differ diff --git a/web/src/assets/img/model-version.png b/web/src/assets/img/model-version.png new file mode 100644 index 00000000..f3f59153 Binary files /dev/null and b/web/src/assets/img/model-version.png differ diff --git a/web/src/components/AccountBg.vue b/web/src/components/AccountBg.vue deleted file mode 100644 index 282a14e5..00000000 --- a/web/src/components/AccountBg.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/web/src/components/AccountTop.vue b/web/src/components/AccountTop.vue deleted file mode 100644 index 2f2127a2..00000000 --- a/web/src/components/AccountTop.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/web/src/components/ImageUpload.vue b/web/src/components/ImageUpload.vue index c73d44ff..21c19343 100644 --- a/web/src/components/ImageUpload.vue +++ b/web/src/components/ImageUpload.vue @@ -145,7 +145,7 @@ const imageList = computed({ if (props.multiple || props.maxCount > 1) { return Array.isArray(props.modelValue) ? props.modelValue : [] } else { - return props.modelValue ? [props.modelValue] : [] + return props.modelValue && props.modelValue.length > 0 ? [props.modelValue] : [] } }, set(value) { diff --git a/web/src/components/ParamBuilder.vue b/web/src/components/ParamBuilder.vue new file mode 100644 index 00000000..7d74e64c --- /dev/null +++ b/web/src/components/ParamBuilder.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/web/src/components/admin/AdminSidebar.vue b/web/src/components/admin/AdminSidebar.vue index ad0f6830..18f4d3e4 100644 --- a/web/src/components/admin/AdminSidebar.vue +++ b/web/src/components/admin/AdminSidebar.vue @@ -279,7 +279,7 @@ const items = [ { icon: 'xmind', index: '/admin/config/markmap', - title: '思维导图配置', + title: '思维导图', }, ], }, diff --git a/web/src/components/ui/ParamEmpty.vue b/web/src/components/ui/ParamEmpty.vue new file mode 100644 index 00000000..c80ad68e --- /dev/null +++ b/web/src/components/ui/ParamEmpty.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/web/src/store/data/jimeng_data.js b/web/src/store/data.js similarity index 62% rename from web/src/store/data/jimeng_data.js rename to web/src/store/data.js index 64558cf2..89370cb6 100644 --- a/web/src/store/data/jimeng_data.js +++ b/web/src/store/data.js @@ -1,4 +1,16 @@ -export const paramsMap = { +import central_orbit from '@/assets/img/jimeng/central_orbit.webp' +import clockwise_swivel from '@/assets/img/jimeng/clockwise_swivel.webp' +import counterclockwise_swivel from '@/assets/img/jimeng/counterclockwise_swivel.webp' +import crane_push from '@/assets/img/jimeng/crane_push.webp' +import dynamic_orbit from '@/assets/img/jimeng/dynamic_orbit.webp' +import handheld from '@/assets/img/jimeng/handheld.webp' +import hitchcock_dolly_in from '@/assets/img/jimeng/hitchcock_dolly_in.webp' +import hitchcock_dolly_out from '@/assets/img/jimeng/hitchcock_dolly_out.webp' +import quick_pull_back from '@/assets/img/jimeng/quick_pull_back.webp' +import rapid_push_pull from '@/assets/img/jimeng/rapid_push_pull.webp' +import robo_arm from '@/assets/img/jimeng/robo_arm.webp' + +export const JimengParams = { image: [ { name: '图片 2.1 文生图', @@ -9,11 +21,15 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成图像的提示词 ,中英文均可输入', }, + { name: 'size', type: 'select', @@ -57,8 +73,8 @@ export const paramsMap = { }, { name: 'use_pre_llm', - type: 'boolean', - required: true, + type: 'switch', + required: false, label: '开启文本扩写', info: '开启后,系统会自动扩写提示词,提高生成质量', value: true, @@ -74,7 +90,10 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成图像的提示词 ,中英文均可输入', @@ -131,10 +150,11 @@ export const paramsMap = { }, { name: 'use_pre_llm', - type: 'boolean', + type: 'switch', required: true, label: '开启文本扩写', info: '开启后,系统会自动扩写提示词,提高生成质量', + value: true, }, ], }, @@ -147,7 +167,10 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成图像的提示词 ,中英文均可输入', @@ -204,10 +227,11 @@ export const paramsMap = { }, { name: 'use_pre_llm', - type: 'boolean', + type: 'switch', required: true, label: '开启文本扩写', info: '开启后,系统会自动扩写提示词,提高生成质量', + value: true, }, ], }, @@ -221,8 +245,81 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', required: true, + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, + placeholder: '请输入用于编辑图像的提示词,如:把xxx改成xxx,删除xxx,添加xxx等', + info: '建议长度<=120字符,最长不超过800字符', + }, + { + name: 'image_urls', + label: '参考图片', + type: 'image', + required: true, + placeholder: '请上传图片', + maxSize: 5, + accept: '.png,.jpg,.jpeg', + info: '长边与短边比例在3以内,超出此比例或比例相对极端,会导致报错。', + }, + { + name: 'scale', + label: '文本描述影响的程度', + type: 'slider', + min: 0, + max: 1, + step: 0.1, + value: 0.5, + info: '该值越大代表文本描述影响程度越大,且输入图片影响程度越小', + }, + { + name: 'size', + type: 'select', + required: true, + placeholder: '请选择尺寸', + label: '图片尺寸', + + options: [ + { + label: '1:1 (1328 * 1328)', + value: '1328x1328', + }, + { + label: '4:3 (1472 * 1104)', + value: '1472x1104', + }, + { + label: '3:2 (1584 * 1056)', + value: '1584x1056', + }, + { + label: '16:9 (1664 * 936)', + value: '1664x936', + }, + { + label: '21:9 (2016 * 864)', + value: '2016x864', + }, + ], + }, + ], + }, + { + name: '图片 4.0 文/图生图', + version: '4.0', + label: + '支持文本、单图和多图输入,实现基于主体一致性的多图融合创作、图像编辑、组图生成等多样玩法', + key: 'jimeng_i2i_v30', + params: [ + { + name: 'prompt', + label: '提示词', + type: 'textarea', + required: true, + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, placeholder: '请输入用于编辑图像的提示词,如:把xxx改成xxx,删除xxx,添加xxx等', info: '建议长度<=120字符,最长不超过800字符', }, @@ -289,7 +386,10 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成视频的提示词 ,中英文均可输入', @@ -354,7 +454,10 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成视频的提示词 ,中英文均可输入', @@ -364,7 +467,6 @@ export const paramsMap = { label: '首帧图片', type: 'image', required: false, - placeholder: '请上传图片', multiple: false, maxCount: 1, maxSize: 5, @@ -397,21 +499,24 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成视频的提示词 ,中英文均可输入', }, { name: 'image_urls', - label: '首帧图片', + label: '首尾帧图片', type: 'image', required: false, - placeholder: '请上传图片', multiple: true, maxCount: 2, maxSize: 5, accept: '.png,.jpg,.jpeg', + info: '请上传两张图片,第一张为起始帧,第二张为尾帧', }, { name: 'duration', @@ -440,7 +545,10 @@ export const paramsMap = { { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成视频的提示词 ,中英文均可输入', @@ -452,7 +560,7 @@ export const paramsMap = { required: false, placeholder: '请上传图片', maxSize: 5, - multiple: false, + multiple: true, maxCount: 1, accept: '.png,.jpg,.jpeg', }, @@ -460,60 +568,73 @@ export const paramsMap = { name: 'template_id', label: '运镜控制', type: 'select', - required: false, + required: true, placeholder: '请选择运镜控制', + popperClass: 'model-select', options: [ { label: '希区柯克推进', value: 'hitchcock_dolly_in', + image: hitchcock_dolly_in, }, { label: '希区柯克拉远', value: 'hitchcock_dolly_out', + image: hitchcock_dolly_out, }, { label: '机械臂', value: 'robo_arm', + image: robo_arm, }, { label: '动感环绕', value: 'dynamic_orbit', + image: dynamic_orbit, }, { label: '中心环绕', value: 'central_orbit', + image: central_orbit, }, { label: '起重机', value: 'crane_push', + image: crane_push, }, { label: '超级拉远', value: 'quick_pull_back', + image: quick_pull_back, }, { label: '逆时针回旋', value: 'counterclockwise_swivel', + image: counterclockwise_swivel, }, { label: '顺时针回旋', value: 'clockwise_swivel', + image: clockwise_swivel, }, { label: '手持运镜', value: 'handheld', + image: handheld, }, { label: '快速推拉', value: 'rapid_push_pull', + image: rapid_push_pull, }, ], + value: 'hitchcock_dolly_in', }, { name: 'camera_strength', label: '运镜强度', type: 'select', - required: false, + required: true, placeholder: '请选择运镜强度', options: [ { @@ -529,6 +650,76 @@ export const paramsMap = { value: 'strong', }, ], + value: 'medium', + }, + { + name: 'duration', + type: 'select', + label: '视频时长', + options: [ + { + label: '5秒', + value: '5', + }, + { + label: '10秒', + value: '10', + }, + ], + value: '5', + }, + ], + }, + + { + name: '视频 3.0 1080P-文生视频', + version: '3.0', + label: '视觉表达流畅一致,支持1080P高清渲染', + key: 'jimeng_t2v_v30_1080p', + params: [ + { + name: 'prompt', + label: '提示词', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, + required: true, + placeholder: '请输入提示词', + info: '用于生成视频的提示词 ,中英文均可输入', + }, + { + name: 'aspect_ratio', + label: '视频比例', + type: 'select', + required: false, + placeholder: '请选择视频比例', + options: [ + { + label: '16:9 (横版)', + value: '16:9', + }, + { + label: '4:3 (标准)', + value: '4:3', + }, + { + label: '1:1 (正方形)', + value: '1:1', + }, + { + label: '3:4 (竖版)', + value: '3:4', + }, + { + label: '9:16 (竖屏)', + value: '9:16', + }, + { + label: '21:9 (超宽)', + value: '21:9', + }, + ], }, { name: 'duration', @@ -549,15 +740,109 @@ export const paramsMap = { }, { - name: '视频 3.0Pro 图生视频', + name: '视频 3.0 1080P-图生视频-首帧', version: '3.0', - label: '根据提示词 + 首帧图片生成视频', - key: 'jimeng_ti2v_v30_pro', + label: '根据提示词 + 首帧图片生成1080P视频', + key: 'jimeng_i2v_first_v30_1080', params: [ { name: 'prompt', label: '提示词', - type: 'text', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, + required: true, + placeholder: '请输入提示词', + info: '用于生成视频的提示词 ,中英文均可输入', + }, + { + name: 'image_urls', + label: '首帧图片', + type: 'image', + required: false, + multiple: false, + maxCount: 1, + maxSize: 5, + accept: '.png,.jpg,.jpeg', + }, + { + name: 'duration', + type: 'select', + label: '视频时长', + options: [ + { + label: '5秒', + value: '5', + }, + { + label: '10秒', + value: '10', + }, + ], + }, + ], + }, + + { + name: '视频 3.0 1080P-图生视频-首尾帧', + version: '3.0', + label: '根据提示词 + 首尾帧图片生成1080P视频', + key: 'jimeng_i2v_first_tail_v30_1080', + params: [ + { + name: 'prompt', + label: '提示词', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, + required: true, + placeholder: '请输入提示词', + info: '用于生成视频的提示词 ,中英文均可输入', + }, + { + name: 'image_urls', + label: '首尾帧图片', + type: 'image', + required: false, + multiple: true, + maxCount: 2, + maxSize: 5, + accept: '.png,.jpg,.jpeg', + info: '请上传两张图片,第一张为起始帧,第二张为尾帧', + }, + { + name: 'duration', + type: 'select', + label: '视频时长', + options: [ + { + label: '5秒', + value: '5', + }, + { + label: '10秒', + value: '10', + }, + ], + }, + ], + }, + + { + name: '视频 3.0Pro 1080P-图生视频', + version: '3.0', + label: '根据提示词 + 首帧图片生成1080P视频', + key: 'jimeng_ti2v_v30_pro', + params: [ + { + name: 'prompt', + label: '提示词', + type: 'textarea', + showWordLimit: true, + maxlength: 800, + autosize: { minRows: 3, maxRows: 5 }, required: true, placeholder: '请输入提示词', info: '用于生成视频的提示词 ,中英文均可输入', @@ -567,7 +852,6 @@ export const paramsMap = { label: '首帧图片', type: 'image', required: false, - placeholder: '请上传图片', info: '只支持上传首帧图片', multiple: false, maxCount: 1, @@ -623,6 +907,7 @@ export const paramsMap = { value: '10', }, ], + value: '5', }, ], }, @@ -630,3 +915,26 @@ export const paramsMap = { virtualHuman: [], actionTransfer: [], } + +export const JimengFunctions = [ + { + key: 'image', + icon: 'iconfont icon-image', + name: '图片生成', + }, + { + key: 'video', + icon: 'icon-video', + name: '视频生成', + }, + { + key: 'virtualHuman', + icon: 'icon-shuziren', + name: '数字人', + }, + { + key: 'actionTransfer', + icon: 'icon-action', + name: '动作模仿', + }, +] diff --git a/web/src/store/jimeng.js b/web/src/store/jimeng.js index f26665a0..fc10cd8e 100644 --- a/web/src/store/jimeng.js +++ b/web/src/store/jimeng.js @@ -6,6 +6,7 @@ // * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ import { checkSession } from '@/store/cache' +import { JimengParams } from '@/store/data' import { useSharedStore } from '@/store/sharedata' import { showMessageError, showMessageOK } from '@/utils/dialog' import { httpDownload, httpGet, httpPost } from '@/utils/http' @@ -44,224 +45,7 @@ export const useJimengStore = defineStore('jimeng', () => { // 登录弹窗 const shareStore = useSharedStore() - const paramsMap = { - image: [ - { - name: '图片 2.1', - version: '2.1', - label: '平面绘感强,可生成文字海报', - key: 'jimeng_high_aes_general_v21_L', - params: [ - { - name: 'prompt', - label: '提示词', - type: 'text', - required: true, - placeholder: '请输入提示词', - info: '用于生成图像的提示词 ,中英文均可输入', - }, - { - name: 'size', - type: 'select', - required: true, - placeholder: '请选择尺寸', - label: '图片尺寸', - options: [ - { - label: '21:9 (1195x512)', - value: '1195x512', - }, - { - label: '16:9 (1024x576)', - value: '1024x576', - }, - { - label: '3:2 (1024x682)', - value: '1024x682', - }, - { - label: '4:3 (1024x768)', - value: '1024x768', - }, - { - label: '1:1 (1024x1024)', - value: '1024x1024', - }, - { - label: '3:4 (768x1024)', - value: '768x1024', - }, - { - label: '2:3 (682x1024)', - value: '682x1024', - }, - { - label: '9:16 (576x1024)', - value: '576x1024', - }, - ], - }, - { - name: 'use_pre_llm', - type: 'boolean', - required: true, - label: '开启文本扩写', - info: '开启后,系统会自动扩写提示词,提高生成质量', - value: true, - }, - ], - }, - { - name: '图片 3.0 文生图', - version: '3.0', - label: '影视质感,文字更准,直出2k高清图', - key: 'jimeng_t2i_v30', - params: [ - { - name: 'prompt', - label: '提示词', - type: 'text', - required: true, - placeholder: '请输入提示词', - info: '用于生成图像的提示词 ,中英文均可输入', - }, - { - name: 'size', - type: 'select', - required: true, - placeholder: '请选择尺寸', - label: '图片尺寸', - - options: [ - { - label: '1:1 (1328x1328)', - value: '1328x1328', - }, - { - label: '4:3 (1472x1104)', - value: '1472x1104', - }, - { - label: '3:2 (1584x1056)', - value: '1584x1056', - }, - { - label: '16:9 (1664x936)', - value: '1664x936', - }, - { - label: '21:9 (2016x864)', - value: '2016x864', - }, - { - label: '1:1 高清2K (2048x2048)', - value: '2048x2048', - }, - { - label: '4:3 高清2K (2304x1728)', - value: '2304x1728', - }, - { - label: '3:2 高清2K (2496x1664)', - value: '2496x1664', - }, - { - label: '16:9 高清2K (2560x1440)', - value: '2560x1440', - }, - { - label: '21:9 高清2K (3024x1296)', - value: '3024x1296', - }, - ], - }, - { - name: 'use_pre_llm', - type: 'boolean', - required: true, - label: '开启文本扩写', - info: '开启后,系统会自动扩写提示词,提高生成质量', - }, - ], - }, - { - name: '图片 3.1', - version: '3.1', - label: '文生图3.0', - key: 'jimeng_t2i_v31', - params: [ - { - name: 'prompt', - label: '提示词', - type: 'text', - required: true, - placeholder: '请输入提示词', - info: '用于生成图像的提示词 ,中英文均可输入', - }, - { - name: 'size', - type: 'select', - required: true, - placeholder: '请选择尺寸', - label: '图片尺寸', - - options: [ - { - label: '1:1 (1328x1328)', - value: '1328x1328', - }, - { - label: '4:3 (1472x1104)', - value: '1472x1104', - }, - { - label: '3:2 (1584x1056)', - value: '1584x1056', - }, - { - label: '16:9 (1664x936)', - value: '1664x936', - }, - { - label: '21:9 (2016x864)', - value: '2016x864', - }, - { - label: '1:1 高清2K (2048x2048)', - value: '2048x2048', - }, - { - label: '4:3 高清2K (2304x1728)', - value: '2304x1728', - }, - { - label: '3:2 高清2K (2496x1664)', - value: '2496x1664', - }, - { - label: '16:9 高清2K (2560x1440)', - value: '2560x1440', - }, - { - label: '21:9 高清2K (3024x1296)', - value: '3024x1296', - }, - ], - }, - { - name: 'use_pre_llm', - type: 'boolean', - required: true, - label: '开启文本扩写', - info: '开启后,系统会自动扩写提示词,提高生成质量', - }, - ], - }, - ], - video: [], - virtualHuman: [], - actionTransfer: [], - } + const paramsMap = JimengParams // 功能分类配置 const categories = [ diff --git a/web/src/views/admin/settings/PrivacyConfig.vue b/web/src/views/admin/settings/PrivacyConfig.vue index 239bf69e..9f5ec318 100644 --- a/web/src/views/admin/settings/PrivacyConfig.vue +++ b/web/src/views/admin/settings/PrivacyConfig.vue @@ -1,6 +1,6 @@