Fix issue causing Opus Limit
Browse filesFiles changed (2)
123version https://git-lfs.github.com/spec/v1oid sha256:1d40589e77bf675d2bf7d3091ad0262dbb3ff3fc281be4fd5c2ffd13fcba56d5size 838002830123version https://git-lfs.github.com/spec/v1oid sha256:3b181fe1650c180086599fec283bdd9444e22f2adb356b391d075318eaaae1f4size 838003288
1726 unmodified lines17271728172917301731173235 unmodified lines176817691770177117721773177455 unmodified lines18301831183218331834183523 unmodified lines185918601861186218631864186519 unmodified lines188518861887188818891890189143 unmodified lines19351936193719381939194019411726 unmodified linesnsfw_word += basketwords = []if len(nsfw_word) > 13:max_val = len(nsfw_word) // 3if len(nsfw_word) % 3 > 0: max_val += 1for i in range(max_val):35 unmodified linesif random_seed:gen_request_sub["seed" ] = random.randint(0,9999999999)request_list.append(copy.deepcopy(gen_request_sub))elif len(nsfw_word) > 5:max_val = len(nsfw_word) // 2 + len(nsfw_word) % 2for i in range(max_val):current_word = []55 unmodified linesrequest_list.append(treq_3)except:request_list.append(gen_request)def run_generation():if gen_request["png_rule"] == "count":23 unmodified linesif self.error_count >= 10:self.automation_button.deselect()temp = result_prompttime.sleep(1)if self.automation_button.get() == 0 or retry_count >= 5:breakself.running_flag = False19 unmodified linesset_image_to_queue(result_image, result_prompt, result_seed, filename)#자동화 체크if self.automation_button.get() == 1:instant_wait = random.uniform(4.5, 8.5) + self.delay_offsetif instant_wait < 0 : instant_wait = 0.5if self.image_generation_repeat_flag == False or (self.image_generation_repeat <= self.image_generation_repeat_current):self.image_generation_repeat_current = 043 unmodified linesself.automation_button.deselect()self.turbo_button.deselect()temp = result_prompttime.sleep(1)if self.turbo_button.get() == 0 or retry_count >= 5:breakself.running_flag = False1726 unmodified lines1727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178535 unmodified lines182118221823182418251826182755 unmodified lines18831884188518861887188818891890189118921893189423 unmodified lines19181919192019211922192319241925192619271928192919 unmodified lines194919501951195219531954195543 unmodified lines1999200020012002200320042005200620072008200920101726 unmodified linesnsfw_word += basketwords = []if len(nsfw_word) > 13:max_val = len(nsfw_word) // 4if len(nsfw_word) % 4 > 0: max_val += 1for i in range(max_val):current_word = []if i < max_val - 1:words.append(nsfw_word[i*4])words.append(nsfw_word[i*4+1])words.append(nsfw_word[i*4+2])words.append(nsfw_word[i*4+3])current_word.append(nsfw_word[i*4])current_word.append(nsfw_word[i*4+1])current_word.append(nsfw_word[i*4+2])current_word.append(nsfw_word[i*4+3])else:if len(nsfw_word) % 4 == 0:words.append(nsfw_word[i*4])words.append(nsfw_word[i*4+1])words.append(nsfw_word[i*4+2])words.append(nsfw_word[i*4+3])current_word.append(nsfw_word[i*4])current_word.append(nsfw_word[i*4+1])current_word.append(nsfw_word[i*4+2])current_word.append(nsfw_word[i*4+3])elif len(nsfw_word) % 4 == 3:words.append(nsfw_word[i*4])words.append(nsfw_word[i*4+1])words.append(nsfw_word[i*4+2])current_word.append(nsfw_word[i*4])current_word.append(nsfw_word[i*4+1])current_word.append(nsfw_word[i*4+2])elif len(nsfw_word) % 4 == 2:words.append(nsfw_word[i*4])words.append(nsfw_word[i*4+1])current_word.append(nsfw_word[i*4])current_word.append(nsfw_word[i*4+1])else:words.append(nsfw_word[i*4])current_word.append(nsfw_word[i*4])gen_request_sub = copy.deepcopy(gen_request)temp_prompt = []+pre_promptfor keyword in nsfw_word:if keyword not in words:if random_seed == False:temp_prompt[temp_prompt.index(keyword)] = " "*len(keyword)else:temp_prompt.remove(keyword)elif keyword in current_word:temp_prompt[temp_prompt.index(keyword)] = "{"+keyword+"}"gen_request_sub["prompt"] = ', '.join(temp_prompt)if random_seed:gen_request_sub["seed" ] = random.randint(0,9999999999)request_list.append(copy.deepcopy(gen_request_sub))elif len(nsfw_word) > 8:max_val = len(nsfw_word) // 3if len(nsfw_word) % 3 > 0: max_val += 1for i in range(max_val):35 unmodified linesif random_seed:gen_request_sub["seed" ] = random.randint(0,9999999999)request_list.append(copy.deepcopy(gen_request_sub))elif len(nsfw_word) > 3:max_val = len(nsfw_word) // 2 + len(nsfw_word) % 2for i in range(max_val):current_word = []55 unmodified linesrequest_list.append(treq_3)except:request_list.append(gen_request)else:pre_prompt = gen_request["prompt"]pre_prompt = [keyword.strip() for keyword in pre_prompt.split(',')]if "*(split nsfw)-rand" in pre_prompt:pre_prompt.remove("*(split nsfw)-rand")gen_request["prompt"] = ', '.join(pre_prompt)def run_generation():if gen_request["png_rule"] == "count":23 unmodified linesif self.error_count >= 10:self.automation_button.deselect()temp = result_promptif self.automation_button.get() == 1:instant_wait = random.uniform(3.5, 5.5) + self.delay_offsetif instant_wait < 0 : instant_wait = 0.5time.sleep(instant_wait)else:time.sleep(1)if self.automation_button.get() == 0 or retry_count >= 5:breakself.running_flag = False19 unmodified linesset_image_to_queue(result_image, result_prompt, result_seed, filename)#자동화 체크if self.automation_button.get() == 1:instant_wait = random.uniform(3.5, 5.5) + self.delay_offsetif instant_wait < 0 : instant_wait = 0.5if self.image_generation_repeat_flag == False or (self.image_generation_repeat <= self.image_generation_repeat_current):self.image_generation_repeat_current = 043 unmodified linesself.automation_button.deselect()self.turbo_button.deselect()temp = result_promptif self.automation_button.get() == 1:instant_wait = random.uniform(4.5, 8.5) + self.delay_offsetif instant_wait < 0 : instant_wait = 0.5time.sleep(instant_wait)else:time.sleep(1)if self.turbo_button.get() == 0 or retry_count >= 5:breakself.running_flag = False
Danbooru Prompt Selector/TEST2024/NAIA_0203_testv2.exe+2-2
Danbooru Prompt Selector/TEST2024/NAIA_0203_testv2.py+73-4