diff --git a/js/impact-pack.js b/js/impact-pack.js index 4cc1aba..21dd006 100644 --- a/js/impact-pack.js +++ b/js/impact-pack.js @@ -667,22 +667,18 @@ app.registerExtension({ break; } - const { onWidgetChanged } = node - node.onWidgetChanged = function (widgetName, value, oldValue, widget) { - const result = onWidgetChanged?.apply(this, arguments) + node.widgets[combo_id+1].callback = (value, canvas, node, pos, e) => { + if(node.widgets[tbox_id].value != '') + node.widgets[tbox_id].value += ', ' - if (value != "Select the Wildcard to add to the text") { - if(node.widgets[tbox_id].value != '') - node.widgets[tbox_id].value += ', ' - - node.widgets[tbox_id].value += value; - } - - return result - } + node.widgets[tbox_id].value += node._wildcard_value; + } Object.defineProperty(node.widgets[combo_id+1], "value", { - set: (value) => {}, + set: (value) => { + if (value !== "Select the Wildcard to add to the text") + node._wildcard_value = value; + }, get: () => { return "Select the Wildcard to add to the text"; } }); diff --git a/js/impact-sam-editor.js b/js/impact-sam-editor.js index e7bf6f2..cb34309 100644 --- a/js/impact-sam-editor.js +++ b/js/impact-sam-editor.js @@ -353,13 +353,16 @@ class ImpactSamEditorDialog extends ComfyDialog { imgCtx.drawImage(orig_image, 0, 0, drawWidth, drawHeight); // update mask + let w = (drawWidth * imgCanvas.clientWidth/imgCanvas.width) + "px"; + let h = (drawHeight * imgCanvas.clientHeight/imgCanvas.height) + "px"; + pointsCanvas.width = drawWidth; pointsCanvas.height = drawHeight; pointsCanvas.style.top = imgCanvas.offsetTop + "px"; pointsCanvas.style.left = imgCanvas.offsetLeft + "px"; - maskCanvas.width = drawWidth; - maskCanvas.height = drawHeight; + maskCanvas.style.width = w; + maskCanvas.style.height = h; maskCanvas.style.top = imgCanvas.offsetTop + "px"; maskCanvas.style.left = imgCanvas.offsetLeft + "px"; diff --git a/modules/impact/config.py b/modules/impact/config.py index 1de4647..1d7a695 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -1,7 +1,7 @@ import configparser import os -version_code = [7, 12] +version_code = [7, 13] version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') dependency_version = 24 diff --git a/pyproject.toml b/pyproject.toml index 4be81dd..0199293 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-impact-pack" description = "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler." -version = "7.12" +version = "7.13" license = { file = "LICENSE.txt" } dependencies = ["segment-anything", "scikit-image", "piexif", "transformers", "opencv-python-headless", "GitPython", "scipy>=1.11.4"]