Windows users occasionally see 'OSError [Errno 22] Invalid argument'
from colorama's write_plain_text when stdout gets into a bad state
(often after a long-running or interrupted session). This crashed the
Config Builder node at its very first print statement, breaking the
entire workflow.
Adds a module-level safe_print() helper that:
1. Tries normal print() first
2. Falls back to raw sys.__stdout__.write on OSError/ValueError
3. Silently drops the message if even that fails
generate_config() now aliases print = safe_print at the top so every
print call in the function is automatically resilient without renaming
each one.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a validation check in generate_config() that compares each output
config's keys against the expected set (sampler, scheduler, steps, cfg,
model, lora, etc.). Logs a warning with the missing keys if any are
absent, catching dual-codepath sync drift before it causes runtime bugs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
- Add "flux2" to clip_types and dual_clip_types lists so CLIPType.FLUX2
is correctly passed to ComfyUI's text encoder loader
- Add "flux2" model_sampling_override option in Builder UI dropdown
- Implement ModelSamplingFlux2 handler using fixed shift (default 2.02,
matching ComfyUI's Flux2 supported_models.py)
- Handle "flux2" in config_builder_node.py config generation with
default shift value
Users with Flux2 models (Klein, etc.) should set:
- CLIP Type: flux2
- Model Sampling Override: Flux2
- For best results: enable Advanced Sampling with Flux2 Scheduler
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
Added to JS convertStateToConfigs() and Python generate_config()
session settings dict.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fields like vae, seed_behavior, model_type, attention_mode,
model_prompt_prefix/suffix, sampling overrides, lora_omit_triggers,
and trigger append settings are now always included with defaults
instead of being conditionally omitted. This prevents data loss when
sessions are reloaded from manifests with toggled-off sections.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
- 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>
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>
- 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>
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>
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>
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>