Skip to content

Commit

Permalink
Merge pull request #1 from comfyanonymous/master
Browse files Browse the repository at this point in the history
Comfy Update Commit : 6f021d8 + 7d2467e
  • Loading branch information
svdC1 authored Oct 6, 2024
2 parents 8070785 + 7d2467e commit 6b21a8d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ def get_logs():
return "\n".join([formatter.format(x) for x in logs])


def setup_logger(verbose: bool = False, capacity: int = 300):
def setup_logger(log_level: str = 'INFO', capacity: int = 300):
global logs
if logs:
return

# Setup default global logger
logger = logging.getLogger()
logger.setLevel(logging.DEBUG if verbose else logging.INFO)
logger.setLevel(log_level)

stream_handler = logging.StreamHandler()
stream_handler.setFormatter(logging.Formatter("%(message)s"))
Expand Down
2 changes: 1 addition & 1 deletion comfy/cli_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class LatentPreviewMethod(enum.Enum):

parser.add_argument("--multi-user", action="store_true", help="Enables per-user storage.")

parser.add_argument("--verbose", action="store_true", help="Enables more debug prints.")
parser.add_argument("--verbose", default='INFO', const='DEBUG', nargs="?", choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], help='Set the logging level')

# The default built-in provider hosted under web/
DEFAULT_VERSION_STRING = "comfyanonymous/ComfyUI@latest"
Expand Down
3 changes: 1 addition & 2 deletions comfy/clip_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ def load_clipvision_from_sd(sd, prefix="", convert_keys=False):
keys = list(sd.keys())
for k in keys:
if k not in u:
t = sd.pop(k)
del t
sd.pop(k)
return clip

def load(ckpt_path):
Expand Down
1 change: 0 additions & 1 deletion comfy/float.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import torch
import math

def calc_mantissa(abs_x, exponent, normal_mask, MANTISSA_BITS, EXPONENT_BIAS, generator=None):
mantissa_scaled = torch.where(
Expand Down
1 change: 0 additions & 1 deletion comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import comfy.model_patcher
import comfy.lora
import comfy.t2i_adapter.adapter
import comfy.supported_models_base
import comfy.taesd.taesd

def load_lora_for_models(model, clip, lora, strength_model, strength_clip):
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from app.logger import setup_logger


setup_logger(verbose=args.verbose)
setup_logger(log_level=args.verbose)


def execute_prestartup_script():
Expand Down

0 comments on commit 6b21a8d

Please sign in to comment.