From b8f314921cc8e25198d1a4c81a871ea0af8057b2 Mon Sep 17 00:00:00 2001 From: pollock Date: Thu, 23 Jan 2025 08:50:48 -0500 Subject: [PATCH] Refactor imports and logging messages for clarity and consistency --- __init__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index 92442e6..08f2daf 100644 --- a/__init__.py +++ b/__init__.py @@ -1,15 +1,12 @@ -import time import copy import torch import sys import comfy.model_management import os from pathlib import Path -import importlib.util import logging import folder_paths from collections import defaultdict -import builtins current_device = comfy.model_management.get_torch_device() current_offload_device = comfy.model_management.get_torch_device() @@ -100,7 +97,6 @@ def register_patched_ggufmodelpatcher(node_instance): else: logging.info("MultiGPU: GGUFDisTorch - GGUF ModelPatcher already patched") - def analyze_ggml_loading(model, distorch_allocations): DEVICE_RATIOS_DISTORCH = {} @@ -172,7 +168,7 @@ def analyze_ggml_loading(model, distorch_allocations): memory_by_type[layer_type] += layer_memory total_memory += layer_memory - logging.info(" DisTorch UNet GGML Layer Distribution") + logging.info(" DisTorch GGML Layer Distribution") logging.info(dash_line) fmt_layer = "{:<12}{:>10}{:>14}{:>10}" logging.info(fmt_layer.format("Layer Type", "Layers", "Memory (MB)", "% Total")) @@ -232,9 +228,6 @@ def get_device_list(): import torch return ["cpu"] + [f"cuda:{i}" for i in range(torch.cuda.device_count())] - - - class DeviceSelectorMultiGPU: @classmethod def INPUT_TYPES(s):