Skip to content

Commit

Permalink
fix default value
Browse files Browse the repository at this point in the history
  • Loading branch information
ddPn08 committed Jan 22, 2023
1 parent 2d57d60 commit dba998d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions automatic1111.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"# @markdown Get huggingface access token from [here](https://huggingface.co/settings/tokens)\n",
"auth_token = \"\" # @param {type:\"string\"}\n",
"\n",
"download_if_missing = True # @param {type:\"boolean\"}\n",
"download_if_missing = False # @param {type:\"boolean\"}\n",
"# @markdown If you use the SD 2.1 model, select its config from the dropdown\n",
"model = \"https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt\" #@param [\"https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-float16.ckpt\", \"https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt\", \"https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt\", \"https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt\"] {allow-input: true}\n",
"model_filename = \"\" # @param {type:\"string\"}\n",
Expand All @@ -129,7 +129,7 @@
"\n",
"\n",
"# @markdown **Optional | Use Google Drive**\n",
"mount_google_drive = False # @param {type:\"boolean\"}\n",
"mount_google_drive = True # @param {type:\"boolean\"}\n",
"force_model_download_locally = False # @param {type:\"boolean\"}\n",
"force_remount = False # @param {type:\"boolean\"}\n",
"\n",
Expand Down Expand Up @@ -161,13 +161,14 @@
"extensions_file_path = f\"{data_dir}/extensions.txt\"\n",
"\n",
"if force_model_download_locally:\n",
" models_path = \"./models\"\n",
" models_path = \"/content/models\"\n",
"\n",
"os.makedirs(models_path, exist_ok=True)\n",
"os.makedirs(output_path, exist_ok=True)\n",
"os.makedirs(config_path, exist_ok=True)\n",
"os.makedirs(scripts_path, exist_ok=True)\n",
"os.makedirs(f\"{models_path}/Stable-diffusion\", exist_ok=True)\n",
"os.makedirs(f\"{models_path}/VAE\", exist_ok=True)\n",
"\n",
"for script in os.listdir(scripts_path):\n",
" ! rm -Rf stable-diffusion-webui/scripts/{script} && ln -s {scripts_path}/{script} stable-diffusion-webui/scripts/{script}\n",
Expand Down Expand Up @@ -221,7 +222,6 @@
},
"outputs": [],
"source": [
"# @markdown \n",
"# @markdown ## Command line arguments\n",
"\n",
"import os\n",
Expand All @@ -236,7 +236,7 @@
"xformers = True # @param {type:\"boolean\"}\n",
"disable_opt_split_attention = False # @param {type:\"boolean\"}\n",
"\n",
"# @markdown \n",
"# @markdown <br >\n",
"custom_arguments = \"\" # @param {type:\"string\"}\n",
"\n",
"run_string_with_variables = {\n",
Expand All @@ -258,7 +258,8 @@
"\n",
"# @markdown ## Enable password authentication (Prevent other users from using the WebUI)\n",
"\n",
"# @markdown \n",
"# @markdown <br >\n",
"\n",
"use_gradio_auth = False # @param {type:\"boolean\"}\n",
"gradio_auth_username = \"username\" # @param {type:\"string\"}\n",
"gradio_auth_password = \"password\" # @param {type:\"string\"}\n",
Expand Down Expand Up @@ -329,6 +330,8 @@
" vars += \" --share\"\n",
"elif ngrok_auth_token and ngrok_region:\n",
" vars += f\" --ngrok {ngrok_auth_token} --ngrok-region {ngrok_region}\"\n",
"elif not ngrok_auth_token or not ngrok_region:\n",
" vars += \"--share\"\n",
"\n",
"if use_gradio_auth:\n",
" vars += f\" --gradio-auth {gradio_auth_username}:{gradio_auth_password}\"\n",
Expand Down Expand Up @@ -504,17 +507,17 @@
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3",
"display_name": "automatic",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]"
"version": "3.10.0 | packaged by conda-forge | (default, Nov 10 2021, 13:20:59) [MSC v.1916 64 bit (AMD64)]"
},
"vscode": {
"interpreter": {
"hash": "607db476e417971f05b607c2dd14e77ee8262c2c4c20dea422522c60605a222a"
"hash": "27f3fb6862b547830c34fbd0390b87507e21782526fd5ca25cfe7dc4f2b0fdae"
}
}
},
Expand Down

0 comments on commit dba998d

Please sign in to comment.