Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Worker: after local ComfyUI work frees its memory, the GPU is read again

Adarshcbff5172b5b0
diff --git a/bin/lib/worker/run.mjs b/bin/lib/worker/run.mjs
index 610c48fe..caf93e09 100644
--- a/bin/lib/worker/run.mjs
+++ b/bin/lib/worker/run.mjs
@@ -1342,6 +1342,10 @@ async function work(saved, deps, owner) {
if (ports.length && (await localIdle(localFetch, ports))) {
log(`Local ComfyUI work on port ${ports.join(", ")} runs nothing and keeps its models loaded: asking it to free its memory for the owner's job.`);
await freeLocal(localFetch, ports);
+ // The reading from before the free is out of date: the next turn reads the GPU again, so the owner's job
+ // doesn't count the freed memory as local work still holding the GPU (and ask it for room after the job).
+ split = null;
+ lastGpuAt = -Infinity;
roomAt = now();
roomForOwner = true;
ownerWaitSaid = false;