baqu2213 commited on
Commit
f11c2fb
1 Parent(s): db03d2e

Upload 2 files

Browse files
Danbooru Prompt Selector/TEST/prompt_selector_auto_1205_test.exe CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6d059b8192f4d7615a125a42795cf40db306a4d79c752c0b9a546704724467e0
3
- size 81784114
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a316c0139d35f1138c54bd4cbaf7376177e59a68779c97aae66535404dd93b8c
3
+ size 81782287
Danbooru Prompt Selector/TEST/prompt_selector_auto_1205_test.py CHANGED
@@ -1073,6 +1073,7 @@ def generate_turbo(_seed, turbo_count, tb_access_token,width, height, positive,
1073
  global running_flag
1074
  global image_queue
1075
  global turbo_stop_bit
 
1076
 
1077
  if(pipe_number == 0): image_queue.clear()
1078
 
@@ -1207,8 +1208,8 @@ def generate_turbo(_seed, turbo_count, tb_access_token,width, height, positive,
1207
  print('running_flag : ',running_flag,'pipe_number : ',pipe_number, ' : already running ')
1208
  if(turbo_stop_bit):
1209
  return
 
1210
 
1211
-
1212
  running_flag = True
1213
  tprint("Running : request received, pipeline :",pipe_number)
1214
  try:
@@ -1250,6 +1251,8 @@ def generate_turbo(_seed, turbo_count, tb_access_token,width, height, positive,
1250
  button.config(state=tk.NORMAL)
1251
  if(mac_var.get()): window.event_generate(GENERATE_EVENT, when="tail")
1252
 
 
 
1253
  time.sleep(random.uniform(3.0, 5.5))
1254
  if(pipe_number == 4): button.config(state=tk.NORMAL)
1255
  running_flag = False
@@ -1265,9 +1268,18 @@ def generate_turbo(_seed, turbo_count, tb_access_token,width, height, positive,
1265
  stopped = True
1266
  if (pipe_number != 4):
1267
  tprint("Stopped : request stopped before assign pipeline :",pipe_number+1)
1268
- pipe_number = 4
1269
 
1270
- if pipe_number == 4 and mac_var.get() and not running_flag:
 
 
 
 
 
 
 
 
 
 
1271
  random_function()
1272
  time.sleep(random.uniform(2.1, 5.5))
1273
  if not (turbo_stop_bit):
@@ -1657,6 +1669,7 @@ NAI_ID_multi = None
1657
  image_queue = []
1658
  last_generation_seed = random.randint(0,9999999999)
1659
  turbo_stop_bit = False
 
1660
 
1661
  whitelist = wlist.whitelist
1662
  bag_of_tags = tagbag.bag_of_tags
 
1073
  global running_flag
1074
  global image_queue
1075
  global turbo_stop_bit
1076
+ global task_finished
1077
 
1078
  if(pipe_number == 0): image_queue.clear()
1079
 
 
1208
  print('running_flag : ',running_flag,'pipe_number : ',pipe_number, ' : already running ')
1209
  if(turbo_stop_bit):
1210
  return
1211
+ print('containing : ',pipe_number)
1212
 
 
1213
  running_flag = True
1214
  tprint("Running : request received, pipeline :",pipe_number)
1215
  try:
 
1251
  button.config(state=tk.NORMAL)
1252
  if(mac_var.get()): window.event_generate(GENERATE_EVENT, when="tail")
1253
 
1254
+ task_finished += 1 #터보 기능의 안전장치입니다.
1255
+
1256
  time.sleep(random.uniform(3.0, 5.5))
1257
  if(pipe_number == 4): button.config(state=tk.NORMAL)
1258
  running_flag = False
 
1268
  stopped = True
1269
  if (pipe_number != 4):
1270
  tprint("Stopped : request stopped before assign pipeline :",pipe_number+1)
 
1271
 
1272
+ if pipe_number == 4 and mac_var.get():
1273
+ print(" task finished : ",task_finished)
1274
+ wait_limit = 0
1275
+ while(task_finished < 5 and wait_limit < 10):
1276
+ wait_limit += 1
1277
+ print(f"Wait other pipeline ... : ({wait_limit}/10)")
1278
+ time.sleep(3)
1279
+ if(wait_limit == 10):
1280
+ print(f"Process : {turbo_count} request time-out")
1281
+ running_flag = False
1282
+ task_finished = 0
1283
  random_function()
1284
  time.sleep(random.uniform(2.1, 5.5))
1285
  if not (turbo_stop_bit):
 
1669
  image_queue = []
1670
  last_generation_seed = random.randint(0,9999999999)
1671
  turbo_stop_bit = False
1672
+ task_finished = 0
1673
 
1674
  whitelist = wlist.whitelist
1675
  bag_of_tags = tagbag.bag_of_tags