mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-17 00:43:48 +08:00
easy way to exclude json from dynamic prompt manipulation
This commit is contained in:
parent
4eab00e14b
commit
922540947c
@ -17,7 +17,7 @@ app.registerExtension({
|
|||||||
// Locate dynamic prompt text widgets
|
// Locate dynamic prompt text widgets
|
||||||
// Include any widgets with dynamicPrompts set to true, and customtext
|
// Include any widgets with dynamicPrompts set to true, and customtext
|
||||||
const widgets = node.widgets.filter(
|
const widgets = node.widgets.filter(
|
||||||
(n) => (n.type === "customtext" && n.dynamicPrompts !== false) || n.dynamicPrompts
|
widget => widget.dynamicPrompts || (widget.customtext && !widget.widgets.some(subWidget => subWidget.name.toLowerCase().includes("json")))
|
||||||
);
|
);
|
||||||
for (const widget of widgets) {
|
for (const widget of widgets) {
|
||||||
// Override the serialization of the value to resolve dynamic prompts for all widgets supporting it in this node
|
// Override the serialization of the value to resolve dynamic prompts for all widgets supporting it in this node
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user