Repository navigation
Berth v0.3.6
A parked ComfyUI now survives the two things that killed it: a client that renders on ComfyUI's own port,
and a berthd restart (#179). The gateway serves ComfyUI's
port behind Berth (--comfyui-listen), so the web UI, scripts and LAN forwarders wake ComfyUI before it
renders, and a render sent while the card is in a VM waits on disk. berth notify shows refused requests,
stuck leases, stowaways and other trouble as Linux desktop notifications. berth skill install adds a
ComfyUI skill, so an agent can set up and run image generation through Berth. Background engines run
whenever the card is free (#172). A person's switch wins over
the juggle order, and the Steam claim leaves REAPER alone (#171).
Added
berth skill installalso writes acomfyuiskill: how an agent sets up ComfyUI under Berth (the engine
entry, park, the queue, the gateway's ComfyUI port, models) and generates through it, with the failures it
will meet and what to do.berth skill show comfyuiprints it.berth notifyshows berthd's events as desktop notifications, so a refused request, a stuck lease, a stowaway
or a parked engine loaded behind Berth's back shows up without the harbor open.[notify] level = "info"adds
every switch, drain, park and resume;[notify] enabled = falseturns it off.berth service install --notify
runs it as a user unit. Linux only for now, throughnotify-send.berth gateway --comfyui-listen ADDRserves ComfyUI's own port behind Berth: the web UI, API, websocket and
custom node routes pass through with no key, and a queued workflow (/promptor the web UI's/api/prompt)
first wakes or starts ComfyUI under its lease as a person's switch. A client or a LAN forwarder pointed there
never sends work to a parked ComfyUI that has no card (#179).- ComfyUI jobs wait for the card on disk: with
on_busy = "queue", a/promptsent while the card is in a VM or
held by a game, a hold or a pinned app is answered at once with aberth-job id and submitted once the card is
free./history/<berth id>reads the result. The queue survives a gateway restart. - Background engines:
background = trueon an engine makes the gateway run it atbatchwhenever the card has
been free foridle_after(default 60 s), with no lease, waiter, stowaway or running claimed app on it. Any other
request drains it, and it stays out until the card is free again, so a game or a hold keeps it out. A tagger or an
indexer in Docker usesstart = ["docker", "start", "-a", NAME]andcontainer = NAME
(#172).
Fixed
- A parked engine survives a berthd restart. Its run re-attached as active while the run itself still knew it was
parked, so the next request drained it and the run stopped it. The run now tells the new daemon it is parked, and
its lease comes back parked: a waiter goes in beside it and a resume wakes it. Its residual counts as its own
again instead of showing as a squatter. - A parked engine that a client wakes directly is no longer killed by the next drain
(#179). A ComfyUI/promptsent to :8188 while ComfyUI was parked
loaded its models back onto the card without telling Berth, so the next request saw an oversized parked residual,
evicted it, and the unit exited 143 with no reason in its log. berthd now records the load aslease.unparked,
treats the lease as active again, and the next drain parks it again. A parked engine that Berth does stop (ttl,
RAM floor, pressure) logsstopping parked ENGINE instead of parking it again: WHYfirst. - A person's switch wins: Launch on the wake page and
/v1/berth/switchtake the card from an equal-priority
holder whatever the juggle ranking says, and a request no person made (a chat client's background call) does
not take it back inside the juggle window. Before, Launch of ComfyUI lost to llama-swap whenever
[priority] orderranked llama-swap first, and a later Launch inherited that loss and waited behind an idle
llama-swap. - The built-in
steam-gameclaim no longer drains engines when the REAPER DAW runs. Steam's launcher and the
DAW are both namedreaper, and the rule matched any child of either, such as GTK's sandboxed image loader
(bwrap,glycin-image-rs). The rule now also needs the launcher's command line to carrySteamLaunch, which
Steam passes on every game launch. A[[claim]]can do the same with the newparent_cmdline
(#171). - A parked engine that holds the whole card (ComfyUI with
keep_comfyui_up) comes back when asked. Its resume
waited on its own parked residual ("waiting for comfyui [waiting] to free memory") until something released it.
A resume released while it waited (the gateway gave up on the wake) could then be granted anyway, as a lease with
no process behind it. Two leases of one engine no longer count as a juggle ("comfyui keeps the card over
comfyui").