viyi commited on
Commit
25188f5
1 Parent(s): e8d170d

Upload sdwui-before.ipynb

Browse files
Files changed (1) hide show
  1. sdwui-before.ipynb +1 -1
sdwui-before.ipynb CHANGED
@@ -1 +1 @@
1
- {"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# 配置项 (修改这里的内容后直接启动就行了 run all 或者save version都可以)\n\n---\n\n**主要逻辑已经分离出去了,当有更新时也不需要更新这个文件**\n- 所有的模型列表都支持填文件、文件夹、下载地址\n- **如果需要在google colab运行**\n 1. 改好这个文件后下载下来\n 2. 在cloab新建一个脚本,然后上传这个文件\n 3. 新建单元格后填入```%run sdwui-before.ipynb```,然后直接执行新建的单元格。注意: sdwui-before.ipynb 需要替换成你上传时的文件名","metadata":{"id":"TcLs4cdaLCtB"}},{"cell_type":"code","source":"useGooglrDrive = True # 连接到谷歌云盘 在google colab环境才能开启","metadata":{"id":"swzyZ1_gLCs_","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# 模型列表 一行一个 可以填文件 文件夹 和下载地址,如果需要自定义文件名,在url前写上文件名加:\n模型列表 = '''\nhttps://civitai.com/api/download/models/75587\nhttps://civitai.com/api/download/models/19683\n'''\n# 启动时默认加载的模型名称\nusedCkpt = 'mg-Tender'\nVAE列表 = '''\nhttps://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.safetensors\nhttps://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors\nhttps://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt\n'''\nLora列表 = '''\nhttps://huggingface.co/YoungMasterFromSect/Trauter_LoRAs/resolve/main/LoRA/Genshin-Impact/Yelan/Yelan_Soft.safetensors\nhttps://civitai.com/api/download/models/14856\n'''\nLyCORIS列表 = '''\nhttps://civitai.com/api/download/models/46821\nhttps://huggingface.co/YoungMasterFromSect/Trauter_LoRAs/resolve/main/LoRA/Genshin-Impact/Ganyu/Ganyu_Medium.safetensors\n'''\nhypernetworks列表 = '''\n\n'''\nembeddings列表 = '''\n\n'''\ncontrolNet模型列表 = '''\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_hed-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_mlsd-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_normal-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors\nhttps://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_seg-fp16.safetensors\n'''\n# git仓库\n插件列表='''\nhttps://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git\nhttps://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git\nhttps://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git\nhttps://github.com/Mikubill/sd-webui-controlnet.git\nhttps://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris.git\nhttps://github.com/LianZiZhou/sd-webui-pixink-console.git\nhttps://github.com/ilian6806/stable-diffusion-webui-state.git\nhttps://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git\nhttps://github.com/Bing-su/adetailer.git\n'''\n#文件或直接填配置\nngrok配置或文件地址='''\n/kaggle/input/configs/ngrok_token.txt\n'''\nfrp配置文件或配置='''\n-f **************************:7691619\n'''\nfrpSSL文件='''\n\n'''\n参数列表='''\n--disable-safe-unpickle \n--deepdanbooru \n--no-hashing \n--no-download-sd-model \n--administrator\n--skip-torch-cuda-test \n--skip-version-check \n--disable-nan-check\n--opt-sdp-attention \n--opt-sdp-no-mem-attention \n--xformers-flash-attention\n--xformers\n--api \n--listen\n--lowram\n--no-gradio-queue\n'''\n# --api-auth=2333:6666 --gradio-auth=2333:6666","metadata":{"id":"7tTWVxHDLCtB","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# 手机端界面优化 使用了修改过界面布局顺序的webui,不定期同步到官方版本\nmobileOptimize=True\n# webui的配置文件\nwebui_settings = 'https://github.com/viyiviyi/sd-configs.git'\n# 设置文件路径\nsetting_file = '/kaggle/working/configs/config.json'\nui_config_file = '/kaggle/working/configs/ui-config.json'\n\n# 配置启动参数\nwebuiPort=7860 # webui默认端口\ndisableShared=False # 关闭默认的gradio.live穿透\nonlyApi=False # 无ui界面,仅提供api服务\nquickStart=True # 快速启动 使用下载好的python环境 开启后启动到可用需要4分钟,不开启需要8分钟\nvaeHalf=False # vae开启半精度,关闭效果更好,对速度没啥影响\nmodelHalf=True # 模型开启半精度,关闭效果更好,但生成速度减半\nconsoleProgressbars=False # 控制台显示进度条,关闭可以减少一些输出内容,查看日志时更快一点\nconsolePrompts=False # 同上 \nenableLoadByCopy=False # 是否使用copy的方式加载文件 启动变慢,且测试后没有提高模型切换速度\nenableThread=True # 启用多线程下载插件 依赖 和 模型\n#Ngrok\nuseNgrok=True # 非必填 是否使用ngrok作为公网访问地址\n#Frpc\nuseFrpc=True # 开启frp将不能启动\n\nimport os\nINIT_WORK_PATH = os.environ['HOME']\nif os.getenv('INIT_WORK_PATH',''):\n INIT_WORK_PATH = os.getenv('INIT_WORK_PATH','')\nelse:\n os.environ['INIT_WORK_PATH'] = os.getcwd()\n%cd {INIT_WORK_PATH}","metadata":{"_kg_hide-input":false,"id":"r_lBDJdOLCtB","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"reLoad = True\n# 如果需要重新安装,请注释这一行\nreLoad = False","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!wget https://huggingface.co/viyi/sdwui/resolve/main/sdwui-start.ipynb\n%run sdwui-start.ipynb","metadata":{"scrolled":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n# 打包收藏文件夹 如果需要可以取消下面两行的注释\n# zipPath('$install_path/stable-diffusion-webui/log','log')\n# !mv {output_path}/log.tar {output_path}/log.tar.bak\n# createOrUpdateDataSet(f'{output_path}/log.tar.bak','sd-webui-log-bak')\n\n# 打包 这一行的结果是 压缩一个目录,并放在 output_path: /kaggle/working/ 目录下 名字是训练输出.tar\n# zipPath('$install_path/stable-diffusion-webui/textual_inversion','训练输出') \n# zipPath('$install_path/stable-diffusion-webui/outputs','outputs')\n# zipPath('$install_path/stable-diffusion-webui/venv','venv')\n# !mv {output_path}/venv.tar /kaggle/working/venv.tar.bak\n# createOrUpdateDataSet('/kaggle/working/venv.tar.bak','sd-webui-venv')\n# !tar -cf $output_path/webui.tar.bak --exclude=venv --exclude=extensions -C /kaggle/stable-diffusion-webui/ .","metadata":{"id":"ePT_b-s9LCtF","scrolled":true,"trusted":true},"execution_count":null,"outputs":[]}]}
 
1
+ {"cells":[{"cell_type":"markdown","metadata":{"id":"TcLs4cdaLCtB"},"source":["# 配置项 (修改这里的内容后直接启动就行了 run all 或者save version都可以)\n","\n","---\n","\n","**主要逻辑已经分离出去了,当有更新时也不需要更新这个文件**\n","- 所有的模型列表都支持填文件、文件夹、下载地址\n","- **如果需要在google colab运行**\n"," 1. 改好这个文件后下载下来\n"," 2. 在cloab新建一个脚本,然后上传这个文件\n"," 3. 新建单元格后填入```%run sdwui-before.ipynb```,然后直接执行新建的单元格。注意: sdwui-before.ipynb 需要替换成你上传时的文件名"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"swzyZ1_gLCs_","trusted":true},"outputs":[],"source":["useGooglrDrive = True # 连接到谷歌云盘 在google colab环境才能开启"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"7tTWVxHDLCtB","trusted":true},"outputs":[],"source":["# 模型列表 一行一个 可以填文件 文件夹 和下载地址,如果需要自定义文件名,在url前写上文件名加:\n","模型列表 = '''\n","https://civitai.com/api/download/models/75587\n","'''\n","# 启动时默认加载的模型名称\n","usedCkpt = 'mg-Tender'\n","VAE列表 = '''\n","https://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.safetensors\n","https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors\n","https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt\n","'''\n","Lora列表 = '''\n","https://civitai.com/api/download/models/14856\n","'''\n","LyCORIS列表 = '''\n","https://civitai.com/api/download/models/46821\n","'''\n","hypernetworks列表 = '''\n","\n","'''\n","embeddings列表 = '''\n","\n","'''\n","controlNet模型列表 = '''\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_hed-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_mlsd-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_normal-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors\n","https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_seg-fp16.safetensors\n","'''\n","# git仓库\n","插件列表='''\n","https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git\n","https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git\n","https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git\n","https://github.com/Mikubill/sd-webui-controlnet.git\n","https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris.git\n","https://github.com/LianZiZhou/sd-webui-pixink-console.git\n","https://github.com/ilian6806/stable-diffusion-webui-state.git\n","https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git\n","https://github.com/Bing-su/adetailer.git\n","https://github.com/viyiviyi/filter-empty-prompts.git\n","https://github.com/civitai/sd_civitai_extension.git\n","https://github.com/zanllp/sd-webui-infinite-image-browsing.git\n","'''\n","#文件或直接填配置\n","ngrok配置或文件地址='''\n","/kaggle/input/configs/ngrok_token.txt\n","'''\n","frp配置文件或配置='''\n","-f **************************:7691619\n","'''\n","frpSSL文件='''\n","\n","'''\n","参数列表='''\n","--disable-safe-unpickle \n","--deepdanbooru \n","--no-hashing \n","--no-download-sd-model \n","--administrator\n","--skip-torch-cuda-test \n","--skip-version-check \n","--disable-nan-check\n","--opt-sdp-attention \n","--opt-sdp-no-mem-attention \n","--xformers-flash-attention\n","--xformers\n","--api \n","--listen\n","--lowram\n","--no-gradio-queue\n","'''\n","# --api-auth=2333:6666 --gradio-auth=2333:6666"]},{"cell_type":"code","execution_count":null,"metadata":{"_kg_hide-input":false,"id":"r_lBDJdOLCtB","trusted":true},"outputs":[],"source":["# 手机端界面优化 使用了修改过界面布局顺序的webui,不定期同步到官方版本\n","mobileOptimize=True\n","# webui的配置文件\n","webui_settings = 'https://github.com/viyiviyi/sd-configs.git'\n","# 设置文件路径\n","setting_file = '/kaggle/working/configs/config.json'\n","ui_config_file = '/kaggle/working/configs/ui-config.json'\n","\n","# 配置启动参数\n","webuiPort=7860 # webui默认端口\n","disableShared=False # 关闭默认的gradio.live穿透\n","onlyApi=False # 无ui界面,仅提供api服务\n","quickStart=True # 快速启动 使用下载好的python环境 开启后启动到可用需要4分钟,不开启需要8分钟\n","vaeHalf=False # vae开启半精度,关闭效果更好,对速度没啥影响\n","modelHalf=True # 模型开启半精度,关闭效果更好,但生成速度减半\n","consoleProgressbars=False # 控制台显示进度条,关闭可以减少一些输出内容,查看日志时更快一点\n","consolePrompts=False # 同上 \n","enableLoadByCopy=False # 是否使用copy的方式加载文件 启动变慢,且测试后没有提高模型切换速度\n","enableThread=True # 启用多线程下载插件 依赖 和 模型\n","#Ngrok\n","useNgrok=True # 非必填 是否使用ngrok作为公网访问地址\n","#Frpc\n","useFrpc=True # 开启frp将不能启动\n","\n","import os\n","INIT_WORK_PATH = os.environ['HOME']\n","if os.getenv('INIT_WORK_PATH',''):\n"," INIT_WORK_PATH = os.getenv('INIT_WORK_PATH','')\n","else:\n"," os.environ['INIT_WORK_PATH'] = os.getcwd()\n","%cd {INIT_WORK_PATH}"]},{"cell_type":"code","execution_count":null,"metadata":{"trusted":true},"outputs":[],"source":["reLoad = True\n","# 如果需要重新安装,请注释这一行\n","reLoad = False"]},{"cell_type":"code","execution_count":null,"metadata":{"scrolled":true,"trusted":true},"outputs":[],"source":["!wget https://huggingface.co/viyi/sdwui/resolve/main/sdwui-start.ipynb\n","%run sdwui-start.ipynb"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"ePT_b-s9LCtF","scrolled":true,"trusted":true},"outputs":[],"source":["\n","# 打包收藏文件夹 如果需要可以取消下面两行的注释\n","# zipPath('$install_path/stable-diffusion-webui/log','log')\n","# !mv {output_path}/log.tar {output_path}/log.tar.bak\n","# createOrUpdateDataSet(f'{output_path}/log.tar.bak','sd-webui-log-bak')\n","\n","# 打包 这一行的结果是 压缩一个目录,并放在 output_path: /kaggle/working/ 目录下 名字是训练输出.tar\n","# zipPath('$install_path/stable-diffusion-webui/textual_inversion','训练输出') \n","# zipPath('$install_path/stable-diffusion-webui/outputs','outputs')\n","# zipPath('$install_path/stable-diffusion-webui/venv','venv')\n","# !mv {output_path}/venv.tar /kaggle/working/venv.tar.bak\n","# createOrUpdateDataSet('/kaggle/working/venv.tar.bak','sd-webui-venv')\n","# !tar -cf $output_path/webui.tar.bak --exclude=venv --exclude=extensions -C /kaggle/stable-diffusion-webui/ ."]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.7.12"}},"nbformat":4,"nbformat_minor":4}