mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-07-21 21:01:24 +08:00
lint
This commit is contained in:
parent
0c26d5cd9c
commit
929d296dcd
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user