Commit Graph
106 Commits
Author SHA1 Message Date
Jason HokuandClaude Opus 4.7 f18cc833ea chore: render Run Settings above Distribution Settings (very top of UI)
User wanted Run Settings to be the FIRST section, above everything
including Distribution Settings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:29:55 -07:00
Jason HokuandClaude Opus 4.7 7a2c3c905e feat: Builder UI Run Settings — top-of-UI placement + 6 generator-node overrides
Phase 1 of consolidating run-level config into the Builder UI. The
Builder UI's "Run Settings" section is now rendered at the TOP of the UI
(was previously below config arrays) and gains six new fields with help
tooltips:

- overwrite_existing (bool, default false)
- flush_batch_every (int, default 4)
- lora_triggerwords_mode (enum: None / Append To End / Append To Start /
  Read From Config, default None)
- save_conditioning_cache_to_file (bool, default false)
- enable_model_cache (bool, default false)
- vae_batch_size (int, default 4, range -1..64)

State plumbs through state_to_configs_json -> _session_settings ->
sampler_node.run_tests -> run_generation_loop. Builder UI values
override the corresponding widgets on UltimateSamplerGrid when set
(non-default). Widget values remain the fallback so existing workflows
keep working without changes.

Logs an "⚙️ <name> overridden by Builder UI: <value>" line whenever an
override fires, so it's obvious in the console.

Next: once the user has tested this thoroughly, the corresponding
widgets on the SamplerGridTester node can be removed/hidden to
simplify the generator UX (deferred — coordinate with user).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 09:21:14 -07:00
Jason HokuandClaude Opus 4.7 35e6be3a54 fix: include preview panel CSS + drop JSON Preview sidebar nav (orphan)
These changes belong with the earlier "preview panel uses /configbuilder/preview"
work (b6e2344) but were dropped from that commit. Folding in now:

- Adds .cb-preview-panel + resize-handle + header/content CSS used by the
  renderPreviewSection function shipped in 991631a.
- Removes the obsolete addNavIcon("📄", "JSON Preview", ...) sidebar entry.
- Cleans the cb-sec-preview ID out of the scroll-spy section list.

No behavior change beyond what was already committed — fills in the
visual/CSS gap the committed JS depends on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 12:59:51 -07:00
Jason HokuandClaude Opus 4.7 490c5196ef feat: configurable image save format (webp/png/jpg)
Adds a dropdown to the Builder UI's Run Settings section letting users
pick the saved image file format. Default remains webp (current
behavior). State plumbed through state_to_configs_json ->
_session_settings -> orchestrator -> save_image_to_disk.

PNG users will see lossless saves; JPG users smaller files at quality 95.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 13:05:10 -07:00
Jason HokuandClaude Opus 4.7 4fb4fea5ed fix: lock Compare Strengths to single-bracket form (no Cartesian)
When the user types '0.5, 1.0' they want 2 outputs (lora at 0.5, lora
at 1.0 — both model and clip mirroring), not 4 outputs (Cartesian
m×c). The bug was that we wrote both _model AND _clip side-channel
arrays, so Python emitted 'name:[m]:[c]' which the orchestrator
correctly interpreted as Cartesian.

JS: collapse the two-input compare section to a single 'Strengths:'
input. Never write _clip to lora_weight_arrays.

Python: process_lora_array now emits 'name:[m_arr]' (no clip part)
when only _model array is present. The generator's existing
parse_lora_definition defaults clip=model when the third segment
is missing, giving N configs with locked semantics.

Drops the Cartesian path entirely. Backward compat retained: if a
saved workflow has both arrays (legacy), the dual-bracket form is
still emitted so the orchestrator can Cartesian-expand as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 11:27:39 -07:00
Jason HokuandClaude Opus 4.7 2913fc606a feat: unified Compare Strengths section with labeled Model+Clip inputs
Replaces the two separate '+ Compare Strengths' / '+ Compare CLIP'
buttons with a single button that toggles a section showing two
labeled inputs ('Model Strengths:' and 'Clip Strengths:'). When
Strength Lock is ON, only the Model input shows (CLIP mirrors
automatically — same as today).

Also fixes button-text-not-updating bug: previously the button
required a full re-render to swap between '+ Compare Strengths' and
'✕ Array' text, so toggling the input visible left the button stuck
at '+ Compare Strengths' until page reload. Activation now persists
arrays as [1] (Python passes through unchanged) and uses array
existence rather than length>1 as the active indicator, so reloads
correctly restore the active state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:27:49 -07:00
Jason HokuandClaude Opus 4.7 991631aec4 docs: update conf-builder-readme to reflect /configbuilder/preview endpoint
convertStateToConfigs() was deleted in the previous commit; the JS
preview now POSTs to the new endpoint and Python is the sole transformer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 09:59:48 -07:00
Jason HokuandClaude Opus 4.7 b6e2344f9b feat: preview panel uses /configbuilder/preview endpoint
Replaces synchronous JS convertStateToConfigs (~280 lines) with a
debounced (800ms) fetch to the new endpoint. Preview now renders
literally what generate_config produces — drift impossible by
construction.

Stale-state badge surfaces network failures without blocking editing.
Loading placeholder appears during the first-paint debounce window.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 09:59:10 -07:00
Jason Hoku ef0062fce8 fix: ltx pickers route through modelLists object so refresh-models button updates them 2026-04-27 12:14:39 -07:00
Jason Hoku 15bd7ae2dd fix: localStorage cache version bump + persist latent_upscale_models, clearAllCaches resets all upscale fields 2026-04-27 12:07:41 -07:00
Jason Hoku 2a125cff4b fix: drag-drop and clipboard paste append to existing image input value instead of overwriting 2026-04-25 21:10:03 -07:00
Jason Hoku 1cd7a5528c feat: drag-drop + clipboard paste for ltx image input, resolve via comfy input dir 2026-04-25 21:01:00 -07:00
Jason Hoku 3adad657b6 feat: ltx image-to-video builder ui (image picker, strength sliders, compression) 2026-04-25 20:16:07 -07:00
Jason Hoku a3478c01cb fix: ltx latent_upscaler reads from latent_upscale_models/ folder, not upscale_models/ 2026-04-25 19:43:10 -07:00
Jason Hoku 0b0781f838 fix: ltx config flattening in py generate_config + trust model type before file picked 2026-04-25 19:19:48 -07:00
Jason Hoku f76c9902a0 fix: ltx state lives per-configArray, derive model_type from models[] 2026-04-25 18:37:35 -07:00
Jason Hoku fee9d41090 fix: ltx_video model picker uses diffusion_models folder, LTX badge, LTX file label 2026-04-25 18:19:08 -07:00
Jason Hoku a60f7ed7e8 feat: hide scheduler/steps/denoise/flux fields when ltx_video selected 2026-04-25 18:09:44 -07:00
Jason Hoku 35cd8b8260 feat: ltx image input + audio subsection stubs (full impl in B/C) 2026-04-25 18:05:30 -07:00
Jason Hoku aa94e6c2c2 feat: ltx stage 1 + stage 2 sampler/sigmas subsections 2026-04-25 18:04:02 -07:00
Jason Hoku 5508be8539 feat: ltx video shape subsection (duration + frame rate sliders) 2026-04-25 18:01:01 -07:00
Jason Hoku 8064c31a55 feat: ltx model files subsection (dual clip, vae, upscaler pickers) 2026-04-25 17:59:08 -07:00
Jason Hoku cc52ad679b feat: ltx settings section skeleton with conditional render on model_type 2026-04-25 17:56:17 -07:00
Jason Hoku 99f8cd0202 feat: ltx_video option in model_type dropdown 2026-04-25 17:51:18 -07:00
Jason Hoku 4f874fc628 feat: tooltips on Compare Strengths and Compare CLIP buttons explain LoRA strength sweeps 2026-04-22 17:33:47 -07:00
Jason HokuandClaude Opus 4.6 9e7911aa23 feat: SeedVR2 upscale mode in Builder UI and Dashboard
Adds SeedVR2 as a new upscale mode alongside HiRes Fix, Model Upscale,
and Model+HiRes. Requires ComfyUI-SeedVR2_VideoUpscaler to be installed
as a dependency — the plugin calls its nodes programmatically.

Data Model:
- New seedvr2 options object on each upscale step with all SeedVR2
  parameters: dit_model, resolution, max_resolution, seed,
  color_correction, batch_size, noise scales, blocks_to_swap,
  attention_mode, offload_device, cache_model, VAE tiling options
- _defaultSeedVR2Options() / createDefaultSeedVR2Options() helpers
- Migration: ensureStepFields adds seedvr2 defaults to existing configs

Builder UI (conf-builder-config-management.js):
- "SeedVR2 Upscale" added to mode dropdown
- When selected, shows full SeedVR2 settings: DiT model selection
  (10 variants: 3B/7B x fp16/fp8/GGUF/sharp), resolution, seed,
  color correction, noise scales, batch size, VRAM optimization
  (blocks_to_swap, attention_mode, offload), VAE tiling with
  conditional encode/decode tile size and overlap fields

Dashboard (logic_upscale_modal.js):
- Same SeedVR2 mode and fields in renderPipelineEditor via _renderStep
- All fields use existing _makeSelect/_makeNumber/_makeCheckbox helpers

Python Execution (image_generation.py):
- New seedvr2_upscale(pil_image, seedvr2_config) function
- Imports SeedVR2 nodes from NODE_CLASS_MAPPINGS at runtime
- Calls SeedVR2LoadDiTModel → SeedVR2LoadVAEModel → SeedVR2VideoUpscaler
- Converts PIL→tensor→SeedVR2→tensor→PIL
- Clear error if SeedVR2 not installed

Pipeline Integration (generation_orchestrator.py):
- Inline upscale path: mode=="seedvr2" branch decodes current latent
  to PIL, calls seedvr2_upscale, saves result, updates manifest
- Supports chained steps: non-final SeedVR2 steps re-encode to latent
  for the next step in the pipeline

Preset compatible: seedvr2 config serializes naturally as JSON, saved
and loaded with upscale presets without any special handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 12:29:00 -07:00
Jason HokuandClaude Opus 4.6 beacb02101 fix: fullscreen toggle loads correct session instead of default
When toggling fullscreen, the iframe reload was reading the session name
from the node's widget (default "my_session") instead of the session
the user had actually selected in the Dashboard picker.

Now the Dashboard sends its current session name in the fullscreen
postMessage, and the handler prefers that over the widget default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 10:32:45 -07:00
Jason HokuandClaude Opus 4.6 93016b5888 feat: partial re-render for Builder UI config sections
Add rerenderConfigSection(node, arrayIdx) that rebuilds only one config
array section instead of the entire UI. debouncedRenderUI now accepts
optional arrayIdx parameter — when provided, uses partial re-render.

This avoids the full DOM rebuild (7k+ nodes) when making changes within
a single config section (add/remove model/lora, toggle settings). Falls
back to full renderUI if the target section isn't found in the DOM.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:27:26 -07:00
Jason HokuandClaude Opus 4.6 7b437f0e2f feat: instant model loading with localStorage cache + background polling
Performance improvements for Builder UI model/LoRA loading:

localStorage persistent cache:
- Model lists cached to localStorage on first fetch
- On page reload, cached data renders instantly (no network wait)
- Cache expires after 24 hours, cleared on explicit Refresh Models
- Saves all categories: checkpoints, diffusion, GGUF, text encoders,
  VAEs, upscale models, samplers, schedulers, clip types

Background count polling:
- New /configbuilder/model_counts endpoint returns file counts per
  category (fast — uses folder_paths internal stat-based cache)
- Frontend polls every 30s, compares counts to last known values
- On change: auto-refreshes model lists and re-renders UI
- No manual Refresh Models needed when adding new models

Deduplicated /object_info:
- Shared _getObjectInfo() cache ensures the expensive /object_info
  endpoint is called at most once per session (was called 2-3x)
- getAvailableLoras() and getAvailableModels() share the cached response

Polling lifecycle:
- Starts after initial render, stops when node is removed
- Only active while ConfigBuilder node exists on canvas

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:13:18 -07:00
Jason HokuandClaude Opus 4.6 7bc61d47be feat: section presets for Models and LoRAs, CLIP weight array UI
Section Presets:
- Add generic /configbuilder/section_presets endpoint (GET/POST with
  ?section=models|loras|prompts query param)
- Add preset dropdown (Load/Save/Delete) to Models and LoRAs section
  headers in Builder UI
- Models presets save: models list, text_encoders, clip_type
- LoRAs presets save: loras list, weight_arrays, strength_lock

CLIP Weight Array UI:
- Add "+ Compare CLIP" button below CLIP strength slider when strength
  lock is disabled, mirroring the existing model strength array button
