mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
+1
-1
@@ -568,7 +568,7 @@ def check_transformers():
|
||||
pkg_tokenizers = package_spec('tokenizers')
|
||||
# target_commit = '753d61104116eefc8ffc977327b441ee0c8d599f' # transformers commit hash == 4.57.6
|
||||
# target_commit = "380e3cc5d59912a48508cb6d4959a31cd460e12e" # transformers commit hash == 5.5.0.dev-0409
|
||||
target_commit = "d9e7791b129797be80ca7b3b0bf2a53cda0d4b8c" # transformers commit hash == 5.13.0.dev0 == 06-29-2026
|
||||
target_commit = "b70d02fc724d04c916832ca4ead03ff05e8fb1ee" # transformers commit hash == 5.13.0.dev0 == 07-03-2026
|
||||
if args.use_directml:
|
||||
target_transformers = '4.52.4'
|
||||
target_tokenizers = '0.21.4'
|
||||
|
||||
@@ -12,7 +12,7 @@ _upload_store_getter = None
|
||||
|
||||
|
||||
def register_upload_store(getter_fn):
|
||||
global _upload_store_getter
|
||||
global _upload_store_getter # pylint: disable=global-statement
|
||||
_upload_store_getter = getter_fn
|
||||
|
||||
|
||||
|
||||
@@ -184,14 +184,14 @@ def resize_tensor(tensor: torch.Tensor, target_size: tuple[int, int], *, kernel=
|
||||
mode = 'bilinear' if (target_size[0] * target_size[1]) > (tensor.shape[-2] * tensor.shape[-1]) else 'area'
|
||||
log.debug(f'Resize tensor: method=torch mode={mode} shape={tensor.shape} target={target_size} fn={fn}')
|
||||
inp = tensor if tensor.dim() == 4 else tensor.unsqueeze(0)
|
||||
result = torch.nn.functional.interpolate(inp, size=target_size, mode=mode, antialias=(mode != 'area'))
|
||||
result = torch.nn.functional.interpolate(inp, size=target_size, mode=mode, antialias=mode != 'area')
|
||||
return result.squeeze(0) if tensor.dim() == 3 else result
|
||||
rk = get_kernel(kernel)
|
||||
if rk is None:
|
||||
mode = 'bilinear' if (target_size[0] * target_size[1]) > (tensor.shape[-2] * tensor.shape[-1]) else 'area'
|
||||
log.debug(f'Resize tensor: method=torch mode={mode} shape={tensor.shape} target={target_size} kernel=None fn={fn}')
|
||||
inp = tensor if tensor.dim() == 4 else tensor.unsqueeze(0)
|
||||
result = torch.nn.functional.interpolate(inp, size=target_size, mode=mode, antialias=(mode != 'area'))
|
||||
result = torch.nn.functional.interpolate(inp, size=target_size, mode=mode, antialias=mode != 'area')
|
||||
return result.squeeze(0) if tensor.dim() == 3 else result
|
||||
|
||||
from modules.sharpfin.functional import scale
|
||||
|
||||
@@ -202,7 +202,7 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
|
||||
debug_log(f'Network check: type=LoRA key="{key}" requested={requested} loaded={loaded} status="same"')
|
||||
return False, "none"
|
||||
|
||||
def activate(self, p, params_list, step=0, include=None, exclude=None):
|
||||
def activate(self, p, params_list, step=0, include=None, exclude=None): # pylint: disable=arguments-differ
|
||||
if exclude is None:
|
||||
exclude = []
|
||||
if include is None:
|
||||
|
||||
@@ -18,8 +18,6 @@ import inspect
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
|
||||
from modules.logger import log
|
||||
|
||||
|
||||
_PATCH_APPLIED = False
|
||||
_BROKEN_MARKER = 'torch.flip(hidden_states, dims=[1])'
|
||||
|
||||
@@ -6,12 +6,12 @@ from PIL import Image, ImageOps
|
||||
from modules import shared, devices, errors, images, scripts_manager, memstats, script_callbacks, extra_networks, sd_models, sd_checkpoint, sd_vae, processing_helpers, processing_grading, timer, masking
|
||||
from modules.logger import log
|
||||
from modules.sd_hijack_hypertile import context_hypertile_vae, context_hypertile_unet
|
||||
from modules.processing_class import (
|
||||
from modules.processing_class import ( # pylint: disable=unused-import
|
||||
StableDiffusionProcessing,
|
||||
StableDiffusionProcessingTxt2Img, # pylint: disable=unused-import
|
||||
StableDiffusionProcessingImg2Img, # pylint: disable=unused-import
|
||||
StableDiffusionProcessingVideo, # pylint: disable=unused-import
|
||||
StableDiffusionProcessingControl, # pylint: disable=unused-import
|
||||
StableDiffusionProcessingTxt2Img,
|
||||
StableDiffusionProcessingImg2Img,
|
||||
StableDiffusionProcessingControl,
|
||||
StableDiffusionProcessingVideo,
|
||||
)
|
||||
from modules.processing_info import create_infotext
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import sys
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
from PIL import Image
|
||||
from installer import install, reload
|
||||
from installer import install
|
||||
from modules.logger import log
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ def vae_decode_tiny(latents):
|
||||
log.warning(f'Decode: type=Tiny cls={shared.sd_model.__class__.__name__} not supported')
|
||||
return None
|
||||
from modules.vae import sd_vae_taesd
|
||||
vae, variant = sd_vae_taesd.get_model(variant=variant)
|
||||
vae, variant = sd_vae_taesd.load_model(variant=variant)
|
||||
if vae is None:
|
||||
return None
|
||||
log.debug(f'Decode: type=Tiny cls={vae.__class__.__name__} variant="{variant}" latents={latents.shape}')
|
||||
|
||||
@@ -104,6 +104,9 @@ main.ignore-paths=[
|
||||
".ruff_cache",
|
||||
".vscode",
|
||||
".*/node_modules/.*",
|
||||
"cli",
|
||||
"tmp",
|
||||
"test",
|
||||
"modules/control/proc",
|
||||
"modules/schedulers/scheduler_*.py",
|
||||
"modules/apg",
|
||||
@@ -325,6 +328,8 @@ typecheck.generated-members=[
|
||||
"logging.*",
|
||||
"torch.*",
|
||||
"cv2.*",
|
||||
"av.*",
|
||||
"PIL.*",
|
||||
]
|
||||
typecheck.ignore-none=true
|
||||
typecheck.ignore-on-opaque-inference=true
|
||||
|
||||
Reference in New Issue
Block a user