Fix regression. (#11194)

This commit is contained in:
comfyanonymous 2025-12-08 14:38:36 -08:00 committed by GitHub
parent 935493f6c1
commit 3b0368aa34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,6 +139,9 @@ def low_vram_patch_estimate_vram(model, key):
if weight is None:
return 0
model_dtype = getattr(model, "manual_cast_dtype", torch.float32)
if model_dtype is None:
model_dtype = weight.dtype
return weight.numel() * model_dtype.itemsize * LOWVRAM_PATCH_ESTIMATE_MATH_FACTOR
def get_key_weight(model, key):