aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/perf/README.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-29 18:26:15 +0100
committerDanilo M. <danix@danix.xyz>2026-10-29 18:26:15 +0100
commitc5ce8451d0aa634fc7bcece4a4132f9508e54bf1 (patch)
treec1c7bd8bd45023e0a351337950ba1a348ca4f049 /desktop/modules/perf/README.md
parentafa0e6e7402ba19688348ab1c41b30bdf14d2d49 (diff)
downloadquickshell-c5ce8451d0aa634fc7bcece4a4132f9508e54bf1.tar.gz
quickshell-c5ce8451d0aa634fc7bcece4a4132f9508e54bf1.zip
wallpaper: upscale a too-small staged image in place
A staged wallpaper smaller than its screen (yellow or red border) gets an "Upscale 4x" button. It rewrites the file with Real-ESRGAN through stable-diffusion.cpp's `sd-cli -M upscale`, keeping the name, so wallp's state and the engine's lists, which name it by path, still find it. sd-cli writes to a dot-named sibling the scan skips, and only a successful run is moved over the original. Success needs no [E] line as well as exit 0: with a model that fails to load, sd-cli logs "[E] new_upscaler_ctx failed", saves the input unscaled and exits 0 (measured). The button takes two clicks so the model choice shows before anything is rewritten. The first runs Imajev-4B, a small Jev-style vision decision model, through llama-mtmd-cli on a 512 px thumbnail, with a grammar that allows only A (anime) or B (photo or render); greedy decoding then returns the higher-logit option, about 1.7 s. The label becomes "Upscale 4x (anime)" or "(photo)", and the second click upscales with the anime or the general model. Anything but A, including a failed decider, picks the general model, safe on any image. Imajev-4B was chosen by measurement on 22 wallpapers: all 12 anime and 4 photos right, 4 of 6 painted 3D renders called anime (those come out smoother than painted). The 2B got 17 of 22, leaning to photo; a three-way prompt adding "painted or render" dropped both to 15 or fewer, with most anime called painted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/perf/README.md')
0 files changed, 0 insertions, 0 deletions