From 4e449ca9b29155476a43998c5f0be4744e19bbd9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 12 Jul 2025 13:35:41 -0400 Subject: [PATCH] refactor monolithic shared.py and separate legacy options with logging Signed-off-by: Vladimir Mandic --- .pylintrc | 1 + CHANGELOG.md | 2 + TODO.md | 2 +- installer.py | 4 +- modules/cmd_args.py | 9 +- modules/extensions.py | 72 ++++- modules/json_helpers.py | 116 ++++++++ modules/options.py | 6 + modules/options_handler.py | 222 ++++++++++++++ modules/shared.py | 583 ++----------------------------------- modules/shared_helpers.py | 74 +++++ modules/shared_legacy.py | 78 +++++ package.json | 2 +- 13 files changed, 599 insertions(+), 572 deletions(-) create mode 100644 modules/json_helpers.py create mode 100644 modules/options_handler.py create mode 100644 modules/shared_helpers.py create mode 100644 modules/shared_legacy.py diff --git a/.pylintrc b/.pylintrc index 0a3d159bf..f7cf2ac9f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -36,6 +36,7 @@ ignore-paths=/usr/lib/.*$, modules/teacache, modules/todo, pipelines/flex2, + pipelines/f_lite, pipelines/hidream, pipelines/meissonic, pipelines/omnigen2, diff --git a/CHANGELOG.md b/CHANGELOG.md index dc35b66df..568ef10b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ Although upgrades and existing installations are tested and should work fine! see [Styles docs](https://vladmandic.github.io/sdnext-docs/Styles/) for details - **TAESD** is now default preview type since its the only one that supports most new models - SD.Next now starts with *locked* state preventing model loading until startup is complete + - warn when modifying legacy settings that are no longer supported, but available for compatibilty - **API** - add `/sdapi/v1/lock-checkpoint` endpoint that can be used to lock/unlock model changes if model is locked, it cannot be changed using normal load or unload methods @@ -110,6 +111,7 @@ Although upgrades and existing installations are tested and should work fine! - remove legacy lora support: `/extensions-builtin/Lora` - remove legacy clip/blip interrogate module - remove modern-ui remove `only-original` vs `only-diffusers` code paths + - split monolithic `shared.py` - cleanup `/modules`: move pipeline loaders to `/pipelines` root - cleanup `/modules`: move code folders used by pipelines to `/pipelines/` folder - cleanup `/modules`: move code folders used by scripts to `/scripts/