lint update

Signed-off-by: vladmandic <mandic00@live.com>
pull/4537/head
vladmandic 2026-01-08 08:51:35 +01:00
parent 7fe09db97e
commit 899514c5b8
5 changed files with 10 additions and 13 deletions

View File

@ -287,12 +287,7 @@ const htmlConfig = defineConfig([
language: 'html/html',
rules: {
'html/attrs-newline': 'off',
'html/element-newline': [
'error',
{
inline: ['$inline'],
},
],
'html/element-newline': 'off',
'html/indent': [
'warn',
2,

@ -1 +1 @@
Subproject commit bc84605e2422bf98c9957629ae312645471ac3c5
Subproject commit dff67ef8f40a300627b2f20d16484c65d1d43202

View File

@ -335,7 +335,7 @@ def resize_init_images(p):
p.mask_for_overlay = images.resize_image(1, p.mask_for_overlay, tgt_width, tgt_height, upscaler_name=None)
return tgt_width, tgt_height
except Exception:
pass
pass
return p.width, p.height

View File

@ -10,6 +10,8 @@ from enum import Enum
from functools import wraps
if TYPE_CHECKING:
import torch
rocm_sdk: Union[ModuleType, None] = None
@ -50,9 +52,9 @@ class ROCmEnvironment(Environment):
class PythonPackageEnvironment(Environment):
hip: ctypes.CDLL
def __init__(self, rocm_sdk: ModuleType):
spec = rocm_sdk._dist_info.ALL_PACKAGES['core'].get_py_package()
lib = rocm_sdk._dist_info.ALL_LIBRARIES['amdhip64']
def __init__(self, rocm_sdk_module: ModuleType):
spec = rocm_sdk_module._dist_info.ALL_PACKAGES['core'].get_py_package() # pylint: disable=protected-access
lib = rocm_sdk_module._dist_info.ALL_LIBRARIES['amdhip64'] # pylint: disable=protected-access
pattern = os.path.join(os.path.dirname(spec.origin), lib.windows_relpath if sys.platform == "win32" else lib.posix_relpath, lib.dll_pattern if sys.platform == "win32" else lib.so_pattern)
candidates = glob.glob(pattern)
if len(candidates) == 0:

View File

@ -131,7 +131,7 @@ def apply_sequential_offload(sd_model, op:str='model', quiet:bool=False):
shared.log.error(f'Setting {op}: offload={shared.opts.diffusers_offload_mode} {e}')
def disable_offload(sd_model, op:str='model', quiet:bool=False):
def apply_none_offload(sd_model, op:str='model', quiet:bool=False):
if shared.sd_model_type in offload_warn or 'video' in shared.sd_model_type:
shared.log.warning(f'Setting {op}: offload={shared.opts.diffusers_offload_mode} type={shared.sd_model.__class__.__name__} large model')
else:
@ -159,7 +159,7 @@ def set_diffuser_offload(sd_model, op:str='model', quiet:bool=False, force:bool=
accelerate.utils.modeling.dtype_byte_size = dtype_byte_size
if shared.opts.diffusers_offload_mode == "none":
disable_offload(sd_model, op=op, quiet=quiet)
apply_none_offload(sd_model, op=op, quiet=quiet)
if shared.opts.diffusers_offload_mode == "model" and hasattr(sd_model, "enable_model_cpu_offload"):
apply_model_offload(sd_model, op=op, quiet=quiet)