From 969c1cca510d185884b585e0b37d6a960b9d29d4 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 16 Dec 2024 15:42:01 +0800 Subject: [PATCH] refactor: Image generate model disable history mode --- .../image_generate_step_node/i_image_generate_node.py | 6 +++--- ui/src/workflow/nodes/image-generate/index.vue | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py b/apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py index 1ce1af46c1b..30f8667b520 100644 --- a/apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py +++ b/apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py @@ -13,11 +13,11 @@ class ImageGenerateNodeSerializer(serializers.Serializer): prompt = serializers.CharField(required=True, error_messages=ErrMessage.char("提示词(正向)")) - negative_prompt = serializers.CharField(required=False, default='', error_messages=ErrMessage.char("提示词(负向)")) + negative_prompt = serializers.CharField(required=False, error_messages=ErrMessage.char("提示词(负向)"), allow_null=True, allow_blank=True,) # 多轮对话数量 - dialogue_number = serializers.IntegerField(required=True, error_messages=ErrMessage.integer("多轮对话数量")) + dialogue_number = serializers.IntegerField(required=False, default=0, error_messages=ErrMessage.integer("多轮对话数量")) - dialogue_type = serializers.CharField(required=True, error_messages=ErrMessage.char("对话存储类型")) + dialogue_type = serializers.CharField(required=False, default='NODE', error_messages=ErrMessage.char("对话存储类型")) is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean('是否返回内容')) diff --git a/ui/src/workflow/nodes/image-generate/index.vue b/ui/src/workflow/nodes/image-generate/index.vue index ae4817204f1..dbb014a7976 100644 --- a/ui/src/workflow/nodes/image-generate/index.vue +++ b/ui/src/workflow/nodes/image-generate/index.vue @@ -154,10 +154,12 @@ @wheel="wheel" title="提示词(负向)" v-model="form_data.negative_prompt" + placeholder="请描述不想生成的图片内容,比如:颜色、血腥内容" style="height: 150px" @submitDialog="submitDialog" /> +