Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
dbc8fc7
Add instructions on how to install alongside pyenv (#393)
havardgulldahl Sep 6, 2022
049ea02
Disabled debug output (#436)
hvanmegen Sep 8, 2022
79ac0f3
Fix macOS `pyenv` instructions, add code block highlight (#441)
Niek Sep 9, 2022
044e1ec
Add requirements file for linux container on Apple silicon
Sep 9, 2022
2b3acc7
Merge branch 'lstein:main' into docker-apple-silicon
santisbon Sep 9, 2022
348b4b8
Add requirements file for linux container on Apple silicon
Sep 9, 2022
4a0354c
Add README for Mac-Docker
Sep 9, 2022
6d2084e
Clean up instructioins
Sep 9, 2022
4185afe
Update documentation
Sep 10, 2022
dbfc35e
Add README for Mac-Docker
Sep 9, 2022
e3be28e
Clean up instructioins
Sep 9, 2022
f74e520
Update documentation
Sep 10, 2022
62863ac
~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.atten…
mh-dm Sep 10, 2022
97c0c4b
Initial version of Dockerfile and entreypoint
Sep 10, 2022
f9239af
Ignore Anaconda/Miniconda installer used during Docker build
Sep 10, 2022
2cf8de9
Add entrypoint and update documentation
Sep 10, 2022
5cbea51
Initial version of Dockerfile and entreypoint
Sep 10, 2022
7136603
Ignore Anaconda/Miniconda installer used during Docker build
Sep 10, 2022
b656d33
Add entrypoint and update documentation
Sep 10, 2022
0ca9d1f
Merge branch 'lstein:main' into main
santisbon Sep 10, 2022
529fc57
~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.atten…
mh-dm Sep 10, 2022
f240e87
Merge branch 'docker-apple-silicon'
Sep 10, 2022
9775a35
Fix documentation link
Sep 10, 2022
eceb7d2
[Documentation] Clarify path to use
santisbon Sep 10, 2022
336e16e
[Documentation] Fix typo
santisbon Sep 11, 2022
eeff8e9
[Documentation] Add +x permissions to miniconda installer
Sep 11, 2022
e21938c
Remove unnecesary chmod from Dockerfile to avoid bloating
Sep 11, 2022
da95729
Refactor docker build and move docker assets to their own folder
Sep 11, 2022
19fb66f
Add comments on next steps
Sep 11, 2022
585b47f
Docker platform now configurable. No longer Mac-specific
Sep 11, 2022
443a4ad
[Documentation] Updates on Docker platform
Sep 11, 2022
3f8a289
[Documentation] Clarification on which conda installer to use
Sep 11, 2022
b20f2bc
[Documentation] Why containers?
Sep 12, 2022
c705ff5
[Documentation] Fix typo
Sep 12, 2022
012c0df
[Documentation] Cleanup
Sep 12, 2022
9d6d728
Squashed commit of the following:
lstein Sep 12, 2022
7dee9ef
Merge branch 'development' into main
lstein Sep 12, 2022
bf1beaa
revert 49a96b90 due to conflicts during training
lstein Sep 12, 2022
993158f
Merge branch 'lstein:main' into main
santisbon Sep 12, 2022
9b28c65
revert inadvertent change of conda env name (#528)
lstein Sep 12, 2022
eeecc33
Merge branch 'lstein:main' into main
santisbon Sep 12, 2022
654ec17
Remove Apple silicon section
Sep 13, 2022
82a223c
Remove Apple silicon section
Sep 13, 2022
00b002f
Move README-Docker to docs folder
Sep 13, 2022
d4941ca
Doc cleanup
Sep 13, 2022
5ad080f
Update dev with upstream changes
Sep 13, 2022
0aa3dfb
Update link to guide on Docker, supported architectures, and platform…
Sep 13, 2022
10c51b4
Minor cleanup and re-arranging of PATH docs (#533)
dreness Sep 13, 2022
89da371
Fix images in Variations example (#537)
maddavid123 Sep 13, 2022
8a8c093
Merge branch 'lstein:main' into main
santisbon Sep 13, 2022
f59b399
update dependencies
santisbon Sep 16, 2022
2b9f8e7
Update to add Adobe Photoshop Guide for inpainting (#617)
hipsterusername Sep 16, 2022
0db8d69
Merge branch 'lstein:main' into main
santisbon Sep 16, 2022
b4debcc
Merge remote-tracking branch 'origin/main'
santisbon Sep 16, 2022
fb7a9f3
Set temporary instructions
santisbon Sep 16, 2022
c6c19f1
Remove unnecessary wget
santisbon Sep 17, 2022
e994073
fix(ci): Cherry-pick new CI to main (#646)
tildebyte Sep 17, 2022
af98524
Merge branch 'lstein:main' into main
santisbon Sep 17, 2022
20ffd40
needs protobuf 3.20.1
santisbon Sep 18, 2022
c6e4352
Add missing option to wget command
JamDon2 Sep 19, 2022
a637c24
Merge branch 'lstein:main' into main
santisbon Sep 19, 2022
60b83ff
Change README name to InvokeAI
lstein Sep 20, 2022
6af9f27
Update README.md
lstein Sep 20, 2022
de47f68
fix typo in README
lstein Sep 20, 2022
893bdca
fixed README formatting
lstein Sep 20, 2022
a22ae23
Merge branch 'invoke-ai:main' into main
santisbon Sep 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .github/workflows/cache-model.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/create-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Create Caches
on:
workflow_dispatch
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-12 ]
name: Create Caches on ${{ matrix.os }} conda
runs-on: ${{ matrix.os }}
steps:
- name: Set platform variables
id: vars
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
echo "::set-output name=ENV_FILE::environment-mac.yaml"
echo "::set-output name=PYTHON_BIN::/usr/local/miniconda/envs/ldm/bin/python"
elif [ "$RUNNER_OS" = "Linux" ]; then
echo "::set-output name=ENV_FILE::environment.yaml"
echo "::set-output name=PYTHON_BIN::/usr/share/miniconda/envs/ldm/bin/python"
fi
- name: Checkout sources
uses: actions/checkout@v3
- name: Use Cached Stable Diffusion v1.4 Model
id: cache-sd-v1-4
uses: actions/cache@v3
env:
cache-name: cache-sd-v1-4
with:
path: models/ldm/stable-diffusion-v1/model.ckpt
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}
- name: Download Stable Diffusion v1.4 Model
if: ${{ steps.cache-sd-v1-4.outputs.cache-hit != 'true' }}
run: |
if [ ! -e models/ldm/stable-diffusion-v1 ]; then
mkdir -p models/ldm/stable-diffusion-v1
fi
if [ ! -e models/ldm/stable-diffusion-v1/model.ckpt ]; then
curl -o models/ldm/stable-diffusion-v1/model.ckpt ${{ secrets.SD_V1_4_URL }}
fi
- name: Use Cached Dependencies
id: cache-conda-env-ldm
uses: actions/cache@v3
env:
cache-name: cache-conda-env-ldm
with:
path: ~/.conda/envs/ldm
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(steps.vars.outputs.ENV_FILE) }}
- name: Install Dependencies
if: ${{ steps.cache-conda-env-ldm.outputs.cache-hit != 'true' }}
run: |
conda env create -f ${{ steps.vars.outputs.ENV_FILE }}
- name: Use Cached Huggingface and Torch models
id: cache-huggingface-torch
uses: actions/cache@v3
env:
cache-name: cache-huggingface-torch
with:
path: ~/.cache
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }}
- name: Download Huggingface and Torch models
if: ${{ steps.cache-huggingface-torch.outputs.cache-hit != 'true' }}
run: |
${{ steps.vars.outputs.PYTHON_BIN }} scripts/preload_models.py
80 changes: 0 additions & 80 deletions .github/workflows/macos12-miniconda.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/test-dream-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Test Dream with Conda
on:
push:
branches:
- 'main'
- 'development'
jobs:
os_matrix:
strategy:
matrix:
os: [ ubuntu-latest, macos-12 ]
name: Test dream.py on ${{ matrix.os }} with conda
runs-on: ${{ matrix.os }}
steps:
- run: |
echo The PR was merged
- name: Set platform variables
id: vars
run: |
# Note, can't "activate" via github action; specifying the env's python has the same effect
if [ "$RUNNER_OS" = "macOS" ]; then
echo "::set-output name=ENV_FILE::environment-mac.yaml"
echo "::set-output name=PYTHON_BIN::/usr/local/miniconda/envs/ldm/bin/python"
elif [ "$RUNNER_OS" = "Linux" ]; then
echo "::set-output name=ENV_FILE::environment.yaml"
echo "::set-output name=PYTHON_BIN::/usr/share/miniconda/envs/ldm/bin/python"
fi
- name: Checkout sources
uses: actions/checkout@v3
- name: Use Cached Stable Diffusion v1.4 Model
id: cache-sd-v1-4
uses: actions/cache@v3
env:
cache-name: cache-sd-v1-4
with:
path: models/ldm/stable-diffusion-v1/model.ckpt
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}
- name: Download Stable Diffusion v1.4 Model
if: ${{ steps.cache-sd-v1-4.outputs.cache-hit != 'true' }}
run: |
if [ ! -e models/ldm/stable-diffusion-v1 ]; then
mkdir -p models/ldm/stable-diffusion-v1
fi
if [ ! -e models/ldm/stable-diffusion-v1/model.ckpt ]; then
curl -o models/ldm/stable-diffusion-v1/model.ckpt ${{ secrets.SD_V1_4_URL }}
fi
- name: Use Cached Dependencies
id: cache-conda-env-ldm
uses: actions/cache@v3
env:
cache-name: cache-conda-env-ldm
with:
path: ~/.conda/envs/ldm
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(steps.vars.outputs.ENV_FILE) }}
- name: Install Dependencies
if: ${{ steps.cache-conda-env-ldm.outputs.cache-hit != 'true' }}
run: |
conda env create -f ${{ steps.vars.outputs.ENV_FILE }}
- name: Use Cached Huggingface and Torch models
id: cache-hugginface-torch
uses: actions/cache@v3
env:
cache-name: cache-hugginface-torch
with:
path: ~/.cache
key: ${{ env.cache-name }}
restore-keys: |
${{ env.cache-name }}-${{ hashFiles('scripts/preload_models.py') }}
- name: Download Huggingface and Torch models
if: ${{ steps.cache-hugginface-torch.outputs.cache-hit != 'true' }}
run: |
${{ steps.vars.outputs.PYTHON_BIN }} scripts/preload_models.py
# - name: Run tmate
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 30
- name: Run the tests
run: |
# Note, can't "activate" via github action; specifying the env's python has the same effect
if [ $(uname) = "Darwin" ]; then
export PYTORCH_ENABLE_MPS_FALLBACK=1
fi
# Utterly hacky, but I don't know how else to do this
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then
time ${{ steps.vars.outputs.PYTHON_BIN }} scripts/dream.py --from_file tests/preflight_prompts.txt --full_precision
elif [[ ${{ github.ref }} == 'refs/heads/development' ]]; then
time ${{ steps.vars.outputs.PYTHON_BIN }} scripts/dream.py --from_file tests/dev_prompts.txt --full_precision
fi
mkdir -p outputs/img-samples
- name: Archive results
uses: actions/upload-artifact@v3
with:
name: results
path: outputs/img-samples
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
outputs/
models/ldm/stable-diffusion-v1/model.ckpt

