From b388c35a09ff72942e5e0a2c16a141b657ecd7a0 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sat, 13 Jun 2026 02:40:31 +0300 Subject: [PATCH] Revert "Allow VAE loaders to wire live preview in guided mode." This reverts commit a35f2ae2b341ac9a03716c65e9d39ad5171ebe5a. --- movie_editor/backend/pipeline_wiring.py | 10 ------ movie_editor/frontend/models.js | 39 ++++------------------ movie_editor/tests/test_pipeline_wiring.py | 10 ------ 3 files changed, 7 insertions(+), 52 deletions(-) diff --git a/movie_editor/backend/pipeline_wiring.py b/movie_editor/backend/pipeline_wiring.py index d3200faa..5ba7c701 100644 --- a/movie_editor/backend/pipeline_wiring.py +++ b/movie_editor/backend/pipeline_wiring.py @@ -42,11 +42,6 @@ GUIDED_HIDDEN_PORTS: frozenset[str] = frozenset({ "LTXVConcatAVLatent.video_latent", # Studio output 12 -> concat (CORE_LINKS) }) -# Optional VAE sinks — any VAE loader may wire here in guided mode (separate from main vae). -OPTIONAL_VAE_PORTS: tuple[str, ...] = ( - "FunPackLTXAVSceneChainSampler.preview_vae", -) - DEFAULT_WIRES_BY_ROLE: dict[str, dict[str, str]] = { "unet": {"MODEL": "port:FunPackStudio.model"}, "clip": {"CLIP": "port:FunPackStudio.clip"}, @@ -130,10 +125,6 @@ def allowed_port_ids(role: str, out_type: str, out_name: Optional[str] = None) - for port in TYPE_CHAIN_TERMINALS.get(out_type, []): if port not in out: out.append(port) - if out_type == "VAE": - for port in OPTIONAL_VAE_PORTS: - if port not in out: - out.append(port) return out @@ -259,7 +250,6 @@ def wiring_rules_payload() -> dict[str, Any]: "default_wires": DEFAULT_WIRES_BY_ROLE, "default_input_sources": DEFAULT_INPUT_SOURCES_BY_ROLE, "port_labels": PORT_LABELS, - "optional_vae_ports": list(OPTIONAL_VAE_PORTS), "open_core_ports": [ {"core_id": cid, "input": inp, "port": port} for port, (cid, inp) in PORT_TO_OPEN_CORE.items() diff --git a/movie_editor/frontend/models.js b/movie_editor/frontend/models.js index f0898110..97b19af8 100644 --- a/movie_editor/frontend/models.js +++ b/movie_editor/frontend/models.js @@ -118,43 +118,18 @@ return extras; } - function _guidedPortAllowlist(role, out) { - const rules = wiringRules.role_targets?.[role] || []; - const chainPorts = wiringRules.type_chain_terminals?.[out.type] || []; - let allowedPorts = [...rules - .filter((r) => r.type === out.type && (r.output_name == null || r.output_name === out.name)) - .map((r) => "port:" + r.port), - ...chainPorts.map((p) => "port:" + p), - ].filter((p, i, a) => a.indexOf(p) === i); - if (role === "custom" && !allowedPorts.length) { - for (const rlist of Object.values(wiringRules.role_targets || {})) { - for (const r of rlist) { - if (r.type !== out.type) continue; - if (r.output_name != null && r.output_name !== out.name) continue; - const v = "port:" + r.port; - if (!allowedPorts.includes(v)) allowedPorts.push(v); - } - } - for (const p of chainPorts) { - const v = "port:" + p; - if (!allowedPorts.includes(v)) allowedPorts.push(v); - } - } - if (out.type === "VAE") { - for (const p of wiringRules.optional_vae_ports || []) { - const v = "port:" + p; - if (!allowedPorts.includes(v)) allowedPorts.push(v); - } - } - return allowedPorts; - } - function allowedDestinations(slot, out) { const all = destinations(slot, out.type); if (!pipelineLocked()) return all; const role = slot.role || "custom"; + const rules = wiringRules.role_targets?.[role] || []; + const chainPorts = wiringRules.type_chain_terminals?.[out.type] || []; const hidden = new Set(wiringRules.guided_hidden_ports || []); - const allowedPorts = _guidedPortAllowlist(role, out); + const allowedPorts = [...rules + .filter((r) => r.type === out.type && (r.output_name == null || r.output_name === out.name)) + .map((r) => "port:" + r.port), + ...chainPorts.map((p) => "port:" + p), + ].filter((p, i, a) => a.indexOf(p) === i); return all.filter((d) => { if (!d.value.startsWith("port:")) return true; const id = d.value.slice(5); diff --git a/movie_editor/tests/test_pipeline_wiring.py b/movie_editor/tests/test_pipeline_wiring.py index f0078389..9c2550ec 100644 --- a/movie_editor/tests/test_pipeline_wiring.py +++ b/movie_editor/tests/test_pipeline_wiring.py @@ -163,16 +163,6 @@ def test_core_overrides_internal_still_ignored_when_guided(): assert graph["sampler"]["inputs"]["vae"] == ["slot_v", 0] -def test_video_vae_may_wire_live_preview(): - ok = pipeline_wiring.validate_port_wire( - role="video_vae", out_type="VAE", out_name="VAE", - target="port:FunPackLTXAVSceneChainSampler.preview_vae", models={"slots": []}, - ) - assert ok is None - ports = pipeline_wiring.allowed_port_ids("video_vae", "VAE", "VAE") - assert "FunPackLTXAVSceneChainSampler.preview_vae" in ports - - def test_core_graph_marks_locked_inputs(): nodes = builder.core_graph(OI, {"slots": [], "full_control": False}) studio = next(n for n in nodes if n["id"] == "studio")