useManyValues.ts 9.33 KB
Newer Older
周成波's avatar
周成波 committed
1 2 3 4 5 6 7 8
import { ref, reactive } from 'vue'
import type { CSSProperties } from 'vue'

interface MyMarkInterface {
  style: CSSProperties
  label: string
}
type MyMarkType = Record<number, MyMarkInterface | string>
周成波's avatar
周成波 committed
9 10 11 12 13

export const useManyValues = () => {
  const screen = "竖屏";
  const if_need_subtitle = "false";

14
  const sd_prompt_prefix = `(dressed:1.5),best quality,masterpiece,realistic,HDR,UHD,8K,best quality,highres,absurdres,realistic,masterpiece,
周成波's avatar
周成波 committed
15 16 17
  Highly detailed,extreme detail description,Professional,cinematic_lighting,ultra-fine painting,full body,Vivid Colors,
  physically-based rendering,cinematic,`;

18
  const sd_negative_prompt_prefix = `multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), 
周成波's avatar
周成波 committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  (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, 
  bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, 
  huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, 
  disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, 
  missing ears, fused animal ears, bad animal ears, poorly drawn animal ears, extra animal ears, liquid animal ears, 
  heavy animal ears, missing animal ears, text, ui, error, missing fingers, missing limb, fused fingers, 
  one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, 
  one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, 
  colorful tongue, black tongue, cropped, watermark, username, blurry, JPEG artifacts, signature, 3D, 3D game, 
  3D game scene, 3D character, malformed feet, extra feet, bad feet, poorly drawn feet, fused feet, missing feet, 
  extra shoes, bad shoes, fused shoes, more than two shoes, poorly drawn shoes, bad gloves, poorly drawn gloves, 
  fused gloves, bad cum, poorly drawn cum, fused cum, bad hairs, poorly drawn hairs, fused hairs, big muscles, ugly, 
  bad face, fused face, poorly drawn face, cloned face, big face, long face, bad eyes, fused eyes poorly drawn eyes, 
  extra eyes, malformed limbs, more than 2 nipples, missing nipples, different nipples, fused nipples, bad nipples, 
  poorly drawn nipples, black nipples, colorful nipples, gross proportions. short arm, (((missing arms))), missing thighs, 
  missing calf, missing legs, mutation, duplicate, morbid, mutilated, poorly drawn hands, more than 1 left hand, 
  more than 1 right hand, deformed, (blurry), disfigured, missing legs, extra arms, extra thighs, more than 2 thighs, 
  extra calf, fused calf, nsfw,logo,text,extra legs, bad knee, extra knee, more than 2 legs, bad tails, bad mouth, 
  fused mouth, poorly drawn mouth, bad tongue, tongue within mouth, too long tongue, black tongue, big mouth, cracked mouth, 
  bad mouth, dirty face, dirty teeth, dirty pantie, fused pantie, poorly drawn pantie, fused cloth, poorly drawn cloth, bad pantie, 
  yellow teeth, thick lips, bad cameltoe, colorful cameltoe, bad asshole, poorly drawn asshole, fused asshole, missing asshole, 
  bad anus, bad pussy, bad crotch, bad crotch seam, fused anus, fused pussy, fused anus, fused crotch, poorly drawn crotch, 
  fused seam, poorly drawn anus, poorly drawn pussy, poorly drawn crotch, poorly drawn crotch seam, bad thigh gap, missing thigh gap, 
  fused thigh gap, liquid thigh gap, poorly drawn thigh gap, poorly drawn anus, bad collarbone, fused collarbone, missing collarbone, 
  liquid collarbone, obesity, worst quality, low quality, normal quality, liquid tentacles, bad tentacles, poorly drawn tentacles, 
  split tentacles, fused tentacles, missing clit, bad clit, fused clit, colorful clit, black clit, liquid clit, QR code, bar code, censored, 
  safety panties, safety knickers, beard, furry ,pony, pubic hair, mosaic, excrement, faeces, shit, futa, testis,mutated hands and fingers,
  deformed,bad anatomy,disfigured,poorly drawn face,lowres,mutated,extra limb,ugly,poorly drawn hands,missing limb,floating limbs,
  disconnected limbs,malformed hands,out of focus,long neck,long body,gape,`;

周成波's avatar
周成波 committed
51 52 53 54 55 56 57
  const llms = {
    tyqw_online: {'api': 'tyqw', 'name':'线上通义千问'},
    baichuan: {'api': 'langchain', 'name':'本地baichuan2-7b'},
    qwen_local: {'api': 'langchain', 'name':'本地Qwen-7B-Chat'},
    chatgpt: {'api': 'gpt', 'name':'chatgpt'},
  };

周成波's avatar
周成波 committed
58 59
  const horizontal_data = {
    task_id: "20240209114425596",
周成波's avatar
周成波 committed
60
    chatgpt_prompt: `生成一个50字的小故事`,
周成波's avatar
周成波 committed
61 62 63 64
    chatgpt_answer: ``,
    chatgpt_answer_roles: [],
    adapt_result_json: [],
    final_video: ``,
周成波's avatar
周成波 committed
65 66 67
  };

  const vertical_data = {
68
    task_id: "20240220181602687",
周成波's avatar
周成波 committed
69
    chatgpt_prompt: `生成一个50字的科幻小故事,阿凡达系列`,
周成波's avatar
周成波 committed
70
    chatgpt_answer: `在奇幻的熊猫王国,阿宝——不再是功夫大师,而化身为西游世界里的神秘旅者。一日,阿宝巧遇唐僧师徒四人,他们正被一只诡异黑影困扰,经书被盗,疑云密布。画面中,阿宝手持九齿钉耙,取代八戒成为护法,勇闯妖洞。峰回路转,黑影竟是被封印的悟空分身,误入歧途。阿宝凭借智慧与武力,解开误会,反转剧情,助悟空分身归于本体,携手抵御真正邪魔,恢复取经历程的和平景象。`,
周成波's avatar
周成波 committed
71
    chatgpt_answer_roles: [],
周成波's avatar
周成波 committed
72
    adapt_result_json: [],
73
    final_video: ``,
周成波's avatar
周成波 committed
74 75
  };

周成波's avatar
周成波 committed
76
  const en_vertical_data = {
77
    task_id: "20240225222232784",
周成波's avatar
周成波 committed
78
    chatgpt_prompt: `Generate a 50 words science fiction short story, Avatar series`,
79 80 81 82
    chatgpt_answer: ``,
    chatgpt_answer_roles: [],
    adapt_result_json: [],
    final_video: ``,
周成波's avatar
周成波 committed
83
  };
周成波's avatar
周成波 committed
84

周成波's avatar
周成波 committed
85 86 87 88 89 90 91 92 93 94 95
  const marks = reactive<MyMarkType>({
    '-100': '-100%',
    '-90': '-90%',
    '-80': '-80%',
    '-70': '-70%',
    '-60': '-60%',
    '-50': '-50%',
    '-40': '-40%',
    '-30': '-30%',
    '-20': '-20%',
    '-10': '-10%',
周成波's avatar
周成波 committed
96 97 98 99 100 101
    0: {
      style: {
        color: '#1989FA',
      },
      label: '标准',
    },
周成波's avatar
周成波 committed
102 103 104 105 106 107 108 109 110 111
    10: '+10%',
    20: '+20%',
    30: '+30%',
    40: '+40%',
    50: '+50%',
    60: '+60%',
    70: '+70%',
    80: '+80%',
    90: '+90%',
    100: '+100%',
112 113 114 115 116 117 118 119 120 121 122 123 124 125
  });

  const bgm_volume_marks = reactive<MyMarkType>({
    0: '-100%',
    0.5: '-50%',
    1.0: {
      style: {
        color: '#1989FA',
      },
      label: '标准音量',
    },
    1.5: '+50%',
    2.0: '+100%',
  });
126

周成波's avatar
周成波 committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
  const voices = [
    {
      value: 'zh-CN-liaoning-XiaobeiNeural',
      gender: 'Female',
      label: '女,东北口音',
    },
    {
      value: 'zh-CN-shaanxi-XiaoniNeural',
      gender: 'Female',
      label: '女,陕西口音',
    },
    {
      value: 'zh-CN-XiaoxiaoNeural',
      gender: 'Female',
      label: '女,像个老师',
    },
    {
      value: 'zh-CN-XiaoyiNeural',
      gender: 'Female',
      label: '女,小女孩',
    },
    {
      value: 'zh-CN-YunjianNeural',
      gender: 'Male',
      label: '男,成熟稳重',
    },
    {
      value: 'zh-CN-YunxiaNeural',
      gender: 'Male',
      label: '男,小男孩',
    },
    {
      value: 'zh-CN-YunxiNeural',
      gender: 'Male',
      label: '男,大哥哥',
    },{
      value: 'zh-CN-YunyangNeural',
      gender: 'Male',
      label: '男,像个播音员',
    },{
      value: 'zh-HK-HiuGaaiNeural',
      gender: 'Female',
      label: '女,粤语,中年',
    },{
      value: 'zh-HK-HiuMaanNeural',
      gender: 'Female',
      label: '女,粤语,年轻',
    },{
      value: 'zh-HK-WanLungNeural',
      gender: 'Male',
      label: '男,粤语',
    },{
      value: 'zh-TW-HsiaoChenNeural',
      gender: 'Female',
      label: '女,台湾腔',
    },{
      value: 'zh-TW-HsiaoYuNeural',
      gender: 'Female',
      label: '女,台湾,偏普通话',
    },{
      value: 'zh-TW-YunJheNeural',
      gender: 'Male',
      label: '男,台湾腔',
    },
周成波's avatar
周成波 committed
191
  ];
周成波's avatar
周成波 committed
192

193 194 195 196 197 198
  const voices_en = [
    {
      value: 'en-US-BrianNeural',
      gender: 'Male',
      label: '男,美式磁性',
    },
周成波's avatar
周成波 committed
199
  ];
200

周成波's avatar
周成波 committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
  const bgm = [
    {
      value: '',
      label: '无',
    },
    {
      value: '安魂曲',
      label: '安魂曲',
    },
    {
      value: '解忧曲',
      label: '解忧曲',
    },
    {
      value: 'Anacreon',
      label: 'Anacreon',
    },
    {
      value: 'MySunset',
      label: 'MySunset',
    },
    {
      value: 'WindyHill',
      label: 'WindyHill',
    },
226 227 228 229 230 231 232 233
    {
      value: '雨声',
      label: '雨声',
    },
    {
      value: '大自然',
      label: '大自然',
    },
周成波's avatar
周成波 committed
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
  ];

  const role_attribute_options = [
    {
      value: '人',
      label: '人',
    },
    {
      value: '动物',
      label: '动物',
    },
    {
      value: '物品',
      label: '物品',
    },
    {
      value: '其他生物',
      label: '其他生物',
    },
    {
      value: '未知',
      label: '未知',
    },
  ];
周成波's avatar
周成波 committed
258
  
周成波's avatar
周成波 committed
259 260 261 262
  return {
    screen: screen,
    sd_prompt_prefix: sd_prompt_prefix,
    sd_negative_prompt_prefix: sd_negative_prompt_prefix,
周成波's avatar
周成波 committed
263
    llms: llms,
周成波's avatar
周成波 committed
264 265 266
    horizontal_data: horizontal_data,
    vertical_data: vertical_data,
    if_need_subtitle: if_need_subtitle,
周成波's avatar
周成波 committed
267
    en_vertical_data: en_vertical_data,
周成波's avatar
周成波 committed
268 269
    marks: marks,
    voices: voices,
270
    voices_en: voices_en,
周成波's avatar
周成波 committed
271
    bgm: bgm,
272
    bgm_volume_marks: bgm_volume_marks,
周成波's avatar
周成波 committed
273
    role_attribute_options: role_attribute_options,
周成波's avatar
周成波 committed
274 275
  }
}