Merge pull request #128 from max-solo23/patch-2

Fix AttributeError for patchers missing model_patches_models() (GGUFModelPatcher, ModelPatcher)
This commit is contained in:
John Pollock
2025-10-14 15:47:44 -05:00
committed by GitHub
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -51,6 +51,20 @@ def register_patched_safetensor_modelpatcher():
models_temp = set()
for m in models:
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"):
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}")
patches = m.model_patches_to(target_device)
if patches:
logger.debug(f"[MultiGPU DisTorch V2] Found {len(patches)} mm_patch(es) for {type(m).__name__} on device {target_device}")
for mm_patch in patches:
logger.debug(f"[MultiGPU DisTorch V2] Registering mm_patch: {type(mm_patch).__name__}")
models_temp.add(mm_patch)
continue
for mm_patch in m.model_patches_models():
models_temp.add(mm_patch)
patches = m.model_patches_to(m.load_device)
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-multigpu"
description = "Provides a suite of custom nodes to manage multiple GPUs for ComfyUI, including advanced model offloading for both GGUF and Safetensor formats with DisTorch, and bespoke MultiGPU support for WanVideoWrapper and other custom nodes."
version = "2.5.7"
version = "2.5.8"
license = {file = "LICENSE"}
[project.urls]