tctien342 / comfyui-sdk

SDK for ComfyUI
MIT License
39 stars 8 forks source link

Default queue behaviour of ComfyUI #5

Closed smlkdev closed 1 month ago

smlkdev commented 1 month 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 1 month ago

Got it, i will allow null into it

tctien342 commented 1 month 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.