Merge pull request #26 from tsukimiya/add-insecure-extension-access

added gradio-auth and insecure-extension-access settings.
This commit is contained in:
Cyberes 2022-11-09 23:54:53 -07:00 committed by GitHub
commit 26e79282f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -102,11 +102,12 @@
"gradio_port = False # Launch Gradio on a specific port. Set to False to let Gradio choose a port.\n", "gradio_port = False # Launch Gradio on a specific port. Set to False to let Gradio choose a port.\n",
" # This disables online Gradio app mode and you will only be able to access it on your local network.\n", " # This disables online Gradio app mode and you will only be able to access it on your local network.\n",
"\n", "\n",
"activate_extensions = False # Force enable extensions tab.\n", "gradio_auth = False # Enable gradio_auth and insecure-extension-access option.\n",
" # Set to \"me:password\" to let Gradio auth.\n",
"\n", "\n",
"# ===============================================================\n", "# ===============================================================\n",
"# Save variables to Jupiter's temp storage so we can access it even if the kernel restarts.\n", "# Save variables to Jupiter's temp storage so we can access it even if the kernel restarts.\n",
"%store symlink_to_notebooks model_storage_dir repo_storage_dir activate_xformers link_novelai_anime_vae download_scripts activate_deepdanbooru activate_medvram disable_pickle_check gradio_port activate_extensions" "%store symlink_to_notebooks model_storage_dir repo_storage_dir activate_xformers link_novelai_anime_vae download_scripts activate_deepdanbooru activate_medvram disable_pickle_check gradio_port gradio_auth"
] ]
}, },
{ {
@ -807,7 +808,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"%store -r model_storage_dir repo_storage_dir activate_xformers activate_deepdanbooru activate_medvram disable_pickle_check gradio_port activate_extensions\n", "%store -r model_storage_dir repo_storage_dir activate_xformers activate_deepdanbooru activate_medvram disable_pickle_check gradio_port gradio_auth\n",
"%cd \"{repo_storage_dir}/stable-diffusion-webui\"\n", "%cd \"{repo_storage_dir}/stable-diffusion-webui\"\n",
"\n", "\n",
"# Enable optional args automatically based on settings\n", "# Enable optional args automatically based on settings\n",
@ -816,10 +817,10 @@
"mvram_arg = '--medvram' if activate_medvram else ''\n", "mvram_arg = '--medvram' if activate_medvram else ''\n",
"pickled = '--disable-safe-unpickle' if disable_pickle_check else ''\n", "pickled = '--disable-safe-unpickle' if disable_pickle_check else ''\n",
"port = f'--port {gradio_port}' if gradio_port else '--share'\n", "port = f'--port {gradio_port}' if gradio_port else '--share'\n",
"ext_arg = '--enable-insecure-extension-access' if activate_extensions else ''\n", "auth = f'--gradio-auth {gradio_auth} --enable-insecure-extension-access' if gradio_auth else ''\n",
"\n", "\n",
"# Launch args go below:\n", "# Launch args go below:\n",
"!python webui.py {x_arg} {dd_arg} {mvram_arg} {pickled} {port} {ext_arg} --gradio-debug # --gradio-auth me:password1234" "!python webui.py {x_arg} {dd_arg} {mvram_arg} {pickled} {port} {auth} --gradio-debug"
] ]
}, },
{ {
@ -1060,3 +1061,4 @@
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 4 "nbformat_minor": 4
} }