mirror of https://github.com/vladmandic/automatic
update constraints, patch loader and create ext exclude list
Signed-off-by: vladmandic <mandic00@live.com>pull/4713/head
parent
48e8b3a513
commit
397631fb4c
|
|
@ -1,8 +1,8 @@
|
|||
# Change Log for SD.Next
|
||||
|
||||
## Update for 2026-03-25
|
||||
## Update for 2026-03-26
|
||||
|
||||
### Highlights for 2026-03-25
|
||||
### Highlights for 2026-03-26
|
||||
|
||||
This release brings massive code refactoring to modernize codebase and removal of some obsolete features. Leaner & Faster!
|
||||
And since its a bit quieter period when it comes to new models, notable additions would be : *FireRed-Image-Edit* *SkyWorks-UniPic-3* and new *Anima-Preview*
|
||||
|
|
@ -18,7 +18,7 @@ But also many smaller quality-of-life improvements - for full details, see [Chan
|
|||
|
||||
[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
|
||||
|
||||
### Details for 2026-03-25
|
||||
### Details for 2026-03-26
|
||||
|
||||
- **Models**
|
||||
- [Google Flash 3.1 Image](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview) a.k.a. *Nano Banana 2*
|
||||
|
|
@ -110,6 +110,7 @@ But also many smaller quality-of-life improvements - for full details, see [Chan
|
|||
these are now installed on-demand when needed
|
||||
- bump `huggingface_hub==1.5.0`
|
||||
- bump `transformers==5.3.0`
|
||||
- installer introduce `constraints.txt`
|
||||
- refactor to/from *image/tensor* logic
|
||||
- refactor reorganize `cli` scripts
|
||||
- refactor move tests to dedicated `/test/`
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
fastapi==0.124.4
|
||||
numpy==2.1.2
|
||||
Pillow==10.4.0
|
||||
|
|
@ -1263,6 +1263,7 @@ def set_environment():
|
|||
os.environ.setdefault('MIOPEN_FIND_MODE', '2')
|
||||
os.environ.setdefault('UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS', '1')
|
||||
os.environ.setdefault('USE_TORCH', '1')
|
||||
os.environ.setdefault('UV_CONSTRAINT', os.path.abspath('constraints.txt'))
|
||||
os.environ.setdefault('UV_INDEX_STRATEGY', 'unsafe-any-match')
|
||||
os.environ.setdefault('UV_NO_BUILD_ISOLATION', '1')
|
||||
os.environ.setdefault('UVICORN_TIMEOUT_KEEP_ALIVE', '60')
|
||||
|
|
|
|||
|
|
@ -64,6 +64,13 @@ def temp_disable_extensions():
|
|||
'a1111-sd-webui-lycoris',
|
||||
'sd-webui-animatediff',
|
||||
]
|
||||
disable_obsolete = [
|
||||
'Lora',
|
||||
'stable-diffusion-webui-rembg',
|
||||
'sd-extension-framepack',
|
||||
'sd-extension-nudenet',
|
||||
'sd-extension-promptgen',
|
||||
]
|
||||
disable_themes = [
|
||||
'sd-webui-lobe-theme',
|
||||
'cozy-nest',
|
||||
|
|
@ -113,7 +120,9 @@ def temp_disable_extensions():
|
|||
for ext in disable_diffusers:
|
||||
if ext.lower() not in shared.opts.disabled_extensions:
|
||||
disabled.append(ext)
|
||||
disabled.append('Lora')
|
||||
for ext in disable_obsolete:
|
||||
if ext.lower() not in shared.opts.disabled_extensions:
|
||||
disabled.append(ext)
|
||||
|
||||
shared.cmd_opts.controlnet_loglevel = 'WARNING'
|
||||
return disabled
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ logging.getLogger("DeepSpeed").disabled = True
|
|||
timer.startup.record("loader")
|
||||
log.debug('Initializing: libraries')
|
||||
|
||||
def report(msg: str, e: Exception):
|
||||
log.error(f'Loader: {msg} {e}')
|
||||
log.error('Please restart the app to fix this issue')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
np = None
|
||||
try:
|
||||
os.environ.setdefault('NEP50_DISABLE_WARNING', '1')
|
||||
|
|
@ -33,19 +39,17 @@ try:
|
|||
return x
|
||||
return npwarn_decorator
|
||||
np._no_nep50_warning = getattr(np, '_no_nep50_warning', dummy_npwarn_decorator_factory) # pylint: disable=protected-access
|
||||
else:
|
||||
log.warning(f'Loader: numpy=={np.__version__} unsupported')
|
||||
except Exception as e:
|
||||
log.error(f'Loader: numpy=={np.__version__ if np is not None else None} {e}')
|
||||
log.error('Please restart the app to fix this issue')
|
||||
sys.exit(1)
|
||||
report(f'numpy=={np.__version__ if np is not None else None}', e)
|
||||
timer.startup.record("numpy")
|
||||
|
||||
scipy = None
|
||||
try:
|
||||
import scipy # pylint: disable=W0611,C0411
|
||||
except Exception as e:
|
||||
log.error(f'Loader: scipy=={scipy.__version__ if scipy is not None else None} {e}')
|
||||
log.error('Please restart the app to fix this issue')
|
||||
sys.exit(1)
|
||||
report(f'scipy=={scipy.__version__ if scipy is not None else None}', e)
|
||||
timer.startup.record("scipy")
|
||||
|
||||
try:
|
||||
|
|
@ -59,13 +63,15 @@ import torch # pylint: disable=C0411
|
|||
if torch.__version__.startswith('2.5.0'):
|
||||
log.warning(f'Disabling cuDNN for SDP on torch={torch.__version__}')
|
||||
torch.backends.cuda.enable_cudnn_sdp(False)
|
||||
|
||||
try:
|
||||
import intel_extension_for_pytorch as ipex # pylint: disable=import-error,unused-import
|
||||
log.debug(f'Load IPEX=={ipex.__version__}')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
pass # pylint: disable=unused-import,ungrouped-imports
|
||||
import torch.distributed.distributed_c10d as _c10d # pylint: disable=unused-import,ungrouped-imports
|
||||
except Exception:
|
||||
log.warning('Loader: torch is not built with distributed support')
|
||||
|
||||
|
|
@ -86,11 +92,10 @@ warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvisi
|
|||
torchvision = None
|
||||
try:
|
||||
import torchvision # pylint: disable=W0611,C0411
|
||||
import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them # pylint: disable=W0611,C0411
|
||||
except Exception as e:
|
||||
log.error(f'Loader: torchvision=={torchvision.__version__ if "torchvision" in sys.modules else None} {e}')
|
||||
if '_no_nep' in str(e):
|
||||
log.error('Loaded versions of packaged are not compatible')
|
||||
log.error('Please restart the app to fix this issue')
|
||||
report(f'torchvision=={torchvision.__version__ if torchvision is not None else None}', e)
|
||||
|
||||
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
|
||||
logging.getLogger("pytorch_lightning").disabled = True
|
||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
|
||||
|
|
@ -111,6 +116,7 @@ try:
|
|||
torch._dynamo.config.suppress_errors = not _compile_debug # pylint: disable=protected-access
|
||||
except Exception as e:
|
||||
log.warning(f'Torch logging: {e}')
|
||||
|
||||
if ".dev" in torch.__version__ or "+git" in torch.__version__:
|
||||
torch.__long_version__ = torch.__version__
|
||||
torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0)
|
||||
|
|
@ -123,15 +129,28 @@ except Exception:
|
|||
_bnb = False
|
||||
timer.startup.record("bnb")
|
||||
|
||||
import huggingface_hub # pylint: disable=W0611,C0411
|
||||
logging.getLogger("huggingface_hub.file_download").setLevel(logging.ERROR)
|
||||
logging.getLogger("huggingface_hub.utils._http").setLevel(logging.ERROR)
|
||||
timer.startup.record("hfhub")
|
||||
huggingface_hub = None
|
||||
try:
|
||||
import huggingface_hub # pylint: disable=W0611,C0411
|
||||
logging.getLogger("huggingface_hub.file_download").setLevel(logging.ERROR)
|
||||
logging.getLogger("huggingface_hub.utils._http").setLevel(logging.ERROR)
|
||||
timer.startup.record("hfhub")
|
||||
except Exception as e:
|
||||
report(f'huggingface_hub=={huggingface_hub.__version__ if "huggingface_hub" in sys.modules else None}', e)
|
||||
timer.startup.record("hub")
|
||||
|
||||
import accelerate # pylint: disable=W0611,C0411
|
||||
accelerate = None
|
||||
try:
|
||||
import accelerate # pylint: disable=W0611,C0411
|
||||
except Exception as e:
|
||||
report(f'accelerate=={accelerate.__version__ if "accelerate" in sys.modules else None}', e)
|
||||
timer.startup.record("accelerate")
|
||||
|
||||
import pydantic # pylint: disable=W0611,C0411
|
||||
pydantic = None
|
||||
try:
|
||||
import pydantic # pylint: disable=W0611,C0411
|
||||
except Exception as e:
|
||||
report(f'pydantic=={pydantic.__version__ if "pydantic" in sys.modules else None}', e)
|
||||
timer.startup.record("pydantic")
|
||||
|
||||
try:
|
||||
|
|
@ -142,9 +161,13 @@ try:
|
|||
fake_version_check.dep_version_check = lambda pkg, hint=None: None
|
||||
except Exception:
|
||||
pass
|
||||
import transformers # pylint: disable=W0611,C0411
|
||||
from transformers import logging as transformers_logging # pylint: disable=W0611,C0411
|
||||
transformers_logging.set_verbosity_error()
|
||||
transformers = None
|
||||
try:
|
||||
import transformers # pylint: disable=W0611,C0411
|
||||
from transformers import logging as transformers_logging # pylint: disable=W0611,C0411
|
||||
transformers_logging.set_verbosity_error()
|
||||
except Exception as e:
|
||||
report(f'transformers=={transformers.__version__ if "transformers" in sys.modules else None}', e)
|
||||
timer.startup.record("transformers")
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ requests==2.32.3
|
|||
tqdm==4.67.3
|
||||
accelerate==1.13.0
|
||||
einops==0.8.1
|
||||
huggingface_hub==1.7.2
|
||||
huggingface_hub==1.8.0
|
||||
numpy==2.1.2
|
||||
pandas==2.3.1
|
||||
protobuf==6.33.5
|
||||
|
|
|
|||
Loading…
Reference in New Issue