From 3a9ee995cfbb9425227df9aff534dea12c1af532 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Fri, 2 Aug 2024 17:34:30 -0400 Subject: [PATCH] Tweak regular SD memory formula. --- comfy/model_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_base.py b/comfy/model_base.py index 9989a4c..eb2b935 100644 --- a/comfy/model_base.py +++ b/comfy/model_base.py @@ -252,7 +252,7 @@ class BaseModel(torch.nn.Module): dtype = self.manual_cast_dtype #TODO: this needs to be tweaked area = input_shape[0] * math.prod(input_shape[2:]) - return (area * comfy.model_management.dtype_size(dtype) / 50) * (1024 * 1024) + return (area * comfy.model_management.dtype_size(dtype) * 0.01) * (1024 * 1024) else: #TODO: this formula might be too aggressive since I tweaked the sub-quad and split algorithms to use less memory. area = input_shape[0] * math.prod(input_shape[2:])