Skip to content

Commit

Permalink
When clearing queued jobs from ComfyUI, only clear the ones we queued…
Browse files Browse the repository at this point in the history
… in the first place.
  • Loading branch information
FeepingCreature committed Sep 6, 2024
1 parent a6c26e7 commit 79836ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ai_diffusion/comfy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ async def clear_queue(self):
except asyncio.QueueEmpty:
break

await self._post("queue", {"clear": True})
remote_ids = [await job.get_remote_id() for job in self._jobs]
await self._post("api/queue", {"delete": remote_ids})

self._jobs.clear()

async def update_server_queue(self):
Expand Down

0 comments on commit 79836ec

Please sign in to comment.