P01yH3dr0n commited on
Commit
cea8836
1 Parent(s): a658c23
director_tools.py CHANGED
@@ -44,7 +44,7 @@ def director_ui():
44
  from_t2i = gr.Button("使用文生图上一次生成的图片")
45
  from_out = gr.Button("使用定向修图上一次生成的图片")
46
  with gr.Column():
47
- output_image = gr.Gallery(label="输出图片", format='png', interactive=False, preview=True, show_share_button=False)
48
  selected_index = gr.Number(value=-1, visible=False)
49
  with gr.Row():
50
  send_i2i = gr.Button("发送到图生图")
 
44
  from_t2i = gr.Button("使用文生图上一次生成的图片")
45
  from_out = gr.Button("使用定向修图上一次生成的图片")
46
  with gr.Column():
47
+ output_image = gr.Gallery(label="输出图片", format='png', interactive=False, preview=True, show_share_button=False, height=800)
48
  selected_index = gr.Number(value=-1, visible=False)
49
  with gr.Row():
50
  send_i2i = gr.Button("发送到图生图")
tagcomplete/javascript/tagAutocomplete.js CHANGED
@@ -227,7 +227,7 @@ const WEIGHT_REGEX = /[([]([^()[\]:|]+)(?::(?:\d+(?:\.\d+)?|\.\d+))?[)\]]/g;
227
  const POINTY_REGEX = /<[^\s,<](?:[^\t\n\r,<>]*>|[^\t\n\r,> ]*)/g;
228
  const COMPLETED_WILDCARD_REGEX = /__[^\s,_][^\t\n\r,_]*[^\s,_]__[^\s,_]*/g;
229
  const STYLE_VAR_REGEX = /\$\(?[^$|\[\],\s]*\)?/g;
230
- const NORMAL_TAG_REGEX = /[^\s,|<>\[\]:]+_\([^\s,|<>\[\]:]*\)?|[^\s,|<>():\[\]]+|</g;
231
  const TAG_REGEX = new RegExp(`${POINTY_REGEX.source}|${COMPLETED_WILDCARD_REGEX.source}|${STYLE_VAR_REGEX.source}|${NORMAL_TAG_REGEX.source}`, "g");
232
 
233
  // On click, insert the tag into the prompt textbox with respect to the cursor position
@@ -993,14 +993,6 @@ async function setup() {
993
 
994
  // Not found, we're on a page without prompt textareas
995
  if (textAreas.every(v => v === null || v === undefined)) return;
996
- // Already added or unnecessary to add
997
- if (gradioApp().querySelector('.autocompleteParent.p')) {
998
- if (gradioApp().querySelector('.autocompleteParent.n') || !TAC_CFG.activeIn.negativePrompts) {
999
- return;
1000
- }
1001
- } else if (!TAC_CFG.activeIn.txt2img && !TAC_CFG.activeIn.img2img) {
1002
- return;
1003
- }
1004
 
1005
  textAreas.forEach(area => addAutocompleteToArea(area));
1006
  textAreas.forEach(area => area.offsetParent.style.setProperty('overflow', 'visible'));
 
227
  const POINTY_REGEX = /<[^\s,<](?:[^\t\n\r,<>]*>|[^\t\n\r,> ]*)/g;
228
  const COMPLETED_WILDCARD_REGEX = /__[^\s,_][^\t\n\r,_]*[^\s,_]__[^\s,_]*/g;
229
  const STYLE_VAR_REGEX = /\$\(?[^$|\[\],\s]*\)?/g;
230
+ const NORMAL_TAG_REGEX = /[^\s,|<>\[\]:]+_\([^\s,|<>\[\]:]*\)?|[^\s,|<>(){}:\[\]]+|</g;
231
  const TAG_REGEX = new RegExp(`${POINTY_REGEX.source}|${COMPLETED_WILDCARD_REGEX.source}|${STYLE_VAR_REGEX.source}|${NORMAL_TAG_REGEX.source}`, "g");
232
 
233
  // On click, insert the tag into the prompt textbox with respect to the cursor position
 
993
 
994
  // Not found, we're on a page without prompt textareas
995
  if (textAreas.every(v => v === null || v === undefined)) return;
 
 
 
 
 
 
 
 
996
 
997
  textAreas.forEach(area => addAutocompleteToArea(area));
998
  textAreas.forEach(area => area.offsetParent.style.setProperty('overflow', 'visible'));