From 15af6c97f8810baf8610972a1d443f9e5f08559e Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 23 Sep 2025 11:13:10 +0800 Subject: [PATCH] chore: update negative prompt handling and fix tooltip field labels --- .../impl/base_image_generate_node.py | 2 +- .../impl/base_image_to_video_node.py | 2 +- .../impl/base_text_to_video_node.py | 2 +- .../credential/tts.py | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py b/apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py index 57a95b0d9..bfa78fc9c 100644 --- a/apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py +++ b/apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py @@ -35,7 +35,7 @@ class BaseImageGenerateNode(IImageGenerateNode): message_list = self.generate_message_list(question, history_message) self.context['message_list'] = message_list self.context['dialogue_type'] = dialogue_type - self.context['negative_prompt'] = negative_prompt + self.context['negative_prompt'] = self.generate_prompt_question(negative_prompt) image_urls = tti_model.generate_image(question, negative_prompt) # 保存图片 file_urls = [] diff --git a/apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py b/apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py index e2a2b3b9a..ceba18eee 100644 --- a/apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py +++ b/apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py @@ -39,7 +39,7 @@ class BaseImageToVideoNode(IImageToVideoNode): message_list = self.generate_message_list(question, history_message) self.context['message_list'] = message_list self.context['dialogue_type'] = dialogue_type - self.context['negative_prompt'] = negative_prompt + self.context['negative_prompt'] = self.generate_prompt_question(negative_prompt) self.context['first_frame_url'] = first_frame_url self.context['last_frame_url'] = last_frame_url # 处理首尾帧图片 这块可以是url 也可以是file_id 如果是url 可以直接传递给模型 如果是file_id 需要传base64 diff --git a/apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py b/apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py index 0fa97a07c..2d8e3fc4c 100644 --- a/apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py +++ b/apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py @@ -35,7 +35,7 @@ class BaseTextToVideoNode(ITextToVideoNode): message_list = self.generate_message_list(question, history_message) self.context['message_list'] = message_list self.context['dialogue_type'] = dialogue_type - self.context['negative_prompt'] = negative_prompt + self.context['negative_prompt'] = self.generate_prompt_question(negative_prompt) video_urls = ttv_model.generate_video(question, negative_prompt) print('video_urls', video_urls) # 保存图片 diff --git a/apps/models_provider/impl/siliconCloud_model_provider/credential/tts.py b/apps/models_provider/impl/siliconCloud_model_provider/credential/tts.py index efb322227..e28048323 100644 --- a/apps/models_provider/impl/siliconCloud_model_provider/credential/tts.py +++ b/apps/models_provider/impl/siliconCloud_model_provider/credential/tts.py @@ -15,17 +15,17 @@ class SiliconCloudTTSModelGeneralParams(BaseForm): TooltipLabel('Voice', _('Try out the different sounds (Alloy, Echo, Fable, Onyx, Nova, and Sparkle) to find one that suits your desired tone and audience. The current voiceover is optimized for English.')), required=True, default_value='fnlp/MOSS-TTSD-v0.5:alex', - text_field='value', + text_field='label', value_field='value', option_list=[ - {'text': 'alex', 'value': 'fnlp/MOSS-TTSD-v0.5:alex'}, - {'text': 'anna', 'value': 'fnlp/MOSS-TTSD-v0.5:anna'}, - {'text': 'bella', 'value': 'fnlp/MOSS-TTSD-v0.5:bella'}, - {'text': 'charles', 'value': 'fnlp/MOSS-TTSD-v0.5:charles'}, - {'text': 'benjamin', 'value': 'fnlp/MOSS-TTSD-v0.5:benjamin'}, - {'text': 'claire', 'value': 'fnlp/MOSS-TTSD-v0.5:claire'}, - {'text': 'david', 'value': 'fnlp/MOSS-TTSD-v0.5:david'}, - {'text': 'diana', 'value': 'fnlp/MOSS-TTSD-v0.5:diana'}, + {'label': 'alex', 'value': 'fnlp/MOSS-TTSD-v0.5:alex'}, + {'label': 'anna', 'value': 'fnlp/MOSS-TTSD-v0.5:anna'}, + {'label': 'bella', 'value': 'fnlp/MOSS-TTSD-v0.5:bella'}, + {'label': 'charles', 'value': 'fnlp/MOSS-TTSD-v0.5:charles'}, + {'label': 'benjamin', 'value': 'fnlp/MOSS-TTSD-v0.5:benjamin'}, + {'label': 'claire', 'value': 'fnlp/MOSS-TTSD-v0.5:claire'}, + {'label': 'david', 'value': 'fnlp/MOSS-TTSD-v0.5:david'}, + {'label': 'diana', 'value': 'fnlp/MOSS-TTSD-v0.5:diana'}, ])