Blog Logo
TAGS

Rubbrband: One command to finetune Stable Diffusion models

Rubbrband is a CLI tool that simplifies the process of finetuning Stable Diffusion models. It provides automatic environment setup, dataset cropping, and integration with Automatic1111. Rubbrband also downloads the latest SD checkpoints from HuggingFace for finetuning and testing. The tool uses Docker to create separate, working training environments on your machine. The installation guide for Docker can be found on their official website. A sample code for training Dreambooth is provided in the article. Rubbrband recommends using at least 24GB of VRAM and an A10 GPU for this task. Once training is done, a model checkpoint file is generated in the model container, which can be retrieved using `rubbrband copy-from dreambooth /home/engineering/JoePenna-Dreambooth/logs ./`. The final checkpoint will be in the logs folder as `last.ckpt`. To launch Stable Diffusion web UI, run `rubbrband web sd-webui`. Copy the checkpoint to Automatic1111 using `rubbrband copy-to sd-webui /path/to/last.ckpt /home/engineering/stable-diffusion-webui/models/Stable-diffusion/`. Visit the link to the web UI at `http://localhost:7860` and use the new checkpoint file. Rubbrband recommends using 50 images of a person for Dreambooth fine-tuning or 20-30 very different images of a person, in different lighting conditions and clothing, from different angles if the aim is to generate a sequence of images with the person looking a spe.