Skip to content

Commit 05f7531

Browse files
authored
nodes_textgen: Implement use_default_template for LTX (Comfy-Org#13451)
1 parent c033bbf commit 05f7531

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

comfy_extras/nodes_textgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ def define_schema(cls):
161161
)
162162

163163
@classmethod
164-
def execute(cls, clip, prompt, max_length, sampling_mode, image=None, thinking=False) -> io.NodeOutput:
164+
def execute(cls, clip, prompt, max_length, sampling_mode, image=None, thinking=False, use_default_template=True) -> io.NodeOutput:
165165
if image is None:
166166
formatted_prompt = f"<start_of_turn>system\n{LTX2_T2V_SYSTEM_PROMPT.strip()}<end_of_turn>\n<start_of_turn>user\nUser Raw Input Prompt: {prompt}.<end_of_turn>\n<start_of_turn>model\n"
167167
else:
168168
formatted_prompt = f"<start_of_turn>system\n{LTX2_I2V_SYSTEM_PROMPT.strip()}<end_of_turn>\n<start_of_turn>user\n\n<image_soft_token>\n\nUser Raw Input Prompt: {prompt}.<end_of_turn>\n<start_of_turn>model\n"
169-
return super().execute(clip, formatted_prompt, max_length, sampling_mode, image, thinking)
169+
return super().execute(clip, formatted_prompt, max_length, sampling_mode, image, thinking, use_default_template)
170170

171171

172172
class TextgenExtension(ComfyExtension):

0 commit comments

Comments
 (0)