Skip to content

Commit

Permalink
2.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Jan 7, 2025
1 parent 316369e commit 33ca008
Show file tree
Hide file tree
Showing 9 changed files with 613 additions and 9 deletions.
4 changes: 4 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# 计划

# 2.23.2
- 😄 支持:Pixverse 模版特效
- 😄 支持:kling 支持 model 选型 `v1` `v1.5` `v1.6`

# 2.23.1
- 🐞 修复:Pixverse 时长支持8s 而非10s
- 😄 支持:Pixverse style风格
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatgpt-web-midjourney-proxy",
"version": "2.23.1",
"version": "2.23.2",
"private": false,
"description": "ChatGPT Web Midjourney Proxy",
"author": "Dooy <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "ChatGPT-MJ",
"version": "2.23.1"
"version": "2.23.2"
},
"tauri": {
"allowlist": {
Expand Down
1 change: 1 addition & 0 deletions src/api/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ export const openaiSetting= ( q:any,ms:MessageApiInjection )=>{
PIXVERSE_SERVER:url,



OPENAI_API_KEY:key,
MJ_API_SECRET:key,
SUNO_KEY:key,
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export default {
,pro:'高表现'
,needImg:'请传参考图才生效!'
,seed:'种子数字 1~2147483647'
,klingInfo:'说明: <li>1. 高表现是3.5倍的价格</li> <li>2. 10s是2倍的价格</li> <li>3. 尾帧必须有参考图片才生效</li>'
,klingInfo:'说明: <li>1. 高表现是3.5倍的价格</li> <li>2. 10s是2倍的价格</li> <li>3. 尾帧必须有参考图片才生效</li> <li>4. v1.5 v1.6的价格都是v1.0的2倍</li>'

,camera_type:'镜头'
,cnull:'智能匹配'
Expand Down
13 changes: 11 additions & 2 deletions src/views/kling/kgInputVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { homeStore } from '@/store';
import { klingFeed, klingFetch } from '@/api/kling';
import { t } from '@/locales';
const f= ref({prompt:'',negative_prompt:'',image:'',image_tail:'',aspect_ratio:'1:1',mode:'std', duration:'5'});
const f= ref({prompt:'',negative_prompt:'',image:'',image_tail:'',aspect_ratio:'1:1',mode:'std', duration:'5',model:'kling-v1-6'});
const st= ref({bili:0,isLoading:false,camera_type:''});
const fsRef= ref() ;
Expand All @@ -25,7 +25,11 @@ const durationOptions=[ {label:'5s',value:'5'},{label:'10s',value:'10'}]
const cameraOption=[ {label: t('mj.cnull'),value:''},{label: t('mj.down_back'),value:'down_back'}
,{label:t('mj.forward_up'),value:'forward_up'},{label:t('mj.right_turn_forward'),value:'right_turn_forward'},{label:t('mj.left_turn_forward'),value:'left_turn_forward'}
]
const mvOption= [
{label:'kling-v1-6',value: 'kling-v1-6'}
,{label:'kling-v1-5',value: 'kling-v1-5'}
,{label:'kling-v1',value: 'kling-v1'}
]
function selectFile(input:any){
// fsFile.value= input.target.files[0];
Expand Down Expand Up @@ -100,6 +104,11 @@ onMounted(() => {
</section>

<section class="mb-4 flex justify-between items-center" >
<div>{{ $t('mjset.model') }}</div>
<n-select v-model:value="f.model" size="small" :options="mvOption" class="!w-[70%]" />

</section>
<section class="mb-4 flex justify-between items-center" >
<div>{{ $t('mj.mode') }}</div>
<n-select v-model:value="f.mode" size="small" :options="modeOptions" class="!w-[70%]" />

Expand Down
541 changes: 541 additions & 0 deletions src/views/luma/pixEffact.json

Large diffs are not rendered by default.

55 changes: 51 additions & 4 deletions src/views/luma/pixInput.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { computed, onMounted, ref, watch } from 'vue';
import { useMessage,NButton,NInput,NTag,NSelect,NPopover,NSwitch } from 'naive-ui';
import { t } from '@/locales';
import { mlog, upImg } from '@/api';
import { homeStore } from '@/store';
import { getRandomInt } from '@/api/runwayml';
import { pixFeed, pixFetch } from '@/api/pixverse';
import { pixverseTask } from '@/api/pixverseStore';
import pixEffacts from "./pixEffact.json";
const vf=[{s:'width: 100%; height: 100%;',label:'1:1',value:'1:1'}
Expand Down Expand Up @@ -45,7 +46,7 @@ const qualityOption= [
const durationOptions=[ {label:t('mj.duration')+':5s',value:5},{label:t('mj.duration')+':8s',value:8}]
const f= ref({ style:null, prompt:'',quality:'360p',negative_prompt:'',image:'',image_tail:'',aspect_ratio:'1:1',model:'v3.5', duration:5,motion_mode:'normal'});
const f= ref({pe_index:-1, style:null, prompt:'',quality:'360p',negative_prompt:'',image:'',image_tail:'',aspect_ratio:'1:1',model:'v3.5', duration:5,motion_mode:'normal'});
const st= ref({isLoading:false});
const fsRef= ref() ;
const fsRef2= ref() ;
Expand All @@ -57,7 +58,8 @@ const clearInput = ()=>{
f.value.image_tail= '';
f.value.style=null
fsRef.value=''
fsRef2.value=''
fsRef2.value='';
f.value.pe_index= -1 ;
exItem.value= undefined
}
function selectFile(input:any){
Expand Down Expand Up @@ -103,6 +105,14 @@ const create= async()=>{
if(f.value.style){
obj={...obj,style:f.value.style}
}
if(f.value.pe_index>-1){
try {
let template_id= pixEffact.value[f.value.pe_index].template_id
obj={...obj, template_id}
} catch (error) {
}
}
try {
const d:any= await pixFetch('/generate' , obj )
mlog('img', d );
Expand All @@ -124,9 +134,18 @@ watch(()=>homeStore.myData.act, (n)=>{
onMounted(() => {
homeStore.setMyData({ms:ms})
});
const selecteffect = (i:number)=>{
f.value.pe_index= i ;
f.value.prompt= pixEffact.value[i].display_prompt
}
const pixEffact= computed(()=>{
return pixEffacts;
});
</script>
<template>
<div class="p-2">
Expand Down Expand Up @@ -181,6 +200,34 @@ onMounted(() => {
</div>
</div>

<div class="pt-2 flex justify-start items-end">
<div>
<NPopover trigger="hover">
<template #trigger>
<div class="h-[80px] w-[150px] relative overflow-hidden rounded-sm border border-gray-400/20 flex justify-center items-center cursor-pointer" >
<template v-if="f.pe_index>-1">
<img :src="pixEffact[f.pe_index].thumbnail_path" />
<div class="absolute top-1 right-1 text-white/75 text-[14px]" >{{pixEffact[f.pe_index].display_name }}</div>
</template>
<div class="text-center" v-else>{{ $t('mj.selecteff') }}</div>
</div>
</template>
<div class="w-[320px] h-[400px] overflow-y-auto overflow-hidden mx-[-4px]">
<div class="grid grid-cols-2 gap-2">
<div v-for="(item, index) in pixEffact" :key="index" >
<div class="relative overflow-hidden cursor-pointer " @click="selecteffect(index)">
<!-- <video class="h-[72px] w-full rounded-md object-cover" :src="item.video" :poster="item.poster"
autoplay loop playsinline ></video> -->
<img :src="item.thumbnail_path" />
<div class="absolute top-1 right-1 text-white/75 text-[14px]" >{{ item.display_name }}</div>
</div>
</div>
</div>
</div>
</NPopover>
</div>
</div>

<div v-if="exItem && exItem.data" class="pt-2">
<div class="flex justify-between items-center">
<div >
Expand Down
2 changes: 2 additions & 0 deletions src/views/mj/aiSetServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ watch(() => gptServerStore.myData.OPENAI_API_BASE_URL , (n)=>{
gptServerStore.myData.KLING_SERVER=n;
gptServerStore.myData.PIKA_SERVER=n;
gptServerStore.myData.PIXVERSE_SERVER=n;
gptServerStore.myData.UDIO_SERVER=n;
});
watch(() => gptServerStore.myData.OPENAI_API_KEY , (n)=>{
if(!gptServerStore.myData.IS_SET_SYNC) return ;
Expand All @@ -46,6 +47,7 @@ watch(() => gptServerStore.myData.OPENAI_API_KEY , (n)=>{
gptServerStore.myData.KLING_KEY=n;
gptServerStore.myData.PIKA_KEY=n;
gptServerStore.myData.PIXVERSE_KEY=n;
gptServerStore.myData.UDIO_KEY=n;
});
</script>
<template>
Expand Down

0 comments on commit 33ca008

Please sign in to comment.