mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-29 19:01:27 +00:00
Force min length 1 when tokenizing for text generation. (#12538)
This commit is contained in:
@@ -42,7 +42,7 @@ class TextGenerate(io.ComfyNode):
|
||||
@classmethod
|
||||
def execute(cls, clip, prompt, max_length, sampling_mode, image=None) -> io.NodeOutput:
|
||||
|
||||
tokens = clip.tokenize(prompt, image=image, skip_template=False)
|
||||
tokens = clip.tokenize(prompt, image=image, skip_template=False, min_length=1)
|
||||
|
||||
# Get sampling parameters from dynamic combo
|
||||
do_sample = sampling_mode.get("sampling_mode") == "on"
|
||||
|
||||
Reference in New Issue
Block a user