fix: preserve loader state and migrate audio/video workflow inputs
Refs #23. Keep Image Enable, delegate Core mode accessors, and remove widget-array mutation. Use Core Audio and Core Video with an Enable-free FPS adapter. Legacy loader IDs remain compatible. Focused CPU tests pass; Windows/browser acceptance remains pending.
This commit is contained in:
+3
-41
@@ -1,41 +1,3 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { configureExistingEasyBypassWidgetNode } from "./easy_bypass_toggle.js";
|
||||
|
||||
const EASY_LOAD_VIDEO_CLASS = "H3ContinuumLoadVideo";
|
||||
|
||||
function configureEasyLoadVideoNode(node) {
|
||||
if (
|
||||
node?.comfyClass !== EASY_LOAD_VIDEO_CLASS &&
|
||||
node?.type !== EASY_LOAD_VIDEO_CLASS
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
configureExistingEasyBypassWidgetNode(node, {
|
||||
nodeClass: EASY_LOAD_VIDEO_CLASS,
|
||||
widgetNames: ["enable_video", "Enable Video"],
|
||||
});
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
"H3 Continuum Load Video bypass appearance synchronization was skipped; backend blocking remains available.",
|
||||
error,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
app.registerExtension({
|
||||
name: "H3Continuum.EasyLoadVideo",
|
||||
|
||||
nodeCreated(node) {
|
||||
configureEasyLoadVideoNode(node);
|
||||
},
|
||||
|
||||
loadedGraphNode(node) {
|
||||
configureEasyLoadVideoNode(node);
|
||||
},
|
||||
|
||||
afterConfigureGraph() {
|
||||
for (const node of app.graph?._nodes || []) configureEasyLoadVideoNode(node);
|
||||
},
|
||||
});
|
||||
// Legacy H3ContinuumLoadVideo keeps its saved backend enable_video input.
|
||||
// Do not mirror it into node.mode or alter Core widget arrays/drawing.
|
||||
// New workflows use Core LoadVideo -> H3ContinuumVideoAdapter (no Enable).
|
||||
|
||||
Reference in New Issue
Block a user