From 929d296dcdc33e7a7b818b1f2cd26ddbb7a6bab5 Mon Sep 17 00:00:00 2001 From: Haoming Date: Fri, 8 May 2026 14:36:01 +0800 Subject: [PATCH] lint --- modules_forge/initialization.py | 6 +++++- modules_forge/patch_basic.py | 6 +++--- modules_forge/utils.py | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules_forge/initialization.py b/modules_forge/initialization.py index c314f103..b224a7de 100644 --- a/modules_forge/initialization.py +++ b/modules_forge/initialization.py @@ -32,7 +32,11 @@ def initialize_forge(): os.environ["CUDA_VISIBLE_DEVICES"] = str(args.gpu_device_id) print("Set device to:", args.gpu_device_id) - from modules_forge.cuda_malloc import get_torch_version, try_cuda_malloc, try_expandable_segments + from modules_forge.cuda_malloc import ( + get_torch_version, + try_cuda_malloc, + try_expandable_segments, + ) if "rocm" in get_torch_version(): # https://github.com/Comfy-Org/ComfyUI/blob/v0.10.0/main.py diff --git a/modules_forge/patch_basic.py b/modules_forge/patch_basic.py index f628cea4..44e42cba 100644 --- a/modules_forge/patch_basic.py +++ b/modules_forge/patch_basic.py @@ -82,13 +82,13 @@ def patch_all_basics(): file_download.tqdm = always_show_tqdm file_download.logger.setLevel(logging.ERROR) - from huggingface_hub.file_download import _download_to_tmp_and_move as original_download_to_tmp_and_move + from huggingface_hub.file_download import _download_to_tmp_and_move as orig_download - @wraps(original_download_to_tmp_and_move) + @wraps(orig_download) def patched_download_to_tmp_and_move(incomplete_path: Path, destination_path: Path, *args, **kwargs): incomplete_path = long_path_prefix(incomplete_path) destination_path = long_path_prefix(destination_path) - return original_download_to_tmp_and_move(incomplete_path, destination_path, *args, **kwargs) + return orig_download(incomplete_path, destination_path, *args, **kwargs) file_download._download_to_tmp_and_move = patched_download_to_tmp_and_move diff --git a/modules_forge/utils.py b/modules_forge/utils.py index fee22709..16d179aa 100644 --- a/modules_forge/utils.py +++ b/modules_forge/utils.py @@ -1,7 +1,3 @@ -import random -import string -import time - import cv2 import numpy as np import torch