|
|
|
@ -11,14 +11,23 @@ import subprocess # don't remove this
|
|
|
|
|
from tqdm.auto import tqdm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version = "V0.39.2" |
|
|
|
|
version = "V0.39.3" |
|
|
|
|
print(f"### Loading: ComfyUI-Manager ({version})") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def handle_stream(stream, prefix): |
|
|
|
|
stream.reconfigure(encoding=locale.getpreferredencoding(), errors='replace') |
|
|
|
|
for line in stream: |
|
|
|
|
print(prefix, line, end="") |
|
|
|
|
for msg in stream: |
|
|
|
|
if prefix == '[!]' and ('it/s]' in msg or 's/it]' in msg) and ('%|' in msg or 'it [' in msg): |
|
|
|
|
if msg.startswith('100%'): |
|
|
|
|
print('\r' + msg, end="", file=sys.stderr), |
|
|
|
|
else: |
|
|
|
|
print('\r' + msg[:-1], end="", file=sys.stderr), |
|
|
|
|
else: |
|
|
|
|
if prefix == '[!]': |
|
|
|
|
print(prefix, msg, end="", file=sys.stderr) |
|
|
|
|
else: |
|
|
|
|
print(prefix, msg, end="") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_script(cmd, cwd='.'): |
|
|
|
|