Skip to content

Commit 90ec3e7

Browse files
committed
fix zero
1 parent 33d601b commit 90ec3e7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

node/creative.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def INPUT_TYPES(s):
6363
OUTPUT_IS_LIST = (True,)
6464

6565
def get_prompt(self, prompt, max_prompts, seed):
66+
if prompt == "":
67+
return ([""],)
6668
generator = CombinatorialPromptGenerator(wildcard_manager=wm)
6769
list_prompt = generator.generate(prompt, max_prompts=1000)
6870
print(f"Max prompt: {len(list_prompt)}")

node/load.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,6 @@ def INPUT_TYPES(s):
576576
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "tooltip": "Seed ngẫu nhiên cho prompt."}),
577577
"clip": ("CLIP", {"tooltip": "Mô hình CLIP dùng để mã hóa prompt."}),
578578

579-
},
580-
"optional": {
581-
"image": ("IMAGE", {"tooltip": "Ảnh đầu vào để mã hóa, nếu có."}),
582579
}
583580
}
584581
RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "STRING")
@@ -590,13 +587,14 @@ def INPUT_TYPES(s):
590587
CATEGORY = "📂 SDVN"
591588
DESCRIPTION = "Mã hóa prompt văn bản bằng CLIP để hướng dẫn mô hình diffusion sinh ảnh."
592589

593-
def encode(self, clip, positive, negative, style, translate, seed, image = None):
590+
def encode(self, clip, positive, negative, style, translate, seed):
594591
if style != "None":
595592
positive = f"{positive}, {style_list()[1][style_list()[0].index(style)][1]}"
596593
negative = f"{negative}, {style_list()[1][style_list()[0].index(style)][2]}" if len(style_list()[1][style_list()[0].index(style)]) > 2 else ""
597594

598595
positive = ALL_NODE["SDVN Random Prompt"]().get_prompt(positive, 1, seed)[0][0]
599596
negative = ALL_NODE["SDVN Random Prompt"]().get_prompt(negative, 1, seed)[0][0]
597+
600598
positive = ALL_NODE["SDVN Translate"]().ggtranslate(positive,translate)[0]
601599
negative = ALL_NODE["SDVN Translate"]().ggtranslate(negative,translate)[0]
602600
prompt =f"""

0 commit comments

Comments
 (0)