Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.38k stars 309 forks source link

Display place in ComfyUI queue for processing #1137

Open DVDMAN77 opened 2 weeks ago

DVDMAN77 commented 2 weeks ago

Hi @Acly could be nice to improve the AI Diffusion plugin to display the place in the server processing queue when connected via the remote server option. When several users do requests an AI generated process (generate, fill, expand, etc.) to a single server they have no visibility on and cannot access as a ComfyUI server processing view, they cannot know wheter they're they are the next ones, or 50th in queue. Could be useful at least to know this kind of information for them to wait or cancel. Waiting time would also be helpful but I presume this one might be tricky to provide, depending on processing time from various other requests and hardware capabilities.

Thank you! :-)

FeepingCreature commented 1 week ago

So far as I can tell this comes down to hitting /api/queue to see the remote queued tasks whenever we get a "status" notification, which usually corresponds to a "queue_remaining" change. Then we can tell how far down the queue our own task is. I'd like to take this one, it seems fun and easy. @Acly Does that seem a viable approach?

Acly commented 1 week ago

That should work.

Note that:

Sounds like maybe those things should also be changed/fixed to make it actually useful.

I'm rather hesitant regarding comitting work to multi-user Comfy, it's pretty barebones on the server end. And probably quite niche? But no objections if it's not too complex.

DVDMAN77 commented 1 week ago

Thank you both @FeepingCreature & @Acly , your solutions seem pretty good to my ears. 1/ Queue position display for any user on AI plugin in Krita 2/ Modify the "Cancel current" + "Cancel all" buttons behaviors in the Krita AI plugin for them to apply only to the specific user's queued jobs, this would be great indeed THANK YOU for your work, can't wait!! :-)

DVDMAN77 commented 1 week ago

Thank you so much @FeepingCreature ! Can't wait to test it with the next release of the great AI Diffusion plugin :-)

FeepingCreature commented 1 week ago

Patience, it's not merged yet :) These things take time.

This is just a first proposal. Now we'll see how it fits in the codebase.