add allowed paths cli param

This commit is contained in:
Vladimir Mandic
2024-02-10 08:46:17 -05:00
parent bf14e6ed6d
commit 8ec457c307
5 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -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`
+1
View File
@@ -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)
+2 -2
View File
@@ -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')),
]
+2
View File
@@ -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
+1 -1
Submodule wiki updated: 581d85a87f...d5fe235e49