This commit is contained in:
Haoming 2026-05-08 14:36:01 +08:00
parent 0c26d5cd9c
commit 929d296dcd
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,3 @@
import random
import string
import time
import cv2
import numpy as np
import torch