# ignore the Anaconda/Miniconda installer used while building Docker image
anaconda.sh

# ignore a directory which serves as a place for initial images
inputs/

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<h1 align='center'><b>Stable Diffusion Dream Script</b></h1>
<h1 align='center'><b>InvokeAI: A Stable Diffusion Toolkit</b></h1>

<p align='center'>
<img src="docs/assets/logo.png"/>
</p>

<p align="center">
<img src="https://img.shields.io/github/last-commit/lstein/stable-diffusion?logo=Python&logoColor=green&style=for-the-badge" alt="last-commit"/>
<img src="https://img.shields.io/github/stars/lstein/stable-diffusion?logo=GitHub&style=for-the-badge" alt="stars"/>
<img src="https://img.shields.io/github/last-commit/invoke-ai/InvokeAI?logo=Python&logoColor=green&style=for-the-badge" alt="last-commit"/>
<img src="https://img.shields.io/github/stars/invoke-ai/InvokeAI?logo=GitHub&style=for-the-badge" alt="stars"/>
<br>
<img src="https://img.shields.io/github/issues/lstein/stable-diffusion?logo=GitHub&style=for-the-badge" alt="issues"/>
<img src="https://img.shields.io/github/issues-pr/lstein/stable-diffusion?logo=GitHub&style=for-the-badge" alt="pull-requests"/>
<img src="https://img.shields.io/github/issues/invoke-ai/InvokeAI?logo=GitHub&style=for-the-badge" alt="issues"/>
<img src="https://img.shields.io/github/issues-pr/invoke-ai/InvokeAI?logo=GitHub&style=for-the-badge" alt="pull-requests"/>
</p>

# **Stable Diffusion Dream Script**

This is a fork of
[CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion),
the open source text-to-image generator. It provides a streamlined
Expand All @@ -22,10 +20,12 @@ generation process. It runs on Windows, Mac and Linux machines,
and runs on GPU cards with as little as 4 GB or RAM.

_Note: This fork is rapidly evolving. Please use the
[Issues](https://github.com/lstein/stable-diffusion/issues) tab to
[Issues](https://github.com/invoke-ai/InvokeAI/issues) tab to
report bugs and make feature requests. Be sure to use the provided
templates. They will help aid diagnose issues faster._

_This repository was formally known as /stable-diffusion_

# **Table of Contents**

1. [Installation](#installation)
Expand Down
Loading