stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Change assert into print for extension access disabled

Open aliencaocao opened this issue 2 years ago • 2 comments

The assert produces unneccessary traceback logs that 'scares' new users and occupy the console. See https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/4065

Change asserts into print for extension access disabled Fixes typo in 'disabled'

NOTE: this commit was based on an older commit where this ui-extensions.py did not exist yet, however I only modified line 21. The rest should be identical to the current file. I cannot rebase because my own fork's master contains my custom changes that I do not want to be merged into the main repo. If anyone knows how to 'cherrypick' this particular change on line 21 without me committing my own custom changes, please let me know, thanks.

aliencaocao avatar Nov 01 '22 16:11 aliencaocao

replace assert with print check is now gone entirely, just a console message

great

thanks

AUTOMATIC1111 avatar Nov 02 '22 04:11 AUTOMATIC1111

Sorry @AUTOMATIC1111 I just realised I've made a mistake, I did not know the assertion error was raised on purpose as a checking mechanism...I will close this PR now.

aliencaocao avatar Nov 03 '22 15:11 aliencaocao

Although, I would like to point out that relying on assert to check is not very user friendly. Instead of a bunch of tracebacks printed everytime a user runs generation (yes it prints everytime), a more subtile console log is more suited.

aliencaocao avatar Nov 03 '22 15:11 aliencaocao