From b53e247c94f9225dc206bcfef5d64a2f7bc85232 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Sun, 2 Aug 2026 22:20:27 +0200 Subject: [PATCH] rename comfy/logging.py to comfy/internal_logging.py (#15231) This avoids name collision (circular imports) for external custom nodes, for which the comfy path is pushed into sys.path so Python's own logging module is shadowed otherwise. fixes: #15229 --- app/logger.py | 4 ++-- comfy/{logging.py => internal_logging.py} | 0 comfy/model_management.py | 2 +- comfy/model_patcher.py | 2 +- comfy/samplers.py | 2 +- execution.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename comfy/{logging.py => internal_logging.py} (100%) diff --git a/app/logger.py b/app/logger.py index 2e6116813..fe82c40c9 100644 --- a/app/logger.py +++ b/app/logger.py @@ -6,7 +6,7 @@ import os import sys import threading -import comfy.logging +import comfy.internal_logging ANSI_NAMED_COLORS = { 'black': '\033[30m', @@ -91,7 +91,7 @@ def on_flush(callback): def get_log_level(level): - return comfy.logging.DETAIL if level == "DETAIL" else logging.getLevelName(level) + return comfy.internal_logging.DETAIL if level == "DETAIL" else logging.getLevelName(level) def setup_logger(log_level: str = 'INFO', file_outputs=None, capacity: int = 300, use_stdout: bool = False): diff --git a/comfy/logging.py b/comfy/internal_logging.py similarity index 100% rename from comfy/logging.py rename to comfy/internal_logging.py diff --git a/comfy/model_management.py b/comfy/model_management.py index 1000f69e1..ec91fb929 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -34,7 +34,7 @@ import comfy.utils import comfy.quant_ops import comfy_aimdo.host_buffer import comfy_aimdo.vram_buffer -from comfy.logging import detail +from comfy.internal_logging import detail from typing import TYPE_CHECKING if TYPE_CHECKING: diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 6b698f767..ae3f0191d 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -38,7 +38,7 @@ import comfy.patcher_extension import comfy.utils import comfy_aimdo.host_buffer from comfy.comfy_types import UnetWrapperFunction -from comfy.logging import detail +from comfy.internal_logging import detail from comfy.quant_ops import QuantizedTensor from comfy.patcher_extension import CallbacksMP, PatcherInjection, WrappersMP diff --git a/comfy/samplers.py b/comfy/samplers.py index 6fea0913e..a280f3bb6 100755 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -20,7 +20,7 @@ import comfy.hooks import comfy.context_windows import comfy.multigpu import comfy.utils -from comfy.logging import detail +from comfy.internal_logging import detail import scipy.stats import numpy diff --git a/execution.py b/execution.py index 7cab4b331..0b858969d 100644 --- a/execution.py +++ b/execution.py @@ -19,7 +19,7 @@ import comfy.model_management import comfy.model_patcher import comfy.model_prefetch import comfy_aimdo.model_vbar -from comfy.logging import detail +from comfy.internal_logging import detail from latent_preview import set_preview_method import nodes