Skip to content

Commit

Permalink
v2.20.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Sep 4, 2024
1 parent 0d5196b commit 6268f40
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 9 deletions.
4 changes: 4 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 功能升级日志

# 计划
# 2.20.7
- 😄 新增:runway 可以 extend
- 🐞 修复:ideogram 清空

# 2.20.6
- 😄 新增: 画图 ideogram 相关模块

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.20.6",
"version": "2.20.7",
"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.20.6"
"version": "2.20.7"
},
"tauri": {
"allowlist": {
Expand Down
66 changes: 62 additions & 4 deletions src/views/luma/runwayInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
import { mlog, upImg } from '@/api';
import { runwayFeed, runwayFetch, runwayUpload } from '@/api/runway';
import { gptServerStore, homeStore } from '@/store';
import { useMessage,NInput,NButton, NTag,NSelect } from 'naive-ui';
import { useMessage,NInput,NButton, NTag,NSelect,NPopover } from 'naive-ui';
import { computed, onMounted, ref, watch } from 'vue';
import { SvgIcon } from '@/components/common';
import { t } from '@/locales';
import { t } from '@/locales';
import { RunwayTask } from '@/api/runwayStore';
const fsRef= ref() ;
const runway= ref<{image_prompt?:string,seed:number,text_prompt:string}>({image_prompt:'',seed:1675247627,text_prompt:''});
const st= ref({isDo:false,uploading:false, version:'gen2',time:5});
const ms = useMessage();
const exRunway= ref<RunwayTask>()
async function selectFile(input:any){
mlog("selectFile", input.target.files[0])
const file = input.target.files[0]
Expand Down Expand Up @@ -94,6 +96,8 @@ const generate= async ()=>{
"assetGroupName": "Generative Video",
"init_image": runway.value.image_prompt,
"resolution": '720p'// runway.value.image_prompt,
,"extended_from_task_id":(exRunway.value&&exRunway.value.id)?exRunway.value.id:undefined
,"init_video": ( exRunway.value && exRunway.value.artifacts && exRunway.value.artifacts[0].url)?exRunway.value.artifacts[0].url:undefined
},
// "asTeamId": 17511575
}
Expand All @@ -112,6 +116,8 @@ const generate= async ()=>{
"resolution": "720p",
"image_as_end_frame": false,
"assetGroupName": "Generative Video"
,"extended_from_task_id":(exRunway.value&&exRunway.value.id)?exRunway.value.id:undefined
,"init_video": ( exRunway.value && exRunway.value.artifacts && exRunway.value.artifacts[0].url)?exRunway.value.artifacts[0].url:undefined
}
}
Expand All @@ -122,7 +128,15 @@ const generate= async ()=>{
}
if( gen3.options.init_image=='' ){
delete gen3.options.init_image;
//delete gen3.options.resolution;
delete gen3_trubo.options.init_image;
}
if( !gen3.options.init_video ){
delete gen3.options.init_video;
delete gen3_trubo.options.init_video;
}
if( !gen3.options.extended_from_task_id ){
delete gen3.options.extended_from_task_id;
delete gen3_trubo.options.extended_from_task_id;
}
gen3.options.exploreMode= st.value.version=='europa'
Expand Down Expand Up @@ -164,6 +178,7 @@ const mvOption= [
const clearInput=()=>{
runway.value.image_prompt =''
runway.value.text_prompt =''
exRunway.value= undefined
}
watch(()=>st.value.version,(n:string)=>{
gptServerStore.setMyData({RRUNWAY_VERSION:n})
Expand All @@ -172,6 +187,13 @@ onMounted(() => {
homeStore.setMyData({ms:ms})
st.value.version= gptServerStore.myData.RRUNWAY_VERSION?gptServerStore.myData.RRUNWAY_VERSION: 'gen2'
});
watch(()=>homeStore.myData.act, (n)=>{
if(n=='runway.extend'){
mlog("runway.extend", homeStore.myData.actData )
exRunway.value = homeStore.myData.actData as RunwayTask
}
});
</script>
<template>
<div class="px-2">
Expand All @@ -183,10 +205,46 @@ onMounted(() => {
:placeholder="$t('video.descpls')" type="textarea" size="small"
:autosize="{ minRows: 3, maxRows: 12 }" />
</div>

<div v-if="exRunway" class="pt-1">
<div class="flex justify-between items-center">
<div >
<n-popover trigger="hover">
<template #trigger>
<div class="line-clamp-1">
{{ $t('video.extend') }}:
<template v-if="exRunway.options.text_prompt">{{ exRunway.options.text_prompt }}</template>
<template v-else >{{ exRunway.options.gen2Options?.text_prompt?exRunway.options.gen2Options.text_prompt: exRunway.name }}</template>
</div>
</template>
<div class=" max-w-[300px]">{{exRunway.id}}</div>

<div v-if="exRunway.taskType=='gen3a'" >Version: Gen-3</div>
<div v-if="exRunway.taskType=='gen3a_turbo'" >Version: Gen-3-turbo</div>
<div v-if="exRunway.taskType=='gen2'" >Version: Gen-2</div>
<div v-if="exRunway.createdAt" >createdAt: {{ new Date( exRunway.createdAt).toLocaleString() }}</div>
<div class=" max-w-[300px]" v-if="exRunway.options.text_prompt">{{ exRunway.options.text_prompt }}</div>
<div class=" max-w-[300px]">{{ exRunway.options.gen2Options?.text_prompt?exRunway.options.gen2Options.text_prompt: exRunway.name }}</div>

</n-popover>
</div>
</div>
<div class="relative flex items-center justify-center bg-white bg-opacity-10 rounded-[5px] overflow-hidden aspect-[16/8.85] ">
<video loop playsinline controls v-if="exRunway.artifacts && exRunway.artifacts[0].url"
referrerpolicy="no-referrer" :poster="exRunway.artifacts[0].previewUrls[0]"
class="w-full h-full object-cover" >
<source :src="exRunway.artifacts[0].url" referrerpolicy="no-referrer" type="video/mp4" >
</video>
</div>

</div>

<div class="pt-1" v-if="st.version!='gen2'" >
<n-select v-model:value="st.time" :options="timeOption" size="small" />
</div>



<div class="pt-1">
<div class="flex justify-between items-end">
<div>
Expand All @@ -208,7 +266,7 @@ onMounted(() => {
</div>
<div class="text-right">
<div class="pb-1 text-right">
<NTag v-if="runway.text_prompt!='' || runway.image_prompt!=''" type="success" size="small" round ><span class="cursor-pointer" @click="clearInput()" >{{$t('video.clear')}}</span></NTag>
<NTag v-if="runway.text_prompt!='' || runway.image_prompt!='' || exRunway" type="success" size="small" round ><span class="cursor-pointer" @click="clearInput()" >{{$t('video.clear')}}</span></NTag>
</div>
<NButton :loading="st.isDo" type="primary" :disabled="!canPost" @click="generate()"><SvgIcon icon="ri:video-add-line" /> {{$t('video.generate')}}</NButton>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/views/luma/runwayList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ const RunwayTaskDown=(item:RunwayTask)=>{
document.body.removeChild(link);
}
const extend= (item:RunwayTask )=>{
mlog("extend ", item )
homeStore.setMyData({act:"runway.extend", actData: item })
}
watch(()=>homeStore.myData.act, (n)=>{
if(n=='RunwayFeed') initLoad()
});
Expand Down Expand Up @@ -110,6 +115,8 @@ initLoad();

<n-button-group size="tiny">
<n-button size="tiny" round ghost @click="RunwayTaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button>
<n-button size="tiny" round ghost @click="extend( item )" ><SvgIcon icon="ri:video-add-line" /> {{ $t('video.extend') }}</n-button>
<!-- <n-button size="tiny" round ghost @click="RunwayTaskDown( item )" ><SvgIcon icon="mdi:download" /> {{ $t('video.download') }}</n-button> -->

</n-button-group>
<!-- <a :href="item.video?.download_url? item.video?.download_url:item.video?.url" download target="_blank" v-if="item.video?.url|| item.video?.download_url" ><SvgIcon icon="mdi:download" class="cursor-pointer"/></a> -->
Expand Down
12 changes: 10 additions & 2 deletions src/views/mj/aiIdeoInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ const createImg= async ()=>{
onMounted(()=>{
homeStore.setMyData({ms:ms });
})
const clearInput = ()=>{
st.value.image_url='';
f.value.prompt='';
f.value.seed=123456;
fsFile.value= null;
}
</script>
<template>
<div class="overflow-y-auto bg-[#fafbfc] dark:bg-[#18181c] h-full ">
Expand Down Expand Up @@ -105,9 +112,10 @@ onMounted(()=>{
<div class="text-center" v-else>{{ $t('video.selectimg') }}</div>

</div>
<div class=" absolute right-[-5px] top-[-5px] cursor-pointer" @click="st.image_url='';" v-if="st.image_url"><NTag type="success" size="small" :bordered="false" round ><span class="cursor-pointer">{{$t('video.clear')}}</span></NTag></div>
</div>
<div>
<div class="text-right">
<div class=" cursor-pointer pb-2" @click="clearInput" v-if="st.image_url|| f.prompt "><NTag type="success" size="small" :bordered="false" round ><span class="cursor-pointer">{{$t('video.clear')}}</span></NTag></div>

<NButton type="primary" @click="createImg()" :disabled="!f.prompt" >{{ $t('mjchat.imgcreate') }}</NButton>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/views/suno/mcList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ initLoad();
<h3 >{{item.title}}</h3>
<div class="text-[8px] flex items-center border-[1px] border-gray-500/30 px-1 ml-1 list-none rounded-md" v-if="item.metadata?.type=='upload'" >Uploaded</div>
</div>
<div class="opacity-80" >{{item.metadata.tags}}</div>
<div class="opacity-80 line-clamp-1 max-w-[320px]" >{{item.metadata.tags}}</div>
</div>
<div class="opacity-60 line-clamp-1 w-full text-[12px] cursor-pointer" @click="goPlay( item )" v-if="item.metadata && item.metadata.prompt">
{{item.metadata.prompt}}
Expand Down

0 comments on commit 6268f40

Please sign in to comment.