Upload 2 files
Browse filesFiles changed (2)
123version https://git-lfs.github.com/spec/v1oid sha256:2de13ef437ae80bdf617829959f017d41cf55d8162935beac38a43ed370442c6size 151554073123version https://git-lfs.github.com/spec/v1oid sha256:5e4344bbce3f0943697fa5183c62d64ed48fb751cbe0261fcfa574e8f394a510size 151554180
628 unmodified lines629630631632633634635636637638639640641642228 unmodified lines871872873874875876877628 unmodified linesif folder in wildcard_dict and filename + ".txt" in wildcard_dict[folder] and os.path.exists(file_path):with open(file_path, 'r') as file:lines = file.readlines()return random.choice(lines).strip() if lines else ' 'else:file_path = os.path.join(wildcards_dir, input_str + ".txt")if input_str + ".txt" in wildcard_dict['none'] and os.path.exists(file_path):with open(file_path, 'r') as file:lines = file.readlines()return random.choice(lines).strip() if lines else ' 'return ' 'if(entry_fixed_prompt.get()):entry_text_keywords = entry_fixed_prompt.get()228 unmodified linesfor i, keyword in enumerate(random_row_keywords):if keyword.startswith('<') and keyword.endswith('>'):input_str = keyword.strip('<>').strip() # '<', '>' 제거random_row_keywords[i] = get_wildcard(input_str) # get_wildcard 함수 호출 및 대체wildcard_used_fixed_prompt.append(random_row_keywords[i])random_row_keywords = rearrange_keywords_boys_girls(random_row_keywords)628 unmodified lines629630631632633634635636637638639640641642228 unmodified lines871872873874875876877878879880881882883884885628 unmodified linesif folder in wildcard_dict and filename + ".txt" in wildcard_dict[folder] and os.path.exists(file_path):with open(file_path, 'r') as file:lines = file.readlines()return random.choice(lines).strip() if lines else input_strelse:file_path = os.path.join(wildcards_dir, input_str + ".txt")if input_str + ".txt" in wildcard_dict['none'] and os.path.exists(file_path):with open(file_path, 'r') as file:lines = file.readlines()return random.choice(lines).strip() if lines else input_strreturn input_strif(entry_fixed_prompt.get()):entry_text_keywords = entry_fixed_prompt.get()228 unmodified linesfor i, keyword in enumerate(random_row_keywords):if keyword.startswith('<') and keyword.endswith('>'):input_str = keyword.strip('<>').strip() # '<', '>' 제거if("__" in input_str):adjectives = re.findall(r'__(.*?)__', input_str)last_keyword = re.split(r'__.*?__', input_str)[-1]adjective_string = ""for adjective in adjectives:adjective_string += (get_wildcard(adjective) + " ")random_row_keywords[i] = adjective_string + get_wildcard(last_keyword)else:random_row_keywords[i] = get_wildcard(input_str)wildcard_used_fixed_prompt.append(random_row_keywords[i])random_row_keywords = rearrange_keywords_boys_girls(random_row_keywords)
Danbooru Prompt Selector/TEST2024/prompt_selector_auto_1215_testv9.exe+2-2
Danbooru Prompt Selector/TEST2024/prompt_selector_auto_1215_testv9.py+12-4