Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
text2video-frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周成波
text2video-frontend
Commits
bdb2929b
Commit
bdb2929b
authored
Jan 31, 2024
by
周成波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.1
parent
2dfa1959
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
306 additions
and
135 deletions
+306
-135
text2videoService.ts
src/api/service/text2videoService.ts
+25
-4
index.vue
src/views/home/index.vue
+274
-131
lib.wm.api.d.ts
typings/types/wm/lib.wm.api.d.ts
+7
-0
No files found.
src/api/service/text2videoService.ts
View file @
bdb2929b
...
@@ -30,9 +30,9 @@ export default {
...
@@ -30,9 +30,9 @@ export default {
img_idx
:
string
=
""
,
img_idx
:
string
=
""
,
prompt
:
string
=
""
,
prompt
:
string
=
""
,
negative_prompt
:
string
=
""
,
negative_prompt
:
string
=
""
,
sampler_index
:
string
=
"DPM++
SDE
"
,
sampler_index
:
string
=
"DPM++
2M Karras
"
,
seed
:
string
=
"-1"
,
seed
:
string
=
"-1"
,
steps
:
string
=
"2
0
"
,
steps
:
string
=
"2
5
"
,
width
:
string
=
"960"
,
width
:
string
=
"960"
,
height
:
string
=
"512"
,
height
:
string
=
"512"
,
cfg_scale
:
string
=
"9"
cfg_scale
:
string
=
"9"
...
@@ -64,7 +64,28 @@ export default {
...
@@ -64,7 +64,28 @@ export default {
})
})
.
catch
((
err
:
any
)
=>
{
.
catch
((
err
:
any
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
return
Promise
.
reject
(
"stable-diffusion-webui Api 通讯失败"
);
return
Promise
.
reject
(
"
与
stable-diffusion-webui Api 通讯失败"
);
});
});
}
},
submitGenVideo
(
gen_video_param
:
Wm
.
GenVideoItem
[]):
Promise
<
string
>
{
if
(
!
gen_video_param
)
{
return
Promise
.
reject
(
"输入不能为空"
);
}
const
post_data
=
{
task
:
gen_video_param
}
return
request
.
post
(
'/text2video/gen_video'
,
post_data
)
.
then
((
res
:
any
)
=>
{
// console.log(res);
if
(
res
&&
res
.
code
===
0
)
{
return
res
.
data
.
result
;
}
else
{
const
errorMessage
=
res
?
res
.
message
:
"未知错误"
;
return
Promise
.
reject
(
errorMessage
);
}
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
err
);
return
Promise
.
reject
(
"gen_video接口通讯失败"
);
});
},
}
}
src/views/home/index.vue
View file @
bdb2929b
This diff is collapsed.
Click to expand it.
typings/types/wm/lib.wm.api.d.ts
View file @
bdb2929b
...
@@ -14,4 +14,11 @@ declare namespace Wm {
...
@@ -14,4 +14,11 @@ declare namespace Wm {
本镜配图
:
string
本镜配图
:
string
task_id
:
string
task_id
:
string
}
}
interface
GenVideoItem
{
task_id
:
string
idx
:
string
text
:
string
img_path
:
string
}
}
}
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