Skip to content

Commit 493855e

Browse files
committed
init
1 parent c6f0789 commit 493855e

File tree

14 files changed

+809
-2
lines changed

14 files changed

+809
-2
lines changed

.gitignore

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
media/ori
30+
media/re
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
.spec
38+
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
junit/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
test-results.xml
55+
*.cover
56+
*.py,cover
57+
.hypothesis/
58+
.pytest_cache/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
target/
82+
83+
# Jupyter Notebook
84+
.ipynb_checkpoints
85+
86+
# IPython
87+
profile_default/
88+
ipython_config.py
89+
90+
# pyenv
91+
.python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
101+
__pypackages__/
102+
103+
# Celery stuff
104+
celerybeat-schedule
105+
celerybeat.pid
106+
107+
# SageMath parsed files
108+
*.sage.py
109+
110+
# Environments
111+
.env
112+
.venv
113+
env/
114+
venv/
115+
ENV/
116+
env.bak/
117+
venv.bak/
118+
119+
# Spyder project settings
120+
.spyderproject
121+
.spyproject
122+
123+
# Rope project settings
124+
.ropeproject
125+
126+
# mkdocs documentation
127+
/site
128+
129+
# mypy
130+
.mypy_cache/
131+
.dmypy.json
132+
dmypy.json
133+
134+
# Pyre type checker
135+
.pyre/

README.md

