https://github.com/appenz/sdshell
Simple script to reformat and rename for Stable Diffusion Dream Booth learning
https://github.com/appenz/sdshell
Last synced: 15 days ago
JSON representation
Simple script to reformat and rename for Stable Diffusion Dream Booth learning
- Host: GitHub
- URL: https://github.com/appenz/sdshell
- Owner: appenz
- License: apache-2.0
- Created: 2022-10-31T02:02:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-20T18:44:54.000Z (over 3 years ago)
- Last Synced: 2025-12-13T13:02:48.136Z (7 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sdshell
This is a simple tool to format images for for learning with the dreambooth trainer
for Stable diffusion. Specifically it resizes the images to 512 x 512 by finding the centered largest
square and scaling up or down as necessary. It also renames them to a consisten name of
"NAME (seq).jpg" where NAME is the parameter passed via --iname and is a sequence number.
This is useful for taking a directory full of images and preparing them for learning with
a Dream Booth script.
## Running
```python3 sdshell.py --srcdir --traindir --iname ```
## Command line options
```Usage: python3 sdshell.py [OPTIONS]
Options:
--srcdir TEXT Source directory for the raw, unformatted images.
--traindir TEXT Storage directory for the resized training images.
--trainwidth INTEGER Optional training image width, needs to be same as height. Default 512.
--trainheight INTEGER Optional training image height. Default 512.
--iname TEXT Name of the new concept that the model should be
trained for.
--help Show this message and exit.
```