Skip to content

Commit a7ce59e

Browse files
committed
Fix Use Everywhere compatibility
1 parent 598e181 commit a7ce59e

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-videohelpersuite"
33
description = "Nodes related to video workflows"
4-
version = "1.6.0"
4+
version = "1.6.1"
55
license = { file = "LICENSE" }
66
dependencies = ["opencv-python", "imageio-ffmpeg"]
77

web/js/VHS.core.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ function applyVHSAudioLinksFix(nodeType, nodeData, audio_slot) {
511511
})
512512
}
513513
function addVAEOutputToggle(nodeType, nodeData) {
514+
chainCallback(nodeType.prototype, "onNodeCreated", function() {
515+
this.reject_ue_connection = (input) => input?.name == "vae"
516+
})
514517
chainCallback(nodeType.prototype, "onConnectionsChange", function(contype, slot, iscon, linfo) {
515518
let slotType = this.inputs[slot]?.type
516519
if (contype == LiteGraph.INPUT && slotType == "VAE") {
@@ -543,6 +546,9 @@ function addVAEOutputToggle(nodeType, nodeData) {
543546
});
544547
}
545548
function addVAEInputToggle(nodeType, nodeData) {
549+
chainCallback(nodeType.prototype, "onNodeCreated", function() {
550+
this.reject_ue_connection = (input) => input?.name == "vae"
551+
})
546552
chainCallback(nodeType.prototype, "onConnectionsChange", function(contype, slot, iscon, linf) {
547553
if (contype == LiteGraph.INPUT && slot == 3 && this.inputs[3].type == "VAE") {
548554
if (iscon && linf) {
@@ -2134,18 +2140,9 @@ app.registerExtension({
21342140
}
21352141
},
21362142
async setup() {
2137-
//cg-use-everywhere link workaround
2138-
//particularly invasive, plan to remove
21392143
let originalGraphToPrompt = app.graphToPrompt
21402144
let graphToPrompt = async function() {
21412145
let res = await originalGraphToPrompt.apply(this, arguments);
2142-
for (let n of app.graph._nodes) {
2143-
if (n?.type?.startsWith('VHS_LoadVideo')) {
2144-
if (!n?.inputs[1]?.link && res?.output[n.id]?.inputs?.vae) {
2145-
delete res.output[n.id].inputs.vae
2146-
}
2147-
}
2148-
}
21492146
res.workflow.extra['VHS_latentpreview'] = app.ui.settings.getSettingValue("VHS.LatentPreview")
21502147
res.workflow.extra['VHS_latentpreviewrate'] = app.ui.settings.getSettingValue("VHS.LatentPreviewRate")
21512148
res.workflow.extra['VHS_MetadataImage'] = app.ui.settings.getSettingValue("VHS.MetadataImage")

0 commit comments

Comments
 (0)