tctien342 / comfyui-sdk

SDK for ComfyUI
MIT License
25 stars 3 forks source link

Default queue behaviour of ComfyUI #5

Open smlkdev opened 3 days ago

smlkdev commented 3 days ago

By default, ComfyUI sets the prompt at the end of the queue. I think -1 is also a valid value for ComfyUI.

These lines forces the prompt to be inserted at the beginning:

https://github.com/tctien342/comfyui-sdk/blob/7dd604579b296fa02fb1206a52734864d158e7d0/src/client.ts#L273-L277

Proposal:

number: number | null with null as default value that puts element at the end.

tctien342 commented 3 days ago

Got it, i will allow null into it

tctien342 commented 3 days ago

Now queuePrompt will allow number params to be null for appending new job at the end of queue. I also add new method appendPrompt for append new job at the end without number parameter.