fix negative prompt handling

pull/33/head
AlUlkesh 2023-02-10 09:28:06 +01:00
parent fe63beeb3b
commit 04dc47f195
1 changed files with 2 additions and 2 deletions

View File

@ -369,10 +369,10 @@ def get_all_images(dir_name, sort_by, sort_order, keyword, tabname_box, img_path
for file_info in fileinfos:
file_name = file_info[0]
file_exif = finfo_exif[file_name].lower()
start_index = file_exif.find("negative prompt: ")
start_index = file_exif.find("negative_prompt: ")
end_index = file_exif.find("\n", start_index)
if negative_prompt_search == "Only":
sub_string = file_exif[start_index:end_index].split("negative prompt: ")[-1].strip()
sub_string = file_exif[start_index:end_index].split("negative_prompt: ")[-1].strip()
if exif_keyword.lower() in sub_string:
result.append(file_info)
else: