diff --git a/docs/h4_toolkit_brief.html b/docs/h4_toolkit_brief.html
index bf4ac81..5d3304a 100644
--- a/docs/h4_toolkit_brief.html
+++ b/docs/h4_toolkit_brief.html
@@ -1,662 +1,1141 @@
-
-
-
-
-
- Mission Recap
-
-
-
Objective
-
Deliver a polished, stability-focused node suite for ComfyUI that feels native while remaining hyper-observable during development.
-
- - h4 : The Engine (
h4_PlotXY) orchestrates checkpoint loading, sampler/scheduler swaps, LoRA layering, grid assembly, and fast previews.
- - h4_Debug-a-Tron suite provides console-first monitoring plus a lightweight router variant for live passthroughs.
- - UX polish via JavaScript injects placeholders, tooltips, and dynamic sockets without bloating the node count.
-
-
-
-
Guiding Principles
-
- - Ship production-ready code in a single pass: no placeholders, no silent branches, no half-written functions.
- - Stay resource-light: defer heavy work until needed, reuse latents, and keep previews in low-cost lanes.
- - Maintain clairvoyant visibility: every meaningful action emits colour-coded console traces.
-
-
-
-
- Maintainer Marker — confirm TOOLKIT_VERSION, PLOT_NODE_VERSION, and DEBUG_NODE_VERSION stay aligned with release notes before packaging.
-
-
-
-
-
-
- Debug-a-Tron Modernisation Log — 11 Oct 2025
- This log captures every action taken during the latest session to stabilise and elevate the Debug-a-Tron experience, matching The Engine’s polish while preparing the router for dual-branch diagnostics.
-
- Sequence of Operations
-
- - Console node slim-down. Removed the legacy faux-terminal widget, collapsed redundant status text, refreshed branding, and enforced compact default sizing so the node docks neatly beside Engine outputs.
- - Go Plus Ultra! UX sweep. Front-end script now strips the
ultra_ prefix from widget labels, enforces a predictable collapsed height, and fully detaches advanced controls when the toggle is off (no latent layout jitter).
- - Router overhaul blueprint. Added overridable class attributes to
h4_DebugATron3000 (SLOT_DEFINITIONS, SLOT_TOOLTIPS, VAE_MODEL_FALLBACKS, BRANCH_DISPLAY_NAMES) so downstream variants can redefine sockets without copy/paste.
- - Metadata-driven INPUT/OUTPUT tables. Reworked
INPUT_TYPES(), RETURN_TYPES, and RETURN_NAMES to derive directly from the active slot table, ensuring subclasses inherit correct wiring automatically.
- - Router branch duplication. Crafted router-specific slot dictionaries that double every inlet/outlet with
_a/_b suffixes, human-friendly labels (e.g. “Branch A · Latent”), and branch-aware tooltips.
- - Branch-aware diagnostics. Implemented helper methods (
_slot_variants, _slot_branch_suffix, _branch_label, _matching_branch_slot) so both nodes can reason about sibling slots, VAE fallbacks, and conditioning coverage per branch.
- - Go Plus Ultra telemetry upgrade. Snapshots, anomaly checks, token previews, JSON logging, and preview image capture now tag their output with branch + slot context, making dual-lane routing transparent.
- - Branch summaries. Added a condensed summary that lists the connection ratio for Branch A/B, highlights missing sockets, and appends warnings directly to the console/log output.
-
-
- Errors & Resolutions
-
- - Accidental Engine injection. While reshaping the router loop, an intermediate patch briefly inserted branch-handling code into the Engine sampler call, producing a “(" was not closed” syntax failure. The rogue block was excised immediately and
py_compile reran to confirm a clean slate.
- - Signature drift checks. The refactor surfaced no runtime regressions after the metadata swap; all warnings came from static validation and were resolved before final review.
-
-
- Validation Cadence
-
- - Executed
python -m py_compile h4_Plot/nodes.py after every structural change until the module compiled without error.
- - Manually inspected router UI in the JS overlay to verify new labels, branch ordering, and collapsed heights remained intact.
-
-
-
- Maintainer Marker — when introducing new branch layouts (e.g., triple routes), declare the suffix map in ROUTER_BRANCH_SUFFIXES and the rest of the stack will adapt automatically.
-
-
-
- Architecture & Pipelines
- Core Files
-
- h4_Plot/nodes.py — houses reusable helpers, The Engine (h4_PlotXY), h4_DebugATron3000, h4_DebugATronRouter, and the export dictionaries.
- h4_Plot/__init__.py — verifies dependencies, announces updates, imports nodes, and prints the cybernetic status banner.
- h4_Plot/js/h4_ui.js — injects UI niceties (placeholders, tooltips, dynamic sockets, orientation toggles).
- h4_Plot/requirements.txt — minimal dependency manifest for manual installs.
-
-
- Execution Flow
-
- - Startup —
__init__.py checks/installs dependencies, emits update notices, imports nodes, then renders the neon-lit banner.
- - User Interaction — the UI script decorates widgets, spawns dynamic connectors, and keeps layout toggles responsive.
- - The Engine Run
-
- - Axis descriptors parsed with knowledge of on-disk checkpoints/Loras.
- - Generation plans computed (cartesian product across axes).
- - Checkpoint, sampler, scheduler, clip skip, and VAE/CLIP overrides orchestrated per plan.
- - DPM++ 2M SDE + Karras sampler runs with rapid previews pushed via
latent_preview when present.
- - Decoded outputs assembled into square-first grids; stacked tensor and tiling grid returned.
-
-
- - Debug-a-Tron Run — console node prints formatted logs while router variant defaults to passthrough using shared dynamic sockets.
-
-
-
- Telemetry Hooks
- All helpers and node methods route through ToolkitLogger. Flip the TRACE flag to silence console chatter post-debug. Preview failures are downgraded to warnings to avoid collapsing the run.
-
-
-
- Maintainer Marker — when adding new nodes, respect the “three-node ceiling” mantra and expand NODE_CLASS_MAPPINGS only with explicit user consent.
-
-
-
-
- The Engine Deep Dive (h4_PlotXY)
- The Engine node (h4_PlotXY) is a self-contained composer that can operate standalone or accept mid-pipeline overrides. Highlights:
-
- - Inputs: seed, steps, CFG, denoise, clip skip, sampler, scheduler, dimensions, checkpoint, VAE/CLIP overrides, prompts, axis definitions, plus optional model/clip/vae/conditioning/latent/image feeds.
- - Axis Language: preset selector flips between prompt, checkpoint, sampler, scheduler, CFG, steps, denoise, seed, or LoRA modes with smart token parsing.
- - Sampler Stack: DPM++ 2M SDE + Karras remain the defaults, while axis overrides can swap samplers/schedulers per cell.
- - Deterministic Seeds: base seed applies to every plan unless the axis overrides specific values, keeping comparisons apples-to-apples.
- - Latent Handling: clones supplied latents or encoded images, creates empty canvases on demand, and trims GPU cache between runs when CUDA is available.
- - Outputs: stacked tensor containing every decoded image plus a composite grid tensor ready for gallery display.
-
-
- Observability
- Every stage logs to console (loading checkpoints, encoding prompts, applying LoRAs, publishing previews). The returned stack pairs cleanly with Debug-a-Tron for in-graph comparison panels.
-
-
- Maintainer Marker — when introducing new axis presets or overrides, update both the widget tooltips in js/h4_ui.js and this checklist.
-
-
-
-
- Debug-a-Tron Suite
- The Debug-a-Tron family ships in two flavours: the console-heavy h4_DebugATron3000 and the stream-lined h4_DebugATronRouter. Both now inherit from a metadata-driven base that keeps slot definitions, labels, tooltips, and fallbacks in sync.
-
- Shared Platform Features
-
- - Modes: Monitor nulls outputs but captures full telemetry; Passthrough clones payloads downstream. Router defaults to passthrough for zero-config routing.
- - Go Plus Ultra!: When enabled, snapshots latent tensors (first/mid/last), decodes previews, emits JSON logs, fingerprints attached models, evaluates custom watch expressions, surfaces conditioning/token previews, and runs anomaly checks (NaN/Inf/std spikes/magnitude).
- - Dynamic sockets: Eight wildcard pairs per node auto-type when linked and continually expose a fresh blank inlet/outlet.
- - Orientation toggle: Horizontal/vertical layouts managed by
applyOrientationLayout keep wiring readable.
- - UI polish: JS layer hides Go Ultra controls when disabled, strips technical prefixes from labels, persists collapsed height, and restores widgets in their saved order on re-enable.
-
-
- Main Console Node — h4_DebugATron3000
-
- - Slot catalogue: Base
SLOT_DEFINITIONS cover model, CLIP, CLIP-Vision, VAE, conditioning (generic/positive/negative), latent, image, and mask inputs with contextual tooltips.
- - VAE fallback intelligence: Missing VAE sockets automatically harvest decoders from attached models using
_extract_vae_from_model, logging a note for traceability.
- - Inline report: Every connected slot prints descriptor + detail lines (tensor shapes/stats, conditioning entry previews) to the console, with warnings for missing conditioning branches.
- - Watch expressions: Evaluates ad-hoc Python snippets against the captured slot dictionary for rapid hypothesis testing.
- - Snapshot artefacts: Writes preview PNGs/JSON logs into
h4_debugatron_ultra/ when caching is enabled, otherwise keeps diagnostics ephemeral.
-
-
- Router Variant — h4_DebugATronRouter
-
- - Dual-lane I/O: Every slot is duplicated with
_a/_b suffixes (e.g., “Branch A · Latent”, “Branch B · Conditioning”) and branch-specific tooltips.
- - Branch summaries: Console output now appends per-branch connection tallies plus line-item warnings for any disconnected feeds.
- - Targeted fallbacks: Each VAE inlet points to its matching model branch, so partial connections still decode successfully.
- - Branch-aware Go Ultra: Snapshots, previews, anomaly reports, token previews, and JSON logs annotate which branch produced each record.
- - Passthrough cadence: Defaults to passthrough mode, mirroring payloads while collecting diagnostics; monitor mode remains available when you need zero downstream impact.
-
-
- Inline Diagnostics
- Drop the console node near noisy subgraphs to capture shape/device metadata without disrupting flow, or slot the router variant wherever you need branch-aware passthrough plus breadcrumbs. Summary text now explicitly lists Branch A/B health, making graph triage near-instant.
-
-
- Maintainer Marker — if ComfyUI introduces new socket types, extend the wildcard count and UI type dictionary in tandem for both variants. Branch naming is controlled centrally inside ROUTER_BRANCH_SUFFIXES.
-
-
-
- Dependencies & Telemetry
-
- - Auto-install:
__init__.py ensures colorama, numpy, and torch exist; installs missing packages with error reporting.
- - Version Alerts: compares installed versions to PyPI; prints cyan notices when updates are available without auto-upgrading.
- - Status Banner: neon table shows loaded/failed nodes with checkmarks or crosses; perfect for Stability Matrix logs.
- - Web Assets:
WEB_DIRECTORY exported so ComfyUI loads js/h4_ui.js automatically.
-
-
-
- Deployment Notes
-
- - Set
TRACE logging off before public release to quiet console spam.
- - Maintain
requirements.txt in lockstep with DEPENDENCIES to keep manual installs frictionless.
-
-
-
-
- Maintainer Marker — plan a VS-aware configuration so the banner can display the current ComfyUI/Stability Matrix version once the upstream API exposes it.
-
-
-
- Code Appendix
- Quick reference snippets for the primary modules. Consult the repository for up-to-the-minute source.
-
- nodes.py
- # nodes.py quick reference (v2.1.0)
-- Global discovery helpers: build sampler/scheduler choice tables, normalise lookup keys, and guard against missing ComfyUI modules.
-- ToolkitLogger: colour-coded INFO/WARN/TRACE emitter used everywhere.
-- AxisDescriptor: dataclass powering Engine's grid planning overrides.
-- _invoke_sampler_with_compatibility(...): signature-aware shim that renames/drops kwargs to match active sampler expectations.
-- h4_PlotXY.run_pipeline(...): orchestrates plan execution (axis parsing, LoRA injection, latent prep, sampler invocation, preview publishing, grid assembly, labelled export).
-- h4_DebugATron3000 (base class):
- • SLOT_DEFINITIONS / SLOT_TOOLTIPS / VAE_MODEL_FALLBACKS / BRANCH_DISPLAY_NAMES metadata drive input/output wiring.
- • INPUT_TYPES() auto-builds optional controls (including Go Plus Ultra toggles) from that metadata.
- • route(...) clones passthrough payloads, logs descriptors, runs Go Plus Ultra diagnostics, writes previews/JSON, and now aggregates per-branch summaries.
- • Helper matrix (_slot_variants, _slot_branch_suffix, _branch_label, _matching_branch_slot) coordinates branch-aware lookups.
- • _collect_latent_snapshots / _tensor_anomalies / _preview_conditioning_tokens feed diagnostics.
-- h4_DebugATronRouter: overrides slot/tooltips/fallback maps with Branch A/B variants, inherits route() implementation, and ships default mode = passthrough.
-- Export dictionaries (NODE_CLASS_MAPPINGS / DISPLAY / TOOLTIP) register every node with ComfyUI.
-
-
- __init__.py
- # __init__.py quick reference
-- ensure_dependencies() installs or warns about colorama, numpy, torch.
-- Imports NODE_CLASS_MAPPINGS / DISPLAY / TOOLTIP dictionaries from nodes.py.
-- Emits status banner listing h4 : Plot XY, Debug-a-Tron-3000, and Router load states.
-- Exposes WEB_DIRECTORY so ComfyUI pulls js/h4_ui.js automatically.
-
-
-
- Maintainer Marker — after every refactor, refresh these excerpts or link to generated API docs.
-
-
-
-
- Future-Proof Planning
- Immediate Enhancements
-
- - Pivot engineering bandwidth to the Debug-a-Tron suite: lock in console persistence, routing safeguards, and UX tweaks.
- - Add UI toggle to switch between verbose and quiet modes without editing Python.
- - Introduce optional persistence for Debug-a-Tron socket configurations (per workflow).
- - Expose grid metadata (rows/cols, descriptors) as a second JSON output for downstream automation.
-
-
- Version Awareness Initiative
-
- - Augment
__init__.py to detect the running ComfyUI/Stability Matrix version and display it in the banner.
- - Embed toolkit schema versioning so saved workflows can detect incompatibilities.
- - Include semantic version metadata in Debug-a-Tron logs for audit trails.
-
-
- Maintenance Rituals
-
- - Run quarterly dependency health checks; document recommended versions alongside the auto-installer.
- - Automate regeneration of this HTML dossier whenever the Python modules change.
- - Archive major releases in a
docs/history ledger for regression comparisons.
-
-
-
-
- Final Product Briefing
- The h4 Toolkit now ships as a cohesive triad: a battle-tested sampler engine, a clairvoyant debugging suite, and a UI companion that keeps controls ergonomic. This section articulates every feature and function in their final form.
-
- End-to-End Overview
-
- - h4_PlotXY drives plan creation, model/LoRA orchestration, latent preparation, sampler invocation, preview publication, and tiled grid rendering.
- - h4_DebugATron3000 mirrors inbound payloads, emits forensic logging, and powers the Go Plus Ultra diagnostics console.
- - h4_DebugATronRouter extends the debugger to dual-branch graphs, maintaining passthrough fidelity while generating branch-specific insights.
- - h4_ui.js binds the suite together with dynamic sockets, placeholders, tooltip copy, Go Ultra widget choreography, and orientation controls.
-
-
- Function-by-Function Detail — h4_Plot/nodes.py
-
- - Discovery helpers (
_discover_sampler_choices, _discover_scheduler_choices): scan ComfyUI registries, normalise aliases, and fall back to safe defaults when the runtime is lean.
- - Compatibility shim (
_invoke_sampler_with_compatibility): interrogates sampler signatures, remaps/drops kwargs, retries with raw kwargs when required parameters remain missing.
- - Sigma coordinator (
calculate_sigmas + metadata extracted via _extract_model_sampling): ensures samplers receive the tensors and model sampling profile they now mandate.
- - Engine pipeline (
h4_PlotXY.run_pipeline): constructs AxisDescriptor plans, resolves checkpoints/LoRAs, clones or spawns latents, runs samplers, decodes previews, annotates grids, returns stacked tensors plus grid.
- - Preview publishers (
_get_preview_handlers, _render_preview_tuple): pick best-available decode/publish hooks, gracefully degrade when latent_preview is absent.
- - Diagnostics infrastructure:
ToolkitLogger (colour logging), _summarise_tensor/_tensor_stats/_summarise_object describe payloads; _clone_payload_safely safeguards passthrough cloning.
- - Debug base class (
h4_DebugATron3000): metadata-driven INPUT_TYPES(), branch-aware helpers, VAE fallback extraction, watch-expression evaluation, latent snapshotter, anomaly detection, preview/JSON writers.
- - Router subclass (
h4_DebugATronRouter): inherits route logic, overrides metadata with Branch A/B definitions, exposes passthrough-by-default mode, and realigns fallbacks on a per-branch basis.
- - Exports (
NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS, NODE_TOOLTIP_MAPPINGS): publish the trio to ComfyUI with descriptive names and tooltip dictionaries.
-
-
- Function-by-Function Detail — h4_Plot/js/h4_ui.js
-
- - Placeholder/tooltip suite:
applyPlaceholder, applySliderTooltip, and TOOLTIP_COPY ensure every widget explains itself.
- - Go Ultra choreography:
ensureUltraWidgetCache, toggleUltraWidgets, and applyUltraWidgetLabels physically remove advanced widgets when disabled, restore them in order when re-enabled, and keep heights consistent.
- - Orientation control:
applyOrientationLayout and the accompanying widget callback flip nodes between horizontal/vertical modes without manual resizing.
- - Dynamic socket brain:
ensureDynamicSockets, handleDynamicConnectionChange, and updateDynamicSocketLabels maintain eight wildcard I/O lanes, auto-labelling based on linked socket types.
- - Extension entrypoint: the registered ComfyUI extension hooks node creation/connection events to apply all polish automatically.
-
-
- Behavioural Guarantees
-
- - Sampler resilience: New signature mapper + metadata pipeline keeps The Engine aligned with upstream sampler changes.
- - Diagnostics depth: Go Plus Ultra surfaces conditioning gaps, token previews, latent anomalies, model fingerprints, branch summaries, and watch-expression outputs.
- - UI cohesion: Nodes spawn compact, labelled, and orientation-aware, with Go Ultra controls only visible when relevant.
- - Branch transparency: Router console lines, summaries, and snapshots all include branch context, eliminating guesswork during multi-lane debugging.
- - Artefact hygiene: Preview images/JSON logs respect the “cache artefacts” toggle and land inside a dedicated temp folder.
-
-
- Validation Summary
-
- python -m py_compile h4_Plot/nodes.py — PASS after final router refactor.
- - Manual UI review confirmed widget labels, collapsed height, and dual-branch sockets render as intended.
-
-
-
- Maintainer Marker — revisit this briefing after every release; the final product description doubles as the acceptance checklist for future regressions.
-
-
-
-
+
+ Mission Recap
+
+
+
Objective
+
Deliver a polished, stability-focused node suite for ComfyUI that feels native while remaining hyper-observable during development.
+
+ - h4 : The Engine (
h4_PlotXY) orchestrates checkpoint loading, sampler/scheduler swaps, LoRA layering, grid assembly, and fast previews.
+ - h4_Debug-a-Tron suite provides console-first monitoring plus a lightweight router variant for live passthroughs.
+ - UX polish via JavaScript injects placeholders, tooltips, and dynamic sockets without bloating the node count.
+ - New specialty nodes add HTML reporting (
h4_DebugATron3000Console), seed fan-out (h4_SeedBroadcaster), and console mirroring (h4_ExecutionLogger).
+
+
+
+
Guiding Principles
+
+ - Ship production-ready code in a single pass: no placeholders, no silent branches, no half-written functions.
+ - Stay resource-light: defer heavy work until needed, reuse latents, and keep previews in low-cost lanes.
+ - Maintain clairvoyant visibility: every meaningful action emits colour-coded console traces.
+
+
+
+
+ Maintainer Marker — confirm TOOLKIT_VERSION, PLOT_NODE_VERSION, and DEBUG_NODE_VERSION stay aligned with release notes before packaging.
+
+
+
+
+ Latest Field Notes — 15 Oct 2025
+
+ Quick rundown of the restoration sprint that brought the toolkit back online after the accidental node purge
+ and the Axis Driver overlay hiccup.
+
+
+ - Node Recovery: Re-hydrated
h4_SeedBroadcaster, h4_DebugATron3000Console, and h4_ExecutionLogger from historical commits, rebuilt their tooltip dictionaries, and re-registered every class.
+ - Label Layout Fix: Border mode now truly expands the grid canvas, paints top/left headers, respects custom axis labels, and keeps overlay mode untouched. No more faux overlays pretending to be borders.
+ - LoRA Guard Rails: Family detection compares checkpoints and LoRAs. Mismatched combos now shout loudly and abort instead of applying quietly.
+ - Console Polish: Colour scheme helpers, verbosity presets, and execution logging are back in circulation for friendly run reports.
+ - Testing Status: Manual ComfyUI smoke tests only. No automated suite yet; keep an eye on console traces after future merges.
+
+
+
+
+
+
+ Debug-a-Tron Modernisation Log — 11 Oct 2025
+ This log captures every action taken during the latest session to stabilise and elevate the Debug-a-Tron experience, matching The Engine’s polish while preparing the router for dual-branch diagnostics.
+
+ Sequence of Operations
+
+ - Console node slim-down. Removed the legacy faux-terminal widget, collapsed redundant status text, refreshed branding, and enforced compact default sizing so the node docks neatly beside Engine outputs.
+ - Go Plus Ultra! UX sweep. Front-end script now strips the
ultra_ prefix from widget labels, enforces a predictable collapsed height, and fully detaches advanced controls when the toggle is off (no latent layout jitter).
+ - Router overhaul blueprint. Added overridable class attributes to
h4_DebugATron3000 (SLOT_DEFINITIONS, SLOT_TOOLTIPS, VAE_MODEL_FALLBACKS, BRANCH_DISPLAY_NAMES) so downstream variants can redefine sockets without copy/paste.
+ - Metadata-driven INPUT/OUTPUT tables. Reworked
INPUT_TYPES(), RETURN_TYPES, and RETURN_NAMES to derive directly from the active slot table, ensuring subclasses inherit correct wiring automatically.
+ - Router branch duplication. Crafted router-specific slot dictionaries that double every inlet/outlet with
_a/_b suffixes, human-friendly labels (e.g. “Branch A · Latent”), and branch-aware tooltips.
+ - Branch-aware diagnostics. Implemented helper methods (
_slot_variants, _slot_branch_suffix, _branch_label, _matching_branch_slot) so both nodes can reason about sibling slots, VAE fallbacks, and conditioning coverage per branch.
+ - Go Plus Ultra telemetry upgrade. Snapshots, anomaly checks, token previews, JSON logging, and preview image capture now tag their output with branch + slot context, making dual-lane routing transparent.
+ - Branch summaries. Added a condensed summary that lists the connection ratio for Branch A/B, highlights missing sockets, and appends warnings directly to the console/log output.
+
+
+ Errors & Resolutions
+
+ - Accidental Engine injection. While reshaping the router loop, an intermediate patch briefly inserted branch-handling code into the Engine sampler call, producing a “(" was not closed” syntax failure. The rogue block was excised immediately and
py_compile reran to confirm a clean slate.
+ - Signature drift checks. The refactor surfaced no runtime regressions after the metadata swap; all warnings came from static validation and were resolved before final review.
+
+
+ Validation Cadence
+
+ - Executed
python -m py_compile h4_Plot/nodes.py after every structural change until the module compiled without error.
+ - Manually inspected router UI in the JS overlay to verify new labels, branch ordering, and collapsed heights remained intact.
+
+
+
+ Maintainer Marker — when introducing new branch layouts (e.g., triple routes), declare the suffix map in ROUTER_BRANCH_SUFFIXES and the rest of the stack will adapt automatically.
+
+
+
+ Architecture & Pipelines
+ Core Files
+
+ h4_Plot/nodes.py — houses reusable helpers, The Engine (h4_PlotXY), h4_DebugATron3000, h4_DebugATronRouter, and the export dictionaries.
+ h4_Plot/__init__.py — verifies dependencies, announces updates, imports nodes, and prints the cybernetic status banner.
+ h4_Plot/js/h4_ui.js — injects UI niceties (placeholders, tooltips, dynamic sockets, orientation toggles).
+ h4_Plot/requirements.txt — minimal dependency manifest for manual installs.
+
+
+ Execution Flow
+
+ - Startup —
__init__.py checks/installs dependencies, emits update notices, imports nodes, then renders the neon-lit banner.
+ - User Interaction — the UI script decorates widgets, spawns dynamic connectors, and keeps layout toggles responsive.
+ - The Engine Run
+
+ - Axis descriptors parsed with knowledge of on-disk checkpoints/Loras.
+ - Generation plans computed (cartesian product across axes).
+ - Checkpoint, sampler, scheduler, clip skip, and VAE/CLIP overrides orchestrated per plan.
+ - DPM++ 2M SDE + Karras sampler runs with rapid previews pushed via
latent_preview when present.
+ - Decoded outputs assembled into square-first grids; stacked tensor and tiling grid returned.
+
+
+ - Debug-a-Tron Run — console node prints formatted logs while router variant defaults to passthrough using shared dynamic sockets.
+
+
+ Wiring Overview
+
+Axis Drivers ──▶ h4_PlotXY "The Engine" ──▶ h4_DebugATron stack ──▶ Outputs / Saves
+ │ │ │
+ ├─ X / Y / Z JSON ─┘ ├─ h4_DebugATron3000Console (html_log + passthrough)
+ │ ├─ h4_ExecutionLogger (log_summary)
+ └─ Style payloads feed grid annotation └─ h4_SeedBroadcaster can sit upstream of multiple samplers
+
+
+
+ Telemetry Hooks
+ All helpers and node methods route through ToolkitLogger. Flip the TRACE flag to silence console chatter post-debug. Preview failures are downgraded to warnings to avoid collapsing the run.
+
+
+
+ Maintainer Marker — when adding new nodes, respect the “three-node ceiling” mantra and expand NODE_CLASS_MAPPINGS only with explicit user consent.
+
+
+
+
+ The Engine Deep Dive (h4_PlotXY)
+ The Engine node (h4_PlotXY) is a self-contained composer that can operate standalone or accept mid-pipeline overrides. Highlights:
+
+ - Inputs: seed, steps, CFG, denoise, clip skip, sampler, scheduler, dimensions, checkpoint, VAE/CLIP overrides, prompts, axis definitions, plus optional model/clip/vae/conditioning/latent/image feeds.
+ - Axis Language: preset selector flips between prompt, checkpoint, sampler, scheduler, CFG, steps, denoise, seed, or LoRA modes with smart token parsing.
+ - Sampler Stack: DPM++ 2M SDE + Karras remain the defaults, while axis overrides can swap samplers/schedulers per cell.
+ - Deterministic Seeds: base seed applies to every plan unless the axis overrides specific values, keeping comparisons apples-to-apples.
+ - Latent Handling: clones supplied latents or encoded images, creates empty canvases on demand, and trims GPU cache between runs when CUDA is available.
+ - Outputs: stacked tensor containing every decoded image plus a composite grid tensor ready for gallery display.
+
+
+ Observability
+ Every stage logs to console (loading checkpoints, encoding prompts, applying LoRAs, publishing previews). The returned stack pairs cleanly with Debug-a-Tron for in-graph comparison panels.
+
+
+ Maintainer Marker — when introducing new axis presets or overrides, update both the widget tooltips in js/h4_ui.js and this checklist.
+
+
+
+
+ Debug-a-Tron Suite
+ The Debug-a-Tron family ships in two flavours: the console-heavy h4_DebugATron3000 and the stream-lined h4_DebugATronRouter. Both now inherit from a metadata-driven base that keeps slot definitions, labels, tooltips, and fallbacks in sync.
+
+ Shared Platform Features
+
+ - Modes: Monitor nulls outputs but captures full telemetry; Passthrough clones payloads downstream. Router defaults to passthrough for zero-config routing.
+ - Go Plus Ultra!: When enabled, snapshots latent tensors (first/mid/last), decodes previews, emits JSON logs, fingerprints attached models, evaluates custom watch expressions, surfaces conditioning/token previews, and runs anomaly checks (NaN/Inf/std spikes/magnitude).
+ - Dynamic sockets: Eight wildcard pairs per node auto-type when linked and continually expose a fresh blank inlet/outlet.
+ - Orientation toggle: Horizontal/vertical layouts managed by
applyOrientationLayout keep wiring readable.
+ - UI polish: JS layer hides Go Ultra controls when disabled, strips technical prefixes from labels, persists collapsed height, and restores widgets in their saved order on re-enable.
+
+
+ Main Console Node — h4_DebugATron3000
+
+ - Slot catalogue: Base
SLOT_DEFINITIONS cover model, CLIP, CLIP-Vision, VAE, conditioning (generic/positive/negative), latent, image, and mask inputs with contextual tooltips.
+ - VAE fallback intelligence: Missing VAE sockets automatically harvest decoders from attached models using
_extract_vae_from_model, logging a note for traceability.
+ - Inline report: Every connected slot prints descriptor + detail lines (tensor shapes/stats, conditioning entry previews) to the console, with warnings for missing conditioning branches.
+ - Watch expressions: Evaluates ad-hoc Python snippets against the captured slot dictionary for rapid hypothesis testing.
+ - Snapshot artefacts: Writes preview PNGs/JSON logs into
h4_debugatron_ultra/ when caching is enabled, otherwise keeps diagnostics ephemeral.
+
+
+ Router Variant — h4_DebugATronRouter
+
+ - Dual-lane I/O: Every slot is duplicated with
_a/_b suffixes (e.g., “Branch A · Latent”, “Branch B · Conditioning”) and branch-specific tooltips.
+ - Branch summaries: Console output now appends per-branch connection tallies plus line-item warnings for any disconnected feeds.
+ - Targeted fallbacks: Each VAE inlet points to its matching model branch, so partial connections still decode successfully.
+ - Branch-aware Go Ultra: Snapshots, previews, anomaly reports, token previews, and JSON logs annotate which branch produced each record.
+ - Passthrough cadence: Defaults to passthrough mode, mirroring payloads while collecting diagnostics; monitor mode remains available when you need zero downstream impact.
+
+
+ Inline Diagnostics
+ Drop the console node near noisy subgraphs to capture shape/device metadata without disrupting flow, or slot the router variant wherever you need branch-aware passthrough plus breadcrumbs. Summary text now explicitly lists Branch A/B health, making graph triage near-instant.
+
+
+ Maintainer Marker — if ComfyUI introduces new socket types, extend the wildcard count and UI type dictionary in tandem for both variants. Branch naming is controlled centrally inside ROUTER_BRANCH_SUFFIXES.
+
+
+
+ Debug Console — HTML Telemetry Node
+ The h4_DebugATron3000Console takes the base Debug-a-Tron diagnostics and packages them into a neon HTML dossier while still mirroring payloads downstream. It is registered as an output node so the rendered report is immediately visible inside ComfyUI’s right-hand panel.
+
+ Display Deck
+
+ - Display Mode: Choose console_only, html_only, or both depending on whether you want stdout, the HTML artefact, or the full experience.
+ - Color Scheme: Pick from dark, light, matrix, or the default cyberpunk palette to match dashboards or livestream overlays.
+ - Verbosity: Dial detail between minimal, normal, verbose, and trace (tensor stats, conditioning previews, latent history depth).
+ - Timestamp Toggle: Append millisecond-precise stamps per slot section to ground post-run analysis.
+
+
+ Outputs
+
+ html_log: Self-contained HTML string with embedded styles. Drop it into a Save Text node or copy directly to Confluence/Notion.
+ - All standard Debug-a-Tron outlets: The console variant prepends the HTML output but otherwise passes through the same cloned payloads.
+
+
+ Deployment Pattern
+
+ - Place the console node at the tail of your diagnostic branch.
+ - Set desired palette/verbosity. Leave display mode on both for development, flip to html_only when shipping reports.
+ - Execute the workflow; the HTML transcript appears immediately. Optional: wire the string into a file writer for automatic archiving.
+
+
+ Maintainer Marker — keep the color-scheme dictionary in sync with README screenshots. If a new socket type lands, ensure the HTML renderer recognises it with a colour swatch.
+
+
+
+ Utility Nodes
+ Two lightweight helpers join the toolkit to streamline workflow orchestration and audit trails.
+
+ h4_SeedBroadcaster
+
+ - Inputs: seed (64-bit int) and mode (
fixed or random).
+ - Outputs: Eight identical integer outlets (
seed_1 … seed_8) so multiple samplers stay synchronised.
+ - Random Mode: Generates a fresh seed per run (logged via
ToolkitLogger); cached so follow-up nodes or Execution Logger can echo the value.
+ - Use Case: Feed The Engine plus standalone KSamplers/ControlNets from a single seed source without copy-paste or string processing.
+
+
+ h4_ExecutionLogger
+
+ - Controls: log_level, custom prefix, show_types, and show_shapes flags to tailor console verbosity.
+ - Sockets: Accepts model, CLIP, VAE, conditioning +/- , latent, image, string, int, and float payloads (all optional).
+ - Behaviour: Emits decorated console lines for each connected slot (type, shape, min/max stats) then returns a plain-text summary suitable for archival.
+ - Typical Placement: Tail-end sentinel for large graphs; combine with the console node for HTML + CLI parity.
+
+
+ Maintainer Marker — if a future release adds additional scalar types (e.g., boolean toggles), extend SLOT_DEFINITIONS and the summary formatter in lockstep.
+
+
+
+ Dependencies & Telemetry
+
+ - Auto-install:
__init__.py ensures colorama, numpy, and torch exist; installs missing packages with error reporting.
+ - Version Alerts: compares installed versions to PyPI; prints cyan notices when updates are available without auto-upgrading.
+ - Status Banner: neon table shows loaded/failed nodes with checkmarks or crosses; perfect for Stability Matrix logs.
+ - Web Assets:
WEB_DIRECTORY exported so ComfyUI loads js/h4_ui.js automatically.
+
+
+
+ Deployment Notes
+
+ - Set
TRACE logging off before public release to quiet console spam.
+ - Maintain
requirements.txt in lockstep with DEPENDENCIES to keep manual installs frictionless.
+
+
+
+
+ Maintainer Marker — plan a VS-aware configuration so the banner can display the current ComfyUI/Stability Matrix version once the upstream API exposes it.
+
+
+
+ Code Appendix
+ Quick reference snippets for the primary modules. Consult the repository for up-to-the-minute source.
+
+ nodes.py
+ # nodes.py quick reference (v2.1.0)
+- Global discovery helpers: build sampler/scheduler choice tables, normalise lookup keys, and guard against missing ComfyUI modules.
+- ToolkitLogger: colour-coded INFO/WARN/TRACE emitter used everywhere.
+- AxisDescriptor: dataclass powering Engine's grid planning overrides.
+- _invoke_sampler_with_compatibility(...): signature-aware shim that renames/drops kwargs to match active sampler expectations.
+- h4_PlotXY.run_pipeline(...): orchestrates plan execution (axis parsing, LoRA injection, latent prep, sampler invocation, preview publishing, grid assembly, labelled export).
+- h4_DebugATron3000 (base class):
+ • SLOT_DEFINITIONS / SLOT_TOOLTIPS / VAE_MODEL_FALLBACKS / BRANCH_DISPLAY_NAMES metadata drive input/output wiring.
+ • INPUT_TYPES() auto-builds optional controls (including Go Plus Ultra toggles) from that metadata.
+ • route(...) clones passthrough payloads, logs descriptors, runs Go Plus Ultra diagnostics, writes previews/JSON, and now aggregates per-branch summaries.
+ • Helper matrix (_slot_variants, _slot_branch_suffix, _branch_label, _matching_branch_slot) coordinates branch-aware lookups.
+ • _collect_latent_snapshots / _tensor_anomalies / _preview_conditioning_tokens feed diagnostics.
+- h4_DebugATronRouter: overrides slot/tooltips/fallback maps with Branch A/B variants, inherits route() implementation, and ships default mode = passthrough.
+- h4_DebugATron3000Console: output-node wrapper that prepends an HTML telemetry stream with palette/verbosity controls.
+- h4_SeedBroadcaster: broadcasts a single fixed or random seed to eight outlets for graph-wide synchronisation.
+- h4_ExecutionLogger: console-mirror output node logging payload metadata and returning a plaintext summary.
+- Export dictionaries (NODE_CLASS_MAPPINGS / DISPLAY / TOOLTIP) register every node with ComfyUI.
+
+
+ __init__.py
+ # __init__.py quick reference
+- ensure_dependencies() installs or warns about colorama, numpy, torch.
+- Imports NODE_CLASS_MAPPINGS / DISPLAY / TOOLTIP dictionaries from nodes.py.
+- Emits status banner listing h4 : Plot XY, Debug-a-Tron-3000, and Router load states.
+- Exposes WEB_DIRECTORY so ComfyUI pulls js/h4_ui.js automatically.
+
+
+
+ Maintainer Marker — after every refactor, refresh these excerpts or link to generated API docs.
+
+
+
+
+ Axis Driver — Visual Configuration Engine
+
+ Purpose & Architecture
+ The h4_AxisDriver node (v0.6.0) transforms axis configuration from manual string entry into a rich visual interface with model dropdowns, item management, and style controls. When wired to The Engine's axis_x_payload, axis_y_payload, or axis_z_payload inputs, it automatically overrides manual widget settings — no mode matching required.
+
+ Wiring Diagram: Stupid-Simple Connection
+
+┌─────────────────────────────┐
+│ h4_AxisDriver │
+│ [X Slot: lora] │
+│ Items: │
+│ ├─ Label: Anime Style │
+│ ├─ Value: [Dropdown ▼] │ ──→ anime_v2.safetensors
+│ └─ Strength: 0.8 │
+│ │
+│ [Y Slot: cfg] │
+│ Items: │
+│ ├─ Label: Low CFG │ ──→ 2.5
+│ └─ Label: High CFG │ ──→ 7.5
+│ │
+│ [Z Slot: none] │
+└─────────────────────────────┘
+ │
+ Outputs: axis_x, axis_y, axis_z
+ │
+ ▼
+┌─────────────────────────────┐
+│ h4_PlotXY (The Engine) │
+│ │
+│ [axis_x_payload] ◀──────── Wire X here (auto-detects preset!)
+│ [axis_y_payload] ◀──────── Wire Y here (auto-detects preset!)
+│ [axis_z_payload] ◀──────── Wire Z here (reserved for 3D)
+│ │
+│ Manual widgets ignored ✓ │
+└─────────────────────────────┘
+
+✅ NO MANUAL MODE MATCHING REQUIRED!
+✅ Driver is single source of truth
+✅ Change presets in Driver, Engine follows
+✅ Wire X→X, Y→Y, Z→Z — done!
+
+
+ Supported Presets & UI Elements
+
+
+
+ | Preset |
+ Input Type |
+ Features |
+
+
+
+ none | — | Axis disabled |
+ prompt | Textarea | Multi-line prompt variations |
+ checkpoint | Dropdown | Model list from ComfyUI API |
+ lora | Dropdown + Strength | LoRA selection + 0-2.0 slider |
+ vae | Dropdown | VAE model selection |
+ clip | Dropdown | CLIP text encoder selection |
+ clip_vision | Dropdown | CLIP vision model selection |
+ sampler | Dropdown | Built-in sampler list |
+ scheduler | Dropdown | Built-in scheduler list |
+ cfg | Number (0.1 step) | CFG scale sweep |
+ steps | Number (integer) | Step count tests |
+ denoise | Number (0-1) | Denoise strength |
+ seed | Number (integer) | Seed variations |
+
+
+
+ Model Discovery System
+ The Axis Driver fetches models using a multi-endpoint strategy compatible with both standard ComfyUI and Stability Matrix installations:
+
+ /object_info/{NodeType} — Primary endpoint, queries ComfyUI's native node definitions
+ /api/assets/{kind} — Custom API fallback
+ /api/list?type={kind} — Alternative list endpoint
+ /api/models/{kind} — Additional fallback
+
+ Asset Kind Mapping:
+
+ checkpoint → CheckpointLoaderSimple node
+ lora → LoraLoader node
+ vae → VAELoader node
+ clip → CLIPLoader node
+ clip_vision → CLIPVisionLoader node
+
+ Models are cached per session, sorted alphabetically, and include all subfolders. Custom values not in the list are preserved with "(custom)" labels.
+
+ Critical Fixes & Debugging History
+
+
🚨 Node Sizing Catastrophe (October 2025)
+
Symptoms:
+
+ - Node exploded to massive size (90% of canvas) on ANY interaction
+ - Zoom triggered infinite growth loops
+ - Manual resize caused instant expansion ("shoots out like a bat out of hell")
+ - Button clicks continuously enlarged the node
+ - Node never shrank back to normal size
+
+
+
Root Causes Identified:
+
+ - Feedback Loop Trinity:
+
+ - ResizeObserver watching DOM → triggered on size changes
+ - MutationObserver watching attributes → fired on every style change
+ - Auto-sizing logic → measured, calculated, resized → triggered observers → repeat
+
+
+ - Math.ceil() Rounding: Every pixel→graph unit conversion rounded UP, preventing shrinkage
+ - Math.max() Chains: Nested max() calls with multiple sources only allowed growth
+ - computeSize() Hijacking: Custom compute function measured DOM and applied calculations during ComfyUI's resize operations
+ - Manual Size Interference: Stored manual sizes fought with auto-adjustments
+
+
+
Solution Strategy:
+
+ - Disabled ALL Auto-Sizing:
+
+ - Removed ResizeObserver completely
+ - Removed window resize handler
+ - Gutted MutationObserver (now disabled)
+ - Emptied performAdjust() function
+
+
+ - Neutered Custom Handlers:
+
+ node.onResize → pass-through only, no custom logic
+ node.computeSize → pass-through to original, no measurements
+ h4AxisDriverAutoSize.compute() → returns input values unchanged
+
+
+ - Fixed Sizing Behavior:
+
+ - Node starts at default size (560×580)
+ - Manual resize works via standard ComfyUI mechanics
+ - Content scrolls internally if needed
+ - No automatic reactions to any interactions
+
+
+
+
+
Code Changes:
+
// BEFORE (broken):
+node.computeSize = function(arg1, arg2) {
+ const measurements = measurePixels();
+ const [graphWidth, graphHeight] = convertPixelsToGraphUnits(...);
+ return [Math.max(baseWidth, graphWidth), Math.max(baseHeight, graphHeight)];
+};
+
+// AFTER (fixed):
+node.computeSize = function(arg1, arg2) {
+ if (originalComputeSize) {
+ return originalComputeSize.apply(this, arguments);
+ }
+ return [
+ Number.isFinite(arg1) ? arg1 : DEFAULT_MIN_WIDTH,
+ Number.isFinite(arg2) ? arg2 : DEFAULT_MIN_HEIGHT
+ ];
+};
+
+
+
Lessons Learned:
+
+ - ❌ Never override ComfyUI's core sizing without complete understanding
+ - ❌ Never use Math.ceil() for bidirectional size adjustments
+ - ❌ Never create observer loops that trigger size calculations
+ - ✅ Always default to vanilla ComfyUI behavior for node sizing
+ - ✅ Always test zoom, manual resize, and button interactions separately
+ - ✅ Always provide escape hatches to disable auto-sizing
+
+
+
Current Status: ✅ STABLE — Node uses standard ComfyUI sizing, manual resize works perfectly, no growth loops.
+
+
+ UI Component Architecture
+
+ - Axis Stack: Three collapsible cards (X, Y, Z) with preset dropdowns and item management
+ - Item Rows: Dynamic creation/deletion with label input, value selector, and remove button
+ - Model Dropdowns: Asynchronously loaded, alphabetically sorted, with custom value support
+ - Style Panel: Collapsible configuration for grid label appearance (font, color, positioning)
+ - JSON Toggle: Shows/hides raw configuration for debugging and manual editing
+ - State Management: JSON-based with automatic serialization to hidden widget
+
+
+ Label Layout Modes
+ The style payload now carries a label_layout field that controls how The Engine annotates its composite grid:
+
+ - overlay — Original behaviour. Labels sit inside each tile with translucent backplates so the art remains visible.
+ - border — Enlarges the canvas, painting column headers along the top and row headers along the left border. Perfect for presentation exports where pixels must remain untouched.
+ - none — Suppresses all annotation so downstream tooling or manual markup can handle captions.
+
+ Axis Driver outputs always embed the style selection. When absent, The Engine falls back to its Python default (overlay) to keep legacy workflows stable.
+
+ Best Practices
+
+ - One Driver Per Axis: Create separate Axis Driver nodes for X, Y, and Z
+ - Preset Matching: Always match Engine axis_mode to Driver preset
+ - Incremental Testing: Start with 2-3 items, expand gradually
+ - Descriptive Labels: Labels appear in grid annotations, make them meaningful
+ - Manual Sizing: Drag corners to preferred size, it will persist
+
+
+
+
+ Future-Proof Planning
+ Immediate Enhancements
+
+ - Pivot engineering bandwidth to the Debug-a-Tron suite: lock in console persistence, routing safeguards, and UX tweaks.
+ - Add UI toggle to switch between verbose and quiet modes without editing Python.
+ - Introduce optional persistence for Debug-a-Tron socket configurations (per workflow).
+ - Expose grid metadata (rows/cols, descriptors) as a second JSON output for downstream automation.
+
+
+ Version Awareness Initiative
+
+ - Augment
__init__.py to detect the running ComfyUI/Stability Matrix version and display it in the banner.
+ - Embed toolkit schema versioning so saved workflows can detect incompatibilities.
+ - Include semantic version metadata in Debug-a-Tron logs for audit trails.
+
+
+ Maintenance Rituals
+
+ - Run quarterly dependency health checks; document recommended versions alongside the auto-installer.
+ - Automate regeneration of this HTML dossier whenever the Python modules change.
+ - Archive major releases in a
docs/history ledger for regression comparisons.
+
+
+
+
+ Tips & Best Practices
+
+ 🎯 Seed Behavior — Critical Understanding
+
+
CRITICAL: The Engine's seed control mode affects every grid cell differently!
+
+
+ fixed |
+ Same seed for ALL cells → ✅ Use for img2img/high-res fix |
+
+
+ increment |
+ Seed +1 per cell → Controlled variation |
+
+
+ randomize |
+ Random seed per cell → ⚠️ txt2img only! |
+
+
+
+
+ Common Mistake: Using randomize with img2img + denoise 0.55 still produces completely different images because each cell gets a different seed! The denoise value is ignored when the seed changes dramatically.
+
+ Solution for img2img workflows:
+
+ - Set Engine seed mode to
fixed
+ - Match the seed from your input image generation
+ - Now denoise works correctly: 0.55 denoise = 45% original structure + 55% variation
+
+
+ 🎚️ Denoise Value Guide
+
+
+ | Range |
+ Effect |
+ Use Case |
+
+
+ 0.0 - 0.3 |
+ Minimal changes |
+ Final polish, style transfer |
+
+
+ 0.4 - 0.7 |
+ Sweet spot |
+ ✅ img2img / high-res fix (balanced variation) |
+
+
+ 0.8 - 0.95 |
+ Major changes |
+ Creative reinterpretation |
+
+
+ 1.0 |
+ Complete regeneration |
+ txt2img from scratch |
+
+
+
+ 🔌 Wiring Best Practices
+
+✅ CORRECT Driver → Engine Wiring:
+ Driver.axis_x → Engine.axis_x_payload
+ Driver.axis_y → Engine.axis_y_payload
+ Driver.axis_z → Engine.axis_z_payload
+
+❌ WRONG:
+ Driver.axis_x → Engine.x_axis_values (string input)
+ Mixing Driver outputs with manual mode dropdowns
+
+
+ 📊 Grid Composition Strategy
+
+ - X Axis (columns): Parameters you want to compare side-by-side (samplers, LoRAs)
+ - Y Axis (rows): Parameters that define categories (CFG values, prompts)
+ - Z Axis: Reserved for future 3D grid support
+
+
+ Grid Size Recommendations:
+
+ 2×2 to 4×4: Fast iteration, broad testing
+ 5×5 to 6×6: Balanced detail vs time
+ 8×8+: Comprehensive testing (WARNING: slow, high VRAM)
+
+
+
+ Memory Formula: Rows × Columns × Model Size × Steps
+ Example: 6×6 grid = 36 images generated!
+
+
+ 🖼️ Latent Input Workflows
+ Three strategies for providing input to The Engine:
+
+
+ -
+ Empty Latent (txt2img):
+
EmptyLatentImage → Engine.latent_in
+Result: Fresh generation at Engine's width/height
+
+
+ -
+ Image Input (img2img):
+
LoadImage → Engine.image_in
+Result: Engine encodes to latent, then refines
+
+
+ -
+ Latent Input (high-res fix):
+
KSampler → LatentUpscale → Engine.latent_in
+Result: Engine uses latent directly (no encoding)
+
+
+
+
+ ⚠️ IMPORTANT: When using latent/image input with denoise < 1.0, ALWAYS use fixed seed mode to preserve the base image structure!
+
+
+ 🎨 Model Dropdown Tips
+ Checkpoint Selection:
+
+ <none> — Error (checkpoint required unless model input wired)
+ - Select actual model from dropdown to load
+
+
+ VAE/CLIP Selection:
+
+ <none> — Disabled (may cause errors if required downstream)
+ <checkpoint> — ✅ Default — Uses the component from loaded checkpoint
+ - Specific models — Override with custom VAE/CLIP
+
+
+ LoRA Strength Guidelines:
+
+ 0.0 — LoRA disabled (loaded but no effect)
+ 0.5 — Subtle influence
+ 0.75 — ✅ Default — Balanced
+ 1.0 — Full strength
+ 1.5 - 2.0 — Exaggerated (may cause artifacts)
+
+
+ ⚡ Performance Optimization
+ Memory Management:
+
+ - Use
bypass_engine: true to test wiring without generation
+ - Start with small grids (2×3) before scaling up
+ - Engine auto-clears CUDA cache between cells
+ - Close other GPU applications before large grid runs
+
+
+ Speed Tips:
+
+ - Lower steps for iteration (20 vs 40)
+ - Use faster samplers for testing (euler, euler_ancestral)
+ - Disable Debug-a-Tron preview generation during batch runs
+ - Use denoise < 1.0 with latent input for faster refinement
+
+
+ 💡 Common Workflows
+
+ 1. Sampler Comparison:
+ X Axis: sampler (euler, dpmpp_2m_sde, dpmpp_2m, uni_pc)
+Y Axis: cfg (4.0, 6.0, 8.0)
+Result: 4×3 grid = 12 images testing sampler×CFG
+
+ 2. LoRA Testing:
+ X Axis: lora (LoRA A @ 0.75, LoRA B @ 0.75, LoRA C @ 1.0)
+Y Axis: prompt ("anime style", "realistic", "painterly")
+Result: 3×3 grid = 9 images testing LoRA×style
+
+ 3. High-Res Fix Grid:
+ Initial Generation:
+ KSampler (steps: 40, cfg: 7, denoise: 1.0, seed: 8008135)
+ ↓
+Upscale:
+ LatentUpscale (2x)
+ ↓
+Refinement Grid:
+ Engine (seed: 8008135 FIXED, denoise: 0.55)
+ X Axis: sampler (test refinement samplers)
+ Y Axis: cfg (find optimal refinement CFG)
+
+ 4. A/B Model Testing:
+ X Axis: checkpoint (modelA.safetensors, modelB.safetensors)
+Y Axis: prompt (various test prompts)
+Result: Compare model interpretations
+
+
+
+
+ Final Product Briefing
+ The h4 Toolkit now ships as a cohesive triad: a battle-tested sampler engine, a clairvoyant debugging suite, and a UI companion that keeps controls ergonomic. This section articulates every feature and function in their final form.
+
+ End-to-End Overview
+
+ - h4_PlotXY drives plan creation, model/LoRA orchestration, latent preparation, sampler invocation, preview publication, and tiled grid rendering.
+ - h4_AxisDriver provides visual axis configuration with model dropdowns, preset management, and direct-wire structured payloads that automatically configure The Engine (stupid-simple X→X, Y→Y, Z→Z wiring).
+ - h4_DebugATron3000 mirrors inbound payloads, emits forensic logging, and powers the Go Plus Ultra diagnostics console.
+ - h4_DebugATronRouter extends the debugger to dual-branch graphs, maintaining passthrough fidelity while generating branch-specific insights.
+ - h4_ui.js binds the suite together with dynamic sockets, placeholders, tooltip copy, Go Ultra widget choreography, orientation controls, and Axis Driver UI.
+
+
+ Function-by-Function Detail — h4_Plot/nodes.py
+
+ - Discovery helpers (
_discover_sampler_choices, _discover_scheduler_choices): scan ComfyUI registries, normalise aliases, and fall back to safe defaults when the runtime is lean.
+ - Compatibility shim (
_invoke_sampler_with_compatibility): interrogates sampler signatures, remaps/drops kwargs, retries with raw kwargs when required parameters remain missing.
+ - Sigma coordinator (
calculate_sigmas + metadata extracted via _extract_model_sampling): ensures samplers receive the tensors and model sampling profile they now mandate.
+ - Engine pipeline (
h4_PlotXY.run_pipeline): constructs AxisDescriptor plans, resolves checkpoints/LoRAs, clones or spawns latents, runs samplers, decodes previews, annotates grids, returns stacked tensors plus grid.
+ - Axis Driver (
h4_AxisDriver): Visual axis configuration with model dropdowns, preset management, and direct-wire structured payloads that automatically configure The Engine's axis modes (no manual matching required).
+ - Preview publishers (
_get_preview_handlers, _render_preview_tuple): pick best-available decode/publish hooks, gracefully degrade when latent_preview is absent.
+ - Diagnostics infrastructure:
ToolkitLogger (colour logging), _summarise_tensor/_tensor_stats/_summarise_object describe payloads; _clone_payload_safely safeguards passthrough cloning.
+ - Debug base class (
h4_DebugATron3000): metadata-driven INPUT_TYPES(), branch-aware helpers, VAE fallback extraction, watch-expression evaluation, latent snapshotter, anomaly detection, preview/JSON writers.
+ - Router subclass (
h4_DebugATronRouter): inherits route logic, overrides metadata with Branch A/B definitions, exposes passthrough-by-default mode, and realigns fallbacks on a per-branch basis.
+ - Exports (
NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS, NODE_TOOLTIP_MAPPINGS): publish the quartet to ComfyUI with descriptive names and tooltip dictionaries.
+
+
+ Function-by-Function Detail — h4_Plot/js/h4_ui.js
+
+ - Placeholder/tooltip suite:
applyPlaceholder, applySliderTooltip, and TOOLTIP_COPY ensure every widget explains itself.
+ - Go Ultra choreography:
ensureUltraWidgetCache, toggleUltraWidgets, and applyUltraWidgetLabels physically remove advanced widgets when disabled, restore them in order when re-enabled, and keep heights consistent.
+ - Axis Driver UI: Complete visual configuration system with model dropdowns, item management, style panel, JSON toggle, and automatic asset fetching via multi-endpoint strategy.
+ - Asset Discovery:
fetchAssetList, loadAssetKinds query ComfyUI's native APIs and Stability Matrix endpoints, caching models per session with fallback chain.
+ - Sizing System (DISABLED): All auto-sizing logic neutered to prevent feedback loops. Node uses standard ComfyUI sizing only.
+ - Orientation control:
applyOrientationLayout and the accompanying widget callback flip nodes between horizontal/vertical modes without manual resizing.
+ - Dynamic socket brain:
ensureDynamicSockets, handleDynamicConnectionChange, and updateDynamicSocketLabels maintain eight wildcard I/O lanes, auto-labelling based on linked socket types.
+ - Extension entrypoint: the registered ComfyUI extension hooks node creation/connection events to apply all polish automatically.
+
+
+ Behavioural Guarantees
+
+ - Sampler resilience: New signature mapper + metadata pipeline keeps The Engine aligned with upstream sampler changes.
+ - Diagnostics depth: Go Plus Ultra surfaces conditioning gaps, token previews, latent anomalies, model fingerprints, branch summaries, and watch-expression outputs.
+ - UI cohesion: Nodes spawn compact, labelled, and orientation-aware, with Go Ultra controls only visible when relevant.
+ - Branch transparency: Router console lines, summaries, and snapshots all include branch context, eliminating guesswork during multi-lane debugging.
+ - Artefact hygiene: Preview images/JSON logs respect the “cache artefacts” toggle and land inside a dedicated temp folder.
+
+
+ Validation Summary
+
+ python -m py_compile h4_Plot/nodes.py — PASS after final router refactor.
+ - Manual UI review confirmed widget labels, collapsed height, and dual-branch sockets render as intended.
+
+
+
+ Maintainer Marker — revisit this briefing after every release; the final product description doubles as the acceptance checklist for future regressions.
+
+
+
+