feat(director v2): render preview tiny-VAE combo socketless (model-selector look)

The combo widget still carried a hollow optional input dot on the node edge
because the new frontend adds a widget-linked input socket for every non-
socketless widget. Mark preview_tiny_vae socketless (legacy dict key, same
pattern KJNodes uses in curve_nodes.py) so it renders like the VAE loader's
model-selector dropdown with no dot. Combo still sourced from
models/vae_approx. Align .tests + docs with source.
This commit is contained in:
Darksidewalker
2026-08-23 10:43:00 +02:00
parent 6557afd7ed
commit 301aed54be
3 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -86,10 +86,12 @@ def test_optional_sampling_sockets_present():
def test_preview_sockets_present():
opt = MiniMaxH3DirectorV2.INPUT_TYPES()["optional"]
# The tiny-VAE selector is a plain combo widget (no forceInput), not a
# linkable input socket — users pick it like any other dropdown.
# The tiny-VAE selector is a socketless combo widget — rendered like a
# model selector (e.g. the VAE loader's dropdown), no linkable input
# dot on the node edge.
assert opt["preview_tiny_vae"][0] == "STRING"
assert opt["preview_tiny_vae"][1].get("forceInput") is not True
assert opt["preview_tiny_vae"][1].get("socketless") is True
# The full-quality VAE path remains an optional input socket.
assert opt["preview_vae"][0] == "VAE"
# INPUT_TYPES() is evaluated once at node load: the combo value is the
+2 -2
View File
@@ -26,7 +26,7 @@ Since the last GitHub release (August 2026):
- **Cleaner toolbar:** consolidated into a single horizontal row with mode buttons on the left and Clear/Remove/? controls on the right; removed redundant bubble elements and pulsing glows for a quieter interface.
- **Dark-blue audio lane accent:** distinguishes the audio lane visually from the Image/Video lane and the green "+ empty-slot" indicators.
- **Sampling controls + external override sockets:** a new **Sampling** row exposes `sampler`, `scheduler`, `steps`, `shift_video` and `shift_audio` (persisted into the hidden `internal_execution` block, round-tripped through `timeline_data`). Five optional inputs (`external_sampler`, `external_scheduler`, `external_steps`, `external_shift_video`, `external_shift_audio`) let another node override them; precedence is external > internal > built-in default, and a connected socket disables the local fields with an "external sampling connected" note.
- **Built-in live step preview:** the Director now decodes per-step frames itself (no KJ preview node needed) and streams them into its own **Preview & Output** panel. Toggle and limits live in the ☰ *Preview & Output options* menu: **live step preview** (default on, true bypass when off), **max resolution** (default 1024 px), **frames** (1 = still JPEG, >1 = animated WebP or NVENC H.264 MP4) and **fps**. Decoding precedence: `preview_tiny_vae` widget (a `models/vae_approx` dropdown, e.g. `taeh3.safetensors`, the H3 tiny decoder core's VAELoader cannot build) > `preview_vae` socket (full-quality `vae.decode()`) > core previewer > latent-to-RGB fallback. The media preview popup is a third narrower than before (400 px instead of 600 px).
- **Built-in live step preview:** the Director now decodes per-step frames itself (no KJ preview node needed) and streams them into its own **Preview & Output** panel. Toggle and limits live in the ☰ *Preview & Output options* menu: **live step preview** (default on, true bypass when off), **max resolution** (default 1024 px), **frames** (1 = still JPEG, >1 = animated WebP or NVENC H.264 MP4) and **fps**. Decoding precedence: `preview_tiny_vae` widget (a socketless `models/vae_approx` dropdown — rendered like a model selector with no input dot on the node edge, e.g. `taeh3.safetensors`, the H3 tiny decoder core's VAELoader cannot build) > `preview_vae` socket (full-quality `vae.decode()`) > core previewer > latent-to-RGB fallback. The media preview popup is a third narrower than before (400 px instead of 600 px).
### Earlier additions
@@ -383,7 +383,7 @@ The Director decodes per-step denoising frames itself and streams them into its
- **Toggle:** **live step preview** in the ☰ *Preview & Output options* menu (default on). When off the backend skips the whole decode path (no tiny-VAE decode, no `send_sync`) — a true bypass, not just a hidden pane.
- **Limits:** `preview_max_resolution` (default 1024 px, 0 = full), `preview_frames` (1 = still JPEG; >1 = animated WebP, or NVENC H.264 MP4 when PyAV probes NVENC), `preview_fps` (default 12).
- **Decoder precedence:** `preview_tiny_vae` widget (a `models/vae_approx` filename combo, e.g. `taeh3.safetensors` — the special H3 tiny decoder that core's `VAELoader` cannot build) > `preview_vae` input socket (full-quality `vae.decode()`) > core latent previewer > latent-to-RGB fallback. The tiny-VAE path clamps output before uint8 because taeh3 output is not [0,1]-guaranteed.
- **Decoder precedence:** `preview_tiny_vae` socketless combo widget (a `models/vae_approx` filename selector, e.g. `taeh3.safetensors` — the special H3 tiny decoder that core's `VAELoader` cannot build; rendered like a model selector, no input socket) > `preview_vae` input socket (full-quality `vae.decode()`) > core latent previewer > latent-to-RGB fallback. The tiny-VAE path clamps output before uint8 because taeh3 output is not [0,1]-guaranteed.
- **KJ alternative:** a KJ `ModelPreviewOverrideKJ` in the chain remains a valid external preview. Because KJ's preview is a native `OUTER_SAMPLE` model wrapper — not a DOM hook on the graph sampler — its own widget also animates during the Director's internal-execution runs. Canonical wiring is unchanged: `Settings.MODEL → KJ.model → KJ.MODEL → Director.ref2va_model`.
## Dense prompting guide
+1 -1
View File
@@ -95,7 +95,7 @@ class MiniMaxH3DirectorV2:
"external_steps": ("INT", {"default": 0, "min": 0, "forceInput": True}),
"external_shift_video": ("FLOAT", {"default": 0.0, "min": 0.0, "forceInput": True}),
"external_shift_audio": ("FLOAT", {"default": 0.0, "min": 0.0, "forceInput": True}),
"preview_tiny_vae": ("STRING", {"default": "none", "combo": _vae_approx_options()}),
"preview_tiny_vae": ("STRING", {"default": "none", "combo": _vae_approx_options(), "socketless": True, "tooltip": "Optional tiny VAE decoder (models/vae_approx) for fast step previews. Overrides preview_vae and the built-in previewer."}),
"preview_vae": ("VAE", {"lazy": True}),
},
"hidden": {"prompt_context": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO", "unique_id": "UNIQUE_ID"},