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
This commit is contained in:
parent
611f2a4e0f
commit
b53e247c94
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue