UI/Web: Reduce animation of default --progress_bars setting to improve speed #1613
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #1457
Motivation
There is small but noticeable difference in generation speed between running with the UI minimized and with it not, in favor of the minimized case. This is also seen if you size the app or browser window such that the gallery showing generated images is outside the browser viewport.
In addition, currently the
no-progress_bars
command-line option doesn't appear to improve speed after the first image in the batch, I'm guess something changed with the upgrade to gradio 3.34.0 there.All these looks like they are being caused by the two CSS animations that are run by gradio during generation, the 'sweep across the gallery' animation you get during the first image generation of a batch, and the 'pulsing border' animation you get on both the gallery and the generation status text box. This latter one happens even when you have
--no-progress_bars
set.Code Changes
Measured Generation Speed Changes
All these are using the same prompt and other settings from the UI using SharkEulerDiscrete, on an SD 1.5 based model,
ui=web
, Firefox browser on Windows 10:Txt2Imge without changes:
Txt2Img with changes: