mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 21:04:41 +08:00
js fixes
This commit is contained in:
parent
adb35ee233
commit
7ea33f68fc
@ -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)
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user