Commit Graph
518 Commits
Author SHA1 Message Date
Jason Hoku 637fac3cf8 Merge branch 'feat/builder-polish' into int/wave2 2026-11-04 01:00:33 -08:00
Jason HokuandClaude Fable 5.1 8ce4398c4d feat(builder-polish): run-API full pass, vae drift fix, honest minimize_reloads wording
- Record session_settings + has_optional_inputs in manifest meta (run_meta_extras) so the
  Dashboard "Full pass for survivors" can queue POST /config_tester/run headless; the iframe
  falls through to it when the parent has no Builder / no queuePrompt.
- Exclude the deliberately omitted "vae" key from _EXPECTED_CONFIG_KEYS; test_examples asserts zero drift.
- minimize_reloads: log VAE switches + a "changed nothing" note, accurate tooltip/README wording.
- examples/README: Klein base-variant note; fix stale LTX stub comment.
- Tests: run_meta_extras, job order, state_to_configs_json, e2e full pass (new file).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:59:45 -08:00
Jason Hoku f746ed4a61 Merge branch 'feat/sweep-polish' into int/wave2 2026-11-04 00:59:05 -08:00
Jason HokuandClaude Fable 5.1 9b8eed833b fix(sweep): deterministic extra seeds
add_random_seeds_to_gens now uses config_utils.derive_extra_seeds (base seed 0, like the Generator),
so a re-queue attaches to the running sweep and a resume skips finished jobs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:56:59 -08:00
Jason HokuandClaude Fable 5.1 bd18b5ae32 docs: sweep attach rule, wf_params dashboard, job prompt route, Builder session load
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:56:25 -08:00
Jason HokuandClaude Fable 5.1 3eae054c11 feat(builder): load workflow sweep sessions
Load Session restores Workflow Sweep arrays from meta.configs_json (workflowConfigToArray) and
tells the user when an older sweep session has no saved configs. Builder Start shows 'attached'.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:56:03 -08:00
Jason HokuandClaude Fable 5.1 13422104f4 feat(dashboard): wf_params facets, labels, workflow job panel
Quick Filter / Logic Filter (wf:<key>) / label overlay use item.wf_params. Sweep items get a
JOB button opening a read-only Workflow job panel with download/copy of the job's API prompt.
Standalone progress bar shows paused/cancelled.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:55:11 -08:00
Jason HokuandClaude Fable 5.1 968b0dfdfc feat(sweep): attach to a running identical sweep, job_prompt route, configs in sweep meta
Identity = session + ordered job fingerprints + start_at_job + overwrite_existing; anything
else gets a clear 409. GET /config_tester/sweep/job_prompt returns one job's API prompt.
Sweep manifests now save their workflow configs in meta.configs_json.
pause/resume emit a progress event.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:52:56 -08:00
Jason HokuandClaude Fable 5.1 2b70bb1da3 test(seedvr2): helper extraction stops at the next top-level def, decorator or comment
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:48:02 -08:00
Jason HokuandClaude Fable 5.1 536d691a6b fix(upscale): keep @torch.inference_mode on seedvr2_upscale (the helper had slipped under the decorator)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:47:39 -08:00
Jason HokuandClaude Fable 5.1 7d6a5b9e5b fix(upscale): tidy SeedVR2 comment so the guard test passes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:46:54 -08:00
Jason HokuandClaude Fable 5.1 85378c4e78 fix(upscale): inline SeedVR2 step after a latent step decoded with swapped args and mishandled the PIL result
decode_latent_with_vae(vae, samples) returns a PIL image; the step passed
(pipe_latent, vae) and then treated it as a tensor. Also: undefined `meta`
(use create_image_metadata like the Florence2 branch), manifest insert(0) +
upscale_produced (no duplicate base image), and chained re-encode no longer
movedims (VAE.encode takes BHWC).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:46:45 -08:00
Jason HokuandClaude Fable 5.1 525733d70b refactor(orchestrator): drop the if-True wrapper left by the job-plan flattening (whitespace only)
git diff -w shows only the removed wrapper line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:29:29 -08:00
Jason Hoku d1714a2b8b Merge branch 'feat/workflow-sweep' into integration
# Conflicts:
#	README.md
#	__init__.py
#	sampler_node.py
2026-11-04 00:21:39 -08:00
Jason HokuandClaude Fable 5.1 e25c08a039 feat(workflow-sweep): Builder workflow-sweep section and dashboard labels
New ES module conf-builder-workflow-sweep.js (load API workflow, output picker,
suggested bindings, node table, axis editors, dry run modal, start/pause/resume/cancel
with status polling), wired additively into the config-array list, default state and
migrations. Dashboard ETA bar shows 'Sweep job' with an error count and hides REVISE
for workflow items. README, ProjectStructure and Roadmap updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:19:10 -08:00
Jason HokuandClaude Fable 5.1 e1936bfdad fix(manifest): keep per-item metrics written to disk when a generation run saves
metrics_runner computes metrics for an existing session straight to disk; a
generation run's in-memory copy of those items had no metrics and would have
wiped them on its next save. Disk wins for an item's metrics when the memory
item has none (merge_manifest_user_changes, flush_batch_with_vae's disk sync,
the remote VAE worker's disk sync). Fresh in-memory metrics are kept.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:17:52 -08:00
Jason Hoku add7fbb2cb Merge branch 'feat/metrics' into integration
# Conflicts:
#	resources/logic_pipeline.js
#	resources/logic_state.js
#	resources/logic_ui.js
#	web/conf_builder/conf-builder-config-management.js
#	web/conf_builder/conf-builder-main.js
2026-11-04 00:16:58 -08:00
Jason Hoku 3c3fd7a49d Merge branch 'feat/preview-pass-ordering' into integration
# Conflicts:
#	tests/test_state_to_configs_json.py
#	web/conf_builder/conf-builder-main.js
2026-11-04 00:15:02 -08:00
Jason HokuandClaude Fable 5.1 9ef138bf72 feat(workflow-sweep): sweep runner, USCGSweepCollect node and routes
workflow_sweep_runner feeds jobs through ComfyUI's own queue (windowed feeder that
mirrors server.py post_prompt in-process via ComfyBridge), tracks them in history,
pauses on interrupt/queue-clear/3 errors and resumes by fingerprint. USCGSweepCollect
saves each job's image into the USCG session and appends manifest items. Routes
/config_tester/sweep/{parse,dry_run,start,status,pause,resume,cancel}; the Generator
node starts a sweep for workflow configs and returns the dashboard without waiting.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:14:23 -08:00
Jason HokuandClaude Fable 5.1 a6146c0cc9 feat(metrics): compute metrics for an existing session (background job)
metrics_runner follows the upscale_runner job pattern: CPU-only PIL->numpy,
manifest writes under the lock (reload, set by id, atomic replace), progress
event + polling endpoints, cancel. Dashboard cog-panel button.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:13:05 -08:00
Jason HokuandClaude Fable 5.1 49aece7af6 test(e2e): derive the sort-option count from sortOptionsList instead of hardcoding 12
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:11:49 -08:00
Jason HokuandClaude Fable 5.1 254c2894dd feat(dashboard): sort, filter and card labels for per-image metrics
Metric sorts (primary + secondary, missing last), Logic Filter Metrics group
with a min/max range row, Metrics label checkbox. Everything degrades to
nothing on sessions without metrics.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:11:15 -08:00
Jason Hoku 58bd73fb64 Merge branch 'feat/pairwise-review' into integration
# Conflicts:
#	ProjectStructure.md
#	resources/report.css
2026-11-04 00:10:09 -08:00
Jason Hoku ecf01d62b8 Merge branch 'feat/batched-te' into integration
# Conflicts:
#	web/conf_builder/conf-builder-main.js
2026-11-04 00:09:39 -08:00
Jason HokuandClaude Fable 5.1 148922ee2f feat(dashboard): preview badge, Pass filter, superseded previews, full-pass button
PREVIEW badge on cards and a modal note, a Pass filter row (hidden until previews exist),
previews superseded by a full image (config_fp/base_fp match) hidden by default, a preview bar
with 'Full pass for survivors (N)'. The button asks web/dashboard.js (postMessage) to switch
Preview pass off in the matching Config Builder and call app.queuePrompt; a marked stub
covers a future run API; fallback is an instructions toast.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:09:26 -08:00
Jason HokuandClaude Fable 5.1 acee4fd545 feat(metrics): Builder Run Settings control, session-settings emission and metrics_info route
Session-level setting (not a per-config key). state_to_configs_json emits
_session_settings.metrics only when enabled and non-empty; GET
/configbuilder/metrics_info reports built-ins and scorer-pack install status.
Faster numpy fallback; README and ProjectStructure updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:09:19 -08:00
Jason HokuandClaude Fable 5.1 e5312812d9 feat(workflow-sweep): template parsing, binding expansion and prompt substitution
Pure-Python core of Workflow Sweep: parse an API-format workflow, suggest bindings,
expand them into jobs (cache-friendly axis order, resume fingerprints), substitute
into the template and append the collector node. Builder state emits kind=workflow
arrays, config_utils.expand_configs dispatches model_type=workflow, and
manifest_utils.append_items adds disk-fresh manifest appends.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:08:16 -08:00
Jason HokuandClaude Fable 5.1 23a5c20248 ci: install the latest CPU torch wheel instead of pinning 2.13
A cp312 CPU wheel for the exact minor on the GPU box is not guaranteed; the
tests only need the torch API.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:06:58 -08:00
Jason HokuandClaude Fable 5.1 6aabea97de docs: pairwise review
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:06:55 -08:00
Jason HokuandClaude Fable 5.1 fadcd0405f feat(dashboard): compare mode UI, rating sort/badge, scoreboard modal
Blind two-up compare overlay (keys, reveal, undo, vote queue with debounced save),
cog PAIRWISE REVIEW section, Rating sort option and label badge, scoreboard modal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:06:55 -08:00
Jason Hoku fd7f39cc33 Merge branch 'feat/dashboard-url-api' into integration 2026-11-04 00:06:41 -08:00
Jason Hoku 9af6bf5cbc Merge branch 'feat/pr21-examples' into integration 2026-11-04 00:06:41 -08:00
Jason HokuandClaude Fable 5.1 cb0aa2be61 feat(metrics): wire metrics into decode/flush, remote VAE, upscale paths and run context
Hooks: decode_latent_with_vae metrics_sink, flush_batch_with_vae, remote VAE
worker, orchestrator upscale/Florence2/SeedVR2 inserts, dashboard upscale
thread (explicit spec, never inherits), florence2 builders drop metrics.
sampler_node wraps the run in a token-based begin_run/end_run context.
Adapters mechanism is tested with fake nodes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:06:37 -08:00
Jason HokuandClaude Fable 5.1 ffb352fb92 feat(builder): job order and preview pass run settings
State keys job_order, preview_pass{enabled,steps,scale,cfg_override}, skip_rejected_previews,
only_favorited_previews: new-state defaults + migration, Run Settings controls, emission with
coercion in state_to_configs_json, tests, README/ProjectStructure.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:06:08 -08:00
Jason HokuandClaude Fable 5.1 98fcf0861c feat(encode): te_batch_size Run Setting wires text-encoder batching into pre-encode
batch_encode_with_cache/batch_encode_prompts take te_batch_size (default 1 =
off, DEFAULT_TE_BATCH_SIZE) and a hidden te_batch_verify; batched prompts are
cached, leftovers take the unchanged per-prompt loop, and the summary line
reports batched prompts/forwards. Builder state default + migration, Run
Settings control, state_to_configs_json emission, orchestrator read, README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:05:57 -08:00
Jason HokuandClaude Fable 5.1 76cdc56fce ci: tests workflow (stubs, torch, js-syntax, e2e) + test docs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:05:42 -08:00
Jason HokuandClaude Fable 5.1 bc11dfbdcb test(e2e): Playwright smoke test for the Dashboard SPA
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:05:06 -08:00
Jason HokuandClaude Fable 5.1 602bde44fb feat(orchestrator): flat job plan, job order, preview pass and preview promotion
- run_generation_loop walks a flat job plan (config_utils.build_job_plan) instead of the
  nested resolution x config loops; job_order=minimize_reloads reorders it to cut model
  and LoRA reloads. as_written reproduces the old order exactly.
