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>
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>
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>
- 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>
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>
- 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>
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>