Apply black, isort, flake8

This commit is contained in:
Martin Kristiansen
2023-09-11 09:57:41 -04:00
committed by Kent Keirsey
parent 0450c28f14
commit e467ca7f1b
14 changed files with 32 additions and 57 deletions

View File

@ -1,6 +1,7 @@
"""
Initialization file for invokeai.backend.util
"""
from .attention import auto_detect_slice_size # noqa: F401
from .devices import ( # noqa: F401
CPU_DEVICE,
CUDA_DEVICE,
@ -10,11 +11,4 @@ from .devices import ( # noqa: F401
normalize_device,
torch_dtype,
)
from .util import ( # noqa: F401
ask_user,
download_with_resume,
instantiate_from_config,
url_attachment_name,
Chdir,
)
from .attention import auto_detect_slice_size # noqa: F401
from .util import Chdir, ask_user, download_with_resume, instantiate_from_config, url_attachment_name # noqa: F401

View File

@ -3,8 +3,8 @@
Utility routine used for autodetection of optimal slice size
for attention mechanism.
"""
import torch
import psutil
import torch
def auto_detect_slice_size(latents: torch.Tensor) -> str: