Skip to content

Commit 744ac94

Browse files
Don't make dynamicPrompts the default on multiline string inputs.
This should be less confusing to those who want to use multiline input without them.
1 parent 58812ab commit 744ac94

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

comfy_extras/nodes_clip_sdxl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def INPUT_TYPES(s):
88
"ascore": ("FLOAT", {"default": 6.0, "min": 0.0, "max": 1000.0, "step": 0.01}),
99
"width": ("INT", {"default": 1024.0, "min": 0, "max": MAX_RESOLUTION}),
1010
"height": ("INT", {"default": 1024.0, "min": 0, "max": MAX_RESOLUTION}),
11-
"text": ("STRING", {"multiline": True}), "clip": ("CLIP", ),
11+
"text": ("STRING", {"multiline": True, "dynamicPrompts": True}), "clip": ("CLIP", ),
1212
}}
1313
RETURN_TYPES = ("CONDITIONING",)
1414
FUNCTION = "encode"
@@ -30,8 +30,8 @@ def INPUT_TYPES(s):
3030
"crop_h": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION}),
3131
"target_width": ("INT", {"default": 1024.0, "min": 0, "max": MAX_RESOLUTION}),
3232
"target_height": ("INT", {"default": 1024.0, "min": 0, "max": MAX_RESOLUTION}),
33-
"text_g": ("STRING", {"multiline": True, "default": "CLIP_G"}), "clip": ("CLIP", ),
34-
"text_l": ("STRING", {"multiline": True, "default": "CLIP_L"}), "clip": ("CLIP", ),
33+
"text_g": ("STRING", {"multiline": True, "dynamicPrompts": True}), "clip": ("CLIP", ),
34+
"text_l": ("STRING", {"multiline": True, "dynamicPrompts": True}), "clip": ("CLIP", ),
3535
}}
3636
RETURN_TYPES = ("CONDITIONING",)
3737
FUNCTION = "encode"

comfy_extras/nodes_cond.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class CLIPTextEncodeControlnet:
44
@classmethod
55
def INPUT_TYPES(s):
6-
return {"required": {"clip": ("CLIP", ), "conditioning": ("CONDITIONING", ), "text": ("STRING", {"multiline": True})}}
6+
return {"required": {"clip": ("CLIP", ), "conditioning": ("CONDITIONING", ), "text": ("STRING", {"multiline": True, "dynamicPrompts": True})}}
77
RETURN_TYPES = ("CONDITIONING",)
88
FUNCTION = "encode"
99

comfy_extras/nodes_photomaker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def INPUT_TYPES(s):
141141
return {"required": { "photomaker": ("PHOTOMAKER",),
142142
"image": ("IMAGE",),
143143
"clip": ("CLIP", ),
144-
"text": ("STRING", {"multiline": True, "default": "photograph of photomaker"}),
144+
"text": ("STRING", {"multiline": True, "dynamicPrompts": True, "default": "photograph of photomaker"}),
145145
}}
146146

147147
RETURN_TYPES = ("CONDITIONING",)

nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def interrupt_processing(value=True):
4747
class CLIPTextEncode:
4848
@classmethod
4949
def INPUT_TYPES(s):
50-
return {"required": {"text": ("STRING", {"multiline": True}), "clip": ("CLIP", )}}
50+
return {"required": {"text": ("STRING", {"multiline": True, "dynamicPrompts": True}), "clip": ("CLIP", )}}
5151
RETURN_TYPES = ("CONDITIONING",)
5252
FUNCTION = "encode"
5353

@@ -966,7 +966,7 @@ def INPUT_TYPES(s):
966966
return {"required": {"conditioning_to": ("CONDITIONING", ),
967967
"clip": ("CLIP", ),
968968
"gligen_textbox_model": ("GLIGEN", ),
969-
"text": ("STRING", {"multiline": True}),
969+
"text": ("STRING", {"multiline": True, "dynamicPrompts": True}),
970970
"width": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}),
971971
"height": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}),
972972
"x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}),

web/extensions/core/dynamicPrompts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ app.registerExtension({
1717
// Locate dynamic prompt text widgets
1818
// Include any widgets with dynamicPrompts set to true, and customtext
1919
const widgets = node.widgets.filter(
20-
(n) => (n.type === "customtext" && n.dynamicPrompts !== false) || n.dynamicPrompts
20+
(n) => n.dynamicPrompts
2121
);
2222
for (const widget of widgets) {
2323
// Override the serialization of the value to resolve dynamic prompts for all widgets supporting it in this node

0 commit comments

Comments
 (0)