[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-02 06:37:32 +00:00
commit ffed150070
2 changed files with 2 additions and 3 deletions

View file

@ -1042,6 +1042,7 @@ class DiffusionBackend:
install_arch_patches,
uninstall_arch_patches,
)
try:
if effective_speed != SPEED_OFF:
install_compile_safe_patches()

View file

@ -258,9 +258,7 @@ def _token_in_needle(token: str, needle: str) -> bool:
('qwen-image-edit' in 'qwen-image-edit-2511') while preventing a short token from
matching inside an unrelated word ('kontext' must not match 'kontextual', 'edit'
must not match 'edition')."""
return re.search(
r"(?:^|[-_./\\])" + re.escape(token) + r"(?:$|[-_./\\])", needle
) is not None
return re.search(r"(?:^|[-_./\\])" + re.escape(token) + r"(?:$|[-_./\\])", needle) is not None
def _best_family_match(needle: str) -> Optional[DiffusionFamily]: