Browse Source

fix: proper display for tqdm

pull/113/head
Dr.Lt.Data 1 year ago
parent
commit
322227f6dd
  1. 2
      __init__.py
  2. 4
      extension-node-map.json
  3. 4
      node_db/new/extension-node-map.json
  4. 10
      prestartup_script.py

2
__init__.py

@ -55,7 +55,7 @@ sys.path.append('../..')
from torchvision.datasets.utils import download_url from torchvision.datasets.utils import download_url
# ensure .js # ensure .js
print("### Loading: ComfyUI-Manager (V0.26.2)") print("### Loading: ComfyUI-Manager (V0.27)")
comfy_ui_required_revision = 1240 comfy_ui_required_revision = 1240
comfy_ui_revision = "Unknown" comfy_ui_revision = "Unknown"

4
extension-node-map.json

@ -1384,7 +1384,8 @@
"https://github.com/Zuellni/ComfyUI-ExLlama": [ "https://github.com/Zuellni/ComfyUI-ExLlama": [
[ [
"ZuellniExLlamaGenerator", "ZuellniExLlamaGenerator",
"ZuellniExLlamaLoader" "ZuellniExLlamaLoader",
"ZuellniExLlamaPreviewer"
], ],
{ {
"title_aux": "ComfyUI-ExLlama" "title_aux": "ComfyUI-ExLlama"
@ -3014,6 +3015,7 @@
], ],
"https://github.com/wolfden/ComfyUi_PromptStylers": [ "https://github.com/wolfden/ComfyUi_PromptStylers": [
[ [
"SDXLPromptStylerAll",
"SDXLPromptStylerHorror", "SDXLPromptStylerHorror",
"SDXLPromptStylerMisc", "SDXLPromptStylerMisc",
"SDXLPromptStylerbyArtist", "SDXLPromptStylerbyArtist",

4
node_db/new/extension-node-map.json

@ -1384,7 +1384,8 @@
"https://github.com/Zuellni/ComfyUI-ExLlama": [ "https://github.com/Zuellni/ComfyUI-ExLlama": [
[ [
"ZuellniExLlamaGenerator", "ZuellniExLlamaGenerator",
"ZuellniExLlamaLoader" "ZuellniExLlamaLoader",
"ZuellniExLlamaPreviewer"
], ],
{ {
"title_aux": "ComfyUI-ExLlama" "title_aux": "ComfyUI-ExLlama"
@ -3014,6 +3015,7 @@
], ],
"https://github.com/wolfden/ComfyUi_PromptStylers": [ "https://github.com/wolfden/ComfyUi_PromptStylers": [
[ [
"SDXLPromptStylerAll",
"SDXLPromptStylerHorror", "SDXLPromptStylerHorror",
"SDXLPromptStylerMisc", "SDXLPromptStylerMisc",
"SDXLPromptStylerbyArtist", "SDXLPromptStylerbyArtist",

10
prestartup_script.py

@ -4,6 +4,7 @@ import subprocess
import sys import sys
import atexit import atexit
import threading import threading
import re
# Logger setup # Logger setup
if os.path.exists("comfyui.log"): if os.path.exists("comfyui.log"):
@ -14,6 +15,7 @@ if os.path.exists("comfyui.log"):
original_stdout = sys.stdout original_stdout = sys.stdout
original_stderr = sys.stderr original_stderr = sys.stderr
tqdm = r'\d+%.*\[(.*?)\]'
class Logger: class Logger:
def __init__(self, filename): def __init__(self, filename):
@ -22,6 +24,14 @@ class Logger:
def write(self, message): def write(self, message):
self.file.write(message) self.file.write(message)
self.file.flush() self.file.flush()
match = re.search(tqdm, message)
if match:
message = re.sub(r'([#|])\d', r'\1▌', message)
message = re.sub('#', '', message)
original_stderr.write(message)
original_stderr.flush()
else:
original_stdout.write(message) original_stdout.write(message)
original_stdout.flush() original_stdout.flush()

Loading…
Cancel
Save