Upload 2 files
Browse files
Danbooru Prompt Selector/TEST2024/NAIA_0222_testv2.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:390da3c79397f54d1be3552e222869ba8bc78a1f201fbbfc1015cdc478a95629
|
3 |
+
size 888974761
|
Danbooru Prompt Selector/TEST2024/NAIA_0222_testv2.py
CHANGED
@@ -1312,9 +1312,9 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
1312 |
self.basedir = basedir
|
1313 |
ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Bold.otf")))
|
1314 |
ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Regular.otf")))
|
1315 |
-
my_font = customtkinter.CTkFont('Pretendard', 13)
|
1316 |
-
large_font = customtkinter.CTkFont('Pretendard', 13)
|
1317 |
-
v_large_font = customtkinter.CTkFont('Pretendard', 14, weight="normal")
|
1318 |
self.re_update = False
|
1319 |
self.config = configparser.ConfigParser()
|
1320 |
|
@@ -2973,8 +2973,8 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
2973 |
self.rm_location_button = customtkinter.CTkCheckBox(self.rm_extend_frame, text="장소/배경색 제거", variable=self.rm_location_var, font=my_font)
|
2974 |
|
2975 |
self.image_reference_frame = customtkinter.CTkFrame(self.rm_extend_frame)
|
2976 |
-
self.image_reference_canvas = customtkinter.CTkCanvas(self.image_reference_frame, width=600, bg="#333333", highlightthickness = 1, highlightbackground = 'grey10')
|
2977 |
-
self.image_reference_canvas.grid(row=0, column=0, columnspan=
|
2978 |
|
2979 |
def slider_event_IRS(value):
|
2980 |
self.image_reference_strength_label.configure(text=f"Reference Strength : {value:.2f}")
|
@@ -3007,11 +3007,15 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
3007 |
self.image_reference_strength = customtkinter.CTkSlider(self.image_reference_canvas, from_=0.01, to=1.00, number_of_steps=100, command=slider_event_IRS, button_color='grey', button_hover_color='grey10', height=20, progress_color='transparent')
|
3008 |
self.information_extracted = customtkinter.CTkSlider(self.image_reference_canvas, from_=0.01, to=1.00, number_of_steps=100, command=slider_event_IE, button_color='grey', button_hover_color='grey10', height=20, progress_color='transparent')
|
3009 |
self.exit_reference_mode = customtkinter.CTkButton(self.image_reference_canvas, text="Vibe Transfer 해제", font=my_font, command=rem_image_reference, fg_color='grey10', hover_color='grey', corner_radius=0)
|
3010 |
-
self.
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
self.image_reference_canvas.create_window(
|
|
|
|
|
|
|
|
|
3015 |
|
3016 |
def yield_rm_character_name():
|
3017 |
if self.rm_character_name_var.get() == 1:
|
@@ -3258,7 +3262,7 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
3258 |
self.image_label_report.configure(state="disabled")
|
3259 |
white_image = Image.new('RGB', (768, 768), 'white')
|
3260 |
#white_image =Image.open("sample_image.jpg")
|
3261 |
-
white_photo = customtkinter.CTkImage(white_image, size=(
|
3262 |
self.image_label.configure(image=white_photo)
|
3263 |
self.image_label.image = white_photo
|
3264 |
|
@@ -4769,7 +4773,7 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
4769 |
self.image_reference_string = reference_string
|
4770 |
enhancer = ImageEnhance.Brightness(self.image_reference)
|
4771 |
darker_image = enhancer.enhance(0.5)
|
4772 |
-
self.image_reference_tk = ImageTk.PhotoImage(darker_image.resize((600, 468), Image.Resampling.LANCZOS))
|
4773 |
self.image_id = self.image_reference_canvas.create_image(0, 0, image=self.image_reference_tk, anchor='nw')
|
4774 |
self.image_reference_strength.set(0.6)
|
4775 |
self.information_extracted.set(1)
|
@@ -4865,7 +4869,7 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
4865 |
top = (new_size - height) // 2
|
4866 |
new_image.paste(img, (left, top))
|
4867 |
|
4868 |
-
import_window_img = customtkinter.CTkImage(new_image, size=(576, 576))
|
4869 |
import_window_img_label = customtkinter.CTkLabel(import_window_left, text="", image=import_window_img)
|
4870 |
import_window_img_label.grid(row=0, column=0)
|
4871 |
|
@@ -5510,7 +5514,7 @@ class App(customtkinter.CTk, TkinterDnD.DnDWrapper):
|
|
5510 |
|
5511 |
def get_max_size(self):
|
5512 |
width = self.winfo_screenheight()
|
5513 |
-
return 768 if width <
|
5514 |
|
5515 |
def update_fullscreen_image(self,new_window, new_image_label):
|
5516 |
last_updated_image = None
|
|
|
1312 |
self.basedir = basedir
|
1313 |
ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Bold.otf")))
|
1314 |
ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Regular.otf")))
|
1315 |
+
my_font = customtkinter.CTkFont('Arial' if self.winfo_screenheight() < 1152 else 'Pretendard', 13)
|
1316 |
+
large_font = customtkinter.CTkFont('Arial' if self.winfo_screenheight() < 1152 else 'Pretendard', 13)
|
1317 |
+
v_large_font = customtkinter.CTkFont('Arial' if self.winfo_screenheight() < 1152 else 'Pretendard', 14, weight="normal")
|
1318 |
self.re_update = False
|
1319 |
self.config = configparser.ConfigParser()
|
1320 |
|
|
|
2973 |
self.rm_location_button = customtkinter.CTkCheckBox(self.rm_extend_frame, text="장소/배경색 제거", variable=self.rm_location_var, font=my_font)
|
2974 |
|
2975 |
self.image_reference_frame = customtkinter.CTkFrame(self.rm_extend_frame)
|
2976 |
+
self.image_reference_canvas = customtkinter.CTkCanvas(self.image_reference_frame, width=486 if self.winfo_screenheight() < 1152 else 600, bg="#333333", highlightthickness = 1, highlightbackground = 'grey10')
|
2977 |
+
self.image_reference_canvas.grid(row=0, column=0, columnspan=3, padx=5, pady=5, sticky="n")
|
2978 |
|
2979 |
def slider_event_IRS(value):
|
2980 |
self.image_reference_strength_label.configure(text=f"Reference Strength : {value:.2f}")
|
|
|
3007 |
self.image_reference_strength = customtkinter.CTkSlider(self.image_reference_canvas, from_=0.01, to=1.00, number_of_steps=100, command=slider_event_IRS, button_color='grey', button_hover_color='grey10', height=20, progress_color='transparent')
|
3008 |
self.information_extracted = customtkinter.CTkSlider(self.image_reference_canvas, from_=0.01, to=1.00, number_of_steps=100, command=slider_event_IE, button_color='grey', button_hover_color='grey10', height=20, progress_color='transparent')
|
3009 |
self.exit_reference_mode = customtkinter.CTkButton(self.image_reference_canvas, text="Vibe Transfer 해제", font=my_font, command=rem_image_reference, fg_color='grey10', hover_color='grey', corner_radius=0)
|
3010 |
+
if self.winfo_screenheight() >= 1152:
|
3011 |
+
irc_xpos = [130, 130, 420, 420, 280]
|
3012 |
+
else:
|
3013 |
+
irc_xpos = [110, 110, 370, 370, 240]
|
3014 |
+
self.image_reference_canvas.create_window(irc_xpos[0], 140, window=self.image_reference_strength_label)
|
3015 |
+
self.image_reference_canvas.create_window(irc_xpos[1], 90, window=self.information_extracted_label)
|
3016 |
+
self.image_reference_canvas.create_window(irc_xpos[2], 140, window=self.image_reference_strength)
|
3017 |
+
self.image_reference_canvas.create_window(irc_xpos[3], 90, window=self.information_extracted)
|
3018 |
+
self.image_reference_canvas.create_window(irc_xpos[4], 190, window=self.exit_reference_mode)
|
3019 |
|
3020 |
def yield_rm_character_name():
|
3021 |
if self.rm_character_name_var.get() == 1:
|
|
|
3262 |
self.image_label_report.configure(state="disabled")
|
3263 |
white_image = Image.new('RGB', (768, 768), 'white')
|
3264 |
#white_image =Image.open("sample_image.jpg")
|
3265 |
+
white_photo = customtkinter.CTkImage(white_image, size=(568,568))
|
3266 |
self.image_label.configure(image=white_photo)
|
3267 |
self.image_label.image = white_photo
|
3268 |
|
|
|
4773 |
self.image_reference_string = reference_string
|
4774 |
enhancer = ImageEnhance.Brightness(self.image_reference)
|
4775 |
darker_image = enhancer.enhance(0.5)
|
4776 |
+
self.image_reference_tk = ImageTk.PhotoImage(darker_image.resize((486, 468) if self.winfo_screenheight() < 1152 else (600, 468), Image.Resampling.LANCZOS))
|
4777 |
self.image_id = self.image_reference_canvas.create_image(0, 0, image=self.image_reference_tk, anchor='nw')
|
4778 |
self.image_reference_strength.set(0.6)
|
4779 |
self.information_extracted.set(1)
|
|
|
4869 |
top = (new_size - height) // 2
|
4870 |
new_image.paste(img, (left, top))
|
4871 |
|
4872 |
+
import_window_img = customtkinter.CTkImage(new_image, size=(486, 486) if self.winfo_screenheight() < 1152 else (576, 576))
|
4873 |
import_window_img_label = customtkinter.CTkLabel(import_window_left, text="", image=import_window_img)
|
4874 |
import_window_img_label.grid(row=0, column=0)
|
4875 |
|
|
|
5514 |
|
5515 |
def get_max_size(self):
|
5516 |
width = self.winfo_screenheight()
|
5517 |
+
return 768 if width < 1152 else 768
|
5518 |
|
5519 |
def update_fullscreen_image(self,new_window, new_image_label):
|
5520 |
last_updated_image = None
|