- Stores CLIP arrays in lora_weight_arrays[name_clip]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:06:22 -07:00
Jason HokuandClaude Opus 4.6 7d5fbb213d perf: virtualize searchable select dropdown, fix event listener leak
- Limit dropdown to first 50 options (was creating ALL options as DOM
  nodes — 500+ for LoRAs, 100+ for models — on every focus/keystroke)
- Show "... N more — type to filter" message when truncated
- Use event delegation (single onmouseover/onmouseout/onclick on parent)
  instead of per-option event handlers
- Replace document.addEventListener("click") with input.onblur to close
  dropdown (was leaking global click listeners that accumulated on every
  re-render — 50+ listeners after a few refreshes)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:06:10 -07:00
Jason HokuandClaude Opus 4.6 5fc90097dc fix: persist JSON/Visual toggle and add scrollable prompt sections
- Prompt editor JSON/Visual mode now persists in node.uiState.promptRawMode
  across Refresh Models and other re-renders (was a local variable, always
  reset to Visual)
- Added promptRawMode:{} to uiState initialization
- createPromptGroupEditor accepts optional {rawModeKey, uiState} to persist
- Positive prompt groups sections now have max-height: 1000px with overflow
  scroll, preventing long prompt lists from pushing everything down

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:50:34 -07:00
Jason HokuandClaude Opus 4.6 c971e2934d feat: full pipeline editor in dashboard upscale modal
Replace the simplified single-step config editor with renderPipelineEditor(),
a full pipeline/step UI matching the Builder UI feature set:
- Multiple pipelines with add/remove, active toggle, name, collapsible
- Multiple steps per pipeline with all settings (mode, resize, ratio,
  denoise, hires steps, tiled sampling, tiled VAE, repeat)
- Multi-model selector with searchable dropdown and chips
- HiRes prompt adjustment section
- Iteration count display per step

Also fixes:
- Preset double-entry bug: save now deduplicates by name in both
  Builder UI and dashboard modal
- Builder UI hires_force_uniform_tiles checkbox: || true -> !== false
  (was always displaying as checked regardless of stored value)
- Model list fetch: GET instead of POST (matching the endpoint)
- Modal size: 600px wide, 90vh tall for better fit
- Cancel button: sends cancel request to server during active upscale
  instead of just closing the modal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:34:13 -07:00
Jason HokuandClaude Opus 4.6 bc8e2d05cf fix: initialize preset array before async fetch, add save logging
presetSelect._presets was undefined if save was clicked before the
async fetch completed. Now initialized to [] immediately. Added
console logging to debug preset save/load flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 00:06:05 -07:00
Jason HokuandClaude Opus 4.6 8d8b32fcfb feat: add Config Array presets — save/load entire config setups
New preset system for config arrays: save/load all samplers,
schedulers, steps, CFG, models, LoRAs, VAEs, prompts, and all
other settings as reusable presets. Stored in USCG-config-section-presets.json.
Preset dropdown with Load/Save/Delete in the Config Arrays header bar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 19:52:52 -07:00
Jason HokuandClaude Opus 4.6 c2fadff0e1 feat: add LoRA weight arrays UI for comparing strengths
New "+ Compare Strengths" button next to each LoRA's Model Strength
slider. Enter comma-separated values (e.g., 0.5, 0.8, 1.0) to grid
search different LoRA strengths. Outputs bracket notation in the
config JSON (e.g., lora.safetensors:[0.5, 0.8, 1.0]:1.0) which the
existing Python expansion code handles as Cartesian products.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 19:51:27 -07:00
Jason HokuandClaude Opus 4.6 d48c77515a feat: add upscale preset load/save to Builder UI upscale settings
Preset dropdown with Load/Save buttons at the top of the upscale
settings section. Loads preset pipelines + hires prompt config and
re-renders the section. Saves current config to shared presets file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 16:01:23 -07:00
Jason HokuandClaude Opus 4.6 9b8f01ea48 feat: add Start At Job # option for custom job resume/skipping
New 'Run Settings' section in Builder UI with a job number input.
When set > 0, the generation loop skips all jobs before that number.
Useful for resuming at a specific point without relying on
auto-detection. Flows through session settings to the orchestrator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 16:00:43 -07:00
Jason HokuandClaude Opus 4.6 e1bba3e8f5 fix: prevent cross-tab dashboard from force-loading running session
CASE 2 auto-load now only triggers when no session is loaded yet,
not when the user is manually browsing a different session. Prevents
a running generation in one tab from hijacking the dashboard in
another tab.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:56:51 -07:00
Jason HokuandClaude Opus 4.6 c0f4def625 feat: wire run_upscales_at_end through config export and Python
Added to JS convertStateToConfigs() and Python generate_config()
session settings dict.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:26:35 -07:00
Jason HokuandClaude Opus 4.6 a79008847b feat: add 'Run Upscales At End' checkbox to upscale settings UI
New checkbox with description and warning text. Defaults to off.
Migration ensures existing configs get the new field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:26:14 -07:00
JasonHokuandClaude Opus 4.6 89b6ce4eb1 feat: upscale pipelines system + save pre-upscale + HiRes prompt adjust
Replace flat upscale configs with pipeline/steps/repeat architecture:
- Pipelines run independently from base image
- Steps chain sequentially within a pipeline
- Steps support repeat count for iterative refinement

Add "Save Pre-Upscaled Output" option to also keep the base image.

Add "Adjust Prompt During HiRes Fix" with prepend/append/replace
behaviors. HiRes-adjusted prompts are batch pre-encoded for efficiency.
Results written to manifest metadata and exposed as label overlays.

Fix fmtVal scoping error in buildLabelOverlay (was referenced outside
the upscale block where it was defined).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:33:04 -07:00
JasonHokuandClaude Opus 4.6 5fef83db25 fix: dashboard landing page loading default session instead of showing picker
New nodes now show the session landing page instead of auto-loading
"my_session". Uses _configured_from_workflow flag to distinguish fresh
nodes from saved workflows. Also fixes session cards Y-axis overflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:32:44 -07:00
JasonHokuandClaude Opus 4.6 7e1d3bcf75 feat: rewrite upscaling UI as array-based system with Cartesian expansion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:43:04 -07:00
JasonHokuandClaude Opus 4.6 7c1b6ffc8c feat: add upscale model discovery from ComfyUI folder system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:33:30 -07:00
JasonHokuandClaude Opus 4.6 91b8598ac3 feat: add seed settings, canvas flicker fix, upscaling & GPU cooldown
- Seed: expanded per-gen behavior + new full run seed behavior (random/increment/decrement before/after entire run)
- Canvas: fix flicker during simultaneous pan+zoom via requestAnimationFrame batching
- Upscaling: 3 session-level modes (HiRes fix, model upscale, model+HiRes) with tiled VAE support
- Cooldown: configurable GPU breaks between generations with optional VRAM clearing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:00:06 -07:00
JasonHoku 8fbf7568d2 Fixed image resolution settings not outputting to config_json 2026-03-07 17:31:54 -08:00
JasonHokuandClaude Opus 4.6 5543dd1ddc fix: remove edit emoji button, add newline after dropdown, move custom res to benchmarks/
- Removed standalone edit button (editor accessible via dropdown menu)
- Dropdown and Clear on their own row, custom WxH inputs on a second row
- Custom resolutions file moved to benchmarks/USCG-custom-resolutions.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:58:21 -08:00
JasonHokuandClaude Opus 4.6 4a90c18096 fix: resolution dropdown submenus no longer clip or show scrollbars
Removed max-height and overflow-y:auto from all submenu levels so
nested menus can extend freely without being clipped by parent containers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:40:38 -08:00
JasonHokuandClaude Opus 4.6 bad7786597 feat: redesigned resolution picker with nested dropdown and custom editor
- Replaced tiny native <select> with large custom dropdown button
- 3-level nested submenu: Model Type > Orientation (Landscape/Portrait/Square) > Sizes
- Massively expanded built-in presets: SD1.5, SDXL, Illustrious/Pony, Flux, Wan/Video, HiRes/Upscale
- Custom Resolutions Editor modal for creating persistent user-defined resolutions
  organized into named categories
- Custom resolutions saved to ComfyUI output/USCG-custom-resolutions.json
- Custom category always appears first in the dropdown menu
- Edit button (pencil emoji) for quick access to the custom editor
- Backend: GET/POST /configbuilder/custom_resolutions endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:26:12 -08:00