Commit fb5edeea authored by 周成波's avatar 周成波

进一步简化选择角色的任务,强制穿衣服,更新英文版

parent 5dab215b
......@@ -4,11 +4,11 @@ export const useManyValues = () => {
const screen = "竖屏";
const if_need_subtitle = "false";
const sd_prompt_prefix = `best quality,masterpiece,realistic,HDR,UHD,8K,best quality,highres,absurdres,realistic,masterpiece,
const sd_prompt_prefix = `(dressed:1.5),best quality,masterpiece,realistic,HDR,UHD,8K,best quality,highres,absurdres,realistic,masterpiece,
Highly detailed,extreme detail description,Professional,cinematic_lighting,ultra-fine painting,full body,Vivid Colors,
physically-based rendering,cinematic,`;
const sd_negative_prompt_prefix = `multiple breasts, (mutated hands and fingers:1.5 ), (long body :1.3),
const sd_negative_prompt_prefix = `multiple breasts, (mutated hands and fingers:1.5), (long body :1.3),
(mutation, poorly drawn :1.2) , black-white, bad anatomy, liquid body, liquid tongue, disfigured,
malformed, mutated, anatomical nonsense, malformed hands, long neck, blurred,
lowers, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts,
......@@ -182,72 +182,12 @@ export const useManyValues = () => {
};
const en_vertical_data = {
task_id: "20240219222232784",
chatgpt_prompt: ``,
chatgpt_answer: `Clean Brother, as a programmer, he is rigorous and meticulous. After work, he always manages his cozy little nest spotlessly. On that day, he was focused on typing on the code when his girlfriend burst into his sight holding a freshly baked cookie and said with a smile, "Dear Clean Brother, come and taste my newly learned dessert." He gladly took it, and the sweet taste bloomed on his tongue, just like their love, plain yet heartwarming. In a world full of code and love, Clean Brother's life is even better because of this daily pleasure.`,
chatgpt_answer_roles: [
{
"角色": "Clean Brother",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit (t-shirt and jeans), Short and tidy haircut, Black hair, Clean-shaven, Sharp facial features"
},
{
"角色": "Girlfriend",
"角色关键词": "Female, Late 20s, Caucasian, Fair skin, Apron over a casual dress, Shoulder-length wavy hair, Blonde, Bright smile, Sparkling blue eyes"
}
],
adapt_result_json: [
{
"编号": "1",
"场景描述": "Clean Brother, as a programmer, he is rigorous and meticulous",
"场景关键词": "Modern era, Home setting, Late evening/after work hours, Indoors, Living room with a workspace, Warm lighting, Laptop, Keyboard, Coding interface, Freshly baked cookies, Plate",
"角色": "Clean Brother",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit (t-shirt and jeans), Short and tidy haircut, Black hair, Clean-shaven, Sharp facial features",
"画面描述词": "In the dimly lit, warm embrace of his modern home's living room during late evening hours, Clean Brother sits diligently at his well-organized workspace. The atmosphere is a blend of comfort and productivity as the soft glow from his open laptop illuminates his face, accentuating his sharp Asian features and clean-shaven jawline. Dressed in a casual programmer's ensemble - a simple t-shirt and jeans - he exudes an air of focused determination. His olive skin tone contrasts against the stark black keys of his keyboard which he taps rhythmically, deeply engrossed in coding on the interface before him. Beside his workspace rests a plate filled with freshly baked cookies, their aroma wafting through the air, offering a homely touch to this indoor scene where work and leisure seamlessly intertwine.",
"本镜配图": "http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219232316324/img/1.png?v=20240219232347552",
"local_image_path": "assets/outputs/20240219232316324/img/1.png"
},
{
"编号": "2",
"场景描述": "After work, he always manages his cozy little nest spotlessly",
"场景关键词": "Modern era, Urban environment, Late evening, Indoor, Cozy apartment, Clean and tidy living space, Computer setup, Spotless surfaces, Warm lighting, Freshly baked cookies",
"角色": "Clean Brother",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit (t-shirt and jeans), Short and tidy haircut, Black hair, Clean-shaven, Sharp facial features",
"画面描述词": "Shot Description: In the modern urban environment, as the late evening sets in, our focus is on a clean and tidy living space within a cozy apartment. The main character, Clean Brother, is a mid-20s to early 30s Asian male programmer with olive skin tone. He's dressed casually in a t-shirt and jeans combo, topped with a short, well-groomed black haircut and a clean-shaven face that accentuates his sharp facial features. The interior scene bathes in warm lighting, casting a soft glow over the spotless surfaces of the room. A meticulously organized computer setup takes center stage, showcasing Clean Brother's dedication to orderliness. Freshly baked cookies sit temptingly on a plate nearby, adding a homely touch to the contemporary ambiance. As the camera lingers, we observe Clean Brother methodically going about his after-work ritual, maintaining his nest in impeccable condition – a sanctuary of cleanliness amidst the bustling cityscape outside.",
"本镜配图": "http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219232316324/img/2.png?v=20240219232420833",
"local_image_path": "assets/outputs/20240219232316324/img/2.png"
},
{
"编号": "3",
"场景描述": "On that day, he was focused on typing on the code when his girlfriend burst into his sight holding a freshly baked cookie and said with a smile, Dear Clean Brother, come and taste my newly learned dessert",
"场景关键词": "Modern era, Home office, Late evening, Indoors, Warm and cozy atmosphere, Computer setup with code displayed on the screen, Freshly baked cookies, Kitchen aroma",
"角色": "Clean Brother, Girlfriend",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit (t-shirt and jeans), Short and tidy haircut, Black hair, Clean-shaven, Sharp facial features, Female, Late 20s, Caucasian, Fair skin, Apron over a casual dress, Shoulder-length wavy hair, Blonde, Bright smile, Sparkling blue eyes",
"画面描述词": "Shot Description: In the modern era, a warm and cozy home office is illuminated by the soft glow of computer screens as our protagonist, Clean Brother, sits intently at his desk. The late evening hour casts a comfortable ambiance over the room, where the hum of technology meets the alluring aroma of freshly baked cookies wafting in from the nearby kitchen. The scene captures a programmer's haven - a clutter-free workspace adorned with a state-of-the-art computer setup displaying lines of code on its screen. Clean Brother, a mid-20s to early 30s Asian male, dons a casual programmer's outfit of a t-shirt and jeans, topped off with a short, tidy haircut that frames his olive skin-toned face. His sharp facial features are clean-shaven, and his black hair complements the intensity he exudes while typing away. Suddenly, the tranquility of the indoor setting is interrupted delightfully as Clean Brother's girlfriend bursts into view, her bright smile beaming through the dimly lit room. Clad in an apron over a casual dress, she embodies domestic charm. With her late 20s Caucasian beauty, fair skin, and shoulder-length wavy blonde hair, she carries a plate of steaming hot cookies. Her sparkling blue eyes twinkle mischievously as she playfully addresses him, \"Dear Clean Brother, come and taste my newly learned dessert.\" The shot encapsulates this tender moment between the two characters, merging the worlds of digital creation and homely affection.",
"本镜配图": "http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219222232784/img/3.png",
"local_image_path": "assets/outputs/20240219222232784/img/3.png"
},
{
"编号": "4",
"场景描述": "He gladly took it, and the sweet taste bloomed on his tongue, just like their love, plain yet heartwarming",
"场景关键词": "Modern era, Home setting, Late evening, Indoors, Warm and cozy atmosphere, Freshly baked cookies, Keyboard, Computer screen",
"角色": "Clean Brother, Girlfriend",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit, Short tidy haircut, Black hair, Clean-shaven, Sharp facial features, Female, Late 20s, Caucasian, Fair skin, Apron over casual dress, Shoulder-length wavy hair, Blonde, Bright smile, Sparkling blue eyes",
"画面描述词": "Shot Description: In the modern home setting, late in the evening with a warm and cozy atmosphere pervading indoors, we find our male protagonist, Clean Brother, sitting at his computer desk. He's a programmer in his mid-20s to early 30s, of Asian descent with an olive skin tone. Clad in a casual programmer's outfit and sporting a short, tidy haircut, his black hair complements his sharp facial features and clean-shaven look. His eyes are fixated on the glowing computer screen as he types away at the keyboard. Next to him stands his girlfriend, a vibrant Late 20s Caucasian woman with fair skin, wearing an apron over her casual dress. Her shoulder-length wavy blonde hair frames her bright smile and sparkling blue eyes, radiating affection and warmth. She holds out a plate filled with freshly baked cookies, their scent wafting through the air. With a tender expression, Clean Brother takes one of the warm cookies from the plate, and as he savors the sweet taste on his tongue, it mirrors the simple yet profound love they share - plain yet heartwarming. The intimate moment between them encapsulates the essence of their relationship within this contemporary domestic scene.",
"本镜配图": "http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219232316324/img/4.png?v=20240219232932841",
"local_image_path": "assets/outputs/20240219232316324/img/4.png"
},
{
"编号": "5",
"场景描述": "In a world full of code and love, Clean Brother's life is even better because of this daily pleasure",
"场景关键词": "Modern era, Home environment, Late evening/after work hours, Indoors, Warm and cozy atmosphere, Computer setup with code displayed, Freshly baked cookies, Plate, Table, Chair",
"角色": "Clean Brother, Girlfriend",
"角色关键词": "Programmer, Male, Mid-20s to early 30s, Asian, Olive skin tone, Casual programmer's outfit, Short and tidy haircut, Black hair, Clean-shaven, Sharp facial features, Female, Late 20s, Caucasian, Fair skin, Apron over casual dress, Shoulder-length wavy hair, Blonde, Bright smile, Sparkling blue eyes",
"画面描述词": "Shot Description: In the modern era, we find Clean Brother in his home environment during late evening/after work hours. The indoors is bathed in a warm and cozy atmosphere, with soft lighting emanating from a desk lamp illuminating his well-organized computer setup. On the screen, lines of code dance in an intricate ballet of 1s and 0s, symbolizing his passion for programming. Seated on a comfortable chair, Clean Brother is a male programmer in his mid-20s to early 30s, of Asian descent with olive skin tone. He sports a casual programmer's outfit and a short, tidy haircut that frames his sharp facial features. His black hair contrasts against his clean-shaven face as he intently studies the code. Beside him, on a wooden table, rests a plate piled high with freshly baked cookies, their aroma wafting through the air, adding a homely touch to the tech-filled room. The plate is lovingly placed there by his girlfriend, a late 20s Caucasian woman with fair skin and an infectious smile that lights up her sparkling blue eyes. She stands nearby, wearing an apron over her casual dress, her shoulder-length wavy blonde hair cascading down as she watches him work, enjoying this intimate moment shared amidst the digital world they both inhabit.",
"本镜配图": "http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219232316324/img/5.png?v=20240219233012776",
"local_image_path": "assets/outputs/20240219232316324/img/5.png"
}
],
final_video: `http://wm_tools_backend.frp.wmdigit.com:8888/assets/outputs/20240219222232784/final_video.mp4`,
task_id: "20240225222232784",
chatgpt_prompt: `Generate a 100 word science fiction short story, Avatar series`,
chatgpt_answer: ``,
chatgpt_answer_roles: [],
adapt_result_json: [],
final_video: ``,
};
return {
......
......@@ -20,6 +20,7 @@ const form = reactive({
chatgpt_prompt: "",
chatgpt_answer: "",
chatgpt_answer_roles: <Wm.RolesItem[]>[],
all_roles: "",
adapt_result_json: <Wm.ScriptsItem[]>[],
task_id: "",
final_video: "",
......@@ -82,10 +83,10 @@ const onAdaptRoles = async () => {
const adapt_restrict = `
指令:
请理解这个故事,给出这个故事中的所有角色,多个角色以逗号分隔`;
let roles = await text2videoService.submitGpt("故事:\n" + form.chatgpt_answer + "\n" + adapt_restrict, role_llm);
roles = roles.replace(/。/g, '').replace(/、/g, ',')
console.log(roles)
const roles_arr = roles.split(/[,,]/);
const roles = await text2videoService.submitGpt("故事:\n" + form.chatgpt_answer + "\n" + adapt_restrict, role_llm);
form.all_roles = roles.replace(/。/g, '').replace(/、/g, ',')
console.log(form.all_roles)
const roles_arr = form.all_roles.split(/[,,]/);
console.log(roles_arr)
async function processRoles() {
......@@ -99,7 +100,7 @@ const onAdaptRoles = async () => {
要求:
关键词以逗号分隔。
只要返回关键词,不需要其他的说明文字。`;
let keywords = await text2videoService.submitGpt(form.chatgpt_answer + "\n" + adapt_keyword_restrict, role_keywords_llm);
let keywords = await text2videoService.submitGpt("故事:\n" + form.chatgpt_answer + "\n" + adapt_keyword_restrict, role_keywords_llm);
keywords = keywords.replace(/。/g, '').replace(/、/g, ',')
form.chatgpt_answer_roles.push({
"角色": one_role.trim(),
......@@ -210,7 +211,7 @@ const onAdaptOne = async (item: any) => {
const adapt_role_restrict = `
指令:
请理解这个故事,针对其中的这个场景:“${item.场景描述}”,从所有角色中选择本场景的角色,多个角色以逗号分隔。`;
const item_roles = await text2videoService.submitGpt("故事:\n" + form.chatgpt_answer + "\n所有角色:\n"+ JSON.stringify(form.chatgpt_answer_roles)+"\n" + adapt_role_restrict, tuili_llm);
const item_roles = await text2videoService.submitGpt("故事:\n" + form.chatgpt_answer + "\n所有角色:\n"+ form.all_roles +"\n" + adapt_role_restrict, tuili_llm);
// console.log(role_keywords)
if (form.chatgpt_answer_roles.length === 0) {
// 总角色为空
......
......@@ -20,6 +20,7 @@ const form = reactive({
chatgpt_prompt: "",
chatgpt_answer: "",
chatgpt_answer_roles: <Wm.RolesItem[]>[],
all_roles: "",
adapt_result_json: <Wm.ScriptsItem[]>[],
task_id: "",
final_video: "",
......@@ -82,10 +83,10 @@ const onAdaptRoles = async () => {
const adapt_restrict = `
Instructions:
Please understand this story and provide all the characters in it, with multiple characters separated by commas`;
let roles = await text2videoService.submitGpt("story:\n" + form.chatgpt_answer + "\n" + adapt_restrict, role_llm);
roles = roles.replace(/。/g, '').replace(/、/g, ',')
console.log(roles)
const roles_arr = roles.split(/[,,]/);
const roles = await text2videoService.submitGpt("story:\n" + form.chatgpt_answer + "\n" + adapt_restrict, role_llm);
form.all_roles = roles.replace(/。/g, '').replace(/、/g, ',')
console.log(form.all_roles)
const roles_arr = form.all_roles.split(/[,,]/);
console.log(roles_arr)
async function processRoles() {
......@@ -99,7 +100,7 @@ const onAdaptRoles = async () => {
Requirement:
Keywords are separated by commas.
As long as the keyword is returned, no additional explanatory text is required.`;
let keywords = await text2videoService.submitGpt(form.chatgpt_answer + "\n" + adapt_keyword_restrict, role_keywords_llm);
let keywords = await text2videoService.submitGpt("story:\n" + form.chatgpt_answer + "\n" + adapt_keyword_restrict, role_keywords_llm);
keywords = keywords.replace(/。/g, '').replace(/、/g, ',')
form.chatgpt_answer_roles.push({
"角色": one_role.trim(),
......@@ -209,8 +210,8 @@ const onAdaptOne = async (item: any) => {
const adapt_role_restrict = `
Instructions:
Please understand this story and for the scene: "${item.场景描述}", select the character in this scene from all the characters, with multiple characters separated by commas.`;
const item_roles = await text2videoService.submitGpt("story:\n" + form.chatgpt_answer + "\n all the characters: \n"+ JSON.stringify(form.chatgpt_answer_roles)+"\n" + adapt_role_restrict, tuili_llm);
Please understand this story and for the scene: "${item.场景描述}", select the character in this scene from characters, with multiple characters separated by commas.`;
const item_roles = await text2videoService.submitGpt("story:\n" + form.chatgpt_answer + "\ncharacters:\n"+ form.all_roles +"\n" + adapt_role_restrict, tuili_llm);
// console.log(role_keywords)
if (form.chatgpt_answer_roles.length === 0) {
// 总角色为空
......@@ -412,7 +413,7 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
<el-form-item>
<div>
<el-radio-group v-model="form.screen" @change="onChangeScreen">
<!-- <el-radio label="横屏" size="large" border/> -->
<el-radio label="横屏" size="large" border/>
<el-radio label="竖屏" size="large" border/>
</el-radio-group>
</div>
......@@ -421,12 +422,12 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
<el-button type="success" @click="clean_demo">清除所有数据</el-button>
</el-form-item>
<!-- Prompt到文案 -->
<!-- <el-form-item label="Prompt">
<el-form-item label="Prompt">
<el-input v-model="form.chatgpt_prompt" :autosize="true" type="textarea" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmitGpt">生成文案({{wenan_llm_name}}</el-button>
</el-form-item> -->
</el-form-item>
<el-form-item label="文案">
<el-input v-model="form.chatgpt_answer" :autosize="true" type="textarea" />
</el-form-item>
......
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