Commit 8b583553 authored by 朱国瑞's avatar 朱国瑞

Merge branch 'master' of http://gitlab.5jstore.com/zhouchengbo/text2video-frontend

* 'master' of http://gitlab.5jstore.com/zhouchengbo/text2video-frontend:
  update
  update

# Conflicts:
#	src/views/home/index.vue
parents bd362c6d 71be1a92
......@@ -898,8 +898,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.jpg";
update_and_modify_product.pic_local = "assets/2024/04/20/7336ed1a-fefa-11ee-8709-76e065928c9e_resized.jpg";
update_and_modify_product.pic = "http://wm-tools-backend.frp.wmdigit.com:8888/assets/2024/05/13/f60b2b58-10d8-11ef-a812-559c156fce46_resized.png";
update_and_modify_product.pic_local = "assets/2024/05/13/f60b2b58-10d8-11ef-a812-559c156fce46_resized.png";
}
// 宽高
......@@ -1536,42 +1536,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;
......@@ -1897,40 +1899,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) {
......
......@@ -26,7 +26,9 @@ export default defineConfig({
server: {
proxy: {
'/api/': {
target: 'http://127.0.0.1:5001/', // 后端服务实际地址
// target: 'http://127.0.0.1:5001/', // 本机后端服务
target: 'http://wm-tools-backend.frp.wmdigit.com:8888/', // new3090后端服务
// target: 'http://wm-tools-backend-test.frp.wmdigit.com:8888/', // 4090-1测试后端服务
changeOrigin: true,
rewrite: (path: any) => path.replace(/^\/api/, '')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment