18 Commits
Author SHA1 Message Date
kk8bit f8f2f075ae Drive the workflow progress bar per frame too
Same treatment as the resource bars: the fill is a scaleX transform
updated every frame from the eased percentage, while the text and dot
keep the 10Hz refresh.
2026-09-21 16:59:07 +08:00
kk8bit c1016ab859 Give the monitor panel its own compositor layer
A fixed element repainting every frame on top of the graph canvas shared
that canvas's layer, so each repaint invalidated the region beneath it
too. will-change: transform promotes the panel to its own layer; the
canvas underneath no longer repaints on the monitor's account.
2026-09-21 16:56:18 +08:00
kk8bit 5113710241 Animate the monitor's bars per frame, rebuild nothing
Rows are created once and kept. Each frame only sets the fill's
transform: scaleX(), which the compositor handles without layout, so the
bars now glide with the curves instead of stepping every 500ms. Text is
refreshed at 10Hz — faster is unreadable and each change relayouts its
row. Truncation measures through one cached context; the throwaway
canvas per row per frame is gone. Measured: 0.007ms per bar update,
0.011ms per text update, down from 0.64ms per rebuild.
2026-09-21 16:55:09 +08:00
kk8bit 213a392604 Stop the monitor rebuilding its rows every frame
displayInterval was 0, so updateDisplay() and updateWorkflowProgress()
ran on every animation frame: innerHTML rebuilt for all rows and a fresh
canvas created per row just to measure text — ~300 canvases and 60
forced layouts a second, for data that only changes every 0.5–2s. Update
every 500ms and keep one measuring context.
2026-09-21 16:45:26 +08:00
kk8bit d1a90c89bc Poll resource stats from the frontend; stop touching the environment
The monitor ran a resident asyncio task that sampled psutil/nvml every
0.5–2s and pushed the result over ComfyUI's WebSocket — whether or not
any panel was open, whether or not the tab was even in the foreground.
It is now a plain GET /kaytool/resources that the panel polls at the same
adaptive rate while it is visible and the page is in the foreground. A
200ms cache dedupes concurrent tabs and keeps cpu_percent's "since last
call" baseline sane.

The RemBG loader stopped setting U2NET_HOME. rembg offers no other way to
choose its model directory, and mutating the process environment reached
every other rembg-based extension in the same ComfyUI. Models now live
where rembg puts them by default; the changelog carries the migration
note.

Event listeners in gululu.js and nodealign.js use arrow functions instead
of .bind(this).

Together these remove every finding the registry's policy-v0.2 scanner
raised against 0.71.0 except the translators' HTTP calls.
2026-09-20 22:35:18 +08:00
kk8bit 13609bcc02 Render the monitor chart at device pixel ratio
The chart canvas only ever set its width/height attributes, so on a 2x
display the browser upscaled a half-resolution bitmap and every curve
came out soft. On top of that the CSS pinned the canvas to 100px while
the backing store was computed at 119px, squashing the plot vertically
by 0.84.

Let flex layout own the canvas's CSS size (it takes whatever the data
rows leave over) and size the backing store from the laid-out rect times
devicePixelRatio, with the context transform matching so drawCurves keeps
working in CSS pixels. A ResizeObserver re-syncs the backing store when
the rows first appear or the panel is resized.

The data rows are now flex: 0 0 auto so they can no longer be squeezed
out of view; the minimum panel height goes to 150 because 90 never had
room for them in the first place.
2026-09-20 22:09:49 +08:00
kk8bit 080eaeec52 Fix queue parameter loss, Monitor button state and pilgram fallback
The queuePrompt override forwarded only its first two arguments, but the
frontend passes partialExecutionTargets and previewMethod in a third one.
Dropping it made ComfyUI's own partial execution run the entire workflow
and disabled the preview method chosen in the UI. Forward arguments as
given. Closes #30, #31, #32.

The Monitor button applied its enabled setting only from the setting's
onChange handler, so a page load always appended it visible regardless of
the stored value. Apply the setting when the button is created. Closes
#19.

A missing pilgram shelled out to `pip install`, which raises in any
environment without a pip module (uv-created virtualenvs, among others)
and takes the whole package's import down with it. Degrade to an empty
filter list and a warning instead.

Also declare pilgram and requests in pyproject.toml, which registry
installs read instead of requirements.txt.
2026-09-20 18:08:50 +08:00
kk8bit 6fa1575d07 v0.70.10 2025-04-26 19:08:55 +08:00
kk8bit e9cb2e96c2 v0.70.7 2025-04-26 17:53:08 +08:00
kk8bit 1549228038 v0.70.6 2025-04-16 17:43:38 +08:00
kk8bit 6e0b42bdb1 v0.70.3 2025-04-16 17:32:34 +08:00
kk8bit 975daaae5b v0.70.2 2025-04-16 16:16:29 +08:00
kk8bit bf3add7d3f v0.70.0 2025-04-14 21:22:46 +08:00
kk8bit 1fbd7aab4f v0.65.0 2025-04-09 02:56:11 +08:00
kk8bit abae90cd3f v0.60.2 2025-04-06 22:20:37 +08:00
kk8bit 1dbf3e116f v0.60.0 2025-04-06 21:36:43 +08:00
kk8bit 9fdb0964a3 v0.57.0 2025-04-04 23:25:31 +08:00
kk8bit da413f6357 v0.56.0 2025-04-03 22:07:14 +08:00