SuperRealCo commited on
Commit
99279d0
·
verified ·
1 Parent(s): 35d32ce

Delete utils

Browse files
utils/__init__.py DELETED
File without changes
utils/extra_config.py DELETED
@@ -1,34 +0,0 @@
1
- import os
2
- import yaml
3
- import folder_paths
4
- import logging
5
-
6
- def load_extra_path_config(yaml_path):
7
- with open(yaml_path, 'r', encoding='utf-8') as stream:
8
- config = yaml.safe_load(stream)
9
- yaml_dir = os.path.dirname(os.path.abspath(yaml_path))
10
- for c in config:
11
- conf = config[c]
12
- if conf is None:
13
- continue
14
- base_path = None
15
- if "base_path" in conf:
16
- base_path = conf.pop("base_path")
17
- base_path = os.path.expandvars(os.path.expanduser(base_path))
18
- if not os.path.isabs(base_path):
19
- base_path = os.path.abspath(os.path.join(yaml_dir, base_path))
20
- is_default = False
21
- if "is_default" in conf:
22
- is_default = conf.pop("is_default")
23
- for x in conf:
24
- for y in conf[x].split("\n"):
25
- if len(y) == 0:
26
- continue
27
- full_path = y
28
- if base_path:
29
- full_path = os.path.join(base_path, full_path)
30
- elif not os.path.isabs(full_path):
31
- full_path = os.path.abspath(os.path.join(yaml_dir, y))
32
- normalized_path = os.path.normpath(full_path)
33
- logging.info("Adding extra search path {} {}".format(x, normalized_path))
34
- folder_paths.add_model_folder_path(x, normalized_path, is_default)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils/install_util.py DELETED
@@ -1,18 +0,0 @@
1
- from pathlib import Path
2
- import sys
3
-
4
- # The path to the requirements.txt file
5
- requirements_path = Path(__file__).parents[1] / "requirements.txt"
6
-
7
-
8
- def get_missing_requirements_message():
9
- """The warning message to display when a package is missing."""
10
-
11
- extra = ""
12
- if sys.flags.no_user_site:
13
- extra = "-s "
14
- return f"""
15
- Please install the updated requirements.txt file by running:
16
- {sys.executable} {extra}-m pip install -r {requirements_path}
17
- If you are on the portable package you can run: update\\update_comfyui.bat to solve this problem.
18
- """.strip()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils/json_util.py DELETED
@@ -1,26 +0,0 @@
1
- def merge_json_recursive(base, update):
2
- """Recursively merge two JSON-like objects.
3
- - Dictionaries are merged recursively
4
- - Lists are concatenated
5
- - Other types are overwritten by the update value
6
-
7
- Args:
8
- base: Base JSON-like object
9
- update: Update JSON-like object to merge into base
10
-
11
- Returns:
12
- Merged JSON-like object
13
- """
14
- if not isinstance(base, dict) or not isinstance(update, dict):
15
- if isinstance(base, list) and isinstance(update, list):
16
- return base + update
17
- return update
18
-
19
- merged = base.copy()
20
- for key, value in update.items():
21
- if key in merged:
22
- merged[key] = merge_json_recursive(merged[key], value)
23
- else:
24
- merged[key] = value
25
-
26
- return merged