add --new flag

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-04 16:00:56 -04:00
parent 5160034b5a
commit aec30cc063
8 changed files with 20 additions and 15 deletions
+1
View File
@@ -49,6 +49,7 @@
- move zluda flash attenion to *Triton Flash attention* option
- remove samplers filtering
- allow both flow-matching and discrete samplers for sdxl models
- cleanup command line parameters
- **Fixes**
- normalize path hanlding when deleting images
- unified compile upscalers
+11 -3
View File
@@ -1244,6 +1244,15 @@ def install_gradio():
install(pkg, quiet=True)
def install_pydantic():
if args.new:
install('pydantic==2.11.7', ignore=True, quiet=True)
reload('pydantic', '2.11.7')
else:
install('pydantic==1.10.21', ignore=True, quiet=True)
reload('pydantic', '1.10.21')
def install_optional():
t_start = time.time()
log.info('Installing optional requirements...')
@@ -1259,10 +1268,8 @@ def install_optional():
install('Cython', ignore=True, quiet=True)
install('git+https://github.com/deepinsight/insightface@554a05561cb71cfebb4e012dfea48807f845a0c2#subdirectory=python-package', 'insightface') # insightface==0.7.3 with patches
install('albumentations==1.4.3', ignore=True, quiet=True)
install('pydantic==1.10.21', ignore=True, quiet=True)
reload('pydantic', '1.10.21')
install('gguf', ignore=True)
install('av', ignore=True, quiet=True)
install('gguf', ignore=True)
try:
import gguf
scripts_dir = os.path.join(os.path.dirname(gguf.__file__), '..', 'scripts')
@@ -1297,6 +1304,7 @@ def install_requirements():
for line in lines:
if not installed(line, quiet=True):
_res = install(line)
install_pydantic()
if args.profile:
pr.disable()
print_profile(pr, 'Requirements')
+1 -1
View File
@@ -327,7 +327,7 @@ class ControlNet():
errors.display(e, 'Control')
if self.model is None:
return
if not cmd_opts.lowvram: # lowvram will cause unet<->controlnet to ping-pong but saves more memory
if not cmd_opts.lowvram: # lowvram will cause unet<->controlnet to ping-pong but saves more memory
self.model.offload_never = True
if self.dtype is not None:
self.model.to(self.dtype)
+2 -3
View File
@@ -10,12 +10,11 @@ instightface_mp = None
def get_app(mp_name, threshold=0.5, resolution=640):
global insightface_app, instightface_mp # pylint: disable=global-statement
from installer import install, installed, reload
from installer import install, installed, install_pydantic
if not installed('insightface', reload=False, quiet=True):
install('git+https://github.com/deepinsight/insightface@554a05561cb71cfebb4e012dfea48807f845a0c2#subdirectory=python-package', 'insightface') # insightface==0.7.3 with patches
install('albumentations==1.4.3', ignore=False, reinstall=True)
install('pydantic==1.10.21', ignore=False, reinstall=True, force=True)
reload('pydantic')
install_pydantic()
if not installed('ip_adapter', reload=False, quiet=True):
install('git+https://github.com/tencent-ailab/IP-Adapter.git', 'ip_adapter', ignore=False)
+1 -1
View File
@@ -79,7 +79,7 @@ def create_sampler(name, model):
# sdxl allows both flow and discrete samplers
is_flexible = (model is not None) and ('XL' in model.__class__.__name__)
# restore default scheduler
if name == 'Default' and hasattr(model, 'scheduler'):
return restore_default(model)
-1
View File
@@ -54,7 +54,6 @@ pytorch_lightning==2.5.4
urllib3==1.26.19
Pillow==10.4.0
timm==1.0.16
pydantic==1.10.21
pyparsing==3.2.3
typing-extensions==4.14.1
sentencepiece==0.2.1
+2 -3
View File
@@ -13,12 +13,11 @@ orig_pipeline, orig_prompt_attention = None, None
def verify_insightface():
from installer import installed, install, reload
from installer import installed, install, install_pydantic
if not installed('insightface', reload=False, quiet=True):
install('git+https://github.com/deepinsight/insightface@554a05561cb71cfebb4e012dfea48807f845a0c2#subdirectory=python-package', 'insightface') # insightface==0.7.3 with patches
install('albumentations==1.4.3', ignore=False, reinstall=True)
install('pydantic==1.10.21', ignore=False, reinstall=True, force=True)
reload('pydantic')
install_pydantic()
def load_infiniteyou(model: str):
+2 -3
View File
@@ -28,12 +28,11 @@ class Script(scripts_manager.Script):
return True
def dependencies(self):
from installer import install, installed, reload
from installer import install, installed, install_pydantic
if not installed('insightface==0.7.3', reload=False, quiet=True):
install('git+https://github.com/deepinsight/insightface@554a05561cb71cfebb4e012dfea48807f845a0c2#subdirectory=python-package', 'insightface') # insightface==0.7.3 with patches
install('albumentations==1.4.3', ignore=False, reinstall=True)
install('pydantic==1.10.21', ignore=False, reinstall=True, force=True)
reload('pydantic')
install_pydantic()
def register(self): # register xyz grid elements
global registered # pylint: disable=global-statement