diff --git a/nodes/image_nodes.py b/nodes/image_nodes.py index 32b78a0..1fcc417 100644 --- a/nodes/image_nodes.py +++ b/nodes/image_nodes.py @@ -546,7 +546,6 @@ class AddLabel: "caption": ("STRING", {"default": "", "forceInput": True}), } } - RETURN_TYPES = ("IMAGE",) FUNCTION = "addlabel" CATEGORY = "KJNodes/text" @@ -606,7 +605,7 @@ ComfyUI/custom_nodes/ComfyUI-KJNodes/fonts if caption == "": processed_images = [process_image(img, text) for img in image] else: - assert len(caption) == batch_size, "Number of captions does not match number of images" + assert len(caption) == batch_size, f"Number of captions {(len(caption))} does not match number of images" processed_images = [process_image(img, cap) for img, cap in zip(image, caption)] processed_batch = torch.cat(processed_images, dim=0) diff --git a/web/js/jsnodes.js b/web/js/jsnodes.js index 911464a..8442843 100644 --- a/web/js/jsnodes.js +++ b/web/js/jsnodes.js @@ -79,7 +79,7 @@ app.registerExtension({ case "GetMaskSizeAndCount": const onGetMaskSizeConnectInput = nodeType.prototype.onConnectInput; nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { - const v = onGetMaskSizeConnectInput?.(this, arguments); + const v = onGetMaskSizeConnectInput? onGetMaskSizeConnectInput.apply(this, arguments): undefined this.outputs[1]["name"] = "width" this.outputs[2]["name"] = "height" this.outputs[3]["name"] = "count" @@ -99,7 +99,7 @@ app.registerExtension({ case "GetImageSizeAndCount": const onGetImageSizeConnectInput = nodeType.prototype.onConnectInput; nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { - const v = onGetImageSizeConnectInput?.(this, arguments); + const v = onGetImageSizeConnectInput? onGetImageSizeConnectInput.apply(this, arguments): undefined this.outputs[1]["name"] = "width" this.outputs[2]["name"] = "height" this.outputs[3]["name"] = "count" @@ -119,7 +119,7 @@ app.registerExtension({ case "PreviewAnimation": const onPreviewAnimationConnectInput = nodeType.prototype.onConnectInput; nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { - const v = onPreviewAnimationConnectInput?.(this, arguments); + const v = onPreviewAnimationConnectInput? onPreviewAnimationConnectInput.apply(this, arguments): undefined this.title = "Preview Animation" return v; } @@ -135,7 +135,7 @@ app.registerExtension({ case "VRAM_Debug": const onVRAM_DebugConnectInput = nodeType.prototype.onConnectInput; nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { - const v = onVRAM_DebugConnectInput?.(this, arguments); + const v = onVRAM_DebugConnectInput? onVRAM_DebugConnectInput.apply(this, arguments): undefined this.outputs[3]["name"] = "freemem_before" this.outputs[4]["name"] = "freemem_after" return v;