From 59bb7f0169b0a85283c08c323287a41b1ccfacd4 Mon Sep 17 00:00:00 2001 From: Bubbliiiing <47347516+bubbliiiing@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:59:18 +0800 Subject: [PATCH] Bug fix in TextBox (#141) * Fix bug in comfyui t2v * Fix bug in textbox --- comfyui/README.md | 2 +- comfyui/comfyui_nodes.py | 19 +++++++++++++++++++ comfyui/v3/easyanimatev3_workflow_i2v.json | 8 ++++---- comfyui/v3/easyanimatev3_workflow_t2v.json | 8 ++++---- comfyui/v4/easyanimatev4_workflow_i2v.json | 8 ++++---- comfyui/v4/easyanimatev4_workflow_lora.json | 8 ++++---- comfyui/v4/easyanimatev4_workflow_t2v.json | 8 ++++---- comfyui/v4/easyanimatev4_workflow_v2v.json | 8 ++++---- comfyui/v5/easyanimatev5_workflow_i2v.json | 8 ++++---- comfyui/v5/easyanimatev5_workflow_t2v.json | 8 ++++---- comfyui/v5/easyanimatev5_workflow_v2v.json | 8 ++++---- .../easyanimatev5_workflow_v2v_control.json | 8 ++++---- 12 files changed, 60 insertions(+), 41 deletions(-) diff --git a/comfyui/README.md b/comfyui/README.md index fdd4dfd..ea3538f 100644 --- a/comfyui/README.md +++ b/comfyui/README.md @@ -64,7 +64,7 @@ EasyAnimateV5: ## Node types - **LoadEasyAnimateModel** - Loads the EasyAnimate model -- **TextBox** +- **EasyAnimate_TextBox** - Write the prompt for EasyAnimate model - **EasyAnimateI2VSampler** - EasyAnimate Sampler for Image to Video diff --git a/comfyui/comfyui_nodes.py b/comfyui/comfyui_nodes.py index 0364d95..2ab8d84 100644 --- a/comfyui/comfyui_nodes.py +++ b/comfyui/comfyui_nodes.py @@ -339,6 +339,23 @@ class TextBox: def process(self, prompt): return (prompt, ) +class EasyAnimate_TextBox: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "prompt": ("STRING", {"multiline": True, "default": "",}), + } + } + + RETURN_TYPES = ("STRING_PROMPT",) + RETURN_NAMES =("prompt",) + FUNCTION = "process" + CATEGORY = "EasyAnimateWrapper" + + def process(self, prompt): + return (prompt, ) + class EasyAnimateI2VSampler: @classmethod def INPUT_TYPES(s): @@ -916,6 +933,7 @@ class EasyAnimateV5_V2VSampler(EasyAnimateV2VSampler): NODE_CLASS_MAPPINGS = { "TextBox": TextBox, + "EasyAnimate_TextBox": EasyAnimate_TextBox, "LoadEasyAnimateModel": LoadEasyAnimateModel, "LoadEasyAnimateLora": LoadEasyAnimateLora, "EasyAnimateI2VSampler": EasyAnimateI2VSampler, @@ -929,6 +947,7 @@ NODE_CLASS_MAPPINGS = { NODE_DISPLAY_NAME_MAPPINGS = { "TextBox": "TextBox", + "EasyAnimate_TextBox": "EasyAnimate_TextBox", "LoadEasyAnimateModel": "Load EasyAnimate Model", "LoadEasyAnimateLora": "Load EasyAnimate Lora", "EasyAnimateI2VSampler": "EasyAnimate Sampler for Image to Video", diff --git a/comfyui/v3/easyanimatev3_workflow_i2v.json b/comfyui/v3/easyanimatev3_workflow_i2v.json index 76969ca..37bb88e 100644 --- a/comfyui/v3/easyanimatev3_workflow_i2v.json +++ b/comfyui/v3/easyanimatev3_workflow_i2v.json @@ -4,7 +4,7 @@ "nodes": [ { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -29,7 +29,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -311,7 +311,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -336,7 +336,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "fireworks display over night city. The video is of high quality, and the view is very clear. High quality, masterpiece, best quality, highres, ultra-detailed, fantastic. " diff --git a/comfyui/v3/easyanimatev3_workflow_t2v.json b/comfyui/v3/easyanimatev3_workflow_t2v.json index 19394d3..7d23aa3 100644 --- a/comfyui/v3/easyanimatev3_workflow_t2v.json +++ b/comfyui/v3/easyanimatev3_workflow_t2v.json @@ -50,7 +50,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -75,7 +75,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -159,7 +159,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -184,7 +184,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "A young woman with beautiful and clear eyes and blonde hair standing and white dress in a forest wearing a crown. She seems to be lost in thought, and the camera focuses on her face. The video is of high quality, and the view is very clear. High quality, masterpiece, best quality, highres, ultra-detailed, fantastic." diff --git a/comfyui/v4/easyanimatev4_workflow_i2v.json b/comfyui/v4/easyanimatev4_workflow_i2v.json index ed8ad2a..4887d9c 100644 --- a/comfyui/v4/easyanimatev4_workflow_i2v.json +++ b/comfyui/v4/easyanimatev4_workflow_i2v.json @@ -4,7 +4,7 @@ "nodes": [ { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -29,7 +29,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -79,7 +79,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -104,7 +104,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "fireworks display over night city. The video is of high quality, and the view is very clear. High quality, masterpiece, best quality, highres, ultra-detailed, fantastic." diff --git a/comfyui/v4/easyanimatev4_workflow_lora.json b/comfyui/v4/easyanimatev4_workflow_lora.json index 6aaa034..583fc42 100644 --- a/comfyui/v4/easyanimatev4_workflow_lora.json +++ b/comfyui/v4/easyanimatev4_workflow_lora.json @@ -50,7 +50,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -75,7 +75,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -83,7 +83,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -108,7 +108,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" diff --git a/comfyui/v4/easyanimatev4_workflow_t2v.json b/comfyui/v4/easyanimatev4_workflow_t2v.json index 3e977c4..2bf8916 100644 --- a/comfyui/v4/easyanimatev4_workflow_t2v.json +++ b/comfyui/v4/easyanimatev4_workflow_t2v.json @@ -50,7 +50,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -75,7 +75,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -159,7 +159,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -184,7 +184,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "A young woman with beautiful and clear eyes and blonde hair standing and white dress in a forest wearing a crown. She seems to be lost in thought, and the camera focuses on her face. The video is of high quality, and the view is very clear. High quality, masterpiece, best quality, highres, ultra-detailed, fantastic." diff --git a/comfyui/v4/easyanimatev4_workflow_v2v.json b/comfyui/v4/easyanimatev4_workflow_v2v.json index 68ff44a..b0c799a 100644 --- a/comfyui/v4/easyanimatev4_workflow_v2v.json +++ b/comfyui/v4/easyanimatev4_workflow_v2v.json @@ -50,7 +50,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, 160 @@ -75,7 +75,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "The video is not of a high quality, it has a low resolution, and the audio quality is not clear. Strange motion trajectory, a poor composition and deformed video, low resolution, duplicate and ugly, strange body structure, long and strange neck, bad teeth, bad eyes, bad limbs, bad hands, rotating camera, blurry camera, shaking camera. Deformation, low-resolution, blurry, ugly, distortion." @@ -106,7 +106,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": [ 250, -50 @@ -131,7 +131,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "一个漂亮的女人在弹吉他。视频质量高,画面清晰。高质量,杰作,最好的质量,高分辨率,超仔细。" diff --git a/comfyui/v5/easyanimatev5_workflow_i2v.json b/comfyui/v5/easyanimatev5_workflow_i2v.json index 0948a38..a44141f 100644 --- a/comfyui/v5/easyanimatev5_workflow_i2v.json +++ b/comfyui/v5/easyanimatev5_workflow_i2v.json @@ -281,7 +281,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": -50 @@ -307,7 +307,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "夜城烟花汇演" @@ -315,7 +315,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": 160 @@ -341,7 +341,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "扭曲的身体,肢体残缺,文本字幕,漫画,静止,丑陋,错误,乱码。" diff --git a/comfyui/v5/easyanimatev5_workflow_t2v.json b/comfyui/v5/easyanimatev5_workflow_t2v.json index 93a100f..4ce48b7 100644 --- a/comfyui/v5/easyanimatev5_workflow_t2v.json +++ b/comfyui/v5/easyanimatev5_workflow_t2v.json @@ -151,7 +151,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": -50 @@ -177,7 +177,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "一位年轻女子,有着美丽清澈的眼睛和金发,站在森林里,穿着白色的衣服,戴着皇冠。她似乎陷入了沉思,相机聚焦在她的脸上。质量高、杰作、最佳品质、高分辨率、超精细、梦幻般。" @@ -185,7 +185,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": 160 @@ -211,7 +211,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "扭曲的身体,肢体残缺,文本字幕,漫画,静止,丑陋,错误,乱码。" diff --git a/comfyui/v5/easyanimatev5_workflow_v2v.json b/comfyui/v5/easyanimatev5_workflow_v2v.json index 67d3121..3c4fd5f 100644 --- a/comfyui/v5/easyanimatev5_workflow_v2v.json +++ b/comfyui/v5/easyanimatev5_workflow_v2v.json @@ -116,7 +116,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": 160 @@ -142,7 +142,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "扭曲的身体,肢体残缺,文本字幕,漫画,静止,丑陋,错误,乱码。" @@ -150,7 +150,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": -50 @@ -176,7 +176,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "一个漂亮的女人在弹吉他。视频质量高,画面清晰。高质量,杰作,最好的质量,高分辨率,超仔细。" diff --git a/comfyui/v5/easyanimatev5_workflow_v2v_control.json b/comfyui/v5/easyanimatev5_workflow_v2v_control.json index c5caa61..2d48294 100644 --- a/comfyui/v5/easyanimatev5_workflow_v2v_control.json +++ b/comfyui/v5/easyanimatev5_workflow_v2v_control.json @@ -79,7 +79,7 @@ }, { "id": 73, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": 160 @@ -105,7 +105,7 @@ ], "title": "Negtive Prompt(反向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "扭曲的身体,肢体残缺,文本字幕,漫画,静止,丑陋,错误,乱码。" @@ -315,7 +315,7 @@ }, { "id": 75, - "type": "TextBox", + "type": "EasyAnimate_TextBox", "pos": { "0": 250, "1": -50 @@ -341,7 +341,7 @@ ], "title": "Positive Prompt(正向提示词)", "properties": { - "Node name for S&R": "TextBox" + "Node name for S&R": "EasyAnimate_TextBox" }, "widgets_values": [ "一个穿着及膝白色无袖连衣裙和白色高跟凉鞋的美女在一个光线充足、木地板的房间里跳舞。房间的背景是一扇紧闭的门、一个展示透明玻璃瓶酒精饮料的架子和一个部分可见的深色沙发。"