Commit Graph
184 Commits
Author SHA1 Message Date
JasonHoku 8fbf7568d2 Fixed image resolution settings not outputting to config_json 2026-03-07 17:31:54 -08:00
JasonHokuandClaude Opus 4.6 836a7b3b70 fix: distributed worker missing 8 sampling parameters causing different outputs
The worker's generate_image() call was only passing basic parameters
(seed, steps, cfg, sampler, scheduler, denoise, attention_mode) but
missing all advanced/model-specific parameters that the local path
passes. This caused workers to produce different images than local runs.

Added missing parameters:
- model_sampling_override (noise schedule for Flux/SD3/AuraFlow)
- model_sampling_shift (shift values for model sampling)
- model_sampling_flux_max_shift / model_sampling_flux_base_shift
- use_advanced_sampling (SamplerCustomAdvanced vs standard KSampler)
- advanced_guider / advanced_scheduler
- flux_guidance_value
- width / height (for Flux2Scheduler computation)

All parameters were already present in the job config dict from
expand_configs() but were never forwarded to generate_image().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:22:30 -08:00
JasonHoku afd1c07a92 Better, Editable Custom Resolutions In Builder UI & Minor Fixes 2026-03-07 16:02:28 -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
JasonHokuandClaude Opus 4.6 9987d38f9b fix: Custom Prompts section — session load, checkbox toggle, and count display
Three bugs fixed:

1. Global Prompt data was incorrectly loaded into Custom Prompts when
   loading a session. Added _prompt_source flag ("global"/"custom") to
   configs so the round-trip loader can distinguish between them and
   restore global prompts to the correct section.

2. Checkbox toggle was not visually broken but appeared non-functional
   because bug #1 caused global prompts to populate custom prompt fields,
   making the state confusing. Now correctly separated.

3. Prompt combination count in the section header was only computed at
   render time and never updated when groups changed. Added live update
   via updatePromptCountDisplay() in the onChange callback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:04:08 -08:00
JasonHokuandClaude Opus 4.6 d404420042 fix: disable job skip/resume when optional inputs are connected
Previously, check_if_job_completed() with optional inputs would only
match on sampler/scheduler/steps/cfg/denoise/seed — skipping model,
prompt, and lora checks. This caused false positive matches, skipping
jobs even when the user changed models via optional input nodes.

