Comfy-Org / Comfy-Org/ComfyUI

Queue is populated with incorrect data when application is lagging.

Open
#1,704 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

When a sufficiently complex workflow is being loaded, and scenarios are added to the queue quickly, the queued items do not always represent the values as they existed when the "Queue" button was pressed. To reproduce this problem, load a complex workflow that is somewhat difficult for your machine, set the seed to "fixed", then begin adding many items to your queue by manually incrementing the seed after each item is added to the queue (increment the seed, hit "Ctrl+Enter", increment the seed, "Ctrl+Enter", etc). The goal is to add the items rapidly enough the application has difficulty keeping up with your queue inserts, which is not difficult for a workflow that bogs down your computer. Once you've added some items to the queue, go to the queue's pending list and click the "load" on each pending scenario to see what actually was added to the queue - if things worked correctly then each queued item will show the seed incrementing by a value of one. What you will likely see instead is the seed staying unchanged in several of the queued items and then suddenly increasing a large amount when the queued item happened to be added when the computer caught up. The correct behavior for the application would be that when an item is added to the queue it would use exactly the values the user saw at the moment they clicked the "Queue" button. To fix the bug, either the "Queue" insert event needs to be disabled until the application is done processing any previous queue insert, or ideally the program should be designed so the workflow and values are cached instantly and that cache would be used to populate the queue so if the application is lagging it will still be able to fetch the data from the cache to populate the queue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.