From 07e75048767d45400ed2c6577ec70724bf22893b Mon Sep 17 00:00:00 2001 From: tsukimiya <71832+tsukimiya@users.noreply.github.com> Date: Wed, 9 Nov 2022 21:20:48 +0900 Subject: [PATCH 1/3] added gradio-auth and insecure-extension-access settings. --- StableDiffusionUI_Voldemort_paperspace.ipynb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb index 5dff55f..0ad9963 100644 --- a/StableDiffusionUI_Voldemort_paperspace.ipynb +++ b/StableDiffusionUI_Voldemort_paperspace.ipynb @@ -101,10 +101,13 @@ "\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", - " \n", + "\n", + "gradio_auth = False # Enable gradio_auth and insecure-extension-access option.\n", + " # Set to \"me:password\" to let Gradio auth.\n", + "\n", "# ===============================================================\n", "# Save variables to Jupiter's temp storage so we can access it even if the kernel restarts.\n", - "%store free_tier model_storage_dir repo_storage_dir activate_xformers link_novelai_anime_vae download_scripts activate_deepdanbooru activate_medvram disable_pickle_check gradio_port xformers_leave_cuda" + "%store free_tier model_storage_dir repo_storage_dir activate_xformers link_novelai_anime_vae download_scripts activate_deepdanbooru activate_medvram disable_pickle_check gradio_port xformers_leave_cuda gradio_auth" ] }, { @@ -826,9 +829,10 @@ "mvram_arg = '--medvram' if activate_medvram else ''\n", "pickled = '--disable-safe-unpickle' if disable_pickle_check else ''\n", "port = f'--port {gradio_port}' if gradio_port else '--share'\n", + "auth = f'--gradio-auth {gradio_auth} --enable-insecure-extension-access' if gradio_auth else ''\n", "\n", "# Launch args go below:\n", - "!python webui.py {x_arg} {dd_arg} {mvram_arg} {pickled} {port} --gradio-debug # --gradio-auth me:password1234" + "!python webui.py {x_arg} {dd_arg} {mvram_arg} {pickled} {port} --gradio-debug {auth}" ] }, { From 32883d7fcf6342fdd9f0c84e7e68909ca39911c8 Mon Sep 17 00:00:00 2001 From: tsukimiya <71832+tsukimiya@users.noreply.github.com> Date: Thu, 10 Nov 2022 12:49:43 +0900 Subject: [PATCH 2/3] forgot to read the gradio_auth option before starting the WEB UI --- StableDiffusionUI_Voldemort_paperspace.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb index 0ad9963..2f9652a 100644 --- a/StableDiffusionUI_Voldemort_paperspace.ipynb +++ b/StableDiffusionUI_Voldemort_paperspace.ipynb @@ -820,7 +820,7 @@ }, "outputs": [], "source": [ - "%store -r model_storage_dir repo_storage_dir activate_xformers activate_deepdanbooru activate_medvram disable_pickle_check gradio_port\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", "\n", "# Enable optional args automatically based on settings\n", From 3a69fc020e3261bd63b244fc029f0b26f0fd47af Mon Sep 17 00:00:00 2001 From: Cyberes <64224601+Cyberes@users.noreply.github.com> Date: Wed, 9 Nov 2022 23:54:40 -0700 Subject: [PATCH 3/3] missed a few things while merging --- StableDiffusionUI_Voldemort_paperspace.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb index 452afb5..a08cd5b 100644 --- a/StableDiffusionUI_Voldemort_paperspace.ipynb +++ b/StableDiffusionUI_Voldemort_paperspace.ipynb @@ -107,7 +107,7 @@ "\n", "# ===============================================================\n", "# Save variables to Jupiter's temp storage so we can access it even if the kernel restarts.\n", - "%store free_tier 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" + "%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" ] }, { @@ -1061,3 +1061,4 @@ "nbformat": 4, "nbformat_minor": 4 } +