Skip to content

Berth v0.3.6

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:13
· 369 commits to main since this release
01b0e32

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 install also writes a comfyui skill: 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 comfyui prints it.
  • berth notify shows 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 = false turns it off. berth service install --notify
    runs it as a user unit. Linux only for now, through notify-send.
  • berth gateway --comfyui-listen ADDR serves ComfyUI's own port behind Berth: the web UI, API, websocket and
    custom node routes pass through with no key, and a queued workflow (/prompt or 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 /prompt sent while the card is in a VM or
    held by a game, a hold or a pinned app is answered at once with a berth- job id and submitted once the card is
    free. /history/<berth id> reads the result. The queue survives a gateway restart.
  • Background engines: background = true on an engine makes the gateway run it at batch whenever the card has
    been free for idle_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 uses start = ["docker", "start", "-a", NAME] and container = 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 /prompt sent 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 as lease.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) logs stopping parked ENGINE instead of parking it again: WHY first.
  • A person's switch wins: Launch on the wake page and /v1/berth/switch take 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] order ranked llama-swap first, and a later Launch inherited that loss and waited behind an idle
    llama-swap.
  • The built-in steam-game claim no longer drains engines when the REAPER DAW runs. Steam's launcher and the
    DAW are both named reaper, 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 carry SteamLaunch, which
    Steam passes on every game launch. A [[claim]] can do the same with the new parent_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").