From 8d31a6632fdfbe240828f3a4c77d1464b30023c8 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 1 Sep 2024 17:29:31 -0400 Subject: [PATCH 1/2] Speed up inference on nvidia 10 series on Linux. --- comfy/model_management.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index f6a76a572..11683a905 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -370,8 +370,10 @@ def offloaded_memory(loaded_models, device): offloaded_mem += m.model_offloaded_memory() return offloaded_mem +WINDOWS = any(platform.win32_ver()) + EXTRA_RESERVED_VRAM = 400 * 1024 * 1024 -if any(platform.win32_ver()): +if WINDOWS: EXTRA_RESERVED_VRAM = 600 * 1024 * 1024 #Windows is higher because of the shared vram issue if args.reserve_vram is not None: @@ -1002,7 +1004,10 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma nvidia_10_series = ["1080", "1070", "titan x", "p3000", "p3200", "p4000", "p4200", "p5000", "p5200", "p6000", "1060", "1050", "p40", "p100", "p6", "p4"] for x in nvidia_10_series: if x in props.name.lower(): - return True + if WINDOWS or manual_cast: + return True + else: + return False #weird linux behavior where fp32 is faster if manual_cast: free_model_memory = maximum_vram_for_weights(device) From f1c2301697cb1cd538f8d4190741935548bb6734 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" <4000772+mcmonkey4eva@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:44:49 -0700 Subject: [PATCH 2/2] fix typo in stale-issues (#4735) --- .github/workflows/stale-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 201546efe..045996070 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/stale@v9 with: - stale-issue-message: 'This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.' + stale-issue-message: "This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically." days-before-stale: 30 days-before-close: 7 stale-issue-label: 'Stale'