Now returns -1 (no match) immediately when has_optional_inputs=True,
forcing all jobs to re-generate since upstream changes can't be detected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:53:55 -08:00
JasonHokuandClaude Opus 4.6 38b766cc92 fix: preserve all conditioning extra dict keys during worker serialization
The conditioning serialization was only preserving pooled_output, dropping
critical keys like attention_mask that Wan/T5 models need for proper
sampling. This caused KSampler to produce NaN latents on distributed workers.
Includes backwards compatibility with old serialization format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:38:54 -08:00
JasonHokuandClaude Opus 4.6 1e43776994 fix: free GPU memory before VAE decode + NaN diagnostics
Worker now clones latent and frees UNet tensors + CUDA cache before
VAE decode, giving Dynamic VRAM clean memory for VAE loading.
decode_latent_with_vae now detects NaN in input/output, logs diagnostic
info, retries with float32, and handles bfloat16->numpy conversion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:25:09 -08:00
JasonHokuandClaude Opus 4.6 3003fb8193 fix: add torch.inference_mode to worker thread for Dynamic VRAM compat
Worker threads run outside ComfyUI's execution engine which wraps
everything in torch.inference_mode(). Without it, Dynamic VRAM's lazy
weight loading produces NaN during VAE decode, causing black images.
Matches ComfyUI's execution.py:703 pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:06:56 -08:00
JasonHokuandClaude Opus 4.6 1830713bd2 feat: configurable label mode overlays on dashboard cards
Adds color-coded metadata labels (model, lora, prompt, sampler,
scheduler, cfg, steps, seed, denoise) as image overlays in the
dashboard grid. Settings panel with per-field toggles and unique-only
mode that hides values shared by every card. Per-lora filtering skips
global loras while showing unique ones. Persisted via localStorage,
backwards compatible with older sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:00:24 -08:00
JasonHokuandClaude Opus 4.6 bfe47e0b46 fix: prevent canvas flicker when panning and zooming simultaneously
When mouse wheel zoom fired during a click-drag pan, the zoom function
updated panOffset for the zoom pivot but the next mousemove overwrote
it using stale panStart values, causing a position jump. Now tracks
last mouse position and recalculates panStart after zoom adjustments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:35:12 -08:00
JasonHoku 2986f5af63 Live Version Update v1.15 2026-03-07 12:19:26 -08:00
JasonHokuandClaude Opus 4.6 f6f21e309d fix: remove force_patch_weights for Dynamic VRAM compatibility
ComfyUI v16.3's Dynamic VRAM uses ModelPatcherDynamic which asserts
force_patch_weights=False. Removed the flag from both CLIP GPU loading
calls to match ComfyUI's own CLIP.load_model() pattern. Backwards
compatible with older ComfyUI versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:09:49 -08:00
JasonHokuandClaude Opus 4.6 8ff48532f9 feat: drag-and-drop reorder for models, loras, text encoders, and VAEs
Adds HTML5 drag-and-drop reordering within each list in the Config
Builder UI. Drag the ⠿ handle on any card header to change run order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:49:42 -08:00
JasonHokuandClaude Opus 4.6 5e7ad22cc7 fix: backslash in f-string, dashboard focus stealing, VAE config priority, column hotkeys
- Fix Python 3.10 SyntaxError: extract backslash replace() out of f-string
  expression in config_builder_node.py (issue #12)

- Fix dashboard iframe stealing focus from ComfyUI on every live update
  by removing viewport.focus() from render/update paths in logic_virtual.js

- Intercept Ctrl+S in dashboard iframe and forward to ComfyUI parent
  window so workflow save works instead of triggering browser Save As dialog

- Config Builder VAE settings now override sampler node's remote_vae_endpoint
  via config_overrides_vae flag in generation_orchestrator.py flush logic

- Fix Shift+1-9 column hotkeys: use e.code instead of e.key since Shift
  produces symbols (!@#$) not digits for e.key on standard keyboards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:41:44 -08:00
JasonHokuandClaude Opus 4.6 989da199a3 Update README.md and ProjectStructure.md for v3.0
- Add distributed processing features (multi-worker, master text
  encoding, model sync, per-worker logging)
- Add comprehensive AI development notes with architecture diagrams,
  file dependency graphs, gotchas, and testing instructions
- Update file structure to include all 21 Python modules, distribution
  files, and conf-builder-distribution.js
- Add distribution API routes reference
- Add distribution module descriptions and communication patterns
- Update data flow to include distribution pipeline
- Add 8 new critical development gotchas (13-20)
- Add new changelog entry for March 2026
- Bump version to 3.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:08:34 -08:00
JasonHokuandClaude Opus 4.6 25d7c9e7b2 Fix configs_json not unwrapped when distribution is disabled
config_builder_node.py always wraps configs in {"configs": [...]},
but sampler_node.py only unwrapped the array when _distribution key
was present. Without distribution, the wrapped dict passed through
to expand_configs which iterated over dict keys (strings) instead
of config dicts, causing AttributeError on .get().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:41:49 -08:00
JasonHokuandClaude Opus 4.6 5913ae19e0 Fix alert popup on dashboard load for non-existent sessions
loadSession() in logic_pipeline.js was called unconditionally on page
load, causing a 404 fetch and alert("Load Error: Session not found")
for new/empty sessions. Guard the call to only run when fullManifest
has items, letting init() in logic_init.js handle empty sessions via
showSessionLandingIfEmpty().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:35:52 -08:00
JasonHokuandClaude Opus 4.6 f6103933c4 Fix dashboard landing page: auto-load + handle missing sessions
Root cause: Two issues prevented the landing page from showing.

1. __init__.py get_session_html endpoint returned 404 when session
   didn't exist, so the iframe never received any content. Now returns
   full template with empty manifest so landing page JS can display
   available sessions.

2. web/dashboard.js never auto-loaded on node creation - the iframe
   started empty (black box). Now auto-calls forceLoadSession after
   node creation so the dashboard immediately shows either the session
   grid or the landing page with session cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:24:47 -08:00
JasonHokuandClaude Opus 4.6 a4060351bd Fix claim_timeout default from 300 to 600 in orchestrator
The DistributionManager, config builder, and UI all already used 600 as
the default, but the orchestrator's fallback was still 300. This caused
premature job reclaim when workers loaded models for the first time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 23:41:59 -08:00
JasonHokuandClaude Opus 4.6 49e0363146 Fix session landing page not showing when no session exists
dashboard_node.py: Generate full template with empty manifest instead of
plain error HTML, so the landing page JS logic can detect empty data and
show session cards.

logic_utils.js: Always call fetchAndShowSessions() so the session picker
dropdown in the cog menu is populated even when a session is loaded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 23:39:34 -08:00
JasonHoku 2a84bb34a1 fix viewport redeclared 2026-03-05 23:24:21 -08:00
JasonHokuandClaude Opus 4.6 2146e4926c Refactor Distribution Settings: always-visible toggle + embedded config
Distribution Settings section:
- Always visible at top with On/Off toggle
- Settings collapse when toggled off, expand when on
- No longer conditionally rendered

Distribution config output/input removal (clean break):
- Config Builder: RETURN_TYPES reduced from 3 to 2 outputs
- distribution_config embedded in configs_json as _distribution key
- Output format: {"configs": [...], "_distribution": {...}}
- Sampler node: Removed distribution_config optional input
- Sampler extracts _distribution from configs_json automatically
- Backward compatible: plain array configs_json still works
- JSON Preview shows full output including _distribution when enabled
- Session loader handles both old array and new object formats

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:59:10 -08:00
JasonHokuandClaude Opus 4.6 bb2f786832 Dashboard session landing page and reload improvements
- Topbar: Changed Load Session to Reload Session with refresh icon
- Settings cog: Added session picker dropdown in SESSION section
- New endpoint: GET /config_tester/list_sessions returns sessions with
  metadata (name, item count, first image, modification time)
- Landing page: Shows session cards with thumbnails when no session loaded
- Click any card or use dropdown to load a session
- Landing page auto-hides when session data loads

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:44:16 -08:00
JasonHokuandClaude Opus 4.6 6cc9616708 Prompt editor size, sidebar icons, and column hotkeys
- Double prompt JSON editor min-height from 80px to 160px
- Sidebar config sub-icons always visible (removed hover-expand)
- Config icons now show cogwheel + number (e.g. ⚙️1)
- Text Encoders icon changed to 🔣, LoRAs to 🔮
- Dashboard: Shift+1-9 sets column count, Shift+0 resets to auto

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:31:54 -08:00
JasonHokuandClaude Opus 4.6 1cd292f86f Add design and implementation plan for builder/dashboard improvements
5 items: prompt editor size, sidebar icons, dashboard hotkeys,
session landing page, distribution config refactor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:16:47 -08:00
JasonHokuandClaude Opus 4.6 fddffd7a8c Add worker model sync and upcoming models pre-fetching
Worker downloads missing models from master via HTTP before processing.
Background pre-fetch thread downloads upcoming models during job execution.
Distribution manager scans pending queue for unique model references.
Job claim responses include upcoming_models list when sync enabled.
Master passes sync_models_to_workers flag to workers via start_worker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:15:54 -08:00
JasonHokuandClaude Opus 4.6 25c375debf Add master file server endpoints for model sync
POST /distribution/check_models - bulk check which models exist
POST /distribution/download_model - stream model file to worker
Both endpoints use folder_paths for path resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:10:58 -08:00
JasonHokuandClaude Opus 4.6 e71fe8ed91 Add Sync Models to Workers checkbox and config passthrough
New toggle in Distribution Settings section. Flag flows through
distribution_config JSON as sync_models_to_workers boolean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:04:08 -08:00
JasonHokuandClaude Opus 4.6 a8e7eef065 Add implementation plan for sync models to workers
5-task plan: UI checkbox + config passthrough, master file server
endpoints, worker download helpers, job processing integration
with background pre-fetch, and upcoming models in claim response.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:44:27 -08:00
JasonHokuandClaude Opus 4.6 850b564690 Add design doc for sync models to workers feature
HTTP-based model file transfer from master to workers with intelligent
pre-fetching. Workers save files permanently, preserving master's
directory structure. Optional checkbox in Distribution Settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:39:46 -08:00
JasonHokuandClaude Opus 4.6 39695f5e52 Implement Tasks 2-5: tag diff, sidebar nav, section reorg, headers
Task 2: Backend compares fresh CivitAI trainedWords with stored
loras_tags.json on force_refresh. Frontend shows diff banner with
Update/Keep buttons in the LoRA metadata modal.

Task 4: Per-config sidebar navigation — numbered cog icons per config
array with hover-expandable sub-section icons (Models, TE, VAE, LoRAs).
Section IDs added to all sub-sections for scroll targeting.

Task 5: Distribution Settings moved to top of layout. Extra Model &
Sampling Options moved inside Models as sub-section. TE header upgraded
to match section toggle style with brighter color. VAE header lightened
(#444 bg, #cc66ff text). LoRAs header brightened (#4499ff).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:08:54 -08:00
JasonHokuandClaude Opus 4.6 27756a0c84 Add Remote VAE presets dropdown for HF endpoints
When Remote URL type is selected in VAE element, show a presets
dropdown with known HuggingFace VAE endpoints (SD, SDXL, Flux,
HunyuanVideo). Selecting a preset auto-fills the URL input.
Custom option allows manual URL entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:03:15 -08:00
JasonHokuandClaude Opus 4.6 5e09125e7e Fix bypass toggles not updating JSON Preview
All four bypass toggle onclick handlers (model, LoRA, TE, VAE) called
node.saveState() but never updatePreview(node), causing the JSON Preview
panel to show stale data when items were toggled off/on. Added the
missing updatePreview(node) call after saveState() in each handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:33:10 -08:00
JasonHokuandClaude Opus 4.6 1191252486 Add implementation plan for builder UI fixes & enhancements
Detailed 5-task plan covering: bypass toggle JSON preview fix,
force_refresh tag diff prompts, Remote VAE presets dropdown,
per-config sidebar navigation, and section reorg with header
contrast improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:14:18 -08:00
JasonHokuandClaude Opus 4.6 c6467b21e7 Add design doc for builder UI fixes & enhancements
Covers 5 approved items: VAE/TE bypass toggle fix, force_refresh
tag comparison prompts, Remote VAE presets dropdown, per-config
sidebar navigation, and section organization with header contrast
improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:09:36 -08:00
JasonHokuandClaude Opus 4.6 465ff291a9 feat: builder UI overhaul — sticky top bar, sidebar nav, uniform headers, dark mode contrast
Replaces the 3-section top row with a compact sticky top bar containing session
name input and settings dropdown (Load Session, Load Config, Save Config, toggles
for Auto-Save, Distribution, Label Mode, Include None/Default, and Refresh Models).

Adds left sidebar with navigation icons (scroll to Global Prompts, Config Arrays,
Distribution, JSON Preview) and quick action buttons (Add Config, Refresh Models).
Sidebar highlights active section via scroll spy.

All section headers now use uniform styling: 16px bold white text on a subtle
gradient bar with colored left accent stripe. Distribution settings render as a
standalone full-width section when enabled.

Improved dark mode contrast: brighter labels (#ccc), brighter input borders (#555),
brighter button text (#e0e0e0), brighter primary buttons (#0077dd).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:18:41 -08:00
JasonHokuandClaude Opus 4.6 1aed5a6547 docs: add builder UI navigation/layout/styles design and implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 05:08:47 -08:00
JasonHokuandClaude Opus 4.6 451fa3b3ab docs: add Builder UI navigation, layout & style improvement notes to roadmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 04:24:20 -08:00
JasonHokuandClaude Opus 4.6 aadae6d94a feat: per-config resolutions — builder UI, config expansion, generation override
Each config array can now have its own resolution list displayed as chips with
categorized preset dropdown (SD 1.5/SDXL/Flux × Square/Portrait/Landscape) plus
custom W×H input. Resolutions flow through configs_json, expand in the Cartesian
product, and override the sampler's global resolutions_json on a per-config basis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 04:24:15 -08:00
JasonHoku a2d0a98901 bump ver 2026-02-28 23:17:07 -08:00
JasonHoku 4bde363040 Better UI Rendering 2026-02-28 23:16:50 -08:00
JasonHoku 82a875fbbd distribution worker fix remote vae v2 2026-02-28 22:13:50 -08:00
JasonHoku 2c15fe035a fix remote vae on distribution worker 2026-02-28 21:56:12 -08:00
JasonHokuandClaude Opus 4.6 ee4451f3a2 Add custom lora trigger word editor with modal UI and backend endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:27:26 -08:00
JasonHokuandClaude Opus 4.6 a71b9ed315 Add dashboard toggle to show/hide trigger words in prompts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:15:21 -08:00
JasonHokuandClaude Opus 4.6 87e37563f2 Enhance CivitAI modals: re-fetch button, save JSON, force_refresh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:11:09 -08:00
JasonHokuandClaude Opus 4.6 4fd06a379c Optimize builder UI: debounce renderUI, parallelize model list fetches
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:00:20 -08:00