waveshaker commited on
Commit
de9d80b
ยท
verified ยท
1 Parent(s): f9e2ded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -10
app.py CHANGED
@@ -392,10 +392,9 @@ class UnifiedProgressTqdm(tqdm_lib.tqdm):
392
  _append_log("SYS ", "blue", msg)
393
 
394
  def execute_workflow(workflow: dict[str, Any]) -> list[str]:
395
- original_tqdm = tqdm_lib.tqdm
396
- original_auto_tqdm = tqdm.auto.tqdm
397
- tqdm_lib.tqdm = UnifiedProgressTqdm
398
- tqdm.auto.tqdm = UnifiedProgressTqdm
399
 
400
  try:
401
  if str(COMFY) not in sys.path:
@@ -432,8 +431,7 @@ def execute_workflow(workflow: dict[str, Any]) -> list[str]:
432
  paths = sorted(glob.glob(str(OUTPUT / "**" / "*.png"), recursive=True), key=os.path.getmtime, reverse=True)
433
  return paths[:1]
434
  finally:
435
- tqdm_lib.tqdm = original_tqdm
436
- tqdm.auto.tqdm = original_auto_tqdm
437
  if 'loop' in locals() and not loop.is_closed():
438
  try:
439
  loop.close()
@@ -491,10 +489,13 @@ def generate_workflow(
491
  _append_log("NET ", "orange", f"Fetching LoRA: {char_lora}")
492
  yield None, _terminal_html
493
 
494
- original_tqdm = tqdm.auto.tqdm
495
- tqdm.auto.tqdm = UnifiedProgressTqdm
496
- hf_hub_download(repo_id=MODEL_CONFIG['char_lora_repo'], filename=file_path, local_dir=str(lora_root))
497
- tqdm.auto.tqdm = original_tqdm
 
 
 
498
 
499
  src = lora_root / file_path
500
  if src.exists():
@@ -1153,6 +1154,17 @@ a:hover { opacity: 0.8 !important; text-decoration: underline !important; }
1153
  .terminal-content .t-orange { color: #d29922 !important; }
1154
  .terminal-wrapper::-webkit-scrollbar { width: 6px !important; }
1155
  .terminal-wrapper::-webkit-scrollbar-thumb { background: rgba(150, 150, 150,f 0.3) !important; border-radius: 10px !important; }
 
 
 
 
 
 
 
 
 
 
 
1156
  """
1157
 
1158
  load_config_from_json()
 
392
  _append_log("SYS ", "blue", msg)
393
 
394
  def execute_workflow(workflow: dict[str, Any]) -> list[str]:
395
+ import tqdm.std
396
+ original_tqdm = tqdm.std.tqdm
397
+ tqdm.std.tqdm = UnifiedProgressTqdm
 
398
 
399
  try:
400
  if str(COMFY) not in sys.path:
 
431
  paths = sorted(glob.glob(str(OUTPUT / "**" / "*.png"), recursive=True), key=os.path.getmtime, reverse=True)
432
  return paths[:1]
433
  finally:
434
+ tqdm.std.tqdm = original_tqdm
 
435
  if 'loop' in locals() and not loop.is_closed():
436
  try:
437
  loop.close()
 
489
  _append_log("NET ", "orange", f"Fetching LoRA: {char_lora}")
490
  yield None, _terminal_html
491
 
492
+ import tqdm.std
493
+ original_tqdm = tqdm.std.tqdm
494
+ tqdm.std.tqdm = UnifiedProgressTqdm
495
+ try:
496
+ hf_hub_download(repo_id=MODEL_CONFIG['char_lora_repo'], filename=file_path, local_dir=str(lora_root))
497
+ finally:
498
+ tqdm.std.tqdm = original_tqdm
499
 
500
  src = lora_root / file_path
501
  if src.exists():
 
1154
  .terminal-content .t-orange { color: #d29922 !important; }
1155
  .terminal-wrapper::-webkit-scrollbar { width: 6px !important; }
1156
  .terminal-wrapper::-webkit-scrollbar-thumb { background: rgba(150, 150, 150,f 0.3) !important; border-radius: 10px !important; }
1157
+
1158
+ /* ๆ‰’ๆމ็ปˆ็ซฏๅ†…้ƒจ็š„ๆ‰€ๆœ‰ๅŒ…่ฃนๅฑ‚่ƒŒๆ™ฏๅ’Œ่พนๆก† */
1159
+ .terminal-wrapper .prose,
1160
+ .terminal-wrapper .html-container,
1161
+ .terminal-wrapper > div {
1162
+ background: transparent !important;
1163
+ border: none !important;
1164
+ box-shadow: none !important;
1165
+ padding: 0 !important;
1166
+ margin: 0 !important;
1167
+ }
1168
  """
1169
 
1170
  load_config_from_json()