Skip to content

Instantly share code, notes, and snippets.

View ChristopherMWood's full-sized avatar

Christopher Wood ChristopherMWood

View GitHub Profile
@ChristopherMWood
ChristopherMWood / README.md
Last active July 29, 2023 21:53
Batch runner for apple/ml-stable-diffusion

Batch runner for apple/ml-stable-diffusion

This is a script modification for the apple/ml-stable-diffusion repo that enables it to run batches of image generations instead of just one at at time. When using the original repo, the time it took to load the libraries into place was considerably longer than it took to actually generate a single image for me. This is based on me running it against a Gen 1 8GB Mac Pro M1. This version will load the libraries as usual, then take as many prompts as wanted from a CSV and run through them all without needing to reload the libraries for each.

How to use

Step 1: Setup apple/ml-stable-diffusion

Get the original apple/ml-stable-diffusion running on your machine. I used this guide. Make sure it is all up and running and that you can generate an image before doing step #2.

Step 2: Replace pipeline.py

Replace the contents of your ```pipel