diff --git a/CHANGELOG.md b/CHANGELOG.md index 321dcef63..5d41c5426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - **Control** units now have extra option to re-use current preview image as processor input - improved `clip-skip` value handling in diffusers, thanks @AI-Casanova & @Disty0 now clip-skip range is 0-12 where previously lowest value was 1 (default is still 1) - values can also be decimal to interpolate between different layers, for example `clip-skip: 1.5`, thanks @AI-Casanova + values can also be decimal to interpolate between different layers, for example `clip-skip: 1.5`, thanks @AI-Casanova - **ONNX**: - allow specify onnx default provider and cpu fallback *settings -> diffusers* @@ -23,6 +23,7 @@ - **OpenVINO** - update to `torch 2.2.0` - add `--theme` cli param to force theme on startup + - add `--allow-paths` cli param to add additional paths that are allowed to be accessed via web, thanks @OuticNZ - **wiki**: - updated benchmark notes for IPEX and Olive - **fixes**: @@ -32,6 +33,7 @@ - img2img mask blur and padding - xyz grid handle ip adapter name and scale - lazy loading of image may prevent metadata from being loaded on time + - allow startup without valid models folder - handle extensions that install conflicting versions of packages `onnxruntime`, `opencv2-python` diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 70ceb37df..afe08e84c 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -60,6 +60,7 @@ group.add_argument("--disable-console-progressbars", action='store_true', help=a group.add_argument("--disable-safe-unpickle", action='store_true', help=argparse.SUPPRESS, default=True) group.add_argument("--lowram", action='store_true', help=argparse.SUPPRESS) group.add_argument("--disable-extension-access", default=False, action='store_true', help=argparse.SUPPRESS) +group.add_argument("--allowed-paths", nargs='+', default=[], type=str, required=False, help="add additional paths to paths allowed for web access") group.add_argument("--api", help=argparse.SUPPRESS, default=True) group.add_argument("--api-auth", type=str, help=argparse.SUPPRESS, default=None) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index ae668d11a..a17012719 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -10,7 +10,7 @@ from io import StringIO from PIL import Image import numpy as np import gradio as gr -from modules import shared, errors, scripts, images, sd_samplers, processing, sd_models, sd_vae +from modules import shared, errors, scripts, images, sd_samplers, processing, sd_models, sd_vae, ipadapter from modules.ui_components import ToolButton import modules.ui_symbols as symbols @@ -273,7 +273,7 @@ axis_options = [ AxisOption("[FreeU] 2nd stage backbone factor", float, apply_setting('freeu_b2')), AxisOption("[FreeU] 1st stage skip factor", float, apply_setting('freeu_s1')), AxisOption("[FreeU] 2nd stage skip factor", float, apply_setting('freeu_s2')), - AxisOption("[IP adapter] Name", str, apply_field('ip_adapter_name'), cost=1.0), + AxisOption("[IP adapter] Name", str, apply_field('ip_adapter_name'), cost=1.0, choices=lambda: list(ipadapter.ADAPTERS)), AxisOption("[IP adapter] Scale", float, apply_field('ip_adapter_scale')), ] diff --git a/webui.py b/webui.py index 17e2bb899..c454999a8 100644 --- a/webui.py +++ b/webui.py @@ -246,6 +246,8 @@ def start_ui(): allowed_paths = [os.path.dirname(__file__)] if cmd_opts.data_dir is not None and os.path.isdir(cmd_opts.data_dir): allowed_paths.append(cmd_opts.data_dir) + if cmd_opts.allowed_paths is not None: + allowed_paths += [p for p in cmd_opts.allowed_paths if os.path.isdir(p)] shared.log.debug(f'Root paths: {allowed_paths}') with contextlib.redirect_stdout(stdout): app, local_url, share_url = shared.demo.launch( # app is FastAPI(Starlette) instance diff --git a/wiki b/wiki index 581d85a87..d5fe235e4 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 581d85a87f7fe24963210c7d6f88e571660e0777 +Subproject commit d5fe235e49e0f85af20b8f323ca19c21791f6f9f