Progress Bar for UI1 fixed

Console print for model loading fixed
This commit is contained in:
ebolam
2022-10-22 21:05:07 -04:00
parent e6903b4b66
commit 06ee1426a1
2 changed files with 5 additions and 6 deletions

View File

@@ -278,9 +278,9 @@ model_menu = {
class Send_to_socketio(object):
def write(self, bar):
bar = bar.replace("\r", "").replace("\n", "").replace(chr(0), "")
if bar != "":
logger.info(bar)
#print('\r' + bar, end='')
if bar != "" and [ord(num) for num in bar] != [27, 91, 65]: #No idea why we're getting the 27, 1, 65 character set, just killing to so we can move on
#logger.info(bar)
print('\r' + bar, end='')
time.sleep(0.01)
try:
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True, room="UI_1")
@@ -1788,9 +1788,8 @@ def patch_transformers_download():
class Send_to_socketio(object):
def write(self, bar):
bar = bar.replace("\r", "").replace("\n", "")
logger.debug(bar)
if bar != "":
if bar != "" and [ord(num) for num in bar] != [27, 91, 65]: #No idea why we're getting the 27, 1, 65 character set, just killing to so we can move on
try:
print('\r' + bar, end='')
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True, room="UI_1")

View File

@@ -183,7 +183,7 @@ def _download_with_aria2(aria2_config: str, total_length: int, directory: str =
def write(self, bar):
bar = bar.replace("\r", "").replace("\n", "")
if bar != "":
if bar != "" and [ord(num) for num in bar] != [27, 91, 65]: #No idea why we're getting the 27, 1, 65 character set, just killing to so we can move on
try:
print('\r' + bar, end='')
try: