Skip to content

Commit 87bde13

Browse files
committed
fix: Ensure model patching fallback logic only applies when 'model_patches_models' attribute is absent.
1 parent 03e5368 commit 87bde13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

distorch_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def patched_load_models_gpu(models, memory_required=0, force_patch_weights=False
6767
models_temp.add(m)
6868
model_type = type(m).__name__
6969

70-
if ("GGUF" in model_type or "ModelPatcher" in model_type) and hasattr(m, "model_patches_to"):
70+
if ("GGUF" in model_type or "ModelPatcher" in model_type) and hasattr(m, "model_patches_to") and not hasattr(m, "model_patches_models"):
7171
logger.info(f"[MultiGPU DisTorch V2] {type(m).__name__} missing 'model_patches_models' attribute, using 'model_patches_to' fallback.")
7272
target_device = m.load_device
7373
logger.debug(f"[MultiGPU DisTorch V2] Target device: {target_device}")

0 commit comments

Comments
 (0)