detect active venv

Signed-off-by: vladmandic <mandic00@live.com>
pull/4704/head^2
vladmandic 2026-03-27 07:50:39 +01:00
parent d812726570
commit 4b6b577d14
2 changed files with 25 additions and 3 deletions

View File

@ -1,8 +1,8 @@
# Change Log for SD.Next
## Update for 2026-03-26
## Update for 2026-03-27
### Highlights for 2026-03-26
### Highlights for 2026-03-27
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 versions of *Anima-Preview*, *Flux-Klein-KV*
@ -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-26
### Details for 2026-03-27
- **Models**
- [Google Flash 3.1 Image](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview) a.k.a. *Nano Banana 2*
@ -141,6 +141,7 @@ But also many smaller quality-of-life improvements - for full details, see [Chan
- better subprocess execute, thanks @awsr
- better wslopen handling, thanks @awsr
- refactor for PEP-484 compliance, thanks @awsr
- detect active `venv`
- **Obsolete**
- remove `normalbae` pre-processor
- remove `dwpose` pre-processor

View File

@ -440,6 +440,8 @@ def check_python(supported_minors=None, experimental_minors=None, reason=None):
if args.quick:
return
log.info(f'Python: version={platform.python_version()} platform={platform.system()} bin="{sys.executable}" venv="{sys.prefix}"')
if sys.prefix == getattr(sys, "base_prefix", sys.prefix) and 'venv' not in sys.prefix.lower():
log.warning('Python: virtual environment not detected')
if int(sys.version_info.minor) == 9:
log.error(f"Python: version={platform.python_version()} is end-of-life")
if int(sys.version_info.minor) == 10:
@ -1000,6 +1002,19 @@ def list_extensions_folder(folder, quiet=False):
# run installer for each installed and enabled extension and optionally update them
def install_extensions(force=False):
disable_diffusers = [
'sd-webui-controlnet',
'multidiffusion-upscaler-for-automatic1111',
'a1111-sd-webui-lycoris',
'sd-webui-animatediff',
]
disable_obsolete = [
'Lora',
'stable-diffusion-webui-rembg',
'sd-extension-framepack',
'sd-extension-nudenet',
'sd-extension-promptgen',
]
if args.profile:
pr = cProfile.Profile()
pr.enable()
@ -1009,6 +1024,12 @@ def install_extensions(force=False):
extensions_duplicates = []
extensions_enabled = []
extensions_disabled = [e.lower() for e in opts.get('disabled_extensions', [])]
for ext in disable_diffusers:
if ext.lower() not in opts.get('disabled_extensions', []):
extensions_disabled.append(ext)
for ext in disable_obsolete:
if ext.lower() not in opts.get('disabled_extensions', []):
extensions_disabled.append(ext)
extension_folders = [extensions_builtin_dir] if args.safe else [extensions_builtin_dir, extensions_dir]
res = []
for folder in extension_folders: