crystantine commited on
Commit
174a236
1 Parent(s): 11554a8

Upload 29 files

Browse files
Files changed (29) hide show
  1. miaoshouai-assistant/.gitignore +22 -0
  2. miaoshouai-assistant/.gitmodules +3 -0
  3. miaoshouai-assistant/LICENSE +201 -0
  4. miaoshouai-assistant/README.md +58 -0
  5. miaoshouai-assistant/README_CN.md +55 -0
  6. miaoshouai-assistant/configs/controlnet.json +698 -0
  7. miaoshouai-assistant/configs/hugging_face.json +198 -0
  8. miaoshouai-assistant/configs/model_hash.json +671 -0
  9. miaoshouai-assistant/configs/official_models.json +594 -0
  10. miaoshouai-assistant/configs/settings.json +20 -0
  11. miaoshouai-assistant/configs/webui-macos-env.sh +19 -0
  12. miaoshouai-assistant/configs/webui-user-launch.bat +10 -0
  13. miaoshouai-assistant/configs/webui-user.sh +47 -0
  14. miaoshouai-assistant/install.py +31 -0
  15. miaoshouai-assistant/requirements.txt +8 -0
  16. miaoshouai-assistant/scripts/assistant/__init__.py +1 -0
  17. miaoshouai-assistant/scripts/assistant/miaoshou.py +462 -0
  18. miaoshouai-assistant/scripts/download/__init__.py +1 -0
  19. miaoshouai-assistant/scripts/download/msai_downloader_manager.py +251 -0
  20. miaoshouai-assistant/scripts/download/msai_file_downloader.py +222 -0
  21. miaoshouai-assistant/scripts/main.py +27 -0
  22. miaoshouai-assistant/scripts/msai_logging/__init__.py +1 -0
  23. miaoshouai-assistant/scripts/msai_logging/msai_logger.py +100 -0
  24. miaoshouai-assistant/scripts/msai_utils/__init__.py +1 -0
  25. miaoshouai-assistant/scripts/msai_utils/msai_singleton.py +8 -0
  26. miaoshouai-assistant/scripts/msai_utils/msai_toolkit.py +88 -0
  27. miaoshouai-assistant/scripts/runtime/__init__.py +5 -0
  28. miaoshouai-assistant/scripts/runtime/msai_prelude.py +209 -0
  29. miaoshouai-assistant/scripts/runtime/msai_runtime.py +1232 -0
