From 72dc11aa73fea4796a67fe0c182bbf7437c908c8 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Fri, 21 Jul 2023 20:56:13 +0900 Subject: [PATCH] bugfix: conflict with pyssss/presetText.js --- README.md | 3 ++- js/impact-pack.js | 13 +++---------- modules/impact/config.py | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c68de2c..dac0f99 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,8 @@ This takes latent as input and outputs latent as the result. * Switch (image,mask), Switch (latent), Switch (SEGS) - Among multiple inputs, it selects the input designated by the selector and outputs it. The first input must be provided, while the others are optional. However, if the input specified by the selector is not connected, an error may occur. * ImpactWildcardProcessor - The text is generated by processing the wildcard in the Text. If the mode is set to "populate", a dynamic prompt is generated with each execution and the input is filled in the second textbox. If the mode is set to "fixed", the content of the second textbox remains unchanged. * When an image is generated with the "fixed" mode, the prompt used for that particular generation is stored in the metadata. - * Known Issue: The presetText.js script from **pythongosssss's [ComfyUI-Custom-Scripts](https://github.com/pythongosssss/ComfyUI-Custom-Scripts)** is causing a conflict, preventing it from being used together. + * Known Issue: The old version of `presetText.js` script from **pythongosssss's [ComfyUI-Custom-Scripts](https://github.com/pythongosssss/ComfyUI-Custom-Scripts)** is causing a conflict, preventing it from being used together. + If you'd installed that extension before (Jul 22, 2023). Please update to latest version. * RegionalSampler, CombineRegionalPrompts, RegionalPrompt - experimental feature - multiple region version of TwoAdvancedSamplersForMask diff --git a/js/impact-pack.js b/js/impact-pack.js index 83a2d14..fb67152 100644 --- a/js/impact-pack.js +++ b/js/impact-pack.js @@ -184,6 +184,7 @@ app.registerExtension({ if(widget.type === "customtext") { widget.dynamicPrompts = false; widget.inputEl.placeholder = "wildcard spec: if kept empty, this option will be ignored"; + widget.serializeValue = (n,i) => { return n.widgets_values[i]; }; } } } @@ -233,16 +234,8 @@ app.registerExtension({ } }); - // prevent hooking by dynamicPrompt.js - Object.defineProperty(node.widgets[0], "serializeValue", { - set: () => {}, - get: () => { return (n,i) => { return n.widgets_values[i]; }; } - }); - - Object.defineProperty(node.widgets[1], "serializeValue", { - set: () => {}, - get: () => { return force_serializeValue; } - }); + node.widgets[0].serializeValue = (n,i) => { return n.widgets_values[i]; }; + node.widgets[1].serializeValue = force_serializeValue; } if (node.comfyClass == "PreviewBridge" || node.comfyClass == "MaskPainter") { diff --git a/modules/impact/config.py b/modules/impact/config.py index 00b12cf..af9d05f 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -1,7 +1,7 @@ import configparser import os -version = "V2.22" +version = "V2.22.1" dependency_version = 1