mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 06:04:31 +08:00
fix: proper display for tqdm
This commit is contained in:
parent
e0f8a4c0d9
commit
322227f6dd
@ -55,7 +55,7 @@ sys.path.append('../..')
|
||||
from torchvision.datasets.utils import download_url
|
||||
|
||||
# ensure .js
|
||||
print("### Loading: ComfyUI-Manager (V0.26.2)")
|
||||
print("### Loading: ComfyUI-Manager (V0.27)")
|
||||
|
||||
comfy_ui_required_revision = 1240
|
||||
comfy_ui_revision = "Unknown"
|
||||
|
||||
@ -1384,7 +1384,8 @@
|
||||
"https://github.com/Zuellni/ComfyUI-ExLlama": [
|
||||
[
|
||||
"ZuellniExLlamaGenerator",
|
||||
"ZuellniExLlamaLoader"
|
||||
"ZuellniExLlamaLoader",
|
||||
"ZuellniExLlamaPreviewer"
|
||||
],
|
||||
{
|
||||
"title_aux": "ComfyUI-ExLlama"
|
||||
@ -3014,6 +3015,7 @@
|
||||
],
|
||||
"https://github.com/wolfden/ComfyUi_PromptStylers": [
|
||||
[
|
||||
"SDXLPromptStylerAll",
|
||||
"SDXLPromptStylerHorror",
|
||||
"SDXLPromptStylerMisc",
|
||||
"SDXLPromptStylerbyArtist",
|
||||
|
||||
@ -1384,7 +1384,8 @@
|
||||
"https://github.com/Zuellni/ComfyUI-ExLlama": [
|
||||
[
|
||||
"ZuellniExLlamaGenerator",
|
||||
"ZuellniExLlamaLoader"
|
||||
"ZuellniExLlamaLoader",
|
||||
"ZuellniExLlamaPreviewer"
|
||||
],
|
||||
{
|
||||
"title_aux": "ComfyUI-ExLlama"
|
||||
@ -3014,6 +3015,7 @@
|
||||
],
|
||||
"https://github.com/wolfden/ComfyUi_PromptStylers": [
|
||||
[
|
||||
"SDXLPromptStylerAll",
|
||||
"SDXLPromptStylerHorror",
|
||||
"SDXLPromptStylerMisc",
|
||||
"SDXLPromptStylerbyArtist",
|
||||
|
||||
@ -4,6 +4,7 @@ import subprocess
|
||||
import sys
|
||||
import atexit
|
||||
import threading
|
||||
import re
|
||||
|
||||
# Logger setup
|
||||
if os.path.exists("comfyui.log"):
|
||||
@ -14,6 +15,7 @@ if os.path.exists("comfyui.log"):
|
||||
original_stdout = sys.stdout
|
||||
original_stderr = sys.stderr
|
||||
|
||||
tqdm = r'\d+%.*\[(.*?)\]'
|
||||
|
||||
class Logger:
|
||||
def __init__(self, filename):
|
||||
@ -22,8 +24,16 @@ class Logger:
|
||||
def write(self, message):
|
||||
self.file.write(message)
|
||||
self.file.flush()
|
||||
original_stdout.write(message)
|
||||
original_stdout.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.flush()
|
||||
|
||||
def flush(self):
|
||||
self.file.flush()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user