Skip to content

Commit

Permalink
2.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Jan 7, 2025
1 parent 9f10fdc commit d8b6812
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 22 deletions.
5 changes: 5 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# 计划

# 2.23.1
- 🐞 修复:Pixverse 时长支持8s 而非10s
- 😄 支持:Pixverse style风格
- 🐞 修复:suno 后端转发目录使用 `/suno `

# 2.22.10
- 😄 支持:视频模型 Pixverse
- 😄 支持:Pixverse 图片、前后帧、扩展
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.22.10",
"version": "2.23.1",
"private": false,
"description": "ChatGPT Web Midjourney Proxy",
"author": "Dooy <[email protected]>",
Expand Down
19 changes: 3 additions & 16 deletions service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FormData from 'form-data'
import axios from 'axios';
import AWS from 'aws-sdk';
import { v4 as uuidv4} from 'uuid';
import { viggleProxyFileDo,viggleProxy, lumaProxy, runwayProxy, ideoProxy, ideoProxyFileDo, klingProxy, pikaProxy, udioProxy, runwaymlProxy, pixverseProxy } from './myfun'
import { viggleProxyFileDo,viggleProxy, lumaProxy, runwayProxy, ideoProxy, ideoProxyFileDo, klingProxy, pikaProxy, udioProxy, runwaymlProxy, pixverseProxy, sunoProxy } from './myfun'


const app = express()
Expand Down Expand Up @@ -318,21 +318,8 @@ app.use('/openapi' ,authV2, turnstileCheck, proxy(API_BASE_URL, {
}));

//代理sunoApi 接口
app.use('/sunoapi' ,authV2, proxy(process.env.SUNO_SERVER?? API_BASE_URL, {
https: false, limit: '10mb',
proxyReqPathResolver: function (req) {
return req.originalUrl.replace('/sunoapi', '') // 将URL中的 `/openapi` 替换为空字符串
},
proxyReqOptDecorator: function (proxyReqOpts, srcReq) {
//mlog("sunoapi")
if ( process.env.SUNO_KEY ) proxyReqOpts.headers['Authorization'] ='Bearer '+process.env.SUNO_KEY;
else proxyReqOpts.headers['Authorization'] ='Bearer '+process.env.OPENAI_API_KEY;
proxyReqOpts.headers['Content-Type'] = 'application/json';
proxyReqOpts.headers['Mj-Version'] = pkg.version;
return proxyReqOpts;
},

}));
app.use('/sunoapi' ,authV2,sunoProxy );
app.use('/suno' ,authV2,sunoProxy );



Expand Down
18 changes: 17 additions & 1 deletion service/src/myfun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,20 @@ export const viggleProxyFileDo= async( req:Request, res:Response, next?:NextFunc
res.status(400).json({'error':'uploader fail'});
}

}
}

export const sunoProxy=proxy(process.env.SUNO_SERVER?? API_BASE_URL, {
https: false, limit: '10mb',
proxyReqPathResolver: function (req) {
return req.originalUrl.replace('/sunoapi', '') // 将URL中的 `/openapi` 替换为空字符串
},
proxyReqOptDecorator: function (proxyReqOpts, srcReq) {
//mlog("sunoapi")
if ( process.env.SUNO_KEY ) proxyReqOpts.headers['Authorization'] ='Bearer '+process.env.SUNO_KEY;
else proxyReqOpts.headers['Authorization'] ='Bearer '+process.env.OPENAI_API_KEY;
proxyReqOpts.headers['Content-Type'] = 'application/json';
proxyReqOpts.headers['Mj-Version'] = pkg.version;
return proxyReqOpts;
},

})
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.22.10"
"version": "2.23.1"
},
"tauri": {
"allowlist": {
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 @@ -368,7 +368,7 @@ export default {
,pixabout:'Pixverse 相关'
,pixkeyPlaceholder:'Pixverse 的API Key 可不填'
,pixserver:'Pixverse 接口地址'
,pixinfo:' 说明:<br> <ul> <li>1.以v3.5 360p 时长5s 模式 Normal 为基数</li><li>2.v2.5 是 0.5倍</li> <li>3.时长10s 是 2倍</li> <li>4.540P 1.5倍 720P 2倍 1080P 4倍</li> <li>5.模式 performance 2倍</li> <li>6.倍数是相乘的 比如 720P 时长10s 那就是 2*2是4倍,如果再加performance 就是8倍</li></ul>'
,pixinfo:' 说明:<br> <ul> <li>1.以v3.5 360p 时长5s 模式 Normal 为基数</li><li>2.v2.5 是 0.5倍</li> <li>3.时长8s 是 2倍</li> <li>4.540P 1.5倍 720P 2倍 1080P 4倍</li> <li>5.模式 performance 2倍</li> <li>6.倍数是相乘的 比如 720P 时长8s 那就是 2*2是4倍,如果再加performance 就是8倍</li></ul>'

},

Expand Down
20 changes: 18 additions & 2 deletions src/views/luma/pixInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ const qualityOption= [
{label:t('mj.mode')+': Normal',value: 'normal'}
,{label:t('mj.mode')+': Performance',value: 'performance'}
]

const styleOption= [
//{label:'Please select style, can null',value: ''} ,
{label:'Style: Cyberpunk',value: 'cyberpunk'}
,{label:'Style: Anime',value: 'anime'}
,{label:'Style: Comic',value: 'comic'}
,{label:'Style: Clay',value: 'clay'}
,{label:'Style: 3D Animation',value: '3d_animation'}
]

const durationOptions=[ {label:t('mj.duration')+':5s',value:5},{label:t('mj.duration')+':10s',value:10}]
const durationOptions=[ {label:t('mj.duration')+':5s',value:5},{label:t('mj.duration')+':8s',value:8}]


const f= ref({prompt:'',quality:'360p',negative_prompt:'',image:'',image_tail:'',aspect_ratio:'1:1',model:'v3.5', duration:5,motion_mode:'normal'});
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 st= ref({isLoading:false});
const fsRef= ref() ;
const fsRef2= ref() ;
Expand All @@ -46,6 +55,7 @@ const clearInput = ()=>{
f.value.prompt='';
f.value.image= '';
f.value.image_tail= '';
f.value.style=null
fsRef.value=''
fsRef2.value=''
exItem.value= undefined
Expand Down Expand Up @@ -90,6 +100,9 @@ const create= async()=>{
if (exItem.value ){
obj={...obj,'original_video_id': exItem.value?.video_id, "extend": 1, "platform": "web"}
}
if(f.value.style){
obj={...obj,style:f.value.style}
}
try {
const d:any= await pixFetch('/generate' , obj )
mlog('img', d );
Expand Down Expand Up @@ -143,6 +156,9 @@ onMounted(() => {
</div>
<div class="pt-1">
<n-select v-model:value="f.duration" :options="durationOptions" size="small" />
</div>
<div class="pt-1">
<n-select v-model:value="f.style" :options="styleOption" size="small" clearable placeholder="Please select style" />
</div>
<div class="pt-2">
<div class="flex justify-start items-end">
Expand Down

0 comments on commit d8b6812

Please sign in to comment.