Upload 2 files
Browse files
Danbooru Prompt Selector/TEST/prompt_selector_auto_1208_testv7.exe
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6fbbd17188be863d035697b966d48f844b014c36fbdc06c34446063cfbca3a4e
|
3 |
+
size 81786194
|
Danbooru Prompt Selector/TEST/prompt_selector_auto_1208_testv7.py
CHANGED
@@ -181,7 +181,7 @@ def generate(width, height, positive, negative, button):
|
|
181 |
log_error(zipped_bytes.decode('utf-8')[2:-2], "path_to_output_folder")
|
182 |
time.sleep(random.uniform(1.0, 2.5))
|
183 |
error_count += 1
|
184 |
-
if '429' in zipped_bytes.decode('utf-8')[2:-2] and access_token_multi:
|
185 |
if not multi_token_enable:
|
186 |
multi_token_enable = True
|
187 |
else:
|
@@ -498,6 +498,24 @@ def random_function():
|
|
498 |
if " (" in keyword:
|
499 |
temp_first_keywords.append(keyword)
|
500 |
random_row_keywords.remove(keyword)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
|
502 |
#last_selected_row_keywords =boy_keywords + girl_keywords[:0] + random_row_keywords
|
503 |
#print("3 :", temp_first_keywords)
|
|
|
181 |
log_error(zipped_bytes.decode('utf-8')[2:-2], "path_to_output_folder")
|
182 |
time.sleep(random.uniform(1.0, 2.5))
|
183 |
error_count += 1
|
184 |
+
if '429:' in zipped_bytes.decode('utf-8')[2:-2] and access_token_multi:
|
185 |
if not multi_token_enable:
|
186 |
multi_token_enable = True
|
187 |
else:
|
|
|
498 |
if " (" in keyword:
|
499 |
temp_first_keywords.append(keyword)
|
500 |
random_row_keywords.remove(keyword)
|
501 |
+
# 타율 개선 프롬프트
|
502 |
+
valid_keywords = []
|
503 |
+
for keyword in temp_first_keywords:
|
504 |
+
if "(" in keyword and "(artist)" not in keyword and "(style)" not in keyword:
|
505 |
+
start = keyword.find("(") + 1
|
506 |
+
end = keyword.find(")")
|
507 |
+
if start < end and keyword[start:end] in current_deep_search_keywords:
|
508 |
+
valid_keywords.append(keyword)
|
509 |
+
for keyword in valid_keywords:
|
510 |
+
if keyword in temp_first_keywords:
|
511 |
+
temp_first_keywords.remove(keyword)
|
512 |
+
girl_index = next((i for i, k in enumerate(temp_first_keywords) if 'girl' in k), None)
|
513 |
+
if girl_index is not None:
|
514 |
+
for keyword in valid_keywords:
|
515 |
+
temp_first_keywords.insert(girl_index + 1, keyword)
|
516 |
+
girl_index += 1
|
517 |
+
# 결과 출력
|
518 |
+
print(temp_first_keywords)
|
519 |
|
520 |
#last_selected_row_keywords =boy_keywords + girl_keywords[:0] + random_row_keywords
|
521 |
#print("3 :", temp_first_keywords)
|