@@ -511,6 +511,9 @@ function applyVHSAudioLinksFix(nodeType, nodeData, audio_slot) {
511511 } )
512512}
513513function 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}
545548function 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