Compare commits
419 Commits
2.1.3-rc2
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
971f5c5ab1 | |||
22133392b2 | |||
5e81f51f6a | |||
9fae65ed69 | |||
2443e5dc01 | |||
a9aa4e45aa | |||
9b6b27a156 | |||
b68074bb8f | |||
1f8e56672c | |||
f8708f5dbe | |||
103efea641 | |||
b60edab0fa | |||
6bc11bfd3f | |||
5897e511f1 | |||
f43b767b87 | |||
61cc41aa3f | |||
40c3ab0181 | |||
8999a5564b | |||
8423be539b | |||
6cc56043e2 | |||
62cda009dd | |||
45e51bac9a | |||
a514f9b236 | |||
90b21db86c | |||
bc44ab786c | |||
281a2e3ecb | |||
84cd96decf | |||
a3121b8137 | |||
3f6d0fb7da | |||
08ef4d62e9 | |||
81cb7fd1b7 | |||
7c658c6d76 | |||
495104e941 | |||
1e1f871ee1 | |||
30c5a0b067 | |||
9f02595ef2 | |||
b101334b4e | |||
0608d259dd | |||
12eff0dd42 | |||
939164eaa7 | |||
f2d2a49977 | |||
37535f5897 | |||
e5646dee27 | |||
d5011efaa1 | |||
74487a95a9 | |||
a50f4da9d1 | |||
4ae1df5b5e | |||
7f3ba16cd2 | |||
7a0438586c | |||
9adaf8f8ad | |||
a341297b0c | |||
9e0504abe5 | |||
3131edb255 | |||
b0697bc4ff | |||
1e9121c8d6 | |||
916e795c26 | |||
3aebe754fa | |||
3f0cfaac4a | |||
a3a0a87f55 | |||
f5e8ffe7b4 | |||
404d81f6fd | |||
c7864f8a6d | |||
9568ac66e0 | |||
d4280bbaaa | |||
46a5fd67ed | |||
b93336dbf9 | |||
9fe9301762 | |||
7f1b95fbda | |||
52c79fa097 | |||
62ac725ba9 | |||
db188cd3c3 | |||
e67ef4aec2 | |||
473869b8ed | |||
c8c1b3e217 | |||
fcd3ef1f98 | |||
a7f11a8c09 | |||
318426b67a | |||
6f3e99efc3 | |||
7515bcfe78 | |||
8d0ef022eb | |||
9f1c1cf2e6 | |||
d44112c209 | |||
b31f90c0bd | |||
344cdf0ade | |||
500bde5b0e | |||
df03927ec6 | |||
419f670f86 | |||
30dc9220c1 | |||
941d427302 | |||
876ae7f70f | |||
a86049f822 | |||
ec3d25d778 | |||
69a4a6fec5 | |||
7b76b79887 | |||
3ea732365c | |||
dc5d696ed2 | |||
0060551490 | |||
2fcc7d9b36 | |||
78217f5ef9 | |||
c6112e3295 | |||
8b08af714d | |||
723dcf4236 | |||
ddfd82559f | |||
8488575e5c | |||
7e4e51b224 | |||
f3b7316683 | |||
25b19b9ab8 | |||
9a6a970771 | |||
93de78b6e8 | |||
00da042dab | |||
6445e802f6 | |||
7caf20aad3 | |||
11969c2e2e | |||
e821b97cfc | |||
ef1dbdb33d | |||
0cdb7bb0cd | |||
306ed44e19 | |||
b0810e1ed7 | |||
089c85a017 | |||
a1d80fd106 | |||
d9c7a28c90 | |||
c787a3a801 | |||
1f772e4bdc | |||
cb7458db77 | |||
ef482b4d3e | |||
3e22160462 | |||
6a3d725dbb | |||
8a16c8a196 | |||
90eaac5134 | |||
896c2532c7 | |||
f68702520b | |||
286e46aaa3 | |||
088fd97418 | |||
e1e978b423 | |||
d27d92325d | |||
80f6f9a931 | |||
7dff8ccd31 | |||
3f6b275bec | |||
5ed6a31b97 | |||
b72b61b790 | |||
b81231823e | |||
c7c6940e1a | |||
6c33d1356d | |||
f08c78a043 | |||
b6dd5b664c | |||
76e7e82f5e | |||
d4376ed240 | |||
9d34213b4c | |||
b908f2b4bc | |||
9418324030 | |||
0f6856b719 | |||
83d8e69219 | |||
7f999e9dfc | |||
0c3ae232af | |||
9950790f4c | |||
b50a1eb63f | |||
d55b1e169c | |||
1071a12777 | |||
d987d0a336 | |||
50a67a7172 | |||
a3308c853d | |||
cde395e02f | |||
e7f670a5b6 | |||
917c576ddb | |||
dfc0c587b1 | |||
548bcaceb2 | |||
5fd43fca13 | |||
37a356d377 | |||
cccbfb12aa | |||
d018b2d7a7 | |||
e358adecdd | |||
cdc5f66592 | |||
b8cebf29f2 | |||
68aebad7ad | |||
ae4a44de3e | |||
2ab868314f | |||
bc46c46835 | |||
d82a21cfb2 | |||
87439feeb2 | |||
e5951ad098 | |||
4f51680307 | |||
d0ceabd372 | |||
2bda3d6d2f | |||
a96af7a15d | |||
93192b90f4 | |||
024acf42af | |||
04cb2d39cb | |||
c69573e65d | |||
84f702b6d0 | |||
bb70c32ad5 | |||
425a1713ab | |||
70e67c45dd | |||
07ca0876ec | |||
aa96a457b6 | |||
e28599cadb | |||
ae6dd219d9 | |||
19322fc1ec | |||
635e7da05d | |||
c0005eb063 | |||
74485411a8 | |||
ed70fc683c | |||
425d3bc95d | |||
3994c28b77 | |||
0100a63b59 | |||
432dc704a6 | |||
1d540219fa | |||
827f516baf | |||
48ad0c289c | |||
223e0529ba | |||
98e3bbb3bd | |||
e3efcc620c | |||
15dd1339d2 | |||
caf8f0ae35 | |||
cfb87bc116 | |||
c0ad1b3469 | |||
4382cd0b91 | |||
b049bbc64e | |||
34395ff490 | |||
1bc1085542 | |||
d7884432c9 | |||
82f6402d04 | |||
0e7b735611 | |||
5304ef504c | |||
17b295871f | |||
70dcfa1684 | |||
5d484273ed | |||
179656d541 | |||
73099af6ec | |||
c223d93b4d | |||
4e34194479 | |||
00e2674076 | |||
0a2e67df1a | |||
7831468304 | |||
88d02585e7 | |||
f82e82f1bb | |||
317762861f | |||
3f1360368d | |||
d5467e7db5 | |||
9284983429 | |||
bb79c78fe8 | |||
e3735ebb45 | |||
eb17dfdeaa | |||
1114ac97e2 | |||
c7ef41af54 | |||
7075a17091 | |||
7f0fb47cf3 | |||
775f032c56 | |||
5410d42da0 | |||
e21e901fa2 | |||
00385240e7 | |||
0a96d2a888 | |||
016551e036 | |||
b8bb46042c | |||
b44e9c7752 | |||
8ed10c732b | |||
82a53782d0 | |||
6adebf065f | |||
83f369053f | |||
77d3839860 | |||
c02a0da837 | |||
4f4c6bbe33 | |||
72ea5453ce | |||
458081f9c9 | |||
d1fbe81a60 | |||
6c7191712f | |||
248068fe5d | |||
9b281856ee | |||
fdf41cc739 | |||
d079445943 | |||
a997ab2cf6 | |||
e98068a546 | |||
b945ae4e01 | |||
b23c471cf0 | |||
964e584bd3 | |||
461358bdde | |||
2433cc344a | |||
bd2eea1c70 | |||
16df759499 | |||
5a1a36ec29 | |||
c76badfb08 | |||
71c4f401b0 | |||
c59b9897d9 | |||
4cf1c856ed | |||
a78a1020be | |||
90cb7a6442 | |||
8f5cded86e | |||
02d02a86b1 | |||
ba9c695463 | |||
8202f34f38 | |||
40a7f47d22 | |||
37bcf9cc47 | |||
0340d9ad53 | |||
0d35a67e9c | |||
1260e28d94 | |||
229f782e3b | |||
c15b839dd4 | |||
a095214e52 | |||
8e81425e89 | |||
c5cbe8f87d | |||
e0581a2c37 | |||
32f538bf3a | |||
3c5a14a814 | |||
0661256b61 | |||
602e35db65 | |||
bc7ece771d | |||
38bdb440d0 | |||
ce8c2bea2f | |||
3ac0f11e97 | |||
98fe49cb55 | |||
2b7e3abe57 | |||
150c4a5d2d | |||
0381a853b5 | |||
c79ec204ec | |||
8d3b1582a5 | |||
5fd7d71a7a | |||
19e2cff18c | |||
1f0220697b | |||
18ae3949ef | |||
aa95510444 | |||
f33df25830 | |||
3a5a8ceba5 | |||
a1e5f17d1e | |||
303431be89 | |||
8e9f80cc97 | |||
3ad598761c | |||
b4eaf8b751 | |||
fa608efa11 | |||
e9d319bfde | |||
561721aef7 | |||
891c0f21d5 | |||
8973ce7d47 | |||
51c283ba56 | |||
7d262fc158 | |||
fdb16000ab | |||
f62cc7db9d | |||
9fa3e28dd4 | |||
9200b26f21 | |||
d998b2f806 | |||
ac8a7ff70b | |||
2d6e0baa87 | |||
58f65d49b6 | |||
c212b74990 | |||
0352979a8b | |||
70bd61d616 | |||
f2a6985c78 | |||
fe5a581313 | |||
2ec9792f50 | |||
a4204abfce | |||
274b276133 | |||
7707bc7818 | |||
e5edd025d6 | |||
4c035ad4ae | |||
e9090bca8f | |||
398a9bc0c6 | |||
38b9658c15 | |||
29e229b409 | |||
f04d1bab21 | |||
c23efb8e2b | |||
5604d3c447 | |||
93cdb476d9 | |||
206101f59d | |||
1305e7a56c | |||
58edf262e4 | |||
23348dcd3f | |||
9bf6013fdd | |||
fd67df9447 | |||
1d11e06e6f | |||
45e5053d06 | |||
9c5999ede1 | |||
7ddf7f0b7d | |||
47e6f94111 | |||
810fad9e06 | |||
b8de5244b1 | |||
853c6af623 | |||
72e011a4e4 | |||
98db0d746c | |||
1a8e007066 | |||
1b6bbfb4db | |||
67e25624b9 | |||
9c218788e2 | |||
bb084a844b | |||
0a88243911 | |||
8a0a90d0f3 | |||
9141132a5c | |||
78f7bef1a3 | |||
1fb7b50be7 | |||
b57c81ab38 | |||
af040e97af | |||
8dc7f119e5 | |||
4b4111a802 | |||
832f183320 | |||
8aa94d5774 | |||
48aa6416dc | |||
47ddda1f64 | |||
c248ae44d4 | |||
9e4545b2fc | |||
8cf3883adc | |||
e06a6ed4c8 | |||
12a33f6e2d | |||
6d9638ba31 | |||
c54eb00055 | |||
72338506ed | |||
78c1d07c4b | |||
143b18af8a | |||
9d39d6ecb3 | |||
9686bf0ea8 | |||
7aa7be6b24 | |||
443c9110f1 | |||
ae0ce82609 | |||
f1982cb6d8 | |||
af62958323 | |||
9342ad8d97 | |||
5214742d02 | |||
178f0c78d8 | |||
2487040ae3 | |||
5606af5083 | |||
4b5a96501d | |||
ededeaed86 | |||
21961f0c32 |
@ -1,3 +1,12 @@
|
||||
*
|
||||
!environment*.yml
|
||||
!docker-build
|
||||
!backend
|
||||
!configs
|
||||
!environments-and-requirements
|
||||
!frontend
|
||||
!installer
|
||||
!ldm
|
||||
!main.py
|
||||
!scripts
|
||||
!server
|
||||
!static
|
||||
!setup.py
|
||||
|
12
.editorconfig
Normal file
@ -0,0 +1,12 @@
|
||||
# All files
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# Python
|
||||
[*.py]
|
||||
indent_size = 4
|
3
.github/CODEOWNERS
vendored
@ -2,3 +2,6 @@ ldm/invoke/pngwriter.py @CapableWeb
|
||||
ldm/invoke/server_legacy.py @CapableWeb
|
||||
scripts/legacy_api.py @CapableWeb
|
||||
tests/legacy_tests.sh @CapableWeb
|
||||
installer/ @tildebyte
|
||||
.github/workflows/ @mauwii
|
||||
docker_build/ @mauwii
|
||||
|
19
.github/workflows/build-container.yml
vendored
@ -6,6 +6,7 @@ on:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'development'
|
||||
- 'update-dockerfile'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
@ -15,13 +16,11 @@ jobs:
|
||||
arch:
|
||||
- x86_64
|
||||
- aarch64
|
||||
include:
|
||||
- arch: x86_64
|
||||
conda-env-file: environment-lin-cuda.yml
|
||||
- arch: aarch64
|
||||
conda-env-file: environment-lin-aarch64.yml
|
||||
pip-requirements:
|
||||
- requirements-lin-amd.txt
|
||||
- requirements-lin-cuda.txt
|
||||
runs-on: ubuntu-latest
|
||||
name: ${{ matrix.arch }}
|
||||
name: ${{ matrix.pip-requirements }} ${{ matrix.arch }}
|
||||
steps:
|
||||
- name: prepare docker-tag
|
||||
env:
|
||||
@ -40,9 +39,5 @@ jobs:
|
||||
file: docker-build/Dockerfile
|
||||
platforms: Linux/${{ matrix.arch }}
|
||||
push: false
|
||||
tags: ${{ env.dockertag }}:${{ matrix.arch }}
|
||||
build-args: |
|
||||
conda_env_file=${{ matrix.conda-env-file }}
|
||||
conda_version=py39_4.12.0-Linux-${{ matrix.arch }}
|
||||
invokeai_git=${{ github.repository }}
|
||||
invokeai_branch=${{ github.ref_name }}
|
||||
tags: ${{ env.dockertag }}:${{ matrix.pip-requirements }}-${{ matrix.arch }}
|
||||
build-args: pip_requirements=${{ matrix.pip-requirements }}
|
||||
|
2
.github/workflows/mkdocs-material.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
- name: install requirements
|
||||
run: |
|
||||
python -m \
|
||||
pip install -r requirements-mkdocs.txt
|
||||
pip install -r docs/requirements-mkdocs.txt
|
||||
|
||||
- name: confirm buildability
|
||||
run: |
|
||||
|
77
.github/workflows/test-invoke-conda.yml
vendored
@ -13,31 +13,32 @@ on:
|
||||
jobs:
|
||||
matrix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stable-diffusion-model:
|
||||
# - 'https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt'
|
||||
- 'https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt'
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-12
|
||||
- 'stable-diffusion-1.5'
|
||||
environment-yaml:
|
||||
- environment-lin-amd.yml
|
||||
- environment-lin-cuda.yml
|
||||
- environment-mac.yml
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
environment-file: environment-lin-cuda.yml
|
||||
- environment-yaml: environment-lin-amd.yml
|
||||
os: ubuntu-latest
|
||||
default-shell: bash -l {0}
|
||||
- os: macOS-12
|
||||
environment-file: environment-mac.yml
|
||||
- environment-yaml: environment-lin-cuda.yml
|
||||
os: ubuntu-latest
|
||||
default-shell: bash -l {0}
|
||||
# - stable-diffusion-model: https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt
|
||||
# stable-diffusion-model-dl-path: models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
|
||||
# stable-diffusion-model-switch: stable-diffusion-1.4
|
||||
- stable-diffusion-model: 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/v1-5-pruned-emaonly.ckpt
|
||||
stable-diffusion-model-switch: stable-diffusion-1.5
|
||||
name: ${{ matrix.os }} with ${{ matrix.stable-diffusion-model-switch }}
|
||||
- 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 }}
|
||||
@ -47,17 +48,19 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: create models.yaml from example
|
||||
run: cp configs/models.yaml.example configs/models.yaml
|
||||
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-file }} 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-file) }}
|
||||
key: conda-pkgs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(matrix.environment-yaml) }}
|
||||
|
||||
- name: Activate Conda Env
|
||||
id: activate-conda-env
|
||||
@ -83,34 +86,40 @@ jobs:
|
||||
id: cache-sd-model
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-${{ matrix.stable-diffusion-model-switch }}
|
||||
cache-name: cache-${{ matrix.stable-diffusion-model }}
|
||||
with:
|
||||
path: ${{ matrix.stable-diffusion-model-dl-path }}
|
||||
path: ${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}
|
||||
key: ${{ env.cache-name }}
|
||||
|
||||
- name: Download ${{ matrix.stable-diffusion-model-switch }}
|
||||
- name: Download ${{ matrix.stable-diffusion-model }}
|
||||
id: download-stable-diffusion-model
|
||||
if: ${{ steps.cache-sd-model.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
[[ -d models/ldm/stable-diffusion-v1 ]] \
|
||||
|| mkdir -p models/ldm/stable-diffusion-v1
|
||||
mkdir -p "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}"
|
||||
curl \
|
||||
-H "Authorization: Bearer ${{ secrets.HUGGINGFACE_TOKEN }}" \
|
||||
-o ${{ matrix.stable-diffusion-model-dl-path }} \
|
||||
-L ${{ matrix.stable-diffusion-model }}
|
||||
-o "${{ env.INVOKEAI_ROOT }}/${{ matrix.stable-diffusion-model-dl-path }}/${{ matrix.stable-diffusion-model-dl-name }}" \
|
||||
-L ${{ matrix.stable-diffusion-model-url }}
|
||||
|
||||
- name: run preload_models.py
|
||||
- name: run configure_invokeai.py
|
||||
id: run-preload-models
|
||||
run: |
|
||||
python scripts/preload_models.py \
|
||||
--no-interactive
|
||||
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 \
|
||||
--model ${{ matrix.stable-diffusion-model-switch }} \
|
||||
--from_file ${{ env.TEST_PROMPTS }}
|
||||
--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
|
||||
@ -122,5 +131,5 @@ jobs:
|
||||
id: archive-results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: results_${{ matrix.os }}_${{ matrix.stable-diffusion-model-switch }}
|
||||
path: outputs/img-samples
|
||||
name: results_${{ matrix.requirements-file }}_${{ matrix.python-version }}
|
||||
path: ${{ env.INVOKEAI_ROOT }}/outputs
|
||||
|
128
.github/workflows/test-invoke-pip.yml
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
name: Test invoke.py pip
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'development'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'development'
|
||||
|
||||
jobs:
|
||||
matrix:
|
||||
strategy:
|
||||
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:
|
||||
# - '3.9'
|
||||
- '3.10'
|
||||
include:
|
||||
- requirements-file: requirements-lin-cuda.txt
|
||||
os: ubuntu-latest
|
||||
default-shell: bash -l {0}
|
||||
- requirements-file: requirements-lin-amd.txt
|
||||
os: ubuntu-latest
|
||||
default-shell: bash -l {0}
|
||||
- requirements-file: requirements-mac-mps-cpu.txt
|
||||
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.requirements-file }} on ${{ matrix.python-version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.default-shell }}
|
||||
env:
|
||||
INVOKEAI_ROOT: '${{ github.workspace }}/invokeai'
|
||||
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: 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: create requirements.txt
|
||||
run: cp 'environments-and-requirements/${{ matrix.requirements-file }}' '${{ matrix.requirements-file }}'
|
||||
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: ${{ matrix.requirements-file }}
|
||||
|
||||
# - 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:
|
||||
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: |
|
||||
${{ env.pythonLocation }}/bin/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 ${{ env.pythonLocation }}/bin/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: Archive results
|
||||
id: archive-results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: results_${{ matrix.requirements-file }}_${{ matrix.python-version }}
|
||||
path: ${{ env.INVOKEAI_ROOT }}/outputs
|
17
.gitignore
vendored
@ -194,10 +194,6 @@ checkpoints
|
||||
|
||||
# Let the frontend manage its own gitignore
|
||||
!frontend/*
|
||||
frontend/apt-get
|
||||
frontend/dist
|
||||
frontend/sudo
|
||||
frontend/update
|
||||
|
||||
# Scratch folder
|
||||
.scratch/
|
||||
@ -218,12 +214,23 @@ models/clipseg
|
||||
models/gfpgan
|
||||
|
||||
# ignore initfile
|
||||
invokeai.init
|
||||
.invokeai
|
||||
|
||||
# ignore environment.yml and requirements.txt
|
||||
# these are links to the real files in environments-and-requirements
|
||||
environment.yml
|
||||
requirements.txt
|
||||
|
||||
# source installer files
|
||||
source_installer/*zip
|
||||
source_installer/invokeAI
|
||||
install.bat
|
||||
install.sh
|
||||
update.bat
|
||||
update.sh
|
||||
|
||||
# this may be present if the user created a venv
|
||||
invokeai
|
||||
|
||||
# no longer stored in source directory
|
||||
models
|
@ -1,11 +0,0 @@
|
||||
InvokeAI
|
||||
|
||||
Project homepage: https://github.com/invoke-ai/InvokeAI
|
||||
|
||||
Installation on Windows:
|
||||
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.
|
128
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior
|
||||
may be reported to the community leaders responsible for enforcement
|
||||
at https://github.com/invoke-ai/InvokeAI/issues. All complaints will
|
||||
be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
85
InvokeAI_Statement_of_Values.md
Normal file
@ -0,0 +1,85 @@
|
||||
<img src="docs/assets/invoke_ai_banner.png" align="center">
|
||||
|
||||
Invoke-AI is a community of software developers, researchers, and user
|
||||
interface experts who have come together on a voluntary basis to build
|
||||
software tools which support cutting edge AI text-to-image
|
||||
applications. This community is open to anyone who wishes to
|
||||
contribute to the effort and has the skill and time to do so.
|
||||
|
||||
# Our Values
|
||||
|
||||
The InvokeAI team is a diverse community which includes individuals
|
||||
from various parts of the world and many walks of life. Despite our
|
||||
differences, we share a number of core values which we ask prospective
|
||||
contributors to understand and respect. We believe:
|
||||
|
||||
1. That Open Source Software is a positive force in the world. We
|
||||
create software that can be used, reused, and redistributed, without
|
||||
restrictions, under a straightforward Open Source license (MIT). We
|
||||
believe that Open Source benefits society as a whole by increasing the
|
||||
availability of high quality software to all.
|
||||
|
||||
2. That those who create software should receive proper attribution
|
||||
for their creative work. While we support the exchange and reuse of
|
||||
Open Source Software, we feel strongly that the original authors of a
|
||||
piece of code should receive credit for their contribution, and we
|
||||
endeavor to do so whenever possible.
|
||||
|
||||
3. That there is moral ambiguity surrounding AI-assisted art. We are
|
||||
aware of the moral and ethical issues surrounding the release of the
|
||||
Stable Diffusion model and similar products. We are aware that, due to
|
||||
the composition of their training sets, current AI-generated image
|
||||
models are biased against certain ethnic groups, cultural concepts of
|
||||
beauty, ethnic stereotypes, and gender roles.
|
||||
|
||||
1. We recognize the potential for harm to these groups that these biases
|
||||
represent and trust that future AI models will take steps towards
|
||||
reducing or eliminating the biases noted above, respect and give due
|
||||
credit to the artists whose work is sourced, and call on developers
|
||||
and users to favor these models over the older ones as they become
|
||||
available.
|
||||
|
||||
4. We are deeply committed to ensuring that this technology benefits
|
||||
everyone, including artists. We see AI art not as a replacement for
|
||||
the artist, but rather as a tool to empower them. With that
|
||||
in mind, we are constantly debating how to build systems that put
|
||||
artists’ needs first: tools which can be readily integrated into an
|
||||
artist’s existing workflows and practices, enhancing their work and
|
||||
helping them to push it further. Every decision we take as a team,
|
||||
which includes several artists, aims to build towards that goal.
|
||||
|
||||
5. That artificial intelligence can be a force for good in the world,
|
||||
but must be used responsibly. Artificial intelligence technologies
|
||||
have the potential to improve society, in everything from cancer care,
|
||||
to customer service, to creative writing.
|
||||
|
||||
1. While we do not believe that software should arbitrarily limit what
|
||||
users can do with it, we recognize that when used irresponsibly, AI
|
||||
has the potential to do much harm. Our Discord server is actively
|
||||
moderated in order to minimize the potential of harm from
|
||||
user-contributed images. In addition, we ask users of our software to
|
||||
refrain from using it in any way that would cause mental, emotional or
|
||||
physical harm to individuals and vulnerable populations including (but
|
||||
not limited to) women; minors; ethnic minorities; religious groups;
|
||||
members of LGBTQIA communities; and people with disabilities or
|
||||
impairments.
|
||||
|
||||
2. Note that some of the image generation AI models which the Invoke-AI
|
||||
toolkit supports carry licensing agreements which impose restrictions
|
||||
on how the model is used. We ask that our users read and agree to
|
||||
these terms if they wish to make use of these models. These agreements
|
||||
are distinct from the MIT license which applies to the InvokeAI
|
||||
software and source code.
|
||||
|
||||
6. That mutual respect is key to a healthy software development
|
||||
community. Members of the InvokeAI community are expected to treat
|
||||
each other with respect, beneficence, and empathy. Each of us has a
|
||||
different background and a unique set of skills. We strive to help
|
||||
each other grow and gain new skills, and we apportion expectations in
|
||||
a way that balances the members' time, skillset, and interest
|
||||
area. Disputes are resolved by open and honest communication.
|
||||
|
||||
## 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**, 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.
|
||||
|
28
README.md
@ -65,14 +65,11 @@ requests. Be sure to use the provided templates. They will help aid diagnose iss
|
||||
|
||||
### Installation
|
||||
|
||||
This fork is supported across multiple platforms. You can find individual installation instructions
|
||||
below.
|
||||
|
||||
- #### [Linux](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_LINUX/)
|
||||
|
||||
- #### [Windows](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_WINDOWS/)
|
||||
|
||||
- #### [Macintosh](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_MAC/)
|
||||
This fork is supported across Linux, Windows and Macintosh. Linux
|
||||
users can use either an Nvidia-based card (with CUDA support) or an
|
||||
AMD card (using the ROCm driver). For full installation and upgrade
|
||||
instructions, please see:
|
||||
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/)
|
||||
|
||||
### Hardware Requirements
|
||||
|
||||
@ -175,15 +172,22 @@ problems and other issues.
|
||||
# Contributing
|
||||
|
||||
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. If you are unfamiliar with how
|
||||
to contribute to GitHub projects, here is a
|
||||
[Getting Started Guide](https://opensource.com/article/19/7/create-pull-request-github).
|
||||
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.
|
||||
|
||||
A full set of contribution guidelines, along with templates, are in progress, but for now the most
|
||||
If you are unfamiliar with how
|
||||
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, 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,
|
||||
and we hope that some of those of you who are reading this will elect
|
||||
to become part of our community.
|
||||
|
||||
Welcome to InvokeAI!
|
||||
|
||||
### Contributors
|
||||
|
||||
This fork is a combined effort of various people from across the world.
|
||||
|
0
backend/__init__.py
Normal file
0
backend/modules/__init__.py
Normal file
117
backend/modules/get_canvas_generation_mode.py
Normal file
@ -0,0 +1,117 @@
|
||||
from PIL import Image, ImageChops
|
||||
from PIL.Image import Image as ImageType
|
||||
from typing import Union, Literal
|
||||
|
||||
# https://stackoverflow.com/questions/43864101/python-pil-check-if-image-is-transparent
|
||||
def check_for_any_transparency(img: Union[ImageType, str]) -> bool:
|
||||
if type(img) is str:
|
||||
img = Image.open(str)
|
||||
|
||||
if img.info.get("transparency", None) is not None:
|
||||
return True
|
||||
if img.mode == "P":
|
||||
transparent = img.info.get("transparency", -1)
|
||||
for _, index in img.getcolors():
|
||||
if index == transparent:
|
||||
return True
|
||||
elif img.mode == "RGBA":
|
||||
extrema = img.getextrema()
|
||||
if extrema[3][0] < 255:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_canvas_generation_mode(
|
||||
init_img: Union[ImageType, str], init_mask: Union[ImageType, str]
|
||||
) -> Literal["txt2img", "outpainting", "inpainting", "img2img",]:
|
||||
if type(init_img) is str:
|
||||
init_img = Image.open(init_img)
|
||||
|
||||
if type(init_mask) is str:
|
||||
init_mask = Image.open(init_mask)
|
||||
|
||||
init_img = init_img.convert("RGBA")
|
||||
|
||||
# Get alpha from init_img
|
||||
init_img_alpha = init_img.split()[-1]
|
||||
init_img_alpha_mask = init_img_alpha.convert("L")
|
||||
init_img_has_transparency = check_for_any_transparency(init_img)
|
||||
|
||||
if init_img_has_transparency:
|
||||
init_img_is_fully_transparent = (
|
||||
True if init_img_alpha_mask.getbbox() is None else False
|
||||
)
|
||||
|
||||
"""
|
||||
Mask images are white in areas where no change should be made, black where changes
|
||||
should be made.
|
||||
"""
|
||||
|
||||
# Fit the mask to init_img's size and convert it to greyscale
|
||||
init_mask = init_mask.resize(init_img.size).convert("L")
|
||||
|
||||
"""
|
||||
PIL.Image.getbbox() returns the bounding box of non-zero areas of the image, so we first
|
||||
invert the mask image so that masked areas are white and other areas black == zero.
|
||||
getbbox() now tells us if the are any masked areas.
|
||||
"""
|
||||
init_mask_bbox = ImageChops.invert(init_mask).getbbox()
|
||||
init_mask_exists = False if init_mask_bbox is None else True
|
||||
|
||||
if init_img_has_transparency:
|
||||
if init_img_is_fully_transparent:
|
||||
return "txt2img"
|
||||
else:
|
||||
return "outpainting"
|
||||
else:
|
||||
if init_mask_exists:
|
||||
return "inpainting"
|
||||
else:
|
||||
return "img2img"
|
||||
|
||||
|
||||
def main():
|
||||
# Testing
|
||||
init_img_opaque = "test_images/init-img_opaque.png"
|
||||
init_img_partial_transparency = "test_images/init-img_partial_transparency.png"
|
||||
init_img_full_transparency = "test_images/init-img_full_transparency.png"
|
||||
init_mask_no_mask = "test_images/init-mask_no_mask.png"
|
||||
init_mask_has_mask = "test_images/init-mask_has_mask.png"
|
||||
|
||||
print(
|
||||
"OPAQUE IMAGE, NO MASK, expect img2img, got ",
|
||||
get_canvas_generation_mode(init_img_opaque, init_mask_no_mask),
|
||||
)
|
||||
|
||||
print(
|
||||
"IMAGE WITH TRANSPARENCY, NO MASK, expect outpainting, got ",
|
||||
get_canvas_generation_mode(
|
||||
init_img_partial_transparency, init_mask_no_mask
|
||||
),
|
||||
)
|
||||
|
||||
print(
|
||||
"FULLY TRANSPARENT IMAGE NO MASK, expect txt2img, got ",
|
||||
get_canvas_generation_mode(init_img_full_transparency, init_mask_no_mask),
|
||||
)
|
||||
|
||||
print(
|
||||
"OPAQUE IMAGE, WITH MASK, expect inpainting, got ",
|
||||
get_canvas_generation_mode(init_img_opaque, init_mask_has_mask),
|
||||
)
|
||||
|
||||
print(
|
||||
"IMAGE WITH TRANSPARENCY, WITH MASK, expect outpainting, got ",
|
||||
get_canvas_generation_mode(
|
||||
init_img_partial_transparency, init_mask_has_mask
|
||||
),
|
||||
)
|
||||
|
||||
print(
|
||||
"FULLY TRANSPARENT IMAGE WITH MASK, expect txt2img, got ",
|
||||
get_canvas_generation_mode(init_img_full_transparency, init_mask_has_mask),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -5,6 +5,8 @@ SAMPLER_CHOICES = [
|
||||
"ddim",
|
||||
"k_dpm_2_a",
|
||||
"k_dpm_2",
|
||||
"k_dpmpp_2_a",
|
||||
"k_dpmpp_2",
|
||||
"k_euler_a",
|
||||
"k_euler",
|
||||
"k_heun",
|
||||
|
BIN
backend/modules/test_images/init-img_full_transparency.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
backend/modules/test_images/init-img_opaque.png
Normal file
After Width: | Height: | Size: 292 KiB |
BIN
backend/modules/test_images/init-img_partial_transparency.png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
backend/modules/test_images/init-mask_has_mask.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
backend/modules/test_images/init-mask_no_mask.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
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
|
@ -7,8 +7,8 @@
|
||||
# was trained on.
|
||||
stable-diffusion-1.5:
|
||||
description: The newest Stable Diffusion version 1.5 weight file (4.27 GB)
|
||||
weights: ./models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
|
||||
config: ./configs/stable-diffusion/v1-inference.yaml
|
||||
weights: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
|
||||
config: configs/stable-diffusion/v1-inference.yaml
|
||||
width: 512
|
||||
height: 512
|
||||
vae: ./models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
||||
|
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
|
@ -30,9 +30,9 @@ model:
|
||||
target: ldm.modules.embedding_manager.EmbeddingManager
|
||||
params:
|
||||
placeholder_strings: ["*"]
|
||||
initializer_words: ['face', 'man', 'photo', 'africanmale']
|
||||
initializer_words: ['sculpture']
|
||||
per_image_tokens: false
|
||||
num_vectors_per_token: 1
|
||||
num_vectors_per_token: 8
|
||||
progressive_words: False
|
||||
|
||||
unet_config:
|
||||
|
@ -30,9 +30,9 @@ model:
|
||||
target: ldm.modules.embedding_manager.EmbeddingManager
|
||||
params:
|
||||
placeholder_strings: ["*"]
|
||||
initializer_words: ['face', 'man', 'photo', 'africanmale']
|
||||
initializer_words: ['sculpture']
|
||||
per_image_tokens: false
|
||||
num_vectors_per_token: 1
|
||||
num_vectors_per_token: 8
|
||||
progressive_words: False
|
||||
|
||||
unet_config:
|
||||
|
@ -22,7 +22,7 @@ model:
|
||||
target: ldm.modules.embedding_manager.EmbeddingManager
|
||||
params:
|
||||
placeholder_strings: ["*"]
|
||||
initializer_words: ['face', 'man', 'photo', 'africanmale']
|
||||
initializer_words: ['sculpture']
|
||||
per_image_tokens: false
|
||||
num_vectors_per_token: 6
|
||||
progressive_words: False
|
||||
|
@ -1,34 +1,13 @@
|
||||
FROM ubuntu AS get_miniconda
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# install wget
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
wget \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# download and install miniconda
|
||||
ARG conda_version=py39_4.12.0-Linux-x86_64
|
||||
ARG conda_prefix=/opt/conda
|
||||
RUN wget --progress=dot:giga -O /miniconda.sh \
|
||||
https://repo.anaconda.com/miniconda/Miniconda3-${conda_version}.sh \
|
||||
&& bash /miniconda.sh -b -p ${conda_prefix} \
|
||||
&& rm -f /miniconda.sh
|
||||
|
||||
FROM ubuntu AS invokeai
|
||||
FROM ubuntu:22.10
|
||||
|
||||
# use bash
|
||||
SHELL [ "/bin/bash", "-c" ]
|
||||
|
||||
# clean bashrc
|
||||
RUN echo "" > ~/.bashrc
|
||||
|
||||
# Install necesarry packages
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
--no-install-recommends \
|
||||
build-essential \
|
||||
gcc \
|
||||
git \
|
||||
libgl1-mesa-glx \
|
||||
@ -39,46 +18,17 @@ RUN apt-get update \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# clone repository, create models.yaml and create symlinks
|
||||
ARG invokeai_git=invoke-ai/InvokeAI
|
||||
ARG invokeai_branch=main
|
||||
ARG project_name=invokeai
|
||||
ARG conda_env_file=environment-lin-cuda.yml
|
||||
RUN git clone -b ${invokeai_branch} https://github.com/${invokeai_git}.git "/${project_name}" \
|
||||
&& cp \
|
||||
"/${project_name}/configs/models.yaml.example" \
|
||||
"/${project_name}/configs/models.yaml" \
|
||||
&& ln -sf \
|
||||
"/${project_name}/environments-and-requirements/${conda_env_file}" \
|
||||
"/${project_name}/environment.yml" \
|
||||
&& ln -sf \
|
||||
/data/models/v1-5-pruned-emaonly.ckpt \
|
||||
"/${project_name}/models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt" \
|
||||
&& ln -sf \
|
||||
/data/outputs/ \
|
||||
"/${project_name}/outputs"
|
||||
# set workdir and copy sources
|
||||
WORKDIR /invokeai
|
||||
ARG PIP_REQUIREMENTS=requirements-lin-cuda.txt
|
||||
COPY . ./environments-and-requirements/${PIP_REQUIREMENTS} ./
|
||||
|
||||
# set workdir
|
||||
WORKDIR "/${project_name}"
|
||||
# install requirements and link outputs folder
|
||||
RUN pip install \
|
||||
--no-cache-dir \
|
||||
-r ${PIP_REQUIREMENTS}
|
||||
|
||||
# install conda env and preload models
|
||||
ARG conda_prefix=/opt/conda
|
||||
COPY --from=get_miniconda "${conda_prefix}" "${conda_prefix}"
|
||||
RUN source "${conda_prefix}/etc/profile.d/conda.sh" \
|
||||
&& conda init bash \
|
||||
&& source ~/.bashrc \
|
||||
&& conda env create \
|
||||
--name "${project_name}" \
|
||||
&& rm -Rf ~/.cache \
|
||||
&& conda clean -afy \
|
||||
&& echo "conda activate ${project_name}" >> ~/.bashrc
|
||||
|
||||
RUN source ~/.bashrc \
|
||||
&& python scripts/preload_models.py \
|
||||
--no-interactive
|
||||
|
||||
# Copy entrypoint and set env
|
||||
ENV CONDA_PREFIX="${conda_prefix}"
|
||||
ENV PROJECT_NAME="${project_name}"
|
||||
COPY docker-build/entrypoint.sh /
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
# set Environment, Entrypoint and default CMD
|
||||
ENV INVOKEAI_ROOT /data
|
||||
ENTRYPOINT [ "python3", "scripts/invoke.py", "--outdir=/data/outputs" ]
|
||||
CMD [ "--web", "--host=0.0.0.0" ]
|
||||
|
@ -1,84 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
# IMPORTANT: You need to have a token on huggingface.co to be able to download the checkpoint!!!
|
||||
# configure values by using env when executing build.sh
|
||||
# f.e. env ARCH=aarch64 GITHUB_INVOKE_AI=https://github.com/yourname/yourfork.git ./build.sh
|
||||
|
||||
source ./docker-build/env.sh || echo "please run from repository root" || exit 1
|
||||
# IMPORTANT: You need to have a token on huggingface.co to be able to download the checkpoints!!!
|
||||
# configure values by using env when executing build.sh f.e. `env ARCH=aarch64 ./build.sh`
|
||||
|
||||
invokeai_conda_version=${INVOKEAI_CONDA_VERSION:-py39_4.12.0-${platform/\//-}}
|
||||
invokeai_conda_prefix=${INVOKEAI_CONDA_PREFIX:-\/opt\/conda}
|
||||
invokeai_conda_env_file=${INVOKEAI_CONDA_ENV_FILE:-environment-lin-cuda.yml}
|
||||
invokeai_git=${INVOKEAI_GIT:-invoke-ai/InvokeAI}
|
||||
invokeai_branch=${INVOKEAI_BRANCH:-main}
|
||||
huggingface_token=${HUGGINGFACE_TOKEN?}
|
||||
source ./docker-build/env.sh \
|
||||
|| echo "please execute docker-build/build.sh from repository root" \
|
||||
|| exit 1
|
||||
|
||||
pip_requirements=${PIP_REQUIREMENTS:-requirements-lin-cuda.txt}
|
||||
dockerfile=${INVOKE_DOCKERFILE:-docker-build/Dockerfile}
|
||||
|
||||
# print the settings
|
||||
echo "You are using these values:"
|
||||
echo -e "project_name:\t\t ${project_name}"
|
||||
echo -e "Dockerfile:\t\t ${dockerfile}"
|
||||
echo -e "requirements:\t\t ${pip_requirements}"
|
||||
echo -e "volumename:\t\t ${volumename}"
|
||||
echo -e "arch:\t\t\t ${arch}"
|
||||
echo -e "platform:\t\t ${platform}"
|
||||
echo -e "invokeai_conda_version:\t ${invokeai_conda_version}"
|
||||
echo -e "invokeai_conda_prefix:\t ${invokeai_conda_prefix}"
|
||||
echo -e "invokeai_conda_env_file: ${invokeai_conda_env_file}"
|
||||
echo -e "invokeai_git:\t\t ${invokeai_git}"
|
||||
echo -e "invokeai_tag:\t\t ${invokeai_tag}\n"
|
||||
|
||||
_runAlpine() {
|
||||
docker run \
|
||||
--rm \
|
||||
--interactive \
|
||||
--tty \
|
||||
--mount source="$volumename",target=/data \
|
||||
--workdir /data \
|
||||
alpine "$@"
|
||||
}
|
||||
|
||||
_copyCheckpoints() {
|
||||
echo "creating subfolders for models and outputs"
|
||||
_runAlpine mkdir models
|
||||
_runAlpine mkdir outputs
|
||||
echo "downloading v1-5-pruned-emaonly.ckpt"
|
||||
_runAlpine wget \
|
||||
--header="Authorization: Bearer ${huggingface_token}" \
|
||||
-O models/v1-5-pruned-emaonly.ckpt \
|
||||
https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt
|
||||
echo "done"
|
||||
}
|
||||
|
||||
_checkVolumeContent() {
|
||||
_runAlpine ls -lhA /data/models
|
||||
}
|
||||
|
||||
_getModelMd5s() {
|
||||
_runAlpine \
|
||||
alpine sh -c "md5sum /data/models/*.ckpt"
|
||||
}
|
||||
|
||||
if [[ -n "$(docker volume ls -f name="${volumename}" -q)" ]]; then
|
||||
echo "Volume already exists"
|
||||
if [[ -z "$(_checkVolumeContent)" ]]; then
|
||||
echo "looks empty, copying checkpoint"
|
||||
_copyCheckpoints
|
||||
fi
|
||||
echo "Models in ${volumename}:"
|
||||
_checkVolumeContent
|
||||
echo
|
||||
else
|
||||
echo -n "createing docker volume "
|
||||
docker volume create "${volumename}"
|
||||
_copyCheckpoints
|
||||
fi
|
||||
|
||||
# Build Container
|
||||
docker build \
|
||||
--platform="${platform}" \
|
||||
--tag "${invokeai_tag}" \
|
||||
--build-arg project_name="${project_name}" \
|
||||
--build-arg conda_version="${invokeai_conda_version}" \
|
||||
--build-arg conda_prefix="${invokeai_conda_prefix}" \
|
||||
--build-arg conda_env_file="${invokeai_conda_env_file}" \
|
||||
--build-arg invokeai_git="${invokeai_git}" \
|
||||
--build-arg invokeai_branch="${invokeai_branch}" \
|
||||
--file ./docker-build/Dockerfile \
|
||||
--tag="${invokeai_tag}" \
|
||||
--build-arg="PIP_REQUIREMENTS=${pip_requirements}" \
|
||||
--file="${dockerfile}" \
|
||||
.
|
||||
|
||||
docker run \
|
||||
--rm \
|
||||
--platform="$platform" \
|
||||
--name="$project_name" \
|
||||
--hostname="$project_name" \
|
||||
--mount="source=$volumename,target=/data" \
|
||||
--mount="type=bind,source=$HOME/.huggingface,target=/root/.huggingface" \
|
||||
--env="HUGGINGFACE_TOKEN=${HUGGINGFACE_TOKEN}" \
|
||||
--entrypoint="python3" \
|
||||
"${invokeai_tag}" \
|
||||
scripts/configure_invokeai.py --yes
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
source "${CONDA_PREFIX}/etc/profile.d/conda.sh"
|
||||
conda activate "${PROJECT_NAME}"
|
||||
|
||||
python scripts/invoke.py \
|
||||
${@:---web --host=0.0.0.0}
|
@ -4,7 +4,7 @@ project_name=${PROJECT_NAME:-invokeai}
|
||||
volumename=${VOLUMENAME:-${project_name}_data}
|
||||
arch=${ARCH:-x86_64}
|
||||
platform=${PLATFORM:-Linux/${arch}}
|
||||
invokeai_tag=${INVOKEAI_TAG:-${project_name}-${arch}}
|
||||
invokeai_tag=${INVOKEAI_TAG:-${project_name}:${arch}}
|
||||
|
||||
export project_name
|
||||
export volumename
|
||||
|
@ -7,9 +7,9 @@ docker run \
|
||||
--interactive \
|
||||
--tty \
|
||||
--rm \
|
||||
--platform "$platform" \
|
||||
--name "$project_name" \
|
||||
--hostname "$project_name" \
|
||||
--mount source="$volumename",target=/data \
|
||||
--publish 9090:9090 \
|
||||
--platform="$platform" \
|
||||
--name="$project_name" \
|
||||
--hostname="$project_name" \
|
||||
--mount="source=$volumename,target=/data" \
|
||||
--publish=9090:9090 \
|
||||
"$invokeai_tag" ${1:+$@}
|
||||
|
BIN
docs/assets/canvas/biker_granny.png
Normal file
After Width: | Height: | Size: 359 KiB |
BIN
docs/assets/canvas/biker_jacket_granny.png
Normal file
After Width: | Height: | Size: 528 KiB |
BIN
docs/assets/canvas/mask_granny.png
Normal file
After Width: | Height: | Size: 601 KiB |
BIN
docs/assets/canvas/staging_area.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
docs/assets/concepts/image1.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
docs/assets/concepts/image2.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
docs/assets/concepts/image3.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
docs/assets/concepts/image4.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
docs/assets/concepts/image5.png
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
docs/assets/invoke_ai_banner.png
Normal file
After Width: | Height: | Size: 169 KiB |
@ -99,8 +99,7 @@ overridden on a per-prompt basis (see
|
||||
| `--sampler <sampler>` | `-A<sampler>` | `k_lms` | Sampler to use. Use `-h` to get list of available samplers. |
|
||||
| `--seamless` | | `False` | Create interesting effects by tiling elements of the image. |
|
||||
| `--embedding_path <path>` | | `None` | Path to pre-trained embedding manager checkpoints, for custom models |
|
||||
| `--gfpgan_dir` | | `src/gfpgan` | Path to where GFPGAN is installed. |
|
||||
| `--gfpgan_model_path` | | `experiments/pretrained_models/GFPGANv1.4.pth` | Path to GFPGAN model file, relative to `--gfpgan_dir`. |
|
||||
| `--gfpgan_model_path` | | `experiments/pretrained_models/GFPGANv1.4.pth` | Path to GFPGAN model file. |
|
||||
| `--free_gpu_mem` | | `False` | Free GPU memory after sampling, to allow image decoding and saving in low VRAM conditions |
|
||||
| `--precision` | | `auto` | Set model precision, default is selected by device. Options: auto, float32, float16, autocast |
|
||||
|
||||
@ -270,6 +269,12 @@ value, we are insisting on a more stringent classification.
|
||||
invoke> a piece of cake -I /path/to/breakfast.png -tm bagel 0.6
|
||||
```
|
||||
|
||||
### Custom Styles and Subjects
|
||||
|
||||
You can load and use hundreds of community-contributed Textual
|
||||
Inversion models just by typing the appropriate trigger phrase. Please
|
||||
see [Concepts Library](CONCEPTS.md) for more details.
|
||||
|
||||
# Other Commands
|
||||
|
||||
The CLI offers a number of commands that begin with "!".
|
||||
|
132
docs/features/CONCEPTS.md
Normal file
@ -0,0 +1,132 @@
|
||||
---
|
||||
title: The Hugging Face Concepts Library and Importing Textual Inversion files
|
||||
---
|
||||
|
||||
# :material-file-document: Concepts Library
|
||||
|
||||
## Using Textual Inversion Files
|
||||
|
||||
Textual inversion (TI) files are small models that customize the output of
|
||||
Stable Diffusion image generation. They can augment SD with
|
||||
specialized subjects and artistic styles. They are also known as
|
||||
"embeds" in the machine learning world.
|
||||
|
||||
Each TI file introduces one or more vocabulary terms to the SD
|
||||
model. These are known in InvokeAI as "triggers." Triggers are often,
|
||||
but not always, denoted using angle brackets as in
|
||||
"<trigger-phrase>". The two most common type of TI files that you'll
|
||||
encounter are `.pt` and `.bin` files, which are produced by different
|
||||
TI training packages. InvokeAI supports both formats, but its [built-in
|
||||
TI training system](TEXTUAL_INVERSION.md) produces `.pt`.
|
||||
|
||||
The [Hugging Face company](https://huggingface.co/sd-concepts-library)
|
||||
has amassed a large ligrary of >800 community-contributed TI files
|
||||
covering a broad range of subjects and styles. InvokeAI has built-in
|
||||
support for this library which downloads and merges TI files
|
||||
automatically upon request. You can also install your own or others'
|
||||
TI files by placing them in a designated directory.
|
||||
|
||||
### An Example
|
||||
|
||||
Here are a few examples to illustrate how it works. All these images
|
||||
were generated using the command-line client and the Stable Diffusion
|
||||
1.5 model:
|
||||
|
||||
Japanese gardener
|
||||
<br>
|
||||
<img src="../assets/concepts/image1.png">
|
||||
|
||||
Japanese gardener <ghibli-face>
|
||||
<br>
|
||||
<img src="../assets/concepts/image2.png">
|
||||
|
||||
Japanese gardener <hoi4-leaders>
|
||||
<br>
|
||||
<img src="../assets/concepts/image3.png">
|
||||
|
||||
Japanese gardener <cartoona-animals>
|
||||
<br>
|
||||
<img src="../assets/concepts/image4.png">
|
||||
|
||||
You can also combine styles and concepts:
|
||||
|
||||
A portrait of <alf> in <cartoona-animal> style
|
||||
<br>
|
||||
<img src="../assets/concepts/image5.png">
|
||||
|
||||
## Using a Hugging Face Concept
|
||||
|
||||
Hugging Face TI concepts are downloaded and installed automatically as
|
||||
you require them. This requires your machine to be connected to the
|
||||
Internet. To find out what each concept is for, you can browse the
|
||||
[Hugging Face concepts
|
||||
library](https://huggingface.co/sd-concepts-library) and look at
|
||||
examples of what each concept produces.
|
||||
|
||||
When you have an idea of a concept you wish to try, go to the
|
||||
command-line client (CLI) and type a "<" character and the beginning
|
||||
of the Hugging Face concept name you wish to load. Press the Tab key,
|
||||
and the CLI will show you all matching concepts. You can also type "<"
|
||||
and Tab to get a listing of all ~800 concepts, but be prepared to
|
||||
scroll up to see them all! If there is more than one match you can
|
||||
continue to type and Tab until the concept is completed.
|
||||
|
||||
For example if you type "<x" and Tab, you'll be prompted with the completions:
|
||||
|
||||
```
|
||||
<xatu2> <xatu> <xbh> <xi> <xidiversity> <xioboma> <xuna> <xyz>
|
||||
```
|
||||
|
||||
Now type "id" and press Tab. It will be autocompleted to
|
||||
"<xidiversity>" because this is a unique match.
|
||||
|
||||
Finish your prompt and generate as usual. You may include multiple
|
||||
concept terms in the prompt.
|
||||
|
||||
If you have never used this concept before, you will see a message
|
||||
that the TI model is being downloaded and installed. After this, the
|
||||
concept will be saved locally (in the `models/sd-concepts-library`
|
||||
directory) for future use.
|
||||
|
||||
Several steps happen during downloading and
|
||||
installation, including a scan of the file for malicious code. Should
|
||||
any errors occur, you will be warned and the concept will fail to
|
||||
load. Generation will then continue treating the trigger term as a
|
||||
normal string of characters (e.g. as literal "<ghibli-face>").
|
||||
|
||||
Currently auto-installation of concepts is a feature only available on
|
||||
the command-line client. Support for the WebUI is a work in progress.
|
||||
|
||||
## Installing your Own TI Files
|
||||
|
||||
You may install any number of `.pt` and `.bin` files simply by copying
|
||||
them into the `embeddings` directory of the InvokeAI runtime directory
|
||||
(usually `invokeai` in your home directory). You may create
|
||||
subdirectories in order to organize the files in any way you wish. Be
|
||||
careful not to overwrite one file with another. For example, TI files
|
||||
generated by the Hugging Face toolkit share the named
|
||||
`learned_embedding.bin`. You can use subdirectories to keep them
|
||||
distinct.
|
||||
|
||||
At startup time, InvokeAI will scan the `embeddings` directory and
|
||||
load any TI files it finds there. At startup you will see a message
|
||||
similar to this one:
|
||||
|
||||
```
|
||||
>> Current embedding manager terms: *, <HOI4-Leader>, <princess-knight>
|
||||
```
|
||||
|
||||
Note the "*" trigger term. This is a placeholder term that many early
|
||||
TI tutorials taught people to use rather than a more descriptive
|
||||
term. Unfortunately, if you have multiple TI files that all use this
|
||||
term, only the first one loaded will be triggered by use of the term.
|
||||
|
||||
To avoid this problem, you can use the `merge_embeddings.py` script to
|
||||
merge two or more TI files together. If it encounters a collision of
|
||||
terms, the script will prompt you to select new terms that do not
|
||||
collide. See [Textual Inversion](TEXTUAL_INVERSION.md) for details.
|
||||
|
||||
## Further Reading
|
||||
|
||||
Please see [the repository](https://github.com/rinongal/textual_inversion) and
|
||||
associated paper for details and limitations.
|
@ -85,7 +85,7 @@ increasing size, every tile after the first in a row or column
|
||||
effectively only covers an extra `1 - overlap_ratio` on each axis. If
|
||||
the input/`--init_img` is same size as a tile, the ideal (for time)
|
||||
scaling factors with the default overlap (0.25) are 1.75, 2.5, 3.25,
|
||||
4.0 etc..
|
||||
4.0, etc.
|
||||
|
||||
`-embiggen_tiles <spaced list of tiles>`
|
||||
|
||||
@ -100,6 +100,15 @@ Tiles are numbered starting with one, and left-to-right,
|
||||
top-to-bottom. So, if you are generating a 3x3 tiled image, the
|
||||
middle row would be `4 5 6`.
|
||||
|
||||
`-embiggen_strength <strength>`
|
||||
|
||||
Another advanced option if you want to experiment with the strength parameter
|
||||
that embiggen uses when it calls Img2Img. Values range from 0.0 to 1.0
|
||||
and lower values preserve more of the character of the initial image.
|
||||
Values that are too high will result in a completely different end image,
|
||||
while values that are too low will result in an image not dissimilar to one
|
||||
you would get with ESRGAN upscaling alone. The default value is 0.4.
|
||||
|
||||
### Examples
|
||||
|
||||
!!! example ""
|
||||
|
@ -19,13 +19,13 @@ tree on a hill with a river, nature photograph, national geographic -I./test-pic
|
||||
This will take the original image shown here:
|
||||
|
||||
<figure markdown>
|
||||

|
||||
{ width=320 }
|
||||
</figure>
|
||||
|
||||
and generate a new image based on it as shown here:
|
||||
|
||||
<figure markdown>
|
||||

|
||||
{ width=320 }
|
||||
</figure>
|
||||
|
||||
The `--init_img` (`-I`) option gives the path to the seed picture. `--strength`
|
||||
@ -45,15 +45,16 @@ Note that the prompt makes a big difference. For example, this slight variation
|
||||
on the prompt produces a very different image:
|
||||
|
||||
<figure markdown>
|
||||

|
||||
{ width=320 }
|
||||
<caption markdown>photograph of a tree on a hill with a river</caption>
|
||||
</figure>
|
||||
|
||||
!!! tip
|
||||
|
||||
When designing prompts, think about how the images scraped from the internet were captioned. Very few photographs will
|
||||
be labeled "photograph" or "photorealistic." They will, however, be captioned with the publication, photographer, camera
|
||||
model, or film settings.
|
||||
When designing prompts, think about how the images scraped from the internet were
|
||||
captioned. Very few photographs will be labeled "photograph" or "photorealistic."
|
||||
They will, however, be captioned with the publication, photographer, camera model,
|
||||
or film settings.
|
||||
|
||||
If the initial image contains transparent regions, then Stable Diffusion will
|
||||
only draw within the transparent regions, a process called
|
||||
@ -61,17 +62,17 @@ only draw within the transparent regions, a process called
|
||||
However, for this to work correctly, the color information underneath the
|
||||
transparent needs to be preserved, not erased.
|
||||
|
||||
!!! warning
|
||||
!!! warning "**IMPORTANT ISSUE** "
|
||||
|
||||
**IMPORTANT ISSUE** `img2img` does not work properly on initial images smaller
|
||||
than 512x512. Please scale your image to at least 512x512 before using it.
|
||||
Larger images are not a problem, but may run out of VRAM on your GPU card. To
|
||||
fix this, use the --fit option, which downscales the initial image to fit within
|
||||
the box specified by width x height:
|
||||
`img2img` does not work properly on initial images smaller
|
||||
than 512x512. Please scale your image to at least 512x512 before using it.
|
||||
Larger images are not a problem, but may run out of VRAM on your GPU card. To
|
||||
fix this, use the --fit option, which downscales the initial image to fit within
|
||||
the box specified by width x height:
|
||||
|
||||
```
|
||||
tree on a hill with a river, national geographic -I./test-pictures/big-sketch.png -H512 -W512 --fit
|
||||
```
|
||||
```
|
||||
tree on a hill with a river, national geographic -I./test-pictures/big-sketch.png -H512 -W512 --fit
|
||||
```
|
||||
|
||||
## How does it actually work, though?
|
||||
|
||||
@ -87,7 +88,7 @@ from a prompt. If the step count is 10, then the "latent space" (Stable
|
||||
Diffusion's internal representation of the image) for the prompt "fire" with
|
||||
seed `1592514025` develops something like this:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
invoke> "fire" -s10 -W384 -H384 -S1592514025
|
||||
```
|
||||
|
||||
@ -133,9 +134,9 @@ Notice how much more fuzzy the starting image is for strength `0.7` compared to
|
||||
|
||||
| | strength = 0.7 | strength = 0.4 |
|
||||
| --------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| initial image that SD sees |  |  |
|
||||
| initial image that SD sees |  |  |
|
||||
| steps argument to `invoke>` | `-S10` | `-S10` |
|
||||
| steps actually taken | 7 | 4 |
|
||||
| steps actually taken | `7` | `4` |
|
||||
| latent space at each step |  |  |
|
||||
| output |  |  |
|
||||
|
||||
@ -150,7 +151,7 @@ If you want to try this out yourself, all of these are using a seed of
|
||||
`1592514025` with a width/height of `384`, step count `10`, the default sampler
|
||||
(`k_lms`), and the single-word prompt `"fire"`:
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
invoke> "fire" -s10 -W384 -H384 -S1592514025 -I /tmp/fire-drawing.png --strength 0.7
|
||||
```
|
||||
|
||||
@ -170,7 +171,7 @@ give each generation 20 steps.
|
||||
Here's strength `0.4` (note step count `50`, which is `20 ÷ 0.4` to make sure SD
|
||||
does `20` steps from my image):
|
||||
|
||||
```commandline
|
||||
```bash
|
||||
invoke> "fire" -s50 -W384 -H384 -S1592514025 -I /tmp/fire-drawing.png -f 0.4
|
||||
```
|
||||
|
||||
|
89
docs/features/NSFW.md
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
title: The NSFW Checker
|
||||
---
|
||||
|
||||
# :material-image-off: NSFW Checker
|
||||
|
||||
## The NSFW ("Safety") Checker
|
||||
|
||||
The Stable Diffusion image generation models will produce sexual
|
||||
imagery if deliberately prompted, and will occasionally produce such
|
||||
images when this is not intended. Such images are colloquially known
|
||||
as "Not Safe for Work" (NSFW). This behavior is due to the nature of
|
||||
the training set that Stable Diffusion was trained on, which culled
|
||||
millions of "aesthetic" images from the Internet.
|
||||
|
||||
You may not wish to be exposed to these images, and in some
|
||||
jurisdictions it may be illegal to publicly distribute such imagery,
|
||||
including mounting a publicly-available server that provides
|
||||
unfiltered images to the public. Furthermore, the [Stable Diffusion
|
||||
weights
|
||||
License](https://github.com/invoke-ai/InvokeAI/blob/main/LICENSE-ModelWeights.txt)
|
||||
forbids the model from being used to "exploit any of the
|
||||
vulnerabilities of a specific group of persons."
|
||||
|
||||
For these reasons Stable Diffusion offers a "safety checker," a
|
||||
machine learning model trained to recognize potentially disturbing
|
||||
imagery. When a potentially NSFW image is detected, the checker will
|
||||
blur the image and paste a warning icon on top. The checker can be
|
||||
turned on and off on the command line using `--nsfw_checker` and
|
||||
`--no-nsfw_checker`.
|
||||
|
||||
At installation time, InvokeAI will ask whether the checker should be
|
||||
activated by default (neither argument given on the command line). The
|
||||
response is stored in the InvokeAI initialization file (usually
|
||||
`.invokeai` in your home directory). You can change the default at any
|
||||
time by opening this file in a text editor and commenting or
|
||||
uncommenting the line `--nsfw_checker`.
|
||||
|
||||
## Caveats
|
||||
|
||||
There are a number of caveats that you need to be aware of.
|
||||
|
||||
### Accuracy
|
||||
|
||||
The checker is [not perfect](https://arxiv.org/abs/2210.04610).It will
|
||||
occasionally flag innocuous images (false positives), and will
|
||||
frequently miss violent and gory imagery (false negatives). It rarely
|
||||
fails to flag sexual imagery, but this has been known to happen. For
|
||||
these reasons, the InvokeAI team prefers to refer to the software as a
|
||||
"NSFW Checker" rather than "safety checker."
|
||||
|
||||
### Memory Usage and Performance
|
||||
|
||||
The NSFW checker consumes an additional 1.2G of GPU VRAM on top of the
|
||||
3.4G of VRAM used by Stable Diffusion v1.5 (this is with
|
||||
half-precision arithmetic). This means that the checker will not run
|
||||
successfully on GPU cards with less than 6GB VRAM, and will reduce the
|
||||
size of the images that you can produce.
|
||||
|
||||
The checker also introduces a slight performance penalty. Images will
|
||||
take ~1 second longer to generate when the checker is
|
||||
activated. Generally this is not noticeable.
|
||||
|
||||
### Intermediate Images in the Web UI
|
||||
|
||||
The checker only operates on the final image produced by the Stable
|
||||
Diffusion algorithm. If you are using the Web UI and have enabled the
|
||||
display of intermediate images, you will briefly be exposed to a
|
||||
low-resolution (mosaicized) version of the final image before it is
|
||||
flagged by the checker and replaced by a fully blurred version. You
|
||||
are encouraged to turn **off** intermediate image rendering when you
|
||||
are using the checker. Future versions of InvokeAI will apply
|
||||
additional blurring to intermediate images when the checker is active.
|
||||
|
||||
### Watermarking
|
||||
|
||||
InvokeAI does not apply any sort of watermark to images it
|
||||
generates. However, it does write metadata into the PNG data area,
|
||||
including the prompt used to generate the image and relevant parameter
|
||||
settings. These fields can be examined using the `sd-metadata.py`
|
||||
script that comes with the InvokeAI package.
|
||||
|
||||
Note that several other Stable Diffusion distributions offer
|
||||
wavelet-based "invisible" watermarking. We have experimented with the
|
||||
library used to generate these watermarks and have reached the
|
||||
conclusion that while the watermarking library may be adding
|
||||
watermarks to PNG images, the currently available version is unable to
|
||||
retrieve them successfully. If and when a functioning version of the
|
||||
library becomes available, we will offer this feature as well.
|
@ -133,29 +133,6 @@ outputs = g.txt2img("a unicorn in manhattan")
|
||||
|
||||
Outputs is a list of lists in the format [filename1,seed1],[filename2,seed2]...].
|
||||
|
||||
Please see ldm/generate.py for more information. A set of example scripts is coming RSN.
|
||||
Please see the documentation in ldm/generate.py for more information.
|
||||
|
||||
---
|
||||
|
||||
## **Preload Models**
|
||||
|
||||
In situations where you have limited internet connectivity or are blocked behind a firewall, you can
|
||||
use the preload script to preload the required files for Stable Diffusion to run.
|
||||
|
||||
The preload script `scripts/preload_models.py` needs to be run once at least while connected to the
|
||||
internet. In the following runs, it will load up the cached versions of the required files from the
|
||||
`.cache` directory of the system.
|
||||
|
||||
```bash
|
||||
(invokeai) ~/stable-diffusion$ python3 ./scripts/preload_models.py
|
||||
preloading bert tokenizer...
|
||||
Downloading: 100%|██████████████████████████████████| 28.0/28.0 [00:00<00:00, 49.3kB/s]
|
||||
Downloading: 100%|██████████████████████████████████| 226k/226k [00:00<00:00, 2.79MB/s]
|
||||
Downloading: 100%|██████████████████████████████████| 455k/455k [00:00<00:00, 4.36MB/s]
|
||||
Downloading: 100%|██████████████████████████████████| 570/570 [00:00<00:00, 477kB/s]
|
||||
...success
|
||||
preloading kornia requirements...
|
||||
Downloading: "https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth" to /u/lstein/.cache/torch/hub/checkpoints/checkpoint_liberty_with_aug.pth
|
||||
100%|███████████████████████████████████████████████| 5.10M/5.10M [00:00<00:00, 101MB/s]
|
||||
...success
|
||||
```
|
||||
|
@ -92,6 +92,21 @@ The new image is larger than the original (576x704) because 64 pixels were added
|
||||
to the top and right sides. You will need enough VRAM to process an image of
|
||||
this size.
|
||||
|
||||
#### Outcropping non-InvokeAI images
|
||||
|
||||
You can outcrop an arbitrary image that was not generated by InvokeAI,
|
||||
but your results will vary. The `inpainting-1.5` model is highly
|
||||
recommended, but if not feasible, then you may be able to improve the
|
||||
output by conditioning the outcropping with a text prompt that
|
||||
describes the scene using the `--new_prompt` argument:
|
||||
|
||||
```bash
|
||||
invoke> !fix images/vacation.png --outcrop top 128 --new_prompt "family vacation"
|
||||
```
|
||||
|
||||
You may also provide a different seed for outcropping to use by passing
|
||||
`-S<seed>`. A negative seed will generate a new random seed.
|
||||
|
||||
A number of caveats:
|
||||
|
||||
1. Although you can specify any pixel values, they will be rounded up to the
|
||||
|
@ -6,49 +6,39 @@ title: Postprocessing
|
||||
|
||||
## Intro
|
||||
|
||||
This extension provides the ability to restore faces and upscale
|
||||
images.
|
||||
This extension provides the ability to restore faces and upscale images.
|
||||
|
||||
Face restoration and upscaling can be applied at the time you generate
|
||||
the images, or at any later time against a previously-generated PNG
|
||||
file, using the [!fix](#fixing-previously-generated-images)
|
||||
command. [Outpainting and outcropping](OUTPAINTING.md) can only be
|
||||
applied after the fact.
|
||||
Face restoration and upscaling can be applied at the time you generate the
|
||||
images, or at any later time against a previously-generated PNG file, using the
|
||||
[!fix](#fixing-previously-generated-images) command.
|
||||
[Outpainting and outcropping](OUTPAINTING.md) can only be applied after the
|
||||
fact.
|
||||
|
||||
## Face Fixing
|
||||
|
||||
The default face restoration module is GFPGAN. The default upscale is
|
||||
Real-ESRGAN. For an alternative face restoration module, see [CodeFormer
|
||||
Support](#codeformer-support) below.
|
||||
Real-ESRGAN. For an alternative face restoration module, see
|
||||
[CodeFormer Support](#codeformer-support) below.
|
||||
|
||||
As of version 1.14, environment.yaml will install the Real-ESRGAN
|
||||
package into the standard install location for python packages, and
|
||||
will put GFPGAN into a subdirectory of "src" in the InvokeAI
|
||||
directory. Upscaling with Real-ESRGAN should "just work" without
|
||||
further intervention. Simply pass the `--upscale` (`-U`) option on the
|
||||
`invoke>` command line, or indicate the desired scale on the popup in
|
||||
the Web GUI.
|
||||
As of version 1.14, environment.yaml will install the Real-ESRGAN package into
|
||||
the standard install location for python packages, and will put GFPGAN into a
|
||||
subdirectory of "src" in the InvokeAI directory. Upscaling with Real-ESRGAN
|
||||
should "just work" without further intervention. Simply pass the `--upscale`
|
||||
(`-U`) option on the `invoke>` command line, or indicate the desired scale on
|
||||
the popup in the Web GUI.
|
||||
|
||||
**GFPGAN** requires a series of downloadable model files to
|
||||
work. These are loaded when you run `scripts/preload_models.py`. If
|
||||
GFPAN is failing with an error, please run the following from the
|
||||
InvokeAI directory:
|
||||
**GFPGAN** requires a series of downloadable model files to work. These are
|
||||
loaded when you run `scripts/preload_models.py`. If GFPAN is failing with an
|
||||
error, please run the following from the InvokeAI directory:
|
||||
|
||||
```bash
|
||||
python scripts/preload_models.py
|
||||
```
|
||||
|
||||
If you do not run this script in advance, the GFPGAN module will attempt
|
||||
to download the models files the first time you try to perform facial
|
||||
If you do not run this script in advance, the GFPGAN module will attempt to
|
||||
download the models files the first time you try to perform facial
|
||||
reconstruction.
|
||||
|
||||
Alternatively, if you have GFPGAN installed elsewhere, or if you are
|
||||
using an earlier version of this package which asked you to install
|
||||
GFPGAN in a sibling directory, you may use the `--gfpgan_dir` argument
|
||||
with `invoke.py` to set a custom path to your GFPGAN directory. _There
|
||||
are other GFPGAN related boot arguments if you wish to customize
|
||||
further._
|
||||
|
||||
## Usage
|
||||
|
||||
You will now have access to two new prompt arguments.
|
||||
@ -119,15 +109,15 @@ actions.
|
||||
This repo also allows you to perform face restoration using
|
||||
[CodeFormer](https://github.com/sczhou/CodeFormer).
|
||||
|
||||
In order to setup CodeFormer to work, you need to download the models
|
||||
like with GFPGAN. You can do this either by running
|
||||
`preload_models.py` or by manually downloading the [model
|
||||
file](https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth)
|
||||
In order to setup CodeFormer to work, you need to download the models like with
|
||||
GFPGAN. You can do this either by running `preload_models.py` or by manually
|
||||
downloading the
|
||||
[model file](https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth)
|
||||
and saving it to `ldm/invoke/restoration/codeformer/weights` folder.
|
||||
|
||||
You can use `-ft` prompt argument to swap between CodeFormer and the
|
||||
default GFPGAN. The above mentioned `-G` prompt argument will allow
|
||||
you to control the strength of the restoration effect.
|
||||
You can use `-ft` prompt argument to swap between CodeFormer and the default
|
||||
GFPGAN. The above mentioned `-G` prompt argument will allow you to control the
|
||||
strength of the restoration effect.
|
||||
|
||||
### Usage
|
||||
|
||||
@ -157,9 +147,9 @@ situations when there is very little facial data to work with.
|
||||
## Fixing Previously-Generated Images
|
||||
|
||||
It is easy to apply face restoration and/or upscaling to any
|
||||
previously-generated file. Just use the syntax `!fix path/to/file.png
|
||||
<options>`. For example, to apply GFPGAN at strength 0.8 and upscale
|
||||
2X for a file named `./outputs/img-samples/000044.2945021133.png`,
|
||||
previously-generated file. Just use the syntax
|
||||
`!fix path/to/file.png <options>`. For example, to apply GFPGAN at strength 0.8
|
||||
and upscale 2X for a file named `./outputs/img-samples/000044.2945021133.png`,
|
||||
just run:
|
||||
|
||||
```bash
|
||||
|
117
docs/features/UNIFIED_CANVAS.md
Normal file
@ -0,0 +1,117 @@
|
||||
The Unified Canvas is a tool designed to streamline and simplify the process of composing an image using Stable Diffusion. It offers artists all of the available Stable Diffusion generation modes (Text To Image, Image To Image, Inpainting, and Outpainting) as a single unified workflow. The flexibility of the tool allows you to tweak and edit image generations, extend images beyond their initial size, and to create new content in a freeform way both inside and outside of existing images.
|
||||
|
||||
This document explains the basics of using the Unified Canvas, introducing you to its features and tools one by one. It also describes some of the more advanced tools available to power users of the Canvas.
|
||||
|
||||
# Basics
|
||||
The Unified Canvas consists of two layers: the **Base Layer** and the **Mask Layer**. You can swap from one layer to the other by selecting the layer you want in the drop-down menu on the top left corner of the Unified Canvas, or by pressing the (Q) hotkey.
|
||||
|
||||
### Base Layer
|
||||
The **Base Layer** is the image content currently managed by the Canvas, and can be exported at any time to the gallery by using the **Save to Gallery** option. When the Base Layer is selected, the Brush (B) and Eraser (E) tools will directly manipulate the base layer. Any images uploaded to the Canvas, or sent to the Unified Canvas from the gallery, will clear out all existing content and set the Base layer to the new image.
|
||||
|
||||
### Staging Area
|
||||
When you generate images, they will display in the Canvas's **Staging Area**, alongside the Staging Area toolbar buttons. While the Staging Area is active, you cannot interact with the Canvas itself.
|
||||
|
||||
<figure markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
Accepting generations will commit the new generation to the **Base Layer**. You can review all generated images using the Prev/Next arrows, save any individual generations to your gallery (without committing to the Base layer) or discard generations. While you can Undo a discard in an individual Canvas session, any generations that are not saved will be lost when the Canvas resets.
|
||||
|
||||
### Mask Layer
|
||||
The **Mask Layer** consists of any masked sections that have been created to inform Inpainting generations. You can paint a new mask, or edit an existing mask, using the Brush tool and the Eraser with the Mask layer set as your Active layer. Any masked areas will only affect generation inside of the current bounding box.
|
||||
|
||||
### Bounding Box
|
||||
When generating a new image, Invoke will process and apply new images within the area denoted by the **Bounding Box**. The Width & Height settings of the Bounding Box, as well as its location within the Unified Canvas and pixels or empty space that it encloses, determine how new invocations are generated - see [Inpainting & Outpainting](#inpainting-and-outpainting) below. The Bounding Box can be moved and resized using the Move (V) tool. It can also be resized using the Bounding Box options in the Options Panel. By using these controls you can generate larger or smaller images, control which sections of the image are being processed, as well as control Bounding Box tools like the Bounding Box fill/erase.
|
||||
|
||||
### <a name="inpainting-and-outpainting"></a> Inpainting & Outpainting
|
||||
"Inpainting" means asking the AI to refine part of an image while leaving the rest alone. For example, updating a portrait of your grandmother to have her wear a biker's jacket.
|
||||
|
||||
<figure markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
<figure markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
"Outpainting" means asking the AI to expand the original image beyond its original borders, making a bigger image that's still based on the original. For example, extending the above image of your Grandmother in a biker's jacket to include her wearing jeans (and while we're at it, a motorcycle!)
|
||||
|
||||
<figure markdown>
|
||||

|
||||
</figure>
|
||||
|
||||
When you are using the Unified Canvas, Invoke decides automatically whether to do Inpainting, Outpainting, ImageToImage, or TextToImage by looking inside the area enclosed by the Bounding Box. It chooses the appropriate type of generation based on whether the Bounding Box contains empty (transparent) areas on the Base layer, or whether it contains colored areas from previous generations (or from painted brushstrokes) on the Base layer, and/or whether the Mask layer contains any brushstrokes. See [Generation Methods](#generation-methods) below for more information.
|
||||
|
||||
# Getting Started
|
||||
|
||||
To get started with the Unified Canvas, you will want to generate a new base layer using Txt2Img or importing an initial image. We'll refer to either of these methods as the "initial image" in the below guide.
|
||||
|
||||
From there, you can consider the following techniques to augment your image:
|
||||
* **New Images**: Move the bounding box to an empty area of the Canvas, type in your prompt, and Invoke, to generate a new image using the Text to Image function.
|
||||
* **Image Correction**: Use the color picker and brush tool to paint corrections on the image, switch to the Mask layer, and brush a mask over your painted area to use **Inpainting**. You can also use the **ImageToImage** generation method to invoke new interpretations of the image.
|
||||
* **Image Expansion**: Move the bounding box to include a portion of your initial image, and a portion of transparent/empty pixels, then Invoke using a prompt that describes what you'd like to see in that area. This will Outpaint the image. You'll typically find more coherent results if you keep about 50-60% of the original image in the bounding box. Make sure that the Image To Image Strength slider is set to a high value - you may need to set it higher than you are used to.
|
||||
* **New Content on Existing Images**: If you want to add new details or objects into your image, use the brush tool to paint a sketch of what you'd like to see on the image, switch to the Mask layer, and brush a mask over your painted area to use **Inpainting**. If the masked area is small, consider using a smaller bounding box to take advantage of Invoke's automatic Scaling features, which can help to produce better details.
|
||||
* **And more**: There are a number of creative ways to use the Canvas, and the above are just starting points. We're excited to see what you come up with!
|
||||
|
||||
|
||||
# <a name="generation-methods"></a> Generation Methods
|
||||
The Canvas can use all generation methods available (Txt2Img, Img2Img, Inpainting, and Outpainting), and these will be automatically selected and used based on the current selection area within the Bounding Box.
|
||||
|
||||
## Text to Image
|
||||
If the Bounding Box is placed over an area of Canvas with an **empty Base Layer**, invoking a new image will use **TextToImage**. This generates an entirely new image based on your prompt.
|
||||
|
||||
## Image to Image
|
||||
If the Bounding Box is placed over an area of Canvas with an **existing Base Layer area with no transparent pixels or masks**, invoking a new image will use **ImageToImage**. This uses the image within the bounding box and your prompt to interpret a new image. The image will be closer to your original image at lower Image to Image strengths.
|
||||
|
||||
## Inpainting
|
||||
If the Bounding Box is placed over an area of Canvas with an **existing Base Layer and any pixels selected using the Mask layer**, invoking a new image will use **Inpainting**. Inpainting uses the existing colors/forms in the masked area in order to generate a new image for the masked area only. The unmasked portion of the image will remain the same. Image to Image strength applies to the inpainted area.
|
||||
|
||||
If you desire something completely different from the original image in your new generation (i.e., if you want Invoke to ignore existing colors/forms), consider toggling the Inpaint Replace setting on, and use high values for both Inpaint Replace and Image To Image Strength.
|
||||
|
||||
> Note: By default, the **Scale Before Processing** option — which inpaints more coherent details by generating at a larger resolution and then scaling — is only activated when the Bounding Box is relatively small. To get the best inpainting results you should therefore resize your Bounding Box to the smallest area that contains your mask and enough surrounding detail to help Stable Diffusion understand the context of what you want it to draw. You should also update your prompt so that it describes *just* the area within the Bounding Box.
|
||||
|
||||
## Outpainting
|
||||
If the Bounding Box is placed over an area of Canvas partially filled by an existing Base Layer area and partially by transparent pixels or masks, invoking a new image will use **Outpainting**, as well as **Inpainting** any masked areas.
|
||||
|
||||
____
|
||||
|
||||
# Advanced Features
|
||||
|
||||
Features with non-obvious behavior are detailed below, in order to provide clarity on the intent and common use cases we expect for utilizing them.
|
||||
|
||||
## Toolbar
|
||||
|
||||
### Mask Options
|
||||
* **Enable Mask** - This flag can be used to Enable or Disable the currently painted mask. If you have painted a mask, but you don't want it affect the next invocation, but you *also* don't want to delete it, then you can set this option to Disable. When you want the mask back, set this back to Enable.
|
||||
* **Preserve Masked Area** - When enabled, Preserve Masked Area inverts the effect of the Mask on the Inpainting process. Pixels in masked areas will be kept unchanged, and unmasked areas will be regenerated.
|
||||
|
||||
### Creative Tools
|
||||
* **Brush - Base/Mask Modes** - The Brush tool switches automatically between different modes of operation for the Base and Mask layers respectively.
|
||||
* On the Base layer, the brush will directly paint on the Canvas using the color selected on the Brush Options menu.
|
||||
* On the Mask layer, the brush will create a new mask. If you're finding the mask difficult to see over the existing content of the Unified Canvas, you can change the color it is drawn with using the color selector on the Mask Options dropdown.
|
||||
* **Erase Bounding Box** - On the Base layer, erases all pixels within the Bounding Box.
|
||||
* **Fill Bounding Box** - On the Base layer, fills all pixels within the Bounding Box with the currently selected color.
|
||||
|
||||
### Canvas Tools
|
||||
* **Move Tool** - Allows for manipulation of the Canvas view (by dragging on the Canvas, outside the bounding box), the Bounding Box (by dragging the edges of the box), or the Width/Height of the Bounding Box (by dragging one of the 9 directional handles).
|
||||
* **Reset View** - Click to re-orients the view to the center of the Bounding Box.
|
||||
* **Merge Visible** - If your browser is having performance problems drawing the image in the Unified Canvas, click this to consolidate all of the information currently being rendered by your browser into a merged copy of the image. This lowers the resource requirements and should improve performance.
|
||||
|
||||
## Seam Correction
|
||||
When doing Inpainting or Outpainting, Invoke needs to merge the pixels generated by Stable Diffusion into your existing image. To do this, the area around the `seam` at the boundary between your image and the new generation is automatically blended to produce a seamless output. In a fully automatic process, a mask is generated to cover the seam, and then the area of the seam is Inpainted.
|
||||
|
||||
Although the default options should work well most of the time, sometimes it can help to alter the parameters that control the seam Inpainting. A wider seam and a blur setting of about 1/3 of the seam have been noted as producing consistently strong results (e.g. 96 wide and 16 blur - adds up to 32 blur with both sides). Seam strength of 0.7 is best for reducing hard seams.
|
||||
* **Seam Size** - The size of the seam masked area. Set higher to make a larger mask around the seam.
|
||||
* **Seam Blur** - The size of the blur that is applied on *each* side of the masked area.
|
||||
* **Seam Strength** - The Image To Image Strength parameter used for the Inpainting generation that is applied to the seam area.
|
||||
* **Seam Steps** - The number of generation steps that should be used to Inpaint the seam.
|
||||
|
||||
## Infill & Scaling
|
||||
* **Scale Before Processing & W/H**: When generating images with a bounding box smaller than the optimized W/H of the model (e.g., 512x512 for SD1.5), this feature first generates at a larger size with the same aspect ratio, and then scales that image down to fill the selected area. This is particularly useful when inpainting very small details. Scaling is optional but is enabled by default.
|
||||
* **Inpaint Replace**: When Inpainting, the default method is to utilize the existing RGB values of the Base layer to inform the generation process. If Inpaint Replace is enabled, noise is generated and blended with the existing pixels (completely replacing the original RGB values at an Inpaint Replace value of 1). This can help generate more variation from the pixels on the Base layers.
|
||||
* > When using Inpaint Replace you should use a higher Image To Image Strength value, especially at higher Inpaint Replace values
|
||||
* **Infill Method**: Invoke currently supports two methods for producing RGB values for use in the Outpainting process: Patchmatch and Tile. We believe that Patchmatch is the superior method, however we provide support for Tile in case Patchmatch cannot be installed or is unavailable on your computer.
|
||||
* **Tile Size**: The Tile method for Outpainting sources small portions of the original image and randomly place these into the areas being Outpainted. This value sets the size of those tiles.
|
||||
|
||||
# Hot Keys
|
||||
The Unified Canvas is a tool that excels when you use hotkeys. You can view the full list of keyboard shortcuts, updated with all new features, by clicking the Keyboard Shortcuts icon at the top right of the InvokeAI WebUI.
|
@ -303,6 +303,8 @@ The WebGUI is only rapid development. Check back regularly for updates!
|
||||
| `--cors [CORS ...]` | Additional allowed origins, comma-separated |
|
||||
| `--host HOST` | Web server: Host or IP to listen on. Set to 0.0.0.0 to accept traffic from other devices on your network. |
|
||||
| `--port PORT` | Web server: Port to listen on |
|
||||
| `--certfile CERTFILE` | Web server: Path to certificate file to use for SSL. Use together with --keyfile |
|
||||
| `--keyfile KEYFILE` | Web server: Path to private key file to use for SSL. Use together with --certfile' |
|
||||
| `--gui` | Start InvokeAI GUI - This is the "desktop mode" version of the web app. It uses Flask to create a desktop app experience of the webserver. |
|
||||
|
||||
### Web Specific Features
|
||||
|
@ -80,12 +80,11 @@ Mac and Linux machines, and runs on GPU cards with as little as 4 GB or RAM.
|
||||
|
||||
## :octicons-package-dependencies-24: Installation
|
||||
|
||||
This fork is supported across multiple platforms. You can find individual
|
||||
installation instructions below.
|
||||
|
||||
- :fontawesome-brands-linux: [Linux](installation/INSTALL_LINUX.md)
|
||||
- :fontawesome-brands-windows: [Windows](installation/INSTALL_WINDOWS.md)
|
||||
- :fontawesome-brands-apple: [Macintosh](installation/INSTALL_MAC.md)
|
||||
This fork is supported across Linux, Windows and Macintosh. Linux
|
||||
users can use either an Nvidia-based card (with CUDA support) or an
|
||||
AMD card (using the ROCm driver). For full installation and upgrade
|
||||
instructions, please see:
|
||||
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/)
|
||||
|
||||
## :fontawesome-solid-computer: Hardware Requirements
|
||||
|
||||
@ -120,9 +119,36 @@ You wil need one of the following:
|
||||
```bash
|
||||
(invokeai) ~/InvokeAI$ python scripts/invoke.py --full_precision
|
||||
```
|
||||
## :octicons-gift-24: InvokeAI Features
|
||||
|
||||
- [The InvokeAI Web Interface](features/WEB.md)
|
||||
- [WebGUI hotkey reference guide](features/WEBUIHOTKEYS.md)
|
||||
<!-- this link does not exist - [WebGUI Unified Canvas for Img2Img, inpainting and outpainting](features/UNIFIED_CANVAS.md) -->
|
||||
- [The Command Line Interace](features/CLI.md)
|
||||
- [Image2Image](features/IMG2IMG.md)
|
||||
- [Inpainting](features/INPAINTING.md)
|
||||
- [Outpainting](features/OUTPAINTING.md)
|
||||
- [Adding custom styles and subjects](features/CONCEPTS.md)
|
||||
- [Upscaling and Face Reconstruction](features/POSTPROCESS.md)
|
||||
<!-- seperator -->
|
||||
- [Generating Variations](features/VARIATIONS.md)
|
||||
<!-- seperator -->
|
||||
- [Prompt Engineering](features/PROMPTS.md)
|
||||
<!-- seperator -->
|
||||
- Miscellaneous
|
||||
- [Embiggen upscaling](features/EMBIGGEN.md)
|
||||
- [Other](features/OTHER.md)
|
||||
|
||||
## :octicons-log-16: Latest Changes
|
||||
|
||||
### v2.1.3 <small>(13 November 2022)</small>
|
||||
|
||||
- A choice of installer scripts that automate installation and configuration. See [Installation](https://github.com/invoke-ai/InvokeAI/blob/2.1.3-rc6/docs/installation/INSTALL.md).
|
||||
- A streamlined manual installation process that works for both Conda and PIP-only installs. See [Manual Installation](https://github.com/invoke-ai/InvokeAI/blob/2.1.3-rc6/docs/installation/INSTALL_MANUAL.md).
|
||||
- The ability to save frequently-used startup options (model to load, steps, sampler, etc) in a `.invokeai` file. See [Client](https://github.com/invoke-ai/InvokeAI/blob/2.1.3-rc6/docs/features/CLI.md)
|
||||
- Support for AMD GPU cards (non-CUDA) on Linux machines.
|
||||
- Multiple bugs and edge cases squashed.
|
||||
|
||||
### v2.1.0 <small>(2 November 2022)</small>
|
||||
|
||||
- [Inpainting](https://invoke-ai.github.io/InvokeAI/features/INPAINTING/)
|
||||
|
@ -1,57 +0,0 @@
|
||||
---
|
||||
title: Installation Overview
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
We offer several ways to install InvokeAI, each one suited to your
|
||||
experience and preferences.
|
||||
|
||||
1. [1-click installer](INSTALL_1CLICK.md)
|
||||
|
||||
This is an automated shell script that will handle installation of
|
||||
all dependencies for you, and is recommended for those who have
|
||||
limited or no experience with the Python programming language, are
|
||||
not currently interested in contributing to the project, and just want
|
||||
the thing to install and run. In this version, you interact with the
|
||||
web server and command-line clients through a shell script named
|
||||
`invoke.sh` (Linux/Mac) or `invoke.bat` (Windows), and perform
|
||||
updates using `update.sh` and `update.bat`.
|
||||
|
||||
2. [Pre-compiled PIP installer](INSTALL_PCP.md)
|
||||
|
||||
This is a series of installer files for which all the requirements
|
||||
for InvokeAI have been precompiled, thereby preventing the conflicts
|
||||
that sometimes occur when an external library is changed unexpectedly.
|
||||
It will leave you with an environment in which you interact directly
|
||||
with the scripts for running the web and command line clients, and
|
||||
you will update to new versions using standard developer commands.
|
||||
|
||||
This method is recommended for users with a bit of experience using
|
||||
the `git` and `pip` tools.
|
||||
|
||||
3. [Manual Installation](INSTALL_MANUAL.md)
|
||||
|
||||
In this method you will manually run the commands needed to install
|
||||
InvokeAI and its dependencies. We offer two recipes: one suited to
|
||||
those who prefer the `conda` tool, and one suited to those who prefer
|
||||
`pip` and Python virtual environments.
|
||||
|
||||
This method is recommended for users who have previously used `conda`
|
||||
or `pip` in the past, developers, and anyone who wishes to remain on
|
||||
the cutting edge of future InvokeAI development and is willing to put
|
||||
up with occasional glitches and breakage.
|
||||
|
||||
4. [Docker Installation](INSTALL_DOCKER.md)
|
||||
|
||||
We also offer a method for creating Docker containers containing
|
||||
InvokeAI and its dependencies. This method is recommended for
|
||||
individuals with experience with Docker containers and understand
|
||||
the pluses and minuses of a container-based install.
|
||||
|
||||
5. [Jupyter Notebooks Installation](INSTALL_JUPYTER.md)
|
||||
|
||||
This method is suitable for running InvokeAI on a Google Colab
|
||||
account. It is recommended for individuals who have previously
|
||||
worked on the Colab and are comfortable with the Jupyter notebook
|
||||
environment.
|
@ -1,164 +0,0 @@
|
||||
---
|
||||
title: The "One-Click" Installer
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
The one-click installer is a shell script that attempts to automate
|
||||
every step needed to install and run InvokeAI on a stock computer
|
||||
running recent versions of Linux, MacOSX or Windows.
|
||||
|
||||
Before you begin, make sure that you meet the [hardware
|
||||
requirements](index.md#Hardware_Requirements) and has the appropriate
|
||||
GPU drivers installed. In particular, if you are a Linux user with an
|
||||
AMD GPU installed, you may need to install the [ROCm
|
||||
driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||
|
||||
Installation requires roughly 18G of free disk space to load the
|
||||
libraries and recommended model weights files.
|
||||
|
||||
## Walk through
|
||||
|
||||
Though there are multiple steps, there really is only one click
|
||||
involved to kick off the process.
|
||||
|
||||
1. The 1-click installer is distributed in ZIP files. Download the one
|
||||
that is appropriate for your operating system:
|
||||
|
||||
!!! todo "Change the URLs after release"
|
||||
|
||||
- [invokeAI-mac.zip](https://github.com/invoke-ai/InvokeAI/releases/download/2.1.3-rc1/invokeAI-mac.zip)
|
||||
- [invokeAI-linux.zip](https://github.com/invoke-ai/InvokeAI/releases/download/2.1.3-rc1/invokeAI-linux.zip)
|
||||
- [invokeAI-windows.zip](https://github.com/invoke-ai/InvokeAI/releases/download/2.1.3-rc1/invokeAI-windows.zip)
|
||||
|
||||
2. Unpack the zip file into a directory that has at least 18G of free
|
||||
space. Do *not* unpack into a directory that has an earlier version of
|
||||
InvokeAI.
|
||||
|
||||
This will create a new directory named "InvokeAI". This example
|
||||
shows how this would look using the `unzip` command-line tool,
|
||||
but you may use any graphical or command-line Zip extractor:
|
||||
|
||||
```bash
|
||||
C:\Documents\Linco> unzip invokeAI-windows.zip
|
||||
Archive: C: \Linco\Downloads\invokeAI-linux.zip
|
||||
creating: invokeAI\
|
||||
inflating: invokeAI\install.bat
|
||||
inflating: invokeAI\readme.txt
|
||||
```
|
||||
|
||||
3. If you are using a desktop GUI, double-click the installer file.
|
||||
It will be named `install.bat` on Windows systems and `install.sh`
|
||||
on Linux and Macintosh systems.
|
||||
|
||||
4. Alternatively, form the command line, run the shell script or .bat
|
||||
file:
|
||||
|
||||
```bash
|
||||
C:\Documents\Linco> cd invokeAI
|
||||
C:\Documents\Linco> install.bat
|
||||
```
|
||||
|
||||
5. Sit back and let the install script work. It will install various
|
||||
binary requirements including Conda, Git and Python, then download
|
||||
the current InvokeAI code and install it along with its
|
||||
dependencies.
|
||||
|
||||
6. After installation completes, the installer will launch a script
|
||||
called `preload_models.py`, which will guide you through the
|
||||
first-time process of selecting one or more Stable Diffusion model
|
||||
weights files, downloading and configuring them.
|
||||
|
||||
Note that the main Stable Diffusion weights file is protected by a
|
||||
license agreement that you must agree to in order to use. The
|
||||
script will list the steps you need to take to create an account on
|
||||
the official site that hosts the weights files, accept the
|
||||
agreement, and provide an access token that allows InvokeAI to
|
||||
legally download and install the weights files.
|
||||
|
||||
If you have already downloaded the weights file(s) for another
|
||||
Stable Diffusion distribution, you may skip this step (by selecting
|
||||
"skip" when prompted) and configure InvokeAI to use the
|
||||
previously-downloaded files. The process for this is described in
|
||||
[INSTALLING_MODELS.md].
|
||||
|
||||
7. The script will now exit and you'll be ready to generate some
|
||||
images. The invokeAI directory will contain numerous files. Look
|
||||
for a shell script named `invoke.sh` (Linux/Mac) or `invoke.bat`
|
||||
(Windows). Launch the script by double-clicking it or typing
|
||||
its name at the command-line:
|
||||
|
||||
```bash
|
||||
C:\Documents\Linco\invokeAI> cd invokeAI
|
||||
C:\Documents\Linco\invokeAI> invoke.bat
|
||||
```
|
||||
|
||||
The `invoke.bat` (`invoke.sh`) script will give you the choice of
|
||||
starting (1) the command-line interface, or (2) the web GUI. If you
|
||||
start the latter, you can load the user interface by pointing your
|
||||
browser at http://localhost:9090.
|
||||
|
||||
The `invoke` script also offers you a third option labeled "open
|
||||
the developer console". If you choose this option, you will be
|
||||
dropped into a command-line interface in which you can run python
|
||||
commands directly, access developer tools, and launch InvokeAI
|
||||
with customized options. To do the latter, you would launch the
|
||||
script `scripts/invoke.py` as shown in this example:
|
||||
|
||||
```bash
|
||||
python scripts\invoke.py --web --max_load_models=3 \
|
||||
--model=waifu-1.3 --steps=30 --outdir=C:/Documents/AIPhotos
|
||||
```
|
||||
|
||||
These options are described in detail in the [Command-Line
|
||||
Interface](../features/CLI.md) documentation.
|
||||
|
||||
## Updating to newer versions
|
||||
|
||||
This section describes how to update InvokeAI to new versions of the
|
||||
software.
|
||||
|
||||
### Updating the stable version
|
||||
|
||||
This distribution is changing rapidly, and we add new features on a
|
||||
daily basis. To update to the latest released version (recommended),
|
||||
run the `update.sh` (Linux/Mac) or `update.bat` (Windows)
|
||||
scripts. This will fetch the latest release and re-run the
|
||||
`preload_models` script to download any updated models files that may
|
||||
be needed. You can also use this to add additional models that you did
|
||||
not select at installation time.
|
||||
|
||||
### Updating to the development version
|
||||
|
||||
There may be times that there is a feature in the `development` branch
|
||||
of InvokeAI that you'd like to take advantage of. Or perhaps there is
|
||||
a branch that corrects an annoying bug. To do this, you will use the
|
||||
developer's console.
|
||||
|
||||
From within the invokeAI directory, run the command `invoke.sh`
|
||||
(Linux/Mac) or `invoke.bat` (Windows) and selection option (3) to open
|
||||
the developers console. Then run the following command to get the
|
||||
`development branch`:
|
||||
|
||||
```bash
|
||||
git checkout development
|
||||
git pull
|
||||
conda env update
|
||||
```
|
||||
|
||||
You can now close the developer console and run `invoke` as before.
|
||||
If you get complaints about missing models, then you may need to do
|
||||
the additional step of running `preload_models.py`. This happens
|
||||
relatively infrequently. To do this, simply open up the developer's
|
||||
console again and type `python scripts/preload_models.py`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you run into problems during or after installation, the InvokeAI
|
||||
team is available to help you. Either create an
|
||||
[Issue](https://github.com/invoke-ai/InvokeAI/issues) at our GitHub
|
||||
site, or make a request for help on the "bugs-and-support" channel of
|
||||
our [Discord server](https://discord.gg/ZmtBAhwWhy). We are a 100%
|
||||
volunteer organization, but typically somebody will be available to
|
||||
help you within 24 hours, and often much sooner.
|
||||
|
@ -4,12 +4,17 @@ title: Docker
|
||||
|
||||
# :fontawesome-brands-docker: Docker
|
||||
|
||||
## Before you begin
|
||||
!!! warning "For end users"
|
||||
|
||||
- For end users: Install InvokeAI locally using the instructions for your OS.
|
||||
- For developers: For container-related development tasks or for enabling easy
|
||||
deployment to other environments (on-premises or cloud), follow these
|
||||
instructions. For general use, install locally to leverage your machine's GPU.
|
||||
We highly recommend to Install InvokeAI locally using [these instructions](index.md)"
|
||||
|
||||
!!! tip "For developers"
|
||||
|
||||
For container-related development tasks or for enabling easy
|
||||
deployment to other environments (on-premises or cloud), follow these
|
||||
instructions.
|
||||
|
||||
For general use, install locally to leverage your machine's GPU.
|
||||
|
||||
## Why containers?
|
||||
|
||||
@ -37,16 +42,19 @@ another environment with NVIDIA GPUs on-premises or in the cloud.
|
||||
|
||||
#### Install [Docker](https://github.com/santisbon/guides#docker)
|
||||
|
||||
On the Docker Desktop app, go to Preferences, Resources, Advanced. Increase the
|
||||
CPUs and Memory to avoid this
|
||||
On the [Docker Desktop app](https://docs.docker.com/get-docker/), go to
|
||||
Preferences, Resources, Advanced. Increase the CPUs and Memory to avoid this
|
||||
[Issue](https://github.com/invoke-ai/InvokeAI/issues/342). You may need to
|
||||
increase Swap and Disk image size too.
|
||||
|
||||
#### Get a Huggingface-Token
|
||||
|
||||
Go to [Hugging Face](https://huggingface.co/settings/tokens), create a token and
|
||||
temporary place it somewhere like a open texteditor window (but dont save it!,
|
||||
only keep it open, we need it in the next step)
|
||||
Besides the Docker Agent you will need an Account on
|
||||
[huggingface.co](https://huggingface.co/join).
|
||||
|
||||
After you succesfully registered your account, go to
|
||||
[huggingface.co/settings/tokens](https://huggingface.co/settings/tokens), create
|
||||
a token and copy it, since you will need in for the next step.
|
||||
|
||||
### Setup
|
||||
|
||||
@ -64,14 +72,19 @@ created in the last step.
|
||||
|
||||
Some Suggestions of variables you may want to change besides the Token:
|
||||
|
||||
| Environment-Variable | Default value | Description |
|
||||
| ------------------------- | ----------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `HUGGINGFACE_TOKEN` | No default, but **required**! | This is the only **required** variable, without you can't get the checkpoint |
|
||||
| `ARCH` | x86_64 | if you are using a ARM based CPU |
|
||||
| `INVOKEAI_TAG` | invokeai-x86_64 | the Container Repository / Tag which will be used |
|
||||
| `INVOKEAI_CONDA_ENV_FILE` | environment-lin-cuda.yml | since environment.yml wouldn't work with aarch |
|
||||
| `INVOKEAI_GIT` | invoke-ai/InvokeAI | the repository to use |
|
||||
| `INVOKEAI_BRANCH` | main | the branch to checkout |
|
||||
<figure markdown>
|
||||
|
||||
| Environment-Variable | Default value | Description |
|
||||
| -------------------- | ----------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `HUGGINGFACE_TOKEN` | No default, but **required**! | This is the only **required** variable, without it you can't download the huggingface models |
|
||||
| `PROJECT_NAME` | `invokeai` | affects the project folder, tag- and volume name |
|
||||
| `VOLUMENAME` | `${PROJECT_NAME}_data` | Name of the Docker Volume where model files will be stored |
|
||||
| `ARCH` | `x86_64` | can be changed to f.e. aarch64 if you are using a ARM based CPU |
|
||||
| `INVOKEAI_TAG` | `${PROJECT_NAME}:${ARCH}` | the Container Repository / Tag which will be used |
|
||||
| `PIP_REQUIREMENTS` | `requirements-lin-cuda.txt` | the requirements file to use (from `environments-and-requirements`) |
|
||||
| `INVOKE_DOCKERFILE` | `docker-build/Dockerfile` | the Dockerfile which should be built, handy for development |
|
||||
|
||||
</figure>
|
||||
|
||||
#### Build the Image
|
||||
|
||||
@ -94,25 +107,25 @@ After the build process is done, you can run the container via the provided
|
||||
./docker-build/run.sh
|
||||
```
|
||||
|
||||
When used without arguments, the container will start the website and provide
|
||||
When used without arguments, the container will start the webserver and provide
|
||||
you the link to open it. But if you want to use some other parameters you can
|
||||
also do so.
|
||||
|
||||
!!! example
|
||||
!!! example "run script example"
|
||||
|
||||
```bash
|
||||
docker-build/run.sh --from_file tests/validate_pr_prompt.txt
|
||||
./docker-build/run.sh "banana sushi" -Ak_lms -S42 -s10
|
||||
```
|
||||
|
||||
The output folder is located on the volume which is also used to store the model.
|
||||
This would generate the legendary "banana sushi" with Seed 42, k_lms Sampler and 10 steps.
|
||||
|
||||
Find out more about available CLI-Parameter at [features/CLI.md](../features/CLI.md)
|
||||
Find out more about available CLI-Parameters at [features/CLI.md](../../features/CLI/#arguments)
|
||||
|
||||
---
|
||||
|
||||
!!! warning "Deprecated"
|
||||
|
||||
From here on you will find the rest of the previous Docker-Docs, which will still
|
||||
From here on you will find the the previous Docker-Docs, which will still
|
||||
provide some usefull informations.
|
||||
|
||||
## Usage (time to have fun)
|
||||
|
64
docs/installation/INSTALL_INVOKE.md
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
title: InvokeAI Installer
|
||||
---
|
||||
|
||||
The InvokeAI installer is a shell script that will install InvokeAI onto a stock
|
||||
computer running recent versions of Linux, MacOSX or Windows. It will leave you
|
||||
with a version that runs a stable version of InvokeAI. When a new version of
|
||||
InvokeAI is released, you will download and reinstall the new version.
|
||||
|
||||
If you wish to tinker with unreleased versions of InvokeAI that introduce
|
||||
potentially unstable new features, you should consider using the
|
||||
[source installer](INSTALL_SOURCE.md) or one of the
|
||||
[manual install](INSTALL_MANUAL.md) methods.
|
||||
|
||||
**Important Caveats**
|
||||
- This script does not support AMD GPUs. For Linux AMD support,
|
||||
please use the manual or source code installer methods.
|
||||
|
||||
- This script has difficulty on some Macintosh machines
|
||||
that have previously been used for Python development due to
|
||||
conflicting development tools versions. Mac developers may wish
|
||||
to try the source code installer or one of the manual methods instead.
|
||||
|
||||
!!! todo
|
||||
|
||||
Before you begin, make sure that you meet
|
||||
the[hardware requirements](/#hardware-requirements) and has the
|
||||
appropriate GPU drivers installed. In particular, if you are a Linux user with
|
||||
an AMD GPU installed, you may need to install the
|
||||
[ROCm-driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||
|
||||
Installation requires roughly 18G of free disk space to load the libraries and
|
||||
recommended model weights files.
|
||||
|
||||
## Steps to Install
|
||||
|
||||
1. Download the
|
||||
[latest release](https://github.com/invoke-ai/InvokeAI/releases/latest) of
|
||||
InvokeAI's installer for your platform
|
||||
|
||||
2. Place the downloaded package someplace where you have plenty of HDD space,
|
||||
and have full permissions (i.e. `~/` on Lin/Mac; your home folder on Windows)
|
||||
|
||||
3. Extract the 'InvokeAI' folder from the downloaded package
|
||||
|
||||
4. Open the extracted 'InvokeAI' folder
|
||||
|
||||
5. Double-click 'install.bat' (Windows), or 'install.sh' (Lin/Mac) (or run from
|
||||
a terminal)
|
||||
|
||||
6. Follow the prompts
|
||||
|
||||
7. After installation, please run the 'invoke.bat' file (on Windows) or
|
||||
'invoke.sh' file (on Linux/Mac) to start InvokeAI.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you run into problems during or after installation, the InvokeAI team is
|
||||
available to help you. Either create an
|
||||
[Issue](https://github.com/invoke-ai/InvokeAI/issues) at our GitHub site, or
|
||||
make a request for help on the "bugs-and-support" channel of our
|
||||
[Discord server](https://discord.gg/ZmtBAhwWhy). We are a 100% volunteer
|
||||
organization, but typically somebody will be available to help you within 24
|
||||
hours, and often much sooner.
|
@ -14,8 +14,7 @@ download the notebook from the link above and load it up in VSCode
|
||||
(with the appropriate extensions installed)/Jupyter/JupyterLab and
|
||||
start running the cells one-by-one.
|
||||
|
||||
Note that you will need NVIDIA drivers, Python 3.10, and Git installed beforehand.
|
||||
|
||||
!!! Note "you will need NVIDIA drivers, Python 3.10, and Git installed beforehand"
|
||||
|
||||
## Walkthrough
|
||||
|
||||
@ -25,4 +24,4 @@ Note that you will need NVIDIA drivers, Python 3.10, and Git installed beforehan
|
||||
|
||||
### Updating to the development version
|
||||
|
||||
## Troubleshooting
|
||||
## Troubleshooting
|
||||
|
@ -2,51 +2,54 @@
|
||||
title: Manual Installation
|
||||
---
|
||||
|
||||
# :fontawesome-brands-linux: Linux
|
||||
# :fontawesome-brands-apple: macOS
|
||||
# :fontawesome-brands-windows: Windows
|
||||
<figure markdown>
|
||||
# :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
|
||||
</figure>
|
||||
|
||||
!!! warning "This is for advanced Users"
|
||||
|
||||
who are already expirienced with using conda or pip
|
||||
|
||||
## Introduction
|
||||
|
||||
You have two choices for manual installation, the [first
|
||||
one](#Conda_method) based on the Anaconda3 package manager (`conda`),
|
||||
and [a second one](#PIP_method) which uses basic Python virtual
|
||||
environment (`venv`) commands and the PIP package manager. Both
|
||||
methods require you to enter commands on the command-line shell, also
|
||||
known as the "console".
|
||||
You have two choices for manual installation, the [first one](#Conda_method)
|
||||
based on the Anaconda3 package manager (`conda`), and
|
||||
[a second one](#PIP_method) which uses basic Python virtual environment (`venv`)
|
||||
commands and the PIP package manager. Both methods require you to enter commands
|
||||
on the terminal, also known as the "console".
|
||||
|
||||
On Windows systems you are encouraged to install and use the
|
||||
[Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3),
|
||||
which provides compatibility with Linux and Mac shells and nice
|
||||
features such as command-line completion.
|
||||
which provides compatibility with Linux and Mac shells and nice features such as
|
||||
command-line completion.
|
||||
|
||||
### Conda method
|
||||
|
||||
1. Check that your system meets the [hardware
|
||||
requirements](index.md#Hardware_Requirements) and has the appropriate
|
||||
GPU drivers installed. In particular, if you are a Linux user with an
|
||||
AMD GPU installed, you may need to install the [ROCm
|
||||
driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||
1. Check that your system meets the
|
||||
[hardware requirements](index.md#Hardware_Requirements) and has the
|
||||
appropriate GPU drivers installed. In particular, if you are a Linux user
|
||||
with an AMD GPU installed, you may need to install the
|
||||
[ROCm driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||
|
||||
InvokeAI does not yet support Windows machines with AMD GPUs due to
|
||||
the lack of ROCm driver support on this platform.
|
||||
InvokeAI does not yet support Windows machines with AMD GPUs due to the lack
|
||||
of ROCm driver support on this platform.
|
||||
|
||||
To confirm that the appropriate drivers are installed, run
|
||||
`nvidia-smi` on NVIDIA/CUDA systems, and `rocm-smi` on AMD
|
||||
systems. These should return information about the installed video
|
||||
card.
|
||||
To confirm that the appropriate drivers are installed, run `nvidia-smi` on
|
||||
NVIDIA/CUDA systems, and `rocm-smi` on AMD systems. These should return
|
||||
information about the installed video card.
|
||||
|
||||
Macintosh users with MPS acceleration, or anybody with a CPU-only
|
||||
system, can skip this step.
|
||||
Macintosh users with MPS acceleration, or anybody with a CPU-only system,
|
||||
can skip this step.
|
||||
|
||||
2. You will need to install Anaconda3 and Git if they are not already
|
||||
available. Use your operating system's preferred installer, or
|
||||
download installers from the following URLs
|
||||
2. You will need to install Anaconda3 and Git if they are not already
|
||||
available. Use your operating system's preferred package manager, or
|
||||
download the installers manually. You can find them here:
|
||||
|
||||
- Anaconda3 (https://www.anaconda.com/)
|
||||
- git (https://git-scm.com/downloads)
|
||||
- [Anaconda3](https://www.anaconda.com/)
|
||||
- [git](https://git-scm.com/downloads)
|
||||
|
||||
3. Copy the InvokeAI source code from GitHub using `git`:
|
||||
3. Clone the [InvokeAI](https://github.com/invoke-ai/InvokeAI) source code from
|
||||
GitHub:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/invoke-ai/InvokeAI.git
|
||||
@ -55,122 +58,158 @@ download installers from the following URLs
|
||||
This will create InvokeAI folder where you will follow the rest of the
|
||||
steps.
|
||||
|
||||
3. Enter the newly-created InvokeAI folder. From this step forward make sure
|
||||
that you are working in the InvokeAI directory!
|
||||
4. Enter the newly-created InvokeAI folder:
|
||||
|
||||
```bash
|
||||
cd InvokeAI
|
||||
```
|
||||
4. Select the appropriate environment file:
|
||||
|
||||
We have created a series of environment files suited for different
|
||||
operating systems and GPU hardware. They are located in the
|
||||
From this step forward make sure that you are working in the InvokeAI
|
||||
directory!
|
||||
|
||||
5. Select the appropriate environment file:
|
||||
|
||||
We have created a series of environment files suited for different operating
|
||||
systems and GPU hardware. They are located in the
|
||||
`environments-and-requirements` directory:
|
||||
|
||||
<figure markdown>
|
||||
|
||||
| filename | OS |
|
||||
| :----------------------: | :----------------------------: |
|
||||
| environment-lin-amd.yml | Linux with an AMD (ROCm) GPU |
|
||||
| environment-lin-cuda.yml | Linux with an NVIDIA CUDA GPU |
|
||||
| environment-mac.yml | Macintosh |
|
||||
| environment-win-cuda.yml | Windows with an NVIDA CUDA GPU |
|
||||
|
||||
</figure>
|
||||
|
||||
Choose the appropriate environment file for your system and link or copy it
|
||||
to `environment.yml` in InvokeAI's top-level directory. To do so, run
|
||||
following command from the repository-root:
|
||||
|
||||
!!! Example ""
|
||||
|
||||
=== "Macintosh and Linux"
|
||||
|
||||
!!! todo "Replace `xxx` and `yyy` with the appropriate OS and GPU codes as seen in the table above"
|
||||
|
||||
```bash
|
||||
ln -sf environments-and-requirements/environment-xxx-yyy.yml environment.yml
|
||||
```
|
||||
|
||||
When this is done, confirm that a file `environment.yml` has been linked in
|
||||
the InvokeAI root directory and that it points to the correct file in the
|
||||
`environments-and-requirements`.
|
||||
|
||||
```bash
|
||||
ls -la
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
||||
!!! todo " Since it requires admin privileges to create links, we will use the copy command to create your `environment.yml`"
|
||||
|
||||
```cmd
|
||||
copy environments-and-requirements\environment-win-cuda.yml environment.yml
|
||||
```
|
||||
|
||||
Afterwards verify that the file `environment.yml` has been created, either via the
|
||||
explorer or by using the command `dir` from the terminal
|
||||
|
||||
```cmd
|
||||
dir
|
||||
```
|
||||
|
||||
!!! warning "Do not try to run conda on directly on the subdirectory environments file. This won't work. Instead, copy or link it to the top-level directory as shown."
|
||||
|
||||
6. Create the conda environment:
|
||||
|
||||
```bash
|
||||
environment-lin-amd.yml # Linux with an AMD (ROCm) GPU
|
||||
environment-lin-cuda.yml # Linux with an NVIDIA CUDA GPU
|
||||
environment-mac.yml # Macintoshes with MPS acceleration
|
||||
environment-win-cuda.yml # Windows with an NVIDA CUDA GPU
|
||||
conda env update
|
||||
```
|
||||
|
||||
Select the appropriate environment file, and make a link to it
|
||||
from `environment.yml` in the top-level InvokeAI directory. The
|
||||
command to do this from the top-level directory is:
|
||||
This will create a new environment named `invokeai` and install all InvokeAI
|
||||
dependencies into it. If something goes wrong you should take a look at
|
||||
[troubleshooting](#troubleshooting).
|
||||
|
||||
!!! todo "Macintosh and Linux"
|
||||
|
||||
```bash
|
||||
ln -sf environments-and-requirements/environment-xxx-yyy.yml environment.yml
|
||||
```
|
||||
7. Activate the `invokeai` environment:
|
||||
|
||||
Replace `xxx` and `yyy` with the appropriate OS and GPU codes.
|
||||
In order to use the newly created environment you will first need to
|
||||
activate it
|
||||
|
||||
!!! todo "Windows requires admin privileges to make links, so we use the copy (cp) command"
|
||||
|
||||
```bash
|
||||
cp environments-and-requirements\environment-win-cuda.yml environment.yml
|
||||
```
|
||||
```bash
|
||||
conda activate invokeai
|
||||
```
|
||||
|
||||
When this is done, confirm that a file `environment.yml` has been created in
|
||||
the InvokeAI root directory and that it points to the correct file in the
|
||||
`environments-and-requirements`.
|
||||
Your command-line prompt should change to indicate that `invokeai` is active
|
||||
by prepending `(invokeai)`.
|
||||
|
||||
4. Run conda:
|
||||
8. Pre-Load the model weights files:
|
||||
|
||||
```bash
|
||||
conda env update
|
||||
```
|
||||
!!! tip
|
||||
|
||||
This will create a new environment named `invokeai` and install all
|
||||
InvokeAI dependencies into it.
|
||||
If you have already downloaded the weights file(s) for another Stable
|
||||
Diffusion distribution, you may skip this step (by selecting "skip" when
|
||||
prompted) and configure InvokeAI to use the previously-downloaded files. The
|
||||
process for this is described in [here](INSTALLING_MODELS.md).
|
||||
|
||||
If something goes wrong at this point, see
|
||||
[troubleshooting](#Troubleshooting).
|
||||
```bash
|
||||
python scripts/preload_models.py
|
||||
```
|
||||
|
||||
5. Activate the `invokeai` environment:
|
||||
The script `preload_models.py` will interactively guide you through the
|
||||
process of downloading and installing the weights files needed for InvokeAI.
|
||||
Note that the main Stable Diffusion weights file is protected by a license
|
||||
agreement that you have to agree to. The script will list the steps you need
|
||||
to take to create an account on the site that hosts the weights files,
|
||||
accept the agreement, and provide an access token that allows InvokeAI to
|
||||
legally download and install the weights files.
|
||||
|
||||
```bash
|
||||
conda activate invokeai
|
||||
```
|
||||
If you get an error message about a module not being installed, check that
|
||||
the `invokeai` environment is active and if not, repeat step 5.
|
||||
|
||||
Your command-line prompt should change to indicate that `invokeai` is active.
|
||||
9. Run the command-line- or the web- interface:
|
||||
|
||||
6. Load the model weights files:
|
||||
!!! example ""
|
||||
|
||||
```bash
|
||||
python scripts/preload_models.py
|
||||
```
|
||||
!!! warning "Make sure that the conda environment is activated, which should create `(invokeai)` in front of your prompt!"
|
||||
|
||||
(Windows users should use the backslash instead of the slash)
|
||||
=== "CLI"
|
||||
|
||||
The script `preload_models.py` will interactively guide you through
|
||||
downloading and installing the weights files needed for
|
||||
InvokeAI. Note that the main Stable Diffusion weights file is
|
||||
protected by a license agreement that you have to agree to. The
|
||||
script will list the steps you need to take to create an account on
|
||||
the site that hosts the weights files, accept the agreement, and
|
||||
provide an access token that allows InvokeAI to legally download
|
||||
and install the weights files.
|
||||
```bash
|
||||
python scripts/invoke.py
|
||||
```
|
||||
|
||||
If you have already downloaded the weights file(s) for another
|
||||
Stable Diffusion distribution, you may skip this step (by selecting
|
||||
"skip" when prompted) and configure InvokeAI to use the
|
||||
previously-downloaded files. The process for this is described in
|
||||
[INSTALLING_MODELS.md].
|
||||
=== "local Webserver"
|
||||
|
||||
If you get an error message about a module not being installed,
|
||||
check that the `invokeai` environment is active and if not, repeat
|
||||
step 5.
|
||||
```bash
|
||||
python scripts/invoke.py --web
|
||||
```
|
||||
|
||||
7. Run the command-line interface or the web interface:
|
||||
=== "Public Webserver"
|
||||
|
||||
```bash
|
||||
python scripts/invoke.py # command line
|
||||
python scripts/invoke.py --web # web interface
|
||||
```
|
||||
```bash
|
||||
python scripts/invoke.py --web --host 0.0.0.0
|
||||
```
|
||||
|
||||
(Windows users replace backslash with forward slash)
|
||||
|
||||
If you choose the run the web interface, point your browser at
|
||||
http://localhost:9090 in order to load the GUI.
|
||||
If you choose the run the web interface, point your browser at
|
||||
http://localhost:9090 in order to load the GUI.
|
||||
|
||||
8. Render away!
|
||||
10. Render away!
|
||||
|
||||
Browse the features listed in the [Stable Diffusion Toolkit
|
||||
Docs](https://invoke-ai.git) to learn about all the things you can
|
||||
do with InvokeAI.
|
||||
Browse the [features](../features/CLI.md) section to learn about all the things you
|
||||
can do with InvokeAI.
|
||||
|
||||
Note that some GPUs are slow to warm up. In particular, when using
|
||||
an AMD card with the ROCm driver, you may have to wait for over a
|
||||
minute the first time you try to generate an image. Fortunately, after
|
||||
the warm up period rendering will be fast.
|
||||
Note that some GPUs are slow to warm up. In particular, when using an AMD
|
||||
card with the ROCm driver, you may have to wait for over a minute the first
|
||||
time you try to generate an image. Fortunately, after the warm up period
|
||||
rendering will be fast.
|
||||
|
||||
9. Subsequently, to relaunch the script, be sure to run "conda
|
||||
activate invokeai", enter the `InvokeAI` directory, and then launch
|
||||
the invoke script. If you forget to activate the 'invokeai'
|
||||
environment, the script will fail with multiple `ModuleNotFound`
|
||||
errors.
|
||||
11. Subsequently, to relaunch the script, be sure to run "conda activate
|
||||
invokeai", enter the `InvokeAI` directory, and then launch the invoke
|
||||
script. If you forget to activate the 'invokeai' environment, the script
|
||||
will fail with multiple `ModuleNotFound` errors.
|
||||
|
||||
## Updating to newer versions of the script
|
||||
|
||||
@ -184,185 +223,207 @@ conda env update
|
||||
python scripts/preload_models.py --no-interactive #optional
|
||||
```
|
||||
|
||||
This will bring your local copy into sync with the remote one. The
|
||||
last step may be needed to take advantage of new features or released
|
||||
models. The `--no-interactive` flag will prevent the script from
|
||||
prompting you to download the big Stable Diffusion weights files.
|
||||
This will bring your local copy into sync with the remote one. The last step may
|
||||
be needed to take advantage of new features or released models. The
|
||||
`--no-interactive` flag will prevent the script from prompting you to download
|
||||
the big Stable Diffusion weights files.
|
||||
|
||||
## pip Install
|
||||
|
||||
To install InvokeAI with only the PIP package manager, please follow
|
||||
these steps:
|
||||
To install InvokeAI with only the PIP package manager, please follow these
|
||||
steps:
|
||||
|
||||
1. Make sure you are using Python 3.9 or higher. The rest of the install
|
||||
procedure depends on this:
|
||||
|
||||
```bash
|
||||
python -V
|
||||
```
|
||||
|
||||
2. Install the `virtualenv` tool if you don't have it already:
|
||||
```bash
|
||||
pip install virtualenv
|
||||
```
|
||||
|
||||
3. From within the InvokeAI top-level directory, create and activate a
|
||||
virtual environment named `invokeai`:
|
||||
|
||||
```bash
|
||||
virtualenv invokeai
|
||||
source invokeai/bin/activate
|
||||
```
|
||||
|
||||
4. Pick the correct `requirements*.txt` file for your hardware and
|
||||
operating system.
|
||||
|
||||
We have created a series of environment files suited for different
|
||||
operating systems and GPU hardware. They are located in the
|
||||
`environments-and-requirements` directory:
|
||||
1. Make sure you are using Python 3.9 or higher. The rest of the install
|
||||
procedure depends on this:
|
||||
|
||||
```bash
|
||||
requirements-lin-amd.txt # Linux with an AMD (ROCm) GPU
|
||||
requirements-lin-arm64.txt # Linux running on arm64 systems
|
||||
requirements-lin-cuda.txt # Linux with an NVIDIA (CUDA) GPU
|
||||
requirements-mac-mps-cpu.txt # Macintoshes with MPS acceleration
|
||||
requirements-lin-win-colab-cuda.txt # Windows with an NVIDA (CUDA) GPU
|
||||
# (supports Google Colab too)
|
||||
python -V
|
||||
```
|
||||
|
||||
Select the appropriate requirements file, and make a link to it
|
||||
from `environment.txt` in the top-level InvokeAI directory. The
|
||||
command to do this from the top-level directory is:
|
||||
2. Install the `virtualenv` tool if you don't have it already:
|
||||
|
||||
!!! todo "Macintosh and Linux"
|
||||
|
||||
```bash
|
||||
ln -sf environments-and-requirements/requirements-xxx-yyy.txt requirements.txt
|
||||
```
|
||||
```bash
|
||||
pip install virtualenv
|
||||
```
|
||||
|
||||
Replace `xxx` and `yyy` with the appropriate OS and GPU codes.
|
||||
3. From within the InvokeAI top-level directory, create and activate a virtual
|
||||
environment named `invokeai`:
|
||||
|
||||
!!! todo "Windows requires admin privileges to make links, so we use the copy (cp) command instead"
|
||||
|
||||
```bash
|
||||
cp environments-and-requirements\requirements-lin-win-colab-cuda.txt requirements.txt
|
||||
```
|
||||
```bash
|
||||
virtualenv invokeai
|
||||
source invokeai/bin/activate
|
||||
```
|
||||
|
||||
Note that the order of arguments is reversed between the Linux/Mac and Windows
|
||||
commands!
|
||||
4. Pick the correct `requirements*.txt` file for your hardware and operating
|
||||
system.
|
||||
|
||||
Please do not link directly to the file
|
||||
`environments-and-requirements/requirements.txt`. This is a base requirements
|
||||
file that does not have the platform-specific libraries.
|
||||
We have created a series of environment files suited for different operating
|
||||
systems and GPU hardware. They are located in the
|
||||
`environments-and-requirements` directory:
|
||||
|
||||
When this is done, confirm that a file `requirements.txt` has been
|
||||
created in the InvokeAI root directory and that it points to the
|
||||
correct file in the `environments-and-requirements`.
|
||||
<figure markdown>
|
||||
|
||||
5. Run PIP
|
||||
| filename | OS |
|
||||
| :---------------------------------: | :-------------------------------------------------------------: |
|
||||
| requirements-lin-amd.txt | Linux with an AMD (ROCm) GPU |
|
||||
| requirements-lin-arm64.txt | Linux running on arm64 systems |
|
||||
| requirements-lin-cuda.txt | Linux with an NVIDIA (CUDA) GPU |
|
||||
| requirements-mac-mps-cpu.txt | Macintoshes with MPS acceleration |
|
||||
| requirements-lin-win-colab-cuda.txt | Windows with an NVIDA (CUDA) GPU<br>(supports Google Colab too) |
|
||||
|
||||
Be sure that the `invokeai` environment is active before doing
|
||||
this:
|
||||
</figure>
|
||||
|
||||
```bash
|
||||
pip install --prefer-binary -r requirements.txt
|
||||
```
|
||||
Select the appropriate requirements file, and make a link to it from
|
||||
`requirements.txt` in the top-level InvokeAI directory. The command to do
|
||||
this from the top-level directory is:
|
||||
|
||||
!!! example ""
|
||||
|
||||
=== "Macintosh and Linux"
|
||||
|
||||
!!! info "Replace `xxx` and `yyy` with the appropriate OS and GPU codes."
|
||||
|
||||
```bash
|
||||
ln -sf environments-and-requirements/requirements-xxx-yyy.txt requirements.txt
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
||||
!!! info "on Windows, admin privileges are required to make links, so we use the copy command instead"
|
||||
|
||||
```cmd
|
||||
copy environments-and-requirements\requirements-lin-win-colab-cuda.txt requirements.txt
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
Please do not link or copy `environments-and-requirements/requirements-base.txt`.
|
||||
This is a base requirements file that does not have the platform-specific
|
||||
libraries. Also, be sure to link or copy the platform-specific file to
|
||||
a top-level file named `requirements.txt` as shown here. Running pip on
|
||||
a requirements file in a subdirectory will not work as expected.
|
||||
|
||||
When this is done, confirm that a file named `requirements.txt` has been
|
||||
created in the InvokeAI root directory and that it points to the correct
|
||||
file in `environments-and-requirements`.
|
||||
|
||||
5. Run PIP
|
||||
|
||||
Be sure that the `invokeai` environment is active before doing this:
|
||||
|
||||
```bash
|
||||
pip install --prefer-binary -r requirements.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Here are some common issues and their suggested solutions.
|
||||
|
||||
### Conda install
|
||||
### Conda
|
||||
|
||||
1. Conda fails before completing `conda update`:
|
||||
#### Conda fails before completing `conda update`
|
||||
|
||||
The usual source of these errors is a package
|
||||
incompatibility. While we have tried to minimize these, over time
|
||||
packages get updated and sometimes introduce incompatibilities.
|
||||
The usual source of these errors is a package incompatibility. While we have
|
||||
tried to minimize these, over time packages get updated and sometimes introduce
|
||||
incompatibilities.
|
||||
|
||||
We suggest that you search
|
||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues) or the
|
||||
"bugs-and-support" channel of the [InvokeAI
|
||||
Discord](https://discord.gg/ZmtBAhwWhy).
|
||||
We suggest that you search
|
||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues) or the "bugs-and-support"
|
||||
channel of the [InvokeAI Discord](https://discord.gg/ZmtBAhwWhy).
|
||||
|
||||
You may also try to install the broken packages manually using PIP. To do this, activate
|
||||
the `invokeai` environment, and run `pip install` with the name and version of the
|
||||
package that is causing the incompatibility. For example:
|
||||
You may also try to install the broken packages manually using PIP. To do this,
|
||||
activate the `invokeai` environment, and run `pip install` with the name and
|
||||
version of the package that is causing the incompatibility. For example:
|
||||
|
||||
```bash
|
||||
pip install test-tube==0.7.5
|
||||
```
|
||||
```bash
|
||||
pip install test-tube==0.7.5
|
||||
```
|
||||
|
||||
You can keep doing this until all requirements are satisfied and
|
||||
the `invoke.py` script runs without errors. Please report to
|
||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues) what you
|
||||
were able to do to work around the problem so that others can
|
||||
benefit from your investigation.
|
||||
You can keep doing this until all requirements are satisfied and the `invoke.py`
|
||||
script runs without errors. Please report to
|
||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues) what you were able to do
|
||||
to work around the problem so that others can benefit from your investigation.
|
||||
|
||||
2. `preload_models.py` or `invoke.py` crashes at an early stage
|
||||
### Create Conda Environment fails on MacOS
|
||||
|
||||
This is usually due to an incomplete or corrupted Conda install.
|
||||
Make sure you have linked to the correct environment file and run
|
||||
`conda update` again.
|
||||
If conda create environment fails with lmdb error, this is most likely caused by Clang.
|
||||
Run brew config to see which Clang is installed on your Mac. If Clang isn't installed, that's causing the error.
|
||||
Start by installing additional XCode command line tools, followed by brew install llvm.
|
||||
|
||||
If the problem persists, a more extreme measure is to clear Conda's
|
||||
caches and remove the `invokeai` environment:
|
||||
```bash
|
||||
xcode-select --install
|
||||
brew install llvm
|
||||
```
|
||||
|
||||
```bash
|
||||
conda deactivate
|
||||
conda env remove -n invokeai
|
||||
conda clean -a
|
||||
conda update
|
||||
```
|
||||
If brew config has Clang installed, update to the latest llvm and try creating the environment again.
|
||||
|
||||
This removes all cached library files, including ones that may have
|
||||
been corrupted somehow. (This is not supposed to happen, but does
|
||||
anyway).
|
||||
|
||||
3. `invoke.py` crashes at a later stage.
|
||||
#### `preload_models.py` or `invoke.py` crashes at an early stage
|
||||
|
||||
If the CLI or web site had been working ok, but something
|
||||
unexpected happens later on during the session, you've encountered
|
||||
a code bug that is probably unrelated to an install issue. Please
|
||||
search [Issues](https://github.com/invoke-ai/InvokeAI/issues), file
|
||||
a bug report, or ask for help on [Discord](https://discord.gg/ZmtBAhwWhy)
|
||||
This is usually due to an incomplete or corrupted Conda install. Make sure you
|
||||
have linked to the correct environment file and run `conda update` again.
|
||||
|
||||
4. My renders are running very slowly!
|
||||
If the problem persists, a more extreme measure is to clear Conda's caches and
|
||||
remove the `invokeai` environment:
|
||||
|
||||
You may have installed the wrong torch (machine learning) package,
|
||||
and the system is running on CPU rather than the GPU. To check,
|
||||
look at the log messages that appear when `invoke.py` is first
|
||||
starting up. One of the earlier lines should say `Using device type
|
||||
cuda`. On AMD systems, it will also say "cuda", and on Macintoshes,
|
||||
it should say "mps". If instead the message says it is running on
|
||||
"cpu", then you may need to install the correct torch library.
|
||||
```bash
|
||||
conda deactivate
|
||||
conda env remove -n invokeai
|
||||
conda clean -a
|
||||
conda update
|
||||
```
|
||||
|
||||
You may be able to fix this by installing a different torch
|
||||
library. Here are the magic incantations for Conda and PIP.
|
||||
This removes all cached library files, including ones that may have been
|
||||
corrupted somehow. (This is not supposed to happen, but does anyway).
|
||||
|
||||
!!! todo "For CUDA systems"
|
||||
#### `invoke.py` crashes at a later stage
|
||||
|
||||
(conda)
|
||||
```bash
|
||||
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
|
||||
```
|
||||
If the CLI or web site had been working ok, but something unexpected happens
|
||||
later on during the session, you've encountered a code bug that is probably
|
||||
unrelated to an install issue. Please search
|
||||
[Issues](https://github.com/invoke-ai/InvokeAI/issues), file a bug report, or
|
||||
ask for help on [Discord](https://discord.gg/ZmtBAhwWhy)
|
||||
|
||||
(pip)
|
||||
```bash
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
|
||||
```
|
||||
#### My renders are running very slowly
|
||||
|
||||
!!! todo "For AMD systems"
|
||||
You may have installed the wrong torch (machine learning) package, and the
|
||||
system is running on CPU rather than the GPU. To check, look at the log messages
|
||||
that appear when `invoke.py` is first starting up. One of the earlier lines
|
||||
should say `Using device type cuda`. On AMD systems, it will also say "cuda",
|
||||
and on Macintoshes, it should say "mps". If instead the message says it is
|
||||
running on "cpu", then you may need to install the correct torch library.
|
||||
|
||||
(conda)
|
||||
```bash
|
||||
conda activate invokeai
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2/
|
||||
```
|
||||
You may be able to fix this by installing a different torch library. Here are
|
||||
the magic incantations for Conda and PIP.
|
||||
|
||||
(pip)
|
||||
```bash
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2/
|
||||
```
|
||||
!!! todo "For CUDA systems"
|
||||
|
||||
More information and troubleshooting tips can be found at https://pytorch.org.
|
||||
- conda
|
||||
|
||||
```bash
|
||||
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
|
||||
```
|
||||
|
||||
- pip
|
||||
|
||||
```bash
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
|
||||
```
|
||||
|
||||
!!! todo "For AMD systems"
|
||||
|
||||
- conda
|
||||
|
||||
```bash
|
||||
conda activate invokeai
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2/
|
||||
```
|
||||
|
||||
- pip
|
||||
|
||||
```bash
|
||||
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2/
|
||||
```
|
||||
|
||||
More information and troubleshooting tips can be found at https://pytorch.org.
|
||||
|
156
docs/installation/INSTALL_SOURCE.md
Normal file
@ -0,0 +1,156 @@
|
||||
---
|
||||
title: Source Installer
|
||||
---
|
||||
|
||||
# The InvokeAI Source Installer
|
||||
|
||||
## Introduction
|
||||
|
||||
The source installer is a shell script that attempts to automate every step
|
||||
needed to install and run InvokeAI on a stock computer running recent versions
|
||||
of Linux, MacOS or Windows. It will leave you with a version that runs a stable
|
||||
version of InvokeAI with the option to upgrade to experimental versions later.
|
||||
It is not as foolproof as the [InvokeAI installer](INSTALL_INVOKE.md)
|
||||
|
||||
Before you begin, make sure that you meet the
|
||||
[hardware requirements](index.md#Hardware_Requirements) and has the appropriate
|
||||
GPU drivers installed. In particular, if you are a Linux user with an AMD GPU
|
||||
installed, you may need to install the
|
||||
[ROCm driver](https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html).
|
||||
|
||||
Installation requires roughly 18G of free disk space to load the libraries and
|
||||
recommended model weights files.
|
||||
|
||||
## Walk through
|
||||
|
||||
Though there are multiple steps, there really is only one click involved to kick
|
||||
off the process.
|
||||
|
||||
1. The source installer is distributed in ZIP files. Go to the
|
||||
[latest release](https://github.com/invoke-ai/InvokeAI/releases/latest), and
|
||||
look for a series of files named:
|
||||
|
||||
- invokeAI-src-installer-mac.zip
|
||||
- invokeAI-src-installer-windows.zip
|
||||
- invokeAI-src-installer-linux.zip
|
||||
|
||||
Download the one that is appropriate for your operating system.
|
||||
|
||||
2. Unpack the zip file into a directory that has at least 18G of free space. Do
|
||||
_not_ unpack into a directory that has an earlier version of InvokeAI.
|
||||
|
||||
This will create a new directory named "InvokeAI". This example shows how
|
||||
this would look using the `unzip` command-line tool, but you may use any
|
||||
graphical or command-line Zip extractor:
|
||||
|
||||
```cmd
|
||||
C:\Documents\Linco> unzip invokeAI-windows.zip
|
||||
Archive: C: \Linco\Downloads\invokeAI-linux.zip
|
||||
creating: invokeAI\
|
||||
inflating: invokeAI\install.bat
|
||||
inflating: invokeAI\readme.txt
|
||||
```
|
||||
|
||||
3. If you are using a desktop GUI, double-click the installer file. It will be
|
||||
named `install.bat` on Windows systems and `install.sh` on Linux and
|
||||
Macintosh systems.
|
||||
|
||||
4. Alternatively, form the command line, run the shell script or .bat file:
|
||||
|
||||
```cmd
|
||||
C:\Documents\Linco> cd invokeAI
|
||||
C:\Documents\Linco\invokeAI> install.bat
|
||||
```
|
||||
|
||||
5. Sit back and let the install script work. It will install various binary
|
||||
requirements including Conda, Git and Python, then download the current
|
||||
InvokeAI code and install it along with its dependencies.
|
||||
|
||||
6. After installation completes, the installer will launch a script called
|
||||
`preload_models.py`, which will guide you through the first-time process of
|
||||
selecting one or more Stable Diffusion model weights files, downloading and
|
||||
configuring them.
|
||||
|
||||
Note that the main Stable Diffusion weights file is protected by a license
|
||||
agreement that you must agree to in order to use. The script will list the
|
||||
steps you need to take to create an account on the official site that hosts
|
||||
the weights files, accept the agreement, and provide an access token that
|
||||
allows InvokeAI to legally download and install the weights files.
|
||||
|
||||
If you have already downloaded the weights file(s) for another Stable
|
||||
Diffusion distribution, you may skip this step (by selecting "skip" when
|
||||
prompted) and configure InvokeAI to use the previously-downloaded files. The
|
||||
process for this is described in [Installing Models](INSTALLING_MODELS.md).
|
||||
|
||||
7. The script will now exit and you'll be ready to generate some images. The
|
||||
invokeAI directory will contain numerous files. Look for a shell script
|
||||
named `invoke.sh` (Linux/Mac) or `invoke.bat` (Windows). Launch the script
|
||||
by double-clicking it or typing its name at the command-line:
|
||||
|
||||
```cmd
|
||||
C:\Documents\Linco> cd invokeAI
|
||||
C:\Documents\Linco\invokeAI> invoke.bat
|
||||
```
|
||||
|
||||
The `invoke.bat` (`invoke.sh`) script will give you the choice of starting (1)
|
||||
the command-line interface, or (2) the web GUI. If you start the latter, you can
|
||||
load the user interface by pointing your browser at http://localhost:9090.
|
||||
|
||||
The `invoke` script also offers you a third option labeled "open the developer
|
||||
console". If you choose this option, you will be dropped into a command-line
|
||||
interface in which you can run python commands directly, access developer tools,
|
||||
and launch InvokeAI with customized options. To do the latter, you would launch
|
||||
the script `scripts/invoke.py` as shown in this example:
|
||||
|
||||
```cmd
|
||||
python scripts/invoke.py --web --max_load_models=3 \
|
||||
--model=waifu-1.3 --steps=30 --outdir=C:/Documents/AIPhotos
|
||||
```
|
||||
|
||||
These options are described in detail in the
|
||||
[Command-Line Interface](../features/CLI.md) documentation.
|
||||
|
||||
## Updating to newer versions
|
||||
|
||||
This section describes how to update InvokeAI to new versions of the software.
|
||||
|
||||
### Updating the stable version
|
||||
|
||||
This distribution is changing rapidly, and we add new features on a daily basis.
|
||||
To update to the latest released version (recommended), run the `update.sh`
|
||||
(Linux/Mac) or `update.bat` (Windows) scripts. This will fetch the latest
|
||||
release and re-run the `preload_models` script to download any updated models
|
||||
files that may be needed. You can also use this to add additional models that
|
||||
you did not select at installation time.
|
||||
|
||||
### Updating to the development version
|
||||
|
||||
There may be times that there is a feature in the `development` branch of
|
||||
InvokeAI that you'd like to take advantage of. Or perhaps there is a branch that
|
||||
corrects an annoying bug. To do this, you will use the developer's console.
|
||||
|
||||
From within the invokeAI directory, run the command `invoke.sh` (Linux/Mac) or
|
||||
`invoke.bat` (Windows) and selection option (3) to open the developers console.
|
||||
Then run the following command to get the `development branch`:
|
||||
|
||||
```bash
|
||||
git checkout development
|
||||
git pull
|
||||
conda env update
|
||||
```
|
||||
|
||||
You can now close the developer console and run `invoke` as before. If you get
|
||||
complaints about missing models, then you may need to do the additional step of
|
||||
running `preload_models.py`. This happens relatively infrequently. To do this,
|
||||
simply open up the developer's console again and type
|
||||
`python scripts/preload_models.py`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you run into problems during or after installation, the InvokeAI team is
|
||||
available to help you. Either create an
|
||||
[Issue](https://github.com/invoke-ai/InvokeAI/issues) at our GitHub site, or
|
||||
make a request for help on the "bugs-and-support" channel of our
|
||||
[Discord server](https://discord.gg/ZmtBAhwWhy). We are a 100% volunteer
|
||||
organization, but typically somebody will be available to help you within 24
|
||||
hours, and often much sooner.
|
62
docs/installation/index.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
title: Overview
|
||||
---
|
||||
|
||||
We offer several ways to install InvokeAI, each one suited to your
|
||||
experience and preferences.
|
||||
|
||||
1. [InvokeAI installer](INSTALL_INVOKE.md)
|
||||
|
||||
This is a installer script that installs InvokeAI and all the
|
||||
third party libraries it depends on. When a new version of
|
||||
InvokeAI is released, you will download and reinstall the new
|
||||
version.
|
||||
|
||||
This installer is designed for people who want the system to "just
|
||||
work", don't have an interest in tinkering with it, and do not
|
||||
care about upgrading to unreleased experimental features.
|
||||
|
||||
**Important Caveats**
|
||||
- This script does not support AMD GPUs. For Linux AMD support,
|
||||
please use the manual or source code installer methods.
|
||||
- This script has difficulty on some Macintosh machines
|
||||
that have previously been used for Python development due to
|
||||
conflicting development tools versions. Mac developers may wish
|
||||
to try the source code installer or one of the manual methods instead.
|
||||
|
||||
2. [Source code installer](INSTALL_SOURCE.md)
|
||||
|
||||
This is a script that will install InvokeAI and all its essential
|
||||
third party libraries. In contrast to the previous installer, it
|
||||
includes access to a "developer console" which will allow you to
|
||||
access experimental features on the development branch.
|
||||
|
||||
This method is recommended for individuals who are wish to stay
|
||||
on the cutting edge of InvokeAI development and are not afraid
|
||||
of occasional breakage.
|
||||
|
||||
3. [Manual Installation](INSTALL_MANUAL.md)
|
||||
|
||||
In this method you will manually run the commands needed to install
|
||||
InvokeAI and its dependencies. We offer two recipes: one suited to
|
||||
those who prefer the `conda` tool, and one suited to those who prefer
|
||||
`pip` and Python virtual environments.
|
||||
|
||||
This method is recommended for users who have previously used `conda`
|
||||
or `pip` in the past, developers, and anyone who wishes to remain on
|
||||
the cutting edge of future InvokeAI development and is willing to put
|
||||
up with occasional glitches and breakage.
|
||||
|
||||
4. [Docker Installation](INSTALL_DOCKER.md)
|
||||
|
||||
We also offer a method for creating Docker containers containing
|
||||
InvokeAI and its dependencies. This method is recommended for
|
||||
individuals with experience with Docker containers and understand
|
||||
the pluses and minuses of a container-based install.
|
||||
|
||||
5. [Jupyter Notebooks Installation](INSTALL_JUPYTER.md)
|
||||
|
||||
This method is suitable for running InvokeAI on a Google Colab
|
||||
account. It is recommended for individuals who have previously
|
||||
worked on the Colab and are comfortable with the Jupyter notebook
|
||||
environment.
|
@ -13,6 +13,19 @@ We thank them for all of their time and hard work.
|
||||
|
||||
- [Lincoln D. Stein](mailto:lincoln.stein@gmail.com)
|
||||
|
||||
## **Current core team**
|
||||
|
||||
* lstein (Lincoln Stein) - Co-maintainer
|
||||
* blessedcoolant - Co-maintainer
|
||||
* hipsterusername (Kent Keirsey) - Product Manager
|
||||
* psychedelicious - Web Team Leader
|
||||
* Kyle0654 (Kyle Schouviller) - Node Architect and General Backend Wizard
|
||||
* damian0815 - Attention Systems and Gameplay Engineer
|
||||
* mauwii (Matthias Wild) - Continuous integration and product maintenance engineer
|
||||
* Netsvetaev (Artur Netsvetaev) - UI/UX Developer
|
||||
* tildebyte - general gadfly and resident (self-appointed) know-it-all
|
||||
* keturn - Lead for Diffusers port
|
||||
|
||||
## **Contributions by**
|
||||
|
||||
- [Sean McLellan](https://github.com/Oceanswave)
|
||||
|
@ -2,6 +2,7 @@ name: invokeai
|
||||
channels:
|
||||
- pytorch
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- albumentations=0.4.3
|
||||
- cudatoolkit
|
||||
@ -31,15 +32,15 @@ dependencies:
|
||||
- pip:
|
||||
- dependency_injector==4.40.0
|
||||
- getpass_asterisk
|
||||
- gfpgan
|
||||
- omegaconf==2.1.1
|
||||
- picklescan
|
||||
- pyreadline3
|
||||
- realesrgan
|
||||
- taming-transformers-rom1504
|
||||
- test-tube>=0.7.5
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@models-rename#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan
|
||||
- -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
- -e .
|
||||
variables:
|
||||
PYTORCH_ENABLE_MPS_FALLBACK: 1
|
||||
|
@ -4,7 +4,7 @@ channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python>=3.9
|
||||
- python=3.9.*
|
||||
- pip=22.2.2
|
||||
- numpy=1.23.3
|
||||
- pip:
|
||||
@ -18,12 +18,12 @@ dependencies:
|
||||
- flask_cors==3.0.10
|
||||
- flask_socketio==5.3.0
|
||||
- getpass_asterisk
|
||||
- gfpgan
|
||||
- imageio-ffmpeg==0.4.2
|
||||
- imageio==2.9.0
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -33,6 +33,7 @@ dependencies:
|
||||
- streamlit==1.12.0
|
||||
- taming-transformers-rom1504
|
||||
- test-tube>=0.7.5
|
||||
- tqdm
|
||||
- torch
|
||||
- torch-fidelity==0.3.0
|
||||
- torchaudio
|
||||
@ -40,6 +41,8 @@ dependencies:
|
||||
- torchvision
|
||||
- transformers==4.21.3
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan
|
||||
- -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
- -e .
|
||||
|
@ -4,7 +4,7 @@ channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python>=3.9
|
||||
- python=3.9.*
|
||||
- pip=22.2.2
|
||||
- numpy=1.23.3
|
||||
- torchvision=0.13.1
|
||||
@ -21,12 +21,12 @@ dependencies:
|
||||
- flask_cors==3.0.10
|
||||
- flask_socketio==5.3.0
|
||||
- getpass_asterisk
|
||||
- gfpgan
|
||||
- imageio-ffmpeg==0.4.2
|
||||
- imageio==2.9.0
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -40,6 +40,8 @@ dependencies:
|
||||
- torchmetrics==0.7.0
|
||||
- transformers==4.21.3
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@models-rename#egg=clipseg
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan
|
||||
- -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
- -e .
|
||||
|
@ -2,55 +2,64 @@ name: invokeai
|
||||
channels:
|
||||
- pytorch
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.9.13
|
||||
- pip=22.2.2
|
||||
- pytorch=1.12.1
|
||||
- torchvision=0.13.1
|
||||
- python=3.10
|
||||
- pip>=22.2
|
||||
- pytorch=1.12
|
||||
- pytorch-lightning=1.7
|
||||
- torchvision=0.13
|
||||
- torchmetrics=0.10
|
||||
- torch-fidelity=0.3
|
||||
|
||||
- albumentations=1.2.1
|
||||
- coloredlogs=15.0.1
|
||||
- diffusers=0.6.0
|
||||
- einops=0.4.1
|
||||
- grpcio=1.46.4
|
||||
# I suggest to keep the other deps sorted for convenience.
|
||||
# To determine what the latest versions should be, run:
|
||||
#
|
||||
# ```shell
|
||||
# sed -E 's/invokeai/invokeai-updated/;20,99s/- ([^=]+)==.+/- \1/' environment-mac.yml > environment-mac-updated.yml
|
||||
# CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac-updated.yml && conda list -n invokeai-updated | awk ' {print " - " $1 "==" $2;} '
|
||||
# ```
|
||||
|
||||
- albumentations=1.2
|
||||
- coloredlogs=15.0
|
||||
- diffusers=0.6
|
||||
- einops=0.3
|
||||
- eventlet
|
||||
- grpcio=1.46
|
||||
- flask=2.1
|
||||
- flask-socketio=5.3
|
||||
- flask-cors=3.0
|
||||
- humanfriendly=10.0
|
||||
- imageio=2.21.2
|
||||
- imageio-ffmpeg=0.4.7
|
||||
- imgaug=0.4.0
|
||||
- kornia=0.6.7
|
||||
- mpmath=1.2.1
|
||||
- nomkl # arm64 has only 1.0 while x64 needs 3.0
|
||||
- numpy=1.23.4
|
||||
- omegaconf=2.1.1
|
||||
- openh264=2.3.0
|
||||
- onnx=1.12.0
|
||||
- onnxruntime=1.12.1
|
||||
- pudb=2022.1
|
||||
- pytorch-lightning=1.7.7
|
||||
- scipy=1.9.3
|
||||
- streamlit=1.12.2
|
||||
- sympy=1.10.1
|
||||
- tensorboard=2.10.0
|
||||
- torchmetrics=0.10.1
|
||||
- py-opencv=4.6.0
|
||||
- flask=2.1.3
|
||||
- flask-socketio=5.3.0
|
||||
- flask-cors=3.0.10
|
||||
- eventlet=0.33.1
|
||||
- protobuf=3.20.1
|
||||
- send2trash=1.8.0
|
||||
- transformers=4.23.1
|
||||
- torch-fidelity=0.3.0
|
||||
- imageio=2.21
|
||||
- imageio-ffmpeg=0.4
|
||||
- imgaug=0.4
|
||||
- kornia=0.6
|
||||
- mpmath=1.2
|
||||
- nomkl=3
|
||||
- numpy=1.23
|
||||
- omegaconf=2.1
|
||||
- openh264=2.3
|
||||
- onnx=1.12
|
||||
- onnxruntime=1.12
|
||||
- pudb=2019.2
|
||||
- protobuf=3.20
|
||||
- py-opencv=4.6
|
||||
- scipy=1.9
|
||||
- streamlit=1.12
|
||||
- sympy=1.10
|
||||
- send2trash=1.8
|
||||
- tensorboard=2.10
|
||||
- transformers=4.23
|
||||
- pip:
|
||||
- getpass_asterisk
|
||||
- dependency_injector==4.40.0
|
||||
- realesrgan==0.2.5.0
|
||||
- picklescan
|
||||
- taming-transformers-rom1504
|
||||
- test-tube==0.7.5
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/TencentARC/GFPGAN.git#egg=gfpgan
|
||||
- git+https://github.com/invoke-ai/clipseg.git@models-rename#egg=clipseg
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan
|
||||
- -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
- -e .
|
||||
variables:
|
||||
PYTORCH_ENABLE_MPS_FALLBACK: 1
|
||||
|
@ -4,7 +4,7 @@ channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python>=3.9
|
||||
- python=3.10.*
|
||||
- pip=22.2.2
|
||||
- numpy=1.23.3
|
||||
- torchvision=0.13.1
|
||||
@ -13,6 +13,7 @@ dependencies:
|
||||
- cudatoolkit=11.6
|
||||
- pip:
|
||||
- albumentations==0.4.3
|
||||
- basicsr==1.4.1
|
||||
- dependency_injector==4.40.0
|
||||
- diffusers==0.6.0
|
||||
- einops==0.3.0
|
||||
@ -21,12 +22,12 @@ dependencies:
|
||||
- flask_cors==3.0.10
|
||||
- flask_socketio==5.3.0
|
||||
- getpass_asterisk
|
||||
- gfpgan
|
||||
- imageio-ffmpeg==0.4.2
|
||||
- imageio==2.9.0
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -42,4 +43,6 @@ dependencies:
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
- git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.1#egg=gfpgan
|
||||
- -e git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
- -e .
|
||||
|
@ -4,12 +4,12 @@ dependency_injector==4.40.0
|
||||
diffusers
|
||||
einops
|
||||
eventlet
|
||||
facexlib
|
||||
flask==2.1.3
|
||||
flask_cors==3.0.10
|
||||
flask_socketio==5.3.0
|
||||
flaskwebgui==0.3.7
|
||||
getpass_asterisk
|
||||
gfpgan
|
||||
huggingface-hub
|
||||
imageio
|
||||
imageio-ffmpeg
|
||||
@ -23,14 +23,19 @@ pudb
|
||||
pyreadline3
|
||||
pytorch-lightning==1.7.7
|
||||
realesrgan
|
||||
requests==2.25.1
|
||||
scikit-image>=0.19
|
||||
send2trash
|
||||
streamlit
|
||||
taming-transformers-rom1504
|
||||
test-tube
|
||||
test-tube>=0.7.5
|
||||
torch-fidelity
|
||||
torchmetrics
|
||||
transformers==4.21.*
|
||||
picklescan
|
||||
git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.1#egg=gfpgan ; platform_system == 'Windows'
|
||||
git+https://github.com/invoke-ai/GFPGAN@basicsr-1.4.2#egg=gfpgan ; platform_system != 'Windows'
|
||||
git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
git+https://github.com/Birch-san/k-diffusion.git@mps#egg=k-diffusion
|
||||
git+https://github.com/invoke-ai/clipseg.git@models-rename#egg=clipseg
|
||||
git+https://github.com/invoke-ai/clipseg.git@relaxed-python-requirement#egg=clipseg
|
||||
git+https://github.com/invoke-ai/PyPatchMatch@0.1.4#egg=pypatchmatch
|
||||
|
@ -1,6 +1,5 @@
|
||||
-r environments-and-requirements/requirements-base.txt
|
||||
|
||||
# Get hardware-appropriate torch/torchvision
|
||||
# Get hardware-appropriate torch/torchvision
|
||||
--extra-index-url https://download.pytorch.org/whl/rocm5.1.1 --trusted-host https://download.pytorch.org
|
||||
torch
|
||||
torchvision
|
||||
|
@ -1,5 +1,5 @@
|
||||
-r environments-and-requirements/requirements-base.txt
|
||||
|
||||
grpcio<1.51.0
|
||||
protobuf==3.19.6
|
||||
torch<1.13.0
|
||||
torchvision<0.14.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
-r environments-and-requirements/requirements-base.txt
|
||||
|
||||
# Get hardware-appropriate torch/torchvision
|
||||
# Get hardware-appropriate torch/torchvision
|
||||
--extra-index-url https://download.pytorch.org/whl/cu116 --trusted-host https://download.pytorch.org
|
||||
basicsr==1.4.1
|
||||
torch==1.12.1
|
||||
torchvision==0.13.1
|
||||
-e .
|
||||
|
501
frontend/dist/assets/index.1fc0290b.js
vendored
1
frontend/dist/assets/index.40a72c80.css
vendored
829
frontend/dist/assets/index.4488003f.js
vendored
501
frontend/dist/assets/index.8eb7dfe4.js
vendored
690
frontend/dist/assets/index.ae92a637.js
vendored
1
frontend/dist/assets/index.c609c0c8.css
vendored
Normal file
517
frontend/dist/assets/index.cc049b93.js
vendored
517
frontend/dist/assets/index.e2832fd4.js
vendored
623
frontend/dist/assets/index.faf4c870.js
vendored
Normal file
4
frontend/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
|
||||
<script type="module" crossorigin src="./assets/index.1fc0290b.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.40a72c80.css">
|
||||
<script type="module" crossorigin src="./assets/index.faf4c870.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.c609c0c8.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
23
frontend/eslintconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react-hooks/recommended"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint", "eslint-plugin-react-hooks"],
|
||||
"root": true,
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"paths": ["src"],
|
||||
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".ts"] }]
|
||||
}
|
||||
}
|
||||
}
|
10651
frontend/package-lock.json
generated
@ -7,11 +7,13 @@
|
||||
"dev": "vite dev",
|
||||
"build": "tsc && vite build",
|
||||
"build-dev": "tsc && vite build -m development",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.10",
|
||||
"@chakra-ui/react": "^2.3.1",
|
||||
"@emotion/cache": "^11.10.5",
|
||||
"@emotion/react": "^11.10.4",
|
||||
"@emotion/styled": "^11.10.4",
|
||||
"@radix-ui/react-context-menu": "^2.0.1",
|
||||
@ -29,14 +31,18 @@
|
||||
"react-colorful": "^5.6.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-dropzone": "^14.2.2",
|
||||
"react-hotkeys-hook": "^3.4.7",
|
||||
"react-hotkeys-hook": "4.0.2",
|
||||
"react-icons": "^4.4.0",
|
||||
"react-konva": "^18.2.3",
|
||||
"react-konva-utils": "^0.3.0",
|
||||
"react-redux": "^8.0.2",
|
||||
"react-transition-group": "^4.4.5",
|
||||
"react-zoom-pan-pinch": "^2.1.3",
|
||||
"redux-deep-persist": "^1.0.6",
|
||||
"redux-persist": "^6.0.0",
|
||||
"socket.io": "^4.5.2",
|
||||
"socket.io-client": "^4.5.2",
|
||||
"use-image": "^1.1.0",
|
||||
"uuid": "^9.0.0",
|
||||
"yarn": "^1.22.19"
|
||||
},
|
||||
@ -51,10 +57,13 @@
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"patch-package": "^6.5.0",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"sass": "^1.55.0",
|
||||
"tsc-watch": "^5.0.3",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^3.0.7",
|
||||
"vite-plugin-eslint": "^1.8.1"
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-tsconfig-paths": "^3.5.2"
|
||||
}
|
||||
}
|
||||
|
24
frontend/patches/redux-deep-persist+1.0.6.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/node_modules/redux-deep-persist/lib/types.d.ts b/node_modules/redux-deep-persist/lib/types.d.ts
|
||||
index b67b8c2..7fc0fa1 100644
|
||||
--- a/node_modules/redux-deep-persist/lib/types.d.ts
|
||||
+++ b/node_modules/redux-deep-persist/lib/types.d.ts
|
||||
@@ -35,6 +35,7 @@ export interface PersistConfig<S, RS = any, HSS = any, ESS = any> {
|
||||
whitelist?: Array<string>;
|
||||
transforms?: Array<Transform<HSS, ESS, S, RS>>;
|
||||
throttle?: number;
|
||||
+ debounce?: number;
|
||||
migrate?: PersistMigrate;
|
||||
stateReconciler?: false | StateReconciler<S>;
|
||||
getStoredState?: (config: PersistConfig<S, RS, HSS, ESS>) => Promise<PersistedState>;
|
||||
diff --git a/node_modules/redux-deep-persist/src/types.ts b/node_modules/redux-deep-persist/src/types.ts
|
||||
index 398ac19..cbc5663 100644
|
||||
--- a/node_modules/redux-deep-persist/src/types.ts
|
||||
+++ b/node_modules/redux-deep-persist/src/types.ts
|
||||
@@ -91,6 +91,7 @@ export interface PersistConfig<S, RS = any, HSS = any, ESS = any> {
|
||||
whitelist?: Array<string>;
|
||||
transforms?: Array<Transform<HSS, ESS, S, RS>>;
|
||||
throttle?: number;
|
||||
+ debounce?: number;
|
||||
migrate?: PersistMigrate;
|
||||
stateReconciler?: false | StateReconciler<S>;
|
||||
/**
|
116
frontend/patches/redux-persist+6.0.0.patch
Normal file
@ -0,0 +1,116 @@
|
||||
diff --git a/node_modules/redux-persist/es/createPersistoid.js b/node_modules/redux-persist/es/createPersistoid.js
|
||||
index 8b43b9a..184faab 100644
|
||||
--- a/node_modules/redux-persist/es/createPersistoid.js
|
||||
+++ b/node_modules/redux-persist/es/createPersistoid.js
|
||||
@@ -6,6 +6,7 @@ export default function createPersistoid(config) {
|
||||
var whitelist = config.whitelist || null;
|
||||
var transforms = config.transforms || [];
|
||||
var throttle = config.throttle || 0;
|
||||
+ var debounce = config.debounce || 0;
|
||||
var storageKey = "".concat(config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX).concat(config.key);
|
||||
var storage = config.storage;
|
||||
var serialize;
|
||||
@@ -28,30 +29,37 @@ export default function createPersistoid(config) {
|
||||
var timeIterator = null;
|
||||
var writePromise = null;
|
||||
|
||||
- var update = function update(state) {
|
||||
- // add any changed keys to the queue
|
||||
- Object.keys(state).forEach(function (key) {
|
||||
- if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop
|
||||
+ // Timer for debounced `update()`
|
||||
+ let timer = 0;
|
||||
|
||||
- if (lastState[key] === state[key]) return; // value unchanged? noop
|
||||
+ function update(state) {
|
||||
+ // Debounce the update
|
||||
+ clearTimeout(timer);
|
||||
+ timer = setTimeout(() => {
|
||||
+ // add any changed keys to the queue
|
||||
+ Object.keys(state).forEach(function (key) {
|
||||
+ if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop
|
||||
|
||||
- if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop
|
||||
+ if (lastState[key] === state[key]) return; // value unchanged? noop
|
||||
|
||||
- keysToProcess.push(key); // add key to queue
|
||||
- }); //if any key is missing in the new state which was present in the lastState,
|
||||
- //add it for processing too
|
||||
+ if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop
|
||||
|
||||
- Object.keys(lastState).forEach(function (key) {
|
||||
- if (state[key] === undefined && passWhitelistBlacklist(key) && keysToProcess.indexOf(key) === -1 && lastState[key] !== undefined) {
|
||||
- keysToProcess.push(key);
|
||||
- }
|
||||
- }); // start the time iterator if not running (read: throttle)
|
||||
+ keysToProcess.push(key); // add key to queue
|
||||
+ }); //if any key is missing in the new state which was present in the lastState,
|
||||
+ //add it for processing too
|
||||
|
||||
- if (timeIterator === null) {
|
||||
- timeIterator = setInterval(processNextKey, throttle);
|
||||
- }
|
||||
+ Object.keys(lastState).forEach(function (key) {
|
||||
+ if (state[key] === undefined && passWhitelistBlacklist(key) && keysToProcess.indexOf(key) === -1 && lastState[key] !== undefined) {
|
||||
+ keysToProcess.push(key);
|
||||
+ }
|
||||
+ }); // start the time iterator if not running (read: throttle)
|
||||
+
|
||||
+ if (timeIterator === null) {
|
||||
+ timeIterator = setInterval(processNextKey, throttle);
|
||||
+ }
|
||||
|
||||
- lastState = state;
|
||||
+ lastState = state;
|
||||
+ }, debounce)
|
||||
};
|
||||
|
||||
function processNextKey() {
|
||||
diff --git a/node_modules/redux-persist/es/types.js.flow b/node_modules/redux-persist/es/types.js.flow
|
||||
index c50d3cd..39d8be2 100644
|
||||
--- a/node_modules/redux-persist/es/types.js.flow
|
||||
+++ b/node_modules/redux-persist/es/types.js.flow
|
||||
@@ -19,6 +19,7 @@ export type PersistConfig = {
|
||||
whitelist?: Array<string>,
|
||||
transforms?: Array<Transform>,
|
||||
throttle?: number,
|
||||
+ debounce?: number,
|
||||
migrate?: (PersistedState, number) => Promise<PersistedState>,
|
||||
stateReconciler?: false | Function,
|
||||
getStoredState?: PersistConfig => Promise<PersistedState>, // used for migrations
|
||||
diff --git a/node_modules/redux-persist/lib/types.js.flow b/node_modules/redux-persist/lib/types.js.flow
|
||||
index c50d3cd..39d8be2 100644
|
||||
--- a/node_modules/redux-persist/lib/types.js.flow
|
||||
+++ b/node_modules/redux-persist/lib/types.js.flow
|
||||
@@ -19,6 +19,7 @@ export type PersistConfig = {
|
||||
whitelist?: Array<string>,
|
||||
transforms?: Array<Transform>,
|
||||
throttle?: number,
|
||||
+ debounce?: number,
|
||||
migrate?: (PersistedState, number) => Promise<PersistedState>,
|
||||
stateReconciler?: false | Function,
|
||||
getStoredState?: PersistConfig => Promise<PersistedState>, // used for migrations
|
||||
diff --git a/node_modules/redux-persist/src/types.js b/node_modules/redux-persist/src/types.js
|
||||
index c50d3cd..39d8be2 100644
|
||||
--- a/node_modules/redux-persist/src/types.js
|
||||
+++ b/node_modules/redux-persist/src/types.js
|
||||
@@ -19,6 +19,7 @@ export type PersistConfig = {
|
||||
whitelist?: Array<string>,
|
||||
transforms?: Array<Transform>,
|
||||
throttle?: number,
|
||||
+ debounce?: number,
|
||||
migrate?: (PersistedState, number) => Promise<PersistedState>,
|
||||
stateReconciler?: false | Function,
|
||||
getStoredState?: PersistConfig => Promise<PersistedState>, // used for migrations
|
||||
diff --git a/node_modules/redux-persist/types/types.d.ts b/node_modules/redux-persist/types/types.d.ts
|
||||
index b3733bc..2a1696c 100644
|
||||
--- a/node_modules/redux-persist/types/types.d.ts
|
||||
+++ b/node_modules/redux-persist/types/types.d.ts
|
||||
@@ -35,6 +35,7 @@ declare module "redux-persist/es/types" {
|
||||
whitelist?: Array<string>;
|
||||
transforms?: Array<Transform<HSS, ESS, S, RS>>;
|
||||
throttle?: number;
|
||||
+ debounce?: number;
|
||||
migrate?: PersistMigrate;
|
||||
stateReconciler?: false | StateReconciler<S>;
|
||||
/**
|
@ -1,5 +1,9 @@
|
||||
@use '../styles/Mixins/' as *;
|
||||
|
||||
svg {
|
||||
fill: var(--svg-color);
|
||||
}
|
||||
|
||||
.App {
|
||||
display: grid;
|
||||
width: 100vw;
|
||||
|
@ -1,89 +1,19 @@
|
||||
import { useEffect } from 'react';
|
||||
import ProgressBar from '../features/system/ProgressBar';
|
||||
import SiteHeader from '../features/system/SiteHeader';
|
||||
import Console from '../features/system/Console';
|
||||
import { useAppDispatch } from './store';
|
||||
import { requestSystemConfig } from './socketio/actions';
|
||||
import ProgressBar from 'features/system/components/ProgressBar';
|
||||
import SiteHeader from 'features/system/components/SiteHeader';
|
||||
import Console from 'features/system/components/Console';
|
||||
import { keepGUIAlive } from './utils';
|
||||
import InvokeTabs from '../features/tabs/InvokeTabs';
|
||||
import ImageUploader from '../common/components/ImageUploader';
|
||||
import { RootState, useAppSelector } from '../app/store';
|
||||
import InvokeTabs from 'features/tabs/components/InvokeTabs';
|
||||
import ImageUploader from 'common/components/ImageUploader';
|
||||
|
||||
import FloatingGalleryButton from '../features/tabs/FloatingGalleryButton';
|
||||
import FloatingOptionsPanelButtons from '../features/tabs/FloatingOptionsPanelButtons';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { GalleryState } from '../features/gallery/gallerySlice';
|
||||
import { OptionsState } from '../features/options/optionsSlice';
|
||||
import { activeTabNameSelector } from '../features/options/optionsSelectors';
|
||||
import { SystemState } from '../features/system/systemSlice';
|
||||
import _ from 'lodash';
|
||||
import { Model } from './invokeai';
|
||||
import useToastWatcher from 'features/system/hooks/useToastWatcher';
|
||||
|
||||
import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons';
|
||||
import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton';
|
||||
|
||||
keepGUIAlive();
|
||||
|
||||
const appSelector = createSelector(
|
||||
[
|
||||
(state: RootState) => state.gallery,
|
||||
(state: RootState) => state.options,
|
||||
(state: RootState) => state.system,
|
||||
activeTabNameSelector,
|
||||
],
|
||||
(
|
||||
gallery: GalleryState,
|
||||
options: OptionsState,
|
||||
system: SystemState,
|
||||
activeTabName
|
||||
) => {
|
||||
const { shouldShowGallery, shouldHoldGalleryOpen, shouldPinGallery } =
|
||||
gallery;
|
||||
const {
|
||||
shouldShowOptionsPanel,
|
||||
shouldHoldOptionsPanelOpen,
|
||||
shouldPinOptionsPanel,
|
||||
} = options;
|
||||
|
||||
const modelStatusText = _.reduce(
|
||||
system.model_list,
|
||||
(acc: string, cur: Model, key: string) => {
|
||||
if (cur.status === 'active') acc = key;
|
||||
return acc;
|
||||
},
|
||||
''
|
||||
);
|
||||
|
||||
const shouldShowGalleryButton = !(
|
||||
shouldShowGallery ||
|
||||
(shouldHoldGalleryOpen && !shouldPinGallery)
|
||||
);
|
||||
|
||||
const shouldShowOptionsPanelButton =
|
||||
!(
|
||||
shouldShowOptionsPanel ||
|
||||
(shouldHoldOptionsPanelOpen && !shouldPinOptionsPanel)
|
||||
) && ['txt2img', 'img2img', 'inpainting'].includes(activeTabName);
|
||||
|
||||
return {
|
||||
modelStatusText,
|
||||
shouldShowGalleryButton,
|
||||
shouldShowOptionsPanelButton,
|
||||
};
|
||||
},
|
||||
{
|
||||
memoizeOptions: {
|
||||
resultEqualityCheck: _.isEqual,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const App = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const { shouldShowGalleryButton, shouldShowOptionsPanelButton } =
|
||||
useAppSelector(appSelector);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(requestSystemConfig());
|
||||
}, [dispatch]);
|
||||
useToastWatcher();
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
@ -96,9 +26,9 @@ const App = () => {
|
||||
<div className="app-console">
|
||||
<Console />
|
||||
</div>
|
||||
{shouldShowGalleryButton && <FloatingGalleryButton />}
|
||||
{shouldShowOptionsPanelButton && <FloatingOptionsPanelButtons />}
|
||||
</ImageUploader>
|
||||
<FloatingOptionsPanelButtons />
|
||||
<FloatingGalleryButton />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
// TODO: use Enums?
|
||||
|
||||
import { InProgressImageType } from '../features/system/systemSlice';
|
||||
import { InProgressImageType } from 'features/system/store/systemSlice';
|
||||
|
||||
// Valid samplers
|
||||
export const SAMPLERS: Array<string> = [
|
||||
@ -9,6 +9,8 @@ export const SAMPLERS: Array<string> = [
|
||||
'k_lms',
|
||||
'k_dpm_2',
|
||||
'k_dpm_2_a',
|
||||
'k_dpmpp_2',
|
||||
'k_dpmpp_2_a',
|
||||
'k_euler',
|
||||
'k_euler_a',
|
||||
'k_heun',
|
||||
|
@ -13,10 +13,13 @@ export enum Feature {
|
||||
UPSCALE,
|
||||
FACE_CORRECTION,
|
||||
IMAGE_TO_IMAGE,
|
||||
BOUNDING_BOX,
|
||||
SEAM_CORRECTION,
|
||||
INFILL_AND_SCALING,
|
||||
}
|
||||
/** For each tooltip in the UI, the below feature definitions & props will pull relevant information into the tooltip.
|
||||
*
|
||||
* To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI development and we get a better idea on where things "forever homes" will be .
|
||||
* To-do: href & GuideImages are placeholders, and are not currently utilized, but will be updated (along with the tooltip UI) as feature and UI develop and we get a better idea on where things "forever homes" will be .
|
||||
*/
|
||||
export const FEATURES: Record<Feature, FeatureHelpInfo> = {
|
||||
[Feature.PROMPT]: {
|
||||
@ -55,7 +58,22 @@ export const FEATURES: Record<Feature, FeatureHelpInfo> = {
|
||||
guideImage: 'asset/path.gif',
|
||||
},
|
||||
[Feature.IMAGE_TO_IMAGE]: {
|
||||
text: 'ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ',
|
||||
text: 'Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ',
|
||||
href: 'link/to/docs/feature3.html',
|
||||
guideImage: 'asset/path.gif',
|
||||
},
|
||||
[Feature.BOUNDING_BOX]: {
|
||||
text: 'The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.',
|
||||
href: 'link/to/docs/feature3.html',
|
||||
guideImage: 'asset/path.gif',
|
||||
},
|
||||
[Feature.SEAM_CORRECTION]: {
|
||||
text: 'Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.',
|
||||
href: 'link/to/docs/feature3.html',
|
||||
guideImage: 'asset/path.gif',
|
||||
},
|
||||
[Feature.INFILL_AND_SCALING]: {
|
||||
text: 'Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).',
|
||||
href: 'link/to/docs/feature3.html',
|
||||
guideImage: 'asset/path.gif',
|
||||
},
|
||||
|
45
frontend/src/app/invokeai.d.ts
vendored
@ -12,7 +12,9 @@
|
||||
* 'gfpgan'.
|
||||
*/
|
||||
|
||||
import { Category as GalleryCategory } from '../features/gallery/gallerySlice';
|
||||
import { Category as GalleryCategory } from 'features/gallery/store/gallerySlice';
|
||||
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||
import { IRect } from 'konva/lib/types';
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
@ -44,6 +46,8 @@ export declare type CommonGeneratedImageMetadata = {
|
||||
| 'ddim'
|
||||
| 'k_dpm_2_a'
|
||||
| 'k_dpm_2'
|
||||
| 'k_dpmpp_2_a'
|
||||
| 'k_dpmpp_2'
|
||||
| 'k_euler_a'
|
||||
| 'k_euler'
|
||||
| 'k_heun'
|
||||
@ -103,7 +107,7 @@ export declare type PostProcessedImageMetadata =
|
||||
| FacetoolMetadata;
|
||||
|
||||
// Metadata includes the system config and image metadata.
|
||||
export declare type Metadata = SystemConfig & {
|
||||
export declare type Metadata = SystemGenerationMetadata & {
|
||||
image: GeneratedImageMetadata | PostProcessedImageMetadata;
|
||||
};
|
||||
|
||||
@ -111,12 +115,14 @@ export declare type Metadata = SystemConfig & {
|
||||
export declare type Image = {
|
||||
uuid: string;
|
||||
url: string;
|
||||
thumbnail: string;
|
||||
mtime: number;
|
||||
metadata?: Metadata;
|
||||
width: number;
|
||||
height: number;
|
||||
category: GalleryCategory;
|
||||
isBase64: boolean;
|
||||
category: GalleryCategory;
|
||||
isBase64?: boolean;
|
||||
dreamPrompt?: 'string';
|
||||
};
|
||||
|
||||
// GalleryImages is an array of Image.
|
||||
@ -140,13 +146,18 @@ export declare type SystemStatus = {
|
||||
hasError: boolean;
|
||||
};
|
||||
|
||||
export declare type SystemConfig = {
|
||||
export declare type SystemGenerationMetadata = {
|
||||
model: string;
|
||||
model_id: string;
|
||||
model_weights?: string;
|
||||
model_id?: string;
|
||||
model_hash: string;
|
||||
app_id: string;
|
||||
app_version: string;
|
||||
};
|
||||
|
||||
export declare type SystemConfig = SystemGenerationMetadata & {
|
||||
model_list: ModelList;
|
||||
infill_methods: string[];
|
||||
};
|
||||
|
||||
export declare type ModelStatus = 'active' | 'cached' | 'not loaded';
|
||||
@ -171,10 +182,19 @@ export declare type SystemStatusResponse = SystemStatus;
|
||||
|
||||
export declare type SystemConfigResponse = SystemConfig;
|
||||
|
||||
export declare type ImageResultResponse = Omit<Image, 'uuid'>;
|
||||
export declare type ImageResultResponse = Omit<Image, 'uuid'> & {
|
||||
boundingBox?: IRect;
|
||||
generationMode: InvokeTabName;
|
||||
};
|
||||
|
||||
export declare type ImageUploadResponse = Omit<Image, 'uuid' | 'metadata'> & {
|
||||
destination: 'img2img' | 'inpainting';
|
||||
export declare type ImageUploadResponse = {
|
||||
// image: Omit<Image, 'uuid' | 'metadata' | 'category'>;
|
||||
url: string;
|
||||
mtime: number;
|
||||
width: number;
|
||||
height: number;
|
||||
thumbnail: string;
|
||||
// bbox: [number, number, number, number];
|
||||
};
|
||||
|
||||
export declare type ErrorResponse = {
|
||||
@ -198,9 +218,12 @@ export declare type ImageUrlResponse = {
|
||||
url: string;
|
||||
};
|
||||
|
||||
export declare type ImageUploadDestination = 'img2img' | 'inpainting';
|
||||
|
||||
export declare type UploadImagePayload = {
|
||||
file: File;
|
||||
destination?: ImageUploadDestination;
|
||||
};
|
||||
|
||||
export declare type UploadOutpaintingMergeImagePayload = {
|
||||
dataURL: string;
|
||||
name: string;
|
||||
};
|
||||
|
@ -1,39 +1,35 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import _ from 'lodash';
|
||||
import { RootState } from '../store';
|
||||
import { activeTabNameSelector } from '../../features/options/optionsSelectors';
|
||||
import { OptionsState } from '../../features/options/optionsSlice';
|
||||
|
||||
import { SystemState } from '../../features/system/systemSlice';
|
||||
import { InpaintingState } from '../../features/tabs/Inpainting/inpaintingSlice';
|
||||
import { validateSeedWeights } from '../../common/util/seedWeightPairs';
|
||||
import { RootState } from 'app/store';
|
||||
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
|
||||
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||
import { SystemState } from 'features/system/store/systemSlice';
|
||||
import { validateSeedWeights } from 'common/util/seedWeightPairs';
|
||||
import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors';
|
||||
|
||||
export const readinessSelector = createSelector(
|
||||
[
|
||||
(state: RootState) => state.options,
|
||||
(state: RootState) => state.system,
|
||||
(state: RootState) => state.inpainting,
|
||||
initialCanvasImageSelector,
|
||||
activeTabNameSelector,
|
||||
],
|
||||
(
|
||||
options: OptionsState,
|
||||
system: SystemState,
|
||||
inpainting: InpaintingState,
|
||||
initialCanvasImage,
|
||||
activeTabName
|
||||
) => {
|
||||
const {
|
||||
prompt,
|
||||
shouldGenerateVariations,
|
||||
seedWeights,
|
||||
// maskPath,
|
||||
initialImage,
|
||||
seed,
|
||||
} = options;
|
||||
|
||||
const { isProcessing, isConnected } = system;
|
||||
|
||||
const { imageToInpaint } = inpainting;
|
||||
|
||||
let isReady = true;
|
||||
const reasonsWhyNotReady: string[] = [];
|
||||
|
||||
@ -48,20 +44,6 @@ export const readinessSelector = createSelector(
|
||||
reasonsWhyNotReady.push('No initial image selected');
|
||||
}
|
||||
|
||||
if (activeTabName === 'inpainting' && !imageToInpaint) {
|
||||
isReady = false;
|
||||
reasonsWhyNotReady.push('No inpainting image selected');
|
||||
}
|
||||
|
||||
// // We don't use mask paths now.
|
||||
// // Cannot generate with a mask without img2img
|
||||
// if (maskPath && !initialImage) {
|
||||
// isReady = false;
|
||||
// reasonsWhyNotReady.push(
|
||||
// 'On ImageToImage tab, but no mask is provided.'
|
||||
// );
|
||||
// }
|
||||
|
||||
// TODO: job queue
|
||||
// Cannot generate if already processing an image
|
||||
if (isProcessing) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { createAction } from '@reduxjs/toolkit';
|
||||
import { GalleryCategory } from '../../features/gallery/gallerySlice';
|
||||
import { InvokeTabName } from '../../features/tabs/InvokeTabs';
|
||||
import * as InvokeAI from '../invokeai';
|
||||
|
||||
import { GalleryCategory } from 'features/gallery/store/gallerySlice';
|
||||
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
|
||||
/**
|
||||
* We can't use redux-toolkit's createSlice() to make these actions,
|
||||
@ -26,8 +25,6 @@ export const requestNewImages = createAction<GalleryCategory>(
|
||||
export const cancelProcessing = createAction<undefined>(
|
||||
'socketio/cancelProcessing'
|
||||
);
|
||||
export const uploadImage = createAction<InvokeAI.UploadImagePayload>('socketio/uploadImage');
|
||||
export const uploadMaskImage = createAction<File>('socketio/uploadMaskImage');
|
||||
|
||||
export const requestSystemConfig = createAction<undefined>(
|
||||
'socketio/requestSystemConfig'
|
||||
@ -36,3 +33,11 @@ export const requestSystemConfig = createAction<undefined>(
|
||||
export const requestModelChange = createAction<string>(
|
||||
'socketio/requestModelChange'
|
||||
);
|
||||
|
||||
export const saveStagingAreaImageToGallery = createAction<string>(
|
||||
'socketio/saveStagingAreaImageToGallery'
|
||||
);
|
||||
|
||||
export const emptyTempFolder = createAction<undefined>(
|
||||
'socketio/requestEmptyTempFolder'
|
||||
);
|
||||
|
@ -4,23 +4,22 @@ import { Socket } from 'socket.io-client';
|
||||
import {
|
||||
frontendToBackendParameters,
|
||||
FrontendToBackendParametersConfig,
|
||||
} from '../../common/util/parameterTranslation';
|
||||
} from 'common/util/parameterTranslation';
|
||||
import {
|
||||
GalleryCategory,
|
||||
GalleryState,
|
||||
removeImage,
|
||||
} from '../../features/gallery/gallerySlice';
|
||||
import { OptionsState } from '../../features/options/optionsSlice';
|
||||
} from 'features/gallery/store/gallerySlice';
|
||||
import { OptionsState } from 'features/options/store/optionsSlice';
|
||||
import {
|
||||
addLogEntry,
|
||||
errorOccurred,
|
||||
generationRequested,
|
||||
modelChangeRequested,
|
||||
setIsProcessing,
|
||||
} from '../../features/system/systemSlice';
|
||||
import { inpaintingImageElementRef } from '../../features/tabs/Inpainting/InpaintingCanvas';
|
||||
import { InvokeTabName } from '../../features/tabs/InvokeTabs';
|
||||
import * as InvokeAI from '../invokeai';
|
||||
import { RootState } from '../store';
|
||||
} from 'features/system/store/systemSlice';
|
||||
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
import { RootState } from 'app/store';
|
||||
|
||||
/**
|
||||
* Returns an object containing all functions which use `socketio.emit()`.
|
||||
@ -42,7 +41,7 @@ const makeSocketIOEmitters = (
|
||||
const {
|
||||
options: optionsState,
|
||||
system: systemState,
|
||||
inpainting: inpaintingState,
|
||||
canvas: canvasState,
|
||||
gallery: galleryState,
|
||||
} = state;
|
||||
|
||||
@ -50,32 +49,13 @@ const makeSocketIOEmitters = (
|
||||
{
|
||||
generationMode,
|
||||
optionsState,
|
||||
inpaintingState,
|
||||
canvasState,
|
||||
systemState,
|
||||
};
|
||||
|
||||
if (generationMode === 'inpainting') {
|
||||
if (
|
||||
!inpaintingImageElementRef.current ||
|
||||
!inpaintingState.imageToInpaint?.url
|
||||
) {
|
||||
dispatch(
|
||||
addLogEntry({
|
||||
timestamp: dateFormat(new Date(), 'isoDateTime'),
|
||||
message: 'Inpainting image not loaded, cannot generate image.',
|
||||
level: 'error',
|
||||
})
|
||||
);
|
||||
dispatch(errorOccurred());
|
||||
return;
|
||||
}
|
||||
dispatch(generationRequested());
|
||||
|
||||
frontendToBackendParametersConfig.imageToProcessUrl =
|
||||
inpaintingState.imageToInpaint.url;
|
||||
|
||||
frontendToBackendParametersConfig.maskImageElement =
|
||||
inpaintingImageElementRef.current;
|
||||
} else if (!['txt2img', 'img2img'].includes(generationMode)) {
|
||||
if (!['txt2img', 'img2img'].includes(generationMode)) {
|
||||
if (!galleryState.currentImage?.url) return;
|
||||
|
||||
frontendToBackendParametersConfig.imageToProcessUrl =
|
||||
@ -96,7 +76,12 @@ const makeSocketIOEmitters = (
|
||||
// TODO: handle maintaining masks for reproducibility in future
|
||||
if (generationParameters.init_mask) {
|
||||
generationParameters.init_mask = generationParameters.init_mask
|
||||
.substr(0, 20)
|
||||
.substr(0, 64)
|
||||
.concat('...');
|
||||
}
|
||||
if (generationParameters.init_img) {
|
||||
generationParameters.init_img = generationParameters.init_img
|
||||
.substr(0, 64)
|
||||
.concat('...');
|
||||
}
|
||||
|
||||
@ -162,9 +147,9 @@ const makeSocketIOEmitters = (
|
||||
);
|
||||
},
|
||||
emitDeleteImage: (imageToDelete: InvokeAI.Image) => {
|
||||
const { url, uuid, category } = imageToDelete;
|
||||
const { url, uuid, category, thumbnail } = imageToDelete;
|
||||
dispatch(removeImage(imageToDelete));
|
||||
socketio.emit('deleteImage', url, uuid, category);
|
||||
socketio.emit('deleteImage', url, thumbnail, uuid, category);
|
||||
},
|
||||
emitRequestImages: (category: GalleryCategory) => {
|
||||
const gallery: GalleryState = getState().gallery;
|
||||
@ -179,13 +164,6 @@ const makeSocketIOEmitters = (
|
||||
emitCancelProcessing: () => {
|
||||
socketio.emit('cancel');
|
||||
},
|
||||
emitUploadImage: (payload: InvokeAI.UploadImagePayload) => {
|
||||
const { file, destination } = payload;
|
||||
socketio.emit('uploadImage', file, file.name, destination);
|
||||
},
|
||||
emitUploadMaskImage: (file: File) => {
|
||||
socketio.emit('uploadMaskImage', file, file.name);
|
||||
},
|
||||
emitRequestSystemConfig: () => {
|
||||
socketio.emit('requestSystemConfig');
|
||||
},
|
||||
@ -193,6 +171,12 @@ const makeSocketIOEmitters = (
|
||||
dispatch(modelChangeRequested());
|
||||
socketio.emit('requestModelChange', modelName);
|
||||
},
|
||||
emitSaveStagingAreaImageToGallery: (url: string) => {
|
||||
socketio.emit('requestSaveStagingAreaImageToGallery', url);
|
||||
},
|
||||
emitRequestEmptyTempFolder: () => {
|
||||
socketio.emit('requestEmptyTempFolder');
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { AnyAction, MiddlewareAPI, Dispatch } from '@reduxjs/toolkit';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import dateFormat from 'dateformat';
|
||||
|
||||
import * as InvokeAI from '../invokeai';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
|
||||
import {
|
||||
addLogEntry,
|
||||
@ -15,7 +15,8 @@ import {
|
||||
errorOccurred,
|
||||
setModelList,
|
||||
setIsCancelable,
|
||||
} from '../../features/system/systemSlice';
|
||||
addToast,
|
||||
} from 'features/system/store/systemSlice';
|
||||
|
||||
import {
|
||||
addGalleryImages,
|
||||
@ -23,21 +24,22 @@ import {
|
||||
clearIntermediateImage,
|
||||
GalleryState,
|
||||
removeImage,
|
||||
setCurrentImage,
|
||||
setIntermediateImage,
|
||||
} from '../../features/gallery/gallerySlice';
|
||||
} from 'features/gallery/store/gallerySlice';
|
||||
|
||||
import {
|
||||
clearInitialImage,
|
||||
setInfillMethod,
|
||||
setInitialImage,
|
||||
setMaskPath,
|
||||
} from '../../features/options/optionsSlice';
|
||||
import { requestImages, requestNewImages } from './actions';
|
||||
} from 'features/options/store/optionsSlice';
|
||||
import {
|
||||
clearImageToInpaint,
|
||||
setImageToInpaint,
|
||||
} from '../../features/tabs/Inpainting/inpaintingSlice';
|
||||
import { tabMap } from '../../features/tabs/InvokeTabs';
|
||||
requestImages,
|
||||
requestNewImages,
|
||||
requestSystemConfig,
|
||||
} from './actions';
|
||||
import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
|
||||
import { tabMap } from 'features/tabs/components/InvokeTabs';
|
||||
|
||||
/**
|
||||
* Returns an object containing listener callbacks for socketio events.
|
||||
@ -56,19 +58,20 @@ const makeSocketIOListeners = (
|
||||
try {
|
||||
dispatch(setIsConnected(true));
|
||||
dispatch(setCurrentStatus('Connected'));
|
||||
dispatch(requestSystemConfig());
|
||||
const gallery: GalleryState = getState().gallery;
|
||||
|
||||
if (gallery.categories.user.latest_mtime) {
|
||||
dispatch(requestNewImages('user'));
|
||||
} else {
|
||||
dispatch(requestImages('user'));
|
||||
}
|
||||
|
||||
if (gallery.categories.result.latest_mtime) {
|
||||
dispatch(requestNewImages('result'));
|
||||
} else {
|
||||
dispatch(requestImages('result'));
|
||||
}
|
||||
|
||||
if (gallery.categories.user.latest_mtime) {
|
||||
dispatch(requestNewImages('user'));
|
||||
} else {
|
||||
dispatch(requestImages('user'));
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@ -97,19 +100,42 @@ const makeSocketIOListeners = (
|
||||
*/
|
||||
onGenerationResult: (data: InvokeAI.ImageResultResponse) => {
|
||||
try {
|
||||
const { shouldLoopback, activeTab } = getState().options;
|
||||
const state = getState();
|
||||
const { shouldLoopback, activeTab } = state.options;
|
||||
const { boundingBox: _, generationMode, ...rest } = data;
|
||||
|
||||
const newImage = {
|
||||
uuid: uuidv4(),
|
||||
...data,
|
||||
category: 'result',
|
||||
...rest,
|
||||
};
|
||||
|
||||
dispatch(
|
||||
addImage({
|
||||
category: 'result',
|
||||
image: newImage,
|
||||
})
|
||||
);
|
||||
if (['txt2img', 'img2img'].includes(generationMode)) {
|
||||
dispatch(
|
||||
addImage({
|
||||
category: 'result',
|
||||
image: { ...newImage, category: 'result' },
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (generationMode === 'unifiedCanvas' && data.boundingBox) {
|
||||
const { boundingBox } = data;
|
||||
dispatch(
|
||||
addImageToStagingArea({
|
||||
image: { ...newImage, category: 'temp' },
|
||||
boundingBox,
|
||||
})
|
||||
);
|
||||
|
||||
if (state.canvas.shouldAutoSave) {
|
||||
dispatch(
|
||||
addImage({
|
||||
image: { ...newImage, category: 'result' },
|
||||
category: 'result',
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldLoopback) {
|
||||
const activeTabName = tabMap[activeTab];
|
||||
@ -118,13 +144,11 @@ const makeSocketIOListeners = (
|
||||
dispatch(setInitialImage(newImage));
|
||||
break;
|
||||
}
|
||||
case 'inpainting': {
|
||||
dispatch(setImageToInpaint(newImage));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dispatch(clearIntermediateImage());
|
||||
|
||||
dispatch(
|
||||
addLogEntry({
|
||||
timestamp: dateFormat(new Date(), 'isoDateTime'),
|
||||
@ -144,6 +168,7 @@ const makeSocketIOListeners = (
|
||||
setIntermediateImage({
|
||||
uuid: uuidv4(),
|
||||
...data,
|
||||
category: 'result',
|
||||
})
|
||||
);
|
||||
if (!data.isBase64) {
|
||||
@ -299,16 +324,11 @@ const makeSocketIOListeners = (
|
||||
|
||||
// remove references to image in options
|
||||
const { initialImage, maskPath } = getState().options;
|
||||
const { imageToInpaint } = getState().inpainting;
|
||||
|
||||
if (initialImage?.url === url || initialImage === url) {
|
||||
dispatch(clearInitialImage());
|
||||
}
|
||||
|
||||
if (imageToInpaint?.url === url) {
|
||||
dispatch(clearImageToInpaint());
|
||||
}
|
||||
|
||||
if (maskPath === url) {
|
||||
dispatch(setMaskPath(''));
|
||||
}
|
||||
@ -320,56 +340,11 @@ const makeSocketIOListeners = (
|
||||
})
|
||||
);
|
||||
},
|
||||
onImageUploaded: (data: InvokeAI.ImageUploadResponse) => {
|
||||
const { destination, ...rest } = data;
|
||||
const image = {
|
||||
uuid: uuidv4(),
|
||||
...rest,
|
||||
};
|
||||
|
||||
try {
|
||||
dispatch(addImage({ image, category: 'user' }));
|
||||
|
||||
switch (destination) {
|
||||
case 'img2img': {
|
||||
dispatch(setInitialImage(image));
|
||||
break;
|
||||
}
|
||||
case 'inpainting': {
|
||||
dispatch(setImageToInpaint(image));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
dispatch(setCurrentImage(image));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dispatch(
|
||||
addLogEntry({
|
||||
timestamp: dateFormat(new Date(), 'isoDateTime'),
|
||||
message: `Image uploaded: ${data.url}`,
|
||||
})
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Callback to run when we receive a 'maskImageUploaded' event.
|
||||
*/
|
||||
onMaskImageUploaded: (data: InvokeAI.ImageUrlResponse) => {
|
||||
const { url } = data;
|
||||
dispatch(setMaskPath(url));
|
||||
dispatch(
|
||||
addLogEntry({
|
||||
timestamp: dateFormat(new Date(), 'isoDateTime'),
|
||||
message: `Mask image uploaded: ${url}`,
|
||||
})
|
||||
);
|
||||
},
|
||||
onSystemConfig: (data: InvokeAI.SystemConfig) => {
|
||||
dispatch(setSystemConfig(data));
|
||||
if (!data.infill_methods.includes('patchmatch')) {
|
||||
dispatch(setInfillMethod(data.infill_methods[0]));
|
||||
}
|
||||
},
|
||||
onModelChanged: (data: InvokeAI.ModelChangeResponse) => {
|
||||
const { model_name, model_list } = data;
|
||||
@ -399,6 +374,16 @@ const makeSocketIOListeners = (
|
||||
})
|
||||
);
|
||||
},
|
||||
onTempFolderEmptied: () => {
|
||||
dispatch(
|
||||
addToast({
|
||||
title: 'Temp Folder Emptied',
|
||||
status: 'success',
|
||||
duration: 2500,
|
||||
isClosable: true,
|
||||
})
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { io } from 'socket.io-client';
|
||||
import makeSocketIOListeners from './listeners';
|
||||
import makeSocketIOEmitters from './emitters';
|
||||
|
||||
import * as InvokeAI from '../invokeai';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
|
||||
/**
|
||||
* Creates a socketio middleware to handle communication with server.
|
||||
@ -43,11 +43,10 @@ export const socketioMiddleware = () => {
|
||||
onGalleryImages,
|
||||
onProcessingCanceled,
|
||||
onImageDeleted,
|
||||
onImageUploaded,
|
||||
onMaskImageUploaded,
|
||||
onSystemConfig,
|
||||
onModelChanged,
|
||||
onModelChangeFailed,
|
||||
onTempFolderEmptied,
|
||||
} = makeSocketIOListeners(store);
|
||||
|
||||
const {
|
||||
@ -58,10 +57,10 @@ export const socketioMiddleware = () => {
|
||||
emitRequestImages,
|
||||
emitRequestNewImages,
|
||||
emitCancelProcessing,
|
||||
emitUploadImage,
|
||||
emitUploadMaskImage,
|
||||
emitRequestSystemConfig,
|
||||
emitRequestModelChange,
|
||||
emitSaveStagingAreaImageToGallery,
|
||||
emitRequestEmptyTempFolder,
|
||||
} = makeSocketIOEmitters(store, socketio);
|
||||
|
||||
/**
|
||||
@ -104,17 +103,6 @@ export const socketioMiddleware = () => {
|
||||
onImageDeleted(data);
|
||||
});
|
||||
|
||||
socketio.on(
|
||||
'imageUploaded',
|
||||
(data: InvokeAI.ImageUploadResponse) => {
|
||||
onImageUploaded(data);
|
||||
}
|
||||
);
|
||||
|
||||
socketio.on('maskImageUploaded', (data: InvokeAI.ImageUrlResponse) => {
|
||||
onMaskImageUploaded(data);
|
||||
});
|
||||
|
||||
socketio.on('systemConfig', (data: InvokeAI.SystemConfig) => {
|
||||
onSystemConfig(data);
|
||||
});
|
||||
@ -127,6 +115,10 @@ export const socketioMiddleware = () => {
|
||||
onModelChangeFailed(data);
|
||||
});
|
||||
|
||||
socketio.on('tempFolderEmptied', () => {
|
||||
onTempFolderEmptied();
|
||||
});
|
||||
|
||||
areListenersSet = true;
|
||||
}
|
||||
|
||||
@ -169,16 +161,6 @@ export const socketioMiddleware = () => {
|
||||
break;
|
||||
}
|
||||
|
||||
case 'socketio/uploadImage': {
|
||||
emitUploadImage(action.payload);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'socketio/uploadMaskImage': {
|
||||
emitUploadMaskImage(action.payload);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'socketio/requestSystemConfig': {
|
||||
emitRequestSystemConfig();
|
||||
break;
|
||||
@ -188,6 +170,16 @@ export const socketioMiddleware = () => {
|
||||
emitRequestModelChange(action.payload);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'socketio/saveStagingAreaImageToGallery': {
|
||||
emitSaveStagingAreaImageToGallery(action.payload);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'socketio/requestEmptyTempFolder': {
|
||||
emitRequestEmptyTempFolder();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
next(action);
|
||||
|
@ -5,16 +5,14 @@ import type { TypedUseSelectorHook } from 'react-redux';
|
||||
import { persistReducer } from 'redux-persist';
|
||||
import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web
|
||||
|
||||
import optionsReducer, { OptionsState } from '../features/options/optionsSlice';
|
||||
import galleryReducer, { GalleryState } from '../features/gallery/gallerySlice';
|
||||
import inpaintingReducer, {
|
||||
InpaintingState,
|
||||
} from '../features/tabs/Inpainting/inpaintingSlice';
|
||||
import { getPersistConfig } from 'redux-deep-persist';
|
||||
|
||||
import optionsReducer from 'features/options/store/optionsSlice';
|
||||
import galleryReducer from 'features/gallery/store/gallerySlice';
|
||||
import systemReducer from 'features/system/store/systemSlice';
|
||||
import canvasReducer from 'features/canvas/store/canvasSlice';
|
||||
|
||||
import systemReducer, { SystemState } from '../features/system/systemSlice';
|
||||
import { socketioMiddleware } from './socketio/middleware';
|
||||
import autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2';
|
||||
import { PersistPartial } from 'redux-persist/es/persistReducer';
|
||||
|
||||
/**
|
||||
* redux-persist provides an easy and reliable way to persist state across reloads.
|
||||
@ -28,87 +26,79 @@ import { PersistPartial } from 'redux-persist/es/persistReducer';
|
||||
* These can be blacklisted in redux-persist.
|
||||
*
|
||||
* The necesssary nested persistors with blacklists are configured below.
|
||||
*
|
||||
* TODO: Do we blacklist initialImagePath? If the image is deleted from disk we get an
|
||||
* ugly 404. But if we blacklist it, then this is a valuable parameter that is lost
|
||||
* on reload. Need to figure out a good way to handle this.
|
||||
*/
|
||||
|
||||
const rootPersistConfig = {
|
||||
key: 'root',
|
||||
storage,
|
||||
stateReconciler: autoMergeLevel2,
|
||||
blacklist: ['gallery', 'system', 'inpainting'],
|
||||
};
|
||||
const canvasBlacklist = [
|
||||
'cursorPosition',
|
||||
'isCanvasInitialized',
|
||||
'doesCanvasNeedScaling',
|
||||
].map((blacklistItem) => `canvas.${blacklistItem}`);
|
||||
|
||||
const systemPersistConfig = {
|
||||
key: 'system',
|
||||
storage,
|
||||
stateReconciler: autoMergeLevel2,
|
||||
blacklist: [
|
||||
'isCancelable',
|
||||
'isConnected',
|
||||
'isProcessing',
|
||||
'currentStep',
|
||||
'socketId',
|
||||
'isESRGANAvailable',
|
||||
'isGFPGANAvailable',
|
||||
'currentStep',
|
||||
'totalSteps',
|
||||
'currentIteration',
|
||||
'totalIterations',
|
||||
'currentStatus',
|
||||
],
|
||||
};
|
||||
const systemBlacklist = [
|
||||
'currentIteration',
|
||||
'currentStatus',
|
||||
'currentStep',
|
||||
'isCancelable',
|
||||
'isConnected',
|
||||
'isESRGANAvailable',
|
||||
'isGFPGANAvailable',
|
||||
'isProcessing',
|
||||
'socketId',
|
||||
'totalIterations',
|
||||
'totalSteps',
|
||||
].map((blacklistItem) => `system.${blacklistItem}`);
|
||||
|
||||
const galleryPersistConfig = {
|
||||
key: 'gallery',
|
||||
storage,
|
||||
stateReconciler: autoMergeLevel2,
|
||||
whitelist: [
|
||||
'galleryWidth',
|
||||
'shouldPinGallery',
|
||||
'shouldShowGallery',
|
||||
'galleryScrollPosition',
|
||||
'galleryImageMinimumWidth',
|
||||
'galleryImageObjectFit',
|
||||
],
|
||||
};
|
||||
const galleryBlacklist = [
|
||||
'categories',
|
||||
'currentCategory',
|
||||
'currentImage',
|
||||
'currentImageUuid',
|
||||
'shouldAutoSwitchToNewImages',
|
||||
'shouldHoldGalleryOpen',
|
||||
'intermediateImage',
|
||||
].map((blacklistItem) => `gallery.${blacklistItem}`);
|
||||
|
||||
const inpaintingPersistConfig = {
|
||||
key: 'inpainting',
|
||||
storage,
|
||||
stateReconciler: autoMergeLevel2,
|
||||
blacklist: ['pastLines', 'futuresLines', 'cursorPosition'],
|
||||
};
|
||||
|
||||
const reducers = combineReducers({
|
||||
const rootReducer = combineReducers({
|
||||
options: optionsReducer,
|
||||
gallery: persistReducer<GalleryState>(galleryPersistConfig, galleryReducer),
|
||||
system: persistReducer<SystemState>(systemPersistConfig, systemReducer),
|
||||
inpainting: persistReducer<InpaintingState>(
|
||||
inpaintingPersistConfig,
|
||||
inpaintingReducer
|
||||
),
|
||||
gallery: galleryReducer,
|
||||
system: systemReducer,
|
||||
canvas: canvasReducer,
|
||||
});
|
||||
|
||||
const persistedReducer = persistReducer<{
|
||||
options: OptionsState;
|
||||
gallery: GalleryState & PersistPartial;
|
||||
system: SystemState & PersistPartial;
|
||||
inpainting: InpaintingState & PersistPartial;
|
||||
}>(rootPersistConfig, reducers);
|
||||
const rootPersistConfig = getPersistConfig({
|
||||
key: 'root',
|
||||
storage,
|
||||
rootReducer,
|
||||
blacklist: [...canvasBlacklist, ...systemBlacklist, ...galleryBlacklist],
|
||||
debounce: 300,
|
||||
});
|
||||
|
||||
const persistedReducer = persistReducer(rootPersistConfig, rootReducer);
|
||||
|
||||
// Continue with store setup
|
||||
export const store = configureStore({
|
||||
reducer: persistedReducer,
|
||||
middleware: (getDefaultMiddleware) =>
|
||||
getDefaultMiddleware({
|
||||
// redux-persist sometimes needs to temporarily put a function in redux state, need to disable this check
|
||||
immutableCheck: false,
|
||||
serializableCheck: false,
|
||||
}).concat(socketioMiddleware()),
|
||||
devTools: {
|
||||
// Uncommenting these very rapidly called actions makes the redux dev tools output much more readable
|
||||
actionsDenylist: [
|
||||
'canvas/setCursorPosition',
|
||||
'canvas/setStageCoordinates',
|
||||
'canvas/setStageScale',
|
||||
'canvas/setIsDrawing',
|
||||
// 'canvas/setBoundingBoxCoordinates',
|
||||
// 'canvas/setBoundingBoxDimensions',
|
||||
'canvas/setIsDrawing',
|
||||
'canvas/addPointToCurrentLine',
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
export type AppGetState = typeof store.getState;
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
|
||||
|