From 5b4e25b48b94504f720e6e6c48ffaac825703341 Mon Sep 17 00:00:00 2001 From: wailovet Date: Tue, 23 Apr 2024 01:50:22 +0800 Subject: [PATCH] 'update' --- mz_llama3.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mz_llama3.py b/mz_llama3.py index 4c8e84e..fe52308 100644 --- a/mz_llama3.py +++ b/mz_llama3.py @@ -105,17 +105,24 @@ def query_beautify_prompt_text(model_name, n_gpu_layers, text, style_presets, do full_responses.append(f"({response['main_color_word']})") if response["camera_angle_word"] != "": full_responses.append(f"({response['camera_angle_word']})") + + + response["style_words"] = [x for x in response["style_words"] if x != ""] if len(response["style_words"]) > 0: - response["style_words"] = [x for x in response["style_words"] if x != ""] full_responses.append(f"({', '.join(response['style_words'])})") + + + response["subject_words"] = [x for x in response["subject_words"] if x != ""] if len(response["subject_words"]) > 0: - response["subject_words"] = [x for x in response["subject_words"] if x != ""] full_responses.append(f"({', '.join(response['subject_words'])})") + + response["light_words"] = [x for x in response["light_words"] if x != ""] if len(response["light_words"]) > 0: - response["light_words"] = [x for x in response["light_words"] if x != ""] full_responses.append(f"({', '.join(response['light_words'])})") + + + response["environment_words"] = [x for x in response["environment_words"] if x != ""] if len(response["environment_words"]) > 0: - response["environment_words"] = [x for x in response["environment_words"] if x != ""] full_responses.append(f"({', '.join(response['environment_words'])})") full_response = ", ".join(full_responses)