Skip to content

[Bug]: Generation is stuck at ~97% indefinitely when CLI Total Progress is at 100% #4791

Description

@rackSD

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Generations will sometimes get stuck on ~97% complete in the UI during generate/generate forever. During this period, the Total Progress in the CLI will have reached and remains at 100% for several minutes. During this 'stuck' period, the GPU is still under load, but usage % and temperatures gradually drop.

After encountering the bug a few more times, I believe this has something to do with the txt2img tab. Doing anything that reloads the it will resolve the 'stuck' state of the generation. This includes but is not limited to: refreshing the browser page, switching to different tabs (img2img, PNG Info, etc) then back to txt2img, and using the Restart Gradio and Refresh Components button.

The previously stuck generation will also promptly appear as a complete image in the /Output folder once any of the described actions above are taken.

After a refresh/Image Browser page load, the generation will be able to begin as normal.

Given a long enough time, the UI will occasionally output the image, but the total time taken for a single generation is several times longer than normal (1 minute per image balloons to 8 minutes per image). Following that, the CLI it/s updates from a baseline of 1.5-3.5 iterations per second to a significantly slower value of ~8 to 10 seconds per iteration. This value was previously static once the generation gets stuck, and only updates once the image is outputted.

The below is a gif of the 97% stuck-100 % CLI complete bug. View in HD otherwise the gif is bloody small.

https://gfycat.com/grossdampbarasinga

Steps to reproduce the problem

This bug is not consistently reproducible, I was unable to identify the cause. Once the first occurrence begins, it is likely to occur for the next few generations in a row, persisting past restarting the WebUI process/hard refresh browser.

  1. Click generate/generate forever
  2. Wait for generation to be stuck at ~97%.
  3. Either refresh the page with F5 or switch to another tab (img2img, PNGInfo, etc) and back.
  4. Generation completes, image file is created at /output/ folder and am now able to start generating the next image.

What should have happened?

Generations should not be stuck at 97% while the CLI has been at 100% for the past 10 minutes, when an image at identical settings usually takes 1 minute to output.

Commit where the problem happens

98947d1

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No command line arguments.

Additional information, context and logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions