diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-14 10:47:41 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-14 10:47:41 +0100 |
| commit | a23a2f6dea1be750fbe9462fce25a49b8f1cb61b (patch) | |
| tree | c77f418f131dcb10bd79566e2a4aa2f9f99d9f11 /test_upscale_qt.py | |
| parent | 3e38d067fd853e4884530169456eb9b489c2705b (diff) | |
| download | upscale-qt-a23a2f6dea1be750fbe9462fce25a49b8f1cb61b.tar.gz upscale-qt-a23a2f6dea1be750fbe9462fce25a49b8f1cb61b.zip | |
Toolbar buttons get 32px icons with the label under the icon.
sd-cli prints its tile progress bar on stdout, which was never read.
Merge stdout and stderr, parse the last "n/m -" step and show it in a
status bar progress bar. Before the first step it shows a busy bar,
so a long model load does not look like a hang.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'test_upscale_qt.py')
| -rw-r--r-- | test_upscale_qt.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test_upscale_qt.py b/test_upscale_qt.py index 37e0484..7d7307c 100644 --- a/test_upscale_qt.py +++ b/test_upscale_qt.py @@ -60,6 +60,13 @@ def test_args(): '-i', '/in.png', '-o', '/out.png'] +def test_progress(): + out = (b'[I] upscaling\n\r |====> | 1/4 - 1.09it/s\x1b[K' + b'\r |=======> | 2/4 - 3.89it/s\x1b[K') + assert uq.progress(out) == (2, 4) + assert uq.progress(b'[I] load model') is None + + def test_save_over(): path = os.path.join(TMP, 'photo.JPG') # uppercase suffix on purpose small = QImage(4, 4, QImage.Format.Format_RGB32) |