- Preview pass (fewer steps, smaller snapped latent, no upscales); items carry config_fp,
  preview_of, full_* keys. A full run skips cells whose preview was rejected (tombstoned
  in meta.rejected_preview_fps by delete_rejected); a preview run skips cells that already
  have a full image.
- check_if_job_completed gets a keyword-only preview flag (positional API unchanged).
- Distributed mode is untouched apart from an 'ignored' warning.

fix: a per-config resolution no longer leaks its w/h/batch_idx into later configs of the
same pass (the old loop set them once per input job; the pre-flight scan already did this
correctly, so pre-flight and the main loop disagreed).
fix: the async look-ahead picked the next config via job_idx*len(expanded)+conf_idx, which
was wrong whenever per-config-resolution configs were skipped after the first pass; it now
reads the next plan entry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:04:13 -08:00
Jason HokuandClaude Fable 5.1 108d196167 fix(examples): MOSS example uses the template's flux2-vae.safetensors
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:03:57 -08:00
Jason HokuandClaude Fable 5.1 ade90d655f feat(metrics): image_metrics module with exact-value tests
Pure numpy + torch implementations of sharpness, entropy, colorfulness,
contrast, luma, saturation on a 1024-capped analysis image, a run-scoped
context (token based), and an adapter mechanism for optional scorer packs
(registry entries disabled until verified).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:03:26 -08:00
Jason HokuandClaude Fable 5.1 0d1c44d1b4 feat(examples): ready-to-load workflows per model family (closes #6)
examples/ ships one workflow per family (SDXL/Illustrious, Anima, Z-Image
Turbo, Krea 2 Turbo, Flux.2 Klein 9B, MOSS-Image), each a Builder -> Sampler
Grid -> Dashboard graph with the Builder state pre-filled (model, text
encoder, CLIP type, VAE, sampling axes, prompt). examples/README.md lists
the files and folders each needs and what the grid tests.
tests/test_examples.py validates graph wiring, Builder state, emitted
configs and the image counts promised in the README.

Closes #6

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:02:21 -08:00
Jason HokuandClaude Fable 5.1 cd29abe52a feat(encode): batch several prompts through one text-encoder forward
encode_prompts_batched right-pads eligible prompts, runs ONE real encode on the
batch via a replay shadow on the inner encoder, and replays per-prompt slices
through the unmodified _encode_single (template strip, mask pop, clip_skip).
Allowlisted LLM-style encoders only (MOSS-Image, Krea 2, Qwen-Image); weighted,
AND/CAT/AVG/BREAK prompts fall back. Token cap, OOM halving, first-batch
self-check and an optional per-prompt verify mode. The shadow is always removed
in a finally. _encode_single gains tokens=None and restores clip_layer on error.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:02:16 -08:00
Jason HokuandClaude Fable 5.1 2e37788969 test(conftest): requires_torch marker + real-torch probe
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:01:27 -08:00
Jason HokuandClaude Fable 5.1 02f0766566 feat(dashboard): ratings + pairing + scoreboard logic
Pure logic (no DOM): axis normalisers, attribution, Bradley-Terry with a ghost
prior, pair selection, scoreboard/CSV. node:test coverage.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:00:24 -08:00
Jason HokuandClaude Fable 5.1 dd0e190257 feat(dashboard): phone layout, lightbox action bar, docs for standalone page and run API
Touch-sized card/lightbox/header buttons under a coarse-pointer media query,
a sticky Prev/Favorite/Reject/Revise/Next bar in the lightbox, and a 2-column
session landing on the standalone page at phone width (all scoped so the node
iframe is unchanged). README documents the standalone dashboard and the run
API with curl examples; ProjectStructure lists the routes and new files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:00:07 -08:00
a0a164ba6f fix(ltx,builder): expand Builder prompt arrays for LTX; empty TE list; builder-schema reload
From #21: _expand_ltx_entry ran positive/negative through to_list, so the
Builder's [["p1","p2"]] reached the LTX encoder as a list; it now uses
parse_prompt_input_nested like expand_configs. The text-encoder dropdown
falls back to ["None"] when the list is empty. convertConfigsToConfigArrays
keeps the per-entry model type for builder-schema models[].

Refs #21

Co-authored-by: DRuggeri <DRuggeri@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 23:59:53 -08:00
caf8f35bec feat(builder): finish "Additional Random Seeds" run setting from PR #21
Builder Run Settings already emitted add_random_seeds_to_gens through
_session_settings; this adds the missing new-state default and the
saved-config migration, tests for the emit -> sampler_node unwrap ->
expand_configs path, and a README Run Settings entry.

The extra seeds are now derived from the base seed
(config_utils.derive_extra_seeds) instead of unseeded random.randint, as the
README always promised. Besides reproducibility this makes stop/resume work:
the skip check matches on seed, so an interrupted run can now skip the
extra-seed images it already rendered.

Ported from #21 (it conflicts after the repo restructure). Closes #21.

Co-authored-by: DRuggeri <DRuggeri@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 23:59:53 -08:00
Jason HokuandClaude Fable 5.1 ca20cee664 feat(config): job plan, reload-minimising order, config fingerprints and preview helpers
Pure helpers in config_utils (build_job_plan, order_job_plan, count_switches,
config_fingerprint, item_fingerprint, preview_dims, build_preview_index,
should_skip_for_previews, build_full_fp_set) with tests. Not wired in yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 23:58:59 -08:00
Jason HokuandClaude Fable 5.1 660bdc17cf feat(dashboard): standalone page mode, own live websocket, open-standalone button
html_generator gains a standalone flag (USCG_STANDALONE) and escapes "</" in
the inlined manifest. New logic_standalone.js (loaded last) replaces every
parent-frame dependency: own ComfyUI websocket re-dispatching the bridge's
message shapes (session filter, id dedupe, backoff, resync on resume),
Fullscreen API, URL kept on the shown session, GENERATE NEW via
POST /config_tester/run, and an openStandalone() header button for the node
iframe. Lightbox gets modalNav/toggleModalFavorite/rejectModalItem helpers
and an action bar element (styled in the next commit).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 23:58:33 -08:00
Jason HokuandClaude Fable 5.1 6705245b13 feat(api): headless run API and standalone dashboard routes
Adds GET /config_tester/dashboard (SPA as a top-level page, optional
?session=), POST /config_tester/run (builds the Generator -> Dashboard prompt
and enqueues it in-process exactly like PromptServer.post_prompt; force
defaults to true) and GET /config_tester/run_status. Pure helpers live in
run_api.py (no server imports) with unit tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 23:56:43 -08:00