Comfy-Org / Comfy-Org/ComfyUI

Slow and Incorrect Parameters when queueing during generation

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

Description

### Expected Behavior

When a generation is under way, changing parameters and adding to the queue should reflect the changes accurately. If adding large batches, the adding of prompts is very slow and it sometimes is incorrect and or missing some of the batch count.

### Actual Behavior

Say I add a 100 batch to the queue. I start generating. During this, I make changes to the prompt, LoRA, strength, etc. I now click Generate to add another 100 to the queue. When I do this, the additional prompts are added very very slowly.

The result sometimes is missing some of the batch and further, the LoRA is not applied and also the prompt does not reflect the changes.

For example, say the previous batch of 100 used a prompt of XYXY ZZZZ and the new batch prompt is WWWW VVVV, the resulting image generated may be XYXY ZZZZ from the previous batch but using the new settings on the second batch.

This used to work fine. Adding to the queue was immediate and recently became very slow. I had not really noticed it until I saw some discrepancies recently. I cannot tell when this change happened, but it was not long ago. Say maybe about a month ago.

### Steps to Reproduce

Create a workflow
Using the rgthree LoRA loader, select two LoRAs (enable them)
Set the strength on each to 0.80
Set the prompt to: "triggerXX, triggerZZ, A beautiful scene of a river through a forest"
Change the batch number to 100
Click Generate
While generating, change the prompt and the LoRAs
The prompt is now: "tryggerXX, triggerBB. The Moon setting over a mountain range covered in snow"
Change ONE of the two LoRAs to a different one
Click Generate (still set to 100 batch count)
Wait.

The adding of the batch will be very slow. Also, the resulting images may be using the wrong prompt, some batch generations may be missing and the LoRA, trigger combo in the prompt may be off by a few image generations.

### Debug Logs

```powershell
Requested to load AutoencodingEngine
loaded completely 1113.238151550293 159.87335777282715 True
Prompt executed in 33.67 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10113.858532714843 9319.23095703125 True
loaded completely 13003.707179870606 11350.067443847656 True
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00, 1.29s/it]
Requested to load AutoencodingEngine
loaded completely 1113.238151550293 159.87335777282715 True
Prompt executed in 32.54 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10113.858532714843 9319.23095703125 True
loaded completely 13061.148586120606 11350.067443847656 True
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00, 1.30s/it]
Requested to load AutoencodingEngine
loaded completely 1193.238151550293 159.87335777282715 True
Prompt executed in 33.49 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10122.861462402343 9319.23095703125 True
loaded completely 13065.949367370606 11350.067443847656 True
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00, 1.29s/it]
Requested to load AutoencodingEngine
loaded completely 1113.238151550293 159.87335777282715 True
Prompt executed in 33.19 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10113.858532714843 9319.23095703125 True
loaded completely 13113.086086120606 11350.067443847656 True
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00, 1.29s/it]
Requested to load AutoencodingEngine
loaded completely 1193.238151550293 159.87335777282715 True
Prompt executed in 32.27 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10122.861462402343 9319.23095703125 True
loaded completely 13169.714992370606 11350.067443847656 True
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:26<00:00, 1.30s/it]
Requested to load AutoencodingEngine
loaded completely 1113.238151550293 159.87335777282715 True
Prompt executed in 32.65 seconds
WARNING: object supporting the buffer API required
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
SELECTED: input3
loaded completely 10113.858532714843 9319.23095703125 True
loaded completely 12915.597804870606 11350.067443847656 True
65%|█████████████████████████████████████████████████████████▊ | 13/20 [00:17<00:09, 1.37s/it]got prompt
got prompt
got prompt
got prompt
70%|██████████████████████████████████████████████████████████████▎ | 14/20 [00:19<00:09, 1.55s/it]got prompt
got prompt
got prompt
got prompt
75%|██████████████████████████████████████████████████████████████████▊ | 15/20 [00:21<00:08, 1.70s/it]got prompt
got prompt
got prompt
80%|███████████████████████████████████████████████████████████████████████▏ | 16/20 [00:23<00:06, 1.74s/it]got prompt
got prompt
got prompt
got prompt
85%|███████████████████████████████████████████████████████████████████████████▋ | 17/20 [00:25<00:06, 2.00s/it]got prompt
got prompt
got prompt
90%|████████████████████████████████████████████████████████████████████████████████ | 18/20 [00:29<00:04, 2.48s/it]got prompt
got prompt
got prompt
95%|████████████████████████████████████████████████████████████████████████████████████▌ | 19/20 [00:31<00:02, 2.40s/it]got prompt
got prompt
got prompt
got prompt
100%|█████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:34<00:00, 1.74s/it]
Requested to load AutoencodingEngine
loaded completely 973.0894401550294 159.87335777282715 True
Prompt executed in 41.88 seconds
WARNING: object supporting the buffer API required
got prompt
SELECTED: input3
[INFO] LoadSinglePromptFromFile: file found 'personal\Stable Diffusion Prompt 030.txt'
got prompt
SELECTED: input3
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
got prompt
loaded completely 10078.193432617187 9319.23095703125 True
0%| | 0/20 [00:00

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.