An open API service indexing awesome lists of open source software.

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

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.
```