From 87bde131c47dfba68efbdd81a6b5a74d6caed796 Mon Sep 17 00:00:00 2001 From: John Pollock Date: Fri, 2 Jan 2026 22:48:43 -0600 Subject: [PATCH] fix: Ensure model patching fallback logic only applies when 'model_patches_models' attribute is absent. --- distorch_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distorch_2.py b/distorch_2.py index 4532041..94d2f53 100644 --- a/distorch_2.py +++ b/distorch_2.py @@ -67,7 +67,7 @@ def register_patched_safetensor_modelpatcher(): models_temp.add(m) model_type = type(m).__name__ - if ("GGUF" in model_type or "ModelPatcher" in model_type) and hasattr(m, "model_patches_to"): + if ("GGUF" in model_type or "ModelPatcher" in model_type) and hasattr(m, "model_patches_to") and not hasattr(m, "model_patches_models"): logger.info(f"[MultiGPU DisTorch V2] {type(m).__name__} missing 'model_patches_models' attribute, using 'model_patches_to' fallback.") target_device = m.load_device logger.debug(f"[MultiGPU DisTorch V2] Target device: {target_device}")