First pass at adding partial loading support to the ModelCache.

This commit is contained in:
Ryan Dick
2024-12-29 18:43:00 +00:00
parent 782ee7a0ec
commit 535e45cedf
5 changed files with 307 additions and 264 deletions

View File

@@ -82,9 +82,8 @@ class ModelManagerService(ModelManagerServiceBase):
logger.setLevel(app_config.log_level.upper())
ram_cache = ModelCache(
max_cache_size=app_config.ram,
max_vram_cache_size=app_config.vram,
lazy_offloading=app_config.lazy_offload,
max_ram_cache_size_gb=app_config.ram,
max_vram_cache_size_gb=app_config.vram,
logger=logger,
execution_device=execution_device or TorchDevice.choose_torch_device(),
)