miaoshouai-assistant/.gitignore ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # for vim
2
+ .~
3
+ .*.swp
4
+ *~
5
+
6
+ # for MacOS
7
+ .DS_Store
8
+
9
+ __pycache__/
10
+
11
+ .idea/
12
+
13
+ logs/
14
+ flagged/
15
+
16
+ configs/civitai_models.json
17
+ configs/liandange_models.json
18
+ configs/gpt_index.json
19
+ configs/model_hash.json
20
+ covers/*
21
+ cache/*
22
+ assets
miaoshouai-assistant/.gitmodules ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [submodule "assets"]
2
+ path = assets
3
+ url = https://e.coding.net/miaoshouai/miaoshou-stable-diffusion-webui/assets.git
miaoshouai-assistant/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2023] [miaoshou ai]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
miaoshouai-assistant/README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # miaoshouai-assistant
2
+
3
+ [English](README.md) / [中文](README_CN.md)
4
+
5
+ MiaoshouAI Assistant for [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
6
+
7
+ 1.6 Add VRAM garbage collection for image generation so that VRAM is freed up after every run; if your run into out of memory, just go to Boot Assistant and click "VRAM Release" to free up the memory.
8
+ 1.5 Rewrote how assets are loaded to largely reduce the size and installation time for the extension. (extension reinstall is needed for this version and up). Added download covers for all models.
9
+ 1.4 Add new feature for using GPT to generate prompts. Fixed sub folder support for model management</br>
10
+ 1.3 Add support for LyCoris(just put them in the lora folder, <a herf="">LyCoris extension</a> is needed.); Cleanup work for git to reduce project size</br>
11
+ 1.2 Add support for model search. Allow model to load directly from model management. Now you can update model source directly under update tab.</br>
12
+ 1.1 Add support for Lora, embedding and hypernetwork models under model manangement. bug fixes.
13
+
14
+ ### Installation
15
+ In Automatic1111 WebUI, go to `Extensions Tab`->`Install from URL`, copy the following address in "**URL for extension's git repository**".
16
+
17
+ ```sh
18
+ https://github.com/miaoshouai/miaoshouai-assistant.git
19
+ ```
20
+
21
+ Click `Install`, wait until it's done. Go to `Settings`-> `Reload UI`
22
+
23
+ ### Usage
24
+
25
+ ##### Boot Assistant
26
+
27
+ <p align="center">
28
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/boot_assistant_en.png"/>
29
+ </p>
30
+
31
+ - Allows you to change your webui boot settings including:
32
+ GPU optimization, UI Theme, enable port listening, xformers, auto launch, etc.
33
+
34
+ - Allows you to save all your settings to your webui-user.bat/other boot script for your webui.
35
+
36
+ ##### Model Management
37
+
38
+ <p align="center">
39
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/model_manager_en.png"/>
40
+ </p>
41
+
42
+ - Allows you to view all your models and view the model civitai prompts and parameters from the covers.
43
+ You can easily send these civitai prompts to txt2img/img2img/inpainting/extra
44
+
45
+ ##### Model Downloader
46
+
47
+ <p align="center">
48
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/model_downloader.gif"/>
49
+ </p>
50
+
51
+ - Allows you to search and download models from civitai.com or liandange.com, find the model type you want
52
+
53
+ <p align="center">
54
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/controlnet_download.gif"/>
55
+ </p>
56
+
57
+ - It also allows you to find 1.5, 2.1 official models, controlnet models or different vae models.
58
+
miaoshouai-assistant/README_CN.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 喵手助理
2
+ [English](README.md) / [中文](README_CN.md)
3
+
4
+ 喵手助理 [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
5
+
6
+ 1.6 增加了显存自动清理功能。在启动助手中启用后可以在每次生图后自动清理显存。
7
+ 1.5 重构了assets的读取方式,大幅减少了下载时间和插件大小(使用1.5+版本需要重新安装); 增加了一键下载封面功能。
8
+ 1.4 添加了使用GPT来生成咒语的功能; 修复了模型管理中对子文件夹的支持。
9
+ 1.3 增加了模型下载和管理功能中对LyCoris的支持(你需要将LoCoris模型放置在Lora目录下, 需要安装<a herf="https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris"> LyCoris插件 </a>)</br>
10
+ 1.2 增加了模型搜索功能,可以直接在模型管理下load模型,增加了插件和模型源更新功能。</br>
11
+ 1.1 模型管理下增加了对Lora, embedding and hypernetwork等模型的支持。修复了启动时与秋叶启动器的冲突。
12
+
13
+ ### 安装
14
+ 在 Automatic1111 WebUI 中,前往 `扩展插件`-> `从URL安装`,在`扩展插件的git仓库网址`中复制以下地址。
15
+
16
+ ```sh
17
+ https://github.com/miaoshouai/miaoshouai-assistant.git
18
+ ```
19
+
20
+ 点击`安装`,等待安装完成。然后前往`设置` -> `重新加载界面`
21
+
22
+ ### 使用方法
23
+ ##### 启动助手
24
+
25
+ <p align="center">
26
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/boot_assistant_en.png"/>
27
+ </p>
28
+
29
+ - 允许您更改 WebUI 启动设置,包括:
30
+ GPU 优化、UI 主题、启用端口监听、xformers、自动启动等。
31
+
32
+ - 允许您将所有设置保存到 webui-user.bat/其他启动脚本。
33
+
34
+ ##### 模型管理
35
+
36
+ <p align="center">
37
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/model_manager.png"/>
38
+ </p>
39
+
40
+ - 允许您查看所有模型,并从封面查看模型 civitai 提示和参数。
41
+ 您可以非常容易的将 civitai 提示词发送到 txt2img/img2img/inpainting/extra
42
+
43
+ ##### 模型下载器
44
+
45
+ <p align="center">
46
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/model_downloader.gif"/>
47
+ </p>
48
+
49
+ - 允许您从 civitai.com 或 liandange.com 搜索和下载模型,找到您想要的模型类型
50
+
51
+ <p align="center">
52
+ <img src="https://msdn.miaoshouai.com/msai/kt/ez/controlnet_download.gif"/>
53
+ </p>
54
+
55
+ - 喵手助理还能让您找到 1.5, 2.1 的官方模型、controlnet 模型以及不同的 vae 模型。
miaoshouai-assistant/configs/controlnet.json ADDED
@@ -0,0 +1,698 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": 1,
4
+ "name": "Controlnet 1.0",
5
+ "description": "<p>This repository hosts pruned .safetensors modules of ControlNet, by lllyasviel and T2I-Adapters, TencentARC Team\n\nThe modules are meant for this extension for AUTOMATIC1111/stable-diffusion-webui, but should work for different webuis too if they have it implemented. cheers!\uD83E\uDD42</p></li></ol>",
6
+ "type": "Controlnet",
7
+ "poi": false,
8
+ "nsfw": false,
9
+ "allowNoCredit": true,
10
+ "allowCommercialUse": "Rent",
11
+ "allowDerivatives": true,
12
+ "allowDifferentLicense": true,
13
+ "stats": {
14
+ "downloadCount": 865,
15
+ "favoriteCount": 190,
16
+ "commentCount": 7,
17
+ "ratingCount": 2,
18
+ "rating": 5
19
+ },
20
+ "creator": {
21
+ "username": "lllyasviel",
22
+ "image": "https://huggingface.co/webui/ControlNet-modules-safetensors"
23
+ },
24
+ "tags": [],
25
+ "modelVersions": [
26
+ {
27
+ "id": 1,
28
+ "modelId": 7019,
29
+ "name": "Controlnet 1.0",
30
+ "createdAt": "2023-02-06T13:52:34.605Z",
31
+ "updatedAt": "2023-02-06T13:52:34.605Z",
32
+ "trainedWords": [],
33
+ "baseModel": "SD 1.5",
34
+ "earlyAccessTimeFrame": 0,
35
+ "description": "<p></p>",
36
+ "files": [
37
+ {
38
+ "name": "control_canny-fp16.safetensors",
39
+ "id": 1,
40
+ "sizeKB": 161261.130859375,
41
+ "type": "Model",
42
+ "format": "Pth",
43
+ "pickleScanResult": "Success",
44
+ "pickleScanMessage": "No Pickle imports",
45
+ "virusScanResult": "Success",
46
+ "scannedAt": "2023-02-06T13:55:58.281Z",
47
+ "hashes": {
48
+ "AutoV2": "833E816807",
49
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
50
+ "CRC32": "87F68C12",
51
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
52
+ },
53
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors",
54
+ "primary": false
55
+ },
56
+ {
57
+ "name": "control_depth-fp16.safetensors",
58
+ "id": 2,
59
+ "sizeKB": 741261.130859375,
60
+ "type": "Model",
61
+ "format": "Pth",
62
+ "pickleScanResult": "Success",
63
+ "pickleScanMessage": "No Pickle imports",
64
+ "virusScanResult": "Success",
65
+ "scannedAt": "2023-02-06T13:55:58.281Z",
66
+ "hashes": {
67
+ "AutoV2": "833E816807",
68
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
69
+ "CRC32": "87F68C12",
70
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
71
+ },
72
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors",
73
+ "primary": true
74
+ },
75
+ {
76
+ "name": "control_hed-fp16.safetensors",
77
+ "id": 3,
78
+ "sizeKB": 741261.130859375,
79
+ "type": "Model",
80
+ "format": "Pth",
81
+ "pickleScanResult": "Success",
82
+ "pickleScanMessage": "No Pickle imports",
83
+ "virusScanResult": "Success",
84
+ "scannedAt": "2023-02-06T13:55:58.281Z",
85
+ "hashes": {
86
+ "AutoV2": "833E816807",
87
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
88
+ "CRC32": "87F68C12",
89
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
90
+ },
91
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_hed-fp16.safetensors",
92
+ "primary": false
93
+ },
94
+ {
95
+ "name": "control_mlsd-fp16.safetensors",
96
+ "id": 4,
97
+ "sizeKB": 741261.130859375,
98
+ "type": "Model",
99
+ "format": "Pth",
100
+ "pickleScanResult": "Success",
101
+ "pickleScanMessage": "No Pickle imports",
102
+ "virusScanResult": "Success",
103
+ "scannedAt": "2023-02-06T13:55:58.281Z",
104
+ "hashes": {
105
+ "AutoV2": "833E816807",
106
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
107
+ "CRC32": "87F68C12",
108
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
109
+ },
110
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_mlsd-fp16.safetensors",
111
+ "primary": false
112
+ },
113
+ {
114
+ "name": "control_normal-fp16.safetensors",
115
+ "id": 5,
116
+ "sizeKB": 741261.130859375,
117
+ "type": "Model",
118
+ "format": "Checkpoint",
119
+ "pickleScanResult": "Success",
120
+ "pickleScanMessage": "No Pickle imports",
121
+ "virusScanResult": "Success",
122
+ "scannedAt": "2023-02-06T13:55:58.281Z",
123
+ "hashes": {
124
+ "AutoV2": "833E816807",
125
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
126
+ "CRC32": "87F68C12",
127
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
128
+ },
129
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_normal-fp16.safetensors",
130
+ "primary": false
131
+ },
132
+ {
133
+ "name": "control_openpose-fp16.safetensors",
134
+ "id": 6,
135
+ "sizeKB": 741261.130859375,
136
+ "type": "Model",
137
+ "format": "Checkpoint",
138
+ "pickleScanResult": "Success",
139
+ "pickleScanMessage": "No Pickle imports",
140
+ "virusScanResult": "Success",
141
+ "scannedAt": "2023-02-06T13:55:58.281Z",
142
+ "hashes": {
143
+ "AutoV2": "833E816807",
144
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
145
+ "CRC32": "87F68C12",
146
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
147
+ },
148
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors",
149
+ "primary": false
150
+ },
151
+ {
152
+ "name": "control_scribble-fp16.safetensors",
153
+ "id": 7,
154
+ "sizeKB": 741261.130859375,
155
+ "type": "Model",
156
+ "format": "Checkpoint",
157
+ "pickleScanResult": "Success",
158
+ "pickleScanMessage": "No Pickle imports",
159
+ "virusScanResult": "Success",
160
+ "scannedAt": "2023-02-06T13:55:58.281Z",
161
+ "hashes": {
162
+ "AutoV2": "833E816807",
163
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
164
+ "CRC32": "87F68C12",
165
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
166
+ },
167
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors",
168
+ "primary": false
169
+ },
170
+ {
171
+ "name": "control_seg-fp16.safetensors",
172
+ "id": 8,
173
+ "sizeKB": 161261.130859375,
174
+ "type": "Model",
175
+ "format": "Checkpoint",
176
+ "pickleScanResult": "Success",
177
+ "pickleScanMessage": "No Pickle imports",
178
+ "virusScanResult": "Success",
179
+ "scannedAt": "2023-02-06T13:55:58.281Z",
180
+ "hashes": {
181
+ "AutoV2": "833E816807",
182
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
183
+ "CRC32": "87F68C12",
184
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
185
+ },
186
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_seg-fp16.safetensors",
187
+ "primary": false
188
+ },
189
+ {
190
+ "name": "t2iadapter_canny-fp16.safetensors",
191
+ "id": 9,
192
+ "sizeKB": 38261.130859375,
193
+ "type": "Model",
194
+ "format": "Checkpoint",
195
+ "pickleScanResult": "Success",
196
+ "pickleScanMessage": "No Pickle imports",
197
+ "virusScanResult": "Success",
198
+ "scannedAt": "2023-02-06T13:55:58.281Z",
199
+ "hashes": {
200
+ "AutoV2": "833E816807",
201
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
202
+ "CRC32": "87F68C12",
203
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
204
+ },
205
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_canny-fp16.safetensors",
206
+ "primary": false
207
+ },
208
+ {
209
+ "name": "t2iadapter_color-fp16.safetensors",
210
+ "id": 10,
211
+ "sizeKB": 161261.130859375,
212
+ "type": "Model",
213
+ "format": "Checkpoint",
214
+ "pickleScanResult": "Success",
215
+ "pickleScanMessage": "No Pickle imports",
216
+ "virusScanResult": "Success",
217
+ "scannedAt": "2023-02-06T13:55:58.281Z",
218
+ "hashes": {
219
+ "AutoV2": "833E816807",
220
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
221
+ "CRC32": "87F68C12",
222
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
223
+ },
224
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_color-fp16.safetensors",
225
+ "primary": false
226
+ },
227
+ {
228
+ "name": "t2iadapter_depth-fp16.safetensors",
229
+ "id": 11,
230
+ "sizeKB": 161261.130859375,
231
+ "type": "Model",
232
+ "format": "Checkpoint",
233
+ "pickleScanResult": "Success",
234
+ "pickleScanMessage": "No Pickle imports",
235
+ "virusScanResult": "Success",
236
+ "scannedAt": "2023-02-06T13:55:58.281Z",
237
+ "hashes": {
238
+ "AutoV2": "833E816807",
239
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
240
+ "CRC32": "87F68C12",
241
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
242
+ },
243
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_depth-fp16.safetensors",
244
+ "primary": false
245
+ },
246
+ {
247
+ "name": "t2iadapter_keypose-fp16.safetensors",
248
+ "id": 12,
249
+ "sizeKB": 161261.130859375,
250
+ "type": "Model",
251
+ "format": "Checkpoint",
252
+ "pickleScanResult": "Success",
253
+ "pickleScanMessage": "No Pickle imports",
254
+ "virusScanResult": "Success",
255
+ "scannedAt": "2023-02-06T13:55:58.281Z",
256
+ "hashes": {
257
+ "AutoV2": "833E816807",
258
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
259
+ "CRC32": "87F68C12",
260
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
261
+ },
262
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_keypose-fp16.safetensors",
263
+ "primary": false
264
+ },
265
+ {
266
+ "name": "t2iadapter_openpose-fp16.safetensors",
267
+ "id": 13,
268
+ "sizeKB": 161261.130859375,
269
+ "type": "Model",
270
+ "format": "Checkpoint",
271
+ "pickleScanResult": "Success",
272
+ "pickleScanMessage": "No Pickle imports",
273
+ "virusScanResult": "Success",
274
+ "scannedAt": "2023-02-06T13:55:58.281Z",
275
+ "hashes": {
276
+ "AutoV2": "833E816807",
277
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
278
+ "CRC32": "87F68C12",
279
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
280
+ },
281
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_openpose-fp16.safetensors",
282
+ "primary": false
283
+ },
284
+ {
285
+ "name": "t2iadapter_seg-fp16.safetensors",
286
+ "id": 14,
287
+ "sizeKB": 161261.130859375,
288
+ "type": "Model",
289
+ "format": "Checkpoint",
290
+ "pickleScanResult": "Success",
291
+ "pickleScanMessage": "No Pickle imports",
292
+ "virusScanResult": "Success",
293
+ "scannedAt": "2023-02-06T13:55:58.281Z",
294
+ "hashes": {
295
+ "AutoV2": "833E816807",
296
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
297
+ "CRC32": "87F68C12",
298
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
299
+ },
300
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_seg-fp16.safetensors",
301
+ "primary": false
302
+ },
303
+ {
304
+ "name": "t2iadapter_sketch-fp16.safetensors",
305
+ "id": 15,
306
+ "sizeKB": 161261.130859375,
307
+ "type": "Model",
308
+ "format": "Checkpoint",
309
+ "pickleScanResult": "Success",
310
+ "pickleScanMessage": "No Pickle imports",
311
+ "virusScanResult": "Success",
312
+ "scannedAt": "2023-02-06T13:55:58.281Z",
313
+ "hashes": {
314
+ "AutoV2": "833E816807",
315
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
316
+ "CRC32": "87F68C12",
317
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
318
+ },
319
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_sketch-fp16.safetensors",
320
+ "primary": false
321
+ },
322
+ {
323
+ "name": "t2iadapter_style-fp16.safetensors",
324
+ "id": 16,
325
+ "sizeKB": 78261.130859375,
326
+ "type": "Model",
327
+ "format": "Checkpoint",
328
+ "pickleScanResult": "Success",
329
+ "pickleScanMessage": "No Pickle imports",
330
+ "virusScanResult": "Success",
331
+ "scannedAt": "2023-02-06T13:55:58.281Z",
332
+ "hashes": {
333
+ "AutoV2": "833E816807",
334
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
335
+ "CRC32": "87F68C12",
336
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
337
+ },
338
+ "downloadUrl": "https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_style-fp16.safetensors",
339
+ "primary": false
340
+ }
341
+ ],
342
+ "images": [
343
+ {
344
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
345
+ }
346
+ ]
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "id": 2,
352
+ "name": "Controlnet 1.1",
353
+ "description": "<p>Stable Diffusion v2-1 Model Card\\nThis model card focuses on the model associated with the Stable Diffusion v2-1 model, codebase available here.\\n\\nThis stable-diffusion-2-1 model is fine-tuned from stable-diffusion-2 (768-v-ema.ckpt) with an additional 55k steps on the same dataset (with punsafe=0.1), and then fine-tuned for another 155k extra steps with punsafe=0.98.\\n\\nUse it with the stablediffusion repository: download the v2-1_768-ema-pruned.ckpt here.\\nUse it with \\uD83E\\uDDE8 diffusers\\nModel Details\\nDeveloped by: Robin Rombach, Patrick Esser\\n\\nModel type: Diffusion-based text-to-image generation model\\n\\nLanguage(s): English\\n\\nLicense: CreativeML Open RAIL++-M License\\n\\nModel Description: This is a model that can be used to generate and modify images based on text prompts. It is a Latent Diffusion Model that uses a fixed, pretrained text encoder (OpenCLIP-ViT/H).\\n\\nResources for more information: GitHub Repository.</p></li></ol>\",</p></li></ol>",
354
+ "type": "Controlnet",
355
+ "poi": false,
356
+ "nsfw": false,
357
+ "allowNoCredit": true,
358
+ "allowCommercialUse": "Rent",
359
+ "allowDerivatives": true,
360
+ "allowDifferentLicense": true,
361
+ "stats": {
362
+ "downloadCount": 865,
363
+ "favoriteCount": 190,
364
+ "commentCount": 7,
365
+ "ratingCount": 2,
366
+ "rating": 5
367
+ },
368
+ "creator": {
369
+ "username": "lllyasviel",
370
+ "image": "https://huggingface.co/lllyasviel/ControlNet-v1-1"
371
+ },
372
+ "tags": [],
373
+ "modelVersions": [
374
+ {
375
+ "id": 2,
376
+ "modelId": 2,
377
+ "name": "Controlnet 1.1",
378
+ "createdAt": "2023-02-06T13:52:34.605Z",
379
+ "updatedAt": "2023-02-06T13:52:34.605Z",
380
+ "trainedWords": [],
381
+ "baseModel": "SD 1.5",
382
+ "earlyAccessTimeFrame": 0,
383
+ "description": "<p></p>",
384
+ "files": [
385
+ {
386
+ "name": "control_v11e_sd15_ip2p.pth",
387
+ "id": 18,
388
+ "sizeKB": 1561261.130859375,
389
+ "type": "Model",
390
+ "format": "Pth",
391
+ "pickleScanResult": "Success",
392
+ "pickleScanMessage": "No Pickle imports",
393
+ "virusScanResult": "Success",
394
+ "scannedAt": "2023-02-06T13:55:58.281Z",
395
+ "hashes": {
396
+ "AutoV2": "833E816807",
397
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
398
+ "CRC32": "87F68C12",
399
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
400
+ },
401
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p.pth",
402
+ "primary": false
403
+ },
404
+ {
405
+ "name": "control_v11e_sd15_shuffle.pth",
406
+ "id": 19,
407
+ "sizeKB": 1521261.130859375,
408
+ "type": "Model",
409
+ "format": "Pth",
410
+ "pickleScanResult": "Success",
411
+ "pickleScanMessage": "No Pickle imports",
412
+ "virusScanResult": "Success",
413
+ "scannedAt": "2023-02-06T13:55:58.281Z",
414
+ "hashes": {
415
+ "AutoV2": "833E816807",
416
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
417
+ "CRC32": "87F68C12",
418
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
419
+ },
420
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle.pth",
421
+ "primary": true
422
+ },
423
+ {
424
+ "name": "control_v11f1p_sd15_depth.pth",
425
+ "id": 20,
426
+ "sizeKB": 1521261.130859375,
427
+ "type": "Model",
428
+ "format": "Pth",
429
+ "pickleScanResult": "Success",
430
+ "pickleScanMessage": "No Pickle imports",
431
+ "virusScanResult": "Success",
432
+ "scannedAt": "2023-02-06T13:55:58.281Z",
433
+ "hashes": {
434
+ "AutoV2": "833E816807",
435
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
436
+ "CRC32": "87F68C12",
437
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
438
+ },
439
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth.pth",
440
+ "primary": false
441
+ },
442
+ {
443
+ "name": "control_v11p_sd15_canny.pth",
444
+ "id": 21,
445
+ "sizeKB": 1521261.130859375,
446
+ "type": "Model",
447
+ "format": "Pth",
448
+ "pickleScanResult": "Success",
449
+ "pickleScanMessage": "No Pickle imports",
450
+ "virusScanResult": "Success",
451
+ "scannedAt": "2023-02-06T13:55:58.281Z",
452
+ "hashes": {
453
+ "AutoV2": "833E816807",
454
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
455
+ "CRC32": "87F68C12",
456
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
457
+ },
458
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny.pth",
459
+ "primary": false
460
+ },
461
+ {
462
+ "name": "control_v11p_sd15_inpaint.pth",
463
+ "id": 22,
464
+ "sizeKB": 1521261.130859375,
465
+ "type": "Model",
466
+ "format": "Pth",
467
+ "pickleScanResult": "Success",
468
+ "pickleScanMessage": "No Pickle imports",
469
+ "virusScanResult": "Success",
470
+ "scannedAt": "2023-02-06T13:55:58.281Z",
471
+ "hashes": {
472
+ "AutoV2": "833E816807",
473
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
474
+ "CRC32": "87F68C12",
475
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
476
+ },
477
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint.pth",
478
+ "primary": false
479
+ },
480
+ {
481
+ "name": "control_v11p_sd15_lineart.pth",
482
+ "id": 23,
483
+ "sizeKB": 1521261.130859375,
484
+ "type": "Model",
485
+ "format": "Pth",
486
+ "pickleScanResult": "Success",
487
+ "pickleScanMessage": "No Pickle imports",
488
+ "virusScanResult": "Success",
489
+ "scannedAt": "2023-02-06T13:55:58.281Z",
490
+ "hashes": {
491
+ "AutoV2": "833E816807",
492
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
493
+ "CRC32": "87F68C12",
494
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
495
+ },
496
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart.pth",
497
+ "primary": false
498
+ },
499
+ {
500
+ "name": "control_v11p_sd15_mlsd.pth",
501
+ "id": 24,
502
+ "sizeKB": 1521261.130859375,
503
+ "type": "Model",
504
+ "format": "Pth",
505
+ "pickleScanResult": "Success",
506
+ "pickleScanMessage": "No Pickle imports",
507
+ "virusScanResult": "Success",
508
+ "scannedAt": "2023-02-06T13:55:58.281Z",
509
+ "hashes": {
510
+ "AutoV2": "833E816807",
511
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
512
+ "CRC32": "87F68C12",
513
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
514
+ },
515
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd.pth",
516
+ "primary": false
517
+ },
518
+ {
519
+ "name": "control_v11p_sd15_normalbae.pth",
520
+ "id": 25,
521
+ "sizeKB": 1521261.130859375,
522
+ "type": "Model",
523
+ "format": "Pth",
524
+ "pickleScanResult": "Success",
525
+ "pickleScanMessage": "No Pickle imports",
526
+ "virusScanResult": "Success",
527
+ "scannedAt": "2023-02-06T13:55:58.281Z",
528
+ "hashes": {
529
+ "AutoV2": "833E816807",
530
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
531
+ "CRC32": "87F68C12",
532
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
533
+ },
534
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae.pth",
535
+ "primary": false
536
+ },
537
+ {
538
+ "name": "control_v11p_sd15_openpose.pth",
539
+ "id": 26,
540
+ "sizeKB": 1521261.130859375,
541
+ "type": "Model",
542
+ "format": "Pth",
543
+ "pickleScanResult": "Success",
544
+ "pickleScanMessage": "No Pickle imports",
545
+ "virusScanResult": "Success",
546
+ "scannedAt": "2023-02-06T13:55:58.281Z",
547
+ "hashes": {
548
+ "AutoV2": "833E816807",
549
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
550
+ "CRC32": "87F68C12",
551
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
552
+ },
553
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose.pth",
554
+ "primary": false
555
+ },
556
+ {
557
+ "name": "control_v11p_sd15_scribble.pth",
558
+ "id": 27,
559
+ "sizeKB": 1521261.130859375,
560
+ "type": "Model",
561
+ "format": "PTH",
562
+ "pickleScanResult": "Success",
563
+ "pickleScanMessage": "No Pickle imports",
564
+ "virusScanResult": "Success",
565
+ "scannedAt": "2023-02-06T13:55:58.281Z",
566
+ "hashes": {
567
+ "AutoV2": "833E816807",
568
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
569
+ "CRC32": "87F68C12",
570
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
571
+ },
572
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble.pth",
573
+ "primary": false
574
+ },
575
+ {
576
+ "name": "control_v11p_sd15_seg.pth",
577
+ "id": 28,
578
+ "sizeKB": 1521261.130859375,
579
+ "type": "Model",
580
+ "format": "Pth",
581
+ "pickleScanResult": "Success",
582
+ "pickleScanMessage": "No Pickle imports",
583
+ "virusScanResult": "Success",
584
+ "scannedAt": "2023-02-06T13:55:58.281Z",
585
+ "hashes": {
586
+ "AutoV2": "833E816807",
587
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
588
+ "CRC32": "87F68C12",
589
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
590
+ },
591
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg.pth",
592
+ "primary": false
593
+ },
594
+ {
595
+ "name": "control_v11p_sd15_softedge.pth",
596
+ "id": 29,
597
+ "sizeKB": 1521261.130859375,
598
+ "type": "Model",
599
+ "format": "Pth",
600
+ "pickleScanResult": "Success",
601
+ "pickleScanMessage": "No Pickle imports",
602
+ "virusScanResult": "Success",
603
+ "scannedAt": "2023-02-06T13:55:58.281Z",
604
+ "hashes": {
605
+ "AutoV2": "833E816807",
606
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
607
+ "CRC32": "87F68C12",
608
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
609
+ },
610
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge.pth",
611
+ "primary": false
612
+ },
613
+ {
614
+ "name": "control_v11p_sd15s2_lineart_anime.pth",
615
+ "id": 30,
616
+ "sizeKB": 1521261.130859375,
617
+ "type": "Model",
618
+ "format": "Pth",
619
+ "pickleScanResult": "Success",
620
+ "pickleScanMessage": "No Pickle imports",
621
+ "virusScanResult": "Success",
622
+ "scannedAt": "2023-02-06T13:55:58.281Z",
623
+ "hashes": {
624
+ "AutoV2": "833E816807",
625
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
626
+ "CRC32": "87F68C12",
627
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
628
+ },
629
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime.pth",
630
+ "primary": false
631
+ },
632
+ {
633
+ "name": "control_v11f1e_sd15_tile.pth",
634
+ "id": 31,
635
+ "sizeKB": 1521261.130859375,
636
+ "type": "Model",
637
+ "format": "Pth",
638
+ "pickleScanResult": "Success",
639
+ "pickleScanMessage": "No Pickle imports",
640
+ "virusScanResult": "Success",
641
+ "scannedAt": "2023-02-06T13:55:58.281Z",
642
+ "hashes": {
643
+ "AutoV2": "833E816807",
644
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
645
+ "CRC32": "87F68C12",
646
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
647
+ },
648
+ "downloadUrl": "https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile.pth",
649
+ "primary": false
650
+ },
651
+ {
652
+ "name": "control_v2p_sd15_mediapipe_face.pth",
653
+ "id": 32,
654
+ "sizeKB": 1521261.130859375,
655
+ "type": "Model",
656
+ "format": "Pth",
657
+ "pickleScanResult": "Success",
658
+ "pickleScanMessage": "No Pickle imports",
659
+ "virusScanResult": "Success",
660
+ "scannedAt": "2023-02-06T13:55:58.281Z",
661
+ "hashes": {
662
+ "AutoV2": "833E816807",
663
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
664
+ "CRC32": "87F68C12",
665
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
666
+ },
667
+ "downloadUrl": "https://huggingface.co/CrucibleAI/ControlNetMediaPipeFace/resolve/main/control_v2p_sd15_mediapipe_face.pth",
668
+ "primary": false
669
+ },
670
+ {
671
+ "name": "control_v2p_sd21_mediapipe_face.pth",
672
+ "id": 33,
673
+ "sizeKB": 1521261.130859375,
674
+ "type": "Model",
675
+ "format": "Pth",
676
+ "pickleScanResult": "Success",
677
+ "pickleScanMessage": "No Pickle imports",
678
+ "virusScanResult": "Success",
679
+ "scannedAt": "2023-02-06T13:55:58.281Z",
680
+ "hashes": {
681
+ "AutoV2": "833E816807",
682
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
683
+ "CRC32": "87F68C12",
684
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
685
+ },
686
+ "downloadUrl": "https://huggingface.co/CrucibleAI/ControlNetMediaPipeFace/resolve/main/control_v2p_sd21_mediapipe_face.pth",
687
+ "primary": false
688
+ }
689
+ ],
690
+ "images": [
691
+ {
692
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
693
+ }
694
+ ]
695
+ }
696
+ ]
697
+ }
698
+ ]
miaoshouai-assistant/configs/hugging_face.json ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": 1,
4
+ "name": "Negative Embeddings",
5
+ "description": "<p>This is a collection of negative embeddings for Stable Diffusion negative prompts</p>",
6
+ "type": "TextualInversion",
7
+ "poi": false,
8
+ "nsfw": false,
9
+ "allowNoCredit": true,
10
+ "allowCommercialUse": "Rent",
11
+ "allowDerivatives": true,
12
+ "allowDifferentLicense": true,
13
+ "stats": {
14
+ "downloadCount": 865,
15
+ "favoriteCount": 190,
16
+ "commentCount": 7,
17
+ "ratingCount": 2,
18
+ "rating": 5
19
+ },
20
+ "creator": {
21
+ "username": "multiple authors",
22
+ "image": ""
23
+ },
24
+ "tags": [],
25
+ "modelVersions": [
26
+ {
27
+ "id": 1,
28
+ "modelId": 7019,
29
+ "name": "Controlnet 1.0",
30
+ "createdAt": "2023-02-06T13:52:34.605Z",
31
+ "updatedAt": "2023-02-06T13:52:34.605Z",
32
+ "trainedWords": [],
33
+ "baseModel": "SD 1.5",
34
+ "earlyAccessTimeFrame": 0,
35
+ "description": "<p></p>",
36
+ "files": [
37
+ {
38
+ "name": "EasyNegative.safetensors",
39
+ "id": 1,
40
+ "sizeKB": 25261.130859375,
41
+ "type": "Model",
42
+ "format": "Safetensors",
43
+ "pickleScanResult": "Success",
44
+ "pickleScanMessage": "No Pickle imports",
45
+ "virusScanResult": "Success",
46
+ "scannedAt": "2023-02-06T13:55:58.281Z",
47
+ "hashes": {
48
+ "AutoV2": "833E816807",
49
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
50
+ "CRC32": "87F68C12",
51
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
52
+ },
53
+ "downloadUrl": "https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors",
54
+ "primary": false
55
+ },
56
+ {
57
+ "name": "EasyNegativeV2.safetensors",
58
+ "id": 2,
59
+ "sizeKB": 50261.130859375,
60
+ "type": "Model",
61
+ "format": "Safetensors",
62
+ "pickleScanResult": "Success",
63
+ "pickleScanMessage": "No Pickle imports",
64
+ "virusScanResult": "Success",
65
+ "scannedAt": "2023-02-06T13:55:58.281Z",
66
+ "hashes": {
67
+ "AutoV2": "833E816807",
68
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
69
+ "CRC32": "87F68C12",
70
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
71
+ },
72
+ "downloadUrl": "https://huggingface.co/gsdf/Counterfeit-V3.0/resolve/main/embedding/EasyNegativeV2.safetensors",
73
+ "primary": true
74
+ },
75
+ {
76
+ "name": "bad-hands-5.pt",
77
+ "id": 3,
78
+ "sizeKB": 7261.130859375,
79
+ "type": "Model",
80
+ "format": "Pth",
81
+ "pickleScanResult": "Success",
82
+ "pickleScanMessage": "No Pickle imports",
83
+ "virusScanResult": "Success",
84
+ "scannedAt": "2023-02-06T13:55:58.281Z",
85
+ "hashes": {
86
+ "AutoV2": "833E816807",
87
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
88
+ "CRC32": "87F68C12",
89
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
90
+ },
91
+ "downloadUrl": "https://huggingface.co/yesyeahvh/bad-hands-5/resolve/main/bad-hands-5.pt",
92
+ "primary": false
93
+ },
94
+ {
95
+ "name": "bad_prompt.pt",
96
+ "id": 4,
97
+ "sizeKB": 51261.130859375,
98
+ "type": "Model",
99
+ "format": "Pth",
100
+ "pickleScanResult": "Success",
101
+ "pickleScanMessage": "No Pickle imports",
102
+ "virusScanResult": "Success",
103
+ "scannedAt": "2023-02-06T13:55:58.281Z",
104
+ "hashes": {
105
+ "AutoV2": "833E816807",
106
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
107
+ "CRC32": "87F68C12",
108
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
109
+ },
110
+ "downloadUrl": "https://huggingface.co/datasets/Nerfgun3/bad_prompt/blob/main/bad_prompt.pt",
111
+ "primary": false
112
+ },
113
+ {
114
+ "name": "bad_prompt_version2.pt",
115
+ "id": 5,
116
+ "sizeKB": 25261.130859375,
117
+ "type": "Model",
118
+ "format": "Pth",
119
+ "pickleScanResult": "Success",
120
+ "pickleScanMessage": "No Pickle imports",
121
+ "virusScanResult": "Success",
122
+ "scannedAt": "2023-02-06T13:55:58.281Z",
123
+ "hashes": {
124
+ "AutoV2": "833E816807",
125
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
126
+ "CRC32": "87F68C12",
127
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
128
+ },
129
+ "downloadUrl": "https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt",
130
+ "primary": false
131
+ },
132
+ {
133
+ "name": "badquality.pt",
134
+ "id": 6,
135
+ "sizeKB": 34261.130859375,
136
+ "type": "Model",
137
+ "format": "Pth",
138
+ "pickleScanResult": "Success",
139
+ "pickleScanMessage": "No Pickle imports",
140
+ "virusScanResult": "Success",
141
+ "scannedAt": "2023-02-06T13:55:58.281Z",
142
+ "hashes": {
143
+ "AutoV2": "833E816807",
144
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
145
+ "CRC32": "87F68C12",
146
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
147
+ },
148
+ "downloadUrl": "https://huggingface.co/p1atdev/badquality/resolve/main/badquality.pt",
149
+ "primary": false
150
+ },
151
+ {
152
+ "name": "bad-artist-anime.pt",
153
+ "id": 7,
154
+ "sizeKB": 7261.130859375,
155
+ "type": "Model",
156
+ "format": "Pth",
157
+ "pickleScanResult": "Success",
158
+ "pickleScanMessage": "No Pickle imports",
159
+ "virusScanResult": "Success",
160
+ "scannedAt": "2023-02-06T13:55:58.281Z",
161
+ "hashes": {
162
+ "AutoV2": "833E816807",
163
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
164
+ "CRC32": "87F68C12",
165
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
166
+ },
167
+ "downloadUrl": "https://huggingface.co/nick-x-hacker/bad-artist/resolve/main/bad-artist-anime.pt",
168
+ "primary": false
169
+ },
170
+ {
171
+ "name": "bad-artist.pt",
172
+ "id": 8,
173
+ "sizeKB": 7261.130859375,
174
+ "type": "Model",
175
+ "format": "Pth",
176
+ "pickleScanResult": "Success",
177
+ "pickleScanMessage": "No Pickle imports",
178
+ "virusScanResult": "Success",
179
+ "scannedAt": "2023-02-06T13:55:58.281Z",
180
+ "hashes": {
181
+ "AutoV2": "833E816807",
182
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
183
+ "CRC32": "87F68C12",
184
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
185
+ },
186
+ "downloadUrl": "https://huggingface.co/nick-x-hacker/bad-artist/resolve/main/bad-artist.pt",
187
+ "primary": false
188
+ }
189
+ ],
190
+ "images": [
191
+ {
192
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
193
+ }
194
+ ]
195
+ }
196
+ ]
197
+ }
198
+ ]
miaoshouai-assistant/configs/model_hash.json ADDED
@@ -0,0 +1,671 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "elldrethsVividMix_v20VividEr.safetensors [0f7f264114]": "0f7f264114",
3
+ "fkingScifiV2_r41958.safetensors [d6a44b9b90]": "d6a44b9b90",
4
+ "furtasticv11_furtasticv11.safetensors [8708576421]": "8708576421",
5
+ "futagen_2.safetensors [08946cce7d]": "08946cce7d",
6
+ "galaxytimemachinesGTM_v1.safetensors [e406a20c1b]": "e406a20c1b",
7
+ "Grapefruit.safetensors [4fc8d3739f]": "4fc8d3739f",
8
+ "grapeGrapefruitHenta_grapefruitV11.safetensors [4a6e5cd1c8]": "4a6e5cd1c8",
9
+ "GrapeLikeDreamFruit.ckpt [c9278e23a7]": "c9278e23a7",
10
+ "gta5ArtworkDiffusion_v1.ckpt [607aa02fb8]": "607aa02fb8",
11
+ "hAS3Dkx10B_3Dkx10B.safetensors [1d45c7c094]": "1d45c7c094",
12
+ "HAs_3DKX 1.1.ckpt [998f6b580e]": "998f6b580e",
13
+ "hasdx_hasedsdx.safetensors [fafc72c6fd]": "fafc72c6fd",
14
+ "hassanblend1512And_hassanblend1512.safetensors [f05dd9e62f]": "f05dd9e62f",
15
+ "hassanBlendAllVersio_hassanBlend14.safetensors [b08fdba169]": "b08fdba169",
16
+ "Healys_Anime_Blend.ckpt [8416edf88c]": "8416edf88c",
17
+ "healySAnimeBlend_17.ckpt [8416edf88c]": "8416edf88c",
18
+ "homoerotic_v2.safetensors [b656369cf7]": "b656369cf7",
19
+ "Inkpunk-Diffusion-v2.ckpt [2182245415]": "2182245415",
20
+ "instruct-pix2pix-00-22000.safetensors [fbc31a67aa]": "fbc31a67aa",
21
+ "jaksCreepyCritter_sd21768px.ckpt [67d399388b]": "67d399388b",
22
+ "jhSSamdoesarts_v5.ckpt [dfba164825]": "dfba164825",
23
+ "kenshi_00.safetensors [8c19d5c981]": "8c19d5c981",
24
+ "knollingcase_v1.ckpt [cf836e65a7]": "cf836e65a7",
25
+ "kotosAbyssproto_v10.safetensors [35d51ba12c]": "35d51ba12c",
26
+ "ligneClaireAnime_v1.safetensors [672977e447]": "672977e447",
27
+ "majorXs2DPOVModel_2dpov11.ckpt [83f9dcde52]": "83f9dcde52",
28
+ "mandarine_3.ckpt [7a134798ee]": "7a134798ee",
29
+ "mixProV3_v3.safetensors [b6928134bb]": "b6928134bb",
30
+ "modernDisney_v1.ckpt [8067368533]": "8067368533",
31
+ "moistmix_v2.safetensors [6514f58b5e]": "6514f58b5e",
32
+ "openjourney-v2.ckpt [2fbe5ba6e2]": "2fbe5ba6e2",
33
+ "openjourneyAka_v1.ckpt [5d5ad06cc2]": "5d5ad06cc2",
34
+ "owlerartStyle_v2.safetensors [a31fe6f791]": "a31fe6f791",
35
+ "pastelMixStylizedAnime_pastelMixPrunedFP16.safetensors [d01a68ae76]": "d01a68ae76",
36
+ "pfg_111Safetensors.safetensors [ca42a7a009]": "ca42a7a009",
37
+ "princessZeldaLora_v1.safetensors [53d6abf3cb]": "53d6abf3cb",
38
+ "protogenV22Anime_22.safetensors [1254103966]": "1254103966",
39
+ "protogenX34Photoreal_1.safetensors [44f90a0972]": "44f90a0972",
40
+ "protogenX34Photorealism_1.safetensors [44f90a0972]": "44f90a0972",
41
+ "protogenX58RebuiltSc_10.safetensors [6a21b428a3]": "6a21b428a3",
42
+ "protogenX58RebuiltScifi_10.safetensors [6a21b428a3]": "6a21b428a3",
43
+ "purepornplusMerge_purepornplus10.ckpt [40c6475ecb]": "40c6475ecb",
44
+ "qgo10a_qgo10a.safetensors [7dd744682a]": "7dd744682a",
45
+ "ratnikamix_2.safetensors [b6a8298a89]": "b6a8298a89",
46
+ "realeldenapocalypse_Analogsexknoll.safetensors [7c7dfbd636]": "7c7dfbd636",
47
+ "realisticVisionV13_v12.safetensors [8194f84cdc]": "8194f84cdc",
48
+ "redshiftDiffusion_v1.ckpt [ed8c2ee432]": "ed8c2ee432",
49
+ "roboeticsMix_rmix01Ckpt.ckpt [a7bd5ab091]": "a7bd5ab091",
50
+ "RPG.ckpt [234bfa6e72]": "234bfa6e72",
51
+ "s1dlxbrew_02.safetensors [1bf13ffc5d]": "1bf13ffc5d",
52
+ "schoolAnime_schoolAnime.safetensors [36b0e74c02]": "36b0e74c02",
53
+ "schoolmax25d_11.ckpt [0ce764ebd5]": "0ce764ebd5",
54
+ "sd-v1-4.ckpt [fe4efff1e1]": "fe4efff1e1",
55
+ "sd-v1-5-inpainting.ckpt [c6bbc15e32]": "c6bbc15e32",
56
+ "shadyArtOFFICIAL_shadyArt1.safetensors [8f0cb2925d]": "8f0cb2925d",
57
+ "spybgsToolkitFor_v40YoutubeChannel.ckpt [f277c5bba1]": "f277c5bba1",
58
+ "StablyDiffuseds_Aesthetic_Mix.ckpt [03df69045a]": "03df69045a",
59
+ "stablydiffusedsWild_3.safetensors [11a67baf56]": "11a67baf56",
60
+ "superheroDiffusion_v1.ckpt [cac0a972cf]": "cac0a972cf",
61
+ "surugaModel_suruga12K.ckpt [7846746c94]": "7846746c94",
62
+ "synthwavepunk_v2.ckpt [dc4c67171e]": "dc4c67171e",
63
+ "theAllysMix_v10Safetensors.safetensors [a18773a6bc]": "a18773a6bc",
64
+ "theallysMixIIChurned_v10.safetensors [b000c45ea5]": "b000c45ea5",
65
+ "uberRealisticPornMerge_urpmv12.safetensors [fcfaf106f2]": "fcfaf106f2",
66
+ "unstableinkdream_v6.safetensors [d855c1d2ba]": "d855c1d2ba",
67
+ "v1-5-pruned.ckpt [e1441589a6]": "e1441589a6",
68
+ "v2-1_768-nonema-pruned.ckpt [4711ff4dd2]": "4711ff4dd2",
69
+ "wd-v1-3-full.ckpt [23ba8d0411]": "23ba8d0411",
70
+ "wlop_1.ckpt [b8cff3e33f]": "b8cff3e33f",
71
+ "yiffymix_.safetensors [d6deb44e68]": "d6deb44e68",
72
+ "\u5565\u73a9\u610f\u5b8c\u728a\u5b50F16.safetensors [dda725ba6e]": "dda725ba6e",
73
+ "v1-5-pruned-emaonly.ckpt [cc6cb27103]": "cc6cb27103",
74
+ "deliberate_v2.safetensors [9aba26abdf]": "9aba26abdf",
75
+ "deliberate_v2.safetensors [38108d96f8]": "38108d96f8",
76
+ "realisticVisionV20_v20.ckpt [eaf3051d80]": "eaf3051d80",
77
+ "deliberate_v2.safetensors [d75347f3f0]": "d75347f3f0",
78
+ "deliberate_v2.safetensors [b500405cde]": "b500405cde",
79
+ "deliberate_v2.safetensors [493484f455]": "493484f455",
80
+ "deliberate_v2.safetensors [ade8822b56]": "ade8822b56",
81
+ "realisticVisionV20_v20.ckpt [d11a449e0f]": "d11a449e0f",
82
+ "2dn_1.safetensors [83569a04f4]": "83569a04f4",
83
+ "21SDModernBuildings_midjourneyBuildings.ckpt [14e1e8d692]": "14e1e8d692",
84
+ "AbyssOrangeMix2_hard.safetensors [0fc198c490]": "0fc198c490",
85
+ "adobisRealFlexibleMix_v2.safetensors [9e8a2c7a5d]": "9e8a2c7a5d",
86
+ "allInOnePixelModel_v1.ckpt [d7fb6396ab]": "d7fb6396ab",
87
+ "aloeverasSimpmaker3K_simpmaker3K1.ckpt [2cae9bc4e0]": "2cae9bc4e0",
88
+ "analogDiffusion_10Safetensors.safetensors [51f6fff508]": "51f6fff508",
89
+ "analogDream3D_10.ckpt [4575363662]": "4575363662",
90
+ "anovel_speed.ckpt [89d59c3dde]": "89d59c3dde",
91
+ "anygenV37_anygenv37.ckpt [815c974757]": "815c974757",
92
+ "Anything-V3.0-pruned.ckpt [543bcbc212]": "543bcbc212",
93
+ "anytwam11Mixedmodel_anytwam11.safetensors [e9cb790ad3]": "e9cb790ad3",
94
+ "aoaokoPVCStyleModel_pvcAOAOKO.safetensors [cf64507cef]": "cf64507cef",
95
+ "Arcane_Diffusion.ckpt [7dd0e6760f]": "7dd0e6760f",
96
+ "arcaneDiffusion_v3.ckpt [7dd0e6760f]": "7dd0e6760f",
97
+ "artErosAerosATribute_aerosNovae.safetensors [70346f7a1e]": "70346f7a1e",
98
+ "aToZovyaRPGArtistsTools15_sd15V1.safetensors [e28b2e61fb]": "e28b2e61fb",
99
+ "ayonimix_V2.safetensors [7076f76b9d]": "7076f76b9d",
100
+ "babes_11.safetensors [79886b6484]": "79886b6484",
101
+ "Basil_mix_fixed.safetensors [0ff127093f]": "0ff127093f",
102
+ "biggerGirlsModel_biggergirlsV2.ckpt [f3c16c83de]": "f3c16c83de",
103
+ "cheeseDaddys_30.safetensors [4176564bea]": "4176564bea",
104
+ "chillout_west_mix.safetensors [b93a715b47]": "b93a715b47",
105
+ "chilloutmix_inpainting.inpainting.safetensors [ec749031ba]": "ec749031ba",
106
+ "chromaticcreamv1_chromaticcreamV1.ckpt [c979d60b4a]": "c979d60b4a",
107
+ "ChromaV5 (2.0).ckpt [e8004ba771]": "e8004ba771",
108
+ "clarity_14.safetensors [dc027dbbf9]": "dc027dbbf9",
109
+ "classicNegative1521_classicNegative768px.ckpt [2106fd3b8c]": "2106fd3b8c",
110
+ "Colorwater_v4.safetensors [1b175706ff]": "1b175706ff",
111
+ "comicBabes_v1.safetensors [9211801e30]": "9211801e30",
112
+ "comicDiffusion_v2.ckpt [d3c225cbc2]": "d3c225cbc2",
113
+ "corneos7thHeavenMix_100.safetensors [d289dfa4ed]": "d289dfa4ed",
114
+ "corneos7thHeavenMix_v1.safetensors [d289dfa4ed]": "d289dfa4ed",
115
+ "Counterfeit-V2.5_pruned.safetensors [a074b8864e]": "a074b8864e",
116
+ "CounterfeitV20_20.ckpt [8838e0d1fb]": "8838e0d1fb",
117
+ "cuteRichstyle15_cuteRichstyle.ckpt [24bc802fc5]": "24bc802fc5",
118
+ "cyberrealistic_v13.safetensors [23e4391b10]": "23e4391b10",
119
+ "cynthiaModela_v10.safetensors [c83fe90aa3]": "c83fe90aa3",
120
+ "deliberate_v11-inpainting.inpainting.safetensors [0d0792451f]": "0d0792451f",
121
+ "deliberate_v11.safetensors [d8691b4d16]": "d8691b4d16",
122
+ "dgspitzerArt_dgspitzerArtDiffusion.safetensors [8141c5f18e]": "8141c5f18e",
123
+ "diGiMDSToriyamaModel_toriyamaV1.ckpt [33c84ed0b3]": "33c84ed0b3",
124
+ "dreamlikeDiffusion10_10.ckpt [0aecbcfa2c]": "0aecbcfa2c",
125
+ "dreamlikePhotoreal20_dreamlikePhotoreal20.safetensors [92970aa785]": "92970aa785",
126
+ "dreamshaper_332BakedVaeClipFix.safetensors [13dfc9921f]": "13dfc9921f",
127
+ "DucHaitenAIart.safetensors [55fed17365]": "55fed17365",
128
+ "duchaitenaiart_V20.safetensors [55fed17365]": "55fed17365",
129
+ "dvarchMultiPrompt_dvarchExterior.ckpt [1ecb6b4e9c]": "1ecb6b4e9c",
130
+ "Elldreths_OG_4060_mix.ckpt [707ee16b5b]": "707ee16b5b",
131
+ "Elldreths_Retro_Mix.ckpt [57285e7bd5]": "57285e7bd5",
132
+ "ElldrethsImaginationMix.ckpt [64224f0599]": "64224f0599",
133
+ "elldrethsLucidMix_v10.safetensors [67abd65708]": "67abd65708",
134
+ "elldrethSOg4060Mix_v10.ckpt [707ee16b5b]": "707ee16b5b",
135
+ "elldrethsRetroMix_v10.safetensors [57285e7bd5]": "57285e7bd5",
136
+ "icomix_V02Pruned.safetensors [76b00ee812]": "76b00ee812",
137
+ "inkpunkDiffusion_v2-inpainting-fp16-no-ema.safetensors [0c666f32e8]": "0c666f32e8",
138
+ "inkpunkDiffusion_v2-inpainting.safetensors [1bd4ce2c12]": "1bd4ce2c12",
139
+ "inkpunkDiffusion_v2.ckpt [2182245415]": "2182245415",
140
+ "meinamix_meinaV8.safetensors [30953ab0de]": "30953ab0de",
141
+ "mimi_V3.safetensors [88f31afc3d]": "88f31afc3d",
142
+ "mini_town_v1.safetensors [ed94110348]": "ed94110348",
143
+ "pixhell_v20.safetensors [333825e530]": "333825e530",
144
+ "projectUnrealEngine5_projectUnrealEngine5B.ckpt [748ff6eab2]": "748ff6eab2",
145
+ "pyraMythraPneuma_50Epochs.safetensors [fc9d093614]": "fc9d093614",
146
+ "realisticVisionV20_v20.safetensors [c0d1994c73]": "c0d1994c73",
147
+ "realLifeTest_realLifeTest.ckpt [d6347268cc]": "d6347268cc",
148
+ "revAnimated_v11.safetensors [d725be5d18]": "d725be5d18",
149
+ "samdoesartsUltmerge_v1.ckpt [0df9497424]": "0df9497424",
150
+ "shanshui_v0-000002.safetensors [18cbf1953b]": "18cbf1953b",
151
+ "tmndMix_tmndMixPlus.safetensors [7d19f9efad]": "7d19f9efad",
152
+ "unstableinkdream_v73.safetensors [f036d7b40b]": "f036d7b40b",
153
+ "unstablephotorealv5_05.ckpt [6ef4ed10a6]": "6ef4ed10a6",
154
+ "yinmu.safetensors [c1b28e2883]": "c1b28e2883",
155
+ "protogenX58RebuiltScifi_10.ckpt [e0de8aae3e]": "e0de8aae3e",
156
+ "marvelWhatIf_v2.ckpt [2e051600d4]": "2e051600d4",
157
+ "meinamix_meinaV9.safetensors [eac6c08a19]": "eac6c08a19",
158
+ "mixProV4_v4.safetensors [61e23e57ea]": "61e23e57ea",
159
+ "revAnimated_v122.safetensors [4199bcdd14]": "4199bcdd14",
160
+ "wood_tile-000001.safetensors [7fd29f7f80]": "7fd29f7f80",
161
+ "wood_tile-000002.safetensors [058be7927f]": "058be7927f",
162
+ "wood_tile-000003.safetensors [c379ec75dd]": "c379ec75dd",
163
+ "wood_tile-000004.safetensors [4256b2614b]": "4256b2614b",
164
+ "wood_tile-000005.safetensors [e466a6d0d1]": "e466a6d0d1",
165
+ "wood_tile-000006.safetensors [a78cb62c5a]": "a78cb62c5a",
166
+ "wood_tile-000007.safetensors [046910b320]": "046910b320",
167
+ "wood_tile-000008.safetensors [828af323cb]": "828af323cb",
168
+ "wood_tile-000009.safetensors [4b2844ebad]": "4b2844ebad",
169
+ "wood_tile.safetensors [95e89ae856]": "95e89ae856",
170
+ "CounterfeitV25_25.safetensors [a074b8864e]": "a074b8864e",
171
+ "corneo_bound_missionary.pt": null,
172
+ "corneo_mercy.pt": null,
173
+ "emmsto.pt": null,
174
+ "incaseStyle_incaseAnythingV3.pt": null,
175
+ "pureerosface_v1.pt": null,
176
+ "RSC.pt": null,
177
+ "Toru8pWavenChibi_wavenchibiV10b.pt": null,
178
+ "mini_town_v1-state\\scaler.pt": null,
179
+ "shanshui_v0-000002-state\\scaler.pt": null,
180
+ "wood_tile-000001-state\\scaler.pt": null,
181
+ "wood_tile-000002-state\\scaler.pt": null,
182
+ "wood_tile-000003-state\\scaler.pt": null,
183
+ "wood_tile-000004-state\\scaler.pt": null,
184
+ "wood_tile-000005-state\\scaler.pt": null,
185
+ "wood_tile-000006-state\\scaler.pt": null,
186
+ "wood_tile-000007-state\\scaler.pt": null,
187
+ "wood_tile-000008-state\\scaler.pt": null,
188
+ "wood_tile-000009-state\\scaler.pt": null,
189
+ "wood_tile-state\\scaler.pt": null,
190
+ "2BLoRA YorHA edition.ckpt": null,
191
+ "Addams-000001.safetensors": null,
192
+ "Addams-000002.safetensors": null,
193
+ "Addams-000003.safetensors": null,
194
+ "Addams-000004.safetensors": null,
195
+ "Addams.safetensors": null,
196
+ "aliceNikke_v30.safetensors": null,
197
+ "android18DragonBall_one.safetensors": null,
198
+ "animeLineartMangaLike_v30MangaLike (1).safetensors": null,
199
+ "arknightsTexasThe_v10.safetensors": null,
200
+ "atomicHeartRobotMaid_001.safetensors": null,
201
+ "bigHeadDoll_v01.safetensors": null,
202
+ "blindbox_V1Mix.safetensors": null,
203
+ "bruceLee_bruceLeeV10.safetensors": null,
204
+ "childrensDrawingLora_v10.safetensors": null,
205
+ "ChineseInkPainting_v10.safetensors": null,
206
+ "chunLiStreetFighter_v10.safetensors": null,
207
+ "emery_rose-000001.safetensors": null,
208
+ "emery_rose-000002.safetensors": null,
209
+ "emery_rose.safetensors": null,
210
+ "gachaSplashLORA_gachaSplashFarShot.safetensors": null,
211
+ "gta5ArtworkDiffusion_v1.safetensors": null,
212
+ "gundamRX782OutfitStyle_v10.safetensors": null,
213
+ "gundamRX78_v2.safetensors": null,
214
+ "handpaintedRPGIcons_v1.safetensors": null,
215
+ "hanfu_v28.safetensors": null,
216
+ "harunoSakuraNaruto_lykonV1.safetensors": null,
217
+ "HuluwaGourdMan_v11.safetensors": null,
218
+ "hyperbreasts.ckpt": null,
219
+ "ink_spark-000002.safetensors": null,
220
+ "ink_spark-000004.safetensors": null,
221
+ "ink_spark-000006.safetensors": null,
222
+ "ink_spark-000008.safetensors": null,
223
+ "ink_spark.safetensors": null,
224
+ "japaneseDollLikeness_v10.safetensors": null,
225
+ "jimLeeDCComicsMarvel_offset.safetensors": null,
226
+ "koreanDollLikeness_v15.safetensors": null,
227
+ "Leslie_Cheung.safetensors": null,
228
+ "Lisa - LoRA Collection of Trauters.ckpt": null,
229
+ "liuyifei_10.safetensors": null,
230
+ "LORAFlatColor_flatColor.pt": null,
231
+ "makimaChainsawMan_offset.safetensors": null,
232
+ "mini town-000002.safetensors": null,
233
+ "mini town-000004.safetensors": null,
234
+ "mini town-000006.safetensors": null,
235
+ "mini town-000008.safetensors": null,
236
+ "mini town-000010.safetensors": null,
237
+ "mini town-000012.safetensors": null,
238
+ "mini town-000014.safetensors": null,
239
+ "mini town-000016.safetensors": null,
240
+ "mini town-000018.safetensors": null,
241
+ "mini town.safetensors": null,
242
+ "mini_town-000001.safetensors": null,
243
+ "mini_town-000002.safetensors": null,
244
+ "mini_town-000003.safetensors": null,
245
+ "mini_town-000004.safetensors": null,
246
+ "mini_town.safetensors": null,
247
+ "Moxin_10.safetensors": null,
248
+ "Moxin_1010.safetensors": null,
249
+ "murataYusukeOnePunchMan_1.safetensors": null,
250
+ "myHeroAcademiaHorikoshi_v1.safetensors": null,
251
+ "onePieceWanoSagaStyle_20.safetensors": null,
252
+ "oyamaMahiro_oyamaMahiro2.safetensors": null,
253
+ "realisticAerith_v1.safetensors": null,
254
+ "samdoesartsSamYang_offset.safetensors": null,
255
+ "samdoesartsSamYang_offsetRightFilesize.safetensors": null,
256
+ "shirtTugPoseLORA_shirtTug.safetensors": null,
257
+ "slumdunk-000002.safetensors": null,
258
+ "slumdunk-000004.safetensors": null,
259
+ "slumdunk-000006.safetensors": null,
260
+ "slumdunk-000008.safetensors": null,
261
+ "slumdunk.safetensors": null,
262
+ "studioGhibliStyle_offset.safetensors": null,
263
+ "taiwanDollLikeness_v10.safetensors": null,
264
+ "tifaMeenow_tifaV2.safetensors": null,
265
+ "urbanSamuraiClothing_urbansamuraiV03.safetensors": null,
266
+ "wanniya-000003.safetensors": null,
267
+ "xiaofu-000004.safetensors": null,
268
+ "yaeMikoRealistic_yaemikoMixed.safetensors": null,
269
+ "yojiShinkawaStyle_offset.safetensors": null,
270
+ "Zhang_Songwen.safetensors": null,
271
+ "\u753b\u98ce \u9ed1\u767d \u6d82\u9e26 \u4f5coskarsson.safetensors": null,
272
+ "\u771f\u4eba \u6768\u8d85\u8d8a \u4f5cmpmp.safetensors": null,
273
+ "\u78a7\u84dd\u5e7b\u60f3\u5154\u795e\u5c06makura.safetensors": null,
274
+ "\u7acb\u7ed8\u62c6\u5206lion\u4f18\u5316\u5668 tachie separation.safetensors": null,
275
+ "scaler.pt": null,
276
+ "AnimeScreenCap.pt": null,
277
+ "CGI_Animation-185.pt": null,
278
+ "corneo_anal.pt": null,
279
+ "CounterfeitV25_25.safetensors": null,
280
+ "lyriel_v15.safetensors": null,
281
+ "azl_v1-000002.safetensors": null,
282
+ "azl_v1-000004.safetensors": null,
283
+ "azl_v1-000006.safetensors": null,
284
+ "azl_v1-000008.safetensors": null,
285
+ "azl_v1-000010.safetensors": null,
286
+ "azl_v1-000012.safetensors": null,
287
+ "azl_v1-000014.safetensors": null,
288
+ "azl_v1-000016.safetensors": null,
289
+ "azl_v1-000018.safetensors": null,
290
+ "azl_v1.safetensors": null,
291
+ "Asuka.safetensors": null,
292
+ "wood_tile-long.safetensors": null,
293
+ "wood_tile-Square.safetensors": null,
294
+ "anthro.pt": null,
295
+ "bad-artist.pt": null,
296
+ "bad-hands-5.pt": null,
297
+ "bad_prompt.pt": null,
298
+ "bad_prompt_version2.pt": null,
299
+ "bad_quality.pt": null,
300
+ "bukkakAI.pt": null,
301
+ "CandyPunk.pt": null,
302
+ "CharTurner.pt": null,
303
+ "CutAway-420.pt": null,
304
+ "CutAway-460.pt": null,
305
+ "CutAway-500.pt": null,
306
+ "ely_neg_prompt.pt": null,
307
+ "evil_neg_prompt3.pt": null,
308
+ "InkPunk768.pt": null,
309
+ "kc32-v4-5000.pt": null,
310
+ "midjourney.pt": null,
311
+ "Remix.pt": null,
312
+ "schizo_neg_prompt.pt": null,
313
+ "SDA768.pt": null,
314
+ "Style-Empire.pt": null,
315
+ "VikingPunk.pt": null,
316
+ "webtoon.pt": null,
317
+ "ycy_zzj-1000-1050.pt": null,
318
+ "ycy_zzj-1000-1100.pt": null,
319
+ "ycy_zzj-1000-1150.pt": null,
320
+ "ycy_zzj-1000-1200.pt": null,
321
+ "ycy_zzj-1000-1250.pt": null,
322
+ "ycy_zzj-1000-1300.pt": null,
323
+ "ycy_zzj-1000-1350.pt": null,
324
+ "ycy_zzj-1000-1400.pt": null,
325
+ "ycy_zzj-1000-1450.pt": null,
326
+ "ycy_zzj-1000-1500.pt": null,
327
+ "ycy_zzj-1000-1550.pt": null,
328
+ "ycy_zzj-1000-1600.pt": null,
329
+ "ycy_zzj-1000-1650.pt": null,
330
+ "ycy_zzj-1000-1700.pt": null,
331
+ "ycy_zzj-1000-1750.pt": null,
332
+ "ycy_zzj-1000-1800.pt": null,
333
+ "ycy_zzj-1000-1850.pt": null,
334
+ "ycy_zzj-1000-1900.pt": null,
335
+ "ycy_zzj-1000-1950.pt": null,
336
+ "ycy_zzj-1000.pt": null,
337
+ "ycy_zzj-2000.pt": null,
338
+ "ycy_zzj.pt": null,
339
+ "facebombmix_v1Bakedvae.safetensors": null,
340
+ "mistoonSapphire_v10.safetensors": null,
341
+ "LowRA.safetensors": null,
342
+ "21SDModernBuildings_midjourneyBuildings.ckpt": null,
343
+ "2dn_1.safetensors": null,
344
+ "AbyssOrangeMix2_hard.safetensors": null,
345
+ "adobisRealFlexibleMix_v2.safetensors": null,
346
+ "allInOnePixelModel_v1.ckpt": null,
347
+ "aloeverasSimpmaker3K_simpmaker3K1.ckpt": null,
348
+ "analogDiffusion_10Safetensors.safetensors": null,
349
+ "analogDream3D_10.ckpt": null,
350
+ "anovel_speed.ckpt": null,
351
+ "anygenV37_anygenv37.ckpt": null,
352
+ "Anything-V3.0-pruned.ckpt": null,
353
+ "anytwam11Mixedmodel_anytwam11.safetensors": null,
354
+ "aoaokoPVCStyleModel_pvcAOAOKO.safetensors": null,
355
+ "arcaneDiffusion_v3.ckpt": null,
356
+ "Arcane_Diffusion.ckpt": null,
357
+ "artErosAerosATribute_aerosNovae.safetensors": null,
358
+ "aToZovyaRPGArtistsTools15_sd15V1.safetensors": null,
359
+ "ayonimix_V2.safetensors": null,
360
+ "babes_11.safetensors": null,
361
+ "Basil_mix_fixed.safetensors": null,
362
+ "biggerGirlsModel_biggergirlsV2.ckpt": null,
363
+ "cheeseDaddys_30.safetensors": null,
364
+ "chilloutmix_inpainting.inpainting.safetensors": null,
365
+ "chilloutmix_NiPrunedFp32Fix.safetensors": null,
366
+ "chillout_west_mix.safetensors": null,
367
+ "chromaticcreamv1_chromaticcreamV1.ckpt": null,
368
+ "ChromaV5 (2.0).ckpt": null,
369
+ "clarity_14.safetensors": null,
370
+ "classicNegative1521_classicNegative768px.ckpt": null,
371
+ "Colorwater_v4.safetensors": null,
372
+ "comicBabes_v1.safetensors": null,
373
+ "comicDiffusion_v2.ckpt": null,
374
+ "corneos7thHeavenMix_100.safetensors": null,
375
+ "corneos7thHeavenMix_v1.safetensors": null,
376
+ "Counterfeit-V2.5_pruned.safetensors": null,
377
+ "CounterfeitV20_20.ckpt": null,
378
+ "cuteRichstyle15_cuteRichstyle.ckpt": null,
379
+ "cyberrealistic_v13.safetensors": null,
380
+ "cynthiaModela_v10.safetensors": null,
381
+ "deliberate_v11-inpainting.inpainting.safetensors": null,
382
+ "deliberate_v11.safetensors": null,
383
+ "dgspitzerArt_dgspitzerArtDiffusion.safetensors": null,
384
+ "diGiMDSToriyamaModel_toriyamaV1.ckpt": null,
385
+ "dreamlikeDiffusion10_10.ckpt": null,
386
+ "dreamlikePhotoreal20_dreamlikePhotoreal20.safetensors": null,
387
+ "dreamshaper_332BakedVaeClipFix.safetensors": null,
388
+ "DucHaitenAIart.safetensors": null,
389
+ "duchaitenaiart_V20.safetensors": null,
390
+ "dvarchMultiPrompt_dvarchExterior.ckpt": null,
391
+ "edgeOfRealism_eorV20Fp16BakedVAE.safetensors": null,
392
+ "ElldrethsImaginationMix.ckpt": null,
393
+ "elldrethsLucidMix_v10.safetensors": null,
394
+ "elldrethSOg4060Mix_v10.ckpt": null,
395
+ "elldrethsRetroMix_v10.safetensors": null,
396
+ "elldrethsVividMix_v20VividEr.safetensors": null,
397
+ "Elldreths_OG_4060_mix.ckpt": null,
398
+ "Elldreths_Retro_Mix.ckpt": null,
399
+ "fkingScifiV2_r41958.safetensors": null,
400
+ "furtasticv11_furtasticv11.safetensors": null,
401
+ "futagen_2.safetensors": null,
402
+ "galaxytimemachinesGTM_v1.safetensors": null,
403
+ "Grapefruit.safetensors": null,
404
+ "grapeGrapefruitHenta_grapefruitV11.safetensors": null,
405
+ "GrapeLikeDreamFruit.ckpt": null,
406
+ "gta5ArtworkDiffusion_v1.ckpt": null,
407
+ "hAS3Dkx10B_3Dkx10B.safetensors": null,
408
+ "hasdx_hasedsdx.safetensors": null,
409
+ "hassanblend1512And_hassanblend1512.safetensors": null,
410
+ "hassanBlendAllVersio_hassanBlend14.safetensors": null,
411
+ "HAs_3DKX 1.1.ckpt": null,
412
+ "healySAnimeBlend_17.ckpt": null,
413
+ "Healys_Anime_Blend.ckpt": null,
414
+ "homoerotic_v2.safetensors": null,
415
+ "icomix_V02Pruned.safetensors": null,
416
+ "Inkpunk-Diffusion-v2.ckpt": null,
417
+ "inkpunkDiffusion_v2-inpainting-fp16-no-ema.safetensors": null,
418
+ "inkpunkDiffusion_v2-inpainting.safetensors": null,
419
+ "inkpunkDiffusion_v2.ckpt": null,
420
+ "instruct-pix2pix-00-22000.safetensors": null,
421
+ "jaksCreepyCritter_sd21768px.ckpt": null,
422
+ "jhSSamdoesarts_v5.ckpt": null,
423
+ "kenshi_00.safetensors": null,
424
+ "knollingcase_v1.ckpt": null,
425
+ "kotosAbyssproto_v10.safetensors": null,
426
+ "ligneClaireAnime_v1.safetensors": null,
427
+ "majorXs2DPOVModel_2dpov11.ckpt": null,
428
+ "mandarine_3.ckpt": null,
429
+ "marvelWhatIf_v2.ckpt": null,
430
+ "meinamix_meinaV8.safetensors": null,
431
+ "meinamix_meinaV9.safetensors": null,
432
+ "mimi_V3.safetensors": null,
433
+ "mini_town_v1.safetensors": null,
434
+ "mixProV3_v3.safetensors": null,
435
+ "mixProV4_v4.safetensors": null,
436
+ "modernDisney_v1.ckpt": null,
437
+ "moistmix_v2.safetensors": null,
438
+ "openjourney-v2.ckpt": null,
439
+ "openjourneyAka_v1.ckpt": null,
440
+ "owlerartStyle_v2.safetensors": null,
441
+ "pastelMixStylizedAnime_pastelMixPrunedFP16.safetensors": null,
442
+ "pfg_111Safetensors.safetensors": null,
443
+ "pixhell_v20.safetensors": null,
444
+ "princessZeldaLora_v1.safetensors": null,
445
+ "projectUnrealEngine5_projectUnrealEngine5B.ckpt": null,
446
+ "protogenV22Anime_22.safetensors": null,
447
+ "protogenX34Photorealism_1.safetensors": null,
448
+ "protogenX34Photoreal_1.safetensors": null,
449
+ "protogenX58RebuiltScifi_10.ckpt": null,
450
+ "protogenX58RebuiltScifi_10.safetensors": null,
451
+ "protogenX58RebuiltSc_10.safetensors": null,
452
+ "purepornplusMerge_purepornplus10.ckpt": null,
453
+ "pyraMythraPneuma_50Epochs.safetensors": null,
454
+ "qgo10a_qgo10a.safetensors": null,
455
+ "ratnikamix_2.safetensors": null,
456
+ "realeldenapocalypse_Analogsexknoll.safetensors": null,
457
+ "realisticVisionV13_v12.safetensors": null,
458
+ "realisticVisionV20_v20.safetensors": null,
459
+ "realLifeTest_realLifeTest.ckpt": null,
460
+ "redshiftDiffusion_v1.ckpt": null,
461
+ "revAnimated_v11.safetensors": null,
462
+ "revAnimated_v122.safetensors": null,
463
+ "roboeticsMix_rmix01Ckpt.ckpt": null,
464
+ "RPG.ckpt": null,
465
+ "s1dlxbrew_02.safetensors": null,
466
+ "samdoesartsUltmerge_v1.ckpt": null,
467
+ "schoolAnime_schoolAnime.safetensors": null,
468
+ "schoolmax25d_11.ckpt": null,
469
+ "sd-v1-4.ckpt": null,
470
+ "sd-v1-5-inpainting.ckpt": null,
471
+ "shadyArtOFFICIAL_shadyArt1.safetensors": null,
472
+ "shanshui_v0-000002.safetensors": null,
473
+ "spybgsToolkitFor_v40YoutubeChannel.ckpt": null,
474
+ "stablydiffusedsWild_3.safetensors": null,
475
+ "StablyDiffuseds_Aesthetic_Mix.ckpt": null,
476
+ "superheroDiffusion_v1.ckpt": null,
477
+ "surugaModel_suruga12K.ckpt": null,
478
+ "synthwavepunk_v2.ckpt": null,
479
+ "theallysMixIIChurned_v10.safetensors": null,
480
+ "theAllysMix_v10Safetensors.safetensors": null,
481
+ "tmndMix_tmndMixPlus.safetensors": null,
482
+ "toonyou_alpha3.safetensors": null,
483
+ "uberRealisticPornMerge_urpmv12.safetensors": null,
484
+ "unstableinkdream_v6.safetensors": null,
485
+ "unstableinkdream_v73.safetensors": null,
486
+ "unstablephotorealv5_05.ckpt": null,
487
+ "v1-5-pruned.ckpt": null,
488
+ "v2-1_768-nonema-pruned.ckpt": null,
489
+ "wd-v1-3-full.ckpt": null,
490
+ "wlop_1.ckpt": null,
491
+ "yiffymix_.safetensors": null,
492
+ "yinmu.safetensors": null,
493
+ "\u5565\u73a9\u610f\u5b8c\u728a\u5b50F16.safetensors": null,
494
+ "AnimeKiss.safetensors": null,
495
+ "gakkou-00008.safetensors": null,
496
+ "miniatureWorldStyle_v10.safetensors": null,
497
+ "WuMo2.safetensors": null,
498
+ "[LoCon] Octans\u516b\u5206\u5100 Style.safetensors": null,
499
+ "CounterfeitV30_v30.safetensors": null,
500
+ "flat2DAnimerge_v10.safetensors": null,
501
+ "miniature_V1.safetensors": null,
502
+ "rcnzsDumbMonkey_v10.safetensors": null,
503
+ "saucitySauce_ssumdPlus.safetensors": null,
504
+ "shanshui_v0.1.safetensors": null,
505
+ "vividWatercolors_10.safetensors": null,
506
+ "test\\3Guofeng3_v33.safetensors": null,
507
+ "test\\schoolAnime_schoolAnime.safetensors": null,
508
+ "beautifulRealistic_brav5.safetensors": null,
509
+ "80year03.safetensors": null,
510
+ "9khp2znuogB.safetensors": null,
511
+ "battle_uniform-v1.1-000001.safetensors": null,
512
+ "battle_uniform-v1.1-000002.safetensors": null,
513
+ "battle_uniform-v1.1-000003.safetensors": null,
514
+ "battle_uniform-v1.1-000004.safetensors": null,
515
+ "battle_uniform-v1.1-000005.safetensors": null,
516
+ "battle_uniform-v1.1-000006.safetensors": null,
517
+ "battle_uniform-v1.1-000007.safetensors": null,
518
+ "battle_uniform-v1.1-000008.safetensors": null,
519
+ "battle_uniform-v1.1-000009.safetensors": null,
520
+ "battle_uniform-v1.1.safetensors": null,
521
+ "battle_uniform-v1.2-000001.safetensors": null,
522
+ "battle_uniform-v1.2-000002.safetensors": null,
523
+ "battle_uniform-v1.2-000003.safetensors": null,
524
+ "battle_uniform-v1.2-000004.safetensors": null,
525
+ "battle_uniform-v1.2-000005.safetensors": null,
526
+ "battle_uniform-v1.2-000006.safetensors": null,
527
+ "battle_uniform-v1.2-000007.safetensors": null,
528
+ "battle_uniform-v1.2-000008.safetensors": null,
529
+ "battle_uniform-v1.2-000009.safetensors": null,
530
+ "battle_uniform-v1.2-000010.safetensors": null,
531
+ "battle_uniform-v1.2-000011.safetensors": null,
532
+ "battle_uniform-v1.2-000012.safetensors": null,
533
+ "battle_uniform-v1.2-000013.safetensors": null,
534
+ "battle_uniform-v1.2-000014.safetensors": null,
535
+ "battle_uniform-v1.2-000015.safetensors": null,
536
+ "battle_uniform-v1.2-000016.safetensors": null,
537
+ "battle_uniform-v1.2-000017.safetensors": null,
538
+ "battle_uniform-v1.2-000018.safetensors": null,
539
+ "battle_uniform-v1.2-000019.safetensors": null,
540
+ "battle_uniform-v1.2-000020.safetensors": null,
541
+ "battle_uniform-v1.2-000021.safetensors": null,
542
+ "battle_uniform-v1.2-000022.safetensors": null,
543
+ "battle_uniform-v1.2-000023.safetensors": null,
544
+ "battle_uniform-v1.2-000024.safetensors": null,
545
+ "battle_uniform-v1.2-000025.safetensors": null,
546
+ "battle_uniform-v1.2-000026.safetensors": null,
547
+ "battle_uniform-v1.2-000027.safetensors": null,
548
+ "battle_uniform-v1.2-000028.safetensors": null,
549
+ "battle_uniform-v1.2-000029.safetensors": null,
550
+ "battle_uniform-v1.2-000030.safetensors": null,
551
+ "battle_uniform-v1.2-000031.safetensors": null,
552
+ "battle_uniform-v1.2-000032.safetensors": null,
553
+ "battle_uniform-v1.2-000033.safetensors": null,
554
+ "battle_uniform-v1.2-000034.safetensors": null,
555
+ "battle_uniform-v1.2-000035.safetensors": null,
556
+ "battle_uniform-v1.2-000036.safetensors": null,
557
+ "battle_uniform-v1.2-000037.safetensors": null,
558
+ "battle_uniform-v1.2-000038.safetensors": null,
559
+ "battle_uniform-v1.2-000039.safetensors": null,
560
+ "battle_uniform-v1.2-000040.safetensors": null,
561
+ "battle_uniform-v1.2-000041.safetensors": null,
562
+ "battle_uniform-v1.2-000042.safetensors": null,
563
+ "battle_uniform-v1.2-000043.safetensors": null,
564
+ "battle_uniform-v1.2-000044.safetensors": null,
565
+ "battle_uniform-v1.2-000045.safetensors": null,
566
+ "battle_uniform-v1.2-000046.safetensors": null,
567
+ "battle_uniform-v1.2-000047.safetensors": null,
568
+ "battle_uniform-v1.2-000048.safetensors": null,
569
+ "battle_uniform-v1.2-000049.safetensors": null,
570
+ "battle_uniform-v1.2.safetensors": null,
571
+ "battle_uniform_v1-000002.safetensors": null,
572
+ "battle_uniform_v1-000004.safetensors": null,
573
+ "battle_uniform_v1-000006.safetensors": null,
574
+ "battle_uniform_v1-000008.safetensors": null,
575
+ "battle_uniform_v1-000010.safetensors": null,
576
+ "battle_uniform_v1-000012.safetensors": null,
577
+ "battle_uniform_v1-000014.safetensors": null,
578
+ "battle_uniform_v1-000016.safetensors": null,
579
+ "battle_uniform_v1-000018.safetensors": null,
580
+ "battle_uniform_v1-000020.safetensors": null,
581
+ "battle_uniform_v1-000022.safetensors": null,
582
+ "battle_uniform_v1-000024.safetensors": null,
583
+ "battle_uniform_v1-000026.safetensors": null,
584
+ "battle_uniform_v1-000028.safetensors": null,
585
+ "battle_uniform_v1-000030.safetensors": null,
586
+ "bookcover_V2_loha-000033.safetensors": null,
587
+ "Boxcomple-15.safetensors": null,
588
+ "childbookfinv2.safetensors": null,
589
+ "ChineseKungFu.safetensors": null,
590
+ "ClearVAE_V2.2.safetensors": null,
591
+ "Cthulhu_monster.safetensors": null,
592
+ "dunhuang_v20.safetensors": null,
593
+ "Elegant hanfu ruqun style.safetensors": null,
594
+ "Girls in Glass Jars v3.safetensors": null,
595
+ "Girls' Frontline-OTs-14[lightning]-V3.safetensors": null,
596
+ "hanfu_v30.safetensors": null,
597
+ "history_scroll_0.5.safetensors": null,
598
+ "howlbgsv3.safetensors": null,
599
+ "LAS.safetensors": null,
600
+ "Light and Shadow.safetensors": null,
601
+ "Lora-Custom-ModelLiXian.safetensors": null,
602
+ "lora_CelestialHarmony.safetensors": null,
603
+ "mafuyulightmakeup.safetensors": null,
604
+ "mafuyuLoraOfFace_origin.safetensors": null,
605
+ "mario.safetensors": null,
606
+ "miaoLan_165.safetensors": null,
607
+ "mini2dtest_V2_loha.safetensors": null,
608
+ "MultipleGirlsGroup.safetensors": null,
609
+ "nami_final_offset.safetensors": null,
610
+ "neowrsk.safetensors": null,
611
+ "niba_style_v1.safetensors": null,
612
+ "nico_robin_post_timeskip_offset.safetensors": null,
613
+ "phoenixMarie.safetensors": null,
614
+ "pixel_V1_loha-000024.safetensors": null,
615
+ "piying_v0.1-side_view.safetensors": null,
616
+ "Pmini_v3.5.18.safetensors": null,
617
+ "qy_bookcover_v1.safetensors": null,
618
+ "rageMode_v1.safetensors": null,
619
+ "shinkai_makoto_offset.safetensors": null,
620
+ "SurrealHarmony.safetensors": null,
621
+ "toonyou_lora.safetensors": null,
622
+ "toonyou_lycoris.safetensors": null,
623
+ "WaterMargin_v1.safetensors": null,
624
+ "zgf_v2_loha-000030.safetensors": null,
625
+ "2dposter_v1_loha-000015.safetensors": null,
626
+ "OF_Coconut_Kitty.safetensors": null,
627
+ "aZovyaPhotoreal_v2.safetensors": null,
628
+ "meinahentai_v4.safetensors": null,
629
+ "3DMM_V11.safetensors": null,
630
+ "anythingqingmix25D_v10.safetensors": null,
631
+ "anythingV3Inpainting_1-inpainting.ckpt": null,
632
+ "AnythingV5Ink_v32Ink.safetensors": null,
633
+ "couterfeitv30_v30.inpainting.safetensors": null,
634
+ "disneyPixarCartoon_v10.safetensors": null,
635
+ "dis_V1-000020.safetensors": null,
636
+ "ghostmix_v20Bakedvae.safetensors": null,
637
+ "guofengrealmix_v10.safetensors": null,
638
+ "majicMIX fantasy_v1.0.safetensors": null,
639
+ "majicmixRealistic_v4.safetensors": null,
640
+ "majicmixRealistic_v6.safetensors": null,
641
+ "miaoshouai-anything-v4-pruned.safetensors": null,
642
+ "niantu_v1.safetensors": null,
643
+ "oukaGufeng_s1.safetensors": null,
644
+ "pixarStyleModel_v10.ckpt": null,
645
+ "rpg_V4.inpainting.safetensors": null,
646
+ "rpg_V4.safetensors": null,
647
+ "rpg_v4_2.inpainting.safetensors": null,
648
+ "sdxl_base_pruned_no-ema.safetensors": null,
649
+ "sdxl_refiner_pruned_no-ema.safetensors": null,
650
+ "model_contest_1\\1-DangerAngelSavour10.safetensors-ckpt.safetensors": null,
651
+ "model_contest_1\\10-huacai1.0-ckpt.safetensors": null,
652
+ "model_contest_1\\11-CmixG-ckpt.safetensors": null,
653
+ "model_contest_1\\16-NewGufengV1.0-ckpt.safetensors": null,
654
+ "model_contest_1\\29-xxmix9realistic v4.0-ckpt.safetensors": null,
655
+ "model_contest_1\\32-Rely on Defenc-ckpt.safetensors": null,
656
+ "model_contest_1\\33-super_gufeng-ckpt.safetensors": null,
657
+ "model_contest_1\\35-Dream CNrealistic_MIXv11-ckpt.safetensors": null,
658
+ "model_contest_1\\38-version V1-ckpt.safetensors": null,
659
+ "model_contest_1\\40-Alpha Lyrae-ckpt.safetensors": null,
660
+ "model_contest_1\\41-tkf-ckpt.safetensors": null,
661
+ "model_contest_1\\5-Dream CNrealistic_MIXv21-ckpt.safetensors": null,
662
+ "model_contest_1\\54-guofeng-checkpoint.safetensors": null,
663
+ "model_contest_1\\68-Colorful_girl-checkpoint.ckpt": null,
664
+ "model_contest_1\\71-GCM-Game Concept Map-checkpoint.safetensors": null,
665
+ "model_contest_1\\76-SJ_real109-checkpoint.safetensors": null,
666
+ "model_contest_1\\95-chunzi-checkpoiint.ckpt": null,
667
+ "model_contest_1\\99-Dream CNrealistic_MIXv12-checkpoint.safetensors": null,
668
+ "model_contest_1\\CMixG-1-0.33.safetensors": null,
669
+ "leokan.safetensors": null,
670
+ "Moses_ten_commandments-BibleGilgalHK-V1.safetensors": null
671
+ }
miaoshouai-assistant/configs/official_models.json ADDED
@@ -0,0 +1,594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": 1,
4
+ "name": "stable-diffusion-v1-5",
5
+ "description": "<p>Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. For more information about how Stable Diffusion functions, please have a look at \uD83E\uDD17's Stable Diffusion blog.\n\nThe Stable-Diffusion-v1-5 checkpoint was initialized with the weights of the Stable-Diffusion-v1-2 checkpoint and subsequently fine-tuned on 595k steps at resolution 512x512 on \"laion-aesthetics v2 5+\" and 10% dropping of the text-conditioning to improve classifier-free guidance sampling.\n\nYou can use this both with the \uD83E\uDDE8Diffusers library and the RunwayML GitHub repository.</p></li></ol>",
6
+ "type": "Checkpoint",
7
+ "poi": false,
8
+ "nsfw": false,
9
+ "allowNoCredit": true,
10
+ "allowCommercialUse": "Rent",
11
+ "allowDerivatives": true,
12
+ "allowDifferentLicense": true,
13
+ "stats": {
14
+ "downloadCount": 865,
15
+ "favoriteCount": 190,
16
+ "commentCount": 7,
17
+ "ratingCount": 2,
18
+ "rating": 5
19
+ },
20
+ "creator": {
21
+ "username": "creativeml-openrail-m",
22
+ "image": "https://huggingface.co/runwayml/stable-diffusion-v1-5"
23
+ },
24
+ "tags": [
25
+ "horror",
26
+ "dzislaw beksinskidzi",
27
+ "kappa_neuro",
28
+ "paintings"
29
+ ],
30
+ "modelVersions": [
31
+ {
32
+ "id": 1,
33
+ "modelId": 7019,
34
+ "name": "Zdzislaw Beksinski LORA",
35
+ "createdAt": "2023-02-06T13:52:34.605Z",
36
+ "updatedAt": "2023-02-06T13:52:34.605Z",
37
+ "trainedWords": [],
38
+ "baseModel": "SD 1.5",
39
+ "earlyAccessTimeFrame": 0,
40
+ "description": "<p></p>",
41
+ "files": [
42
+ {
43
+ "name": "v1-5-pruned-emaonly.ckpt",
44
+ "id": 1,
45
+ "sizeKB": 4471261.130859375,
46
+ "type": "Model",
47
+ "format": "CKPT",
48
+ "pickleScanResult": "Success",
49
+ "pickleScanMessage": "No Pickle imports",
50
+ "virusScanResult": "Success",
51
+ "scannedAt": "2023-02-06T13:55:58.281Z",
52
+ "hashes": {
53
+ "AutoV2": "833E816807",
54
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
55
+ "CRC32": "87F68C12",
56
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
57
+ },
58
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt",
59
+ "primary": false
60
+ },
61
+ {
62
+ "name": "v1-5-pruned-emaonly.safetensors",
63
+ "id": 2,
64
+ "sizeKB": 4471261.130859375,
65
+ "type": "Model",
66
+ "format": "Safetensors",
67
+ "pickleScanResult": "Success",
68
+ "pickleScanMessage": "No Pickle imports",
69
+ "virusScanResult": "Success",
70
+ "scannedAt": "2023-02-06T13:55:58.281Z",
71
+ "hashes": {
72
+ "AutoV2": "833E816807",
73
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
74
+ "CRC32": "87F68C12",
75
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
76
+ },
77
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors",
78
+ "primary": true
79
+ },
80
+ {
81
+ "name": "v1-5-pruned.ckpt",
82
+ "id": 3,
83
+ "sizeKB": 7971261.130859375,
84
+ "type": "Model",
85
+ "format": "Safetensors",
86
+ "pickleScanResult": "Success",
87
+ "pickleScanMessage": "No Pickle imports",
88
+ "virusScanResult": "Success",
89
+ "scannedAt": "2023-02-06T13:55:58.281Z",
90
+ "hashes": {
91
+ "AutoV2": "833E816807",
92
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
93
+ "CRC32": "87F68C12",
94
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
95
+ },
96
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpt",
97
+ "primary": false
98
+ },
99
+ {
100
+ "name": "v1-5-pruned.safetensors",
101
+ "id": 4,
102
+ "sizeKB": 7971261.130859375,
103
+ "type": "Model",
104
+ "format": "Safetensors",
105
+ "pickleScanResult": "Success",
106
+ "pickleScanMessage": "No Pickle imports",
107
+ "virusScanResult": "Success",
108
+ "scannedAt": "2023-02-06T13:55:58.281Z",
109
+ "hashes": {
110
+ "AutoV2": "833E816807",
111
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
112
+ "CRC32": "87F68C12",
113
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
114
+ },
115
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors",
116
+ "primary": false
117
+ },
118
+ {
119
+ "name": "sd-v1-5-inpainting.ckpt",
120
+ "id": 5,
121
+ "sizeKB": 4471261.130859375,
122
+ "type": "Model",
123
+ "format": "Checkpoint",
124
+ "pickleScanResult": "Success",
125
+ "pickleScanMessage": "No Pickle imports",
126
+ "virusScanResult": "Success",
127
+ "scannedAt": "2023-02-06T13:55:58.281Z",
128
+ "hashes": {
129
+ "AutoV2": "833E816807",
130
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
131
+ "CRC32": "87F68C12",
132
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
133
+ },
134
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-inpainting/resolve/main/sd-v1-5-inpainting.ckpt",
135
+ "primary": false
136
+ }
137
+ ],
138
+ "images": [
139
+ {
140
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
141
+ }
142
+ ]
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "id": 2,
148
+ "name": "stable-diffusion-2-1",
149
+ "description": "<p>Stable Diffusion v2-1 Model Card\nThis model card focuses on the model associated with the Stable Diffusion v2-1 model, codebase available here.\n\nThis stable-diffusion-2-1 model is fine-tuned from stable-diffusion-2 (768-v-ema.ckpt) with an additional 55k steps on the same dataset (with punsafe=0.1), and then fine-tuned for another 155k extra steps with punsafe=0.98.\n\nUse it with the stablediffusion repository: download the v2-1_768-ema-pruned.ckpt here.\nUse it with \uD83E\uDDE8 diffusers\nModel Details\nDeveloped by: Robin Rombach, Patrick Esser\n\nModel type: Diffusion-based text-to-image generation model\n\nLanguage(s): English\n\nLicense: CreativeML Open RAIL++-M License\n\nModel Description: This is a model that can be used to generate and modify images based on text prompts. It is a Latent Diffusion Model that uses a fixed, pretrained text encoder (OpenCLIP-ViT/H).\n\nResources for more information: GitHub Repository.</p></li></ol>",
150
+ "type": "Checkpoint",
151
+ "poi": false,
152
+ "nsfw": false,
153
+ "allowNoCredit": true,
154
+ "allowCommercialUse": "Rent",
155
+ "allowDerivatives": true,
156
+ "allowDifferentLicense": true,
157
+ "stats": {
158
+ "downloadCount": 865,
159
+ "favoriteCount": 190,
160
+ "commentCount": 7,
161
+ "ratingCount": 2,
162
+ "rating": 5
163
+ },
164
+ "creator": {
165
+ "username": "stabilityai",
166
+ "image": "https://huggingface.co/stabilityai/stable-diffusion-2-1"
167
+ },
168
+ "tags": [],
169
+ "modelVersions": [
170
+ {
171
+ "id": 2,
172
+ "modelId": 2,
173
+ "name": "stable-diffusion-2-1",
174
+ "createdAt": "2023-02-06T13:52:34.605Z",
175
+ "updatedAt": "2023-02-06T13:52:34.605Z",
176
+ "trainedWords": [],
177
+ "baseModel": "SD 1.5",
178
+ "earlyAccessTimeFrame": 0,
179
+ "description": "<p></p>",
180
+ "files": [
181
+ {
182
+ "name": "v2-1_768-ema-pruned.ckpt",
183
+ "id": 6,
184
+ "sizeKB": 5421261.130859375,
185
+ "type": "Model",
186
+ "format": "CKPT",
187
+ "pickleScanResult": "Success",
188
+ "pickleScanMessage": "No Pickle imports",
189
+ "virusScanResult": "Success",
190
+ "scannedAt": "2023-02-06T13:55:58.281Z",
191
+ "hashes": {
192
+ "AutoV2": "833E816807",
193
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
194
+ "CRC32": "87F68C12",
195
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
196
+ },
197
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt",
198
+ "primary": false
199
+ },
200
+ {
201
+ "name": "v2-1_768-ema-pruned.safetensors",
202
+ "id": 7,
203
+ "sizeKB": 5421261.130859375,
204
+ "type": "Model",
205
+ "format": "Safetensors",
206
+ "pickleScanResult": "Success",
207
+ "pickleScanMessage": "No Pickle imports",
208
+ "virusScanResult": "Success",
209
+ "scannedAt": "2023-02-06T13:55:58.281Z",
210
+ "hashes": {
211
+ "AutoV2": "833E816807",
212
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
213
+ "CRC32": "87F68C12",
214
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
215
+ },
216
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors",
217
+ "primary": true
218
+ },
219
+ {
220
+ "name": "v2-1_768-nonema-pruned.ckpt",
221
+ "id": 8,
222
+ "sizeKB": 5421261.130859375,
223
+ "type": "Model",
224
+ "format": "CKPT",
225
+ "pickleScanResult": "Success",
226
+ "pickleScanMessage": "No Pickle imports",
227
+ "virusScanResult": "Success",
228
+ "scannedAt": "2023-02-06T13:55:58.281Z",
229
+ "hashes": {
230
+ "AutoV2": "833E816807",
231
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
232
+ "CRC32": "87F68C12",
233
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
234
+ },
235
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpt",
236
+ "primary": false
237
+ },
238
+ {
239
+ "name": "v2-1_768-nonema-pruned.safetensors",
240
+ "id": 9,
241
+ "sizeKB": 5421261.130859375,
242
+ "type": "Model",
243
+ "format": "Safetensors",
244
+ "pickleScanResult": "Success",
245
+ "pickleScanMessage": "No Pickle imports",
246
+ "virusScanResult": "Success",
247
+ "scannedAt": "2023-02-06T13:55:58.281Z",
248
+ "hashes": {
249
+ "AutoV2": "833E816807",
250
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
251
+ "CRC32": "87F68C12",
252
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
253
+ },
254
+ "downloadUrl": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors",
255
+ "primary": false
256
+ },
257
+ {
258
+ "name": "512-inpainting-ema.ckpt",
259
+ "id": 10,
260
+ "sizeKB": 5421261.130859375,
261
+ "type": "Model",
262
+ "format": "Safetensors",
263
+ "pickleScanResult": "Success",
264
+ "pickleScanMessage": "No Pickle imports",
265
+ "virusScanResult": "Success",
266
+ "scannedAt": "2023-02-06T13:55:58.281Z",
267
+ "hashes": {
268
+ "AutoV2": "833E816807",
269
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
270
+ "CRC32": "87F68C12",
271
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
272
+ },
273
+ "downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-2-inpainting/resolve/main/512-inpainting-ema.ckpt",
274
+ "primary": false
275
+ },
276
+ {
277
+ "name": "512-inpainting-ema.safetensors",
278
+ "id": 11,
279
+ "sizeKB": 5421261.130859375,
280
+ "type": "Model",
281
+ "format": "Safetensors",
282
+ "pickleScanResult": "Success",
283
+ "pickleScanMessage": "No Pickle imports",
284
+ "virusScanResult": "Success",
285
+ "scannedAt": "2023-02-06T13:55:58.281Z",
286
+ "hashes": {
287
+ "AutoV2": "833E816807",
288
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
289
+ "CRC32": "87F68C12",
290
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
291
+ },
292
+ "downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-2-inpainting/resolve/main/512-inpainting-ema.safetensors",
293
+ "primary": false
294
+ },
295
+ {
296
+ "name": "v2-1_768-ema-pruned.yaml",
297
+ "id": 12,
298
+ "sizeKB": 2261.130859375,
299
+ "type": "Model",
300
+ "format": "YAML",
301
+ "pickleScanResult": "Success",
302
+ "pickleScanMessage": "No Pickle imports",
303
+ "virusScanResult": "Success",
304
+ "scannedAt": "2023-02-06T13:55:58.281Z",
305
+ "hashes": {
306
+ "AutoV2": "833E816807",
307
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
308
+ "CRC32": "87F68C12",
309
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
310
+ },
311
+ "downloadUrl": "https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml",
312
+ "primary": false
313
+ }
314
+ ],
315
+ "images": [
316
+ {
317
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
318
+ }
319
+ ]
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "id": 4,
325
+ "name": "stable-diffusion-XL 1.0",
326
+ "description": "SDXL consists of a two-step pipeline for latent diffusion: First, we use a base model to generate latents of the desired output size. In the second step, we use a specialized high-resolution model and apply a technique called SDEdit (https://arxiv.org/abs/2108.01073, also known as \"img2img\") to the latents generated in the first step, using the same prompt.",
327
+ "type": "Checkpoint",
328
+ "poi": false,
329
+ "nsfw": false,
330
+ "allowNoCredit": true,
331
+ "allowCommercialUse": "Rent",
332
+ "allowDerivatives": true,
333
+ "allowDifferentLicense": true,
334
+ "stats": {
335
+ "downloadCount": 865,
336
+ "favoriteCount": 190,
337
+ "commentCount": 7,
338
+ "ratingCount": 2,
339
+ "rating": 5
340
+ },
341
+ "creator": {
342
+ "username": "stabilityai",
343
+ "image": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/resolve/main/01.png"
344
+ },
345
+ "tags": [],
346
+ "modelVersions": [
347
+ {
348
+ "id": 2,
349
+ "modelId": 2,
350
+ "name": "sd_xl_base_1.0",
351
+ "createdAt": "2023-02-06T13:52:34.605Z",
352
+ "updatedAt": "2023-02-06T13:52:34.605Z",
353
+ "trainedWords": [],
354
+ "baseModel": "SDXL",
355
+ "earlyAccessTimeFrame": 0,
356
+ "description": "<p></p>",
357
+ "files": [
358
+ {
359
+ "name": "sd_xl_base_1.0.safetensors",
360
+ "id": 6,
361
+ "sizeKB": 7242126.130859375,
362
+ "type": "Model",
363
+ "format": "CKPT",
364
+ "pickleScanResult": "Success",
365
+ "pickleScanMessage": "No Pickle imports",
366
+ "virusScanResult": "Success",
367
+ "scannedAt": "2023-02-06T13:55:58.281Z",
368
+ "hashes": {
369
+ "AutoV2": "31E35C80FC",
370
+ "SHA256": "31E35C80FC4829D14F90153F4C74CD59C90B779F6AFE05A74CD6120B893F7E5B",
371
+ "CRC32": "31E35C80FC",
372
+ "BLAKE3": "31E35C80FC4829D14F90153F4C74CD59C90B779F6AFE05A74CD6120B893F7E5B"
373
+ },
374
+ "downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors",
375
+ "primary": true
376
+ },
377
+ {
378
+ "name": "sd_xl_refiner_1.0.safetensors",
379
+ "id": 7,
380
+ "sizeKB": 6221261.130859375,
381
+ "type": "Model",
382
+ "format": "Safetensors",
383
+ "pickleScanResult": "Success",
384
+ "pickleScanMessage": "No Pickle imports",
385
+ "virusScanResult": "Success",
386
+ "scannedAt": "2023-02-06T13:55:58.281Z",
387
+ "hashes": {
388
+ "AutoV2": "7440042BBD",
389
+ "SHA256": "7440042BBDC8A24813002C09B6B69B64DC90FDED4472613437B7F55F9B7D9C5F",
390
+ "CRC32": "7440042BBD",
391
+ "BLAKE3": "7440042BBDC8A24813002C09B6B69B64DC90FDED4472613437B7F55F9B7D9C5F"
392
+ },
393
+ "downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors",
394
+ "primary": true
395
+ },
396
+ {
397
+ "name": "sdxl_vae.safetensors",
398
+ "id": 7,
399
+ "sizeKB": 360126.130859375,
400
+ "type": "Model",
401
+ "format": "Safetensors",
402
+ "pickleScanResult": "Success",
403
+ "pickleScanMessage": "No Pickle imports",
404
+ "virusScanResult": "Success",
405
+ "scannedAt": "2023-02-06T13:55:58.281Z",
406
+ "hashes": {
407
+ "AutoV2": "551EAC7037",
408
+ "SHA256": "551EAC7037CE58DE1EF4447F16D48664C1E67F0E27AF50A06B1A6D458B571E0C",
409
+ "CRC32": "551EAC7037",
410
+ "BLAKE3": "551EAC7037CE58DE1EF4447F16D48664C1E67F0E27AF50A06B1A6D458B571E0C"
411
+ },
412
+ "downloadUrl": "https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors",
413
+ "primary": true
414
+ }
415
+ ],
416
+ "images": [
417
+ {
418
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
419
+ }
420
+ ]
421
+ }
422
+ ]
423
+ },
424
+ {
425
+ "id": 3,
426
+ "name": "VAE",
427
+ "description": "<p>Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. For more information about how Stable Diffusion functions, please have a look at \uD83E\uDD17's Stable Diffusion blog.\n\nThe Stable-Diffusion-v1-5 checkpoint was initialized with the weights of the Stable-Diffusion-v1-2 checkpoint and subsequently fine-tuned on 595k steps at resolution 512x512 on \"laion-aesthetics v2 5+\" and 10% dropping of the text-conditioning to improve classifier-free guidance sampling.\n\nYou can use this both with the \uD83E\uDDE8Diffusers library and the RunwayML GitHub repository.</p></li></ol>",
428
+ "type": "VAE",
429
+ "poi": false,
430
+ "nsfw": false,
431
+ "allowNoCredit": true,
432
+ "allowCommercialUse": "Rent",
433
+ "allowDerivatives": true,
434
+ "allowDifferentLicense": true,
435
+ "stats": {
436
+ "downloadCount": 865,
437
+ "favoriteCount": 190,
438
+ "commentCount": 7,
439
+ "ratingCount": 2,
440
+ "rating": 5
441
+ },
442
+ "creator": {
443
+ "username": "creativeml-openrail-m",
444
+ "image": "https://huggingface.co/runwayml/stable-diffusion-v1-5"
445
+ },
446
+ "tags": [],
447
+ "modelVersions": [
448
+ {
449
+ "id": 3,
450
+ "modelId": 3,
451
+ "name": "VAE",
452
+ "createdAt": "2023-02-06T13:52:34.605Z",
453
+ "updatedAt": "2023-02-06T13:52:34.605Z",
454
+ "trainedWords": [],
455
+ "baseModel": "SD 1.5",
456
+ "earlyAccessTimeFrame": 0,
457
+ "description": "<p></p>",
458
+ "files": [
459
+ {
460
+ "name": "vae-ft-ema-560000-ema-pruned.ckpt",
461
+ "id": 15,
462
+ "sizeKB": 447126.130859375,
463
+ "type": "Model",
464
+ "format": "CKPT",
465
+ "pickleScanResult": "Success",
466
+ "pickleScanMessage": "No Pickle imports",
467
+ "virusScanResult": "Success",
468
+ "scannedAt": "2023-02-06T13:55:58.281Z",
469
+ "hashes": {
470
+ "AutoV2": "833E816807",
471
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
472
+ "CRC32": "87F68C12",
473
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
474
+ },
475
+ "downloadUrl": "https://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.ckpt",
476
+ "primary": false
477
+ },
478
+ {
479
+ "name": "vae-ft-mse-840000-ema-pruned.ckpt",
480
+ "id": 16,
481
+ "sizeKB": 447126.130859375,
482
+ "type": "Model",
483
+ "format": "CKPT",
484
+ "pickleScanResult": "Success",
485
+ "pickleScanMessage": "No Pickle imports",
486
+ "virusScanResult": "Success",
487
+ "scannedAt": "2023-02-06T13:55:58.281Z",
488
+ "hashes": {
489
+ "AutoV2": "833E816807",
490
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
491
+ "CRC32": "87F68C12",
492
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
493
+ },
494
+ "downloadUrl": "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt",
495
+ "primary": true
496
+ },
497
+ {
498
+ "name": "Waifu-diffusion-v1-4 VAE",
499
+ "id": 17,
500
+ "sizeKB": 497126.130859375,
501
+ "type": "Model",
502
+ "format": "CKPT",
503
+ "pickleScanResult": "Success",
504
+ "pickleScanMessage": "No Pickle imports",
505
+ "virusScanResult": "Success",
506
+ "scannedAt": "2023-02-06T13:55:58.281Z",
507
+ "hashes": {
508
+ "SHA256": "DF3C506E51B7EE1D7B5A6A2BB7142D47D488743C96AA778AFB0F53A2CDC2D38D"
509
+ },
510
+ "downloadUrl": "https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt",
511
+ "primary": false
512
+ },
513
+ {
514
+ "name": "autoencoder_fix_kl-f8-trinart_chara",
515
+ "id": 18,
516
+ "sizeKB": 447126.130859375,
517
+ "type": "Model",
518
+ "format": "CKPT",
519
+ "pickleScanResult": "Success",
520
+ "pickleScanMessage": "No Pickle imports",
521
+ "virusScanResult": "Success",
522
+ "scannedAt": "2023-02-06T13:55:58.281Z",
523
+ "hashes": {
524
+ "AutoV2": "833E816807",
525
+ "SHA256": "833E816807E8D3658EBC65436908F690603A8E0E8D26143A90050F32958C9E4E",
526
+ "CRC32": "87F68C12",
527
+ "BLAKE3": "7A28D3D22520D61B58338791522A14B7B33A6A9CE552FF7D68D7E2688CAB3266"
528
+ },
529
+ "downloadUrl": "https://huggingface.co/naclbit/trinart_characters_19.2m_stable_diffusion_v1/resolve/main/autoencoder_fix_kl-f8-trinart_characters.ckpt",
530
+ "primary": false
531
+ },
532
+ {
533
+ "name": "Anything-V3.0.vae.pt",
534
+ "id": 19,
535
+ "sizeKB": 847126.130859375,
536
+ "type": "Model",
537
+ "format": "PT",
538
+ "pickleScanResult": "Success",
539
+ "pickleScanMessage": "No Pickle imports",
540
+ "virusScanResult": "Success",
541
+ "scannedAt": "2023-02-06T13:55:58.281Z",
542
+ "hashes": {
543
+ "AutoV2": "F921FB3F29",
544
+ "SHA256": "F921FB3F29891D2A77A6571E56B8B5052420D2884129517A333C60B1B4816CDF"
545
+ },
546
+ "downloadUrl": "https://huggingface.co/Linaqruf/anything-v3.0/resolve/refs%2Fpr%2F11/Anything-V3.0.vae.pt",
547
+ "primary": false
548
+ },
549
+ {
550
+ "name": "Berrymix VAE",
551
+ "id": 20,
552
+ "sizeKB": 447126.130859375,
553
+ "type": "Model",
554
+ "format": "Checkpoint",
555
+ "pickleScanResult": "Success",
556
+ "pickleScanMessage": "No Pickle imports",
557
+ "virusScanResult": "Success",
558
+ "scannedAt": "2023-02-06T13:55:58.281Z",
559
+ "hashes": {
560
+ "AutoV2": "F921FB3F29",
561
+ "SHA256": "F921FB3F29891D2A77A6571E56B8B5052420D2884129517A333C60B1B4816CDF"
562
+ },
563
+ "downloadUrl": "https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt",
564
+ "primary": false
565
+ },
566
+ {
567
+ "name": "sdxl_vae.safetensors",
568
+ "id": 7,
569
+ "sizeKB": 360126.130859375,
570
+ "type": "Model",
571
+ "format": "Safetensors",
572
+ "pickleScanResult": "Success",
573
+ "pickleScanMessage": "No Pickle imports",
574
+ "virusScanResult": "Success",
575
+ "scannedAt": "2023-02-06T13:55:58.281Z",
576
+ "hashes": {
577
+ "AutoV2": "551EAC7037",
578
+ "SHA256": "551EAC7037CE58DE1EF4447F16D48664C1E67F0E27AF50A06B1A6D458B571E0C",
579
+ "CRC32": "551EAC7037",
580
+ "BLAKE3": "551EAC7037CE58DE1EF4447F16D48664C1E67F0E27AF50A06B1A6D458B571E0C"
581
+ },
582
+ "downloadUrl": "https://huggingface.co/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors",
583
+ "primary": true
584
+ }
585
+ ],
586
+ "images": [
587
+ {
588
+ "url": "https://msdn.miaoshouai.com/msai/kt/ez/9900922.png"
589
+ }
590
+ ]
591
+ }
592
+ ]
593
+ }
594
+ ]
miaoshouai-assistant/configs/settings.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boot_settings": {
3
+ "drp_args_vram": "CPU Only",
4
+ "drp_args_theme": "Dark Mode",
5
+ "txt_args_listen_port": "7860",
6
+ "Enable xFormers": "--xformers",
7
+ "No Half": "--no-half",
8
+ "No Half VAE": "False",
9
+ "Enable API": "--api",
10
+ "Auto Launch": "--autolaunch",
11
+ "Allow Local Network Access": "False",
12
+ "drp_choose_version": "Official Release",
13
+ "txt_args_more": "",
14
+ "auto_vram": true,
15
+ "disable_log_console_output": true,
16
+ "model_source": "liandange.com",
17
+ "my_model_source": "civitai.com",
18
+ "openai_api": ""
19
+ }
20
+ }
miaoshouai-assistant/configs/webui-macos-env.sh ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ ####################################################################
3
+ # macOS defaults #
4
+ # Please modify webui-user.sh to change these instead of this file #
5
+ ####################################################################
6
+
7
+ if [[ -x "$(command -v python3.10)" ]]
8
+ then
9
+ python_cmd="python3.10"
10
+ fi
11
+
12
+ export install_dir="$HOME"
13
+ export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
14
+ export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1"
15
+ export K_DIFFUSION_REPO="https://github.com/brkirch/k-diffusion.git"
16
+ export K_DIFFUSION_COMMIT_HASH="51c9778f269cedb55a4d88c79c0246d35bdadb71"
17
+ export PYTORCH_ENABLE_MPS_FALLBACK=1
18
+
19
+ ####################################################################
miaoshouai-assistant/configs/webui-user-launch.bat ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ echo off
2
+ set GIT_PYTHON_GIT_EXECUTABLE=git\\bin\\git.exe
3
+
4
+ echo ��������AI��Դվ
5
+ echo http://resource.miaoshouai.com ��ȡ������Դ
6
+ set GIT_PYTHON_REFRESH=quiet
7
+ call update.bat
8
+
9
+ python\python.exe webui.py --autolaunch --api --xformers --medvram --deepdanbooru
10
+ pause
miaoshouai-assistant/configs/webui-user.sh ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ #########################################################
3
+ # Uncomment and change the variables below to your need:#
4
+ #########################################################
5
+
6
+ # Install directory without trailing slash
7
+ #install_dir="/home/$(whoami)"
8
+
9
+ # Name of the subdirectory
10
+ #clone_dir="stable-diffusion-webui"
11
+
12
+ # Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
13
+ # uncomment the line below based on https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
14
+ export COMMANDLINE_ARGS="--skip-torch-cuda-test --no-half --use-cpu all"
15
+
16
+ # python3 executable
17
+ #python_cmd="python3"
18
+
19
+ # git executable
20
+ #export GIT="git"
21
+
22
+ # python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
23
+ #venv_dir="venv"
24
+
25
+ # script to launch to start the app
26
+ #export LAUNCH_SCRIPT="launch.py"
27
+
28
+ # install command for torch
29
+ #export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
30
+
31
+ # Requirements file to use for stable-diffusion-webui
32
+ #export REQS_FILE="requirements_versions.txt"
33
+
34
+ # Fixed git repos
35
+ #export K_DIFFUSION_PACKAGE=""
36
+ #export GFPGAN_PACKAGE=""
37
+
38
+ # Fixed git commits
39
+ #export STABLE_DIFFUSION_COMMIT_HASH=""
40
+ #export TAMING_TRANSFORMERS_COMMIT_HASH=""
41
+ #export CODEFORMER_COMMIT_HASH=""
42
+ #export BLIP_COMMIT_HASH=""
43
+
44
+ # Uncomment to enable accelerated launch
45
+ #export ACCELERATE="True"
46
+
47
+ ###########################################
miaoshouai-assistant/install.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import launch
2
+ import os
3
+ import gzip
4
+ import io
5
+ import git
6
+ import shutil
7
+
8
+ def install_preset_models_if_needed():
9
+ assets_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "assets")
10
+ configs_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "configs")
11
+
12
+ for model_filename in ["civitai_models.json", "liandange_models.json", "gpt_index.json"]:
13
+ gzip_file = os.path.join(assets_folder, f"{model_filename}.gz")
14
+ target_file = os.path.join(configs_folder, f"{model_filename}")
15
+ if not os.path.exists(target_file):
16
+ with gzip.open(gzip_file, "rb") as compressed_file:
17
+ with io.TextIOWrapper(compressed_file, encoding="utf-8") as decoder:
18
+ content = decoder.read()
19
+ with open(target_file, "w") as model_file:
20
+ model_file.write(content)
21
+
22
+ req_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "requirements.txt")
23
+
24
+ with open(req_file) as file:
25
+ for lib in file:
26
+ lib = lib.strip()
27
+ if not launch.is_installed(lib):
28
+ launch.run_pip(f"install {lib}", f"Miaoshou assistant requirement: {lib}")
29
+
30
+ install_preset_models_if_needed()
31
+
miaoshouai-assistant/requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ psutil
2
+ rehash
3
+ tqdm
4
+ openai
5
+ numba
6
+ gpt_index==0.4.24
7
+ langchain==0.0.132
8
+ gradio_client==0.2.7
miaoshouai-assistant/scripts/assistant/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ __all__ = ["miaoshou"]
miaoshouai-assistant/scripts/assistant/miaoshou.py ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import typing as t
4
+
5
+ import gradio as gr
6
+ from modules.sd_models import CheckpointInfo
7
+ from modules.call_queue import wrap_queued_call
8
+ import launch
9
+ import modules
10
+ from modules import shared
11
+ from scripts.msai_logging.msai_logger import Logger
12
+ from scripts.runtime.msai_prelude import MiaoshouPrelude
13
+ from scripts.runtime.msai_runtime import MiaoshouRuntime
14
+ import modules.generation_parameters_copypaste as parameters_copypaste
15
+ from modules.ui_components import ToolButton
16
+
17
+
18
+ class MiaoShouAssistant(object):
19
+ # default css definition
20
+ default_css = '#my_model_cover{width: 100px;} #my_model_trigger_words{width: 200px;}'
21
+
22
+ def __init__(self) -> None:
23
+ self.logger = Logger()
24
+ self.prelude = MiaoshouPrelude()
25
+ self.runtime = MiaoshouRuntime()
26
+ self.refresh_symbol = '\U0001f504'
27
+ self.coffee_symbol = '\U0001f9cb' # 🧋
28
+ self.folder_symbol = '\U0001f4c2' # 📂
29
+
30
+ def on_event_ui_tabs_opened(self) -> t.List[t.Optional[t.Tuple[t.Any, str, str]]]:
31
+ with gr.Blocks(analytics_enabled=False, css=MiaoShouAssistant.default_css) as miaoshou_assistant:
32
+ self.create_subtab_boot_assistant()
33
+ self.create_subtab_model_management()
34
+ self.create_subtab_model_download()
35
+ self.create_subtab_update()
36
+
37
+ return [(miaoshou_assistant.queue(), "Miaoshou Assistant", "miaoshou_assistant")]
38
+
39
+ def create_subtab_boot_assistant(self) -> None:
40
+ with gr.TabItem('Boot Assistant', elem_id="boot_assistant_tab") as boot_assistant:
41
+ with gr.Row():
42
+ with gr.Column(elem_id="col_model_list"):
43
+ gpu, theme, port, chk_args, txt_args, webui_ver = self.runtime.get_default_args()
44
+ gr.Markdown(value="Argument settings")
45
+ with gr.Row():
46
+ self.drp_gpu = gr.Dropdown(label="VRAM Size", elem_id="drp_args_vram",
47
+ choices=list(self.prelude.gpu_setting.keys()),
48
+ value=gpu, interactive=True)
49
+ self.drp_theme = gr.Dropdown(label="UI Theme", choices=list(self.prelude.theme_setting.keys()),
50
+ value=theme,
51
+ elem_id="drp_args_theme", interactive=True)
52
+ self.txt_listen_port = gr.Text(label='Listen Port', value=port, elem_id="txt_args_listen_port",
53
+ interactive=True)
54
+
55
+ with gr.Row():
56
+
57
+ self.chk_group_args = gr.CheckboxGroup(choices=list(self.prelude.checkboxes.keys()), value=chk_args,
58
+ show_label=False)
59
+ self.additional_args = gr.Text(label='COMMANDLINE_ARGS (Divide by space)', value=txt_args,
60
+ elem_id="txt_args_more", interactive=True)
61
+
62
+ with gr.Row():
63
+ with gr.Column():
64
+ txt_save_status = gr.Markdown(visible=False, interactive=False, show_label=False)
65
+ drp_choose_version = gr.Dropdown(label="WebUI Version",
66
+ choices=['Official Release', 'Python Integrated'],
67
+ value=webui_ver, elem_id="drp_args_version",
68
+ interactive=True)
69
+ gr.HTML(
70
+ '<div><p>*Save your settings to webui-user.bat file. Use Python Integrated only if your'
71
+ ' WebUI is extracted from a zip file and does not need python installation</p></div>')
72
+ save_settings = gr.Button(value="Save Boot Settings", elem_id="btn_arg_save_setting")
73
+
74
+ with gr.Row():
75
+ # with gr.Column():
76
+ # settings_submit = gr.Button(value="Apply settings", variant='primary', elem_id="ms_settings_submit")
77
+ # with gr.Column():
78
+ btn_apply = gr.Button(value='Apply Settings', variant='primary',
79
+ elem_id="ms_settings_restart_gradio")
80
+ restart_gradio = gr.Button(value='Restart WebUI', variant='primary',
81
+ elem_id="ms_settings_restart_gradio")
82
+
83
+ '''def mod_args(drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args):
84
+ global commandline_args
85
+
86
+ get_final_args(drp_gpu, drp_theme, txt_listen_port, hk_group_args, additional_args)
87
+
88
+ print(commandline_args)
89
+ print(sys.argv)
90
+ #if '--xformers' not in sys.argv:
91
+ #sys.argv.append('--xformers')
92
+
93
+ settings_submit.click(mod_args, inputs=[drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args], outputs=[])'''
94
+
95
+ save_settings.click(self.runtime.change_boot_setting,
96
+ inputs=[drp_choose_version, self.drp_gpu, self.drp_theme, self.txt_listen_port, self.chk_group_args,
97
+ self.additional_args], outputs=[txt_save_status])
98
+ btn_apply.click(
99
+ self.save_cmdline_args,
100
+ inputs=[self.drp_gpu, self.drp_theme, self.txt_listen_port, self.chk_group_args,
101
+ self.additional_args],
102
+ outputs=[txt_save_status],
103
+ )
104
+
105
+ def request_restart():
106
+ shared.state.interrupt()
107
+ shared.state.need_restart = True
108
+ launch.prepare_environment()
109
+ #launch.start()
110
+
111
+ restart_gradio.click(
112
+ request_restart,
113
+ _js='restart_reload',
114
+ inputs=[],
115
+ outputs=[],
116
+ )
117
+
118
+ with gr.Column():
119
+ with gr.Row():
120
+ machine_settings = self.prelude.get_sys_info()
121
+ txt_sys_info = gr.TextArea(value=machine_settings, lines=20, max_lines=20,
122
+ label="System Info",
123
+ show_label=False, interactive=False)
124
+ with gr.Row():
125
+ sys_info_refbtn = gr.Button(value="Refresh")
126
+
127
+ with gr.Row():
128
+ md_vram_release = gr.Markdown(visible=False, interactive=False, value='Memory Released', show_label=False)
129
+ with gr.Row():
130
+ chk_auto_release = gr.Checkbox(value=self.prelude.boot_settings['auto_vram'], label='Enable Auto Memory Release')
131
+ reload_button = gr.Button('Forc VRAM Release')
132
+
133
+
134
+ self.drp_gpu.change(self.runtime.update_xformers, inputs=[self.drp_gpu, self.chk_group_args], outputs=[self.chk_group_args])
135
+ sys_info_refbtn.click(self.prelude.get_sys_info, None, txt_sys_info)
136
+ chk_auto_release.change(self.runtime.change_auto_vram, inputs=[chk_auto_release])
137
+ reload_button.click(self.runtime.force_mem_release, outputs=[md_vram_release])
138
+
139
+ def create_subtab_model_management(self) -> None:
140
+ with gr.TabItem('Model Management', elem_id="model_management_tab") as tab_model_manager:
141
+ with gr.Row():
142
+ with gr.Column():
143
+ with gr.Row():
144
+ gr.Markdown(value="If you want your model directory to be other than [your_webui_dir]\\models, select a new directory down below. "
145
+ "Your default models directory needs to be removed first before you apply. Make sure do your backups!")
146
+ md_result = gr.Markdown(visible=False, value="")
147
+ with gr.Row():
148
+ model_folder_path = gr.Textbox("", label="Model path", placeholder="Copy & paste your model destination folder here", interactive=True)
149
+ #open_folder_button = ToolButton(value=self.folder_symbol, elem_id="hidden_element" if shared.cmd_opts.hide_ui_dir_config else "open_folder_metadata_editor")
150
+ refresh_models_button = ToolButton(value=self.refresh_symbol, elem_id="hidden_element")
151
+ with gr.Row():
152
+ btn_connect_modeldir = gr.Button(value="Apply Virtual Model Folder")
153
+
154
+ with gr.Row().style(equal_height=True):
155
+ my_search_text = gr.Textbox(
156
+ label="Model name",
157
+ show_label=False,
158
+ max_lines=1,
159
+ placeholder="Enter model name",
160
+ )
161
+ btn_my_search = gr.Button("Search")
162
+
163
+ with gr.Row():
164
+ my_model_source_dropdown = gr.Dropdown(
165
+ choices=["civitai.com", "liandange.com"],
166
+ value=self.runtime.my_model_source,
167
+ label="Select Model Source",
168
+ type="value",
169
+ show_label=True,
170
+ elem_id="my_model_source").style(full_width=False)
171
+
172
+ mtypes = list(self.prelude.model_type.keys())
173
+ my_model_type = gr.Radio(mtypes,
174
+ show_label=False, value='Checkpoint', elem_id="my_model_type",
175
+ interactive=True).style(full_width=True)
176
+
177
+ with gr.Row():
178
+ my_models = self.runtime.get_local_models('', my_model_type.value)
179
+ self.runtime.ds_my_models = gr.Dataset(
180
+ components=[gr.Image(visible=False, label='Cover', elem_id='my_model_cover'),
181
+ gr.Textbox(visible=False, label='ModelId'),
182
+ gr.Textbox(visible=False, label='Name/Version'),
183
+ gr.Textbox(visible=False, label='File Name')],
184
+ elem_id='my_model_lib',
185
+ label="My Models",
186
+ headers=None,
187
+ samples=my_models,
188
+ samples_per_page=50)
189
+ with gr.Column():
190
+ self.runtime.ds_my_model_covers = gr.Dataset(components=[gr.HTML(visible=False)],
191
+ elem_id='my_model_covers',
192
+ label="Model Cover",
193
+ headers=None,
194
+ samples=[],
195
+ samples_per_page=10)
196
+ with gr.Row(variant='panel'):
197
+ c_image = gr.Image(elem_id="pnginfo_image", label="Source", source="upload", interactive=True,
198
+ type="pil", visible=True)
199
+
200
+ with gr.Row(variant='panel'):
201
+ with gr.Column():
202
+
203
+ btn_load_model = gr.HTML(
204
+ value=f'<div class="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;"' \
205
+ f'onclick="return selectCheckpoint()">Load Model</div>',
206
+ visible=True)
207
+ with gr.Column():
208
+ btn_delete_model = gr.Button(visible=True, value='Delete Model')
209
+ with gr.Column():
210
+ with gr.Row():
211
+ btn_set_all_covers = gr.Button(visible=True, value='Download Cover for Listed Models')
212
+ with gr.Row():
213
+ btn_set_cover = gr.Button(visible=False, value='Set as Cover')
214
+
215
+ with gr.Row(variant='panel'):
216
+ generation_info = gr.Textbox(label='prompt', interactive=False, visible=True, elem_id="imginfo_generation_info")
217
+ with gr.Row(variant='panel'):
218
+ display_text = 'Select a model and type some text here, ChatGPT will generate prompt for you. Supports different text in different languages.'
219
+ display_value = ''
220
+
221
+ if self.prelude.boot_settings['openai_api'] == '':
222
+ print('a')
223
+ display_text = 'Set your OpenAI api key in Setting & Update first: https://platform.openai.com/account/api-keys'
224
+ display_value = display_text
225
+
226
+ self.txt_main_prompt = gr.Textbox(label='Let ChatGPT write your prompt', placeholder=display_text, value=display_value, interactive=True, visible=True, elem_id="txt_main_prompt")
227
+ with gr.Row(variant='panel'):
228
+ with gr.Row():
229
+ btn_generate_prompt = gr.Button(value="Use GPT to Generate Prompt")
230
+ with gr.Row():
231
+ buttons = parameters_copypaste.create_buttons(["txt2img", "img2img", "inpaint", "extras"])
232
+
233
+ for tabname, button in buttons.items():
234
+ parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(
235
+ paste_button=button, tabname=tabname, source_text_component=generation_info,
236
+ source_image_component=c_image,
237
+ ))
238
+
239
+ with gr.Row(variant='panel'):
240
+ html_my_model = gr.HTML(visible=False)
241
+
242
+ btn_delete_model.click(self.runtime.delete_model, inputs=[self.runtime.ds_my_models, my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
243
+ btn_set_all_covers.click(self.runtime.set_all_covers, inputs=[my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
244
+ btn_set_cover.click(self.runtime.set_cover, inputs=[self.runtime.ds_my_models, c_image, my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
245
+ #open_folder_button.click(self.runtime.open_folder, inputs=[model_folder_path], outputs=[model_folder_path])
246
+ btn_connect_modeldir.click(self.runtime.change_model_folder, inputs=[model_folder_path], outputs=[md_result])
247
+ refresh_models_button.click(self.runtime.refresh_local_models, inputs=[my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
248
+ my_model_source_dropdown.change(self.switch_my_model_source,
249
+ inputs=[my_model_source_dropdown, my_model_type],
250
+ outputs=[self.runtime.ds_my_models])
251
+
252
+ btn_my_search.click(self.runtime.search_my_model, inputs=[my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
253
+ my_model_type.change(self.runtime.update_my_model_type, inputs=[my_search_text, my_model_type], outputs=[self.runtime.ds_my_models])
254
+ btn_generate_prompt.click(self.runtime.get_gpt_prompt, inputs=[self.runtime.ds_my_models, my_model_type, self.txt_main_prompt], outputs=[generation_info])
255
+
256
+ self.runtime.ds_my_models.click(self.runtime.get_my_model_covers,
257
+ inputs=[self.runtime.ds_my_models, my_model_type],
258
+ outputs=[self.runtime.ds_my_model_covers, html_my_model, btn_load_model])
259
+
260
+ self.runtime.ds_my_model_covers.click(self.runtime.update_cover_info,
261
+ inputs=[self.runtime.ds_my_models, self.runtime.ds_my_model_covers],
262
+ outputs=[btn_set_cover, generation_info, c_image])
263
+
264
+
265
+
266
+ def tab_model_manager_select():
267
+ self.runtime.active_model_set = 'my_model_set'
268
+
269
+ tab_model_manager.select(tab_model_manager_select, inputs=[], outputs=[])
270
+
271
+
272
+ def create_subtab_model_download(self) -> None:
273
+ with gr.TabItem('Model Download', elem_id="model_download_tab") as tab_downloads:
274
+ with gr.Row():
275
+ with gr.Column(elem_id="col_model_list"):
276
+ with gr.Row().style(equal_height=True):
277
+ model_source_dropdown = gr.Dropdown(choices=["civitai.com", "liandange.com", "official_models", 'hugging_face', "controlnet"],
278
+ value=self.runtime.model_source,
279
+ label="Select Model Source",
280
+ type="value",
281
+ show_label=True,
282
+ elem_id="model_source").style(full_width=True)
283
+
284
+ #btn_fetch = gr.Button("Fetch")
285
+
286
+ with gr.Row().style(equal_height=True):
287
+ search_text = gr.Textbox(
288
+ label="Model name",
289
+ show_label=False,
290
+ max_lines=1,
291
+ placeholder="Enter model name",
292
+ )
293
+ btn_search = gr.Button("Search")
294
+
295
+ with gr.Row().style(equal_height=True):
296
+ nsfw_checker = gr.Checkbox(label='NSFW', value=False, elem_id="chk_nsfw", interactive=True)
297
+ model_type = gr.Radio(["All"] + list(self.prelude.model_type.keys()),
298
+ show_label=False, value='All', elem_id="rad_model_type",
299
+ interactive=True).style(full_width=True)
300
+
301
+ images = self.runtime.get_images_html()
302
+ self.runtime.ds_models = gr.Dataset(
303
+ components=[gr.HTML(visible=False)],
304
+ headers=None,
305
+ type="values",
306
+ label="Models",
307
+ samples=images,
308
+ samples_per_page=60,
309
+ elem_id="model_dataset").style(type="gallery", container=True)
310
+
311
+ with gr.Column(elem_id="col_model_info"):
312
+ with gr.Row():
313
+ self.runtime.ds_cover_gallery = gr.Dataset(
314
+ components=[gr.HTML(visible=False)],
315
+ headers=None,
316
+ type="values",
317
+ label="Cover",
318
+ samples=[],
319
+ samples_per_page=10,
320
+ elem_id="ds_cover_gallery").style(type="gallery", container=True)
321
+
322
+ with gr.Row():
323
+ with gr.Column():
324
+ download_summary = gr.HTML('<div><span>No downloading tasks ongoing</span></div>')
325
+ downloading_status = gr.Button(value=f"{self.refresh_symbol} Refresh Downloading Status",
326
+ elem_id="ms_dwn_status")
327
+ with gr.Row():
328
+ model_dropdown = gr.Dropdown(choices=['Select Model'], label="Models", show_label=False,
329
+ value='Select Model', elem_id='ms_dwn_button',
330
+ interactive=True)
331
+
332
+ is_civitai_model_source_active = self.runtime.model_source == "civitai.com"
333
+ with gr.Row(variant="panel"):
334
+ dwn_button = gr.Button(value='Download',
335
+ visible=is_civitai_model_source_active, elem_id='ms_dwn_button')
336
+ open_url_in_browser_newtab_button = gr.HTML(
337
+ value='<div class="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;">'
338
+ '<a style="text-align: center;" href="http://www.liandange.com/models" '
339
+ 'target="_blank">Download</a></div>',
340
+ visible=not is_civitai_model_source_active)
341
+ with gr.Row():
342
+ model_info = gr.HTML(visible=True)
343
+
344
+ nsfw_checker.change(self.runtime.set_nsfw, inputs=[search_text, nsfw_checker, model_type],
345
+ outputs=self.runtime.ds_models)
346
+
347
+ model_type.change(self.runtime.search_model, inputs=[search_text, nsfw_checker, model_type], outputs=self.runtime.ds_models)
348
+
349
+ #btn_fetch.click(self.runtime.refresh_all_models, inputs=[], outputs=self.runtime.ds_models)
350
+
351
+ btn_search.click(self.runtime.search_model, inputs=[search_text, nsfw_checker, model_type], outputs=self.runtime.ds_models)
352
+
353
+ self.runtime.ds_models.click(self.runtime.get_model_info,
354
+ inputs=[self.runtime.ds_models],
355
+ outputs=[
356
+ self.runtime.ds_cover_gallery,
357
+ model_dropdown,
358
+ model_info,
359
+ open_url_in_browser_newtab_button
360
+ ])
361
+
362
+ dwn_button.click(self.runtime.download_model, inputs=[model_dropdown], outputs=[download_summary])
363
+ downloading_status.click(self.runtime.get_downloading_status, inputs=[], outputs=[download_summary])
364
+
365
+ model_source_dropdown.change(self.switch_model_source,
366
+ inputs=[model_source_dropdown],
367
+ outputs=[self.runtime.ds_models, dwn_button, open_url_in_browser_newtab_button])
368
+
369
+ def tab_downloads_select():
370
+ self.runtime.active_model_set = 'model_set'
371
+
372
+ tab_downloads.select(tab_downloads_select, inputs=[], outputs=[])
373
+
374
+ def create_subtab_update(self) -> None:
375
+ with gr.TabItem('Setting & Update', elem_id="about_update") as tab_update:
376
+ with gr.Row():
377
+ md_api_res = gr.Markdown(visible=False)
378
+ with gr.Row():
379
+ if self.prelude.boot_settings['openai_api'] == '':
380
+ display_text = 'Enter you OpenAI API Key here, you can get it from https://platform.openai.com/account/api-keys'
381
+ else:
382
+ display_text = self.prelude.boot_settings['openai_api']
383
+ txt_gptapi = gr.Textbox(label='OpenAI API Key', value=display_text)
384
+ with gr.Row():
385
+ btn_update_gptapi = gr.Button(value="Update API Key")
386
+ with gr.Row():
387
+ txt_update_result = gr.Markdown(visible=False)
388
+ with gr.Row():
389
+ btn_check_update = gr.Button(value="Check for Update")
390
+ with gr.Row():
391
+ chk_dont_update_ms = gr.Checkbox(visible=False, label="Do not update model source", value=False)
392
+ btn_update = gr.Button(visible=False, value="Update Miaoshouai Assistant")
393
+ with gr.Row():
394
+ gr.Markdown(value="About")
395
+ with gr.Row():
396
+ gr.HTML(
397
+ f"""
398
+ <div><p>
399
+ This extension is created to improve some of the use experience for automatic1111 webui.</br>
400
+ It is free of charge, use it as you wish, please DO NOT sell this extension.</br>
401
+ Follow us on github, discord and give us suggestions, report bugs. support us with love or coffee~</br></br>
402
+ Cheers~</p>
403
+ <p style="text-align: left;">
404
+ <a target="_blank" href="https://github.com/miaoshouai/miaoshouai-assistant"><img src="https://img.shields.io/github/followers/miaoshouai?style=social" style="display: inline;" alt="MiaoshouAI GitHub"/></a>
405
+ <a href="https://discord.gg/S22Jgn3rtz"><img src="https://img.shields.io/discord/1086407792451129374?label=Discord" style="display: inline;" alt="Discord server"></a>
406
+ <a target="_blank" href="https://jq.qq.com/?_wv=1027&k=p5ZhOHAh">【QQ群:256734228】</a>
407
+ </p>
408
+
409
+ """
410
+ )
411
+
412
+ btn_check_update.click(self.runtime.check_update, inputs=[], outputs=[txt_update_result, chk_dont_update_ms, btn_update])
413
+ btn_update_gptapi.click(self.runtime.update_gptapi, inputs=[txt_gptapi], outputs=[md_api_res, self.txt_main_prompt])
414
+ btn_update.click(self.runtime.update_program, inputs=[chk_dont_update_ms], outputs=[txt_update_result])
415
+
416
+ def save_cmdline_args(self, drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args):
417
+ #print(drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args)
418
+ self.runtime.get_final_args(drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args)
419
+ #print('request_restart: cmd_arg = ', self.runtime.cmdline_args)
420
+ #print('request_restart: sys.argv = ', sys.argv)
421
+
422
+ # reset args
423
+ sys.argv = [sys.argv[0]]
424
+ os.environ['COMMANDLINE_ARGS'] = ""
425
+ #print('remove', sys.argv)
426
+
427
+ for arg in list(dict.fromkeys(self.runtime.cmdline_args)):
428
+ sys.argv.append(arg)
429
+
430
+ print('saved args', sys.argv)
431
+ #launch.start()
432
+ return gr.Markdown.update(value="Settings Saved", visible=True)
433
+
434
+ def switch_model_source(self, new_model_source: str):
435
+ self.runtime.model_source = new_model_source
436
+ show_download_button = self.runtime.model_source != "liandange.com"
437
+ images = self.runtime.get_images_html()
438
+ self.runtime.ds_models.samples = images
439
+
440
+ if self.runtime.model_source not in ['official_models', 'hugging_face', 'controlnet']:
441
+ self.runtime.update_boot_setting('model_source', self.runtime.model_source)
442
+
443
+ return (
444
+ gr.Dataset.update(samples=images),
445
+ gr.Button.update(visible=show_download_button),
446
+ gr.HTML.update(visible=not show_download_button)
447
+ )
448
+
449
+ def switch_my_model_source(self, new_model_source: str, model_type):
450
+ self.runtime.my_model_source = new_model_source
451
+ my_models = self.runtime.get_local_models('', model_type)
452
+ self.runtime.ds_my_models.samples = my_models
453
+
454
+ if self.runtime.my_model_source not in ['official_models', 'hugging_face', 'controlnet']:
455
+ self.runtime.update_boot_setting('my_model_source', self.runtime.my_model_source)
456
+
457
+ return gr.Dataset.update(samples=my_models)
458
+
459
+ def introception(self) -> None:
460
+ self.runtime.introception()
461
+
462
+
miaoshouai-assistant/scripts/download/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ __all__ = ["msai_downloader_manager"]
miaoshouai-assistant/scripts/download/msai_downloader_manager.py ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ import os.path
3
+ import queue
4
+ import time
5
+ import requests
6
+ import typing as t
7
+ from threading import Thread, Lock
8
+
9
+ from scripts.download.msai_file_downloader import MiaoshouFileDownloader
10
+ from scripts.msai_logging.msai_logger import Logger
11
+ from scripts.msai_utils.msai_singleton import MiaoshouSingleton
12
+ import scripts.msai_utils.msai_toolkit as toolkit
13
+ from urllib.request import Request, urlopen
14
+
15
+
16
+ class DownloadingEntry(object):
17
+ def __init__(self, target_url: str = None, local_file: str = None,
18
+ local_directory: str = None, estimated_total_size: float = 0., expected_checksum: str = None):
19
+ self._target_url = target_url
20
+ self._local_file = local_file
21
+ self._local_directory = local_directory
22
+ self._expected_checksum = expected_checksum
23
+
24
+ self._estimated_total_size = estimated_total_size
25
+ self._total_size = 0
26
+ self._downloaded_size = 0
27
+
28
+ self._downloading = False
29
+ self._failure = False
30
+
31
+ @property
32
+ def target_url(self) -> str:
33
+ return self._target_url
34
+
35
+ @property
36
+ def local_file(self) -> str:
37
+ return self._local_file
38
+
39
+ @property
40
+ def local_directory(self) -> str:
41
+ return self._local_directory
42
+
43
+ @property
44
+ def expected_checksum(self) -> str:
45
+ return self._expected_checksum
46
+
47
+ @property
48
+ def total_size(self) -> int:
49
+ return self._total_size
50
+
51
+ @total_size.setter
52
+ def total_size(self, sz: int) -> None:
53
+ self._total_size = sz
54
+
55
+ @property
56
+ def downloaded_size(self) -> int:
57
+ return self._downloaded_size
58
+
59
+ @downloaded_size.setter
60
+ def downloaded_size(self, sz: int) -> None:
61
+ self._downloaded_size = sz
62
+
63
+ @property
64
+ def estimated_size(self) -> float:
65
+ return self._estimated_total_size
66
+
67
+ def is_downloading(self) -> bool:
68
+ return self._downloading
69
+
70
+ def start_download(self) -> None:
71
+ self._downloading = True
72
+
73
+ def update_final_status(self, result: bool) -> None:
74
+ self._failure = (result is False)
75
+ self._downloading = False
76
+
77
+ def is_failure(self) -> bool:
78
+ return self._failure
79
+
80
+
81
+ class AsyncLoopThread(Thread):
82
+ def __init__(self):
83
+ super(AsyncLoopThread, self).__init__(daemon=True)
84
+ self.loop = asyncio.new_event_loop()
85
+ self.logger = Logger()
86
+ self.logger.info("looper thread is created")
87
+
88
+ def run(self):
89
+ asyncio.set_event_loop(self.loop)
90
+ self.logger.info("looper thread is running")
91
+ self.loop.run_forever()
92
+
93
+
94
+ class MiaoshouDownloaderManager(metaclass=MiaoshouSingleton):
95
+ _downloading_entries: t.Dict[str, DownloadingEntry] = None
96
+
97
+ def __init__(self):
98
+ if self._downloading_entries is None:
99
+ self._downloading_entries = {}
100
+ self.message_queue = queue.Queue()
101
+
102
+ self.logger = Logger()
103
+ self.looper = AsyncLoopThread()
104
+ self.looper.start()
105
+ self.logger.info("download manager is ready")
106
+ self._mutex = Lock()
107
+
108
+ def consume_all_ready_messages(self) -> None:
109
+ """
110
+ capture all enqueued messages, this method should not be used if you are iterating over the message queue
111
+ :return:
112
+ None
113
+ :side-effect:
114
+ update downloading entries' status
115
+ """
116
+ while True:
117
+ # self.logger.info("fetching the enqueued message")
118
+ try:
119
+ (aurl, finished_size, total_size) = self.message_queue.get(block=False, timeout=0.2)
120
+ # self.logger.info(f"[+] message ([{finished_size}/{total_size}] {aurl}")
121
+ try:
122
+ self._mutex.acquire(blocking=True)
123
+ self._downloading_entries[aurl].total_size = total_size
124
+ self._downloading_entries[aurl].downloaded_size = finished_size
125
+ finally:
126
+ self._mutex.release()
127
+ except queue.Empty:
128
+ break
129
+
130
+ def iterator(self) -> t.Tuple[float, float]:
131
+
132
+ while True:
133
+ self.logger.info("waiting for incoming message")
134
+
135
+ try:
136
+ (aurl, finished_size, total_size) = self.message_queue.get(block=True)
137
+ self.logger.info(f"[+] message ([{finished_size}/{total_size}] {aurl}")
138
+ try:
139
+ self._mutex.acquire(blocking=True)
140
+ self._downloading_entries[aurl].total_size = total_size
141
+ self._downloading_entries[aurl].downloaded_size = finished_size
142
+
143
+ tasks_total_size = 0.
144
+ tasks_finished_size = 0.
145
+
146
+ for e in self._downloading_entries.values():
147
+ tasks_total_size += e.total_size
148
+ tasks_finished_size += e.downloaded_size
149
+
150
+ yield tasks_finished_size, tasks_total_size
151
+ finally:
152
+ self._mutex.release()
153
+ except queue.Empty:
154
+ if len(asyncio.all_tasks(self.looper.loop)) == 0:
155
+ self.logger.info("all downloading tasks finished")
156
+ break
157
+
158
+ async def _submit_task(self, download_entry: DownloadingEntry) -> None:
159
+ try:
160
+ self._mutex.acquire(blocking=True)
161
+ if download_entry.target_url in self._downloading_entries:
162
+ self.logger.warn(f"{download_entry.target_url} is already downloading")
163
+ return
164
+ else:
165
+ download_entry.start_download()
166
+ self._downloading_entries[download_entry.target_url] = download_entry
167
+ finally:
168
+ self._mutex.release()
169
+
170
+ file_downloader = MiaoshouFileDownloader(
171
+ target_url=download_entry.target_url,
172
+ local_file=download_entry.local_file,
173
+ local_directory=download_entry.local_directory,
174
+ channel=self.message_queue if download_entry.estimated_size else None,
175
+ estimated_total_length=download_entry.estimated_size,
176
+ expected_checksum=download_entry.expected_checksum,
177
+ )
178
+
179
+ result: bool = await self.looper.loop.run_in_executor(None, file_downloader.download_file)
180
+
181
+ try:
182
+ self._mutex.acquire(blocking=True)
183
+ self._downloading_entries[download_entry.target_url].update_final_status(result)
184
+ finally:
185
+ self._mutex.release()
186
+
187
+ def download(self, source_url: str, target_file: str, estimated_total_size: float,
188
+ expected_checksum: str = None) -> None:
189
+ self.logger.info(f"start to download '{source_url}'")
190
+
191
+ target_dir = os.path.dirname(target_file)
192
+ target_filename = os.path.basename(target_file)
193
+ download_entry = DownloadingEntry(
194
+ target_url=source_url,
195
+ local_file=target_filename,
196
+ local_directory=target_dir,
197
+ estimated_total_size=estimated_total_size,
198
+ expected_checksum=expected_checksum
199
+ )
200
+
201
+ asyncio.run_coroutine_threadsafe(self._submit_task(download_entry), self.looper.loop)
202
+
203
+ def tasks_summary(self) -> t.Tuple[int, int, str]:
204
+ self.consume_all_ready_messages()
205
+
206
+ total_tasks_num = 0
207
+ ongoing_tasks_num = 0
208
+ failed_tasks_num = 0
209
+
210
+ try:
211
+ description = "<div>"
212
+ self._mutex.acquire(blocking=True)
213
+ for name, entry in self._downloading_entries.items():
214
+ if entry.estimated_size is None:
215
+ continue
216
+
217
+ total_tasks_num += 1
218
+
219
+ if entry.total_size > 0.:
220
+ description += f"<p>{entry.local_file} ({toolkit.get_readable_size(entry.total_size)}) : "
221
+ else:
222
+ description += f"<p>{entry.local_file} ({toolkit.get_readable_size(entry.estimated_size)}) : "
223
+
224
+ if entry.is_downloading():
225
+ ongoing_tasks_num += 1
226
+ finished_percent = entry.downloaded_size/entry.estimated_size * 100
227
+ description += f'<span style="color:blue;font-weight:bold">{round(finished_percent, 2)} %</span>'
228
+ elif entry.is_failure():
229
+ failed_tasks_num += 1
230
+ description += '<span style="color:red;font-weight:bold">failed!</span>'
231
+ else:
232
+ description += '<span style="color:green;font-weight:bold">finished</span>'
233
+ description += "</p><br>"
234
+ finally:
235
+ self._mutex.release()
236
+ pass
237
+
238
+ description += "</div>"
239
+ overall = f"""
240
+ <h4>
241
+ <span style="color:blue;font-weight:bold">{ongoing_tasks_num}</span> ongoing,
242
+ <span style="color:green;font-weight:bold">{total_tasks_num - ongoing_tasks_num - failed_tasks_num}</span> finished,
243
+ <span style="color:red;font-weight:bold">{failed_tasks_num}</span> failed.
244
+ </h4>
245
+ <br>
246
+ <br>
247
+ """
248
+
249
+ return ongoing_tasks_num, total_tasks_num, overall + description
250
+
251
+
miaoshouai-assistant/scripts/download/msai_file_downloader.py ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pickle
3
+ import queue
4
+ import time
5
+ import typing as t
6
+ from pathlib import Path
7
+ from urllib.parse import urlparse
8
+
9
+ import rehash
10
+ import requests
11
+ from requests.adapters import HTTPAdapter
12
+ from tqdm import tqdm
13
+ from urllib3.util import Retry
14
+
15
+ import scripts.msai_utils.msai_toolkit as toolkit
16
+ from scripts.msai_logging.msai_logger import Logger
17
+
18
+
19
+ class MiaoshouFileDownloader(object):
20
+ CHUNK_SIZE = 1024 * 1024
21
+
22
+ def __init__(self, target_url: str = None,
23
+ local_file: str = None, local_directory: str = None, estimated_total_length: float = 0.,
24
+ expected_checksum: str = None,
25
+ channel: queue.Queue = None,
26
+ max_retries=5) -> None:
27
+ self.logger = Logger()
28
+
29
+ self.target_url: str = target_url
30
+ self.local_file: str = local_file
31
+ self.local_directory = local_directory
32
+ self.expected_checksum = expected_checksum
33
+ self.max_retries = max_retries
34
+
35
+ self.accept_ranges: bool = False
36
+ self.estimated_content_length = estimated_total_length
37
+ self.content_length: int = -1
38
+ self.finished_chunk_size: int = 0
39
+
40
+ self.channel = channel # for communication
41
+
42
+ # Support 3 retries and backoff
43
+ retry_strategy = Retry(
44
+ total=3,
45
+ backoff_factor=1,
46
+ status_forcelist=[429, 500, 502, 503, 504],
47
+ method_whitelist=["HEAD", "GET", "OPTIONS"]
48
+ )
49
+ adapter = HTTPAdapter(max_retries=retry_strategy)
50
+ self.session = requests.Session()
51
+ self.session.mount("https://", adapter)
52
+ self.session.mount("http://", adapter)
53
+
54
+ # inform message receiver at once
55
+ if self.channel:
56
+ self.channel.put_nowait((
57
+ self.target_url,
58
+ self.finished_chunk_size,
59
+ self.estimated_content_length,
60
+ ))
61
+
62
+ # Head request to get file-length and check whether it supports ranges.
63
+ def get_file_info_from_server(self, target_url: str) -> t.Tuple[bool, float]:
64
+ try:
65
+ headers = {"Accept-Encoding": "identity"} # Avoid dealing with gzip
66
+ response = requests.head(target_url, headers=headers, allow_redirects=True)
67
+ response.raise_for_status()
68
+ content_length = None
69
+ if "Content-Length" in response.headers:
70
+ content_length = int(response.headers['Content-Length'])
71
+ accept_ranges = (response.headers.get("Accept-Ranges") == "bytes")
72
+ return accept_ranges, float(content_length)
73
+ except Exception as ex:
74
+ self.logger.info(f"HEAD Request Error: {ex}")
75
+ return False, self.estimated_content_length
76
+
77
+ def download_file_full(self, target_url: str, local_filepath: str) -> t.Optional[str]:
78
+ try:
79
+ checksum = rehash.sha256()
80
+ headers = {"Accept-Encoding": "identity"} # Avoid dealing with gzip
81
+
82
+ with tqdm(total=self.content_length, unit="byte", unit_scale=1, colour="GREEN",
83
+ desc=os.path.basename(self.local_file)) as progressbar, \
84
+ self.session.get(target_url, headers=headers, stream=True, timeout=5) as response, \
85
+ open(local_filepath, 'wb') as file_out:
86
+ response.raise_for_status()
87
+
88
+ for chunk in response.iter_content(MiaoshouFileDownloader.CHUNK_SIZE):
89
+ file_out.write(chunk)
90
+ checksum.update(chunk)
91
+ progressbar.update(len(chunk))
92
+ self.update_progress(len(chunk))
93
+
94
+ except Exception as ex:
95
+ self.logger.info(f"Download error: {ex}")
96
+ return None
97
+
98
+ return checksum.hexdigest()
99
+
100
+ def download_file_resumable(self, target_url: str, local_filepath: str) -> t.Optional[str]:
101
+ # Always go off the checkpoint as the file was flushed before writing.
102
+ download_checkpoint = local_filepath + ".downloading"
103
+ try:
104
+ resume_point, checksum = pickle.load(open(download_checkpoint, "rb"))
105
+ assert os.path.exists(local_filepath) # catch checkpoint without file
106
+ self.logger.info("File already exists, resuming download.")
107
+ except Exception as e:
108
+ self.logger.error(f"failed to load downloading checkpoint - {download_checkpoint} due to {e}")
109
+ resume_point = 0
110
+ checksum = rehash.sha256()
111
+ if os.path.exists(local_filepath):
112
+ os.remove(local_filepath)
113
+ Path(local_filepath).touch()
114
+
115
+ assert (resume_point < self.content_length)
116
+
117
+ self.finished_chunk_size = resume_point
118
+
119
+ # Support resuming
120
+ headers = {"Range": f"bytes={resume_point}-", "Accept-Encoding": "identity"}
121
+ try:
122
+ with tqdm(total=self.content_length, unit="byte", unit_scale=1, colour="GREEN",
123
+ desc=os.path.basename(self.local_file)) as progressbar, \
124
+ self.session.get(target_url, headers=headers, stream=True, timeout=5) as response, \
125
+ open(local_filepath, 'r+b') as file_out:
126
+ response.raise_for_status()
127
+ self.update_progress(resume_point)
128
+ file_out.seek(resume_point)
129
+
130
+ for chunk in response.iter_content(MiaoshouFileDownloader.CHUNK_SIZE):
131
+ file_out.write(chunk)
132
+ file_out.flush()
133
+ resume_point += len(chunk)
134
+ checksum.update(chunk)
135
+ pickle.dump((resume_point, checksum), open(download_checkpoint, "wb"))
136
+ progressbar.update(len(chunk))
137
+ self.update_progress(len(chunk))
138
+
139
+ # Only remove checkpoint at full size in case connection cut
140
+ if os.path.getsize(local_filepath) == self.content_length:
141
+ os.remove(download_checkpoint)
142
+ else:
143
+ return None
144
+
145
+ except Exception as ex:
146
+ self.logger.error(f"Download error: {ex}")
147
+ return None
148
+
149
+ return checksum.hexdigest()
150
+
151
+ def update_progress(self, finished_chunk_size: int) -> None:
152
+ self.finished_chunk_size += finished_chunk_size
153
+
154
+ if self.channel:
155
+ self.channel.put_nowait((
156
+ self.target_url,
157
+ self.finished_chunk_size,
158
+ self.content_length,
159
+ ))
160
+
161
+ # In order to avoid leaving extra garbage meta files behind this
162
+ # will overwrite any existing files found at local_file. If you don't want this
163
+ # behaviour you can handle this externally.
164
+ # local_file and local_directory could write to unexpected places if the source
165
+ # is untrusted, be careful!
166
+ def download_file(self) -> bool:
167
+ success = False
168
+ try:
169
+ # Need to rebuild local_file_final each time in case of different urls
170
+ if not self.local_file:
171
+ specific_local_file = os.path.basename(urlparse(self.target_url).path)
172
+ else:
173
+ specific_local_file = self.local_file
174
+
175
+ download_temp_dir = toolkit.get_user_temp_dir()
176
+ toolkit.assert_user_temp_dir()
177
+
178
+ if self.local_directory:
179
+ os.makedirs(self.local_directory, exist_ok=True)
180
+
181
+ specific_local_file = os.path.join(download_temp_dir, specific_local_file)
182
+
183
+ self.accept_ranges, self.content_length = self.get_file_info_from_server(self.target_url)
184
+ self.logger.info(f"Accept-Ranges: {self.accept_ranges}. content length: {self.content_length}")
185
+ if self.accept_ranges and self.content_length:
186
+ download_method = self.download_file_resumable
187
+ self.logger.info("Server supports resume")
188
+ else:
189
+ download_method = self.download_file_full
190
+ self.logger.info(f"Server doesn't support resume.")
191
+
192
+ for i in range(self.max_retries):
193
+ self.logger.info(f"Download Attempt {i + 1}")
194
+ checksum = download_method(self.target_url, specific_local_file)
195
+ if checksum:
196
+ match = ""
197
+ if self.expected_checksum:
198
+ match = ", Checksum Match"
199
+
200
+ if self.expected_checksum and self.expected_checksum != checksum:
201
+ self.logger.info(f"Checksum doesn't match. Calculated {checksum} "
202
+ f"Expecting: {self.expected_checksum}")
203
+ else:
204
+ self.logger.info(f"Download successful{match}. Checksum {checksum}")
205
+ success = True
206
+ break
207
+ time.sleep(1)
208
+
209
+ if success:
210
+ self.logger.info(f"{self.target_url} [DOWNLOADED COMPLETELY]")
211
+ if self.local_directory:
212
+ target_local_file = os.path.join(self.local_directory, self.local_file)
213
+ else:
214
+ target_local_file = self.local_file
215
+ toolkit.move_file(specific_local_file, target_local_file)
216
+ else:
217
+ self.logger.info(f"{self.target_url} [ FAILED ]")
218
+
219
+ except Exception as ex:
220
+ self.logger.info(f"Unexpected Error: {ex}") # Only from block above
221
+
222
+ return success
miaoshouai-assistant/scripts/main.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import modules
2
+ import modules.scripts as scripts
3
+
4
+ from scripts.assistant.miaoshou import MiaoShouAssistant
5
+ from scripts.runtime.msai_runtime import MiaoshouRuntime
6
+
7
+
8
+ class MiaoshouScript(scripts.Script):
9
+ def __init__(self) -> None:
10
+ super().__init__()
11
+
12
+ def title(self):
13
+ return "Miaoshou Assistant"
14
+
15
+ def show(self, is_img2img):
16
+ return scripts.AlwaysVisible
17
+
18
+ def ui(self, is_img2img):
19
+ return ()
20
+
21
+ def postprocess(self, p, processed):
22
+ self.runtime = MiaoshouRuntime()
23
+ self.runtime.mem_release()
24
+ return None
25
+
26
+ assistant = MiaoShouAssistant()
27
+ modules.script_callbacks.on_ui_tabs(assistant.on_event_ui_tabs_opened)
miaoshouai-assistant/scripts/msai_logging/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ __all__ = ["msai_logger"]
miaoshouai-assistant/scripts/msai_logging/msai_logger.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datetime
2
+ import logging
3
+ import logging.handlers
4
+ import os
5
+ import typing as t
6
+
7
+ from scripts.msai_utils.msai_singleton import MiaoshouSingleton
8
+
9
+
10
+ class Logger(metaclass=MiaoshouSingleton):
11
+ _dataset = None
12
+
13
+ KEY_TRACE_PATH = "trace_path"
14
+ KEY_INFO = "info"
15
+ KEY_ERROR = "error"
16
+ KEY_JOB = "job"
17
+
18
+ def _do_init(self, log_folder: str, disable_console_output: bool = False) -> None:
19
+ # Setup trace_path with empty string by default, it will be assigned with valid content if needed
20
+ self._dataset = {Logger.KEY_TRACE_PATH: ""}
21
+
22
+ print(f"logs_location: {log_folder}")
23
+ os.makedirs(log_folder, exist_ok=True)
24
+
25
+ # Setup basic logging configuration
26
+ logging.basicConfig(level=logging.INFO,
27
+ filemode='w',
28
+ format='%(asctime)s - %(filename)s [line:%(lineno)d] - %(levelname)s: %(message)s')
29
+
30
+ # Setup info logging
31
+ self._dataset[Logger.KEY_INFO] = logging.getLogger(Logger.KEY_INFO)
32
+ msg_handler = logging.FileHandler(os.path.join(log_folder, "info.log"),
33
+ "a",
34
+ encoding="UTF-8")
35
+ msg_handler.setLevel(logging.INFO)
36
+ msg_handler.setFormatter(
37
+ logging.Formatter(fmt='%(asctime)s - %(filename)s [line:%(lineno)d] - %(levelname)s: %(message)s'))
38
+ self._dataset[Logger.KEY_INFO].addHandler(msg_handler)
39
+
40
+ # Setup error logging
41
+ self._dataset[Logger.KEY_ERROR] = logging.getLogger(Logger.KEY_ERROR)
42
+ error_handler = logging.FileHandler(
43
+ os.path.join(log_folder, f'error_{datetime.date.today().strftime("%Y%m%d")}.log'),
44
+ mode="a",
45
+ encoding='UTF-8')
46
+ error_handler.setLevel(logging.ERROR)
47
+ error_handler.setFormatter(
48
+ logging.Formatter(
49
+ fmt=f"{self._dataset.get('trace_path')}:\n "
50
+ f"%(asctime)s - %(filename)s [line:%(lineno)d] - %(levelname)s: %(message)s"))
51
+ self._dataset[Logger.KEY_ERROR].addHandler(error_handler)
52
+
53
+ # Setup job logging
54
+ self._dataset[Logger.KEY_JOB] = logging.getLogger(Logger.KEY_JOB)
55
+ job_handler = logging.FileHandler(os.path.join(log_folder, "jobs.log"),
56
+ mode="a",
57
+ encoding="UTF-8")
58
+ self._dataset[Logger.KEY_JOB].addHandler(job_handler)
59
+
60
+ if disable_console_output:
61
+ for k in [Logger.KEY_INFO, Logger.KEY_JOB, Logger.KEY_ERROR]:
62
+ l: logging.Logger = self._dataset[k]
63
+ l.propagate = not disable_console_output
64
+
65
+ def __init__(self, log_folder: str = None, disable_console_output: bool = False) -> None:
66
+ if self._dataset is None:
67
+ try:
68
+ self._do_init(log_folder=log_folder, disable_console_output=disable_console_output)
69
+ except Exception as e:
70
+ print(e)
71
+
72
+ def update_path_info(self, current_path: str) -> None:
73
+ self._dataset[Logger.KEY_TRACE_PATH] = current_path
74
+
75
+ def callback_func(self, exc_type: t.Any, exc_value: t.Any, exc_tracback: t.Any) -> None:
76
+ self._dataset[Logger.KEY_JOB].error(f"job failed for {self._dataset[Logger.KEY_TRACE_PATH]}")
77
+ self._dataset[Logger.KEY_INFO].error(f"{self._dataset[Logger.KEY_TRACE_PATH]}\n, callback_func: ",
78
+ exc_info=(exc_type, exc_value, exc_tracback))
79
+
80
+ def debug(self, fmt, *args, **kwargs) -> None:
81
+ l: logging.Logger = self._dataset[Logger.KEY_INFO]
82
+ l.debug(fmt, *args, **kwargs, stacklevel=2)
83
+
84
+ def info(self, fmt, *args, **kwargs) -> None:
85
+ l: logging.Logger = self._dataset[Logger.KEY_INFO]
86
+ l.info(fmt, *args, **kwargs, stacklevel=2)
87
+
88
+ def warn(self, fmt, *args, **kwargs) -> None:
89
+ l: logging.Logger = self._dataset[Logger.KEY_INFO]
90
+ l.warn(fmt, *args, **kwargs, stacklevel=2)
91
+
92
+ def error(self, fmt, *args, **kwargs) -> None:
93
+ l: logging.Logger = self._dataset[Logger.KEY_ERROR]
94
+ l.error(fmt, *args, **kwargs, stacklevel=2)
95
+
96
+ def job(self, fmt, *args, **kwargs) -> None:
97
+ l: logging.Logger = self._dataset[Logger.KEY_JOB]
98
+ l.info(fmt, *args, **kwargs, stacklevel=2)
99
+
100
+
miaoshouai-assistant/scripts/msai_utils/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ __all__ = ["msai_singleton", "msai_toolkit"]
miaoshouai-assistant/scripts/msai_utils/msai_singleton.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ class MiaoshouSingleton(type):
2
+ _instances = {}
3
+
4
+ def __call__(cls, *args, **kwargs):
5
+ if cls not in cls._instances:
6
+ cls._instances[cls] = super(MiaoshouSingleton, cls).__call__(*args, **kwargs)
7
+ cls._instances[cls].__init__(*args, **kwargs)
8
+ return cls._instances[cls]
miaoshouai-assistant/scripts/msai_utils/msai_toolkit.py ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import platform
4
+ import shutil
5
+ import typing as t
6
+ from datetime import datetime
7
+ from pathlib import Path
8
+
9
+
10
+ def read_json(file) -> t.Any:
11
+ try:
12
+ with open(file, "r", encoding="utf-8-sig") as f:
13
+ return json.load(f)
14
+ except Exception as e:
15
+ print(e)
16
+ return None
17
+
18
+
19
+ def write_json(file, content) -> None:
20
+ try:
21
+ with open(file, 'w') as f:
22
+ json.dump(content, f, indent=4)
23
+ except Exception as e:
24
+ print(e)
25
+
26
+
27
+ def get_args(args) -> t.List[str]:
28
+ parameters = []
29
+ idx = 0
30
+ for arg in args:
31
+ if idx == 0 and '--' not in arg:
32
+ pass
33
+ elif '--' in arg:
34
+ parameters.append(rf'{arg}')
35
+ idx += 1
36
+ else:
37
+ parameters[idx - 1] = parameters[idx - 1] + ' ' + rf'{arg}'
38
+
39
+ return parameters
40
+
41
+
42
+ def get_readable_size(size: int, precision=2) -> str:
43
+ if size is None:
44
+ return ""
45
+
46
+ suffixes = ['B', 'KB', 'MB', 'GB', 'TB']
47
+ suffixIndex = 0
48
+ while size >= 1024 and suffixIndex < len(suffixes):
49
+ suffixIndex += 1 # increment the index of the suffix
50
+ size = size / 1024.0 # apply the division
51
+ return "%.*f%s" % (precision, size, suffixes[suffixIndex])
52
+
53
+
54
+ def get_file_last_modified_time(path_to_file: str) -> datetime:
55
+ if path_to_file is None:
56
+ return datetime.now()
57
+
58
+ if platform.system() == "Windows":
59
+ return datetime.fromtimestamp(os.path.getmtime(path_to_file))
60
+ else:
61
+ stat = os.stat(path_to_file)
62
+ return datetime.fromtimestamp(stat.st_mtime)
63
+
64
+
65
+ def get_not_found_image_url() -> str:
66
+ return "https://msdn.miaoshouai.com/msdn/userimage/not-found.svg"
67
+
68
+
69
+ def get_user_temp_dir() -> str:
70
+ return os.path.join(Path.home().absolute(), ".miaoshou_assistant_download")
71
+
72
+
73
+ def assert_user_temp_dir() -> None:
74
+ os.makedirs(get_user_temp_dir(), exist_ok=True)
75
+
76
+
77
+ def move_file(src: str, dst: str) -> None:
78
+ if not src or not dst:
79
+ return
80
+
81
+ if not os.path.exists(src):
82
+ return
83
+
84
+ if os.path.exists(dst):
85
+ os.remove(dst)
86
+
87
+ os.makedirs(os.path.dirname(dst), exist_ok=True)
88
+ shutil.move(src, dst)
miaoshouai-assistant/scripts/runtime/__init__.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ __all__ = ["msai_prelude", "msai_runtime"]
2
+
3
+ from . import msai_prelude as prelude
4
+
5
+ prelude.MiaoshouPrelude().load()
miaoshouai-assistant/scripts/runtime/msai_prelude.py ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import platform
3
+ import sys
4
+ import typing as t
5
+
6
+ import psutil
7
+ import torch
8
+
9
+ import launch
10
+ from modules import shared
11
+ from scripts.msai_logging.msai_logger import Logger
12
+ from scripts.msai_utils import msai_toolkit as toolkit
13
+ from scripts.msai_utils.msai_singleton import MiaoshouSingleton
14
+ import modules
15
+
16
+
17
+ class MiaoshouPrelude(metaclass=MiaoshouSingleton):
18
+ _dataset = None
19
+
20
+ def __init__(self) -> None:
21
+ # Potential race condition, not call in multithread environment
22
+ if MiaoshouPrelude._dataset is None:
23
+ self._init_constants()
24
+
25
+ MiaoshouPrelude._dataset = {
26
+ "log_folder": os.path.join(self.ext_folder, "logs")
27
+ }
28
+
29
+ disable_log_console_output: bool = False
30
+ if self.all_settings.get("boot_settings"):
31
+ if self.all_settings["boot_settings"].get("disable_log_console_output") is not None:
32
+ disable_log_console_output = self.all_settings["boot_settings"].get("disable_log_console_output")
33
+
34
+ self._logger = Logger(self._dataset["log_folder"], disable_console_output=disable_log_console_output)
35
+
36
+ def _init_constants(self) -> None:
37
+ self._api_url = {
38
+ "civitai.com": "https://model-share.com/v1/models",
39
+ "liandange.com": "https://model-api.liandange.com/model/api/models",
40
+ }
41
+ self._ext_folder = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".."))
42
+ self._setting_file = os.path.join(self.ext_folder, "configs", "settings.json")
43
+ self._model_hash_file = os.path.join(self.ext_folder, "configs", "model_hash.json")
44
+ self._gpt_index = os.path.join(self.ext_folder, "configs", "gpt_index.json")
45
+ self._assets_folder = os.path.join(self.ext_folder, "assets")
46
+ self._cache_folder = os.path.join(self.ext_folder, "cache")
47
+ self._cover_folder = os.path.join(self.ext_folder, "covers")
48
+ self._no_preview_img = os.path.join(modules.paths.script_path, "html", "card-no-preview.png")
49
+ self._model_json = {
50
+ 'civitai.com': os.path.join(self.ext_folder, 'configs', 'civitai_models.json'),
51
+ 'liandange.com': os.path.join(self.ext_folder, 'configs', 'liandange_models.json'),
52
+ 'official_models': os.path.join(self.ext_folder, 'configs', 'official_models.json'),
53
+ 'hugging_face': os.path.join(self.ext_folder, 'configs', 'hugging_face.json'),
54
+ 'controlnet': os.path.join(self.ext_folder, 'configs', 'controlnet.json')
55
+ }
56
+ self._checkboxes = {
57
+ 'Enable xFormers': '--xformers',
58
+ 'No Half': '--no-half',
59
+ 'No Half VAE': '--no-half-vae',
60
+ 'Enable API': '--api',
61
+ 'Auto Launch': '--autolaunch',
62
+ 'Allow Local Network Access': '--listen',
63
+ }
64
+
65
+ self._gpu_setting = {
66
+ 'CPU Only': '--precision full --no-half --use-cpu SD GFPGAN BSRGAN ESRGAN SCUNet CodeFormer --all',
67
+ 'GTX 16xx': '--lowvram --xformers --precision full --no-half',
68
+ 'Low: 4-6G VRAM': '--xformers --lowvram',
69
+ 'Med: 6-8G VRAM': '--xformers --medvram',
70
+ 'Normal: 8+G VRAM': '',
71
+ }
72
+
73
+ self._theme_setting = {
74
+ 'Auto': '',
75
+ 'Light Mode': '--theme light',
76
+ 'Dark Mode': '--theme dark',
77
+ }
78
+ self._ENV_EXCLUSION = ['COLAB_GPU', 'RUNPOD_POD_ID']
79
+ self._model_type = {'Checkpoint': f'{os.path.join(shared.models_path,"Stable-diffusion")}',
80
+ 'LORA': f'{os.path.join(shared.models_path,"Lora")}',
81
+ 'LoCon': f'{os.path.join(shared.models_path, "LyCORIS")}',
82
+ "TextualInversion": f'{os.path.join(shared.script_path,"embeddings")}',
83
+ "Hypernetwork": f'{os.path.join(shared.models_path,"hypernetworks")}'
84
+ }
85
+
86
+ self._gpt_type = ['gpt-3.5-turbo', 'text-davinci-003']
87
+
88
+ @property
89
+ def ext_folder(self) -> str:
90
+ return self._ext_folder
91
+
92
+ @property
93
+ def log_folder(self) -> str:
94
+ return self._dataset.get("log_folder")
95
+
96
+ @property
97
+ def all_settings(self) -> t.Any:
98
+ return toolkit.read_json(self._setting_file)
99
+
100
+ @property
101
+ def boot_settings(self) -> t.Any:
102
+ all_setting = self.all_settings
103
+ if all_setting:
104
+ return all_setting['boot_settings']
105
+ else:
106
+ return None
107
+
108
+ def api_url(self, model_source: str) -> t.Optional[str]:
109
+ return self._api_url.get(model_source)
110
+
111
+ @property
112
+ def setting_file(self) -> str:
113
+ return self._setting_file
114
+
115
+ @property
116
+ def ENV_EXCLUSION(self) -> list[str]:
117
+ return self._ENV_EXCLUSION
118
+
119
+ @property
120
+ def model_hash_file(self) -> str:
121
+ return self._model_hash_file
122
+
123
+ @property
124
+ def gpt_index(self) -> str:
125
+ return self._gpt_index
126
+
127
+ @property
128
+ def cache_folder(self) -> str:
129
+ return self._cache_folder
130
+
131
+ @property
132
+ def assets_folder(self) -> str:
133
+ return self._assets_folder
134
+
135
+ @property
136
+ def cover_folder(self) -> str:
137
+ return self._cover_folder
138
+
139
+ @property
140
+ def no_preview_img(self) -> str:
141
+ return self._no_preview_img
142
+
143
+ @property
144
+ def checkboxes(self) -> t.Dict[str, str]:
145
+ return self._checkboxes
146
+
147
+ @property
148
+ def gpu_setting(self) -> t.Dict[str, str]:
149
+ return self._gpu_setting
150
+
151
+ @property
152
+ def theme_setting(self) -> t.Dict[str, str]:
153
+ return self._theme_setting
154
+
155
+ @property
156
+ def model_type(self) -> t.Dict[str, str]:
157
+ return self._model_type
158
+
159
+ @property
160
+ def gpt_type(self) -> t.Dict[str, str]:
161
+ return self._gpt_type
162
+
163
+ @property
164
+ def model_json(self) -> t.Dict[str, t.Any]:
165
+ return self._model_json
166
+
167
+ def update_model_json(self, site: str, models: t.Dict[str, t.Any]) -> None:
168
+ if self._model_json.get(site) is None:
169
+ self._logger.error(f"cannot save model info for {site}")
170
+ return
171
+
172
+ self._logger.info(f"{self._model_json[site]} updated")
173
+ toolkit.write_json(self._model_json[site], models)
174
+
175
+ def load(self) -> None:
176
+ self._logger.info("start to do prelude")
177
+ self._logger.info(f"cmdline args: {' '.join(sys.argv[1:])}")
178
+
179
+ @classmethod
180
+ def get_sys_info(cls) -> str:
181
+ sys_info = 'System Information\n\n'
182
+
183
+ sys_info += r'OS Name: {0} {1}'.format(platform.system(), platform.release()) + '\n'
184
+ sys_info += r'OS Version: {0}'.format(platform.version()) + '\n'
185
+ sys_info += r'WebUI Version: {0}'.format(
186
+ f'https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/{launch.commit_hash()}') + '\n'
187
+ sys_info += r'Torch Version: {0}'.format(getattr(torch, '__long_version__', torch.__version__)) + '\n'
188
+ sys_info += r'Python Version: {0}'.format(sys.version) + '\n\n'
189
+ sys_info += r'CPU: {0}'.format(platform.processor()) + '\n'
190
+ sys_info += r'CPU Cores: {0}/{1}'.format(psutil.cpu_count(logical=False), psutil.cpu_count(logical=True)) + '\n'
191
+
192
+ try:
193
+ sys_info += r'CPU Frequency: {0} GHz'.format(round(psutil.cpu_freq().max/1000,2)) + '\n'
194
+ except Exception as e:
195
+ sys_info += r'CPU Frequency: N/A GHz' + '\n'
196
+
197
+ sys_info += r'CPU Usage: {0}%'.format(psutil.cpu_percent()) + '\n\n'
198
+ sys_info += r'RAM: {0}'.format(toolkit.get_readable_size(psutil.virtual_memory().total)) + '\n'
199
+ sys_info += r'Memory Usage: {0}%'.format(psutil.virtual_memory().percent) + '\n\n'
200
+ for i in range(torch.cuda.device_count()):
201
+ sys_info += r'Graphics Card{0}: {1} ({2})'.format(i, torch.cuda.get_device_properties(i).name,
202
+ toolkit.get_readable_size(
203
+ torch.cuda.get_device_properties(
204
+ i).total_memory)) + '\n'
205
+ sys_info += r'Available VRAM: {0}'.format(toolkit.get_readable_size(torch.cuda.mem_get_info(i)[0])) + '\n'
206
+
207
+ return sys_info
208
+
209
+
miaoshouai-assistant/scripts/runtime/msai_runtime.py ADDED
@@ -0,0 +1,1232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datetime
2
+ import fileinput
3
+ import os
4
+ import platform
5
+ import re
6
+ import shutil
7
+ import sys
8
+ import io
9
+ import time
10
+ import typing as t
11
+ import gzip
12
+ import git
13
+ import gradio as gr
14
+ import requests
15
+ from bs4 import BeautifulSoup
16
+ import subprocess
17
+ import modules
18
+ import random
19
+ from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper
20
+ import openai
21
+ import gc
22
+ import json
23
+ #import tkinter as tk
24
+ #from tkinter import filedialog, ttk
25
+ import modules.devices as devices
26
+ import torch
27
+ from numba import cuda
28
+ from modules import shared, sd_hijack, sd_samplers, processing
29
+ from modules.sd_models import CheckpointInfo
30
+ from scripts.download.msai_downloader_manager import MiaoshouDownloaderManager
31
+ from scripts.msai_logging.msai_logger import Logger
32
+ from scripts.msai_utils import msai_toolkit as toolkit
33
+ from scripts.runtime.msai_prelude import MiaoshouPrelude
34
+
35
+
36
+ class MiaoshouRuntime(object):
37
+ def __init__(self):
38
+ self.cmdline_args: t.List[str] = None
39
+ self.logger = Logger()
40
+ self.prelude = MiaoshouPrelude()
41
+ self._old_additional: str = None
42
+ self._model_set: t.List[t.Dict] = None
43
+ self._my_model_set: t.List[t.Dict] = None
44
+ self._active_model_set: str = None
45
+ self._model_set_last_access_time: datetime.datetime = None
46
+ self._my_model_set_last_access_time: datetime.datetime = None
47
+ self._ds_models: gr.Dataset = None
48
+ self._ds_cover_gallery: gr.Dataset = None
49
+ self._ds_my_models: gr.Dataset = None
50
+ self._ds_my_model_covers: gr.Dataset = None
51
+ self._allow_nsfw: bool = False
52
+ self._model_source: str = "civitai.com" # civitai is the default model source
53
+ self._my_model_source: str = "civitai.com"
54
+ self._git_address: str = "https://github.com/miaoshouai/miaoshouai-assistant.git"
55
+
56
+ # TODO: may be owned by downloader class
57
+ self.model_files = []
58
+
59
+ self.downloader_manager = MiaoshouDownloaderManager()
60
+
61
+
62
+ def get_default_args(self, commandline_args: t.List[str] = None):
63
+ if commandline_args is None:
64
+ commandline_args: t.List[str] = toolkit.get_args(sys.argv[1:])
65
+ commandline_args = list(map(lambda x: x.replace('theme=', 'theme '), commandline_args))
66
+ self.cmdline_args = list(dict.fromkeys(commandline_args))
67
+
68
+ self.logger.info(f"default commandline args: {commandline_args}")
69
+
70
+ checkbox_values = []
71
+ additional_args = ""
72
+ saved_setting = self.prelude.boot_settings
73
+
74
+ gpu = saved_setting.get('drp_args_vram')
75
+ theme = saved_setting.get('drp_args_theme')
76
+ port = saved_setting.get('txt_args_listen_port')
77
+
78
+ for arg in commandline_args:
79
+ if 'theme' in arg:
80
+ theme = [k for k, v in self.prelude.theme_setting.items() if v == arg][0]
81
+ if 'port' in arg:
82
+ port = arg.split(' ')[-1]
83
+
84
+ for chk in self.prelude.checkboxes:
85
+ for arg in commandline_args:
86
+ if self.prelude.checkboxes[chk] == arg and chk not in checkbox_values:
87
+ checkbox_values.append(chk)
88
+
89
+ gpu_arg_list = [f'--{i.strip()}' for i in ' '.join(list(self.prelude.gpu_setting.values())).split('--')]
90
+ for arg in commandline_args:
91
+ if 'port' not in arg \
92
+ and arg not in list(self.prelude.theme_setting.values()) \
93
+ and arg not in list(self.prelude.checkboxes.values()) \
94
+ and arg not in gpu_arg_list:
95
+ additional_args += (' ' + rf'{arg}')
96
+
97
+ self._old_additional = additional_args
98
+ webui_ver = saved_setting['drp_choose_version']
99
+
100
+ return gpu, theme, port, checkbox_values, additional_args.replace('\\', '\\\\').strip(), webui_ver
101
+
102
+ def add_arg(self, args: str = "") -> None:
103
+ for arg in args.split('--'):
104
+ if f"--{arg.strip()}" not in self.cmdline_args and arg.strip() != '':
105
+ self.logger.info(f'add arg: {arg.strip()}')
106
+ self.cmdline_args.append(f'--{arg.strip()}')
107
+
108
+ #remove duplicates
109
+ self.cmdline_args = list(dict.fromkeys(self.cmdline_args))
110
+ #print('added dup',self.cmdline_args)
111
+
112
+ def remove_arg(self, args: str = "") -> None:
113
+ arg_keywords = ['port', 'theme']
114
+
115
+ for arg in args.split('--'):
116
+ if arg in arg_keywords:
117
+ for cmdl in self.cmdline_args:
118
+ if arg in cmdl:
119
+ self.cmdline_args.remove(cmdl)
120
+ break
121
+ elif f'--{arg.strip()}' in self.cmdline_args and arg.strip() != '':
122
+ self.cmdline_args.remove(f'--{arg.strip()}')
123
+
124
+ # remove duplicates
125
+ self.cmdline_args = list(dict.fromkeys(self.cmdline_args))
126
+ #print('removed dup',self.cmdline_args)
127
+
128
+ def get_final_args(self, gpu, theme, port, checkgroup, more_args) -> None:
129
+ # remove duplicates
130
+ self.cmdline_args = list(dict.fromkeys(self.cmdline_args))
131
+ # gpu settings
132
+ for s1 in self.prelude.gpu_setting:
133
+ if s1 in gpu:
134
+ for s2 in self.prelude.gpu_setting:
135
+ if s2 != s1:
136
+ self.remove_arg(self.prelude.gpu_setting[s2])
137
+ self.add_arg(self.prelude.gpu_setting[s1])
138
+
139
+ if port != '7860':
140
+ self.add_arg(f'--port {port}')
141
+ else:
142
+ self.remove_arg('--port')
143
+
144
+ # theme settings
145
+ self.remove_arg('--theme')
146
+ for t in self.prelude.theme_setting:
147
+ if t == theme:
148
+ self.add_arg(self.prelude.theme_setting[t])
149
+ break
150
+
151
+ # check box settings
152
+ for chked in checkgroup:
153
+ self.logger.info(f'checked:{self.prelude.checkboxes[chked]}')
154
+ self.add_arg(self.prelude.checkboxes[chked])
155
+
156
+ for unchk in list(set(list(self.prelude.checkboxes.keys())) - set(checkgroup)):
157
+ print(f'unchecked:{unchk}')
158
+ self.remove_arg(self.prelude.checkboxes[unchk])
159
+
160
+ # additional commandline settings
161
+ self.remove_arg(self._old_additional)
162
+ self.add_arg(more_args.replace('\\\\', '\\'))
163
+ self._old_additional = more_args.replace('\\\\', '\\')
164
+
165
+ def refresh_all_models(self) -> None:
166
+ self.install_preset_models_if_needed(True)
167
+ if self.ds_models:
168
+ self.ds_models.samples = self.model_set
169
+ self.ds_models.update(samples=self.model_set)
170
+ else:
171
+ self.logger.error(f"ds models is null")
172
+
173
+ def get_images_html(self, search: str = '', chk_nsfw: bool = False, model_type: str = 'All') -> t.List[str]:
174
+ self.logger.info(f"get_image_html: model_type = {model_type}, and search pattern = '{search}'")
175
+
176
+ model_cover_thumbnails = []
177
+ model_format = []
178
+
179
+ if self.model_set is None:
180
+ self.logger.error("model_set is null")
181
+ return []
182
+
183
+ self.logger.info(f"{len(self.model_set)} items inside '{self.model_source}'")
184
+
185
+ search = search.lower()
186
+ for model in self.model_set:
187
+ try:
188
+ if model.get('type') is not None \
189
+ and model.get('type') not in model_format:
190
+ model_format.append(model['type'])
191
+
192
+ if search == '' or \
193
+ (model.get('name') is not None and search.lower() in model.get('name').lower()) \
194
+ or (model.get('description') is not None and search.lower() in model.get('description').lower()):
195
+
196
+ self._allow_nsfw = chk_nsfw
197
+ if (model_type == 'All' or model_type in model.get('type')) \
198
+ and (self.allow_nsfw or (not self.allow_nsfw and not model.get('nsfw'))):
199
+ model_cover_thumbnails.append([
200
+ [f"""
201
+ <div style="display: flex; align-items: center;">
202
+ <div id="{str(model.get('id'))}" style="margin-right: 10px;" class="model-item">
203
+ <img referrerpolicy="no-referrer" src="{model['modelVersions'][0]['images'][0]['url'].replace('width=450', 'width=100')}" style="width:100px;">
204
+ </div>
205
+ <div style="flex:1; width:100px;">
206
+ <h3 style="text-align:left; word-wrap:break-word;">{model.get('name')}</h3>
207
+ <p style="text-align:left;">Type: {model.get('type')}</p>
208
+ <p style="text-align:left;">Rating: {model.get('stats')['rating']}</p>
209
+ </div>
210
+ </div>
211
+ """],
212
+ model['id']])
213
+ except Exception:
214
+ continue
215
+
216
+ return model_cover_thumbnails
217
+
218
+ # TODO: add typing hint
219
+ def update_boot_settings(self, version, drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args, auto_vram):
220
+ boot_settings = self.prelude.boot_settings
221
+ boot_settings['drp_args_vram'] = drp_gpu
222
+ boot_settings["drp_args_theme"] = drp_theme
223
+ boot_settings['txt_args_listen_port'] = txt_listen_port
224
+ for chk in chk_group_args:
225
+ self.logger.debug(chk)
226
+ boot_settings[chk] = self.prelude.checkboxes[chk]
227
+ boot_settings['txt_args_more'] = additional_args
228
+ boot_settings['drp_choose_version'] = version
229
+ boot_settings['auto_vram'] = auto_vram
230
+
231
+ all_settings = self.prelude.all_settings
232
+ all_settings['boot_settings'] = boot_settings
233
+
234
+ toolkit.write_json(self.prelude.setting_file, all_settings)
235
+
236
+ def update_boot_setting(self, setting, value):
237
+ boot_settings = self.prelude.boot_settings
238
+ boot_settings[setting] = value
239
+
240
+ all_settings = self.prelude.all_settings
241
+ all_settings['boot_settings'] = boot_settings
242
+ toolkit.write_json(self.prelude.setting_file, all_settings)
243
+
244
+ def change_auto_vram(self, auto_vram):
245
+ self.update_boot_setting('auto_vram', auto_vram)
246
+
247
+ def mem_release(self):
248
+ try:
249
+ gc.collect()
250
+ devices.torch_gc()
251
+ torch.cuda.empty_cache()
252
+ gc.collect()
253
+
254
+ print('Miaoshouai boot assistant: Memory Released!')
255
+ except:
256
+ print('Miaoshouai boot assistant: Memory Release Failed...!')
257
+
258
+ def force_mem_release(self):
259
+ try:
260
+ if hasattr(sd_samplers, "create_sampler_original_md"):
261
+ sd_samplers.create_sampler = sd_samplers.create_sampler_original_md
262
+ del sd_samplers.create_sampler_original_md
263
+ if hasattr(processing, "create_random_tensors_original_md"):
264
+ processing.create_random_tensors = processing.create_random_tensors_original_md
265
+ del processing.create_random_tensors_original_md
266
+
267
+ cuda.select_device(0)
268
+ cuda.close()
269
+ cuda.select_device(0)
270
+ self.mem_release()
271
+ msg = 'Memory Released! (May not work if you already got CUDA out of memory error)'
272
+ except Exception as e:
273
+ msg = f'Memory Release Failed! ({str(e)})'
274
+
275
+ return gr.Markdown.update(visible=True, value=msg)
276
+
277
+ return gr.Markdown.update(visible=True, value=msg)
278
+ def get_all_models(self, site: str) -> t.Any:
279
+ return toolkit.read_json(self.prelude.model_json[site])
280
+
281
+ def update_model_json(self, site: str, models: t.Any) -> None:
282
+ toolkit.write_json(self.prelude.model_json[site], models)
283
+
284
+ def get_hash_from_json(self, chk_point: CheckpointInfo) -> CheckpointInfo:
285
+ model_hashes = toolkit.read_json(self.prelude.model_hash_file)
286
+
287
+ if len(model_hashes) == 0 or chk_point.title not in model_hashes.keys():
288
+ chk_point.shorthash = self.calculate_shorthash(chk_point)
289
+ model_hashes[chk_point.title] = chk_point.shorthash
290
+ toolkit.write_json(self.prelude.model_hash_file, model_hashes)
291
+ else:
292
+ chk_point.shorthash = model_hashes[chk_point.title]
293
+
294
+ return chk_point
295
+
296
+ def calculate_shorthash(self, chk_point: CheckpointInfo):
297
+ if chk_point.sha256 is None:
298
+ return
299
+ else:
300
+ return chk_point.sha256[0:10]
301
+
302
+
303
+ def update_my_model_type(self, search_txt, model_type) -> t.Dict:
304
+ my_models = self.get_local_models(search_txt, model_type)
305
+ self.ds_my_models.samples = my_models
306
+
307
+ return gr.Dataset.update(samples=my_models)
308
+
309
+ def get_local_models(self, search_txt='', model_type='Checkpoint') -> t.List[t.Any]:
310
+ models = []
311
+
312
+ for root, dirs, files in os.walk(self.prelude.model_type[model_type]):
313
+ for file in files:
314
+ mpath = os.path.join(root, file)
315
+
316
+ fname, ext = os.path.splitext(file)
317
+ if ext in ['.ckpt', '.safetensors', '.pt'] and file != 'scaler.pt' and (search_txt in fname or search_txt == ''):
318
+ chkpt_info = modules.sd_models.get_closet_checkpoint_match(file)
319
+ if chkpt_info is None:
320
+ chkpt_info = CheckpointInfo(os.path.join(root, file))
321
+
322
+ if chkpt_info.sha256 is None and chkpt_info.shorthash is None:
323
+ chkpt_info = self.get_hash_from_json(chkpt_info)
324
+
325
+ model_info = self.search_model_info(chkpt_info, mpath, model_type)
326
+ fname = re.sub(r'\[.*?\]', "", chkpt_info.title)
327
+
328
+ if model_info is not None:
329
+ models.append(model_info)
330
+ else:
331
+ self.logger.info(
332
+ f"{chkpt_info.title}, {chkpt_info.hash}, {chkpt_info.shorthash}, {chkpt_info.sha256}")
333
+ models.append([
334
+ self.prelude.no_preview_img,
335
+ 0,
336
+ [os.path.basename(fname)],
337
+ [mpath.replace(self.prelude.model_type[model_type]+'\\', '')]])
338
+
339
+ return models
340
+
341
+
342
+ def refresh_local_models(self, search_txt, model_type) -> t.Dict:
343
+ my_models = self.get_local_models(search_txt, model_type)
344
+ self.ds_my_models.samples = my_models
345
+
346
+ return gr.Dataset.update(samples=my_models)
347
+
348
+ def delete_model(self, model, search_txt, model_type):
349
+ fname = model[3][0]
350
+ mfolder = self.prelude.model_type[model_type]
351
+ mpapth = os.path.join(mfolder, fname)
352
+
353
+ os.remove(mpapth)
354
+ my_models = self.get_local_models(search_txt, model_type)
355
+ self.ds_my_models.samples = my_models
356
+
357
+ return gr.Dataset.update(samples=my_models)
358
+
359
+ def set_all_covers(self, search_txt, model_type):
360
+ for model in self.ds_my_models.samples:
361
+ try:
362
+ if model[0] == self.prelude.no_preview_img and model[1] != 0:
363
+ img_list, l1, htmlDetail, h2 = self.get_model_info(model)
364
+ soup = BeautifulSoup(img_list[0][0])
365
+ cover_url = soup.findAll('img')[0]['src'].replace('width=150', 'width=450')
366
+
367
+ fname = model[3][0]
368
+ mname, ext = os.path.splitext(fname)
369
+ mfolder = self.prelude.model_type[model_type]
370
+ dst = os.path.join(mfolder, f'{mname}.jpg')
371
+
372
+ if fname is not None and not os.path.exists(dst):
373
+ if self.my_model_source == 'liandange.com':
374
+ cover_url = soup.findAll('img')[0]['src'].replace('/w/150', '/w/450')
375
+ r = requests.get(cover_url, timeout=30, stream=True)
376
+ r.raw.decode_content = True
377
+ with open(dst, 'wb') as f:
378
+ shutil.copyfileobj(r.raw, f)
379
+ except Exception as e:
380
+ print(model[1], cover_url, dst, str(e))
381
+ continue
382
+
383
+ my_models = self.get_local_models(search_txt, model_type)
384
+ self.ds_my_models.samples = my_models
385
+
386
+ return gr.Dataset.update(samples=my_models)
387
+
388
+ def set_cover(self, model, cover, search_txt, model_type):
389
+ fname = model[3][0]
390
+ mname, ext = os.path.splitext(fname)
391
+ mfolder = self.prelude.model_type[model_type]
392
+
393
+ dst = os.path.join(mfolder, f'{mname}.jpg')
394
+ cover.save(dst)
395
+
396
+ my_models = self.get_local_models(search_txt, model_type)
397
+ self.ds_my_models.samples = my_models
398
+
399
+ return gr.Dataset.update(samples=my_models)
400
+
401
+
402
+
403
+ def search_model_info(self, chkpt_info: CheckpointInfo, mpath: str, model_type: str) -> t.Optional[t.List[t.Any]]:
404
+
405
+ lookup_sha256 = chkpt_info.sha256
406
+ lookup_shash = chkpt_info.shorthash
407
+ fname = re.sub(r'\[.*?\]', "", chkpt_info.title)
408
+ if '\\' in fname:
409
+ fname = fname.split('\\')[-1]
410
+
411
+ self.logger.info(f"lookup_sha256: {lookup_sha256}, lookup_shash: {lookup_shash}, fname: {fname}")
412
+
413
+ res = None
414
+ if lookup_sha256 is None and lookup_shash is None and fname is None:
415
+ return None
416
+
417
+ prefix, ext = os.path.splitext(mpath)
418
+
419
+ if os.path.exists(f'{prefix}.jpg'):
420
+ cover_img = os.path.join(os.path.dirname(mpath), f'{os.path.basename(prefix)}.jpg')
421
+ elif os.path.exists(f'{prefix}.png'):
422
+ cover_img = os.path.join(os.path.dirname(mpath), f'{os.path.basename(prefix)}.png')
423
+ elif os.path.exists(f'{prefix}.webp'):
424
+ cover_img = os.path.join(os.path.dirname(mpath), f'{os.path.basename(prefix)}.webp')
425
+ else:
426
+ cover_img = self.prelude.no_preview_img
427
+
428
+ if not os.path.exists(self.prelude.cover_folder):
429
+ os.mkdir(self.prelude.cover_folder)
430
+
431
+ dst = os.path.join(self.prelude.cover_folder, os.path.basename(cover_img))
432
+ try:
433
+ if cover_img != self.prelude.no_preview_img and os.path.exists(cover_img) and os.path.exists(dst):
434
+ dst_size = os.stat(dst).st_size
435
+ cover_size = os.stat(cover_img).st_size
436
+ if dst_size != cover_size:
437
+ print('update to new cover')
438
+ shutil.copyfile(cover_img, dst)
439
+ elif cover_img != self.prelude.no_preview_img and os.path.exists(cover_img) and not os.path.exists(dst):
440
+ shutil.copyfile(cover_img, dst)
441
+ elif cover_img == self.prelude.no_preview_img:
442
+ dst = cover_img
443
+ except Exception as e:
444
+ dst = self.prelude.no_preview_img
445
+
446
+ for model in self.my_model_set:
447
+ match = False
448
+
449
+ for ver in model['modelVersions']:
450
+ for file in ver['files']:
451
+ if fname == file['name']:
452
+ match = True
453
+ elif lookup_sha256 is not None and 'SHA256' in file['hashes'].keys():
454
+ match = (lookup_sha256.upper() == file['hashes']['SHA256'].upper())
455
+ elif lookup_shash is not None:
456
+ match = (lookup_shash[:10].upper() in [h.upper() for h in file['hashes'].values()])
457
+
458
+ if match:
459
+ mid = model['id']
460
+
461
+ res = [
462
+ dst,
463
+ mid,
464
+ [f"{model['name']}/{ver['name']}"],
465
+ [mpath.replace(self.prelude.model_type[model_type]+'\\', '')]
466
+ ]
467
+
468
+ if match:
469
+ break
470
+
471
+ return res
472
+
473
+ def update_xformers(self, gpu, checkgroup):
474
+ if '--xformers' in self.prelude.gpu_setting[gpu]:
475
+ if 'Enable xFormers' not in checkgroup:
476
+ checkgroup.append('Enable xFormers')
477
+
478
+ return checkgroup
479
+
480
+ def set_nsfw(self, search='', nsfw_checker=False, model_type='All') -> t.Dict:
481
+ self._allow_nsfw = nsfw_checker
482
+ new_list = self.get_images_html(search, model_type)
483
+ if self._ds_models is None:
484
+ self.logger.error(f"_ds_models is not initialized")
485
+ return {}
486
+
487
+ self._ds_models.samples = new_list
488
+ return self._ds_models.update(samples=new_list)
489
+
490
+ def search_model(self, search='', chk_nsfw=False, model_type='All') -> t.Dict:
491
+ if self._ds_models is None:
492
+ self.logger.error(f"_ds_models is not initialized")
493
+ return {}
494
+
495
+ new_list = self.get_images_html(search, chk_nsfw, model_type)
496
+
497
+ self._ds_models.samples = new_list
498
+ return self._ds_models.update(samples=new_list)
499
+
500
+ def search_my_model(self, search_txt='', model_type='Checkpoint') -> t.Dict:
501
+ if self._ds_models is None:
502
+ self.logger.error(f"_ds_models is not initialized")
503
+ return {}
504
+
505
+ new_list = self.get_local_models(search_txt, model_type)
506
+
507
+ self._ds_my_models.samples = new_list
508
+ return self._ds_my_models.update(samples=new_list)
509
+
510
+ def get_model_byid(self, mid, model_source) -> t.List:
511
+ response = requests.get(self.prelude.api_url(model_source) + f'/{mid}')
512
+ payload = response.json()
513
+ if payload.get("success") is not None and not payload.get("success"):
514
+ return []
515
+
516
+ return [payload]
517
+
518
+ def get_model_info(self, models) -> t.Tuple[t.List[t.List[str]], t.Dict, str, t.Dict]:
519
+ drop_list = []
520
+ cover_imgs = []
521
+ htmlDetail = "<div><p>No info found</p></div>"
522
+
523
+ mid = models[1]
524
+
525
+ # TODO: use map to enhance the performances
526
+ if self.active_model_set == 'model_set':
527
+ if self.model_source == "civitai.com" or self.model_source == "liandange.com":
528
+ m_list = self.get_model_byid(mid, self.model_source)
529
+ else:
530
+ m_list = [e for e in self.model_set if e['id'] == mid]
531
+ else:
532
+ if self.my_model_source == "civitai.com" or self.my_model_source == "liandange.com":
533
+ m_list = self.get_model_byid(mid, self.my_model_source)
534
+ self._allow_nsfw = True
535
+ else:
536
+ m_list = [e for e in self.my_model_set if e['id'] == mid]
537
+
538
+ if m_list is not None and len(m_list) > 0:
539
+ m = m_list[0]
540
+ else:
541
+ return [[]], {}, htmlDetail, {}
542
+
543
+ self.model_files.clear()
544
+
545
+ download_url_by_default = None
546
+ if m and m.get('modelVersions') and len(m.get('modelVersions')) > 0:
547
+ latest_version = m['modelVersions'][0]
548
+
549
+ if latest_version.get('images') and isinstance(latest_version.get('images'), list):
550
+ for img in latest_version['images']:
551
+ if self.allow_nsfw or (not self.allow_nsfw and (not img.get('nsfw') or img.get('nsfw') in ['None', 'Soft'])):
552
+ if img.get('url'):
553
+ cover_imgs.append([f'<img referrerpolicy="no-referrer" src="{img["url"].replace("width=450","width=150").replace("/w/100", "/w/150")}" style="width:150px;">'])
554
+
555
+ if latest_version.get('files') and isinstance(latest_version.get('files'), list):
556
+ for file in latest_version['files']:
557
+ # error checking for mandatory fields
558
+ if file.get('id') is not None and file.get('downloadUrl') is not None:
559
+ item_name = None
560
+ if file.get('name'):
561
+ item_name = file.get('name')
562
+ if not item_name and latest_version.get('name'):
563
+ item_name = latest_version['name']
564
+ if not item_name:
565
+ item_name = "unknown"
566
+
567
+ self.model_files.append({
568
+ "id:": file['id'],
569
+ "url": file['downloadUrl'],
570
+ "name": item_name,
571
+ "type": m['type'] if m.get('type') else "unknown",
572
+ "size": file['sizeKB'] * 1024 if file.get('sizeKB') else "unknown",
573
+ "format": file['format'] if file.get('format') else "unknown",
574
+ "cover": cover_imgs[0][0] if len(cover_imgs) > 0 else toolkit.get_not_found_image_url(),
575
+ })
576
+ file_size = toolkit.get_readable_size(file['sizeKB'] * 1024) if file.get('sizeKB') else ""
577
+ if file_size:
578
+ drop_list.append(f"{item_name} ({file_size})")
579
+ else:
580
+ drop_list.append(f"{item_name}")
581
+
582
+ if not download_url_by_default:
583
+ download_url_by_default = file.get('downloadUrl')
584
+
585
+ htmlDetail = '<div>'
586
+ if m.get('name'):
587
+ htmlDetail += f"<h1>{m['name']}</h1></br>"
588
+ if m.get('stats') and m.get('stats').get('downloadCount'):
589
+ htmlDetail += f"<p>Downloads: {m['stats']['downloadCount']}</p>"
590
+ if m.get('stats') and m.get('stats').get('rating'):
591
+ htmlDetail += f"<p>Rating: {m['stats']['rating']}</p>"
592
+ if m.get('creator') and m.get('creator').get('username'):
593
+ htmlDetail += f"<p>Author: {m['creator']['username']}</p></div></br></br>"
594
+ if latest_version.get('name'):
595
+ htmlDetail += f"<div><table><tbody><tr><td>Version:</td><td>{latest_version['name']}</td></tr>"
596
+ if latest_version.get('updatedAt'):
597
+ htmlDetail += f"<tr><td>Updated Time:</td><td>{latest_version['updatedAt']}</td></tr>"
598
+ if m.get('type'):
599
+ htmlDetail += f"<tr><td>Type:</td><td>{m['type']}</td></tr>"
600
+ if latest_version.get('baseModel'):
601
+ htmlDetail += f"<tr><td>Base Model:</td><td>{latest_version['baseModel']}</td></tr>"
602
+ htmlDetail += f"<tr><td>NFSW:</td><td>{m.get('nsfw') if m.get('nsfw') is not None else 'false'}</td></tr>"
603
+ if m.get('tags') and isinstance(m.get('tags'), list):
604
+ htmlDetail += f"<tr><td>Tags:</td><td>"
605
+ for t in m['tags']:
606
+ htmlDetail += f'<span style="margin-right:5px>{t}</span>'
607
+ htmlDetail += "</td></tr>"
608
+ if latest_version.get('trainedWords'):
609
+ htmlDetail += f"<tr><td>Trigger Words:</td><td>"
610
+ for t in latest_version['trainedWords']:
611
+ htmlDetail += f'<span style="margin-right:5px;">{t}</span>'
612
+ htmlDetail += "</td></tr>"
613
+ htmlDetail += "</tbody></table></div>"
614
+ htmlDetail += f"<div>{m['description'] if m.get('description') else 'N/A'}</div>"
615
+
616
+ self._ds_cover_gallery.samples = cover_imgs
617
+
618
+ return (
619
+ cover_imgs,
620
+ gr.Dropdown.update(choices=drop_list, value=drop_list[0] if len(drop_list) > 0 else []),
621
+ htmlDetail,
622
+ gr.HTML.update(value=f'<p style="text-align: center;">'
623
+ f'<a style="text-align: center;" href="{download_url_by_default}" '
624
+ 'target="_blank">Download</a></p>')
625
+ )
626
+
627
+ def get_my_model_covers(self, model, model_type):
628
+ img_list, l1, htmlDetail, h2 = self.get_model_info(model)
629
+ if self._ds_my_model_covers is None:
630
+ self.logger.error(f"_ds_my_model_covers is not initialized")
631
+ return {}
632
+
633
+ new_html = '<div></div>'
634
+ if htmlDetail is not None:
635
+ new_html = htmlDetail.split('</tbody></table></div>')[0] + '</tbody></table></div>'
636
+
637
+ cover_list = []
638
+ for img_link in img_list:
639
+ cover_html = '<div style="display: flex; align-items: center;">\n'
640
+ cover_html += f'<div style = "margin-right: 10px;" class ="model-item" >\n'
641
+ if len(img_link) > 0:
642
+ cover_html += f'{img_link[0]}\n'
643
+
644
+ cover_html += '</div>\n</div>'
645
+ cover_list.append([cover_html])
646
+
647
+ if model_type == 'TextualInversion':
648
+ mname, ext = os.path.splitext(model[3][0])
649
+ button_html = '<div class ="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;" ' \
650
+ f'onclick="return cardClicked(&quot;txt2img&quot;, &quot;{mname}&quot;, true)"><a href="javascript:void(0)">Send to Prompt</a></div>'
651
+
652
+ elif model_type == 'LORA':
653
+ mname, ext = os.path.splitext(model[3][0])
654
+ button_html = '<div class ="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;" ' \
655
+ f'onclick="return cardClicked(&quot;txt2img&quot;, &quot;<lora:{mname}:&quot; + opts.extra_networks_default_multiplier + &quot;>&quot;, false)"><a href="javascript:void(0)">Send to Prompt</a></div>'
656
+ elif model_type.upper() == 'LoCon'.upper():
657
+ mname, ext = os.path.splitext(model[3][0])
658
+ button_html = '<div class ="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;" ' \
659
+ f'onclick="return cardClicked(&quot;txt2img&quot;, &quot;<lyco:{mname}:&quot; + opts.extra_networks_default_multiplier + &quot;>&quot;, false)"><a href="javascript:void(0)">Send to Prompt</a></div>'
660
+ else:
661
+ mpath = os.path.join(self.prelude.model_type[model_type], model[3][0])
662
+ checkpoint_info = CheckpointInfo(mpath)
663
+ button_html = f'<div class="lg secondary gradio-button svelte-1ipelgc" style="text-align: center;"' \
664
+ f'onclick="return selectCheckpoint(&quot;{checkpoint_info.title}&quot;)"><a href="javascript:void(0)">Load Model</a></div>'
665
+
666
+ self._ds_my_model_covers.samples = cover_list
667
+ return self._ds_my_model_covers.update(samples=cover_list), gr.HTML.update(visible=True, value=new_html), gr.HTML.update(visible=True, value=button_html)
668
+
669
+
670
+ def update_cover_info(self, model, covers):
671
+
672
+ soup = BeautifulSoup(covers[0])
673
+ cover_url = soup.findAll('img')[0]['src'].replace('width=150', 'width=450')
674
+
675
+ if self.my_model_set is None:
676
+ self.logger.error("model_set is null")
677
+ return []
678
+
679
+ mid = model[1]
680
+ m_list = self.get_model_byid(mid, self.my_model_source)
681
+ if m_list is not None or m_list != []:
682
+ m = m_list[0]
683
+ else:
684
+ return {}, {}
685
+
686
+ generation_info = ''
687
+ fname = None
688
+ for mv in m['modelVersions']:
689
+ for img in mv['images']:
690
+ if img['url'] == cover_url:
691
+ if img['meta'] is not None and img['meta'] != '':
692
+ try:
693
+ meta = img['meta']
694
+ generation_info += f"{meta['prompt']}\n"
695
+ if meta['negativePrompt'] is not None:
696
+ generation_info += f"Negative prompt: {meta['negativePrompt']}\n"
697
+ generation_info += f"Steps: {meta['steps']}, Sampler: {meta['sampler']}, "
698
+ generation_info += f"CFG scale: {meta['cfgScale']}, Seed: {meta['seed']}, Size: {meta['Size']},"
699
+ if meta['Model hash'] is not None:
700
+ generation_info += f"Model hash: {meta['Model hash']}"
701
+
702
+ except Exception as e:
703
+ self.logger.info(f"generation_info error:{str(e)}")
704
+ pass
705
+
706
+ if not os.path.exists(self.prelude.cache_folder):
707
+ os.mkdir(self.prelude.cache_folder)
708
+
709
+ if self.my_model_source == 'civitai.com':
710
+ fname = os.path.join(self.prelude.cache_folder, f"{cover_url.split('/')[-1]}.jpg")
711
+ elif self.my_model_source == 'liandange.com':
712
+ fname = os.path.join(self.prelude.cache_folder, cover_url.split('?')[0].split('/')[-1])
713
+
714
+ break
715
+
716
+ if fname is not None and not os.path.exists(fname):
717
+ if self.my_model_source == 'liandange.com':
718
+ cover_url = soup.findAll('img')[0]['src'].replace('/w/150', '/w/450')
719
+ r = requests.get(cover_url, timeout=30, stream=True)
720
+ r.raw.decode_content = True
721
+ with open(fname, 'wb') as f:
722
+ shutil.copyfileobj(r.raw, f)
723
+
724
+ return gr.Button.update(visible=True), gr.Text.update(value=generation_info), gr.Image.update(value=fname)
725
+
726
+ def get_downloading_status(self):
727
+ (_, _, desc) = self.downloader_manager.tasks_summary()
728
+ return gr.HTML.update(value=desc)
729
+
730
+ def download_model(self, filename: str):
731
+ model_path = modules.paths.models_path
732
+ script_path = modules.paths.script_path
733
+
734
+ urls = []
735
+ for _, f in enumerate(self.model_files):
736
+ if not f.get('name'):
737
+ continue
738
+ model_fname = re.sub(r"\s*\(\d+(?:\.\d*)?.B\)\s*$", "", f['name'])
739
+
740
+ if model_fname in filename:
741
+ m_pre, m_ext = os.path.splitext(model_fname)
742
+ cover_fname = f"{m_pre}.jpg"
743
+ soup = BeautifulSoup(f['cover'])
744
+ cover_link = soup.findAll('img')[0]['src'].replace('/w/150', '/w/450').replace('width=150', 'width=450')
745
+
746
+ if f['type'] == 'LORA':
747
+ cover_fname = os.path.join(model_path, 'Lora', cover_fname)
748
+ model_fname = os.path.join(model_path, 'Lora', model_fname)
749
+ elif f['type'].upper() == 'LoCon'.upper():
750
+ cover_fname = os.path.join(model_path, 'LyCORIS', cover_fname)
751
+ model_fname = os.path.join(model_path, 'LyCORIS', model_fname)
752
+ elif f['type'] == 'VAE':
753
+ cover_fname = os.path.join(model_path, 'VAE', cover_fname)
754
+ model_fname = os.path.join(model_path, 'VAE', model_fname)
755
+ elif f['type'] == 'TextualInversion':
756
+ cover_fname = os.path.join(script_path, 'embeddings', cover_fname)
757
+ model_fname = os.path.join(script_path, 'embeddings', model_fname)
758
+ elif f['type'] == 'Hypernetwork':
759
+ cover_fname = os.path.join(model_path, 'hypernetworks', cover_fname)
760
+ model_fname = os.path.join(model_path, 'hypernetworks', model_fname)
761
+ elif f['type'] == 'Controlnet':
762
+ cover_fname = os.path.join(shared.script_path, 'extensions', 'sd-webui-controlnet', 'models', cover_fname)
763
+ model_fname = os.path.join(shared.script_path, 'extensions', 'sd-webui-controlnet', 'models', model_fname)
764
+ else:
765
+ cover_fname = os.path.join(model_path, 'Stable-diffusion', cover_fname)
766
+ model_fname = os.path.join(model_path, 'Stable-diffusion', model_fname)
767
+
768
+ urls.append((cover_link, f['url'], f['size'], cover_fname, model_fname))
769
+ break
770
+
771
+ for (cover_url, model_url, total_size, local_cover_name, local_model_name) in urls:
772
+ self.downloader_manager.download(
773
+ source_url=cover_url,
774
+ target_file=local_cover_name,
775
+ estimated_total_size=None,
776
+ )
777
+ self.downloader_manager.download(
778
+ source_url=model_url,
779
+ target_file=local_model_name,
780
+ estimated_total_size=total_size,
781
+ )
782
+
783
+ #
784
+ # currently, web-ui is without queue enabled.
785
+ #
786
+ # webui_queue_enabled = False
787
+ # if webui_queue_enabled:
788
+ # start = time.time()
789
+ # downloading_tasks_iter = self.downloader_manager.iterator()
790
+ # for i in progressbar.tqdm(range(100), unit="byte", desc="Models Downloading"):
791
+ # while True:
792
+ # try:
793
+ # finished_bytes, total_bytes = next(downloading_tasks_iter)
794
+ # v = finished_bytes / total_bytes
795
+ # print(f"\n v = {v}")
796
+ # if isinstance(v, float) and int(v * 100) < i:
797
+ # print(f"\nv({v}) < {i}")
798
+ # continue
799
+ # else:
800
+ # break
801
+ # except StopIteration:
802
+ # break
803
+ #
804
+ # time.sleep(0.5)
805
+ #
806
+ # self.logger.info(f"[downloading] finished after {time.time() - start} secs")
807
+
808
+ time.sleep(2)
809
+
810
+ #self.model_files.clear()
811
+ return gr.HTML.update(value=f"<h4>{len(urls)} downloading tasks added into task list</h4>")
812
+
813
+ def install_preset_models_if_needed(self, update_ds: bool):
814
+ assets_folder = os.path.join(self.prelude.ext_folder, "assets")
815
+ configs_folder = os.path.join(self.prelude.ext_folder, "configs")
816
+
817
+ for model_filename in ["civitai_models.json", "liandange_models.json", "gpt_index.json"]:
818
+ gzip_file = os.path.join(assets_folder, f"{model_filename}.gz")
819
+ target_file = os.path.join(configs_folder, f"{model_filename}")
820
+
821
+ if not os.path.exists(gzip_file):
822
+ self.relocate_assets_if_needed()
823
+ sub_repo = git.Repo(self.prelude.assets_folder)
824
+ sub_repo.git.fetch(all=True)
825
+ sub_repo.git.reset('origin', hard=True)
826
+
827
+ if update_ds or not os.path.exists(target_file):
828
+ with gzip.open(gzip_file, "rb") as compressed_file:
829
+ with io.TextIOWrapper(compressed_file, encoding="utf-8") as decoder:
830
+ content = decoder.read()
831
+ with open(target_file, "w") as model_file:
832
+ model_file.write(content)
833
+
834
+ print('Data source unpacked successfully')
835
+
836
+ def relocate_assets_if_needed(self):
837
+ repo = git.Repo(self.prelude.ext_folder)
838
+ print('Updating asset repo...')
839
+ try:
840
+ old_repo = True
841
+ if os.path.exists(self.prelude.assets_folder):
842
+ for filename in os.listdir(self.prelude.assets_folder):
843
+ if '.git' in filename:
844
+ old_repo = False
845
+ break
846
+
847
+ if old_repo:
848
+ shutil.rmtree(self.prelude.assets_folder)
849
+
850
+ for submodule in repo.submodules:
851
+ submodule.update(init=True)
852
+ except Exception as e:
853
+ print('error', str(e))
854
+
855
+ def get_dir_and_file(self, file_path):
856
+ dir_path, file_name = os.path.split(file_path)
857
+ return (dir_path, file_name)
858
+
859
+ def open_folder(self, folder_path=''):
860
+ if not any(var in os.environ for var in self.prelude.ENV_EXCLUSION) and sys.platform != 'darwin':
861
+ current_folder_path = folder_path
862
+
863
+ initial_dir, initial_file = self.get_dir_and_file(folder_path)
864
+
865
+ #root = tk.Tk()
866
+ #root.wm_attributes('-topmost', 1)
867
+ #root.withdraw()
868
+ #folder_path = filedialog.askdirectory(initialdir=initial_dir)
869
+ #root.destroy()
870
+
871
+ if folder_path == '':
872
+ folder_path = current_folder_path
873
+
874
+ return folder_path
875
+
876
+ def change_model_folder(self, folder_path=''):
877
+
878
+ res = 'Model folder is linked successfully'
879
+ if folder_path == '':
880
+ return gr.Markdown.update(value='No directory is set', visible=True)
881
+
882
+ try:
883
+ src = shared.models_path
884
+ # Destination file path
885
+ dst = folder_path
886
+
887
+ # Create a symbolic link
888
+ # pointing to src named dst
889
+ # using os.symlink() method
890
+ subprocess.check_call('mklink /J "%s" "%s"' % (src, dst), shell=True)
891
+ except Exception as e:
892
+ res = str(e)
893
+
894
+ return gr.Markdown.update(value=res, visible=True)
895
+
896
+ def change_boot_setting(self, version, drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args):
897
+ self.get_final_args(drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args)
898
+ self.logger.info(f'saved_cmd: {self.cmdline_args}')
899
+
900
+ if version == 'Official Release':
901
+ target_webui_user_file = "webui-user.bat"
902
+ else:
903
+ target_webui_user_file = "webui-user-launch.bat"
904
+ script_export_keyword = "export"
905
+ if platform.system() == "Linux":
906
+ target_webui_user_file = "webui-user.sh"
907
+ elif platform.system() == "Darwin":
908
+ target_webui_user_file = "webui-macos-env.sh"
909
+ else:
910
+ script_export_keyword = "set"
911
+
912
+ filepath = os.path.join(modules.shared.script_path, target_webui_user_file)
913
+ self.logger.info(f"to update: {filepath}")
914
+
915
+ msg = 'Result: Setting Saved.'
916
+ if version == 'Official Release':
917
+ try:
918
+ if not os.path.exists(filepath):
919
+ shutil.copyfile(os.path.join(self.prelude.ext_folder, 'configs', target_webui_user_file), filepath)
920
+
921
+ with fileinput.FileInput(filepath, inplace=True, backup='.bak') as file:
922
+ for line in file:
923
+ if 'COMMANDLINE_ARGS' in line:
924
+ rep_txt = ' '.join(self.cmdline_args).replace('\\', '\\\\')
925
+ line = f'{script_export_keyword} COMMANDLINE_ARGS={rep_txt}\n'
926
+ sys.stdout.write(line)
927
+
928
+ except Exception as e:
929
+ msg = f'Error: {str(e)}'
930
+ else:
931
+ try:
932
+ if not os.path.exists(filepath):
933
+ shutil.copyfile(os.path.join(self.prelude.ext_folder, 'configs', target_webui_user_file), filepath)
934
+
935
+ new_data = ''
936
+ with open(filepath, 'r+') as file:
937
+ data = file.readlines()
938
+ for line in data:
939
+ if 'webui.py' in line:
940
+ rep_txt = ' '.join(self.cmdline_args).replace('\\', '\\\\')
941
+ line = f"python\python.exe webui.py {rep_txt}\n"
942
+ new_data += line
943
+ file.seek(0)
944
+ file.write(new_data)
945
+ file.truncate()
946
+
947
+ except Exception as e:
948
+ msg = f'Error: {str(e)}'
949
+
950
+ self.update_boot_settings(version, drp_gpu, drp_theme, txt_listen_port, chk_group_args, additional_args)
951
+ return gr.update(value=msg, visible=True)
952
+
953
+ def check_update(self):
954
+ update_status = 'latest'
955
+ show_update = False
956
+ repo = git.Repo(self.prelude.ext_folder)
957
+ print('Checking updates for miaoshouai-assistant...')
958
+ for fetch in repo.remote().fetch(dry_run=True):
959
+ if fetch.flags != fetch.HEAD_UPTODATE:
960
+ show_update = True
961
+ update_status = "behind"
962
+ break
963
+
964
+ print('Checking updates for data source...')
965
+ if os.path.exists(self.prelude.assets_folder):
966
+ fcount = len([entry for entry in os.listdir(self.prelude.assets_folder) if os.path.isfile(os.path.join(self.prelude.assets_folder, entry))])
967
+
968
+ if not os.path.exists(self.prelude.assets_folder) or fcount <= 0:
969
+ self.relocate_assets_if_needed()
970
+ show_update = True
971
+ update_status = "behind"
972
+ else:
973
+ try:
974
+ asset_repo = git.Repo(self.prelude.asset_folder)
975
+ for fetch in asset_repo.remote().fetch(dry_run=True):
976
+ if fetch.flags != fetch.HEAD_UPTODATE:
977
+ show_update = True
978
+ update_status = "behind"
979
+ break
980
+ except Exception as e:
981
+ self.logger.info(f"Error during checking asset, try to relocate.\n{str(e)}")
982
+ self.relocate_assets_if_needed()
983
+ show_update = True
984
+ update_status = "behind"
985
+
986
+ return gr.Markdown.update(visible=True, value=update_status), gr.Checkbox.update(visible=show_update), gr.Button.update(visible=show_update)
987
+
988
+ def process_prompt(self, model, model_type, prompt: str):
989
+ text_replace = {'/': '|', 'a girl': '1girl', 'a boy': '1boy', 'a women': '1women', 'a man': '1man'}
990
+ for rep in text_replace.keys():
991
+ prompt = prompt.strip().lower().replace(rep, text_replace[rep])
992
+
993
+ try:
994
+ mid = model[1]
995
+ m_list = self.get_model_byid(mid, self.my_model_source)
996
+ if m_list is not None or m_list != []:
997
+ m = m_list[0]
998
+ else:
999
+ return prompt
1000
+ except Exception as e:
1001
+ self.logger.info(f"generation_info error:{str(e)}")
1002
+ return prompt
1003
+
1004
+ generation_info = ''
1005
+ for mv in m['modelVersions']:
1006
+ img_cnt = len(mv['images'])
1007
+ img = mv['images'][random.randint(0, img_cnt-1)]
1008
+ if img['meta'] is not None and img['meta'] != '':
1009
+ try:
1010
+ meta = img['meta']
1011
+
1012
+ lora = ''
1013
+ if model_type == 'LORA':
1014
+ mname, ext = os.path.splitext(model[3][0])
1015
+ lora = f', <lora:{mname}:0.7>'
1016
+ elif model_type.upper() == 'LoCon'.upper():
1017
+ mname, ext = os.path.splitext(model[3][0])
1018
+ lora = f', <lyco:{mname}:0.7>'
1019
+
1020
+ tw_count = len(mv['trainedWords'])
1021
+ if tw_count > 0:
1022
+ twords = mv['trainedWords'][random.randint(0, tw_count-1)]
1023
+ generation_info += f"{prompt}, {twords}{lora}\n"
1024
+ else:
1025
+ generation_info += f"{prompt}{lora}\n"
1026
+
1027
+ if meta['negativePrompt'] is not None:
1028
+ generation_info += f"Negative prompt: {meta['negativePrompt']}\n"
1029
+ generation_info += f"Steps: {meta['steps']}, Sampler: {meta['sampler']}, "
1030
+ generation_info += f"CFG scale: {meta['cfgScale']}, Seed: -1, Size: {meta['Size']},"
1031
+ if meta['Model hash'] is not None:
1032
+ generation_info += f"Model hash: {meta['Model hash']}"
1033
+
1034
+ except Exception as e:
1035
+ self.logger.info(f"generation_info error:{str(e)}")
1036
+ return generation_info
1037
+
1038
+ break
1039
+
1040
+ return generation_info
1041
+
1042
+ def get_gpt_prompt(self, model, model_type, main_prompt):
1043
+ os.environ["OPENAI_API_KEY"] = self.prelude.boot_settings['openai_api']
1044
+
1045
+ if model is None:
1046
+ return gr.TextArea.update(value='Please select a model first')
1047
+
1048
+ if not os.path.exists(self.prelude.gpt_index):
1049
+ self.install_preset_models_if_needed(True)
1050
+
1051
+ index = GPTSimpleVectorIndex.load_from_disk(self.prelude.gpt_index)
1052
+ max_tokens = 4000
1053
+
1054
+ try:
1055
+ response = openai.Completion.create(
1056
+ engine="text-davinci-003",
1057
+ prompt=f"translate the following text into English:\n{main_prompt}",
1058
+ max_tokens=max_tokens,
1059
+ n=1,
1060
+ stop=None,
1061
+ temperature=0.5,
1062
+ )
1063
+ res_prompt = response.choices[0].text.strip().replace('Translation:', '')
1064
+ gpt_prompt = 'give me a prompt for: ' + res_prompt
1065
+
1066
+ response = index.query(gpt_prompt, response_mode="compact")
1067
+ res_prompt = self.process_prompt(model, model_type, response.response)
1068
+ except Exception as e:
1069
+ res_prompt = str(e)
1070
+ return gr.TextArea.update(value=res_prompt)
1071
+
1072
+ return gr.TextArea.update(value=res_prompt)
1073
+
1074
+ def update_gptapi(self, apikey):
1075
+ if apikey == '':
1076
+ res = 'Please enter a valid API Key'
1077
+ gpt_hint_text = 'Set your OpenAI api key in Setting & Update first: https://platform.openai.com/account/api-keys'
1078
+ value_text = gpt_hint_text
1079
+ else:
1080
+ self.update_boot_setting('openai_api', apikey)
1081
+ os.environ["OPENAI_API_KEY"] = apikey
1082
+ res = 'API Key updated'
1083
+ gpt_hint_text = 'Select a model and type some text here, ChatGPT will generate prompt for you. Supports different text in different languages.'
1084
+ value_text = ''
1085
+
1086
+ return gr.Markdown.update(value=res, visible=True), gr.Textbox.update(placeholder=gpt_hint_text, value=value_text)
1087
+
1088
+ def update_program(self, dont_update_ms=False):
1089
+ result = "Update successful, restart to take effective."
1090
+ try:
1091
+ print('Updating miaoshouai-assistant...')
1092
+ repo = git.Repo(self.prelude.ext_folder)
1093
+ # Fix: `error: Your local changes to the following files would be overwritten by merge`,
1094
+ # because WSL2 Docker set 755 file permissions instead of 644, this results to the error.
1095
+ repo.git.fetch(all=True)
1096
+ repo.git.reset('origin', hard=True)
1097
+ if not dont_update_ms:
1098
+ sub_repo = git.Repo(self.prelude.assets_folder)
1099
+ sub_repo.git.fetch(all=True)
1100
+ sub_repo.git.reset('origin', hard=True)
1101
+ self.install_preset_models_if_needed(True)
1102
+ except Exception as e:
1103
+ result = str(e)
1104
+
1105
+ return gr.Markdown.update(visible=True, value=result)
1106
+
1107
+
1108
+ @property
1109
+ def model_set(self) -> t.List[t.Dict]:
1110
+ try:
1111
+ self.install_preset_models_if_needed(False)
1112
+ self.logger.info(f"access to model info for '{self.model_source}'")
1113
+ model_json_mtime = toolkit.get_file_last_modified_time(self.prelude.model_json[self.model_source])
1114
+
1115
+ if self._model_set is None or self._model_set_last_access_time is None \
1116
+ or self._model_set_last_access_time < model_json_mtime:
1117
+ self._model_set = self.get_all_models(self.model_source)
1118
+ self._model_set_last_access_time = model_json_mtime
1119
+ self.logger.info(f"load '{self.model_source}' model data from local file")
1120
+ except Exception as e:
1121
+ self.refresh_all_models()
1122
+ self._model_set_last_access_time = datetime.datetime.now()
1123
+
1124
+ return self._model_set
1125
+
1126
+ @property
1127
+ def my_model_set(self) -> t.List[t.Dict]:
1128
+ try:
1129
+ self.install_preset_models_if_needed(False)
1130
+ self.logger.info(f"access to model info for '{self.my_model_source}'")
1131
+ model_json_mtime = toolkit.get_file_last_modified_time(self.prelude.model_json[self.my_model_source])
1132
+
1133
+ if self._my_model_set is None or self._my_model_set_last_access_time is None \
1134
+ or self._my_model_set_last_access_time < model_json_mtime:
1135
+ self._my_model_set = self.get_all_models(self.my_model_source)
1136
+ self._my_model_set_last_access_time = model_json_mtime
1137
+ self.logger.info(f"load '{self.my_model_source}' model data from local file")
1138
+ except Exception as e:
1139
+ self.refresh_all_models()
1140
+ self._my_model_set_last_access_time = datetime.datetime.now()
1141
+
1142
+ return self._my_model_set
1143
+
1144
+
1145
+ @property
1146
+ def allow_nsfw(self) -> bool:
1147
+ return self._allow_nsfw
1148
+
1149
+ @property
1150
+ def old_additional_args(self) -> str:
1151
+ return self._old_additional
1152
+
1153
+ @property
1154
+ def ds_models(self) -> gr.Dataset:
1155
+ return self._ds_models
1156
+
1157
+ @ds_models.setter
1158
+ def ds_models(self, newone: gr.Dataset):
1159
+ self._ds_models = newone
1160
+
1161
+ @property
1162
+ def ds_cover_gallery(self) -> gr.Dataset:
1163
+ return self._ds_cover_gallery
1164
+
1165
+ @ds_cover_gallery.setter
1166
+ def ds_cover_gallery(self, newone: gr.Dataset):
1167
+ self._ds_cover_gallery = newone
1168
+
1169
+ @property
1170
+ def ds_my_models(self) -> gr.Dataset:
1171
+ return self._ds_my_models
1172
+
1173
+ @ds_my_models.setter
1174
+ def ds_my_models(self, newone: gr.Dataset):
1175
+ self._ds_my_models = newone
1176
+
1177
+ @property
1178
+ def ds_my_model_covers(self) -> gr.Dataset:
1179
+ return self._ds_my_model_covers
1180
+
1181
+ @ds_my_model_covers.setter
1182
+ def ds_my_model_covers(self, newone: gr.Dataset):
1183
+ self._ds_my_model_covers = newone
1184
+
1185
+ @property
1186
+ def model_source(self) -> str:
1187
+ return self._model_source
1188
+
1189
+ @model_source.setter
1190
+ def model_source(self, newone: str):
1191
+ self.logger.info(f"model source changes from {self.model_source} to {newone}")
1192
+ self._model_source = newone
1193
+ self._model_set_last_access_time = None # reset timestamp
1194
+
1195
+ @property
1196
+ def my_model_source(self) -> str:
1197
+ return self._my_model_source
1198
+
1199
+ @my_model_source.setter
1200
+ def my_model_source(self, newone: str):
1201
+ self.logger.info(f"model source changes from {self.my_model_source} to {newone}")
1202
+ self._my_model_source = newone
1203
+ self._my_model_set_last_access_time = None # reset timestamp
1204
+
1205
+ @property
1206
+ def active_model_set(self) -> str:
1207
+ return self._active_model_set
1208
+
1209
+ @active_model_set.setter
1210
+ def active_model_set(self, newone: str):
1211
+ self.logger.info(f"model set changes from {self.active_model_set} to {newone}")
1212
+ self._active_model_set = newone
1213
+
1214
+ @property
1215
+ def git_address(self) -> str:
1216
+ return self._git_address
1217
+
1218
+ def introception(self) -> None:
1219
+ (gpu, theme, port, checkbox_values, extra_args, ver) = self.get_default_args()
1220
+
1221
+ print("################################################################")
1222
+ print("MIAOSHOU ASSISTANT ARGUMENTS:")
1223
+
1224
+ print(f" gpu = {gpu}")
1225
+ print(f" theme = {theme}")
1226
+ print(f" port = {port}")
1227
+ print(f" checkbox_values = {checkbox_values}")
1228
+ print(f" extra_args = {extra_args}")
1229
+ print(f" webui ver = {ver}")
1230
+
1231
+ print("################################################################")
1232
+