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) => { ...@@ -898,8 +898,8 @@ const onChangeScreen = (val: string) => {
// cover_backcover.cover_pic_with_text_local = default_data.cover_backcover.cover_pic_with_text_local; // 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.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 = "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/04/20/7336ed1a-fefa-11ee-8709-76e065928c9e_resized.jpg"; update_and_modify_product.pic_local = "assets/2024/05/13/f60b2b58-10d8-11ef-a812-559c156fce46_resized.png";
} }
// 宽高 // 宽高
...@@ -1536,42 +1536,44 @@ const onSubmitInPaint = async () => { ...@@ -1536,42 +1536,44 @@ const onSubmitInPaint = async () => {
try { try {
let keywords_en = await text2videoService.submitTranslateToEn(utils.aesEncrypt(inPaintPrompt.value), form.task_id, "true"); let keywords_en = await text2videoService.submitTranslateToEn(utils.aesEncrypt(inPaintPrompt.value), form.task_id, "true");
sd_prompt = keywords_en.replace(/"/g, '') + "," + sd_prompt_prefix; sd_prompt = keywords_en.replace(/"/g, '') + "," + sd_prompt_prefix;
let sd_img;
// const sd_img = await text2videoService.submitSDInPaint( if (debug.value == true) {
// form.task_id, sd_img = await text2videoService.submitSDInPaint(
// img_id, form.task_id,
// sd_prompt, img_id,
// sd_negative_prompt_prefix, sd_prompt,
// form.img_size.width, sd_negative_prompt_prefix,
// form.img_size.height, form.img_size.width,
// sampler_index, form.img_size.height,
// seed, sampler_index,
// steps, seed,
// cfg_scale, steps,
// "false", cfg_scale,
// model, "false",
// base_img, model,
// mask, base_img,
// "img_data", mask,
// ); "img_data",
const sd_img = await text2videoService.submitSDInPaint( );
form.task_id, } else {
img_id, sd_img = await text2videoService.submitSDInPaint(
utils.aesEncrypt(sd_prompt), form.task_id,
utils.aesEncrypt(sd_negative_prompt_prefix), img_id,
utils.aesEncrypt(form.img_size.width), utils.aesEncrypt(sd_prompt),
utils.aesEncrypt(form.img_size.height), utils.aesEncrypt(sd_negative_prompt_prefix),
utils.aesEncrypt(sampler_index), utils.aesEncrypt(form.img_size.width),
utils.aesEncrypt(seed), utils.aesEncrypt(form.img_size.height),
utils.aesEncrypt(steps), utils.aesEncrypt(sampler_index),
utils.aesEncrypt(cfg_scale), utils.aesEncrypt(seed),
"true", utils.aesEncrypt(steps),
utils.aesEncrypt(model), utils.aesEncrypt(cfg_scale),
utils.aesEncrypt(base_img), "true",
utils.aesEncrypt(mask), utils.aesEncrypt(model),
"img_data", utils.aesEncrypt(base_img),
); utils.aesEncrypt(mask),
"img_data",
);
}
if (inPaintType.value == "scene") { if (inPaintType.value == "scene") {
item.本镜配图 = sd_img.domain_image_path + "?v=" + utils.genDateTimeStr(); item.本镜配图 = sd_img.domain_image_path + "?v=" + utils.genDateTimeStr();
item.local_image_path = sd_img.local_image_path; item.local_image_path = sd_img.local_image_path;
...@@ -1897,40 +1899,44 @@ const onSubmitUploadAndModifyProductPicInPaint = async () => { ...@@ -1897,40 +1899,44 @@ const onSubmitUploadAndModifyProductPicInPaint = async () => {
try { try {
let keywords_en = await text2videoService.submitTranslateToEn(utils.aesEncrypt(update_and_modify_product.inPaintPrompt), form.task_id, "true"); 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; let sd_prompt = keywords_en.replace(/"/g, '') + "," + sd_prompt_prefix;
const sd_img = await text2videoService.submitSDInPaint( let sd_img;
form.task_id, if (debug.value == true) {
img_id, sd_img = await text2videoService.submitSDInPaint(
sd_prompt, form.task_id,
sd_negative_prompt_prefix, img_id,
form.img_size.width, sd_prompt,
form.img_size.height, sd_negative_prompt_prefix,
sampler_index, form.img_size.width,
seed, form.img_size.height,
steps, sampler_index,
cfg_scale, seed,
"false", steps,
model, cfg_scale,
base_img, "false",
mask, model,
"img_path", base_img,
); mask,
// const sd_img = await text2videoService.submitSDInPaint( "img_path",
// form.task_id, );
// img_id, } else {
// utils.aesEncrypt(sd_prompt), sd_img = await text2videoService.submitSDInPaint(
// utils.aesEncrypt(sd_negative_prompt_prefix), form.task_id,
// utils.aesEncrypt(form.img_size.width), img_id,
// utils.aesEncrypt(form.img_size.height), utils.aesEncrypt(sd_prompt),
// utils.aesEncrypt(sampler_index), utils.aesEncrypt(sd_negative_prompt_prefix),
// utils.aesEncrypt(seed), utils.aesEncrypt(form.img_size.width),
// utils.aesEncrypt(steps), utils.aesEncrypt(form.img_size.height),
// utils.aesEncrypt(cfg_scale), utils.aesEncrypt(sampler_index),
// "true", utils.aesEncrypt(seed),
// utils.aesEncrypt(model), utils.aesEncrypt(steps),
// utils.aesEncrypt(base_img), utils.aesEncrypt(cfg_scale),
// utils.aesEncrypt(mask), "true",
// utils.aesEncrypt("img_path"), 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 = sd_img.domain_image_path + "?v=" + utils.genDateTimeStr();
update_and_modify_product.pic_local = sd_img.local_image_path; update_and_modify_product.pic_local = sd_img.local_image_path;
} catch (error) { } catch (error) {
......
...@@ -26,7 +26,9 @@ export default defineConfig({ ...@@ -26,7 +26,9 @@ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/api/': { '/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, changeOrigin: true,
rewrite: (path: any) => path.replace(/^\/api/, '') 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