Lines changed: 193 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,193 @@
1-
# Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI
2-
Convert your Stable Diffusion checkpoints quickly and easily.
1+
<!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->
2+
<a name="readme-top"></a>
3+
<!--
4+
*** Thanks for checking out the Best-README-Template. If you have a suggestion
5+
*** that would make this better, please fork the repo and create a pull request
6+
*** or simply open an issue with the tag "enhancement".
7+
*** Don't forget to give the project a star!
8+
*** Thanks again! Now go create something AMAZING! :D
9+
-->
10+
<!--
11+
*** I'm using markdown "reference style" links for readability.
12+
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
13+
*** See the bottom of this document for the declaration of the reference variables
14+
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
15+
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
16+
-->
17+
<br />
18+
<div align="center">
19+
20+
[![](media/svg/patreon.svg)](https://www.patreon.com/distyx)
21+
[![](media/svg/supportme.svg)](https://coindrop.to/disty)
22+
23+
To continue to develop i will be happy to get some support.
24+
25+
<!--
26+
[![](media/svg/buymeacoffee.svg)](https://www.buymeacoffee.com/disty)
27+
[![](media/svg/kofi.svg)](https://ko-fi.com/disty)
28+
[![](media/svg/supportme.svg)](https://coindrop.to/disty)
29+
-->
30+
<h1 align="center">Safe & Stable - Ckpt2Safetensors Conversion Tool-GUI</h1>
31+
<h3 align="center"> Convert your Stable Diffusion checkpoints quickly and easily.</h3>
32+
<p align="center">
33+
This tool conversion process still requires the .ckpt data to be loaded first, which means that it may potentially load pickles. It is recommended to use this tool only with safe models or convert the models online to avoid any potential security issues.
34+
<br />
35+
<br />
36+
<a href="https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/issues">Report Bug</a>
37+
·
38+
<a href="https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/issues">Request Feature</a>
39+
</p>
40+
</div>
41+
42+
<!-- TABLE OF CONTENTS -->
43+
<details>
44+
<summary>Table of Contents</summary>
45+
<ol>
46+
<li>
47+
<a href="#about-the-project">About The Project</a>
48+
</li>
49+
<li><a href="#license">License</a></li>
50+
<li><a href="#roadmap">Roadmap</a></li>
51+
<li><a href="#contact">Contact</a></li>
52+
<li><a href="#my-other-projects">My Other Projects</a></li>
53+
<li><a href="#acknowledgments">Acknowledgments</a></li>
54+
</ol>
55+
</details>
56+
57+
58+
59+
<!-- ABOUT THE PROJECT -->
60+
## About The Project
61+
62+
Safe & Stable is a tool for converting stable diffusion .ckpt files to the new and secure .safetensors format for storing tensors as pure data.
63+
64+
This format provides improved security compared to the pickle format, as it prevents the inclusion of arbitrary and potentially malicious Python code.
65+
It also has the potential to improve the performance of model loading on CPU and GPU.
66+
67+
Converting to .safetensors is recommended for stable diffusion users who want to improve the security and performance of their model storage and loading processes. It is especially useful for when distributing new models and merges.
68+
69+
70+
<img src="media/preview/2.png">
71+
72+
The tool's graphical user interface (GUI) makes it easy for users to select the input files, view the progress of the conversion saving process.
73+
74+
<img src="media/preview/3.png">
75+
76+
77+
Note that the conversion process still requires the .ckpt data to be loaded first, which means potentially loading pickles. It is recommended to scan for pickles before converting a model or convert online if no .safetensors version is provided. Once models start being distributed only in .safetensors format, this will no longer be necessary.
78+
79+
80+
81+
It is important to always check if the model works correctly before deleting the original .ckpt file.
82+
83+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
84+
85+
<!-- Downloads -->
86+
## Downloads
87+
88+
Archived version (Windows) [7z](https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/releases/download/0.0.1/Safe-and-Stable-Ckpt2Safetensors-GUI.v0.0.1.7z)
89+
90+
Archived version (Windows) [Zip](https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/releases/download/0.0.1/Safe-and-Stable-Ckpt2Safetensors-GUI.v0.0.1.zip)
91+
92+
93+
[Releases](https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/releases)
94+
95+
96+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
97+
98+
<!-- LICENSE -->
99+
## License
100+
101+
Distributed under the MIT License. See `LICENSE.txt` for more information.
102+
103+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
104+
105+
106+
<!-- ROADMAP -->
107+
## Roadmap
108+
109+
The roadmap for the Safe & Stable conversion tool will be determined by the level of support.
110+
and interest it receives.
111+
112+
If the tool proves to be useful, i have plans to continue improving its features and functionality, and to add support for new model formats and versions.
113+
114+
Thank you for any support.
115+
116+
See the [open issues](https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI/issues) for a full list of proposed features (and known issues).
117+
118+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
119+
120+
<!-- CONTACT -->
121+
## Contact
122+
123+
[@The_diSty](https://twitter.com/The_diSty) - distty@gmail.com
124+
125+
Project Link: [https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI](https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI)
126+
127+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
128+
129+
<!-- MY OTHER PROJECTS -->
130+
## My Other Projects
131+
132+
Project Link: [https://github.com/diStyApps/Stable-Diffusion-Pickle-Scanner-GUI](https://github.com/diStyApps/Stable-Diffusion-Pickle-Scanner-GUI)
133+
134+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
135+
136+
<!-- ACKNOWLEDGMENTS -->
137+
## Acknowledgments
138+
139+
140+
* [https://github.com/huggingface/safetensors](https://github.com/huggingface/safetensors)
141+
* [https://rentry.org/safetensorsguide](https://rentry.org/safetensorsguide)
142+
* [https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4930](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4930)
143+
* [https://www.reddit.com/r/StableDiffusion/comments/z8mnak/switching_models_too_slow_in_automatic1111_use](https://www.reddit.com/r/StableDiffusion/comments/z8mnak/switching_models_too_slow_in_automatic1111_use)
144+
* [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
145+
* [huggingface](https://huggingface.co)
146+
147+
148+
149+
<!-- * [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet)
150+
* [Malven's Flexbox Cheatsheet](https://flexbox.malven.co/)
151+
* [Malven's Grid Cheatsheet](https://grid.malven.co/)
152+
* [Img Shields](https://shields.io)
153+
* [GitHub Pages](https://pages.github.com)
154+
* [Font Awesome](https://fontawesome.com)
155+
* [React Icons](https://react-icons.github.io/react-icons/search)-->
156+
157+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
158+
159+
160+
<!-- MARKDOWN LINKS & IMAGES -->
161+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
162+
[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
163+
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
164+
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge
165+
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
166+
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge
167+
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
168+
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge
169+
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
170+
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
171+
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
172+
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
173+
[linkedin-url]: https://linkedin.com/in/othneildrew
174+
[product-screenshot]: images/screenshot.png
175+
[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
176+
[Next-url]: https://nextjs.org/
177+
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
178+
[React-url]: https://reactjs.org/
179+
[Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D
180+
[Vue-url]: https://vuejs.org/
181+
[Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white
182+
[Angular-url]: https://angular.io/
183+
[Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00
184+
[Svelte-url]: https://svelte.dev/
185+
[Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white
186+
[Laravel-url]: https://laravel.com
187+
[Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white
188+
[Bootstrap-url]: https://getbootstrap.com
189+
[JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white
190+
[JQuery-url]: https://jquery.com
191+
192+
193+

conda.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: st_gui
2+
channels:
3+
- nodefaults
4+
dependencies:
5+
- python=3.7
6+
- pip
7+
- pip:
8+
- -r requirements.txt

media/preview/1.png

18.8 KB
Loading

media/preview/2.png

42.2 KB
Loading

media/preview/3.png

55.6 KB
Loading

media/svg/buymeacoffee.svg

Lines changed: 20 additions & 0 deletions
Loading

media/svg/kofi.svg

Lines changed: 20 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)