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
71be1a92
Commit
71be1a92
authored
May 13, 2024
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6abea2ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
72 deletions
+78
-72
index.vue
src/views/home/index.vue
+78
-72
No files found.
src/views/home/index.vue
View file @
71be1a92
...
...
@@ -897,8 +897,8 @@ const onChangeScreen = (val: string) => {
// cover_backcover.cover_pic_with_text_local = default_data.cover_backcover.cover_pic_with_text_local;
update_and_modify_product
.
if_need
=
"true"
;
update_and_modify_product
.
pic
=
"http://
127.0.0.1:5001/assets/2024/04/20/7336ed1a-fefa-11ee-8709-76e065928c9e_resized.jp
g"
;
update_and_modify_product
.
pic_local
=
"assets/2024/0
4/20/7336ed1a-fefa-11ee-8709-76e065928c9e_resized.jp
g"
;
update_and_modify_product
.
pic
=
"http://
wm-tools-backend.frp.wmdigit.com:8888/assets/2024/05/13/f60b2b58-10d8-11ef-a812-559c156fce46_resized.pn
g"
;
update_and_modify_product
.
pic_local
=
"assets/2024/0
5/13/f60b2b58-10d8-11ef-a812-559c156fce46_resized.pn
g"
;
}
// 宽高
...
...
@@ -1535,42 +1535,44 @@ const onSubmitInPaint = async () => {
try
{
let
keywords_en
=
await
text2videoService
.
submitTranslateToEn
(
utils
.
aesEncrypt
(
inPaintPrompt
.
value
),
form
.
task_id
,
"true"
);
sd_prompt
=
keywords_en
.
replace
(
/"/g
,
''
)
+
","
+
sd_prompt_prefix
;
// const sd_img = await text2videoService.submitSDInPaint(
// form.task_id,
// img_id,
// sd_prompt,
// sd_negative_prompt_prefix,
// form.img_size.width,
// form.img_size.height,
// sampler_index,
// seed,
// steps,
// cfg_scale,
// "false",
// model,
// base_img,
// mask,
// "img_data",
// );
const
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
utils
.
aesEncrypt
(
sd_prompt
),
utils
.
aesEncrypt
(
sd_negative_prompt_prefix
),
utils
.
aesEncrypt
(
form
.
img_size
.
width
),
utils
.
aesEncrypt
(
form
.
img_size
.
height
),
utils
.
aesEncrypt
(
sampler_index
),
utils
.
aesEncrypt
(
seed
),
utils
.
aesEncrypt
(
steps
),
utils
.
aesEncrypt
(
cfg_scale
),
"true"
,
utils
.
aesEncrypt
(
model
),
utils
.
aesEncrypt
(
base_img
),
utils
.
aesEncrypt
(
mask
),
"img_data"
,
);
let
sd_img
;
if
(
debug
.
value
==
true
)
{
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
sd_prompt
,
sd_negative_prompt_prefix
,
form
.
img_size
.
width
,
form
.
img_size
.
height
,
sampler_index
,
seed
,
steps
,
cfg_scale
,
"false"
,
model
,
base_img
,
mask
,
"img_data"
,
);
}
else
{
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
utils
.
aesEncrypt
(
sd_prompt
),
utils
.
aesEncrypt
(
sd_negative_prompt_prefix
),
utils
.
aesEncrypt
(
form
.
img_size
.
width
),
utils
.
aesEncrypt
(
form
.
img_size
.
height
),
utils
.
aesEncrypt
(
sampler_index
),
utils
.
aesEncrypt
(
seed
),
utils
.
aesEncrypt
(
steps
),
utils
.
aesEncrypt
(
cfg_scale
),
"true"
,
utils
.
aesEncrypt
(
model
),
utils
.
aesEncrypt
(
base_img
),
utils
.
aesEncrypt
(
mask
),
"img_data"
,
);
}
if
(
inPaintType
.
value
==
"scene"
)
{
item
.
本镜配图
=
sd_img
.
domain_image_path
+
"?v="
+
utils
.
genDateTimeStr
();
item
.
local_image_path
=
sd_img
.
local_image_path
;
...
...
@@ -1896,40 +1898,44 @@ const onSubmitUploadAndModifyProductPicInPaint = async () => {
try
{
let
keywords_en
=
await
text2videoService
.
submitTranslateToEn
(
utils
.
aesEncrypt
(
update_and_modify_product
.
inPaintPrompt
),
form
.
task_id
,
"true"
);
let
sd_prompt
=
keywords_en
.
replace
(
/"/g
,
''
)
+
","
+
sd_prompt_prefix
;
// const sd_img = await text2videoService.submitSDInPaint(
// form.task_id,
// img_id,
// sd_prompt,
// sd_negative_prompt_prefix,
// form.img_size.width,
// form.img_size.height,
// sampler_index,
// seed,
// steps,
// cfg_scale,
// "false",
// model,
// base_img,
// mask,
// "img_path",
// );
const
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
utils
.
aesEncrypt
(
sd_prompt
),
utils
.
aesEncrypt
(
sd_negative_prompt_prefix
),
utils
.
aesEncrypt
(
form
.
img_size
.
width
),
utils
.
aesEncrypt
(
form
.
img_size
.
height
),
utils
.
aesEncrypt
(
sampler_index
),
utils
.
aesEncrypt
(
seed
),
utils
.
aesEncrypt
(
steps
),
utils
.
aesEncrypt
(
cfg_scale
),
"true"
,
utils
.
aesEncrypt
(
model
),
utils
.
aesEncrypt
(
base_img
),
utils
.
aesEncrypt
(
mask
),
utils
.
aesEncrypt
(
"img_path"
),
);
let
sd_img
;
if
(
debug
.
value
==
true
)
{
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
sd_prompt
,
sd_negative_prompt_prefix
,
form
.
img_size
.
width
,
form
.
img_size
.
height
,
sampler_index
,
seed
,
steps
,
cfg_scale
,
"false"
,
model
,
base_img
,
mask
,
"img_path"
,
);
}
else
{
sd_img
=
await
text2videoService
.
submitSDInPaint
(
form
.
task_id
,
img_id
,
utils
.
aesEncrypt
(
sd_prompt
),
utils
.
aesEncrypt
(
sd_negative_prompt_prefix
),
utils
.
aesEncrypt
(
form
.
img_size
.
width
),
utils
.
aesEncrypt
(
form
.
img_size
.
height
),
utils
.
aesEncrypt
(
sampler_index
),
utils
.
aesEncrypt
(
seed
),
utils
.
aesEncrypt
(
steps
),
utils
.
aesEncrypt
(
cfg_scale
),
"true"
,
utils
.
aesEncrypt
(
model
),
utils
.
aesEncrypt
(
base_img
),
utils
.
aesEncrypt
(
mask
),
utils
.
aesEncrypt
(
"img_path"
),
);
}
update_and_modify_product
.
pic
=
sd_img
.
domain_image_path
+
"?v="
+
utils
.
genDateTimeStr
();
update_and_modify_product
.
pic_local
=
sd_img
.
local_image_path
;
}
catch
(
error
)
{
...
...
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