Merge branch 'main' into bugfix/trim-whitespace-from-urls

This commit is contained in:
blessedcoolant
2023-10-15 17:41:41 +05:30
committed by GitHub
65 changed files with 5503 additions and 1831 deletions

View File

@ -662,7 +662,7 @@ def default_ramcache() -> float:
def default_startup_options(init_file: Path) -> Namespace:
opts = InvokeAIAppConfig.get_config()
opts.ram = default_ramcache()
opts.ram = opts.ram or default_ramcache()
return opts

View File

@ -55,8 +55,10 @@ class MemorySnapshot:
try:
malloc_info = LibcUtil().mallinfo2()
except OSError:
# This is expected in environments that do not have the 'libc.so.6' shared library.
except (OSError, AttributeError):
# OSError: This is expected in environments that do not have the 'libc.so.6' shared library.
# AttributeError: This is expected in environments that have `libc.so.6` but do not have the `mallinfo2` (e.g. glibc < 2.33)
# TODO: Does `mallinfo` work?
malloc_info = None
return cls(process_ram, vram, malloc_info)

View File

@ -986,6 +986,8 @@ class ModelManager(object):
for model_path in models_dir.iterdir():
if model_path not in loaded_files: # TODO: check
if model_path.name.startswith("."):
continue
model_name = model_path.name if model_path.is_dir() else model_path.stem
model_key = self.create_key(model_name, cur_base_model, cur_model_type)