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
ee1cdc60
Commit
ee1cdc60
authored
Apr 03, 2024
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加局部重绘
parent
f69ff7a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
360 additions
and
10 deletions
+360
-10
text2videoService.ts
src/api/service/text2videoService.ts
+57
-6
index.vue
src/views/home/index.vue
+303
-4
No files found.
src/api/service/text2videoService.ts
View file @
ee1cdc60
...
...
@@ -31,12 +31,12 @@ export default {
img_idx
:
string
=
""
,
prompt
:
string
=
""
,
negative_prompt
:
string
=
""
,
width
:
string
=
"
960
"
,
height
:
string
=
"
512
"
,
sampler_index
:
string
=
"
DPM++ 2M Karras
"
,
seed
:
string
=
"
-1
"
,
steps
:
string
=
"
25
"
,
cfg_scale
:
string
=
"
9
"
,
width
:
string
=
""
,
height
:
string
=
""
,
sampler_index
:
string
=
""
,
seed
:
string
=
""
,
steps
:
string
=
""
,
cfg_scale
:
string
=
""
,
encrypt
:
string
=
"false"
,
model
:
string
=
""
):
Promise
<
{
"domain_image_path"
:
string
,
"local_image_path"
:
string
}
>
{
...
...
@@ -73,6 +73,57 @@ export default {
});
},
submitSDInPaint
(
task_id
:
string
=
""
,
img_idx
:
string
=
""
,
prompt
:
string
=
""
,
negative_prompt
:
string
=
""
,
width
:
string
=
""
,
height
:
string
=
""
,
sampler_index
:
string
=
""
,
seed
:
string
=
""
,
steps
:
string
=
""
,
cfg_scale
:
string
=
""
,
encrypt
:
string
=
"false"
,
model
:
string
=
""
,
base_img
:
string
=
""
,
mask
:
string
=
""
):
Promise
<
{
"domain_image_path"
:
string
,
"local_image_path"
:
string
}
>
{
if
(
!
prompt
||
!
base_img
||
!
mask
)
{
return
Promise
.
reject
(
"SD提示词、基础图、mask均不能为空"
);
}
const
post_data
=
{
task_id
:
task_id
,
img_idx
:
img_idx
,
prompt
:
prompt
,
negative_prompt
:
negative_prompt
,
sampler_index
:
sampler_index
,
seed
:
seed
,
steps
:
steps
,
width
:
width
,
height
:
height
,
cfg_scale
:
cfg_scale
,
encrypt
:
encrypt
,
model
:
model
,
base_img
:
base_img
,
mask
:
mask
}
return
request
.
post
(
'/text2video/img2img_inpaint'
,
post_data
)
.
then
((
res
:
any
)
=>
{
// console.log(res);
if
(
res
&&
res
.
code
===
0
)
{
return
{
"domain_image_path"
:
res
.
data
.
result
.
domain_image_path
,
"local_image_path"
:
res
.
data
.
result
.
local_image_path
};
}
else
{
const
errorMessage
=
res
?
res
.
message
:
"未知错误"
;
return
Promise
.
reject
(
errorMessage
);
}
})
.
catch
((
err
:
any
)
=>
{
console
.
log
(
`err =
${
JSON
.
stringify
(
err
)}
`
);
return
Promise
.
reject
(
`与 stable-diffusion-webui Api 通讯失败`
);
});
},
submitGenVideo
(
gen_video_param
:
any
):
Promise
<
string
>
{
if
(
!
gen_video_param
)
{
return
Promise
.
reject
(
"输入不能为空"
);
...
...
src/views/home/index.vue
View file @
ee1cdc60
This diff is collapsed.
Click to expand it.
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