Commit Graph
7 Commits
Author SHA1 Message Date
Jason HokuandClaude Opus 4.6 1e574d6927 fix: insert upscaled items at start of manifest for correct sort order
Dashboard fast-path sort assumes newest items are at the start of the
items array. append() put upscaled images at the end (oldest position),
making them appear as the oldest items when sorting by newest.

Changed both SeedVR2 and regular upscale paths from append() to
insert(0, ...) so upscaled images appear at the top (newest position).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:51:50 -07:00
Jason HokuandClaude Opus 4.6 c5265d0e83 fix: initialize total_upscale_duration in upscale_runner SeedVR2 path
UnboundLocalError when SeedVR2 upscale completed — total_upscale_duration
was referenced but never initialized. Added initialization to 0 at the
start of each per-image loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:23:31 -07:00
Jason HokuandClaude Opus 4.6 20a4677971 fix: add SeedVR2 mode to dashboard upscale_runner.py
The dashboard upscale (⬆ button) goes through upscale_runner.py, not
generation_orchestrator.py. SeedVR2 mode was only wired into the
inline orchestrator path — dashboard upscales silently produced no
output because mode="seedvr2" resulted in empty combos list.

Now upscale_runner.py handles mode=="seedvr2":
- Opens source image from disk as PIL (no latent decode needed)
- Calls seedvr2_upscale() from image_generation.py
- Saves result as _upscaled.webp in images directory
- Creates manifest entry with proper gen_index, file URL, metadata
- Supports chained steps (SeedVR2 → next step gets PIL result)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:26:01 -07:00
Jason HokuandClaude Opus 4.6 50359eac40 fix: upscale runner manifest entries, sorting, and VRAM cleanup
- Add "file" URL to manifest entries (dashboard needs /view?filename=...
  URL, not just the filename field)
- Exclude "file" and "gen_index" from source item copy to prevent
  stale values leaking through
- Assign gen_index = len(manifest_data["items"]) so upscaled images
  sort as newest instead of near their source image
- Send all new items per image via update_data event, not just the last
- Set PromptServer.last_prompt_id before sampling (KSampler progress
  callbacks require it, fixes AttributeError)
- Clear VRAM and RAM (soft_empty_cache, gc.collect, cuda.empty_cache)
  on completion, cancellation, and error via finally block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:34:30 -07:00
Jason HokuandClaude Opus 4.6 b342127f83 fix: extract filename from manifest file URL in upscale runner
Manifest items use 'file' with a /view?filename=... URL, not a
'filename' field. Now parses the URL to extract the actual filename
when 'filename' is not directly available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 00:12:50 -07:00
Jason HokuandClaude Opus 4.6 ef7cc81edb fix: dashboard upscale load_checkpoint args and empty preset body
- load_checkpoint() needs target_model_name, ckpt_name, use_remote_vae
  positional args — was being called with just model_name
- Preset save endpoints now validate for empty request body before
  JSON parsing to avoid "Expecting value" errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:36:41 -07:00
Jason HokuandClaude Opus 4.6 b0c480c2a5 feat: create upscale_runner.py for dashboard async upscaling
Background thread loads models, runs full pipeline chains, saves
upscaled images, updates manifests, and sends progress events.
Supports single image and all-favorited modes with cancel support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 15:30:56 -07:00