viyi commited on
Commit
0550903
·
verified ·
1 Parent(s): 47de288

Upload sdwui-start-util.dev.ipynb

Browse files
Files changed (1) hide show
  1. sdwui-start-util.dev.ipynb +68 -0
sdwui-start-util.dev.ipynb CHANGED
@@ -75,6 +75,7 @@
75
  "source": [
76
  "# 内置参数默认值,当上下文有参数时可覆盖默认值\n",
77
  "_runing = False\n",
 
78
  "_useFrpc = locals().get('useFrpc') or globals().get('useFrpc') or True\n",
79
  "\n",
80
  "_useNgrok = locals().get('useNgrok') or globals().get('useNgrok') or True\n",
@@ -139,6 +140,72 @@
139
  "_config_args:dict[str, str] = locals().get('config_args') or globals().get('config_args') or {}"
140
  ]
141
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  {
143
  "cell_type": "code",
144
  "execution_count": null,
@@ -1383,6 +1450,7 @@
1383
  " global envInstalled\n",
1384
  " global huggingface_is_init\n",
1385
  " global _runing\n",
 
1386
  " stop_solo_threads()\n",
1387
  " print('启动...')\n",
1388
  " startTicks = time.time()\n",
 
75
  "source": [
76
  "# 内置参数默认值,当上下文有参数时可覆盖默认值\n",
77
  "_runing = False\n",
78
+ "\n",
79
  "_useFrpc = locals().get('useFrpc') or globals().get('useFrpc') or True\n",
80
  "\n",
81
  "_useNgrok = locals().get('useNgrok') or globals().get('useNgrok') or True\n",
 
140
  "_config_args:dict[str, str] = locals().get('config_args') or globals().get('config_args') or {}"
141
  ]
142
  },
143
+ {
144
+ "cell_type": "code",
145
+ "execution_count": null,
146
+ "metadata": {},
147
+ "outputs": [],
148
+ "source": [
149
+ "def _init_conf():\n",
150
+ " global _useFrpc\n",
151
+ " global _useNgrok\n",
152
+ " global _reLoad\n",
153
+ " global _before_downloading\n",
154
+ " global _async_downloading\n",
155
+ " global _before_start_sync_downloading\n",
156
+ " global _server_port\n",
157
+ " global _sd_git_repo\n",
158
+ " global _sd_config_git_repu\n",
159
+ " global _huggingface_token\n",
160
+ " global _huggingface_repo\n",
161
+ " global _link_instead_of_copy\n",
162
+ " global show_shell_info\n",
163
+ " global _multi_case\n",
164
+ " global _skip_start\n",
165
+ " global _on_before_start\n",
166
+ " global _skip_webui\n",
167
+ " global _proxy_path\n",
168
+ " global _sub_path\n",
169
+ " global _config_args\n",
170
+ " \n",
171
+ " _useFrpc = locals().get('useFrpc') or globals().get('useFrpc') or True\n",
172
+ " _useNgrok = locals().get('useNgrok') or globals().get('useNgrok') or True\n",
173
+ " _reLoad = locals().get('reLoad') or globals().get('reLoad') or False\n",
174
+ " _before_downloading = locals().get('before_downloading') or globals().get('before_downloading') or ''\n",
175
+ " _async_downloading = locals().get('async_downloading') or globals().get('async_downloading') or ''\n",
176
+ " _before_start_sync_downloading = locals().get('before_start_sync_downloading') or globals().get('before_start_sync_downloading') or ''\n",
177
+ " _server_port = locals().get('server_port') or globals().get('server_port') or 7860\n",
178
+ " _sd_git_repo = locals().get('sd_git_repo') or globals().get('sd_git_repo') or 'https://github.com/viyiviyi/stable-diffusion-webui.git -b local' \n",
179
+ " _sd_git_repo = _sd_git_repo\\\n",
180
+ " .replace('{sdwui}','stable-diffusion-webui')\\\n",
181
+ " .replace('{wui}',\"webui\") \n",
182
+ " _sd_config_git_repu = locals().get('sd_config_git_repu') or globals().get('sd_config_git_repu') or 'https://github.com/viyiviyi/sd-configs.git'\n",
183
+ " _sd_config_git_repu = _sd_config_git_repu\\\n",
184
+ " .replace('{sdwui}','stable-diffusion-webui')\\\n",
185
+ " .replace('{wui}',\"webui\")\n",
186
+ " _huggingface_token = locals().get('huggingface_token') or globals().get('huggingface_token') or '{input_path}/configs/huggingface_token.txt'\n",
187
+ " _huggingface_token = _huggingface_token\\\n",
188
+ " .replace('{sdwui}','stable-diffusion-webui')\\\n",
189
+ " .replace('{wui}',\"webui\")\n",
190
+ " _huggingface_repo = locals().get('huggingface_repo') or globals().get('huggingface_repo') or ''\n",
191
+ " _huggingface_repo = _huggingface_repo\\\n",
192
+ " .replace('{sdwui}','stable-diffusion-webui')\\\n",
193
+ " .replace('{wui}',\"webui\")\n",
194
+ " _link_instead_of_copy = locals().get('link_instead_of_copy') or globals().get('link_instead_of_copy') or True\n",
195
+ " show_shell_info = locals().get('hidden_console_info') or globals().get('hidden_console_info')\n",
196
+ " if show_shell_info is None: show_shell_info = False\n",
197
+ " _multi_case = locals().get('multi_case') or globals().get('multi_case') or False\n",
198
+ " _skip_start = locals().get('skip_start') or globals().get('skip_start') or True\n",
199
+ " _on_before_start = locals().get('on_before_start') or globals().get('on_before_start') or before_start \n",
200
+ " _skip_webui = locals().get('skip_webui') or globals().get('skip_webui') or False\n",
201
+ " _proxy_path = locals().get('proxy_path') or globals().get('proxy_path') or {}\n",
202
+ " _sub_path = locals().get('sub_path') or globals().get('sub_path') or ['/','/1/']\n",
203
+ " if len(_sub_path) != 2:\n",
204
+ " _sub_path = ['/','/1/']\n",
205
+ " \n",
206
+ " _config_args:dict[str, str] = locals().get('config_args') or globals().get('config_args') or {}"
207
+ ]
208
+ },
209
  {
210
  "cell_type": "code",
211
  "execution_count": null,
 
1450
  " global envInstalled\n",
1451
  " global huggingface_is_init\n",
1452
  " global _runing\n",
1453
+ " _init_conf()\n",
1454
  " stop_solo_threads()\n",
1455
  " print('启动...')\n",
1456
  " startTicks = time.time()\n",