The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
cache-ram: lower thresholds (#14089)
rattusb30e980a2066
diff --git a/comfy/cli_args.py b/comfy/cli_args.pyindex 9d88c8517..47b8174f4 100644--- a/comfy/cli_args.py+++ b/comfy/cli_args.py@@ -111,7 +111,7 @@ parser.add_argument("--preview-method", type=LatentPreviewMethod, default=Latentparser.add_argument("--preview-size", type=int, default=512, help="Sets the maximum preview size for sampler nodes.")cache_group = parser.add_mutually_exclusive_group()-cache_group.add_argument("--cache-ram", nargs='*', type=float, default=[], metavar="GB", help="Use RAM pressure caching with the specified headroom thresholds. This is the default caching mode. The first value sets the active-cache threshold; the optional second value sets the inactive-cache/pin threshold. Defaults when no values are provided: active 25%% of system RAM (min 4GB, max 32GB), inactive 75%% of system RAM (min 12GB, max 96GB).")+cache_group.add_argument("--cache-ram", nargs='*', type=float, default=[], metavar="GB", help="Use RAM pressure caching with the specified headroom thresholds. This is the default caching mode. The first value sets the active-cache threshold; the optional second value sets the inactive-cache/pin threshold. Defaults when no values are provided: active 10%% of system RAM (min 2GB, max 10GB), inactive 100%% of system RAM (max 96GB).")cache_group.add_argument("--cache-classic", action="store_true", help="Use the old style (aggressive) caching.")cache_group.add_argument("--cache-lru", type=int, default=0, help="Use LRU caching with a maximum of N node results cached. May use more RAM/VRAM.")cache_group.add_argument("--cache-none", action="store_true", help="Reduced RAM/VRAM usage at the expense of executing every node for each run.")diff --git a/main.py b/main.pyindex 1e47cab84..f23074942 100644--- a/main.py+++ b/main.py@@ -286,8 +286,8 @@ def prompt_worker(q, server_instance):cache_ram = 0cache_ram_inactive = 0if not args.cache_classic and not args.cache_none and args.cache_lru <= 0:- cache_ram = min(32.0, max(4.0, comfy.model_management.total_ram * 0.25 / 1024.0))- cache_ram_inactive = min(96.0, max(12.0, comfy.model_management.total_ram * 0.75 / 1024.0))+ cache_ram = min(10.0, max(2.0, comfy.model_management.total_ram * 0.10 / 1024.0))+ cache_ram_inactive = min(96.0, comfy.model_management.total_ram / 1024.0)if len(args.cache_ram) > 0:cache_ram = args.cache_ram[0]if len(args.cache_ram) > 1: