Compare commits
1 Commits
invokeai-b
...
2.2.0-rc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
268db779b9 |
@@ -1,6 +0,0 @@
|
|||||||
[run]
|
|
||||||
omit='.env/*'
|
|
||||||
source='.'
|
|
||||||
|
|
||||||
[report]
|
|
||||||
show_missing = true
|
|
||||||
@@ -1,25 +1,12 @@
|
|||||||
# use this file as a whitelist
|
|
||||||
*
|
*
|
||||||
!invokeai
|
!backend
|
||||||
|
!configs
|
||||||
|
!environments-and-requirements
|
||||||
|
!frontend
|
||||||
|
!installer
|
||||||
!ldm
|
!ldm
|
||||||
!pyproject.toml
|
!main.py
|
||||||
|
!scripts
|
||||||
# Guard against pulling in any models that might exist in the directory tree
|
!server
|
||||||
**/*.pt*
|
!static
|
||||||
**/*.ckpt
|
!setup.py
|
||||||
|
|
||||||
# ignore frontend but whitelist dist
|
|
||||||
invokeai/frontend/
|
|
||||||
!invokeai/frontend/dist/
|
|
||||||
|
|
||||||
# ignore invokeai/assets but whitelist invokeai/assets/web
|
|
||||||
invokeai/assets/
|
|
||||||
!invokeai/assets/web/
|
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
**/__pycache__/
|
|
||||||
**/*.py[cod]
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
*.egg-info/
|
|
||||||
*.egg
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
# All files
|
# All files
|
||||||
[*]
|
[*]
|
||||||
max_line_length = 80
|
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
@@ -13,18 +10,3 @@ trim_trailing_whitespace = true
|
|||||||
# Python
|
# Python
|
||||||
[*.py]
|
[*.py]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
max_line_length = 120
|
|
||||||
|
|
||||||
# css
|
|
||||||
[*.css]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# flake8
|
|
||||||
[.flake8]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# Markdown MkDocs
|
|
||||||
[docs/**/*.md]
|
|
||||||
max_line_length = 80
|
|
||||||
indent_size = 4
|
|
||||||
indent_style = unset
|
|
||||||
|
|||||||
37
.flake8
@@ -1,37 +0,0 @@
|
|||||||
[flake8]
|
|
||||||
max-line-length = 120
|
|
||||||
extend-ignore =
|
|
||||||
# See https://github.com/PyCQA/pycodestyle/issues/373
|
|
||||||
E203,
|
|
||||||
# use Bugbear's B950 instead
|
|
||||||
E501,
|
|
||||||
# from black repo https://github.com/psf/black/blob/main/.flake8
|
|
||||||
E266, W503, B907
|
|
||||||
extend-select =
|
|
||||||
# Bugbear line length
|
|
||||||
B950
|
|
||||||
extend-exclude =
|
|
||||||
scripts/orig_scripts/*
|
|
||||||
ldm/models/*
|
|
||||||
ldm/modules/*
|
|
||||||
ldm/data/*
|
|
||||||
ldm/generate.py
|
|
||||||
ldm/util.py
|
|
||||||
ldm/simplet2i.py
|
|
||||||
per-file-ignores =
|
|
||||||
# B950 line too long
|
|
||||||
# W605 invalid escape sequence
|
|
||||||
# F841 assigned to but never used
|
|
||||||
# F401 imported but unused
|
|
||||||
tests/test_prompt_parser.py: B950, W605, F401
|
|
||||||
tests/test_textual_inversion.py: F841, B950
|
|
||||||
# B023 Function definition does not bind loop variable
|
|
||||||
scripts/legacy_api.py: F401, B950, B023, F841
|
|
||||||
ldm/invoke/__init__.py: F401
|
|
||||||
# B010 Do not call setattr with a constant attribute value
|
|
||||||
ldm/invoke/server_legacy.py: B010
|
|
||||||
# =====================
|
|
||||||
# flake-quote settings:
|
|
||||||
# =====================
|
|
||||||
# Set this to match black style:
|
|
||||||
inline-quotes = double
|
|
||||||
2
.gitattributes
vendored
@@ -1,4 +1,4 @@
|
|||||||
# Auto normalizes line endings on commit so devs don't need to change local settings.
|
# Auto normalizes line endings on commit so devs don't need to change local settings.
|
||||||
# Only affects text files and ignores other file types.
|
# Only affects text files and ignores other file types.
|
||||||
# For more info see: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
|
# For more info see: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
|
||||||
* text=auto
|
* text=auto
|
||||||
|
|||||||
68
.github/CODEOWNERS
vendored
@@ -1,61 +1,7 @@
|
|||||||
# continuous integration
|
ldm/invoke/pngwriter.py @CapableWeb
|
||||||
/.github/workflows/ @mauwii @lstein @blessedcoolant
|
ldm/invoke/server_legacy.py @CapableWeb
|
||||||
|
scripts/legacy_api.py @CapableWeb
|
||||||
# documentation
|
tests/legacy_tests.sh @CapableWeb
|
||||||
/docs/ @lstein @mauwii @blessedcoolant
|
installer/ @tildebyte
|
||||||
mkdocs.yml @mauwii @lstein
|
.github/workflows/ @mauwii
|
||||||
|
docker_build/ @mauwii
|
||||||
# installation and configuration
|
|
||||||
/pyproject.toml @mauwii @lstein @ebr
|
|
||||||
/docker/ @mauwii
|
|
||||||
/scripts/ @ebr @lstein @blessedcoolant
|
|
||||||
/installer/ @ebr @lstein
|
|
||||||
ldm/invoke/config @lstein @ebr
|
|
||||||
invokeai/assets @lstein @blessedcoolant
|
|
||||||
invokeai/configs @lstein @ebr @blessedcoolant
|
|
||||||
/ldm/invoke/_version.py @lstein @blessedcoolant
|
|
||||||
|
|
||||||
# web ui
|
|
||||||
/invokeai/frontend @blessedcoolant @psychedelicious
|
|
||||||
/invokeai/backend @blessedcoolant @psychedelicious
|
|
||||||
|
|
||||||
# generation and model management
|
|
||||||
/ldm/*.py @lstein @blessedcoolant
|
|
||||||
/ldm/generate.py @lstein @keturn
|
|
||||||
/ldm/invoke/args.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/ckpt* @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/ckpt_generator @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/CLI.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/config @lstein @ebr @mauwii @blessedcoolant
|
|
||||||
/ldm/invoke/generator @keturn @damian0815
|
|
||||||
/ldm/invoke/globals.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/merge_diffusers.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/model_manager.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/txt2mask.py @lstein @blessedcoolant
|
|
||||||
/ldm/invoke/patchmatch.py @Kyle0654 @lstein
|
|
||||||
/ldm/invoke/restoration @lstein @blessedcoolant
|
|
||||||
|
|
||||||
# attention, textual inversion, model configuration
|
|
||||||
/ldm/models @damian0815 @keturn @blessedcoolant
|
|
||||||
/ldm/modules/textual_inversion_manager.py @lstein @blessedcoolant
|
|
||||||
/ldm/modules/attention.py @damian0815 @keturn
|
|
||||||
/ldm/modules/diffusionmodules @damian0815 @keturn
|
|
||||||
/ldm/modules/distributions @damian0815 @keturn
|
|
||||||
/ldm/modules/ema.py @damian0815 @keturn
|
|
||||||
/ldm/modules/embedding_manager.py @lstein
|
|
||||||
/ldm/modules/encoders @damian0815 @keturn
|
|
||||||
/ldm/modules/image_degradation @damian0815 @keturn
|
|
||||||
/ldm/modules/losses @damian0815 @keturn
|
|
||||||
/ldm/modules/x_transformer.py @damian0815 @keturn
|
|
||||||
|
|
||||||
# Nodes
|
|
||||||
apps/ @Kyle0654 @jpphoto
|
|
||||||
|
|
||||||
# legacy REST API
|
|
||||||
# these are dead code
|
|
||||||
#/ldm/invoke/pngwriter.py @CapableWeb
|
|
||||||
#/ldm/invoke/server_legacy.py @CapableWeb
|
|
||||||
#/scripts/legacy_api.py @CapableWeb
|
|
||||||
#/tests/legacy_tests.sh @CapableWeb
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
110
.github/workflows/build-container.yml
vendored
@@ -1,111 +1,43 @@
|
|||||||
|
# Building the Image without pushing to confirm it is still buildable
|
||||||
|
# confirum functionality would unfortunately need way more resources
|
||||||
name: build container image
|
name: build container image
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
- 'update/ci/docker/*'
|
- 'development'
|
||||||
- 'update/docker/*'
|
- 'update-dockerfile'
|
||||||
paths:
|
|
||||||
- 'pyproject.toml'
|
|
||||||
- 'ldm/**'
|
|
||||||
- 'invokeai/backend/**'
|
|
||||||
- 'invokeai/configs/**'
|
|
||||||
- 'invokeai/frontend/dist/**'
|
|
||||||
- 'docker/Dockerfile'
|
|
||||||
tags:
|
|
||||||
- 'v*.*.*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
flavor:
|
arch:
|
||||||
- amd
|
- x86_64
|
||||||
- cuda
|
- aarch64
|
||||||
- cpu
|
pip-requirements:
|
||||||
include:
|
- requirements-lin-amd.txt
|
||||||
- flavor: amd
|
- requirements-lin-cuda.txt
|
||||||
pip-extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
|
|
||||||
- flavor: cuda
|
|
||||||
pip-extra-index-url: ''
|
|
||||||
- flavor: cpu
|
|
||||||
pip-extra-index-url: 'https://download.pytorch.org/whl/cpu'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ${{ matrix.flavor }}
|
name: ${{ matrix.pip-requirements }} ${{ matrix.arch }}
|
||||||
env:
|
|
||||||
PLATFORMS: 'linux/amd64,linux/arm64'
|
|
||||||
DOCKERFILE: 'docker/Dockerfile'
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: prepare docker-tag
|
||||||
|
env:
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
run: echo "dockertag=${repository,,}" >> $GITHUB_ENV
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ github.repository }}
|
|
||||||
${{ vars.DOCKERHUB_REPOSITORY }}
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha,enable=true,prefix=sha-,format=short
|
|
||||||
flavor: |
|
|
||||||
latest=${{ matrix.flavor == 'cuda' && github.ref == 'refs/heads/main' }}
|
|
||||||
suffix=-${{ matrix.flavor }},onlatest=false
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
with:
|
|
||||||
platforms: ${{ env.PLATFORMS }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
if: github.event_name != 'pull_request' && vars.DOCKERHUB_REPOSITORY != ''
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
id: docker_build
|
uses: docker/build-push-action@v3
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ${{ env.DOCKERFILE }}
|
file: docker-build/Dockerfile
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: Linux/${{ matrix.arch }}
|
||||||
push: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' }}
|
push: false
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ env.dockertag }}:${{ matrix.pip-requirements }}-${{ matrix.arch }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
build-args: pip_requirements=${{ matrix.pip-requirements }}
|
||||||
build-args: PIP_EXTRA_INDEX_URL=${{ matrix.pip-extra-index-url }}
|
|
||||||
cache-from: |
|
|
||||||
type=gha,scope=${{ github.ref_name }}-${{ matrix.flavor }}
|
|
||||||
type=gha,scope=main-${{ matrix.flavor }}
|
|
||||||
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ matrix.flavor }}
|
|
||||||
|
|
||||||
- name: Docker Hub Description
|
|
||||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' && vars.DOCKERHUB_REPOSITORY != ''
|
|
||||||
uses: peter-evans/dockerhub-description@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
repository: ${{ vars.DOCKERHUB_REPOSITORY }}
|
|
||||||
short-description: ${{ github.event.repository.description }}
|
|
||||||
|
|||||||
34
.github/workflows/clean-caches.yml
vendored
@@ -1,34 +0,0 @@
|
|||||||
name: cleanup caches by a branch
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cleanup:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
run: |
|
|
||||||
gh extension install actions/gh-actions-cache
|
|
||||||
|
|
||||||
REPO=${{ github.repository }}
|
|
||||||
BRANCH=${{ github.ref }}
|
|
||||||
|
|
||||||
echo "Fetching list of cache key"
|
|
||||||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
|
|
||||||
|
|
||||||
## Setting this to not fail the workflow while deleting cache keys.
|
|
||||||
set +e
|
|
||||||
echo "Deleting caches..."
|
|
||||||
for cacheKey in $cacheKeysForPR
|
|
||||||
do
|
|
||||||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
|
|
||||||
done
|
|
||||||
echo "Done"
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
29
.github/workflows/lint-frontend.yml
vendored
@@ -1,29 +0,0 @@
|
|||||||
name: Lint frontend
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'invokeai/frontend/**'
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'invokeai/frontend/**'
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: invokeai/frontend
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint-frontend:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Setup Node 18
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- run: 'yarn install --frozen-lockfile'
|
|
||||||
- run: 'yarn tsc'
|
|
||||||
- run: 'yarn run madge'
|
|
||||||
- run: 'yarn run lint --max-warnings=0'
|
|
||||||
- run: 'yarn run prettier --check'
|
|
||||||
11
.github/workflows/mkdocs-material.yml
vendored
@@ -7,12 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mkdocs-material:
|
mkdocs-material:
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
REPO_URL: '${{ github.server_url }}/${{ github.repository }}'
|
|
||||||
REPO_NAME: '${{ github.repository }}'
|
|
||||||
SITE_URL: 'https://${{ github.repository_owner }}.github.io/InvokeAI'
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -23,15 +18,11 @@ jobs:
|
|||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
cache: pip
|
|
||||||
cache-dependency-path: pyproject.toml
|
|
||||||
|
|
||||||
- name: install requirements
|
- name: install requirements
|
||||||
env:
|
|
||||||
PIP_USE_PEP517: 1
|
|
||||||
run: |
|
run: |
|
||||||
python -m \
|
python -m \
|
||||||
pip install ".[docs]"
|
pip install -r docs/requirements-mkdocs.txt
|
||||||
|
|
||||||
- name: confirm buildability
|
- name: confirm buildability
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
20
.github/workflows/pyflakes.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- development
|
|
||||||
- 'release-candidate-*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pyflakes:
|
|
||||||
name: runner / pyflakes
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: pyflakes
|
|
||||||
uses: reviewdog/action-pyflakes@v1
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
reporter: github-pr-review
|
|
||||||
41
.github/workflows/pypi-release.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: PyPI Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'ldm/invoke/_version.py'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
if: github.repository == 'invoke-ai/InvokeAI'
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
env:
|
|
||||||
TWINE_USERNAME: __token__
|
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
||||||
TWINE_NON_INTERACTIVE: 1
|
|
||||||
steps:
|
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: install deps
|
|
||||||
run: pip install --upgrade build twine
|
|
||||||
|
|
||||||
- name: build package
|
|
||||||
run: python3 -m build
|
|
||||||
|
|
||||||
- name: check distribution
|
|
||||||
run: twine check dist/*
|
|
||||||
|
|
||||||
- name: check PyPI versions
|
|
||||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2.3'
|
|
||||||
run: |
|
|
||||||
pip install --upgrade requests
|
|
||||||
python -c "\
|
|
||||||
import scripts.pypi_helper; \
|
|
||||||
EXISTS=scripts.pypi_helper.local_on_pypi(); \
|
|
||||||
print(f'PACKAGE_EXISTS={EXISTS}')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: upload package
|
|
||||||
if: env.PACKAGE_EXISTS == 'False' && env.TWINE_PASSWORD != ''
|
|
||||||
run: twine upload dist/*
|
|
||||||
135
.github/workflows/test-invoke-conda.yml
vendored
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
name: Test invoke.py
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'development'
|
||||||
|
- 'fix-gh-actions-fork'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'development'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
matrix:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
stable-diffusion-model:
|
||||||
|
- 'stable-diffusion-1.5'
|
||||||
|
environment-yaml:
|
||||||
|
- environment-lin-amd.yml
|
||||||
|
- environment-lin-cuda.yml
|
||||||
|
- environment-mac.yml
|
||||||
|
include:
|
||||||
|
- environment-yaml: environment-lin-amd.yml
|
||||||
|
os: ubuntu-latest
|
||||||
|
default-shell: bash -l {0}
|
||||||
|
- environment-yaml: environment-lin-cuda.yml
|
||||||
|
os: ubuntu-latest
|
||||||
|
default-shell: bash -l {0}
|
||||||
|
- environment-yaml: environment-mac.yml
|
||||||
|
os: macos-12
|
||||||
|
default-shell: bash -l {0}
|
||||||
|
- stable-diffusion-model: stable-diffusion-1.5
|
||||||
|
stable-diffusion-model-url: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt
|
||||||
|
stable-diffusion-model-dl-path: models/ldm/stable-diffusion-v1
|
||||||
|
stable-diffusion-model-dl-name: v1-5-pruned-emaonly.ckpt
|
||||||
|
name: ${{ matrix.environment-yaml }} on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CONDA_ENV_NAME: invokeai
|
||||||
|
INVOKEAI_ROOT: '${{ github.workspace }}/invokeai'
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: ${{ matrix.default-shell }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
id: checkout-sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: create models.yaml from example
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.INVOKEAI_ROOT }}/configs
|
||||||
|
cp configs/models.yaml.example ${{ env.INVOKEAI_ROOT }}/configs/models.yaml
|
||||||
|
|
||||||
|
- name: create environment.yml
|
||||||
|
run: cp "environments-and-requirements/${{ matrix.environment-yaml }}" environment.yml
|
||||||
|
|
||||||
|
- name: Use cached conda packages
|
||||||
|
id: use-cached-conda-packages
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/conda_pkgs_dir
|
||||||
|
key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-yaml) }}
|
||||||
|
|
||||||
|
- name: Activate Conda Env
|
||||||
|
id: activate-conda-env
|
||||||
|
uses: conda-incubator/setup-miniconda@v2
|
||||||
|
with:
|
||||||
|
activate-environment: ${{ env.CONDA_ENV_NAME }}
|
||||||
|
environment-file: environment.yml
|
||||||
|
miniconda-version: latest
|
||||||
|
|
||||||
|
- name: set test prompt to main branch validation
|
||||||
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: set test prompt to development branch validation
|
||||||
|
if: ${{ github.ref == 'refs/heads/development' }}
|
||||||
|
run: echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: set test prompt to Pull Request validation
|
||||||
|
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
||||||
|
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Use Cached Stable Diffusion Model
|
||||||
|
id: cache-sd-model
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-${{ matrix.stable-diffusion-model }}
|
||||||
|
with:
|
||||||
|
path: ${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}
|
||||||
|
key: ${{ env.cache-name }}
|
||||||
|
|
||||||
|
- name: Download ${{ matrix.stable-diffusion-model }}
|
||||||
|
id: download-stable-diffusion-model
|
||||||
|
if: ${{ steps.cache-sd-model.outputs.cache-hit != 'true' }}
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}"
|
||||||
|
curl \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.HUGGINGFACE_TOKEN }}" \
|
||||||
|
-o "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}/${{ matrix.stable-diffusion-model-dl-name }}" \
|
||||||
|
-L ${{ matrix.stable-diffusion-model-url }}
|
||||||
|
|
||||||
|
- name: run configure_invokeai.py
|
||||||
|
id: run-preload-models
|
||||||
|
run: |
|
||||||
|
python scripts/configure_invokeai.py --no-interactive --yes
|
||||||
|
|
||||||
|
- name: cat ~/.invokeai
|
||||||
|
id: cat-invokeai
|
||||||
|
run: cat ~/.invokeai
|
||||||
|
|
||||||
|
- name: Run the tests
|
||||||
|
id: run-tests
|
||||||
|
run: |
|
||||||
|
time python scripts/invoke.py \
|
||||||
|
--no-patchmatch \
|
||||||
|
--no-nsfw_checker \
|
||||||
|
--model ${{ matrix.stable-diffusion-model }} \
|
||||||
|
--from_file ${{ env.TEST_PROMPTS }} \
|
||||||
|
--root="${{ env.INVOKEAI_ROOT }}" \
|
||||||
|
--outdir="${{ env.INVOKEAI_ROOT }}/outputs"
|
||||||
|
|
||||||
|
- name: export conda env
|
||||||
|
id: export-conda-env
|
||||||
|
run: |
|
||||||
|
mkdir -p outputs/img-samples
|
||||||
|
conda env export --name ${{ env.CONDA_ENV_NAME }} > outputs/img-samples/environment-${{ runner.os }}-${{ runner.arch }}.yml
|
||||||
|
|
||||||
|
- name: Archive results
|
||||||
|
id: archive-results
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: results_${{ matrix.requirements-file }}_${{ matrix.python-version }}
|
||||||
|
path: ${{ env.INVOKEAI_ROOT }}/outputs
|
||||||
67
.github/workflows/test-invoke-pip-skip.yml
vendored
@@ -1,67 +0,0 @@
|
|||||||
name: Test invoke.py pip
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- 'pyproject.toml'
|
|
||||||
- 'ldm/**'
|
|
||||||
- 'invokeai/backend/**'
|
|
||||||
- 'invokeai/configs/**'
|
|
||||||
- 'invokeai/frontend/dist/**'
|
|
||||||
merge_group:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version:
|
|
||||||
# - '3.9'
|
|
||||||
- '3.10'
|
|
||||||
pytorch:
|
|
||||||
# - linux-cuda-11_6
|
|
||||||
- linux-cuda-11_7
|
|
||||||
- linux-rocm-5_2
|
|
||||||
- linux-cpu
|
|
||||||
- macos-default
|
|
||||||
- windows-cpu
|
|
||||||
# - windows-cuda-11_6
|
|
||||||
# - windows-cuda-11_7
|
|
||||||
include:
|
|
||||||
# - pytorch: linux-cuda-11_6
|
|
||||||
# os: ubuntu-22.04
|
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
|
||||||
# github-env: $GITHUB_ENV
|
|
||||||
- pytorch: linux-cuda-11_7
|
|
||||||
os: ubuntu-22.04
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: linux-rocm-5_2
|
|
||||||
os: ubuntu-22.04
|
|
||||||
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: linux-cpu
|
|
||||||
os: ubuntu-22.04
|
|
||||||
extra-index-url: 'https://download.pytorch.org/whl/cpu'
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: macos-default
|
|
||||||
os: macOS-12
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: windows-cpu
|
|
||||||
os: windows-2022
|
|
||||||
github-env: $env:GITHUB_ENV
|
|
||||||
# - pytorch: windows-cuda-11_6
|
|
||||||
# os: windows-2022
|
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
|
||||||
# github-env: $env:GITHUB_ENV
|
|
||||||
# - pytorch: windows-cuda-11_7
|
|
||||||
# os: windows-2022
|
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu117'
|
|
||||||
# github-env: $env:GITHUB_ENV
|
|
||||||
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- run: 'echo "No build required"'
|
|
||||||
190
.github/workflows/test-invoke-pip.yml
vendored
@@ -3,146 +3,126 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
paths:
|
- 'development'
|
||||||
- 'pyproject.toml'
|
|
||||||
- 'ldm/**'
|
|
||||||
- 'invokeai/backend/**'
|
|
||||||
- 'invokeai/configs/**'
|
|
||||||
- 'invokeai/frontend/dist/**'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
branches:
|
||||||
- 'pyproject.toml'
|
- 'main'
|
||||||
- 'ldm/**'
|
- 'development'
|
||||||
- 'invokeai/backend/**'
|
|
||||||
- 'invokeai/configs/**'
|
|
||||||
- 'invokeai/frontend/dist/**'
|
|
||||||
types:
|
|
||||||
- 'ready_for_review'
|
|
||||||
- 'opened'
|
|
||||||
- 'synchronize'
|
|
||||||
merge_group:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
matrix:
|
matrix:
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
stable-diffusion-model:
|
||||||
|
- stable-diffusion-1.5
|
||||||
|
requirements-file:
|
||||||
|
- requirements-lin-cuda.txt
|
||||||
|
- requirements-lin-amd.txt
|
||||||
|
- requirements-mac-mps-cpu.txt
|
||||||
python-version:
|
python-version:
|
||||||
# - '3.9'
|
# - '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
pytorch:
|
|
||||||
# - linux-cuda-11_6
|
|
||||||
- linux-cuda-11_7
|
|
||||||
- linux-rocm-5_2
|
|
||||||
- linux-cpu
|
|
||||||
- macos-default
|
|
||||||
- windows-cpu
|
|
||||||
# - windows-cuda-11_6
|
|
||||||
# - windows-cuda-11_7
|
|
||||||
include:
|
include:
|
||||||
# - pytorch: linux-cuda-11_6
|
- requirements-file: requirements-lin-cuda.txt
|
||||||
# os: ubuntu-22.04
|
os: ubuntu-latest
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
default-shell: bash -l {0}
|
||||||
# github-env: $GITHUB_ENV
|
- requirements-file: requirements-lin-amd.txt
|
||||||
- pytorch: linux-cuda-11_7
|
os: ubuntu-latest
|
||||||
os: ubuntu-22.04
|
default-shell: bash -l {0}
|
||||||
github-env: $GITHUB_ENV
|
- requirements-file: requirements-mac-mps-cpu.txt
|
||||||
- pytorch: linux-rocm-5_2
|
|
||||||
os: ubuntu-22.04
|
|
||||||
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: linux-cpu
|
|
||||||
os: ubuntu-22.04
|
|
||||||
extra-index-url: 'https://download.pytorch.org/whl/cpu'
|
|
||||||
github-env: $GITHUB_ENV
|
|
||||||
- pytorch: macos-default
|
|
||||||
os: macOS-12
|
os: macOS-12
|
||||||
github-env: $GITHUB_ENV
|
default-shell: bash -l {0}
|
||||||
- pytorch: windows-cpu
|
- stable-diffusion-model: stable-diffusion-1.5
|
||||||
os: windows-2022
|
stable-diffusion-model-url: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt
|
||||||
github-env: $env:GITHUB_ENV
|
stable-diffusion-model-dl-path: models/ldm/stable-diffusion-v1
|
||||||
# - pytorch: windows-cuda-11_6
|
stable-diffusion-model-dl-name: v1-5-pruned-emaonly.ckpt
|
||||||
# os: windows-2022
|
name: ${{ matrix.requirements-file }} on ${{ matrix.python-version }}
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
|
|
||||||
# github-env: $env:GITHUB_ENV
|
|
||||||
# - pytorch: windows-cuda-11_7
|
|
||||||
# os: windows-2022
|
|
||||||
# extra-index-url: 'https://download.pytorch.org/whl/cu117'
|
|
||||||
# github-env: $env:GITHUB_ENV
|
|
||||||
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: ${{ matrix.default-shell }}
|
||||||
env:
|
env:
|
||||||
PIP_USE_PEP517: '1'
|
INVOKEAI_ROOT: '${{ github.workspace }}/invokeai'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
id: checkout-sources
|
id: checkout-sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: create models.yaml from example
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ env.INVOKEAI_ROOT }}/configs
|
||||||
|
cp configs/models.yaml.example ${{ env.INVOKEAI_ROOT }}/configs/models.yaml
|
||||||
|
|
||||||
- name: set test prompt to main branch validation
|
- name: set test prompt to main branch validation
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> ${{ matrix.github-env }}
|
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: set test prompt to development branch validation
|
||||||
|
if: ${{ github.ref == 'refs/heads/development' }}
|
||||||
|
run: echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: set test prompt to Pull Request validation
|
- name: set test prompt to Pull Request validation
|
||||||
if: ${{ github.ref != 'refs/heads/main' }}
|
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development' }}
|
||||||
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> ${{ matrix.github-env }}
|
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: create requirements.txt
|
||||||
|
run: cp 'environments-and-requirements/${{ matrix.requirements-file }}' '${{ matrix.requirements-file }}'
|
||||||
|
|
||||||
- name: setup python
|
- name: setup python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: pip
|
cache: 'pip'
|
||||||
cache-dependency-path: pyproject.toml
|
cache-dependency-path: ${{ matrix.requirements-file }}
|
||||||
|
|
||||||
- name: install invokeai
|
# - name: install dependencies
|
||||||
|
# run: ${{ env.pythonLocation }}/bin/pip install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
|
- name: install requirements
|
||||||
|
run: ${{ env.pythonLocation }}/bin/pip install -r '${{ matrix.requirements-file }}'
|
||||||
|
|
||||||
|
- name: Use Cached Stable Diffusion Model
|
||||||
|
id: cache-sd-model
|
||||||
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
PIP_EXTRA_INDEX_URL: ${{ matrix.extra-index-url }}
|
cache-name: cache-${{ matrix.stable-diffusion-model }}
|
||||||
run: >
|
with:
|
||||||
pip3 install
|
path: ${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}
|
||||||
--editable=".[test]"
|
key: ${{ env.cache-name }}
|
||||||
|
|
||||||
- name: run pytest
|
- name: Download ${{ matrix.stable-diffusion-model }}
|
||||||
id: run-pytest
|
id: download-stable-diffusion-model
|
||||||
run: pytest
|
if: ${{ steps.cache-sd-model.outputs.cache-hit != 'true' }}
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}"
|
||||||
|
curl \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.HUGGINGFACE_TOKEN }}" \
|
||||||
|
-o "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}/${{ matrix.stable-diffusion-model-dl-name }}" \
|
||||||
|
-L ${{ matrix.stable-diffusion-model-url }}
|
||||||
|
|
||||||
- name: set INVOKEAI_OUTDIR
|
- name: run configure_invokeai.py
|
||||||
run: >
|
|
||||||
python -c
|
|
||||||
"import os;from ldm.invoke.globals import Globals;OUTDIR=os.path.join(Globals.root,str('outputs'));print(f'INVOKEAI_OUTDIR={OUTDIR}')"
|
|
||||||
>> ${{ matrix.github-env }}
|
|
||||||
|
|
||||||
- name: run invokeai-configure
|
|
||||||
id: run-preload-models
|
id: run-preload-models
|
||||||
env:
|
run: |
|
||||||
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
|
${{ env.pythonLocation }}/bin/python scripts/configure_invokeai.py --no-interactive --yes
|
||||||
run: >
|
|
||||||
invokeai-configure
|
|
||||||
--yes
|
|
||||||
--default_only
|
|
||||||
--full-precision
|
|
||||||
# can't use fp16 weights without a GPU
|
|
||||||
|
|
||||||
- name: run invokeai
|
- name: cat ~/.invokeai
|
||||||
id: run-invokeai
|
id: cat-invokeai
|
||||||
env:
|
run: cat ~/.invokeai
|
||||||
# Set offline mode to make sure configure preloaded successfully.
|
|
||||||
HF_HUB_OFFLINE: 1
|
- name: Run the tests
|
||||||
HF_DATASETS_OFFLINE: 1
|
id: run-tests
|
||||||
TRANSFORMERS_OFFLINE: 1
|
run: |
|
||||||
run: >
|
time ${{ env.pythonLocation }}/bin/python scripts/invoke.py \
|
||||||
invokeai
|
--no-patchmatch \
|
||||||
--no-patchmatch
|
--no-nsfw_checker \
|
||||||
--no-nsfw_checker
|
--model ${{ matrix.stable-diffusion-model }} \
|
||||||
--from_file ${{ env.TEST_PROMPTS }}
|
--from_file ${{ env.TEST_PROMPTS }} \
|
||||||
--outdir ${{ env.INVOKEAI_OUTDIR }}/${{ matrix.python-version }}/${{ matrix.pytorch }}
|
--root="${{ env.INVOKEAI_ROOT }}" \
|
||||||
|
--outdir="${{ env.INVOKEAI_ROOT }}/outputs"
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
id: archive-results
|
id: archive-results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: results
|
name: results_${{ matrix.requirements-file }}_${{ matrix.python-version }}
|
||||||
path: ${{ env.INVOKEAI_OUTDIR }}
|
path: ${{ env.INVOKEAI_ROOT }}/outputs
|
||||||
|
|||||||
23
.gitignore
vendored
@@ -1,6 +1,4 @@
|
|||||||
# ignore default image save location and model symbolic link
|
# ignore default image save location and model symbolic link
|
||||||
.idea/
|
|
||||||
embeddings/
|
|
||||||
outputs/
|
outputs/
|
||||||
models/ldm/stable-diffusion-v1/model.ckpt
|
models/ldm/stable-diffusion-v1/model.ckpt
|
||||||
**/restoration/codeformer/weights
|
**/restoration/codeformer/weights
|
||||||
@@ -8,7 +6,6 @@ models/ldm/stable-diffusion-v1/model.ckpt
|
|||||||
# ignore user models config
|
# ignore user models config
|
||||||
configs/models.user.yaml
|
configs/models.user.yaml
|
||||||
config/models.user.yml
|
config/models.user.yml
|
||||||
invokeai.init
|
|
||||||
|
|
||||||
# ignore the Anaconda/Miniconda installer used while building Docker image
|
# ignore the Anaconda/Miniconda installer used while building Docker image
|
||||||
anaconda.sh
|
anaconda.sh
|
||||||
@@ -68,13 +65,11 @@ htmlcov/
|
|||||||
.cache
|
.cache
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
coverage.xml
|
coverage.xml
|
||||||
cov.xml
|
|
||||||
*.cover
|
*.cover
|
||||||
*.py,cover
|
*.py,cover
|
||||||
.hypothesis/
|
.hypothesis/
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
cover/
|
cover/
|
||||||
junit/
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
@@ -198,7 +193,7 @@ checkpoints
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Let the frontend manage its own gitignore
|
# Let the frontend manage its own gitignore
|
||||||
!invokeai/frontend/*
|
!frontend/*
|
||||||
|
|
||||||
# Scratch folder
|
# Scratch folder
|
||||||
.scratch/
|
.scratch/
|
||||||
@@ -227,11 +222,15 @@ environment.yml
|
|||||||
requirements.txt
|
requirements.txt
|
||||||
|
|
||||||
# source installer files
|
# source installer files
|
||||||
installer/*zip
|
source_installer/*zip
|
||||||
installer/install.bat
|
source_installer/invokeAI
|
||||||
installer/install.sh
|
install.bat
|
||||||
installer/update.bat
|
install.sh
|
||||||
installer/update.sh
|
update.bat
|
||||||
|
update.sh
|
||||||
|
|
||||||
|
# this may be present if the user created a venv
|
||||||
|
invokeai
|
||||||
|
|
||||||
# no longer stored in source directory
|
# no longer stored in source directory
|
||||||
models
|
models
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# See https://pre-commit.com for more information
|
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
|
||||||
repos:
|
|
||||||
- repo: https://github.com/psf/black
|
|
||||||
rev: 23.1.0
|
|
||||||
hooks:
|
|
||||||
- id: black
|
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
|
||||||
rev: 5.12.0
|
|
||||||
hooks:
|
|
||||||
- id: isort
|
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
|
||||||
rev: 6.0.0
|
|
||||||
hooks:
|
|
||||||
- id: flake8
|
|
||||||
additional_dependencies:
|
|
||||||
- flake8-black
|
|
||||||
- flake8-bugbear
|
|
||||||
- flake8-comprehensions
|
|
||||||
- flake8-simplify
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
||||||
rev: 'v3.0.0-alpha.4'
|
|
||||||
hooks:
|
|
||||||
- id: prettier
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
||||||
rev: v4.4.0
|
|
||||||
hooks:
|
|
||||||
- id: check-added-large-files
|
|
||||||
- id: check-executables-have-shebangs
|
|
||||||
- id: check-shebang-scripts-are-executable
|
|
||||||
- id: check-merge-conflict
|
|
||||||
- id: check-symlinks
|
|
||||||
- id: check-toml
|
|
||||||
- id: end-of-file-fixer
|
|
||||||
- id: no-commit-to-branch
|
|
||||||
args: ['--branch', 'main']
|
|
||||||
- id: trailing-whitespace
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
invokeai/frontend/.husky
|
|
||||||
invokeai/frontend/patches
|
|
||||||
|
|
||||||
# Ignore artifacts:
|
|
||||||
build
|
|
||||||
coverage
|
|
||||||
static
|
|
||||||
invokeai/frontend/dist
|
|
||||||
|
|
||||||
# Ignore all HTML files:
|
|
||||||
*.html
|
|
||||||
|
|
||||||
# Ignore deprecated docs
|
|
||||||
docs/installation/deprecated_documentation
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
embeddedLanguageFormatting: auto
|
|
||||||
endOfLine: lf
|
endOfLine: lf
|
||||||
singleQuote: true
|
tabWidth: 2
|
||||||
semi: true
|
|
||||||
trailingComma: es5
|
|
||||||
useTabs: false
|
useTabs: false
|
||||||
|
singleQuote: true
|
||||||
|
quoteProps: as-needed
|
||||||
|
embeddedLanguageFormatting: auto
|
||||||
overrides:
|
overrides:
|
||||||
- files: '*.md'
|
- files: '*.md'
|
||||||
options:
|
options:
|
||||||
@@ -11,9 +11,3 @@ overrides:
|
|||||||
printWidth: 80
|
printWidth: 80
|
||||||
parser: markdown
|
parser: markdown
|
||||||
cursorOffset: -1
|
cursorOffset: -1
|
||||||
- files: docs/**/*.md
|
|
||||||
options:
|
|
||||||
tabWidth: 4
|
|
||||||
- files: 'invokeai/frontend/public/locales/*.json'
|
|
||||||
options:
|
|
||||||
tabWidth: 4
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
[pytest]
|
|
||||||
DJANGO_SETTINGS_MODULE = webtas.settings
|
|
||||||
; python_files = tests.py test_*.py *_tests.py
|
|
||||||
|
|
||||||
addopts = --cov=. --cov-config=.coveragerc --cov-report xml:cov.xml
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<img src="docs/assets/invoke_ai_banner.png" align="center">
|
<img src="docs/assets/invoke_ai_banner.png" align="center">
|
||||||
|
|
||||||
Invoke-AI is a community of software developers, researchers, and user
|
Invoke-AI is a community of software developers, researchers, and user
|
||||||
interface experts who have come together on a voluntary basis to build
|
interface experts who have come together on a voluntary basis to build
|
||||||
@@ -81,4 +81,5 @@ area. Disputes are resolved by open and honest communication.
|
|||||||
|
|
||||||
## Signature
|
## Signature
|
||||||
|
|
||||||
This document has been collectively crafted and approved by the current InvokeAI team members, as of 28 Nov 2022: **lstein** (Lincoln Stein), **blessedcoolant**, **hipsterusername** (Kent Keirsey), **Kyle0654** (Kyle Schouviller), **damian0815**, **mauwii** (Matthias Wild), **Netsvetaev** (Artur Netsvetaev), **psychedelicious**, **tildebyte**, **keturn**, and **ebr** (Eugene Brodsky). Although individuals within the group may hold differing views on particular details and/or their implications, we are all in agreement about its fundamental statements, as well as their significance and importance to this project moving forward.
|
This document has been collectively crafted and approved by the current InvokeAI team members, as of 28 Nov 2022: **lstein** (Lincoln Stein), **blessedcoolant**, **hipsterusername** (Kent Keirsey), **Kyle0654** (Kyle Schouviller), **damian0815**, **mauwii** (Matthias Wild), **Netsvetaev** (Artur Netsvetaev), **psychedelicious**, **tildebyte**, and **keturn**. Although individuals within the group may hold differing views on particular details and/or their implications, we are all in agreement about its fundamental statements, as well as their significance and importance to this project moving forward.
|
||||||
|
|
||||||
|
|||||||
317
README.md
@@ -1,19 +1,23 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# InvokeAI: A Stable Diffusion Toolkit
|
# InvokeAI: A Stable Diffusion Toolkit
|
||||||
|
|
||||||
|
_Formerly known as lstein/stable-diffusion_
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
[![discord badge]][discord link]
|
[![discord badge]][discord link]
|
||||||
|
|
||||||
[![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link]
|
[![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link]
|
||||||
|
|
||||||
[![CI checks on main badge]][CI checks on main link] [![latest commit to main badge]][latest commit to main link]
|
[![CI checks on main badge]][CI checks on main link] [![CI checks on dev badge]][CI checks on dev link] [![latest commit to dev badge]][latest commit to dev link]
|
||||||
|
|
||||||
[![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link] [![translation status badge]][translation status link]
|
[![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link]
|
||||||
|
|
||||||
|
[CI checks on dev badge]: https://flat.badgen.net/github/checks/invoke-ai/InvokeAI/development?label=CI%20status%20on%20dev&cache=900&icon=github
|
||||||
|
[CI checks on dev link]: https://github.com/invoke-ai/InvokeAI/actions?query=branch%3Adevelopment
|
||||||
[CI checks on main badge]: https://flat.badgen.net/github/checks/invoke-ai/InvokeAI/main?label=CI%20status%20on%20main&cache=900&icon=github
|
[CI checks on main badge]: https://flat.badgen.net/github/checks/invoke-ai/InvokeAI/main?label=CI%20status%20on%20main&cache=900&icon=github
|
||||||
[CI checks on main link]:https://github.com/invoke-ai/InvokeAI/actions?query=branch%3Amain
|
[CI checks on main link]: https://github.com/invoke-ai/InvokeAI/actions/workflows/test-invoke-conda.yml
|
||||||
[discord badge]: https://flat.badgen.net/discord/members/ZmtBAhwWhy?icon=discord
|
[discord badge]: https://flat.badgen.net/discord/members/ZmtBAhwWhy?icon=discord
|
||||||
[discord link]: https://discord.gg/ZmtBAhwWhy
|
[discord link]: https://discord.gg/ZmtBAhwWhy
|
||||||
[github forks badge]: https://flat.badgen.net/github/forks/invoke-ai/InvokeAI?icon=github
|
[github forks badge]: https://flat.badgen.net/github/forks/invoke-ai/InvokeAI?icon=github
|
||||||
@@ -24,246 +28,159 @@
|
|||||||
[github open prs link]: https://github.com/invoke-ai/InvokeAI/pulls?q=is%3Apr+is%3Aopen
|
[github open prs link]: https://github.com/invoke-ai/InvokeAI/pulls?q=is%3Apr+is%3Aopen
|
||||||
[github stars badge]: https://flat.badgen.net/github/stars/invoke-ai/InvokeAI?icon=github
|
[github stars badge]: https://flat.badgen.net/github/stars/invoke-ai/InvokeAI?icon=github
|
||||||
[github stars link]: https://github.com/invoke-ai/InvokeAI/stargazers
|
[github stars link]: https://github.com/invoke-ai/InvokeAI/stargazers
|
||||||
[latest commit to main badge]: https://flat.badgen.net/github/last-commit/invoke-ai/InvokeAI/main?icon=github&color=yellow&label=last%20dev%20commit&cache=900
|
[latest commit to dev badge]: https://flat.badgen.net/github/last-commit/invoke-ai/InvokeAI/development?icon=github&color=yellow&label=last%20dev%20commit&cache=900
|
||||||
[latest commit to main link]: https://github.com/invoke-ai/InvokeAI/commits/main
|
[latest commit to dev link]: https://github.com/invoke-ai/InvokeAI/commits/development
|
||||||
[latest release badge]: https://flat.badgen.net/github/release/invoke-ai/InvokeAI/development?icon=github
|
[latest release badge]: https://flat.badgen.net/github/release/invoke-ai/InvokeAI/development?icon=github
|
||||||
[latest release link]: https://github.com/invoke-ai/InvokeAI/releases
|
[latest release link]: https://github.com/invoke-ai/InvokeAI/releases
|
||||||
[translation status badge]: https://hosted.weblate.org/widgets/invokeai/-/svg-badge.svg
|
|
||||||
[translation status link]: https://hosted.weblate.org/engage/invokeai/
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
InvokeAI is a leading creative engine built to empower professionals and enthusiasts alike. Generate and create stunning visual media using the latest AI-driven technologies. InvokeAI offers an industry leading Web Interface, interactive Command Line Interface, and also serves as the foundation for multiple commercial products.
|
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
|
||||||
|
process with various new features and options to aid the image
|
||||||
|
generation process. It runs on Windows, Mac and Linux machines, with
|
||||||
|
GPU cards with as little as 4 GB of RAM. It provides both a polished
|
||||||
|
Web interface (see below), and an easy-to-use command-line interface.
|
||||||
|
|
||||||
**Quick links**: [[How to Install](https://invoke-ai.github.io/InvokeAI/#installation)] [<a href="https://discord.gg/ZmtBAhwWhy">Discord Server</a>] [<a href="https://invoke-ai.github.io/InvokeAI/">Documentation and Tutorials</a>] [<a href="https://github.com/invoke-ai/InvokeAI/">Code and Downloads</a>] [<a href="https://github.com/invoke-ai/InvokeAI/issues">Bug Reports</a>] [<a href="https://github.com/invoke-ai/InvokeAI/discussions">Discussion, Ideas & Q&A</a>]
|
**Quick links**: [<a href="https://discord.gg/ZmtBAhwWhy">Discord Server</a>] [<a href="https://invoke-ai.github.io/InvokeAI/">Documentation and Tutorials</a>] [<a href="https://github.com/invoke-ai/InvokeAI/">Code and Downloads</a>] [<a href="https://github.com/invoke-ai/InvokeAI/issues">Bug Reports</a>] [<a href="https://github.com/invoke-ai/InvokeAI/discussions">Discussion, Ideas & Q&A</a>]
|
||||||
|
|
||||||
_Note: InvokeAI is rapidly evolving. Please use the
|
<div align="center"><img src="docs/assets/invoke-web-server-1.png" width=640></div>
|
||||||
|
|
||||||
|
|
||||||
|
_Note: This fork is rapidly evolving. Please use the
|
||||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues) tab to report bugs and make feature
|
[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 us diagnose issues faster._
|
requests. Be sure to use the provided templates. They will help aid diagnose issues faster._
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
1. [Quick Start](#getting-started-with-invokeai)
|
1. [Installation](#installation)
|
||||||
2. [Installation](#detailed-installation-instructions)
|
2. [Hardware Requirements](#hardware-requirements)
|
||||||
3. [Hardware Requirements](#hardware-requirements)
|
3. [Features](#features)
|
||||||
4. [Features](#features)
|
4. [Latest Changes](#latest-changes)
|
||||||
5. [Latest Changes](#latest-changes)
|
5. [Troubleshooting](#troubleshooting)
|
||||||
6. [Troubleshooting](#troubleshooting)
|
6. [Contributing](#contributing)
|
||||||
7. [Contributing](#contributing)
|
7. [Contributors](#contributors)
|
||||||
8. [Contributors](#contributors)
|
8. [Support](#support)
|
||||||
9. [Support](#support)
|
9. [Further Reading](#further-reading)
|
||||||
10. [Further Reading](#further-reading)
|
|
||||||
|
|
||||||
## Getting Started with InvokeAI
|
### Installation
|
||||||
|
|
||||||
For full installation and upgrade instructions, please see:
|
|
||||||
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/)
|
|
||||||
|
|
||||||
### Automatic Installer (suggested for 1st time users)
|
|
||||||
|
|
||||||
1. Go to the bottom of the [Latest Release Page](https://github.com/invoke-ai/InvokeAI/releases/latest)
|
|
||||||
|
|
||||||
2. Download the .zip file for your OS (Windows/macOS/Linux).
|
|
||||||
|
|
||||||
3. Unzip the file.
|
|
||||||
|
|
||||||
4. If you are on Windows, double-click on the `install.bat` script. On
|
|
||||||
macOS, open a Terminal window, drag the file `install.sh` from Finder
|
|
||||||
into the Terminal, and press return. On Linux, run `install.sh`.
|
|
||||||
|
|
||||||
5. You'll be asked to confirm the location of the folder in which
|
|
||||||
to install InvokeAI and its image generation model files. Pick a
|
|
||||||
location with at least 15 GB of free memory. More if you plan on
|
|
||||||
installing lots of models.
|
|
||||||
|
|
||||||
6. Wait while the installer does its thing. After installing the software,
|
|
||||||
the installer will launch a script that lets you configure InvokeAI and
|
|
||||||
select a set of starting image generaiton models.
|
|
||||||
|
|
||||||
7. Find the folder that InvokeAI was installed into (it is not the
|
|
||||||
same as the unpacked zip file directory!) The default location of this
|
|
||||||
folder (if you didn't change it in step 5) is `~/invokeai` on
|
|
||||||
Linux/Mac systems, and `C:\Users\YourName\invokeai` on Windows. This directory will contain launcher scripts named `invoke.sh` and `invoke.bat`.
|
|
||||||
|
|
||||||
8. On Windows systems, double-click on the `invoke.bat` file. On
|
|
||||||
macOS, open a Terminal window, drag `invoke.sh` from the folder into
|
|
||||||
the Terminal, and press return. On Linux, run `invoke.sh`
|
|
||||||
|
|
||||||
9. Press 2 to open the "browser-based UI", press enter/return, wait a
|
|
||||||
minute or two for Stable Diffusion to start up, then open your browser
|
|
||||||
and go to http://localhost:9090.
|
|
||||||
|
|
||||||
10. Type `banana sushi` in the box on the top left and click `Invoke`
|
|
||||||
|
|
||||||
### Command-Line Installation (for users familiar with Terminals)
|
|
||||||
|
|
||||||
You must have Python 3.9 or 3.10 installed on your machine. Earlier or later versions are
|
|
||||||
not supported.
|
|
||||||
|
|
||||||
1. Open a command-line window on your machine. The PowerShell is recommended for Windows.
|
|
||||||
2. Create a directory to install InvokeAI into. You'll need at least 15 GB of free space:
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
mkdir invokeai
|
|
||||||
````
|
|
||||||
|
|
||||||
3. Create a virtual environment named `.venv` inside this directory and activate it:
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
cd invokeai
|
|
||||||
python -m venv .venv --prompt InvokeAI
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Activate the virtual environment (do it every time you run InvokeAI)
|
|
||||||
|
|
||||||
_For Linux/Mac users:_
|
|
||||||
|
|
||||||
```sh
|
|
||||||
source .venv/bin/activate
|
|
||||||
```
|
|
||||||
|
|
||||||
_For Windows users:_
|
|
||||||
|
|
||||||
```ps
|
|
||||||
.venv\Scripts\activate
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Install the InvokeAI module and its dependencies. Choose the command suited for your platform & GPU.
|
|
||||||
|
|
||||||
_For Windows/Linux with an NVIDIA GPU:_
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
pip install InvokeAI[xformers] --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
|
|
||||||
```
|
|
||||||
|
|
||||||
_For Linux with an AMD GPU:_
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.4.2
|
|
||||||
```
|
|
||||||
|
|
||||||
_For Macintoshes, either Intel or M1/M2:_
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pip install InvokeAI --use-pep517
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Configure InvokeAI and install a starting set of image generation models (you only need to do this once):
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
invokeai-configure
|
|
||||||
```
|
|
||||||
|
|
||||||
7. Launch the web server (do it every time you run InvokeAI):
|
|
||||||
|
|
||||||
```terminal
|
|
||||||
invokeai --web
|
|
||||||
```
|
|
||||||
|
|
||||||
8. Point your browser to http://localhost:9090 to bring up the web interface.
|
|
||||||
9. Type `banana sushi` in the box on the top left and click `Invoke`.
|
|
||||||
|
|
||||||
Be sure to activate the virtual environment each time before re-launching InvokeAI,
|
|
||||||
using `source .venv/bin/activate` or `.venv\Scripts\activate`.
|
|
||||||
|
|
||||||
### Detailed Installation Instructions
|
|
||||||
|
|
||||||
This fork is supported across Linux, Windows and Macintosh. Linux
|
This fork is supported across Linux, Windows and Macintosh. Linux
|
||||||
users can use either an Nvidia-based card (with CUDA support) or an
|
users can use either an Nvidia-based card (with CUDA support) or an
|
||||||
AMD card (using the ROCm driver). For full installation and upgrade
|
AMD card (using the ROCm driver). For full installation and upgrade
|
||||||
instructions, please see:
|
instructions, please see:
|
||||||
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_SOURCE/)
|
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/)
|
||||||
|
|
||||||
## Hardware Requirements
|
### Hardware Requirements
|
||||||
|
|
||||||
InvokeAI is supported across Linux, Windows and macOS. Linux
|
#### System
|
||||||
users can use either an Nvidia-based card (with CUDA support) or an
|
|
||||||
AMD card (using the ROCm driver).
|
|
||||||
|
|
||||||
### System
|
You wil need one of the following:
|
||||||
|
|
||||||
You will need one of the following:
|
|
||||||
|
|
||||||
- An NVIDIA-based graphics card with 4 GB or more VRAM memory.
|
- An NVIDIA-based graphics card with 4 GB or more VRAM memory.
|
||||||
- An Apple computer with an M1 chip.
|
- An Apple computer with an M1 chip.
|
||||||
- An AMD-based graphics card with 4GB or more VRAM memory. (Linux only)
|
|
||||||
|
|
||||||
We do not recommend the GTX 1650 or 1660 series video cards. They are
|
#### Memory
|
||||||
unable to run in half-precision mode and do not have sufficient VRAM
|
|
||||||
to render 512x512 images.
|
|
||||||
|
|
||||||
### Memory
|
|
||||||
|
|
||||||
- At least 12 GB Main Memory RAM.
|
- At least 12 GB Main Memory RAM.
|
||||||
|
|
||||||
### Disk
|
#### Disk
|
||||||
|
|
||||||
- At least 12 GB of free disk space for the machine learning model, Python, and all its dependencies.
|
- At least 12 GB of free disk space for the machine learning model, Python, and all its dependencies.
|
||||||
|
|
||||||
## Features
|
**Note**
|
||||||
|
|
||||||
Feature documentation can be reviewed by navigating to [the InvokeAI Documentation page](https://invoke-ai.github.io/InvokeAI/features/)
|
If you have a Nvidia 10xx series card (e.g. the 1080ti), please
|
||||||
|
run the dream script in full-precision mode as shown below.
|
||||||
|
|
||||||
### *Web Server & UI*
|
Similarly, specify full-precision mode on Apple M1 hardware.
|
||||||
|
|
||||||
InvokeAI offers a locally hosted Web Server & React Frontend, with an industry leading user experience. The Web-based UI allows for simple and intuitive workflows, and is responsive for use on mobile devices and tablets accessing the web server.
|
Precision is auto configured based on the device. If however you encounter
|
||||||
|
errors like 'expected type Float but found Half' or 'not implemented for Half'
|
||||||
|
you can try starting `invoke.py` with the `--precision=float32` flag:
|
||||||
|
|
||||||
### *Unified Canvas*
|
```bash
|
||||||
|
(invokeai) ~/InvokeAI$ python scripts/invoke.py --precision=float32
|
||||||
|
```
|
||||||
|
|
||||||
The Unified Canvas is a fully integrated canvas implementation with support for all core generation capabilities, in/outpainting, brush tools, and more. This creative tool unlocks the capability for artists to create with AI as a creative collaborator, and can be used to augment AI-generated imagery, sketches, photography, renders, and more.
|
### Features
|
||||||
|
|
||||||
### *Advanced Prompt Syntax*
|
#### Major Features
|
||||||
|
|
||||||
InvokeAI's advanced prompt syntax allows for token weighting, cross-attention control, and prompt blending, allowing for fine-tuned tweaking of your invocations and exploration of the latent space.
|
- [Web Server](https://invoke-ai.github.io/InvokeAI/features/WEB/)
|
||||||
|
- [Interactive Command Line Interface](https://invoke-ai.github.io/InvokeAI/features/CLI/)
|
||||||
|
- [Image To Image](https://invoke-ai.github.io/InvokeAI/features/IMG2IMG/)
|
||||||
|
- [Inpainting Support](https://invoke-ai.github.io/InvokeAI/features/INPAINTING/)
|
||||||
|
- [Outpainting Support](https://invoke-ai.github.io/InvokeAI/features/OUTPAINTING/)
|
||||||
|
- [Upscaling, face-restoration and outpainting](https://invoke-ai.github.io/InvokeAI/features/POSTPROCESS/)
|
||||||
|
- [Reading Prompts From File](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#reading-prompts-from-a-file)
|
||||||
|
- [Prompt Blending](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#prompt-blending)
|
||||||
|
- [Thresholding and Perlin Noise Initialization Options](https://invoke-ai.github.io/InvokeAI/features/OTHER/#thresholding-and-perlin-noise-initialization-options)
|
||||||
|
- [Negative/Unconditioned Prompts](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#negative-and-unconditioned-prompts)
|
||||||
|
- [Variations](https://invoke-ai.github.io/InvokeAI/features/VARIATIONS/)
|
||||||
|
- [Personalizing Text-to-Image Generation](https://invoke-ai.github.io/InvokeAI/features/TEXTUAL_INVERSION/)
|
||||||
|
- [Simplified API for text to image generation](https://invoke-ai.github.io/InvokeAI/features/OTHER/#simplified-api)
|
||||||
|
|
||||||
### *Command Line Interface*
|
#### Other Features
|
||||||
|
|
||||||
For users utilizing a terminal-based environment, or who want to take advantage of CLI features, InvokeAI offers an extensive and actively supported command-line interface that provides the full suite of generation functionality available in the tool.
|
- [Google Colab](https://invoke-ai.github.io/InvokeAI/features/OTHER/#google-colab)
|
||||||
|
- [Seamless Tiling](https://invoke-ai.github.io/InvokeAI/features/OTHER/#seamless-tiling)
|
||||||
### Other features
|
- [Shortcut: Reusing Seeds](https://invoke-ai.github.io/InvokeAI/features/OTHER/#shortcuts-reusing-seeds)
|
||||||
|
- [Preload Models](https://invoke-ai.github.io/InvokeAI/features/OTHER/#preload-models)
|
||||||
- *Support for both ckpt and diffusers models*
|
|
||||||
- *SD 2.0, 2.1 support*
|
|
||||||
- *Noise Control & Tresholding*
|
|
||||||
- *Popular Sampler Support*
|
|
||||||
- *Upscaling & Face Restoration Tools*
|
|
||||||
- *Embedding Manager & Support*
|
|
||||||
- *Model Manager & Support*
|
|
||||||
|
|
||||||
### Coming Soon
|
|
||||||
|
|
||||||
- *Node-Based Architecture & UI*
|
|
||||||
- And more...
|
|
||||||
|
|
||||||
### Latest Changes
|
### Latest Changes
|
||||||
|
|
||||||
For our latest changes, view our [Release
|
- v2.0.1 (13 October 2022)
|
||||||
Notes](https://github.com/invoke-ai/InvokeAI/releases) and the
|
- fix noisy images at high step count when using k* samplers
|
||||||
[CHANGELOG](docs/CHANGELOG.md).
|
- dream.py script now calls invoke.py module directly rather than
|
||||||
|
via a new python process (which could break the environment)
|
||||||
|
|
||||||
## Troubleshooting
|
- v2.0.0 (9 October 2022)
|
||||||
|
|
||||||
|
- `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains
|
||||||
|
for backward compatibility.
|
||||||
|
- Completely new WebGUI - launch with `python3 scripts/invoke.py --web`
|
||||||
|
- Support for <a href="https://invoke-ai.github.io/InvokeAI/features/INPAINTING/">inpainting</a> and <a href="https://invoke-ai.github.io/InvokeAI/features/OUTPAINTING/">outpainting</a>
|
||||||
|
- img2img runs on all k* samplers
|
||||||
|
- Support for <a href="https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#negative-and-unconditioned-prompts">negative prompts</a>
|
||||||
|
- Support for CodeFormer face reconstruction
|
||||||
|
- Support for Textual Inversion on Macintoshes
|
||||||
|
- Support in both WebGUI and CLI for <a href="https://invoke-ai.github.io/InvokeAI/features/POSTPROCESS/">post-processing of previously-generated images</a>
|
||||||
|
using facial reconstruction, ESRGAN upscaling, outcropping (similar to DALL-E infinite canvas),
|
||||||
|
and "embiggen" upscaling. See the `!fix` command.
|
||||||
|
- New `--hires` option on `invoke>` line allows <a href="https://invoke-ai.github.io/InvokeAI/features/CLI/#txt2img">larger images to be created without duplicating elements</a>, at the cost of some performance.
|
||||||
|
- New `--perlin` and `--threshold` options allow you to add and control variation
|
||||||
|
during image generation (see <a href="https://github.com/invoke-ai/InvokeAI/blob/main/docs/features/OTHER.md#thresholding-and-perlin-noise-initialization-options">Thresholding and Perlin Noise Initialization</a>
|
||||||
|
- Extensive metadata now written into PNG files, allowing reliable regeneration of images
|
||||||
|
and tweaking of previous settings.
|
||||||
|
- Command-line completion in `invoke.py` now works on Windows, Linux and Mac platforms.
|
||||||
|
- Improved <a href="https://invoke-ai.github.io/InvokeAI/features/CLI/">command-line completion behavior</a>.
|
||||||
|
New commands added:
|
||||||
|
- List command-line history with `!history`
|
||||||
|
- Search command-line history with `!search`
|
||||||
|
- Clear history with `!clear`
|
||||||
|
- Deprecated `--full_precision` / `-F`. Simply omit it and `invoke.py` will auto
|
||||||
|
configure. To switch away from auto use the new flag like `--precision=float32`.
|
||||||
|
|
||||||
|
For older changelogs, please visit the **[CHANGELOG](https://invoke-ai.github.io/InvokeAI/CHANGELOG#v114-11-september-2022)**.
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
Please check out our **[Q&A](https://invoke-ai.github.io/InvokeAI/help/TROUBLESHOOT/#faq)** to get solutions for common installation
|
Please check out our **[Q&A](https://invoke-ai.github.io/InvokeAI/help/TROUBLESHOOT/#faq)** to get solutions for common installation
|
||||||
problems and other issues.
|
problems and other issues.
|
||||||
|
|
||||||
## Contributing
|
# Contributing
|
||||||
|
|
||||||
Anyone who wishes to contribute to this project, whether documentation, features, bug fixes, code
|
Anyone who wishes to contribute to this project, whether documentation, features, bug fixes, code
|
||||||
cleanup, testing, or code reviews, is very much encouraged to do so.
|
cleanup, testing, or code reviews, is very much encouraged to do so. To join, just raise your hand on the InvokeAI
|
||||||
|
Discord server or discussion board.
|
||||||
To join, just raise your hand on the InvokeAI Discord server (#dev-chat) or the GitHub discussion board.
|
|
||||||
|
|
||||||
If you'd like to help with translation, please see our [translation guide](docs/other/TRANSLATION.md).
|
|
||||||
|
|
||||||
If you are unfamiliar with how
|
If you are unfamiliar with how
|
||||||
to contribute to GitHub projects, here is a
|
to contribute to GitHub projects, here is a
|
||||||
[Getting Started Guide](https://opensource.com/article/19/7/create-pull-request-github). A full set of contribution guidelines, along with templates, are in progress. You can **make your pull request against the "main" branch**.
|
[Getting Started Guide](https://opensource.com/article/19/7/create-pull-request-github). A full set of contribution guidelines, along with templates, are in progress, but for now the most
|
||||||
|
important thing is to **make your pull request against the "development" branch**, and not against
|
||||||
|
"main". This will help keep public breakage to a minimum and will allow you to propose more radical
|
||||||
|
changes.
|
||||||
|
|
||||||
We hope you enjoy using our software as much as we enjoy creating it,
|
We hope you enjoy using our software as much as we enjoy creating it,
|
||||||
and we hope that some of those of you who are reading this will elect
|
and we hope that some of those of you who are reading this will elect
|
||||||
@@ -277,11 +194,15 @@ This fork is a combined effort of various people from across the world.
|
|||||||
[Check out the list of all these amazing people](https://invoke-ai.github.io/InvokeAI/other/CONTRIBUTORS/). We thank them for
|
[Check out the list of all these amazing people](https://invoke-ai.github.io/InvokeAI/other/CONTRIBUTORS/). We thank them for
|
||||||
their time, hard work and effort.
|
their time, hard work and effort.
|
||||||
|
|
||||||
Thanks to [Weblate](https://weblate.org/) for generously providing translation services to this project.
|
|
||||||
|
|
||||||
### Support
|
### Support
|
||||||
|
|
||||||
For support, please use this repository's GitHub Issues tracking service, or join the Discord.
|
For support, please use this repository's GitHub Issues tracking service. Feel free to send me an
|
||||||
|
email if you use and like the script.
|
||||||
|
|
||||||
Original portions of the software are Copyright (c) 2023 by respective contributors.
|
Original portions of the software are Copyright (c) 2020
|
||||||
|
[Lincoln D. Stein](https://github.com/lstein)
|
||||||
|
|
||||||
|
### Further Reading
|
||||||
|
|
||||||
|
Please see the original README for more information on this software and underlying algorithm,
|
||||||
|
located in the file [README-CompViz.md](https://invoke-ai.github.io/InvokeAI/other/README-CompViz/).
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ This model card focuses on the model associated with the Stable Diffusion model,
|
|||||||
|
|
||||||
# Uses
|
# Uses
|
||||||
|
|
||||||
## Direct Use
|
## Direct Use
|
||||||
The model is intended for research purposes only. Possible research areas and
|
The model is intended for research purposes only. Possible research areas and
|
||||||
tasks include
|
tasks include
|
||||||
|
|
||||||
@@ -68,11 +68,11 @@ Using the model to generate content that is cruel to individuals is a misuse of
|
|||||||
considerations.
|
considerations.
|
||||||
|
|
||||||
### Bias
|
### Bias
|
||||||
While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.
|
While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.
|
||||||
Stable Diffusion v1 was trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/),
|
Stable Diffusion v1 was trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/),
|
||||||
which consists of images that are primarily limited to English descriptions.
|
which consists of images that are primarily limited to English descriptions.
|
||||||
Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for.
|
Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for.
|
||||||
This affects the overall output of the model, as white and western cultures are often set as the default. Further, the
|
This affects the overall output of the model, as white and western cultures are often set as the default. Further, the
|
||||||
ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts.
|
ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts.
|
||||||
|
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ The model developers used the following dataset for training the model:
|
|||||||
- LAION-2B (en) and subsets thereof (see next section)
|
- LAION-2B (en) and subsets thereof (see next section)
|
||||||
|
|
||||||
**Training Procedure**
|
**Training Procedure**
|
||||||
Stable Diffusion v1 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training,
|
Stable Diffusion v1 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training,
|
||||||
|
|
||||||
- Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4
|
- Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4
|
||||||
- Text prompts are encoded through a ViT-L/14 text-encoder.
|
- Text prompts are encoded through a ViT-L/14 text-encoder.
|
||||||
@@ -108,12 +108,12 @@ filtered to images with an original size `>= 512x512`, estimated aesthetics scor
|
|||||||
- **Batch:** 32 x 8 x 2 x 4 = 2048
|
- **Batch:** 32 x 8 x 2 x 4 = 2048
|
||||||
- **Learning rate:** warmup to 0.0001 for 10,000 steps and then kept constant
|
- **Learning rate:** warmup to 0.0001 for 10,000 steps and then kept constant
|
||||||
|
|
||||||
## Evaluation Results
|
## Evaluation Results
|
||||||
Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0,
|
Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0,
|
||||||
5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling
|
5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling
|
||||||
steps show the relative improvements of the checkpoints:
|
steps show the relative improvements of the checkpoints:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Evaluated using 50 PLMS steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores.
|
Evaluated using 50 PLMS steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores.
|
||||||
## Environmental Impact
|
## Environmental Impact
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 651 KiB After Width: | Height: | Size: 651 KiB |
|
Before Width: | Height: | Size: 596 KiB After Width: | Height: | Size: 596 KiB |
|
Before Width: | Height: | Size: 609 KiB After Width: | Height: | Size: 609 KiB |
|
Before Width: | Height: | Size: 548 KiB After Width: | Height: | Size: 548 KiB |
|
Before Width: | Height: | Size: 705 KiB After Width: | Height: | Size: 705 KiB |
|
Before Width: | Height: | Size: 757 KiB After Width: | Height: | Size: 757 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 466 KiB After Width: | Height: | Size: 466 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 539 KiB After Width: | Height: | Size: 539 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 450 KiB After Width: | Height: | Size: 450 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 553 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 418 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 542 KiB After Width: | Height: | Size: 542 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 395 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 465 KiB After Width: | Height: | Size: 465 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 612 KiB After Width: | Height: | Size: 612 KiB |
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 319 KiB |
|
Before Width: | Height: | Size: 788 KiB After Width: | Height: | Size: 788 KiB |
|
Before Width: | Height: | Size: 958 KiB After Width: | Height: | Size: 958 KiB |
|
Before Width: | Height: | Size: 9.4 MiB After Width: | Height: | Size: 9.4 MiB |
|
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 610 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 945 KiB After Width: | Height: | Size: 945 KiB |
|
Before Width: | Height: | Size: 972 KiB After Width: | Height: | Size: 972 KiB |
|
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 662 KiB |
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
@@ -1,48 +1,32 @@
|
|||||||
import base64
|
import eventlet
|
||||||
import glob
|
import glob
|
||||||
import io
|
|
||||||
import json
|
|
||||||
import math
|
|
||||||
import mimetypes
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import mimetypes
|
||||||
import traceback
|
import traceback
|
||||||
from threading import Event
|
import math
|
||||||
from uuid import uuid4
|
import io
|
||||||
|
import base64
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
import eventlet
|
from werkzeug.utils import secure_filename
|
||||||
from pathlib import Path
|
|
||||||
from PIL import Image
|
|
||||||
from PIL.Image import Image as ImageType
|
|
||||||
from flask import Flask, redirect, send_from_directory, request, make_response
|
from flask import Flask, redirect, send_from_directory, request, make_response
|
||||||
from flask_socketio import SocketIO
|
from flask_socketio import SocketIO
|
||||||
from werkzeug.utils import secure_filename
|
from PIL import Image, ImageOps
|
||||||
|
from PIL.Image import Image as ImageType
|
||||||
|
from uuid import uuid4
|
||||||
|
from threading import Event
|
||||||
|
|
||||||
from invokeai.backend.modules.get_canvas_generation_mode import (
|
from ldm.invoke.args import Args, APP_ID, APP_VERSION, calculate_init_img_hash
|
||||||
|
from ldm.invoke.pngwriter import PngWriter, retrieve_metadata
|
||||||
|
from ldm.invoke.prompt_parser import split_weighted_subprompts
|
||||||
|
from ldm.invoke.generator.inpaint import infill_methods
|
||||||
|
|
||||||
|
from backend.modules.parameters import parameters_to_command
|
||||||
|
from backend.modules.get_canvas_generation_mode import (
|
||||||
get_canvas_generation_mode,
|
get_canvas_generation_mode,
|
||||||
)
|
)
|
||||||
from invokeai.backend.modules.parameters import parameters_to_command
|
|
||||||
import invokeai.frontend.dist as frontend
|
|
||||||
from ldm.generate import Generate
|
|
||||||
from ldm.invoke.args import Args, APP_ID, APP_VERSION, calculate_init_img_hash
|
|
||||||
from ldm.invoke.concepts_lib import HuggingFaceConceptsLibrary
|
|
||||||
from ldm.invoke.conditioning import (
|
|
||||||
get_tokens_for_prompt_object,
|
|
||||||
get_prompt_structure,
|
|
||||||
split_weighted_subprompts,
|
|
||||||
get_tokenizer,
|
|
||||||
)
|
|
||||||
from ldm.invoke.generator.diffusers_pipeline import PipelineIntermediateState
|
|
||||||
from ldm.invoke.generator.inpaint import infill_methods
|
|
||||||
from ldm.invoke.globals import (
|
|
||||||
Globals,
|
|
||||||
global_converted_ckpts_dir,
|
|
||||||
global_models_dir,
|
|
||||||
global_lora_models_dir,
|
|
||||||
)
|
|
||||||
from ldm.invoke.pngwriter import PngWriter, retrieve_metadata
|
|
||||||
from compel.prompt_parser import Blend
|
|
||||||
from ldm.invoke.merge_diffusers import merge_diffusion_models
|
|
||||||
|
|
||||||
# Loading Arguments
|
# Loading Arguments
|
||||||
opt = Args()
|
opt = Args()
|
||||||
@@ -53,13 +37,9 @@ args.root_dir = os.path.expanduser(args.root_dir or "..")
|
|||||||
if not os.path.isabs(args.outdir):
|
if not os.path.isabs(args.outdir):
|
||||||
args.outdir = os.path.join(args.root_dir, args.outdir)
|
args.outdir = os.path.join(args.root_dir, args.outdir)
|
||||||
|
|
||||||
# normalize the config directory relative to root
|
|
||||||
if not os.path.isabs(opt.conf):
|
|
||||||
opt.conf = os.path.normpath(os.path.join(Globals.root, opt.conf))
|
|
||||||
|
|
||||||
|
|
||||||
class InvokeAIWebServer:
|
class InvokeAIWebServer:
|
||||||
def __init__(self, generate: Generate, gfpgan, codeformer, esrgan) -> None:
|
def __init__(self, generate, gfpgan, codeformer, esrgan) -> None:
|
||||||
self.host = args.host
|
self.host = args.host
|
||||||
self.port = args.port
|
self.port = args.port
|
||||||
|
|
||||||
@@ -99,17 +79,11 @@ class InvokeAIWebServer:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opt.cors:
|
if opt.cors:
|
||||||
_cors = opt.cors
|
socketio_args["cors_allowed_origins"] = opt.cors
|
||||||
# convert list back into comma-separated string,
|
|
||||||
# be defensive here, not sure in what form this arrives
|
|
||||||
if isinstance(_cors, list):
|
|
||||||
_cors = ",".join(_cors)
|
|
||||||
if "," in _cors:
|
|
||||||
_cors = _cors.split(",")
|
|
||||||
socketio_args["cors_allowed_origins"] = _cors
|
|
||||||
|
|
||||||
|
frontend_path = self.find_frontend()
|
||||||
self.app = Flask(
|
self.app = Flask(
|
||||||
__name__, static_url_path="", static_folder=frontend.__path__[0]
|
__name__, static_url_path="", static_folder=frontend_path
|
||||||
)
|
)
|
||||||
|
|
||||||
self.socketio = SocketIO(self.app, **socketio_args)
|
self.socketio = SocketIO(self.app, **socketio_args)
|
||||||
@@ -216,7 +190,11 @@ class InvokeAIWebServer:
|
|||||||
return make_response(response, 200)
|
return make_response(response, 200)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
return make_response("Error uploading file", 500)
|
return make_response("Error uploading file", 500)
|
||||||
|
|
||||||
self.load_socketio_listeners(self.socketio)
|
self.load_socketio_listeners(self.socketio)
|
||||||
@@ -232,7 +210,7 @@ class InvokeAIWebServer:
|
|||||||
server="flask_socketio",
|
server="flask_socketio",
|
||||||
width=1600,
|
width=1600,
|
||||||
height=1000,
|
height=1000,
|
||||||
port=self.port,
|
port=self.port
|
||||||
).run()
|
).run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
import sys
|
import sys
|
||||||
@@ -263,6 +241,16 @@ class InvokeAIWebServer:
|
|||||||
keyfile=args.keyfile,
|
keyfile=args.keyfile,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def find_frontend(self):
|
||||||
|
my_dir = os.path.dirname(__file__)
|
||||||
|
for candidate in (os.path.join(my_dir,'..','frontend','dist'), # pip install -e .
|
||||||
|
os.path.join(my_dir,'../../../../frontend','dist') # pip install .
|
||||||
|
):
|
||||||
|
if os.path.exists(candidate):
|
||||||
|
return candidate
|
||||||
|
assert "Frontend files cannot be found. Cannot continue"
|
||||||
|
|
||||||
|
|
||||||
def setup_app(self):
|
def setup_app(self):
|
||||||
self.result_url = "outputs/"
|
self.result_url = "outputs/"
|
||||||
self.init_image_url = "outputs/init-images/"
|
self.init_image_url = "outputs/init-images/"
|
||||||
@@ -299,92 +287,18 @@ class InvokeAIWebServer:
|
|||||||
def load_socketio_listeners(self, socketio):
|
def load_socketio_listeners(self, socketio):
|
||||||
@socketio.on("requestSystemConfig")
|
@socketio.on("requestSystemConfig")
|
||||||
def handle_request_capabilities():
|
def handle_request_capabilities():
|
||||||
print(">> System config requested")
|
print(f">> System config requested")
|
||||||
config = self.get_system_config()
|
config = self.get_system_config()
|
||||||
config["model_list"] = self.generate.model_manager.list_models()
|
config["model_list"] = self.generate.model_cache.list_models()
|
||||||
config["infill_methods"] = infill_methods()
|
config["infill_methods"] = infill_methods
|
||||||
socketio.emit("systemConfig", config)
|
socketio.emit("systemConfig", config)
|
||||||
|
|
||||||
@socketio.on("searchForModels")
|
|
||||||
def handle_search_models(search_folder: str):
|
|
||||||
try:
|
|
||||||
if not search_folder:
|
|
||||||
socketio.emit(
|
|
||||||
"foundModels",
|
|
||||||
{"search_folder": None, "found_models": None},
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
(
|
|
||||||
search_folder,
|
|
||||||
found_models,
|
|
||||||
) = self.generate.model_manager.search_models(search_folder)
|
|
||||||
socketio.emit(
|
|
||||||
"foundModels",
|
|
||||||
{"search_folder": search_folder, "found_models": found_models},
|
|
||||||
)
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
print("\n")
|
|
||||||
|
|
||||||
@socketio.on("addNewModel")
|
|
||||||
def handle_add_model(new_model_config: dict):
|
|
||||||
try:
|
|
||||||
model_name = new_model_config["name"]
|
|
||||||
del new_model_config["name"]
|
|
||||||
model_attributes = new_model_config
|
|
||||||
if len(model_attributes["vae"]) == 0:
|
|
||||||
del model_attributes["vae"]
|
|
||||||
update = False
|
|
||||||
current_model_list = self.generate.model_manager.list_models()
|
|
||||||
if model_name in current_model_list:
|
|
||||||
update = True
|
|
||||||
|
|
||||||
print(f">> Adding New Model: {model_name}")
|
|
||||||
|
|
||||||
self.generate.model_manager.add_model(
|
|
||||||
model_name=model_name,
|
|
||||||
model_attributes=model_attributes,
|
|
||||||
clobber=True,
|
|
||||||
)
|
|
||||||
self.generate.model_manager.commit(opt.conf)
|
|
||||||
|
|
||||||
new_model_list = self.generate.model_manager.list_models()
|
|
||||||
socketio.emit(
|
|
||||||
"newModelAdded",
|
|
||||||
{
|
|
||||||
"new_model_name": model_name,
|
|
||||||
"model_list": new_model_list,
|
|
||||||
"update": update,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
print(f">> New Model Added: {model_name}")
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("deleteModel")
|
|
||||||
def handle_delete_model(model_name: str):
|
|
||||||
try:
|
|
||||||
print(f">> Deleting Model: {model_name}")
|
|
||||||
self.generate.model_manager.del_model(model_name)
|
|
||||||
self.generate.model_manager.commit(opt.conf)
|
|
||||||
updated_model_list = self.generate.model_manager.list_models()
|
|
||||||
socketio.emit(
|
|
||||||
"modelDeleted",
|
|
||||||
{
|
|
||||||
"deleted_model_name": model_name,
|
|
||||||
"model_list": updated_model_list,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
print(f">> Model Deleted: {model_name}")
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("requestModelChange")
|
@socketio.on("requestModelChange")
|
||||||
def handle_set_model(model_name: str):
|
def handle_set_model(model_name: str):
|
||||||
try:
|
try:
|
||||||
print(f">> Model change requested: {model_name}")
|
print(f">> Model change requested: {model_name}")
|
||||||
model = self.generate.set_model(model_name)
|
model = self.generate.set_model(model_name)
|
||||||
model_list = self.generate.model_manager.list_models()
|
model_list = self.generate.model_cache.list_models()
|
||||||
if model is None:
|
if model is None:
|
||||||
socketio.emit(
|
socketio.emit(
|
||||||
"modelChangeFailed",
|
"modelChangeFailed",
|
||||||
@@ -396,162 +310,11 @@ class InvokeAIWebServer:
|
|||||||
{"model_name": model_name, "model_list": model_list},
|
{"model_name": model_name, "model_list": model_list},
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("convertToDiffusers")
|
traceback.print_exc()
|
||||||
def convert_to_diffusers(model_to_convert: dict):
|
print("\n")
|
||||||
try:
|
|
||||||
if model_info := self.generate.model_manager.model_info(
|
|
||||||
model_name=model_to_convert["model_name"]
|
|
||||||
):
|
|
||||||
if "weights" in model_info:
|
|
||||||
ckpt_path = Path(model_info["weights"])
|
|
||||||
original_config_file = Path(model_info["config"])
|
|
||||||
model_name = model_to_convert["model_name"]
|
|
||||||
model_description = model_info["description"]
|
|
||||||
else:
|
|
||||||
self.socketio.emit(
|
|
||||||
"error", {"message": "Model is not a valid checkpoint file"}
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.socketio.emit(
|
|
||||||
"error", {"message": "Could not retrieve model info."}
|
|
||||||
)
|
|
||||||
|
|
||||||
if not ckpt_path.is_absolute():
|
|
||||||
ckpt_path = Path(Globals.root, ckpt_path)
|
|
||||||
|
|
||||||
if original_config_file and not original_config_file.is_absolute():
|
|
||||||
original_config_file = Path(Globals.root, original_config_file)
|
|
||||||
|
|
||||||
diffusers_path = Path(
|
|
||||||
ckpt_path.parent.absolute(), f"{model_name}_diffusers"
|
|
||||||
)
|
|
||||||
|
|
||||||
if model_to_convert["save_location"] == "root":
|
|
||||||
diffusers_path = Path(
|
|
||||||
global_converted_ckpts_dir(), f"{model_name}_diffusers"
|
|
||||||
)
|
|
||||||
|
|
||||||
if (
|
|
||||||
model_to_convert["save_location"] == "custom"
|
|
||||||
and model_to_convert["custom_location"] is not None
|
|
||||||
):
|
|
||||||
diffusers_path = Path(
|
|
||||||
model_to_convert["custom_location"], f"{model_name}_diffusers"
|
|
||||||
)
|
|
||||||
|
|
||||||
if diffusers_path.exists():
|
|
||||||
shutil.rmtree(diffusers_path)
|
|
||||||
|
|
||||||
self.generate.model_manager.convert_and_import(
|
|
||||||
ckpt_path,
|
|
||||||
diffusers_path,
|
|
||||||
model_name=model_name,
|
|
||||||
model_description=model_description,
|
|
||||||
vae=None,
|
|
||||||
original_config_file=original_config_file,
|
|
||||||
commit_to_conf=opt.conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
new_model_list = self.generate.model_manager.list_models()
|
|
||||||
socketio.emit(
|
|
||||||
"modelConverted",
|
|
||||||
{
|
|
||||||
"new_model_name": model_name,
|
|
||||||
"model_list": new_model_list,
|
|
||||||
"update": True,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
print(f">> Model Converted: {model_name}")
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("mergeDiffusersModels")
|
|
||||||
def merge_diffusers_models(model_merge_info: dict):
|
|
||||||
try:
|
|
||||||
models_to_merge = model_merge_info["models_to_merge"]
|
|
||||||
model_ids_or_paths = [
|
|
||||||
self.generate.model_manager.model_name_or_path(x)
|
|
||||||
for x in models_to_merge
|
|
||||||
]
|
|
||||||
merged_pipe = merge_diffusion_models(
|
|
||||||
model_ids_or_paths,
|
|
||||||
model_merge_info["alpha"],
|
|
||||||
model_merge_info["interp"],
|
|
||||||
model_merge_info["force"],
|
|
||||||
)
|
|
||||||
|
|
||||||
dump_path = global_models_dir() / "merged_models"
|
|
||||||
if model_merge_info["model_merge_save_path"] is not None:
|
|
||||||
dump_path = Path(model_merge_info["model_merge_save_path"])
|
|
||||||
|
|
||||||
os.makedirs(dump_path, exist_ok=True)
|
|
||||||
dump_path = dump_path / model_merge_info["merged_model_name"]
|
|
||||||
merged_pipe.save_pretrained(dump_path, safe_serialization=1)
|
|
||||||
|
|
||||||
merged_model_config = dict(
|
|
||||||
model_name=model_merge_info["merged_model_name"],
|
|
||||||
description=f'Merge of models {", ".join(models_to_merge)}',
|
|
||||||
commit_to_conf=opt.conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
if vae := self.generate.model_manager.config[models_to_merge[0]].get(
|
|
||||||
"vae", None
|
|
||||||
):
|
|
||||||
print(f">> Using configured VAE assigned to {models_to_merge[0]}")
|
|
||||||
merged_model_config.update(vae=vae)
|
|
||||||
|
|
||||||
self.generate.model_manager.import_diffuser_model(
|
|
||||||
dump_path, **merged_model_config
|
|
||||||
)
|
|
||||||
new_model_list = self.generate.model_manager.list_models()
|
|
||||||
|
|
||||||
socketio.emit(
|
|
||||||
"modelsMerged",
|
|
||||||
{
|
|
||||||
"merged_models": models_to_merge,
|
|
||||||
"merged_model_name": model_merge_info["merged_model_name"],
|
|
||||||
"model_list": new_model_list,
|
|
||||||
"update": True,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
print(f">> Models Merged: {models_to_merge}")
|
|
||||||
print(f">> New Model Added: {model_merge_info['merged_model_name']}")
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("getLoraModels")
|
|
||||||
def get_lora_models():
|
|
||||||
try:
|
|
||||||
lora_path = global_lora_models_dir()
|
|
||||||
loras = []
|
|
||||||
for root, _, files in os.walk(lora_path):
|
|
||||||
models = [
|
|
||||||
Path(root, x)
|
|
||||||
for x in files
|
|
||||||
if Path(x).suffix in [".ckpt", ".pt", ".safetensors"]
|
|
||||||
]
|
|
||||||
loras = loras + models
|
|
||||||
|
|
||||||
found_loras = []
|
|
||||||
for lora in sorted(loras, key=lambda s: s.stem.lower()):
|
|
||||||
location = str(lora.resolve()).replace("\\", "/")
|
|
||||||
found_loras.append({"name": lora.stem, "location": location})
|
|
||||||
socketio.emit("foundLoras", found_loras)
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("getTextualInversionTriggers")
|
|
||||||
def get_ti_triggers():
|
|
||||||
try:
|
|
||||||
local_triggers = self.generate.model.textual_inversion_manager.get_all_trigger_strings()
|
|
||||||
locals = [{'name': x} for x in sorted(local_triggers, key=str.casefold)]
|
|
||||||
concepts = HuggingFaceConceptsLibrary().list_concepts(minimum_likes=5)
|
|
||||||
concepts = [{'name': f'<{x}>'} for x in sorted(concepts, key=str.casefold) if f'<{x}>' not in local_triggers]
|
|
||||||
socketio.emit("foundTextualInversionTriggers", {'local_triggers': locals, 'huggingface_concepts': concepts})
|
|
||||||
except Exception as e:
|
|
||||||
self.handle_exceptions(e)
|
|
||||||
|
|
||||||
@socketio.on("requestEmptyTempFolder")
|
@socketio.on("requestEmptyTempFolder")
|
||||||
def empty_temp_folder():
|
def empty_temp_folder():
|
||||||
@@ -566,14 +329,16 @@ class InvokeAIWebServer:
|
|||||||
)
|
)
|
||||||
os.remove(thumbnail_path)
|
os.remove(thumbnail_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
socketio.emit(
|
socketio.emit("error", {"message": f"Unable to delete {f}: {str(e)}"})
|
||||||
"error", {"message": f"Unable to delete {f}: {str(e)}"}
|
|
||||||
)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
socketio.emit("tempFolderEmptied")
|
socketio.emit("tempFolderEmptied")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("requestSaveStagingAreaImageToGallery")
|
@socketio.on("requestSaveStagingAreaImageToGallery")
|
||||||
def save_temp_image_to_gallery(url):
|
def save_temp_image_to_gallery(url):
|
||||||
@@ -613,7 +378,11 @@ class InvokeAIWebServer:
|
|||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("requestLatestImages")
|
@socketio.on("requestLatestImages")
|
||||||
def handle_request_latest_images(category, latest_mtime):
|
def handle_request_latest_images(category, latest_mtime):
|
||||||
@@ -669,9 +438,7 @@ class InvokeAIWebServer:
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
socketio.emit(
|
socketio.emit("error", {"message": f"Unable to load {path}: {str(e)}"})
|
||||||
"error", {"message": f"Unable to load {path}: {str(e)}"}
|
|
||||||
)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
socketio.emit(
|
socketio.emit(
|
||||||
@@ -679,7 +446,11 @@ class InvokeAIWebServer:
|
|||||||
{"images": image_array, "category": category},
|
{"images": image_array, "category": category},
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("requestImages")
|
@socketio.on("requestImages")
|
||||||
def handle_request_images(category, earliest_mtime=None):
|
def handle_request_images(category, earliest_mtime=None):
|
||||||
@@ -740,9 +511,7 @@ class InvokeAIWebServer:
|
|||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f">> Unable to load {path}")
|
print(f">> Unable to load {path}")
|
||||||
socketio.emit(
|
socketio.emit("error", {"message": f"Unable to load {path}: {str(e)}"})
|
||||||
"error", {"message": f"Unable to load {path}: {str(e)}"}
|
|
||||||
)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
socketio.emit(
|
socketio.emit(
|
||||||
@@ -754,7 +523,11 @@ class InvokeAIWebServer:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("generateImage")
|
@socketio.on("generateImage")
|
||||||
def handle_generate_image_event(
|
def handle_generate_image_event(
|
||||||
@@ -776,17 +549,20 @@ class InvokeAIWebServer:
|
|||||||
printable_parameters["init_mask"][:64] + "..."
|
printable_parameters["init_mask"][:64] + "..."
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"\n>> Image Generation Parameters:\n\n{printable_parameters}\n")
|
print(
|
||||||
print(f">> ESRGAN Parameters: {esrgan_parameters}")
|
f">> Image generation requested: {printable_parameters}\nESRGAN parameters: {esrgan_parameters}\nFacetool parameters: {facetool_parameters}"
|
||||||
print(f">> Facetool Parameters: {facetool_parameters}")
|
)
|
||||||
|
|
||||||
self.generate_images(
|
self.generate_images(
|
||||||
generation_parameters,
|
generation_parameters,
|
||||||
esrgan_parameters,
|
esrgan_parameters,
|
||||||
facetool_parameters,
|
facetool_parameters,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("runPostprocessing")
|
@socketio.on("runPostprocessing")
|
||||||
def handle_run_postprocessing(original_image, postprocessing_parameters):
|
def handle_run_postprocessing(original_image, postprocessing_parameters):
|
||||||
@@ -808,16 +584,16 @@ class InvokeAIWebServer:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
seed = original_image["metadata"]["image"]["seed"]
|
seed = original_image["metadata"]["image"]["seed"]
|
||||||
except KeyError:
|
except (KeyError) as e:
|
||||||
seed = "unknown_seed"
|
seed = "unknown_seed"
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if postprocessing_parameters["type"] == "esrgan":
|
if postprocessing_parameters["type"] == "esrgan":
|
||||||
progress.set_current_status("common.statusUpscalingESRGAN")
|
progress.set_current_status("Upscaling (ESRGAN)")
|
||||||
elif postprocessing_parameters["type"] == "gfpgan":
|
elif postprocessing_parameters["type"] == "gfpgan":
|
||||||
progress.set_current_status("common.statusRestoringFacesGFPGAN")
|
progress.set_current_status("Restoring Faces (GFPGAN)")
|
||||||
elif postprocessing_parameters["type"] == "codeformer":
|
elif postprocessing_parameters["type"] == "codeformer":
|
||||||
progress.set_current_status("common.statusRestoringFacesCodeFormer")
|
progress.set_current_status("Restoring Faces (Codeformer)")
|
||||||
|
|
||||||
socketio.emit("progressUpdate", progress.to_formatted_dict())
|
socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
@@ -826,8 +602,7 @@ class InvokeAIWebServer:
|
|||||||
image = self.esrgan.process(
|
image = self.esrgan.process(
|
||||||
image=image,
|
image=image,
|
||||||
upsampler_scale=postprocessing_parameters["upscale"][0],
|
upsampler_scale=postprocessing_parameters["upscale"][0],
|
||||||
denoise_str=postprocessing_parameters["upscale"][1],
|
strength=postprocessing_parameters["upscale"][1],
|
||||||
strength=postprocessing_parameters["upscale"][2],
|
|
||||||
seed=seed,
|
seed=seed,
|
||||||
)
|
)
|
||||||
elif postprocessing_parameters["type"] == "gfpgan":
|
elif postprocessing_parameters["type"] == "gfpgan":
|
||||||
@@ -851,7 +626,7 @@ class InvokeAIWebServer:
|
|||||||
f'{postprocessing_parameters["type"]} is not a valid postprocessing type'
|
f'{postprocessing_parameters["type"]} is not a valid postprocessing type'
|
||||||
)
|
)
|
||||||
|
|
||||||
progress.set_current_status("common.statusSavingImage")
|
progress.set_current_status("Saving Image")
|
||||||
socketio.emit("progressUpdate", progress.to_formatted_dict())
|
socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
|
|
||||||
@@ -898,11 +673,15 @@ class InvokeAIWebServer:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
@socketio.on("cancel")
|
@socketio.on("cancel")
|
||||||
def handle_cancel():
|
def handle_cancel():
|
||||||
print(">> Cancel processing requested")
|
print(f">> Cancel processing requested")
|
||||||
self.canceled.set()
|
self.canceled.set()
|
||||||
|
|
||||||
# TODO: I think this needs a safety mechanism.
|
# TODO: I think this needs a safety mechanism.
|
||||||
@@ -923,11 +702,15 @@ class InvokeAIWebServer:
|
|||||||
{"url": url, "uuid": uuid, "category": category},
|
{"url": url, "uuid": uuid, "category": category},
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
# App Functions
|
# App Functions
|
||||||
def get_system_config(self):
|
def get_system_config(self):
|
||||||
model_list: dict = self.generate.model_manager.list_models()
|
model_list: dict = self.generate.model_cache.list_models()
|
||||||
active_model_name = None
|
active_model_name = None
|
||||||
|
|
||||||
for model_name, model_dict in model_list.items():
|
for model_name, model_dict in model_list.items():
|
||||||
@@ -980,6 +763,9 @@ class InvokeAIWebServer:
|
|||||||
So we need to convert each into a PIL Image.
|
So we need to convert each into a PIL Image.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
truncated_outpaint_image_b64 = generation_parameters["init_img"][:64]
|
||||||
|
truncated_outpaint_mask_b64 = generation_parameters["init_mask"][:64]
|
||||||
|
|
||||||
init_img_url = generation_parameters["init_img"]
|
init_img_url = generation_parameters["init_img"]
|
||||||
|
|
||||||
original_bounding_box = generation_parameters["bounding_box"].copy()
|
original_bounding_box = generation_parameters["bounding_box"].copy()
|
||||||
@@ -989,10 +775,10 @@ class InvokeAIWebServer:
|
|||||||
).convert("RGBA")
|
).convert("RGBA")
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass
|
The outpaint image and mask are pre-cropped by the UI, so the bounding box we pass
|
||||||
to the generator should be:
|
to the generator should be:
|
||||||
{
|
{
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"width": original_bounding_box["width"],
|
"width": original_bounding_box["width"],
|
||||||
"height": original_bounding_box["height"]
|
"height": original_bounding_box["height"]
|
||||||
@@ -1012,7 +798,7 @@ class InvokeAIWebServer:
|
|||||||
)
|
)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Apply the mask to the init image, creating a "mask" image with
|
Apply the mask to the init image, creating a "mask" image with
|
||||||
transparency where inpainting should occur. This is the kind of
|
transparency where inpainting should occur. This is the kind of
|
||||||
mask that prompt2image() needs.
|
mask that prompt2image() needs.
|
||||||
"""
|
"""
|
||||||
@@ -1059,9 +845,7 @@ class InvokeAIWebServer:
|
|||||||
elif generation_parameters["generation_mode"] == "img2img":
|
elif generation_parameters["generation_mode"] == "img2img":
|
||||||
init_img_url = generation_parameters["init_img"]
|
init_img_url = generation_parameters["init_img"]
|
||||||
init_img_path = self.get_image_path_from_url(init_img_url)
|
init_img_path = self.get_image_path_from_url(init_img_url)
|
||||||
generation_parameters["init_img"] = Image.open(init_img_path).convert(
|
generation_parameters["init_img"] = Image.open(init_img_path).convert('RGB')
|
||||||
"RGB"
|
|
||||||
)
|
|
||||||
|
|
||||||
def image_progress(sample, step):
|
def image_progress(sample, step):
|
||||||
if self.canceled.is_set():
|
if self.canceled.is_set():
|
||||||
@@ -1072,15 +856,15 @@ class InvokeAIWebServer:
|
|||||||
nonlocal progress
|
nonlocal progress
|
||||||
|
|
||||||
generation_messages = {
|
generation_messages = {
|
||||||
"txt2img": "common.statusGeneratingTextToImage",
|
"txt2img": "Text to Image",
|
||||||
"img2img": "common.statusGeneratingImageToImage",
|
"img2img": "Image to Image",
|
||||||
"inpainting": "common.statusGeneratingInpainting",
|
"inpainting": "Inpainting",
|
||||||
"outpainting": "common.statusGeneratingOutpainting",
|
"outpainting": "Outpainting",
|
||||||
}
|
}
|
||||||
|
|
||||||
progress.set_current_step(step + 1)
|
progress.set_current_step(step + 1)
|
||||||
progress.set_current_status(
|
progress.set_current_status(
|
||||||
f"{generation_messages[actual_generation_mode]}"
|
f"Generating ({generation_messages[actual_generation_mode]})"
|
||||||
)
|
)
|
||||||
progress.set_current_status_has_steps(True)
|
progress.set_current_status_has_steps(True)
|
||||||
|
|
||||||
@@ -1125,7 +909,11 @@ class InvokeAIWebServer:
|
|||||||
(width, height) = image.size
|
(width, height) = image.size
|
||||||
width *= 8
|
width *= 8
|
||||||
height *= 8
|
height *= 8
|
||||||
img_base64 = image_to_dataURL(image)
|
buffered = io.BytesIO()
|
||||||
|
image.save(buffered, format="PNG")
|
||||||
|
img_base64 = "data:image/png;base64," + base64.b64encode(
|
||||||
|
buffered.getvalue()
|
||||||
|
).decode("UTF-8")
|
||||||
self.socketio.emit(
|
self.socketio.emit(
|
||||||
"intermediateResult",
|
"intermediateResult",
|
||||||
{
|
{
|
||||||
@@ -1143,7 +931,7 @@ class InvokeAIWebServer:
|
|||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
|
|
||||||
def image_done(image, seed, first_seed, attention_maps_image=None):
|
def image_done(image, seed, first_seed):
|
||||||
if self.canceled.is_set():
|
if self.canceled.is_set():
|
||||||
raise CanceledException
|
raise CanceledException
|
||||||
|
|
||||||
@@ -1152,6 +940,7 @@ class InvokeAIWebServer:
|
|||||||
nonlocal facetool_parameters
|
nonlocal facetool_parameters
|
||||||
nonlocal progress
|
nonlocal progress
|
||||||
|
|
||||||
|
step_index = 1
|
||||||
nonlocal prior_variations
|
nonlocal prior_variations
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -1165,7 +954,7 @@ class InvokeAIWebServer:
|
|||||||
**generation_parameters["bounding_box"],
|
**generation_parameters["bounding_box"],
|
||||||
)
|
)
|
||||||
|
|
||||||
progress.set_current_status("common.statusGenerationComplete")
|
progress.set_current_status("Generation Complete")
|
||||||
|
|
||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
@@ -1192,7 +981,7 @@ class InvokeAIWebServer:
|
|||||||
raise CanceledException
|
raise CanceledException
|
||||||
|
|
||||||
if esrgan_parameters:
|
if esrgan_parameters:
|
||||||
progress.set_current_status("common.statusUpscaling")
|
progress.set_current_status("Upscaling")
|
||||||
progress.set_current_status_has_steps(False)
|
progress.set_current_status_has_steps(False)
|
||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
@@ -1200,7 +989,6 @@ class InvokeAIWebServer:
|
|||||||
image = self.esrgan.process(
|
image = self.esrgan.process(
|
||||||
image=image,
|
image=image,
|
||||||
upsampler_scale=esrgan_parameters["level"],
|
upsampler_scale=esrgan_parameters["level"],
|
||||||
denoise_str=esrgan_parameters["denoise_str"],
|
|
||||||
strength=esrgan_parameters["strength"],
|
strength=esrgan_parameters["strength"],
|
||||||
seed=seed,
|
seed=seed,
|
||||||
)
|
)
|
||||||
@@ -1208,7 +996,6 @@ class InvokeAIWebServer:
|
|||||||
postprocessing = True
|
postprocessing = True
|
||||||
all_parameters["upscale"] = [
|
all_parameters["upscale"] = [
|
||||||
esrgan_parameters["level"],
|
esrgan_parameters["level"],
|
||||||
esrgan_parameters["denoise_str"],
|
|
||||||
esrgan_parameters["strength"],
|
esrgan_parameters["strength"],
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1217,11 +1004,9 @@ class InvokeAIWebServer:
|
|||||||
|
|
||||||
if facetool_parameters:
|
if facetool_parameters:
|
||||||
if facetool_parameters["type"] == "gfpgan":
|
if facetool_parameters["type"] == "gfpgan":
|
||||||
progress.set_current_status("common.statusRestoringFacesGFPGAN")
|
progress.set_current_status("Restoring Faces (GFPGAN)")
|
||||||
elif facetool_parameters["type"] == "codeformer":
|
elif facetool_parameters["type"] == "codeformer":
|
||||||
progress.set_current_status(
|
progress.set_current_status("Restoring Faces (Codeformer)")
|
||||||
"common.statusRestoringFacesCodeFormer"
|
|
||||||
)
|
|
||||||
|
|
||||||
progress.set_current_status_has_steps(False)
|
progress.set_current_status_has_steps(False)
|
||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
@@ -1253,7 +1038,7 @@ class InvokeAIWebServer:
|
|||||||
]
|
]
|
||||||
all_parameters["facetool_type"] = facetool_parameters["type"]
|
all_parameters["facetool_type"] = facetool_parameters["type"]
|
||||||
|
|
||||||
progress.set_current_status("common.statusSavingImage")
|
progress.set_current_status("Saving Image")
|
||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
|
|
||||||
@@ -1265,8 +1050,7 @@ class InvokeAIWebServer:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if "init_mask" in all_parameters:
|
if "init_mask" in all_parameters:
|
||||||
# TODO: store the mask in metadata
|
all_parameters["init_mask"] = "" # TODO: store the mask in metadata
|
||||||
all_parameters["init_mask"] = ""
|
|
||||||
|
|
||||||
if generation_parameters["generation_mode"] == "unifiedCanvas":
|
if generation_parameters["generation_mode"] == "unifiedCanvas":
|
||||||
all_parameters["bounding_box"] = original_bounding_box
|
all_parameters["bounding_box"] = original_bounding_box
|
||||||
@@ -1296,12 +1080,12 @@ class InvokeAIWebServer:
|
|||||||
image, os.path.basename(path), self.thumbnail_image_path
|
image, os.path.basename(path), self.thumbnail_image_path
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f'\n\n>> Image generated: "{path}"\n')
|
print(f'>> Image generated: "{path}"')
|
||||||
self.write_log_message(f'[Generated] "{path}": {command}')
|
self.write_log_message(f'[Generated] "{path}": {command}')
|
||||||
|
|
||||||
if progress.total_iterations > progress.current_iteration:
|
if progress.total_iterations > progress.current_iteration:
|
||||||
progress.set_current_step(1)
|
progress.set_current_step(1)
|
||||||
progress.set_current_status("common.statusIterationComplete")
|
progress.set_current_status("Iteration complete")
|
||||||
progress.set_current_status_has_steps(False)
|
progress.set_current_status_has_steps(False)
|
||||||
else:
|
else:
|
||||||
progress.mark_complete()
|
progress.mark_complete()
|
||||||
@@ -1309,20 +1093,6 @@ class InvokeAIWebServer:
|
|||||||
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
self.socketio.emit("progressUpdate", progress.to_formatted_dict())
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
|
|
||||||
parsed_prompt, _ = get_prompt_structure(generation_parameters["prompt"])
|
|
||||||
tokens = (
|
|
||||||
None
|
|
||||||
if type(parsed_prompt) is Blend
|
|
||||||
else get_tokens_for_prompt_object(
|
|
||||||
get_tokenizer(self.generate.model), parsed_prompt
|
|
||||||
)
|
|
||||||
)
|
|
||||||
attention_maps_image_base64_url = (
|
|
||||||
None
|
|
||||||
if attention_maps_image is None
|
|
||||||
else image_to_dataURL(attention_maps_image)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.socketio.emit(
|
self.socketio.emit(
|
||||||
"generationResult",
|
"generationResult",
|
||||||
{
|
{
|
||||||
@@ -1335,48 +1105,33 @@ class InvokeAIWebServer:
|
|||||||
"height": height,
|
"height": height,
|
||||||
"boundingBox": original_bounding_box,
|
"boundingBox": original_bounding_box,
|
||||||
"generationMode": generation_parameters["generation_mode"],
|
"generationMode": generation_parameters["generation_mode"],
|
||||||
"attentionMaps": attention_maps_image_base64_url,
|
|
||||||
"tokens": tokens,
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0)
|
||||||
|
|
||||||
progress.set_current_iteration(progress.current_iteration + 1)
|
progress.set_current_iteration(progress.current_iteration + 1)
|
||||||
|
|
||||||
def diffusers_step_callback_adapter(*cb_args, **kwargs):
|
print(generation_parameters)
|
||||||
if isinstance(cb_args[0], PipelineIntermediateState):
|
|
||||||
progress_state: PipelineIntermediateState = cb_args[0]
|
|
||||||
return image_progress(progress_state.latents, progress_state.step)
|
|
||||||
else:
|
|
||||||
return image_progress(*cb_args, **kwargs)
|
|
||||||
|
|
||||||
self.generate.prompt2image(
|
self.generate.prompt2image(
|
||||||
**generation_parameters,
|
**generation_parameters,
|
||||||
step_callback=diffusers_step_callback_adapter,
|
step_callback=image_progress,
|
||||||
image_callback=image_done,
|
image_callback=image_done,
|
||||||
)
|
)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
# Clear the CUDA cache on an exception
|
|
||||||
self.empty_cuda_cache()
|
|
||||||
self.socketio.emit("processingCanceled")
|
self.socketio.emit("processingCanceled")
|
||||||
raise
|
raise
|
||||||
except CanceledException:
|
except CanceledException:
|
||||||
# Clear the CUDA cache on an exception
|
|
||||||
self.empty_cuda_cache()
|
|
||||||
self.socketio.emit("processingCanceled")
|
self.socketio.emit("processingCanceled")
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Clear the CUDA cache on an exception
|
|
||||||
self.empty_cuda_cache()
|
|
||||||
print(e)
|
print(e)
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def empty_cuda_cache(self):
|
traceback.print_exc()
|
||||||
if self.generate.device.type == "cuda":
|
print("\n")
|
||||||
import torch.cuda
|
|
||||||
|
|
||||||
torch.cuda.empty_cache()
|
|
||||||
|
|
||||||
def parameters_to_generated_image_metadata(self, parameters):
|
def parameters_to_generated_image_metadata(self, parameters):
|
||||||
try:
|
try:
|
||||||
@@ -1432,8 +1187,7 @@ class InvokeAIWebServer:
|
|||||||
{
|
{
|
||||||
"type": "esrgan",
|
"type": "esrgan",
|
||||||
"scale": int(parameters["upscale"][0]),
|
"scale": int(parameters["upscale"][0]),
|
||||||
"denoise_str": int(parameters["upscale"][1]),
|
"strength": float(parameters["upscale"][1]),
|
||||||
"strength": float(parameters["upscale"][2]),
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1444,6 +1198,13 @@ class InvokeAIWebServer:
|
|||||||
# semantic drift
|
# semantic drift
|
||||||
rfc_dict["sampler"] = parameters["sampler_name"]
|
rfc_dict["sampler"] = parameters["sampler_name"]
|
||||||
|
|
||||||
|
# display weighted subprompts (liable to change)
|
||||||
|
subprompts = split_weighted_subprompts(
|
||||||
|
parameters["prompt"], skip_normalize=True
|
||||||
|
)
|
||||||
|
subprompts = [{"prompt": x[0], "weight": x[1]} for x in subprompts]
|
||||||
|
rfc_dict["prompt"] = subprompts
|
||||||
|
|
||||||
# 'variations' should always exist and be an array, empty or consisting of {'seed': seed, 'weight': weight} pairs
|
# 'variations' should always exist and be an array, empty or consisting of {'seed': seed, 'weight': weight} pairs
|
||||||
variations = []
|
variations = []
|
||||||
|
|
||||||
@@ -1455,6 +1216,8 @@ class InvokeAIWebServer:
|
|||||||
|
|
||||||
rfc_dict["variations"] = variations
|
rfc_dict["variations"] = variations
|
||||||
|
|
||||||
|
print(parameters)
|
||||||
|
|
||||||
if rfc_dict["type"] == "img2img":
|
if rfc_dict["type"] == "img2img":
|
||||||
rfc_dict["strength"] = parameters["strength"]
|
rfc_dict["strength"] = parameters["strength"]
|
||||||
rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant
|
rfc_dict["fit"] = parameters["fit"] # TODO: Noncompliant
|
||||||
@@ -1470,7 +1233,11 @@ class InvokeAIWebServer:
|
|||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def parameters_to_post_processed_image_metadata(
|
def parameters_to_post_processed_image_metadata(
|
||||||
self, parameters, original_image_path
|
self, parameters, original_image_path
|
||||||
@@ -1496,8 +1263,7 @@ class InvokeAIWebServer:
|
|||||||
if parameters["type"] == "esrgan":
|
if parameters["type"] == "esrgan":
|
||||||
postprocessing_metadata["type"] = "esrgan"
|
postprocessing_metadata["type"] = "esrgan"
|
||||||
postprocessing_metadata["scale"] = parameters["upscale"][0]
|
postprocessing_metadata["scale"] = parameters["upscale"][0]
|
||||||
postprocessing_metadata["denoise_str"] = parameters["upscale"][1]
|
postprocessing_metadata["strength"] = parameters["upscale"][1]
|
||||||
postprocessing_metadata["strength"] = parameters["upscale"][2]
|
|
||||||
elif parameters["type"] == "gfpgan":
|
elif parameters["type"] == "gfpgan":
|
||||||
postprocessing_metadata["type"] = "gfpgan"
|
postprocessing_metadata["type"] = "gfpgan"
|
||||||
postprocessing_metadata["strength"] = parameters["facetool_strength"]
|
postprocessing_metadata["strength"] = parameters["facetool_strength"]
|
||||||
@@ -1521,7 +1287,11 @@ class InvokeAIWebServer:
|
|||||||
return current_metadata
|
return current_metadata
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def save_result_image(
|
def save_result_image(
|
||||||
self,
|
self,
|
||||||
@@ -1551,7 +1321,7 @@ class InvokeAIWebServer:
|
|||||||
if step_index:
|
if step_index:
|
||||||
filename += f".{step_index}"
|
filename += f".{step_index}"
|
||||||
if postprocessing:
|
if postprocessing:
|
||||||
filename += ".postprocessed"
|
filename += f".postprocessed"
|
||||||
|
|
||||||
filename += ".png"
|
filename += ".png"
|
||||||
|
|
||||||
@@ -1565,7 +1335,11 @@ class InvokeAIWebServer:
|
|||||||
return os.path.abspath(path)
|
return os.path.abspath(path)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def make_unique_init_image_filename(self, name):
|
def make_unique_init_image_filename(self, name):
|
||||||
try:
|
try:
|
||||||
@@ -1574,7 +1348,11 @@ class InvokeAIWebServer:
|
|||||||
name = f"{split[0]}.{uuid}{split[1]}"
|
name = f"{split[0]}.{uuid}{split[1]}"
|
||||||
return name
|
return name
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def calculate_real_steps(self, steps, strength, has_init_image):
|
def calculate_real_steps(self, steps, strength, has_init_image):
|
||||||
import math
|
import math
|
||||||
@@ -1589,7 +1367,11 @@ class InvokeAIWebServer:
|
|||||||
file.writelines(message)
|
file.writelines(message)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def get_image_path_from_url(self, url):
|
def get_image_path_from_url(self, url):
|
||||||
"""Given a url to an image used by the client, returns the absolute file path to that image"""
|
"""Given a url to an image used by the client, returns the absolute file path to that image"""
|
||||||
@@ -1619,7 +1401,11 @@ class InvokeAIWebServer:
|
|||||||
os.path.join(self.result_path, os.path.basename(url))
|
os.path.join(self.result_path, os.path.basename(url))
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def get_url_from_image_path(self, path):
|
def get_url_from_image_path(self, path):
|
||||||
"""Given an absolute file path to an image, returns the URL that the client can use to load the image"""
|
"""Given an absolute file path to an image, returns the URL that the client can use to load the image"""
|
||||||
@@ -1637,7 +1423,11 @@ class InvokeAIWebServer:
|
|||||||
else:
|
else:
|
||||||
return os.path.join(self.result_url, os.path.basename(path))
|
return os.path.join(self.result_url, os.path.basename(path))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def save_file_unique_uuid_name(self, bytes, name, path):
|
def save_file_unique_uuid_name(self, bytes, name, path):
|
||||||
try:
|
try:
|
||||||
@@ -1656,13 +1446,11 @@ class InvokeAIWebServer:
|
|||||||
|
|
||||||
return file_path
|
return file_path
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.handle_exceptions(e)
|
self.socketio.emit("error", {"message": (str(e))})
|
||||||
|
print("\n")
|
||||||
|
|
||||||
def handle_exceptions(self, exception, emit_key: str = "error"):
|
traceback.print_exc()
|
||||||
self.socketio.emit(emit_key, {"message": (str(exception))})
|
print("\n")
|
||||||
print("\n")
|
|
||||||
traceback.print_exc()
|
|
||||||
print("\n")
|
|
||||||
|
|
||||||
|
|
||||||
class Progress:
|
class Progress:
|
||||||
@@ -1683,7 +1471,7 @@ class Progress:
|
|||||||
self.total_iterations = (
|
self.total_iterations = (
|
||||||
generation_parameters["iterations"] if generation_parameters else 1
|
generation_parameters["iterations"] if generation_parameters else 1
|
||||||
)
|
)
|
||||||
self.current_status = "common.statusPreparing"
|
self.current_status = "Preparing"
|
||||||
self.is_processing = True
|
self.is_processing = True
|
||||||
self.current_status_has_steps = False
|
self.current_status_has_steps = False
|
||||||
self.has_error = False
|
self.has_error = False
|
||||||
@@ -1713,7 +1501,7 @@ class Progress:
|
|||||||
self.has_error = has_error
|
self.has_error = has_error
|
||||||
|
|
||||||
def mark_complete(self):
|
def mark_complete(self):
|
||||||
self.current_status = "common.statusProcessingComplete"
|
self.current_status = "Processing Complete"
|
||||||
self.current_step = 0
|
self.current_step = 0
|
||||||
self.total_steps = 0
|
self.total_steps = 0
|
||||||
self.current_iteration = 0
|
self.current_iteration = 0
|
||||||
@@ -1776,20 +1564,6 @@ def dataURL_to_image(dataURL: str) -> ImageType:
|
|||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
Converts an image into a base64 image dataURL.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def image_to_dataURL(image: ImageType) -> str:
|
|
||||||
buffered = io.BytesIO()
|
|
||||||
image.save(buffered, format="PNG")
|
|
||||||
image_base64 = "data:image/png;base64," + base64.b64encode(
|
|
||||||
buffered.getvalue()
|
|
||||||
).decode("UTF-8")
|
|
||||||
return image_base64
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Converts a base64 image dataURL into bytes.
|
Converts a base64 image dataURL into bytes.
|
||||||
The dataURL is split on the first commma.
|
The dataURL is split on the first commma.
|
||||||
@@ -43,7 +43,7 @@ def get_canvas_generation_mode(
|
|||||||
)
|
)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Mask images are white in areas where no change should be made, black where changes
|
Mask images are white in areas where no change should be made, black where changes
|
||||||
should be made.
|
should be made.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from invokeai.backend.modules.parse_seed_weights import parse_seed_weights
|
from backend.modules.parse_seed_weights import parse_seed_weights
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
SAMPLER_CHOICES = [
|
SAMPLER_CHOICES = [
|
||||||
@@ -12,8 +12,6 @@ SAMPLER_CHOICES = [
|
|||||||
"k_heun",
|
"k_heun",
|
||||||
"k_lms",
|
"k_lms",
|
||||||
"plms",
|
"plms",
|
||||||
# diffusers:
|
|
||||||
"pndm",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
30
binary_installer/create_installers.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
echo "Be certain that you're in the 'installer' directory before continuing."
|
||||||
|
read -p "Press any key to continue, or CTRL-C to exit..."
|
||||||
|
|
||||||
|
# make the installer zip for linux and mac
|
||||||
|
rm -rf InvokeAI
|
||||||
|
mkdir -p InvokeAI
|
||||||
|
cp install.sh.in InvokeAI/install.sh
|
||||||
|
chmod a+x InvokeAI/install.sh
|
||||||
|
cp readme.txt InvokeAI
|
||||||
|
|
||||||
|
zip -r InvokeAI-linux.zip InvokeAI
|
||||||
|
zip -r InvokeAI-mac.zip InvokeAI
|
||||||
|
|
||||||
|
# make the installer zip for windows
|
||||||
|
rm -rf InvokeAI
|
||||||
|
mkdir -p InvokeAI
|
||||||
|
cp install.bat.in InvokeAI/install.bat
|
||||||
|
cp readme.txt InvokeAI
|
||||||
|
cp WinLongPathsEnabled.reg InvokeAI
|
||||||
|
|
||||||
|
zip -r InvokeAI-windows.zip InvokeAI
|
||||||
|
|
||||||
|
rm -rf InvokeAI
|
||||||
|
|
||||||
|
echo "The installer zips are ready for distribution."
|
||||||
164
binary_installer/install.bat.in
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
@rem This script will install git (if not found on the PATH variable)
|
||||||
|
@rem using micromamba (an 8mb static-linked single-file binary, conda replacement).
|
||||||
|
@rem For users who already have git, this step will be skipped.
|
||||||
|
|
||||||
|
@rem Next, it'll download the project's source code.
|
||||||
|
@rem Then it will download a self-contained, standalone Python and unpack it.
|
||||||
|
@rem Finally, it'll create the Python virtual environment and preload the models.
|
||||||
|
|
||||||
|
@rem This enables a user to install this project without manually installing git or Python
|
||||||
|
|
||||||
|
set "no_cache_dir=--no-cache-dir"
|
||||||
|
if "%1" == "use-cache" (
|
||||||
|
set "no_cache_dir="
|
||||||
|
)
|
||||||
|
|
||||||
|
echo ***** Installing InvokeAI.. *****
|
||||||
|
echo "USING development BRANCH. REMEMBER TO CHANGE TO main BEFORE RELEASE"
|
||||||
|
@rem Config
|
||||||
|
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||||
|
@rem https://mamba.readthedocs.io/en/latest/installation.html
|
||||||
|
set MICROMAMBA_DOWNLOAD_URL=https://github.com/cmdr2/stable-diffusion-ui/releases/download/v1.1/micromamba.exe
|
||||||
|
set RELEASE_URL=https://github.com/invoke-ai/InvokeAI
|
||||||
|
#set RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
|
||||||
|
# RELEASE_SOURCEBALL=/archive/refs/heads/test-installer.tar.gz
|
||||||
|
RELEASE_SOURCEBALL=/archive/refs/heads/development.tar.gz
|
||||||
|
set PYTHON_BUILD_STANDALONE_URL=https://github.com/indygreg/python-build-standalone/releases/download
|
||||||
|
set PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-x86_64-pc-windows-msvc-shared-install_only.tar.gz
|
||||||
|
|
||||||
|
set PACKAGES_TO_INSTALL=
|
||||||
|
|
||||||
|
call git --version >.tmp1 2>.tmp2
|
||||||
|
if "%ERRORLEVEL%" NEQ "0" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% git
|
||||||
|
|
||||||
|
@rem Cleanup
|
||||||
|
del /q .tmp1 .tmp2
|
||||||
|
|
||||||
|
@rem (if necessary) install git into a contained environment
|
||||||
|
if "%PACKAGES_TO_INSTALL%" NEQ "" (
|
||||||
|
@rem download micromamba
|
||||||
|
echo ***** Downloading micromamba from %MICROMAMBA_DOWNLOAD_URL% to micromamba.exe *****
|
||||||
|
|
||||||
|
call curl -L "%MICROMAMBA_DOWNLOAD_URL%" > micromamba.exe
|
||||||
|
|
||||||
|
@rem test the mamba binary
|
||||||
|
echo ***** Micromamba version: *****
|
||||||
|
call micromamba.exe --version
|
||||||
|
|
||||||
|
@rem create the installer env
|
||||||
|
if not exist "%INSTALL_ENV_DIR%" (
|
||||||
|
call micromamba.exe create -y --prefix "%INSTALL_ENV_DIR%"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo ***** Packages to install:%PACKAGES_TO_INSTALL% *****
|
||||||
|
|
||||||
|
call micromamba.exe install -y --prefix "%INSTALL_ENV_DIR%" -c conda-forge %PACKAGES_TO_INSTALL%
|
||||||
|
|
||||||
|
if not exist "%INSTALL_ENV_DIR%" (
|
||||||
|
echo ----- There was a problem while installing "%PACKAGES_TO_INSTALL%" using micromamba. Cannot continue. -----
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
del /q micromamba.exe
|
||||||
|
|
||||||
|
@rem For 'git' only
|
||||||
|
set PATH=%INSTALL_ENV_DIR%\Library\bin;%PATH%
|
||||||
|
|
||||||
|
@rem Download/unpack/clean up InvokeAI release sourceball
|
||||||
|
set err_msg=----- InvokeAI source download failed -----
|
||||||
|
echo Trying to download "%RELEASE_URL%%RELEASE_SOURCEBALL%"
|
||||||
|
curl -L %RELEASE_URL%%RELEASE_SOURCEBALL% --output InvokeAI.tgz
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
set err_msg=----- InvokeAI source unpack failed -----
|
||||||
|
tar -zxf InvokeAI.tgz
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
del /q InvokeAI.tgz
|
||||||
|
|
||||||
|
set err_msg=----- InvokeAI source copy failed -----
|
||||||
|
cd InvokeAI-*
|
||||||
|
xcopy . .. /e /h
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
@rem cleanup
|
||||||
|
for /f %%i in ('dir /b InvokeAI-*') do rd /s /q %%i
|
||||||
|
rd /s /q .dev_scripts .github docker-build tests
|
||||||
|
del /q requirements.in requirements-mkdocs.txt shell.nix
|
||||||
|
|
||||||
|
echo ***** Unpacked InvokeAI source *****
|
||||||
|
|
||||||
|
@rem Download/unpack/clean up python-build-standalone
|
||||||
|
set err_msg=----- Python download failed -----
|
||||||
|
curl -L %PYTHON_BUILD_STANDALONE_URL%/%PYTHON_BUILD_STANDALONE% --output python.tgz
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
set err_msg=----- Python unpack failed -----
|
||||||
|
tar -zxf python.tgz
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
del /q python.tgz
|
||||||
|
|
||||||
|
echo ***** Unpacked python-build-standalone *****
|
||||||
|
|
||||||
|
@rem create venv
|
||||||
|
set err_msg=----- problem creating venv -----
|
||||||
|
.\python\python -E -s -m venv .venv
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
call .venv\Scripts\activate.bat
|
||||||
|
|
||||||
|
echo ***** Created Python virtual environment *****
|
||||||
|
|
||||||
|
@rem Print venv's Python version
|
||||||
|
set err_msg=----- problem calling venv's python -----
|
||||||
|
echo We're running under
|
||||||
|
.venv\Scripts\python --version
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
set err_msg=----- pip update failed -----
|
||||||
|
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location --upgrade pip wheel
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
echo ***** Updated pip and wheel *****
|
||||||
|
|
||||||
|
set err_msg=----- requirements file copy failed -----
|
||||||
|
copy binary_installer\py3.10-windows-x86_64-cuda-reqs.txt requirements.txt
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
set err_msg=----- main pip install failed -----
|
||||||
|
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -r requirements.txt
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
echo ***** Installed Python dependencies *****
|
||||||
|
|
||||||
|
set err_msg=----- InvokeAI setup failed -----
|
||||||
|
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -e .
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
|
||||||
|
copy binary_installer\invoke.bat.in .\invoke.bat
|
||||||
|
echo ***** Installed invoke launcher script ******
|
||||||
|
|
||||||
|
@rem more cleanup
|
||||||
|
rd /s /q binary_installer installer_files
|
||||||
|
|
||||||
|
@rem preload the models
|
||||||
|
call .venv\Scripts\python scripts\configure_invokeai.py
|
||||||
|
set err_msg=----- model download clone failed -----
|
||||||
|
if %errorlevel% neq 0 goto err_exit
|
||||||
|
deactivate
|
||||||
|
|
||||||
|
echo ***** Finished downloading models *****
|
||||||
|
|
||||||
|
echo All done! Execute the file invoke.bat in this directory to start InvokeAI
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
|
||||||
|
:err_exit
|
||||||
|
echo %err_msg%
|
||||||
|
pause
|
||||||
|
exit
|
||||||
235
binary_installer/install.sh.in
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ensure we're in the correct folder in case user's CWD is somewhere else
|
||||||
|
scriptdir=$(dirname "$0")
|
||||||
|
cd "$scriptdir"
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
function _err_exit {
|
||||||
|
if test "$1" -ne 0
|
||||||
|
then
|
||||||
|
echo -e "Error code $1; Error caught was '$2'"
|
||||||
|
read -p "Press any key to exit..."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# This script will install git (if not found on the PATH variable)
|
||||||
|
# using micromamba (an 8mb static-linked single-file binary, conda replacement).
|
||||||
|
# For users who already have git, this step will be skipped.
|
||||||
|
|
||||||
|
# Next, it'll download the project's source code.
|
||||||
|
# Then it will download a self-contained, standalone Python and unpack it.
|
||||||
|
# Finally, it'll create the Python virtual environment and preload the models.
|
||||||
|
|
||||||
|
# This enables a user to install this project without manually installing git or Python
|
||||||
|
|
||||||
|
echo -e "\n***** Installing InvokeAI into $(pwd)... *****\n"
|
||||||
|
|
||||||
|
export no_cache_dir="--no-cache-dir"
|
||||||
|
if [ $# -ge 1 ]; then
|
||||||
|
if [ "$1" = "use-cache" ]; then
|
||||||
|
export no_cache_dir=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
OS_NAME=$(uname -s)
|
||||||
|
case "${OS_NAME}" in
|
||||||
|
Linux*) OS_NAME="linux";;
|
||||||
|
Darwin*) OS_NAME="darwin";;
|
||||||
|
*) echo -e "\n----- Unknown OS: $OS_NAME! This script runs only on Linux or macOS -----\n" && exit
|
||||||
|
esac
|
||||||
|
|
||||||
|
OS_ARCH=$(uname -m)
|
||||||
|
case "${OS_ARCH}" in
|
||||||
|
x86_64*) ;;
|
||||||
|
arm64*) ;;
|
||||||
|
*) echo -e "\n----- Unknown system architecture: $OS_ARCH! This script runs only on x86_64 or arm64 -----\n" && exit
|
||||||
|
esac
|
||||||
|
|
||||||
|
# https://mamba.readthedocs.io/en/latest/installation.html
|
||||||
|
MAMBA_OS_NAME=$OS_NAME
|
||||||
|
MAMBA_ARCH=$OS_ARCH
|
||||||
|
if [ "$OS_NAME" == "darwin" ]; then
|
||||||
|
MAMBA_OS_NAME="osx"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$OS_ARCH" == "linux" ]; then
|
||||||
|
MAMBA_ARCH="aarch64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$OS_ARCH" == "x86_64" ]; then
|
||||||
|
MAMBA_ARCH="64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PY_ARCH=$OS_ARCH
|
||||||
|
if [ "$OS_ARCH" == "arm64" ]; then
|
||||||
|
PY_ARCH="aarch64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compute device ('cd' segment of reqs files) detect goes here
|
||||||
|
# This needs a ton of work
|
||||||
|
# Suggestions:
|
||||||
|
# - lspci
|
||||||
|
# - check $PATH for nvidia-smi, gtt CUDA/GPU version from output
|
||||||
|
# - Surely there's a similar utility for AMD?
|
||||||
|
CD="cuda"
|
||||||
|
if [ "$OS_NAME" == "darwin" ] && [ "$OS_ARCH" == "arm64" ]; then
|
||||||
|
CD="mps"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# config
|
||||||
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||||
|
MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${MAMBA_OS_NAME}-${MAMBA_ARCH}/latest"
|
||||||
|
RELEASE_URL=https://github.com/invoke-ai/InvokeAI
|
||||||
|
RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
|
||||||
|
PYTHON_BUILD_STANDALONE_URL=https://github.com/indygreg/python-build-standalone/releases/download
|
||||||
|
if [ "$OS_NAME" == "darwin" ]; then
|
||||||
|
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-apple-darwin-install_only.tar.gz
|
||||||
|
elif [ "$OS_NAME" == "linux" ]; then
|
||||||
|
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-unknown-linux-gnu-install_only.tar.gz
|
||||||
|
fi
|
||||||
|
echo "INSTALLING $RELEASE_SOURCEBALL FROM $RELEASE_URL"
|
||||||
|
|
||||||
|
PACKAGES_TO_INSTALL=""
|
||||||
|
|
||||||
|
if ! hash "git" &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi
|
||||||
|
|
||||||
|
# (if necessary) install git and conda into a contained environment
|
||||||
|
if [ "$PACKAGES_TO_INSTALL" != "" ]; then
|
||||||
|
# download micromamba
|
||||||
|
echo -e "\n***** Downloading micromamba from $MICROMAMBA_DOWNLOAD_URL to micromamba *****\n"
|
||||||
|
|
||||||
|
curl -L "$MICROMAMBA_DOWNLOAD_URL" | tar -xvjO bin/micromamba > micromamba
|
||||||
|
|
||||||
|
chmod u+x ./micromamba
|
||||||
|
|
||||||
|
# test the mamba binary
|
||||||
|
echo -e "\n***** Micromamba version: *****\n"
|
||||||
|
./micromamba --version
|
||||||
|
|
||||||
|
# create the installer env
|
||||||
|
if [ ! -e "$INSTALL_ENV_DIR" ]; then
|
||||||
|
./micromamba create -y --prefix "$INSTALL_ENV_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\n***** Packages to install:$PACKAGES_TO_INSTALL *****\n"
|
||||||
|
|
||||||
|
./micromamba install -y --prefix "$INSTALL_ENV_DIR" -c conda-forge "$PACKAGES_TO_INSTALL"
|
||||||
|
|
||||||
|
if [ ! -e "$INSTALL_ENV_DIR" ]; then
|
||||||
|
echo -e "\n----- There was a problem while initializing micromamba. Cannot continue. -----\n"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f micromamba.exe
|
||||||
|
|
||||||
|
export PATH="$INSTALL_ENV_DIR/bin:$PATH"
|
||||||
|
|
||||||
|
# Download/unpack/clean up InvokeAI release sourceball
|
||||||
|
_err_msg="\n----- InvokeAI source download failed -----\n"
|
||||||
|
curl -L $RELEASE_URL/$RELEASE_SOURCEBALL --output InvokeAI.tgz
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
_err_msg="\n----- InvokeAI source unpack failed -----\n"
|
||||||
|
tar -zxf InvokeAI.tgz
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
rm -f InvokeAI.tgz
|
||||||
|
|
||||||
|
_err_msg="\n----- InvokeAI source copy failed -----\n"
|
||||||
|
cd InvokeAI-*
|
||||||
|
cp -r . ..
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
rm -rf InvokeAI-*/
|
||||||
|
rm -rf .dev_scripts/ .github/ docker-build/ tests/ requirements.in requirements-mkdocs.txt shell.nix
|
||||||
|
|
||||||
|
echo -e "\n***** Unpacked InvokeAI source *****\n"
|
||||||
|
|
||||||
|
# Download/unpack/clean up python-build-standalone
|
||||||
|
_err_msg="\n----- Python download failed -----\n"
|
||||||
|
curl -L $PYTHON_BUILD_STANDALONE_URL/$PYTHON_BUILD_STANDALONE --output python.tgz
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
_err_msg="\n----- Python unpack failed -----\n"
|
||||||
|
tar -zxf python.tgz
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
rm -f python.tgz
|
||||||
|
|
||||||
|
echo -e "\n***** Unpacked python-build-standalone *****\n"
|
||||||
|
|
||||||
|
# create venv
|
||||||
|
_err_msg="\n----- problem creating venv -----\n"
|
||||||
|
|
||||||
|
if [ "$OS_NAME" == "darwin" ]; then
|
||||||
|
# patch sysconfig so that extensions can build properly
|
||||||
|
# adapted from https://github.com/cashapp/hermit-packages/commit/fcba384663892f4d9cfb35e8639ff7a28166ee43
|
||||||
|
PYTHON_INSTALL_DIR="$(pwd)/python"
|
||||||
|
SYSCONFIG="$(echo python/lib/python*/_sysconfigdata_*.py)"
|
||||||
|
TMPFILE="$(mktemp)"
|
||||||
|
chmod +w "${SYSCONFIG}"
|
||||||
|
cp "${SYSCONFIG}" "${TMPFILE}"
|
||||||
|
sed "s,'/install,'${PYTHON_INSTALL_DIR},g" "${TMPFILE}" > "${SYSCONFIG}"
|
||||||
|
rm -f "${TMPFILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
./python/bin/python3 -E -s -m venv .venv
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
echo -e "\n***** Created Python virtual environment *****\n"
|
||||||
|
|
||||||
|
# Print venv's Python version
|
||||||
|
_err_msg="\n----- problem calling venv's python -----\n"
|
||||||
|
echo -e "We're running under"
|
||||||
|
.venv/bin/python3 --version
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
_err_msg="\n----- pip update failed -----\n"
|
||||||
|
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location --upgrade pip
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
echo -e "\n***** Updated pip *****\n"
|
||||||
|
|
||||||
|
_err_msg="\n----- requirements file copy failed -----\n"
|
||||||
|
cp binary_installer/py3.10-${OS_NAME}-"${OS_ARCH}"-${CD}-reqs.txt requirements.txt
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
_err_msg="\n----- main pip install failed -----\n"
|
||||||
|
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -r requirements.txt
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
echo -e "\n***** Installed Python dependencies *****\n"
|
||||||
|
|
||||||
|
_err_msg="\n----- InvokeAI setup failed -----\n"
|
||||||
|
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -e .
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
|
||||||
|
echo -e "\n***** Installed InvokeAI *****\n"
|
||||||
|
|
||||||
|
cp binary_installer/invoke.sh.in ./invoke.sh
|
||||||
|
chmod a+x ./invoke.sh
|
||||||
|
echo -e "\n***** Installed invoke launcher script ******\n"
|
||||||
|
|
||||||
|
# more cleanup
|
||||||
|
rm -rf binary_installer/ installer_files/
|
||||||
|
|
||||||
|
# preload the models
|
||||||
|
.venv/bin/python3 scripts/configure_invokeai.py
|
||||||
|
_err_msg="\n----- model download clone failed -----\n"
|
||||||
|
_err_exit $? _err_msg
|
||||||
|
deactivate
|
||||||
|
|
||||||
|
echo -e "\n***** Finished downloading models *****\n"
|
||||||
|
|
||||||
|
echo "All done! Run the command"
|
||||||
|
echo " \"$scriptdir/invoke.sh\""
|
||||||
|
echo "to start InvokeAI."
|
||||||
|
read -p "Press any key to exit..."
|
||||||
|
exit
|
||||||
35
binary_installer/invoke.bat.in
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
call .venv\Scripts\activate.bat
|
||||||
|
|
||||||
|
echo Do you want to generate images using the
|
||||||
|
echo 1. command-line
|
||||||
|
echo 2. browser-based UI
|
||||||
|
echo OR
|
||||||
|
echo 3. open the developer console
|
||||||
|
set /p choice="Please enter 1, 2 or 3: "
|
||||||
|
if /i "%choice%" == "1" (
|
||||||
|
echo Starting the InvokeAI command-line.
|
||||||
|
.venv\Scripts\python scripts\invoke.py
|
||||||
|
) else if /i "%choice%" == "2" (
|
||||||
|
echo Starting the InvokeAI browser-based UI.
|
||||||
|
.venv\Scripts\python scripts\invoke.py --web
|
||||||
|
) else if /i "%choice%" == "3" (
|
||||||
|
echo Developer Console
|
||||||
|
echo Python command is:
|
||||||
|
where python
|
||||||
|
echo Python version is:
|
||||||
|
python --version
|
||||||
|
echo *************************
|
||||||
|
echo You are now in the system shell, with the local InvokeAI Python virtual environment activated,
|
||||||
|
echo so that you can troubleshoot this InvokeAI installation as necessary.
|
||||||
|
echo *************************
|
||||||
|
echo *** Type `exit` to quit this shell and deactivate the Python virtual environment ***
|
||||||
|
call cmd /k
|
||||||
|
) else (
|
||||||
|
echo Invalid selection
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
deactivate
|
||||||
41
binary_installer/invoke.sh.in
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
. .venv/bin/activate
|
||||||
|
|
||||||
|
echo "Do you want to generate images using the"
|
||||||
|
echo "1. command-line"
|
||||||
|
echo "2. browser-based UI"
|
||||||
|
echo "OR"
|
||||||
|
echo "3. open the developer console"
|
||||||
|
echo "Please enter 1, 2, or 3:"
|
||||||
|
read choice
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
1)
|
||||||
|
printf "\nStarting the InvokeAI command-line..\n";
|
||||||
|
.venv/bin/python scripts/invoke.py;
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
printf "\nStarting the InvokeAI browser-based UI..\n";
|
||||||
|
.venv/bin/python scripts/invoke.py --web;
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
printf "\nDeveloper Console:\n";
|
||||||
|
printf "Python command is:\n\t";
|
||||||
|
which python;
|
||||||
|
printf "Python version is:\n\t";
|
||||||
|
python --version;
|
||||||
|
echo "*************************"
|
||||||
|
echo "You are now in your user shell ($SHELL) with the local InvokeAI Python virtual environment activated,";
|
||||||
|
echo "so that you can troubleshoot this InvokeAI installation as necessary.";
|
||||||
|
printf "*************************\n"
|
||||||
|
echo "*** Type \`exit\` to quit this shell and deactivate the Python virtual environment *** ";
|
||||||
|
/usr/bin/env "$SHELL";
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid selection";
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
2100
binary_installer/py3.10-darwin-arm64-mps-reqs.txt
Normal file
2082
binary_installer/py3.10-darwin-x86_64-cpu-reqs.txt
Normal file
2088
binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
Normal file
2094
binary_installer/py3.10-windows-x86_64-cuda-reqs.txt
Normal file
17
binary_installer/readme.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
InvokeAI
|
||||||
|
|
||||||
|
Project homepage: https://github.com/invoke-ai/InvokeAI
|
||||||
|
|
||||||
|
Installation on Windows:
|
||||||
|
NOTE: You might need to enable Windows Long Paths. If you're not sure,
|
||||||
|
then you almost certainly need to. Simply double-click the 'WinLongPathsEnabled.reg'
|
||||||
|
file. Note that you will need to have admin privileges in order to
|
||||||
|
do this.
|
||||||
|
|
||||||
|
Please double-click the 'install.bat' file (while keeping it inside the invokeAI folder).
|
||||||
|
|
||||||
|
Installation on Linux and Mac:
|
||||||
|
Please open the terminal, and run './install.sh' (while keeping it inside the invokeAI folder).
|
||||||
|
|
||||||
|
After installation, please run the 'invoke.bat' file (on Windows) or 'invoke.sh'
|
||||||
|
file (on Linux/Mac) to start InvokeAI.
|
||||||
30
binary_installer/requirements.in
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
--prefer-binary
|
||||||
|
--extra-index-url https://download.pytorch.org/whl/torch_stable.html
|
||||||
|
--trusted-host https://download.pytorch.org
|
||||||
|
accelerate~=0.14
|
||||||
|
albumentations
|
||||||
|
diffusers
|
||||||
|
eventlet
|
||||||
|
flask_cors
|
||||||
|
flask_socketio
|
||||||
|
flaskwebgui
|
||||||
|
getpass_asterisk
|
||||||
|
imageio-ffmpeg
|
||||||
|
pyreadline3
|
||||||
|
realesrgan
|
||||||
|
send2trash
|
||||||
|
streamlit
|
||||||
|
taming-transformers-rom1504
|
||||||
|
test-tube
|
||||||
|
torch-fidelity
|
||||||
|
torch==1.12.1 ; platform_system == 'Darwin'
|
||||||
|
torch==1.12.0+cu116 ; platform_system == 'Linux' or platform_system == 'Windows'
|
||||||
|
torchvision==0.13.1 ; platform_system == 'Darwin'
|
||||||
|
torchvision==0.13.0+cu116 ; platform_system == 'Linux' or platform_system == 'Windows'
|
||||||
|
transformers
|
||||||
|
picklescan
|
||||||
|
https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip
|
||||||
|
https://github.com/invoke-ai/clipseg/archive/1f754751c85d7d4255fa681f4491ff5711c1c288.zip
|
||||||
|
https://github.com/TencentARC/GFPGAN/archive/2eac2033893ca7f427f4035d80fe95b92649ac56.zip
|
||||||
|
https://github.com/invoke-ai/k-diffusion/archive/7f16b2c33411f26b3eae78d10648d625cb0c1095.zip
|
||||||
|
https://github.com/invoke-ai/PyPatchMatch/archive/129863937a8ab37f6bbcec327c994c0f932abdbc.zip
|
||||||
80
configs/INITIAL_MODELS.yaml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
stable-diffusion-1.5:
|
||||||
|
description: The newest Stable Diffusion version 1.5 weight file (4.27 GB)
|
||||||
|
repo_id: runwayml/stable-diffusion-v1-5
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: v1-5-pruned-emaonly.ckpt
|
||||||
|
recommended: true
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
inpainting-1.5:
|
||||||
|
description: RunwayML SD 1.5 model optimized for inpainting (4.27 GB)
|
||||||
|
repo_id: runwayml/stable-diffusion-inpainting
|
||||||
|
config: v1-inpainting-inference.yaml
|
||||||
|
file: sd-v1-5-inpainting.ckpt
|
||||||
|
recommended: True
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
ft-mse-improved-autoencoder-840000:
|
||||||
|
description: StabilityAI improved autoencoder fine-tuned for human faces (recommended; 335 MB)
|
||||||
|
repo_id: stabilityai/sd-vae-ft-mse-original
|
||||||
|
config: VAE/default
|
||||||
|
file: vae-ft-mse-840000-ema-pruned.ckpt
|
||||||
|
recommended: True
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
stable-diffusion-1.4:
|
||||||
|
description: The original Stable Diffusion version 1.4 weight file (4.27 GB)
|
||||||
|
repo_id: CompVis/stable-diffusion-v-1-4-original
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: sd-v1-4.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
waifu-diffusion-1.3:
|
||||||
|
description: Stable Diffusion 1.4 fine tuned on anime-styled images (4.27)
|
||||||
|
repo_id: hakurei/waifu-diffusion-v1-3
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: model-epoch09-float32.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
trinart-2.0:
|
||||||
|
description: An SD model finetuned with ~40,000 assorted high resolution manga/anime-style pictures (2.13 GB)
|
||||||
|
repo_id: naclbit/trinart_stable_diffusion_v2
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: trinart2_step95000.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
trinart_characters-1.0:
|
||||||
|
description: An SD model finetuned with 19.2M anime/manga style images (2.13 GB)
|
||||||
|
repo_id: naclbit/trinart_characters_19.2m_stable_diffusion_v1
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: trinart_characters_it4_v1.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
trinart_vae:
|
||||||
|
description: Custom autoencoder for trinart_characters
|
||||||
|
repo_id: naclbit/trinart_characters_19.2m_stable_diffusion_v1
|
||||||
|
config: VAE/trinart
|
||||||
|
file: autoencoder_fix_kl-f8-trinart_characters.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
papercut-1.0:
|
||||||
|
description: SD 1.5 fine-tuned for papercut art (use "PaperCut" in your prompts) (2.13 GB)
|
||||||
|
repo_id: Fictiverse/Stable_Diffusion_PaperCut_Model
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: PaperCut_v1.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
|
voxel_art-1.0:
|
||||||
|
description: Stable Diffusion trained on voxel art (use "VoxelArt" in your prompts) (4.27 GB)
|
||||||
|
repo_id: Fictiverse/Stable_Diffusion_VoxelArt_Model
|
||||||
|
config: v1-inference.yaml
|
||||||
|
file: VoxelArt_v1.ckpt
|
||||||
|
recommended: False
|
||||||
|
width: 512
|
||||||
|
height: 512
|
||||||
@@ -5,25 +5,6 @@
|
|||||||
# model requires a model config file, a weights file,
|
# model requires a model config file, a weights file,
|
||||||
# and the width and height of the images it
|
# and the width and height of the images it
|
||||||
# was trained on.
|
# was trained on.
|
||||||
diffusers-1.4:
|
|
||||||
description: 🤗🧨 Stable Diffusion v1.4
|
|
||||||
format: diffusers
|
|
||||||
repo_id: CompVis/stable-diffusion-v1-4
|
|
||||||
diffusers-1.5:
|
|
||||||
description: 🤗🧨 Stable Diffusion v1.5
|
|
||||||
format: diffusers
|
|
||||||
repo_id: runwayml/stable-diffusion-v1-5
|
|
||||||
default: true
|
|
||||||
diffusers-1.5+mse:
|
|
||||||
description: 🤗🧨 Stable Diffusion v1.5 + MSE-finetuned VAE
|
|
||||||
format: diffusers
|
|
||||||
repo_id: runwayml/stable-diffusion-v1-5
|
|
||||||
vae:
|
|
||||||
repo_id: stabilityai/sd-vae-ft-mse
|
|
||||||
diffusers-inpainting-1.5:
|
|
||||||
description: 🤗🧨 inpainting for Stable Diffusion v1.5
|
|
||||||
format: diffusers
|
|
||||||
repo_id: runwayml/stable-diffusion-inpainting
|
|
||||||
stable-diffusion-1.5:
|
stable-diffusion-1.5:
|
||||||
description: The newest Stable Diffusion version 1.5 weight file (4.27 GB)
|
description: The newest Stable Diffusion version 1.5 weight file (4.27 GB)
|
||||||
weights: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
|
weights: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
|
||||||
@@ -31,6 +12,7 @@ stable-diffusion-1.5:
|
|||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
||||||
|
default: true
|
||||||
stable-diffusion-1.4:
|
stable-diffusion-1.4:
|
||||||
description: Stable Diffusion inference model version 1.4
|
description: Stable Diffusion inference model version 1.4
|
||||||
config: configs/stable-diffusion/v1-inference.yaml
|
config: configs/stable-diffusion/v1-inference.yaml
|
||||||
@@ -43,5 +25,3 @@ inpainting-1.5:
|
|||||||
config: configs/stable-diffusion/v1-inpainting-inference.yaml
|
config: configs/stable-diffusion/v1-inpainting-inference.yaml
|
||||||
vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
||||||
description: RunwayML SD 1.5 model optimized for inpainting
|
description: RunwayML SD 1.5 model optimized for inpainting
|
||||||
width: 512
|
|
||||||
height: 512
|
|
||||||
803
configs/sd-concepts.txt
Normal file
@@ -0,0 +1,803 @@
|
|||||||
|
sd-concepts-library/001glitch-core
|
||||||
|
sd-concepts-library/2814-roth
|
||||||
|
sd-concepts-library/3d-female-cyborgs
|
||||||
|
sd-concepts-library/4tnght
|
||||||
|
sd-concepts-library/80s-anime-ai
|
||||||
|
sd-concepts-library/80s-anime-ai-being
|
||||||
|
sd-concepts-library/852style-girl
|
||||||
|
sd-concepts-library/8bit
|
||||||
|
sd-concepts-library/8sconception
|
||||||
|
sd-concepts-library/Aflac-duck
|
||||||
|
sd-concepts-library/Akitsuki
|
||||||
|
sd-concepts-library/Atako
|
||||||
|
sd-concepts-library/Exodus-Styling
|
||||||
|
sd-concepts-library/RINGAO
|
||||||
|
sd-concepts-library/a-female-hero-from-the-legend-of-mir
|
||||||
|
sd-concepts-library/a-hat-kid
|
||||||
|
sd-concepts-library/a-tale-of-two-empires
|
||||||
|
sd-concepts-library/aadhav-face
|
||||||
|
sd-concepts-library/aavegotchi
|
||||||
|
sd-concepts-library/abby-face
|
||||||
|
sd-concepts-library/abstract-concepts
|
||||||
|
sd-concepts-library/accurate-angel
|
||||||
|
sd-concepts-library/agm-style-nao
|
||||||
|
sd-concepts-library/aj-fosik
|
||||||
|
sd-concepts-library/alberto-mielgo
|
||||||
|
sd-concepts-library/alex-portugal
|
||||||
|
sd-concepts-library/alex-thumbnail-object-2000-steps
|
||||||
|
sd-concepts-library/aleyna-tilki
|
||||||
|
sd-concepts-library/alf
|
||||||
|
sd-concepts-library/alicebeta
|
||||||
|
sd-concepts-library/alien-avatar
|
||||||
|
sd-concepts-library/alisa
|
||||||
|
sd-concepts-library/all-rings-albuns
|
||||||
|
sd-concepts-library/altvent
|
||||||
|
sd-concepts-library/altyn-helmet
|
||||||
|
sd-concepts-library/amine
|
||||||
|
sd-concepts-library/amogus
|
||||||
|
sd-concepts-library/anders-zorn
|
||||||
|
sd-concepts-library/angus-mcbride-style
|
||||||
|
sd-concepts-library/animalve3-1500seq
|
||||||
|
sd-concepts-library/anime-background-style
|
||||||
|
sd-concepts-library/anime-background-style-v2
|
||||||
|
sd-concepts-library/anime-boy
|
||||||
|
sd-concepts-library/anime-girl
|
||||||
|
sd-concepts-library/anyXtronXredshift
|
||||||
|
sd-concepts-library/anya-forger
|
||||||
|
sd-concepts-library/apex-wingman
|
||||||
|
sd-concepts-library/apulian-rooster-v0-1
|
||||||
|
sd-concepts-library/arcane-face
|
||||||
|
sd-concepts-library/arcane-style-jv
|
||||||
|
sd-concepts-library/arcimboldo-style
|
||||||
|
sd-concepts-library/armando-reveron-style
|
||||||
|
sd-concepts-library/armor-concept
|
||||||
|
sd-concepts-library/arq-render
|
||||||
|
sd-concepts-library/art-brut
|
||||||
|
sd-concepts-library/arthur1
|
||||||
|
sd-concepts-library/artist-yukiko-kanagai
|
||||||
|
sd-concepts-library/arwijn
|
||||||
|
sd-concepts-library/ashiok
|
||||||
|
sd-concepts-library/at-wolf-boy-object
|
||||||
|
sd-concepts-library/atm-ant
|
||||||
|
sd-concepts-library/atm-ant-2
|
||||||
|
sd-concepts-library/axe-tattoo
|
||||||
|
sd-concepts-library/ayush-spider-spr
|
||||||
|
sd-concepts-library/azura-from-vibrant-venture
|
||||||
|
sd-concepts-library/ba-shiroko
|
||||||
|
sd-concepts-library/babau
|
||||||
|
sd-concepts-library/babs-bunny
|
||||||
|
sd-concepts-library/babushork
|
||||||
|
sd-concepts-library/backrooms
|
||||||
|
sd-concepts-library/bad_Hub_Hugh
|
||||||
|
sd-concepts-library/bada-club
|
||||||
|
sd-concepts-library/baldi
|
||||||
|
sd-concepts-library/baluchitherian
|
||||||
|
sd-concepts-library/bamse
|
||||||
|
sd-concepts-library/bamse-og-kylling
|
||||||
|
sd-concepts-library/bee
|
||||||
|
sd-concepts-library/beholder
|
||||||
|
sd-concepts-library/beldam
|
||||||
|
sd-concepts-library/belen
|
||||||
|
sd-concepts-library/bella-goth
|
||||||
|
sd-concepts-library/belle-delphine
|
||||||
|
sd-concepts-library/bert-muppet
|
||||||
|
sd-concepts-library/better-collage3
|
||||||
|
sd-concepts-library/between2-mt-fade
|
||||||
|
sd-concepts-library/birb-style
|
||||||
|
sd-concepts-library/black-and-white-design
|
||||||
|
sd-concepts-library/black-waifu
|
||||||
|
sd-concepts-library/bloo
|
||||||
|
sd-concepts-library/blue-haired-boy
|
||||||
|
sd-concepts-library/blue-zombie
|
||||||
|
sd-concepts-library/blue-zombiee
|
||||||
|
sd-concepts-library/bluebey
|
||||||
|
sd-concepts-library/bluebey-2
|
||||||
|
sd-concepts-library/bobs-burgers
|
||||||
|
sd-concepts-library/boissonnard
|
||||||
|
sd-concepts-library/bonzi-monkey
|
||||||
|
sd-concepts-library/borderlands
|
||||||
|
sd-concepts-library/bored-ape-textual-inversion
|
||||||
|
sd-concepts-library/boris-anderson
|
||||||
|
sd-concepts-library/bozo-22
|
||||||
|
sd-concepts-library/breakcore
|
||||||
|
sd-concepts-library/brittney-williams-art
|
||||||
|
sd-concepts-library/bruma
|
||||||
|
sd-concepts-library/brunnya
|
||||||
|
sd-concepts-library/buddha-statue
|
||||||
|
sd-concepts-library/bullvbear
|
||||||
|
sd-concepts-library/button-eyes
|
||||||
|
sd-concepts-library/canadian-goose
|
||||||
|
sd-concepts-library/canary-cap
|
||||||
|
sd-concepts-library/cancer_style
|
||||||
|
sd-concepts-library/captain-haddock
|
||||||
|
sd-concepts-library/captainkirb
|
||||||
|
sd-concepts-library/car-toy-rk
|
||||||
|
sd-concepts-library/carasibana
|
||||||
|
sd-concepts-library/carlitos-el-mago
|
||||||
|
sd-concepts-library/carrascharacter
|
||||||
|
sd-concepts-library/cartoona-animals
|
||||||
|
sd-concepts-library/cat-toy
|
||||||
|
sd-concepts-library/centaur
|
||||||
|
sd-concepts-library/cgdonny1
|
||||||
|
sd-concepts-library/cham
|
||||||
|
sd-concepts-library/chandra-nalaar
|
||||||
|
sd-concepts-library/char-con
|
||||||
|
sd-concepts-library/character-pingu
|
||||||
|
sd-concepts-library/cheburashka
|
||||||
|
sd-concepts-library/chen-1
|
||||||
|
sd-concepts-library/child-zombie
|
||||||
|
sd-concepts-library/chillpill
|
||||||
|
sd-concepts-library/chonkfrog
|
||||||
|
sd-concepts-library/chop
|
||||||
|
sd-concepts-library/christo-person
|
||||||
|
sd-concepts-library/chuck-walton
|
||||||
|
sd-concepts-library/chucky
|
||||||
|
sd-concepts-library/chungus-poodl-pet
|
||||||
|
sd-concepts-library/cindlop
|
||||||
|
sd-concepts-library/collage-cutouts
|
||||||
|
sd-concepts-library/collage14
|
||||||
|
sd-concepts-library/collage3
|
||||||
|
sd-concepts-library/collage3-hubcity
|
||||||
|
sd-concepts-library/cologne
|
||||||
|
sd-concepts-library/color-page
|
||||||
|
sd-concepts-library/colossus
|
||||||
|
sd-concepts-library/command-and-conquer-remastered-cameos
|
||||||
|
sd-concepts-library/concept-art
|
||||||
|
sd-concepts-library/conner-fawcett-style
|
||||||
|
sd-concepts-library/conway-pirate
|
||||||
|
sd-concepts-library/coop-himmelblau
|
||||||
|
sd-concepts-library/coraline
|
||||||
|
sd-concepts-library/cornell-box
|
||||||
|
sd-concepts-library/cortana
|
||||||
|
sd-concepts-library/covid-19-rapid-test
|
||||||
|
sd-concepts-library/cow-uwu
|
||||||
|
sd-concepts-library/cowboy
|
||||||
|
sd-concepts-library/crazy-1
|
||||||
|
sd-concepts-library/crazy-2
|
||||||
|
sd-concepts-library/crb-portraits
|
||||||
|
sd-concepts-library/crb-surrealz
|
||||||
|
sd-concepts-library/crbart
|
||||||
|
sd-concepts-library/crested-gecko
|
||||||
|
sd-concepts-library/crinos-form-garou
|
||||||
|
sd-concepts-library/cry-baby-style
|
||||||
|
sd-concepts-library/crybaby-style-2-0
|
||||||
|
sd-concepts-library/csgo-awp-object
|
||||||
|
sd-concepts-library/csgo-awp-texture-map
|
||||||
|
sd-concepts-library/cubex
|
||||||
|
sd-concepts-library/cumbia-peruana
|
||||||
|
sd-concepts-library/cute-bear
|
||||||
|
sd-concepts-library/cute-cat
|
||||||
|
sd-concepts-library/cute-game-style
|
||||||
|
sd-concepts-library/cyberpunk-lucy
|
||||||
|
sd-concepts-library/dabotap
|
||||||
|
sd-concepts-library/dan-mumford
|
||||||
|
sd-concepts-library/dan-seagrave-art-style
|
||||||
|
sd-concepts-library/dark-penguin-pinguinanimations
|
||||||
|
sd-concepts-library/darkpenguinanimatronic
|
||||||
|
sd-concepts-library/darkplane
|
||||||
|
sd-concepts-library/david-firth-artstyle
|
||||||
|
sd-concepts-library/david-martinez-cyberpunk
|
||||||
|
sd-concepts-library/david-martinez-edgerunners
|
||||||
|
sd-concepts-library/david-moreno-architecture
|
||||||
|
sd-concepts-library/daycare-attendant-sun-fnaf
|
||||||
|
sd-concepts-library/ddattender
|
||||||
|
sd-concepts-library/degods
|
||||||
|
sd-concepts-library/degodsheavy
|
||||||
|
sd-concepts-library/depthmap
|
||||||
|
sd-concepts-library/depthmap-style
|
||||||
|
sd-concepts-library/design
|
||||||
|
sd-concepts-library/detectivedinosaur1
|
||||||
|
sd-concepts-library/diaosu-toy
|
||||||
|
sd-concepts-library/dicoo
|
||||||
|
sd-concepts-library/dicoo2
|
||||||
|
sd-concepts-library/dishonored-portrait-styles
|
||||||
|
sd-concepts-library/disquieting-muses
|
||||||
|
sd-concepts-library/ditko
|
||||||
|
sd-concepts-library/dlooak
|
||||||
|
sd-concepts-library/doc
|
||||||
|
sd-concepts-library/doener-red-line-art
|
||||||
|
sd-concepts-library/dog
|
||||||
|
sd-concepts-library/dog-django
|
||||||
|
sd-concepts-library/doge-pound
|
||||||
|
sd-concepts-library/dong-ho
|
||||||
|
sd-concepts-library/dong-ho2
|
||||||
|
sd-concepts-library/doose-s-realistic-art-style
|
||||||
|
sd-concepts-library/dq10-anrushia
|
||||||
|
sd-concepts-library/dr-livesey
|
||||||
|
sd-concepts-library/dr-strange
|
||||||
|
sd-concepts-library/dragonborn
|
||||||
|
sd-concepts-library/dreamcore
|
||||||
|
sd-concepts-library/dreamy-painting
|
||||||
|
sd-concepts-library/drive-scorpion-jacket
|
||||||
|
sd-concepts-library/dsmuses
|
||||||
|
sd-concepts-library/dtv-pkmn
|
||||||
|
sd-concepts-library/dullboy-caricature
|
||||||
|
sd-concepts-library/duranduran
|
||||||
|
sd-concepts-library/durer-style
|
||||||
|
sd-concepts-library/dyoudim-style
|
||||||
|
sd-concepts-library/early-mishima-kurone
|
||||||
|
sd-concepts-library/eastward
|
||||||
|
sd-concepts-library/eddie
|
||||||
|
sd-concepts-library/edgerunners-style
|
||||||
|
sd-concepts-library/edgerunners-style-v2
|
||||||
|
sd-concepts-library/el-salvador-style-style
|
||||||
|
sd-concepts-library/elegant-flower
|
||||||
|
sd-concepts-library/elspeth-tirel
|
||||||
|
sd-concepts-library/eru-chitanda-casual
|
||||||
|
sd-concepts-library/erwin-olaf-style
|
||||||
|
sd-concepts-library/ettblackteapot
|
||||||
|
sd-concepts-library/explosions-cat
|
||||||
|
sd-concepts-library/eye-of-agamotto
|
||||||
|
sd-concepts-library/f-22
|
||||||
|
sd-concepts-library/facadeplace
|
||||||
|
sd-concepts-library/fairy-tale-painting-style
|
||||||
|
sd-concepts-library/fairytale
|
||||||
|
sd-concepts-library/fang-yuan-001
|
||||||
|
sd-concepts-library/faraon-love-shady
|
||||||
|
sd-concepts-library/fasina
|
||||||
|
sd-concepts-library/felps
|
||||||
|
sd-concepts-library/female-kpop-singer
|
||||||
|
sd-concepts-library/fergal-cat
|
||||||
|
sd-concepts-library/filename-2
|
||||||
|
sd-concepts-library/fileteado-porteno
|
||||||
|
sd-concepts-library/final-fantasy-logo
|
||||||
|
sd-concepts-library/fireworks-over-water
|
||||||
|
sd-concepts-library/fish
|
||||||
|
sd-concepts-library/flag-ussr
|
||||||
|
sd-concepts-library/flatic
|
||||||
|
sd-concepts-library/floral
|
||||||
|
sd-concepts-library/fluid-acrylic-jellyfish-creatures-style-of-carl-ingram-art
|
||||||
|
sd-concepts-library/fnf-boyfriend
|
||||||
|
sd-concepts-library/fold-structure
|
||||||
|
sd-concepts-library/fox-purple
|
||||||
|
sd-concepts-library/fractal
|
||||||
|
sd-concepts-library/fractal-flame
|
||||||
|
sd-concepts-library/fractal-temple-style
|
||||||
|
sd-concepts-library/frank-frazetta
|
||||||
|
sd-concepts-library/franz-unterberger
|
||||||
|
sd-concepts-library/freddy-fazbear
|
||||||
|
sd-concepts-library/freefonix-style
|
||||||
|
sd-concepts-library/furrpopasthetic
|
||||||
|
sd-concepts-library/fursona
|
||||||
|
sd-concepts-library/fzk
|
||||||
|
sd-concepts-library/galaxy-explorer
|
||||||
|
sd-concepts-library/ganyu-genshin-impact
|
||||||
|
sd-concepts-library/garcon-the-cat
|
||||||
|
sd-concepts-library/garfield-pizza-plush
|
||||||
|
sd-concepts-library/garfield-pizza-plush-v2
|
||||||
|
sd-concepts-library/gba-fe-class-cards
|
||||||
|
sd-concepts-library/gba-pokemon-sprites
|
||||||
|
sd-concepts-library/geggin
|
||||||
|
sd-concepts-library/ggplot2
|
||||||
|
sd-concepts-library/ghost-style
|
||||||
|
sd-concepts-library/ghostproject-men
|
||||||
|
sd-concepts-library/gibasachan-v0
|
||||||
|
sd-concepts-library/gim
|
||||||
|
sd-concepts-library/gio
|
||||||
|
sd-concepts-library/giygas
|
||||||
|
sd-concepts-library/glass-pipe
|
||||||
|
sd-concepts-library/glass-prism-cube
|
||||||
|
sd-concepts-library/glow-forest
|
||||||
|
sd-concepts-library/goku
|
||||||
|
sd-concepts-library/gram-tops
|
||||||
|
sd-concepts-library/green-blue-shanshui
|
||||||
|
sd-concepts-library/green-tent
|
||||||
|
sd-concepts-library/grifter
|
||||||
|
sd-concepts-library/grisstyle
|
||||||
|
sd-concepts-library/grit-toy
|
||||||
|
sd-concepts-library/gt-color-paint-2
|
||||||
|
sd-concepts-library/gta5-artwork
|
||||||
|
sd-concepts-library/guttestreker
|
||||||
|
sd-concepts-library/gymnastics-leotard-v2
|
||||||
|
sd-concepts-library/half-life-2-dog
|
||||||
|
sd-concepts-library/handstand
|
||||||
|
sd-concepts-library/hanfu-anime-style
|
||||||
|
sd-concepts-library/happy-chaos
|
||||||
|
sd-concepts-library/happy-person12345
|
||||||
|
sd-concepts-library/happy-person12345-assets
|
||||||
|
sd-concepts-library/harley-quinn
|
||||||
|
sd-concepts-library/harmless-ai-1
|
||||||
|
sd-concepts-library/harmless-ai-house-style-1
|
||||||
|
sd-concepts-library/hd-emoji
|
||||||
|
sd-concepts-library/heather
|
||||||
|
sd-concepts-library/henjo-techno-show
|
||||||
|
sd-concepts-library/herge-style
|
||||||
|
sd-concepts-library/hiten-style-nao
|
||||||
|
sd-concepts-library/hitokomoru-style-nao
|
||||||
|
sd-concepts-library/hiyuki-chan
|
||||||
|
sd-concepts-library/hk-bamboo
|
||||||
|
sd-concepts-library/hk-betweenislands
|
||||||
|
sd-concepts-library/hk-bicycle
|
||||||
|
sd-concepts-library/hk-blackandwhite
|
||||||
|
sd-concepts-library/hk-breakfast
|
||||||
|
sd-concepts-library/hk-buses
|
||||||
|
sd-concepts-library/hk-clouds
|
||||||
|
sd-concepts-library/hk-goldbuddha
|
||||||
|
sd-concepts-library/hk-goldenlantern
|
||||||
|
sd-concepts-library/hk-hkisland
|
||||||
|
sd-concepts-library/hk-leaves
|
||||||
|
sd-concepts-library/hk-market
|
||||||
|
sd-concepts-library/hk-oldcamera
|
||||||
|
sd-concepts-library/hk-opencamera
|
||||||
|
sd-concepts-library/hk-peach
|
||||||
|
sd-concepts-library/hk-phonevax
|
||||||
|
sd-concepts-library/hk-streetpeople
|
||||||
|
sd-concepts-library/hk-vintage
|
||||||
|
sd-concepts-library/hoi4
|
||||||
|
sd-concepts-library/hoi4-leaders
|
||||||
|
sd-concepts-library/homestuck-sprite
|
||||||
|
sd-concepts-library/homestuck-troll
|
||||||
|
sd-concepts-library/hours-sentry-fade
|
||||||
|
sd-concepts-library/hours-style
|
||||||
|
sd-concepts-library/hrgiger-drmacabre
|
||||||
|
sd-concepts-library/huang-guang-jian
|
||||||
|
sd-concepts-library/huatli
|
||||||
|
sd-concepts-library/huayecai820-greyscale
|
||||||
|
sd-concepts-library/hub-city
|
||||||
|
sd-concepts-library/hubris-oshri
|
||||||
|
sd-concepts-library/huckleberry
|
||||||
|
sd-concepts-library/hydrasuit
|
||||||
|
sd-concepts-library/i-love-chaos
|
||||||
|
sd-concepts-library/ibere-thenorio
|
||||||
|
sd-concepts-library/ic0n
|
||||||
|
sd-concepts-library/ie-gravestone
|
||||||
|
sd-concepts-library/ikea-fabler
|
||||||
|
sd-concepts-library/illustration-style
|
||||||
|
sd-concepts-library/ilo-kunst
|
||||||
|
sd-concepts-library/ilya-shkipin
|
||||||
|
sd-concepts-library/im-poppy
|
||||||
|
sd-concepts-library/ina-art
|
||||||
|
sd-concepts-library/indian-watercolor-portraits
|
||||||
|
sd-concepts-library/indiana
|
||||||
|
sd-concepts-library/ingmar-bergman
|
||||||
|
sd-concepts-library/insidewhale
|
||||||
|
sd-concepts-library/interchanges
|
||||||
|
sd-concepts-library/inuyama-muneto-style-nao
|
||||||
|
sd-concepts-library/irasutoya
|
||||||
|
sd-concepts-library/iridescent-illustration-style
|
||||||
|
sd-concepts-library/iridescent-photo-style
|
||||||
|
sd-concepts-library/isabell-schulte-pv-pvii-3000steps
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-1-image-style
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-1024px-1500-steps-style
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-12tiles-3000steps-style
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-4-tiles-1-lr-3000-steps-style
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-4-tiles-3-lr-5000-steps-style
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-4tiles-500steps
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-4tiles-6000steps
|
||||||
|
sd-concepts-library/isabell-schulte-pviii-style
|
||||||
|
sd-concepts-library/isometric-tile-test
|
||||||
|
sd-concepts-library/jacqueline-the-unicorn
|
||||||
|
sd-concepts-library/james-web-space-telescope
|
||||||
|
sd-concepts-library/jamie-hewlett-style
|
||||||
|
sd-concepts-library/jamiels
|
||||||
|
sd-concepts-library/jang-sung-rak-style
|
||||||
|
sd-concepts-library/jetsetdreamcastcovers
|
||||||
|
sd-concepts-library/jin-kisaragi
|
||||||
|
sd-concepts-library/jinjoon-lee-they
|
||||||
|
sd-concepts-library/jm-bergling-monogram
|
||||||
|
sd-concepts-library/joe-mad
|
||||||
|
sd-concepts-library/joe-whiteford-art-style
|
||||||
|
sd-concepts-library/joemad
|
||||||
|
sd-concepts-library/john-blanche
|
||||||
|
sd-concepts-library/johnny-silverhand
|
||||||
|
sd-concepts-library/jojo-bizzare-adventure-manga-lineart
|
||||||
|
sd-concepts-library/jos-de-kat
|
||||||
|
sd-concepts-library/junji-ito-artstyle
|
||||||
|
sd-concepts-library/kaleido
|
||||||
|
sd-concepts-library/kaneoya-sachiko
|
||||||
|
sd-concepts-library/kanovt
|
||||||
|
sd-concepts-library/kanv1
|
||||||
|
sd-concepts-library/karan-gloomy
|
||||||
|
sd-concepts-library/karl-s-lzx-1
|
||||||
|
sd-concepts-library/kasumin
|
||||||
|
sd-concepts-library/kawaii-colors
|
||||||
|
sd-concepts-library/kawaii-girl-plus-object
|
||||||
|
sd-concepts-library/kawaii-girl-plus-style
|
||||||
|
sd-concepts-library/kawaii-girl-plus-style-v1-1
|
||||||
|
sd-concepts-library/kay
|
||||||
|
sd-concepts-library/kaya-ghost-assasin
|
||||||
|
sd-concepts-library/ki
|
||||||
|
sd-concepts-library/kinda-sus
|
||||||
|
sd-concepts-library/kings-quest-agd
|
||||||
|
sd-concepts-library/kiora
|
||||||
|
sd-concepts-library/kira-sensei
|
||||||
|
sd-concepts-library/kirby
|
||||||
|
sd-concepts-library/klance
|
||||||
|
sd-concepts-library/kodakvision500t
|
||||||
|
sd-concepts-library/kogatan-shiny
|
||||||
|
sd-concepts-library/kogecha
|
||||||
|
sd-concepts-library/kojima-ayami
|
||||||
|
sd-concepts-library/koko-dog
|
||||||
|
sd-concepts-library/kuvshinov
|
||||||
|
sd-concepts-library/kysa-v-style
|
||||||
|
sd-concepts-library/laala-character
|
||||||
|
sd-concepts-library/larrette
|
||||||
|
sd-concepts-library/lavko
|
||||||
|
sd-concepts-library/lazytown-stephanie
|
||||||
|
sd-concepts-library/ldr
|
||||||
|
sd-concepts-library/ldrs
|
||||||
|
sd-concepts-library/led-toy
|
||||||
|
sd-concepts-library/lego-astronaut
|
||||||
|
sd-concepts-library/leica
|
||||||
|
sd-concepts-library/leif-jones
|
||||||
|
sd-concepts-library/lex
|
||||||
|
sd-concepts-library/liliana
|
||||||
|
sd-concepts-library/liliana-vess
|
||||||
|
sd-concepts-library/liminal-spaces-2-0
|
||||||
|
sd-concepts-library/liminalspaces
|
||||||
|
sd-concepts-library/line-art
|
||||||
|
sd-concepts-library/line-style
|
||||||
|
sd-concepts-library/linnopoke
|
||||||
|
sd-concepts-library/liquid-light
|
||||||
|
sd-concepts-library/liqwid-aquafarmer
|
||||||
|
sd-concepts-library/lizardman
|
||||||
|
sd-concepts-library/loab-character
|
||||||
|
sd-concepts-library/loab-style
|
||||||
|
sd-concepts-library/lofa
|
||||||
|
sd-concepts-library/logo-with-face-on-shield
|
||||||
|
sd-concepts-library/lolo
|
||||||
|
sd-concepts-library/looney-anime
|
||||||
|
sd-concepts-library/lost-rapper
|
||||||
|
sd-concepts-library/lphr-style
|
||||||
|
sd-concepts-library/lucario
|
||||||
|
sd-concepts-library/lucky-luke
|
||||||
|
sd-concepts-library/lugal-ki-en
|
||||||
|
sd-concepts-library/luinv2
|
||||||
|
sd-concepts-library/lula-13
|
||||||
|
sd-concepts-library/lumio
|
||||||
|
sd-concepts-library/lxj-o4
|
||||||
|
sd-concepts-library/m-geo
|
||||||
|
sd-concepts-library/m-geoo
|
||||||
|
sd-concepts-library/madhubani-art
|
||||||
|
sd-concepts-library/mafalda-character
|
||||||
|
sd-concepts-library/magic-pengel
|
||||||
|
sd-concepts-library/malika-favre-art-style
|
||||||
|
sd-concepts-library/manga-style
|
||||||
|
sd-concepts-library/marbling-art
|
||||||
|
sd-concepts-library/margo
|
||||||
|
sd-concepts-library/marty
|
||||||
|
sd-concepts-library/marty6
|
||||||
|
sd-concepts-library/mass
|
||||||
|
sd-concepts-library/masyanya
|
||||||
|
sd-concepts-library/masyunya
|
||||||
|
sd-concepts-library/mate
|
||||||
|
sd-concepts-library/matthew-stone
|
||||||
|
sd-concepts-library/mattvidpro
|
||||||
|
sd-concepts-library/maurice-quentin-de-la-tour-style
|
||||||
|
sd-concepts-library/maus
|
||||||
|
sd-concepts-library/max-foley
|
||||||
|
sd-concepts-library/mayor-richard-irvin
|
||||||
|
sd-concepts-library/mechasoulall
|
||||||
|
sd-concepts-library/medazzaland
|
||||||
|
sd-concepts-library/memnarch-mtg
|
||||||
|
sd-concepts-library/metagabe
|
||||||
|
sd-concepts-library/meyoco
|
||||||
|
sd-concepts-library/meze-audio-elite-headphones
|
||||||
|
sd-concepts-library/midjourney-style
|
||||||
|
sd-concepts-library/mikako-method
|
||||||
|
sd-concepts-library/mikako-methodi2i
|
||||||
|
sd-concepts-library/miko-3-robot
|
||||||
|
sd-concepts-library/milady
|
||||||
|
sd-concepts-library/mildemelwe-style
|
||||||
|
sd-concepts-library/million-live-akane-15k
|
||||||
|
sd-concepts-library/million-live-akane-3k
|
||||||
|
sd-concepts-library/million-live-akane-shifuku-3k
|
||||||
|
sd-concepts-library/million-live-spade-q-object-3k
|
||||||
|
sd-concepts-library/million-live-spade-q-style-3k
|
||||||
|
sd-concepts-library/minecraft-concept-art
|
||||||
|
sd-concepts-library/mishima-kurone
|
||||||
|
sd-concepts-library/mizkif
|
||||||
|
sd-concepts-library/moeb-style
|
||||||
|
sd-concepts-library/moebius
|
||||||
|
sd-concepts-library/mokoko
|
||||||
|
sd-concepts-library/mokoko-seed
|
||||||
|
sd-concepts-library/monster-girl
|
||||||
|
sd-concepts-library/monster-toy
|
||||||
|
sd-concepts-library/monte-novo
|
||||||
|
sd-concepts-library/moo-moo
|
||||||
|
sd-concepts-library/morino-hon-style
|
||||||
|
sd-concepts-library/moxxi
|
||||||
|
sd-concepts-library/msg
|
||||||
|
sd-concepts-library/mtg-card
|
||||||
|
sd-concepts-library/mtl-longsky
|
||||||
|
sd-concepts-library/mu-sadr
|
||||||
|
sd-concepts-library/munch-leaks-style
|
||||||
|
sd-concepts-library/museum-by-coop-himmelblau
|
||||||
|
sd-concepts-library/muxoyara
|
||||||
|
sd-concepts-library/my-hero-academia-style
|
||||||
|
sd-concepts-library/my-mug
|
||||||
|
sd-concepts-library/mycat
|
||||||
|
sd-concepts-library/mystical-nature
|
||||||
|
sd-concepts-library/naf
|
||||||
|
sd-concepts-library/nahiri
|
||||||
|
sd-concepts-library/namine-ritsu
|
||||||
|
sd-concepts-library/naoki-saito
|
||||||
|
sd-concepts-library/nard-style
|
||||||
|
sd-concepts-library/naruto
|
||||||
|
sd-concepts-library/natasha-johnston
|
||||||
|
sd-concepts-library/nathan-wyatt
|
||||||
|
sd-concepts-library/naval-portrait
|
||||||
|
sd-concepts-library/nazuna
|
||||||
|
sd-concepts-library/nebula
|
||||||
|
sd-concepts-library/ned-flanders
|
||||||
|
sd-concepts-library/neon-pastel
|
||||||
|
sd-concepts-library/new-priests
|
||||||
|
sd-concepts-library/nic-papercuts
|
||||||
|
sd-concepts-library/nikodim
|
||||||
|
sd-concepts-library/nissa-revane
|
||||||
|
sd-concepts-library/nixeu
|
||||||
|
sd-concepts-library/noggles
|
||||||
|
sd-concepts-library/nomad
|
||||||
|
sd-concepts-library/nouns-glasses
|
||||||
|
sd-concepts-library/obama-based-on-xi
|
||||||
|
sd-concepts-library/obama-self-2
|
||||||
|
sd-concepts-library/og-mox-style
|
||||||
|
sd-concepts-library/ohisashiburi-style
|
||||||
|
sd-concepts-library/oleg-kuvaev
|
||||||
|
sd-concepts-library/olli-olli
|
||||||
|
sd-concepts-library/on-kawara
|
||||||
|
sd-concepts-library/one-line-drawing
|
||||||
|
sd-concepts-library/onepunchman
|
||||||
|
sd-concepts-library/onzpo
|
||||||
|
sd-concepts-library/orangejacket
|
||||||
|
sd-concepts-library/ori
|
||||||
|
sd-concepts-library/ori-toor
|
||||||
|
sd-concepts-library/orientalist-art
|
||||||
|
sd-concepts-library/osaka-jyo
|
||||||
|
sd-concepts-library/osaka-jyo2
|
||||||
|
sd-concepts-library/osrsmini2
|
||||||
|
sd-concepts-library/osrstiny
|
||||||
|
sd-concepts-library/other-mother
|
||||||
|
sd-concepts-library/ouroboros
|
||||||
|
sd-concepts-library/outfit-items
|
||||||
|
sd-concepts-library/overprettified
|
||||||
|
sd-concepts-library/owl-house
|
||||||
|
sd-concepts-library/painted-by-silver-of-999
|
||||||
|
sd-concepts-library/painted-by-silver-of-999-2
|
||||||
|
sd-concepts-library/painted-student
|
||||||
|
sd-concepts-library/painting
|
||||||
|
sd-concepts-library/pantone-milk
|
||||||
|
sd-concepts-library/paolo-bonolis
|
||||||
|
sd-concepts-library/party-girl
|
||||||
|
sd-concepts-library/pascalsibertin
|
||||||
|
sd-concepts-library/pastelartstyle
|
||||||
|
sd-concepts-library/paul-noir
|
||||||
|
sd-concepts-library/pen-ink-portraits-bennorthen
|
||||||
|
sd-concepts-library/phan
|
||||||
|
sd-concepts-library/phan-s-collage
|
||||||
|
sd-concepts-library/phc
|
||||||
|
sd-concepts-library/phoenix-01
|
||||||
|
sd-concepts-library/pineda-david
|
||||||
|
sd-concepts-library/pink-beast-pastelae-style
|
||||||
|
sd-concepts-library/pintu
|
||||||
|
sd-concepts-library/pion-by-august-semionov
|
||||||
|
sd-concepts-library/piotr-jablonski
|
||||||
|
sd-concepts-library/pixel-mania
|
||||||
|
sd-concepts-library/pixel-toy
|
||||||
|
sd-concepts-library/pjablonski-style
|
||||||
|
sd-concepts-library/plant-style
|
||||||
|
sd-concepts-library/plen-ki-mun
|
||||||
|
sd-concepts-library/pokemon-conquest-sprites
|
||||||
|
sd-concepts-library/pool-test
|
||||||
|
sd-concepts-library/poolrooms
|
||||||
|
sd-concepts-library/poring-ragnarok-online
|
||||||
|
sd-concepts-library/poutine-dish
|
||||||
|
sd-concepts-library/princess-knight-art
|
||||||
|
sd-concepts-library/progress-chip
|
||||||
|
sd-concepts-library/puerquis-toy
|
||||||
|
sd-concepts-library/purplefishli
|
||||||
|
sd-concepts-library/pyramidheadcosplay
|
||||||
|
sd-concepts-library/qpt-atrium
|
||||||
|
sd-concepts-library/quiesel
|
||||||
|
sd-concepts-library/r-crumb-style
|
||||||
|
sd-concepts-library/rahkshi-bionicle
|
||||||
|
sd-concepts-library/raichu
|
||||||
|
sd-concepts-library/rail-scene
|
||||||
|
sd-concepts-library/rail-scene-style
|
||||||
|
sd-concepts-library/ralph-mcquarrie
|
||||||
|
sd-concepts-library/ransom
|
||||||
|
sd-concepts-library/rayne-weynolds
|
||||||
|
sd-concepts-library/rcrumb-portraits-style
|
||||||
|
sd-concepts-library/rd-chaos
|
||||||
|
sd-concepts-library/rd-paintings
|
||||||
|
sd-concepts-library/red-glasses
|
||||||
|
sd-concepts-library/reeducation-camp
|
||||||
|
sd-concepts-library/reksio-dog
|
||||||
|
sd-concepts-library/rektguy
|
||||||
|
sd-concepts-library/remert
|
||||||
|
sd-concepts-library/renalla
|
||||||
|
sd-concepts-library/repeat
|
||||||
|
sd-concepts-library/retro-girl
|
||||||
|
sd-concepts-library/retro-mecha-rangers
|
||||||
|
sd-concepts-library/retropixelart-pinguin
|
||||||
|
sd-concepts-library/rex-deno
|
||||||
|
sd-concepts-library/rhizomuse-machine-bionic-sculpture
|
||||||
|
sd-concepts-library/ricar
|
||||||
|
sd-concepts-library/rickyart
|
||||||
|
sd-concepts-library/rico-face
|
||||||
|
sd-concepts-library/riker-doll
|
||||||
|
sd-concepts-library/rikiart
|
||||||
|
sd-concepts-library/rikiboy-art
|
||||||
|
sd-concepts-library/rilakkuma
|
||||||
|
sd-concepts-library/rishusei-style
|
||||||
|
sd-concepts-library/rj-palmer
|
||||||
|
sd-concepts-library/rl-pkmn-test
|
||||||
|
sd-concepts-library/road-to-ruin
|
||||||
|
sd-concepts-library/robertnava
|
||||||
|
sd-concepts-library/roblox-avatar
|
||||||
|
sd-concepts-library/roy-lichtenstein
|
||||||
|
sd-concepts-library/ruan-jia
|
||||||
|
sd-concepts-library/russian
|
||||||
|
sd-concepts-library/s1m-naoto-ohshima
|
||||||
|
sd-concepts-library/saheeli-rai
|
||||||
|
sd-concepts-library/sakimi-style
|
||||||
|
sd-concepts-library/salmonid
|
||||||
|
sd-concepts-library/sam-yang
|
||||||
|
sd-concepts-library/sanguo-guanyu
|
||||||
|
sd-concepts-library/sas-style
|
||||||
|
sd-concepts-library/scarlet-witch
|
||||||
|
sd-concepts-library/schloss-mosigkau
|
||||||
|
sd-concepts-library/scrap-style
|
||||||
|
sd-concepts-library/scratch-project
|
||||||
|
sd-concepts-library/sculptural-style
|
||||||
|
sd-concepts-library/sd-concepts-library-uma-meme
|
||||||
|
sd-concepts-library/seamless-ground
|
||||||
|
sd-concepts-library/selezneva-alisa
|
||||||
|
sd-concepts-library/sem-mac2n
|
||||||
|
sd-concepts-library/senneca
|
||||||
|
sd-concepts-library/seraphimmoonshadow-art
|
||||||
|
sd-concepts-library/sewerslvt
|
||||||
|
sd-concepts-library/she-hulk-law-art
|
||||||
|
sd-concepts-library/she-mask
|
||||||
|
sd-concepts-library/sherhook-painting
|
||||||
|
sd-concepts-library/sherhook-painting-v2
|
||||||
|
sd-concepts-library/shev-linocut
|
||||||
|
sd-concepts-library/shigure-ui-style
|
||||||
|
sd-concepts-library/shiny-polyman
|
||||||
|
sd-concepts-library/shrunken-head
|
||||||
|
sd-concepts-library/shu-doll
|
||||||
|
sd-concepts-library/shvoren-style
|
||||||
|
sd-concepts-library/sims-2-portrait
|
||||||
|
sd-concepts-library/singsing
|
||||||
|
sd-concepts-library/singsing-doll
|
||||||
|
sd-concepts-library/sintez-ico
|
||||||
|
sd-concepts-library/skyfalls
|
||||||
|
sd-concepts-library/slm
|
||||||
|
sd-concepts-library/smarties
|
||||||
|
sd-concepts-library/smiling-friend-style
|
||||||
|
sd-concepts-library/smooth-pencils
|
||||||
|
sd-concepts-library/smurf-style
|
||||||
|
sd-concepts-library/smw-map
|
||||||
|
sd-concepts-library/society-finch
|
||||||
|
sd-concepts-library/sorami-style
|
||||||
|
sd-concepts-library/spider-gwen
|
||||||
|
sd-concepts-library/spritual-monsters
|
||||||
|
sd-concepts-library/stable-diffusion-conceptualizer
|
||||||
|
sd-concepts-library/star-tours-posters
|
||||||
|
sd-concepts-library/stardew-valley-pixel-art
|
||||||
|
sd-concepts-library/starhavenmachinegods
|
||||||
|
sd-concepts-library/sterling-archer
|
||||||
|
sd-concepts-library/stretch-re1-robot
|
||||||
|
sd-concepts-library/stuffed-penguin-toy
|
||||||
|
sd-concepts-library/style-of-marc-allante
|
||||||
|
sd-concepts-library/summie-style
|
||||||
|
sd-concepts-library/sunfish
|
||||||
|
sd-concepts-library/super-nintendo-cartridge
|
||||||
|
sd-concepts-library/supitcha-mask
|
||||||
|
sd-concepts-library/sushi-pixel
|
||||||
|
sd-concepts-library/swamp-choe-2
|
||||||
|
sd-concepts-library/t-skrang
|
||||||
|
sd-concepts-library/takuji-kawano
|
||||||
|
sd-concepts-library/tamiyo
|
||||||
|
sd-concepts-library/tangles
|
||||||
|
sd-concepts-library/tb303
|
||||||
|
sd-concepts-library/tcirle
|
||||||
|
sd-concepts-library/teelip-ir-landscape
|
||||||
|
sd-concepts-library/teferi
|
||||||
|
sd-concepts-library/tela-lenca
|
||||||
|
sd-concepts-library/tela-lenca2
|
||||||
|
sd-concepts-library/terraria-style
|
||||||
|
sd-concepts-library/tesla-bot
|
||||||
|
sd-concepts-library/test
|
||||||
|
sd-concepts-library/test-epson
|
||||||
|
sd-concepts-library/test2
|
||||||
|
sd-concepts-library/testing
|
||||||
|
sd-concepts-library/thalasin
|
||||||
|
sd-concepts-library/thegeneral
|
||||||
|
sd-concepts-library/thorneworks
|
||||||
|
sd-concepts-library/threestooges
|
||||||
|
sd-concepts-library/thunderdome-cover
|
||||||
|
sd-concepts-library/thunderdome-covers
|
||||||
|
sd-concepts-library/ti-junglepunk-v0
|
||||||
|
sd-concepts-library/tili-concept
|
||||||
|
sd-concepts-library/titan-robot
|
||||||
|
sd-concepts-library/tnj
|
||||||
|
sd-concepts-library/toho-pixel
|
||||||
|
sd-concepts-library/tomcat
|
||||||
|
sd-concepts-library/tonal1
|
||||||
|
sd-concepts-library/tony-diterlizzi-s-planescape-art
|
||||||
|
sd-concepts-library/towerplace
|
||||||
|
sd-concepts-library/toy
|
||||||
|
sd-concepts-library/toy-bonnie-plush
|
||||||
|
sd-concepts-library/toyota-sera
|
||||||
|
sd-concepts-library/transmutation-circles
|
||||||
|
sd-concepts-library/trash-polka-artstyle
|
||||||
|
sd-concepts-library/travis-bedel
|
||||||
|
sd-concepts-library/trigger-studio
|
||||||
|
sd-concepts-library/trust-support
|
||||||
|
sd-concepts-library/trypophobia
|
||||||
|
sd-concepts-library/ttte
|
||||||
|
sd-concepts-library/tubby
|
||||||
|
sd-concepts-library/tubby-cats
|
||||||
|
sd-concepts-library/tudisco
|
||||||
|
sd-concepts-library/turtlepics
|
||||||
|
sd-concepts-library/type
|
||||||
|
sd-concepts-library/ugly-sonic
|
||||||
|
sd-concepts-library/uliana-kudinova
|
||||||
|
sd-concepts-library/uma
|
||||||
|
sd-concepts-library/uma-clean-object
|
||||||
|
sd-concepts-library/uma-meme
|
||||||
|
sd-concepts-library/uma-meme-style
|
||||||
|
sd-concepts-library/uma-style-classic
|
||||||
|
sd-concepts-library/unfinished-building
|
||||||
|
sd-concepts-library/urivoldemort
|
||||||
|
sd-concepts-library/uzumaki
|
||||||
|
sd-concepts-library/valorantstyle
|
||||||
|
sd-concepts-library/vb-mox
|
||||||
|
sd-concepts-library/vcr-classique
|
||||||
|
sd-concepts-library/venice
|
||||||
|
sd-concepts-library/vespertine
|
||||||
|
sd-concepts-library/victor-narm
|
||||||
|
sd-concepts-library/vietstoneking
|
||||||
|
sd-concepts-library/vivien-reid
|
||||||
|
sd-concepts-library/vkuoo1
|
||||||
|
sd-concepts-library/vraska
|
||||||
|
sd-concepts-library/w3u
|
||||||
|
sd-concepts-library/walter-wick-photography
|
||||||
|
sd-concepts-library/warhammer-40k-drawing-style
|
||||||
|
sd-concepts-library/waterfallshadow
|
||||||
|
sd-concepts-library/wayne-reynolds-character
|
||||||
|
sd-concepts-library/wedding
|
||||||
|
sd-concepts-library/wedding-HandPainted
|
||||||
|
sd-concepts-library/werebloops
|
||||||
|
sd-concepts-library/wheatland
|
||||||
|
sd-concepts-library/wheatland-arknight
|
||||||
|
sd-concepts-library/wheelchair
|
||||||
|
sd-concepts-library/wildkat
|
||||||
|
sd-concepts-library/willy-hd
|
||||||
|
sd-concepts-library/wire-angels
|
||||||
|
sd-concepts-library/wish-artist-stile
|
||||||
|
sd-concepts-library/wlop-style
|
||||||
|
sd-concepts-library/wojak
|
||||||
|
sd-concepts-library/wojaks-now
|
||||||
|
sd-concepts-library/wojaks-now-now-now
|
||||||
|
sd-concepts-library/xatu
|
||||||
|
sd-concepts-library/xatu2
|
||||||
|
sd-concepts-library/xbh
|
||||||
|
sd-concepts-library/xi
|
||||||
|
sd-concepts-library/xidiversity
|
||||||
|
sd-concepts-library/xioboma
|
||||||
|
sd-concepts-library/xuna
|
||||||
|
sd-concepts-library/xyz
|
||||||
|
sd-concepts-library/yb-anime
|
||||||
|
sd-concepts-library/yerba-mate
|
||||||
|
sd-concepts-library/yesdelete
|
||||||
|
sd-concepts-library/yf21
|
||||||
|
sd-concepts-library/yilanov2
|
||||||
|
sd-concepts-library/yinit
|
||||||
|
sd-concepts-library/yoji-shinkawa-style
|
||||||
|
sd-concepts-library/yolandi-visser
|
||||||
|
sd-concepts-library/yoshi
|
||||||
|
sd-concepts-library/youpi2
|
||||||
|
sd-concepts-library/youtooz-candy
|
||||||
|
sd-concepts-library/yuji-himukai-style
|
||||||
|
sd-concepts-library/zaney
|
||||||
|
sd-concepts-library/zaneypixelz
|
||||||
|
sd-concepts-library/zdenek-art
|
||||||
|
sd-concepts-library/zero
|
||||||
|
sd-concepts-library/zero-bottle
|
||||||
|
sd-concepts-library/zero-suit-samus
|
||||||
|
sd-concepts-library/zillertal-can
|
||||||
|
sd-concepts-library/zizigooloo
|
||||||
|
sd-concepts-library/zk
|
||||||
|
sd-concepts-library/zoroark
|
||||||
@@ -107,4 +107,4 @@ lightning:
|
|||||||
benchmark: True
|
benchmark: True
|
||||||
max_steps: 4000000
|
max_steps: 4000000
|
||||||
# max_steps: 4000
|
# max_steps: 4000
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ model:
|
|||||||
placeholder_strings: ["*"]
|
placeholder_strings: ["*"]
|
||||||
initializer_words: ['sculpture']
|
initializer_words: ['sculpture']
|
||||||
per_image_tokens: false
|
per_image_tokens: false
|
||||||
num_vectors_per_token: 1
|
num_vectors_per_token: 8
|
||||||
progressive_words: False
|
progressive_words: False
|
||||||
|
|
||||||
unet_config:
|
unet_config:
|
||||||
@@ -107,4 +107,4 @@ lightning:
|
|||||||
benchmark: False
|
benchmark: False
|
||||||
max_steps: 6200
|
max_steps: 6200
|
||||||
# max_steps: 4000
|
# max_steps: 4000
|
||||||
|
|
||||||