Upload prompt_selector_auto_1129.py
Browse files
Danbooru Prompt Selector/prompt_selector_auto_1129.py
CHANGED
@@ -72,8 +72,10 @@ def generate(width, height, positive, negative, button):
|
|
72 |
global temp_clipboard_image
|
73 |
global current_sampler
|
74 |
global NAI_width, NAI_height
|
75 |
-
|
76 |
-
|
|
|
|
|
77 |
if scale > 7.0: scale = 7.0
|
78 |
elif scale < 4.0: scale = 4.0
|
79 |
else: scale = round(scale, 1)
|
@@ -87,7 +89,7 @@ def generate(width, height, positive, negative, button):
|
|
87 |
"extra_noise_seed": random.randint(0,9999999999),
|
88 |
"sampler": current_sampler,
|
89 |
"steps": 28,
|
90 |
-
"scale":
|
91 |
"uncond_scale": 1.0,
|
92 |
"negative_prompt": negative_text.get("1.0", "end-1c").strip(),
|
93 |
"sm" : sema_button_var.get(),
|
@@ -156,7 +158,7 @@ def generate(width, height, positive, negative, button):
|
|
156 |
button.config(state=tk.NORMAL)
|
157 |
if mac_var.get():
|
158 |
random_function()
|
159 |
-
time.sleep(random.uniform(
|
160 |
button.config(state=tk.DISABLED)
|
161 |
window.event_generate(GENERATE_EVENT, when="tail")
|
162 |
|
|
|
72 |
global temp_clipboard_image
|
73 |
global current_sampler
|
74 |
global NAI_width, NAI_height
|
75 |
+
try:
|
76 |
+
scale = float(entry_CFG_value.get())
|
77 |
+
except:
|
78 |
+
scale = 5.0
|
79 |
if scale > 7.0: scale = 7.0
|
80 |
elif scale < 4.0: scale = 4.0
|
81 |
else: scale = round(scale, 1)
|
|
|
89 |
"extra_noise_seed": random.randint(0,9999999999),
|
90 |
"sampler": current_sampler,
|
91 |
"steps": 28,
|
92 |
+
"scale": scale,
|
93 |
"uncond_scale": 1.0,
|
94 |
"negative_prompt": negative_text.get("1.0", "end-1c").strip(),
|
95 |
"sm" : sema_button_var.get(),
|
|
|
158 |
button.config(state=tk.NORMAL)
|
159 |
if mac_var.get():
|
160 |
random_function()
|
161 |
+
time.sleep(random.uniform(5.1, 8.5))
|
162 |
button.config(state=tk.DISABLED)
|
163 |
window.event_generate(GENERATE_EVENT, when="tail")
|
164 |
|