Skip to content

Commit b53e247

Browse files
authored
rename comfy/logging.py to comfy/internal_logging.py (Comfy-Org#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: Comfy-Org#15229
1 parent 611f2a4 commit b53e247

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import threading
88

9-
import comfy.logging
9+
import comfy.internal_logging
1010

1111
ANSI_NAMED_COLORS = {
1212
'black': '\033[30m',
@@ -91,7 +91,7 @@ def on_flush(callback):
9191

9292

9393
def get_log_level(level):
94-
return comfy.logging.DETAIL if level == "DETAIL" else logging.getLevelName(level)
94+
return comfy.internal_logging.DETAIL if level == "DETAIL" else logging.getLevelName(level)
9595

9696

9797
def setup_logger(log_level: str = 'INFO', file_outputs=None, capacity: int = 300, use_stdout: bool = False):

comfy/model_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import comfy.quant_ops
3535
import comfy_aimdo.host_buffer
3636
import comfy_aimdo.vram_buffer
37-
from comfy.logging import detail
37+
from comfy.internal_logging import detail
3838

3939
from typing import TYPE_CHECKING
4040
if TYPE_CHECKING:

comfy/model_patcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import comfy.utils
3939
import comfy_aimdo.host_buffer
4040
from comfy.comfy_types import UnetWrapperFunction
41-
from comfy.logging import detail
41+
from comfy.internal_logging import detail
4242
from comfy.quant_ops import QuantizedTensor
4343
from comfy.patcher_extension import CallbacksMP, PatcherInjection, WrappersMP
4444

comfy/samplers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import comfy.context_windows
2121
import comfy.multigpu
2222
import comfy.utils
23-
from comfy.logging import detail
23+
from comfy.internal_logging import detail
2424
import scipy.stats
2525
import numpy
2626

execution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import comfy.model_patcher
2020
import comfy.model_prefetch
2121
import comfy_aimdo.model_vbar
22-
from comfy.logging import detail
22+
from comfy.internal_logging import detail
2323

2424
from latent_preview import set_preview_method
2525
import nodes

0 commit comments

Comments
 (0)