Compare commits
538 Commits
lstein/enh
...
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 | |||
1f0220697b | |||
18ae3949ef | |||
aa95510444 | |||
f33df25830 | |||
3a5a8ceba5 | |||
a1e5f17d1e | |||
303431be89 | |||
8e9f80cc97 | |||
3ad598761c | |||
b4eaf8b751 | |||
fa608efa11 | |||
e9d319bfde | |||
561721aef7 | |||
891c0f21d5 | |||
8973ce7d47 | |||
51c283ba56 | |||
7d262fc158 | |||
fdb16000ab | |||
f62cc7db9d | |||
9fa3e28dd4 | |||
9200b26f21 | |||
d998b2f806 | |||
ac8a7ff70b | |||
2d6e0baa87 | |||
c212b74990 | |||
0352979a8b | |||
70bd61d616 | |||
f2a6985c78 | |||
fe5a581313 | |||
2ec9792f50 | |||
a4204abfce | |||
274b276133 | |||
7707bc7818 | |||
4c035ad4ae | |||
e9090bca8f | |||
398a9bc0c6 | |||
38b9658c15 | |||
f04d1bab21 | |||
c23efb8e2b | |||
5604d3c447 | |||
206101f59d | |||
23348dcd3f | |||
9bf6013fdd | |||
1d11e06e6f | |||
47e6f94111 | |||
810fad9e06 | |||
853c6af623 | |||
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 | |||
636620b1d5 | |||
21961f0c32 | |||
1fe41146f0 | |||
2ad6ef355a | |||
865502ee4f | |||
c7984f3299 | |||
7f150ed833 | |||
badf4e256c | |||
e64c60bbb3 | |||
1780618543 | |||
f91fd27624 | |||
09e41e8f76 | |||
6eeb2107b3 | |||
17053ad8b7 | |||
fefb4dc1f8 | |||
d05b1b3544 | |||
82d4904c07 | |||
1cdcf33cfa | |||
6616fa835a | |||
7b9a4564b1 | |||
fcdefa0620 | |||
ef8b3ce639 | |||
36870a8f53 | |||
b70420951d | |||
1f0c5b4cf1 | |||
8648da8111 | |||
45b4593563 | |||
41b04316cf | |||
e97c6db2a3 | |||
896820a349 | |||
06c8f468bf | |||
61920e2701 | |||
f34ba7ca70 | |||
c30ef0895d | |||
aa3a774f73 | |||
2c30555b84 | |||
743f605773 | |||
519c661abb | |||
22c956c75f | |||
13696adc3a | |||
0196571a12 | |||
9666f466ab | |||
240e5486c8 | |||
8164b6b9cf | |||
4fc82d554f | |||
96b34c0f85 | |||
dd5a88dcee | |||
95ed56bf82 | |||
1ae80f5ab9 | |||
1f0bd3ca6c | |||
a1971f6830 | |||
c6118e8898 | |||
7ba958cf7f | |||
383905d5d2 | |||
6173e3e9ca | |||
3feb7d8922 | |||
1d9edbd0dd | |||
d439abdb89 | |||
ee47ea0c89 | |||
300bb2e627 | |||
ccf8593501 | |||
0fda612f3f | |||
5afff65b71 | |||
7e55bdefce | |||
620cf84d3d | |||
cfe567c62a | |||
cefe12f1df | |||
1e51c39928 | |||
42a02bbb80 | |||
f1ae6dae4c | |||
6195579910 | |||
16c8b23b34 | |||
07ae626b22 | |||
8d171bb044 | |||
6e33ca7e9e | |||
db46e12f2b | |||
868e4b2db8 | |||
2e562742c1 | |||
68e6958009 | |||
ea6e3a7949 | |||
b2879ca99f | |||
4e911566c3 | |||
9bafda6a15 | |||
871a8a5375 | |||
0eef74bc00 | |||
423ae32097 | |||
8282e5d045 | |||
19305cdbdf | |||
eb9028ab30 | |||
21483f5d07 | |||
82dcbac28f | |||
d43bd4625d | |||
ea891324a2 | |||
8fd9ea2193 | |||
fb02666856 | |||
f6f5c2731b | |||
b4e3f771e0 | |||
99bb9491ac | |||
0453f21127 | |||
9fc09aa4bd | |||
5e87062cf8 | |||
3e7a459990 | |||
bbf4c03e50 | |||
611a3a9753 | |||
1611f0d181 | |||
08835115e4 | |||
2d84e28d32 | |||
ef17aae8ab | |||
0cc39f01a3 | |||
688d7258f1 | |||
4513320bf1 | |||
533fd04ef0 | |||
dff5681cf0 | |||
5a2790a69b | |||
7c5305ccba | |||
4013e8ad6f | |||
d1dfd257f9 | |||
5322d735ee | |||
cdb107dcda | |||
be1393a41c | |||
e554c2607f | |||
6215592b12 | |||
349cc25433 | |||
214d276379 | |||
ef24d76adc | |||
ab2b5a691d | |||
c7de2b2801 | |||
e8075658ac | |||
4202dabee1 | |||
d67db2bcf1 | |||
7159ec885f | |||
b5cf734ba9 | |||
f7dc8eafee | |||
762ca60a30 | |||
e7fb9f342c |
@ -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
|
2
.github/CODEOWNERS
vendored
@ -3,3 +3,5 @@ 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
|
9
.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,7 +214,7 @@ 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
|
||||
@ -235,3 +231,6 @@ update.sh
|
||||
|
||||
# this may be present if the user created a venv
|
||||
invokeai
|
||||
|
||||
# no longer stored in source directory
|
||||
models
|
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.
|
||||
|
15
README.md
@ -172,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 |
@ -269,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 ""
|
||||
|
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
|
||||
```
|
||||
|
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
|
||||
|
@ -119,6 +119,25 @@ 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
|
||||
|
||||
|
@ -72,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
|
||||
|
||||
@ -106,15 +111,15 @@ 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-Parameters at [features/CLI.md](../features/CLI.md/#arguments)
|
||||
Find out more about available CLI-Parameters at [features/CLI.md](../../features/CLI/#arguments)
|
||||
|
||||
---
|
||||
|
||||
|
@ -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
|
||||
@ -32,6 +33,7 @@ dependencies:
|
||||
- dependency_injector==4.40.0
|
||||
- getpass_asterisk
|
||||
- omegaconf==2.1.1
|
||||
- picklescan
|
||||
- pyreadline3
|
||||
- realesrgan
|
||||
- taming-transformers-rom1504
|
||||
@ -39,7 +41,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#egg=gfpgan
|
||||
- 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:
|
||||
@ -23,6 +23,7 @@ dependencies:
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -32,6 +33,7 @@ dependencies:
|
||||
- streamlit==1.12.0
|
||||
- taming-transformers-rom1504
|
||||
- test-tube>=0.7.5
|
||||
- tqdm
|
||||
- torch
|
||||
- torch-fidelity==0.3.0
|
||||
- torchaudio
|
||||
@ -39,7 +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#egg=gfpgan
|
||||
- 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
|
||||
@ -26,6 +26,7 @@ dependencies:
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -39,7 +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/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#egg=gfpgan
|
||||
- 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 .
|
||||
|
@ -52,13 +52,14 @@ dependencies:
|
||||
- transformers=4.23
|
||||
- pip:
|
||||
- getpass_asterisk
|
||||
- picklescan
|
||||
- taming-transformers-rom1504
|
||||
- test-tube==0.7.5
|
||||
- git+https://github.com/openai/CLIP.git@main#egg=clip
|
||||
- git+https://github.com/invoke-ai/k-diffusion.git@mps#egg=k_diffusion
|
||||
- git+https://github.com/invoke-ai/Real-ESRGAN.git#egg=realesrgan
|
||||
- git+https://github.com/invoke-ai/GFPGAN.git#egg=gfpgan
|
||||
- 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
|
||||
@ -27,6 +27,7 @@ dependencies:
|
||||
- kornia==0.6.0
|
||||
- omegaconf==2.2.3
|
||||
- opencv-python==4.5.5.64
|
||||
- picklescan
|
||||
- pillow==9.2.0
|
||||
- pudb==2019.2
|
||||
- pyreadline3
|
||||
@ -42,5 +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#egg=gfpgan
|
||||
- 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,6 +4,7 @@ dependency_injector==4.40.0
|
||||
diffusers
|
||||
einops
|
||||
eventlet
|
||||
facexlib
|
||||
flask==2.1.3
|
||||
flask_cors==3.0.10
|
||||
flask_socketio==5.3.0
|
||||
@ -22,15 +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@relaxed-python-requirement#egg=clipseg
|
||||
git+https://github.com/invoke-ai/GFPGAN#egg=gfpgan
|
||||
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,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/cu116 --trusted-host https://download.pytorch.org
|
||||
basicsr==1.4.1
|
||||
torch==1.12.1
|
||||
|
@ -5,7 +5,7 @@
|
||||
- `python scripts/dream.py --web` serves both frontend and backend at
|
||||
http://localhost:9090
|
||||
|
||||
## Environment
|
||||
## Evironment
|
||||
|
||||
Install [node](https://nodejs.org/en/download/) (includes npm) and optionally
|
||||
[yarn](https://yarnpkg.com/getting-started/install).
|
||||
@ -15,7 +15,7 @@ packages.
|
||||
|
||||
## Dev
|
||||
|
||||
1. From `frontend/`, run `npm run dev` / `yarn dev` to start the dev server.
|
||||
1. From `frontend/`, run `npm dev` / `yarn dev` to start the dev server.
|
||||
2. Run `python scripts/dream.py --web`.
|
||||
3. Navigate to the dev server address e.g. `http://localhost:5173/`.
|
||||
|
||||
|
1
frontend/dist/assets/index.40a72c80.css
vendored
501
frontend/dist/assets/index.a8ba2a6c.js
vendored
1
frontend/dist/assets/index.c609c0c8.css
vendored
Normal file
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.a8ba2a6c.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"] }]
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
|
BIN
frontend/src/assets/images/mask.afdesign
Normal file
77
frontend/src/assets/images/mask.svg
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 60 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
<g transform="matrix(1,0,0,1,0,5)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,10)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,15)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,20)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,25)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,30)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,35)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,40)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,45)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,50)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,55)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,60)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-5)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-10)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-15)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-20)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-25)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-30)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-35)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-40)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-45)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-50)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-55)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0,-60)">
|
||||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
@ -1,7 +1,7 @@
|
||||
import { Box, forwardRef, Icon } from '@chakra-ui/react';
|
||||
import { IconType } from 'react-icons';
|
||||
import { MdHelp } from 'react-icons/md';
|
||||
import { Feature } from '../../app/features';
|
||||
import { Feature } from 'app/features';
|
||||
import GuidePopover from './GuidePopover';
|
||||
|
||||
type GuideIconProps = {
|
||||
@ -13,7 +13,7 @@ const GuideIcon = forwardRef(
|
||||
({ feature, icon = MdHelp }: GuideIconProps, ref) => (
|
||||
<GuidePopover feature={feature}>
|
||||
<Box ref={ref}>
|
||||
<Icon as={icon} />
|
||||
<Icon marginBottom={'-.15rem'} as={icon} />
|
||||
</Box>
|
||||
</GuidePopover>
|
||||
)
|
||||
|
@ -1,11 +1,11 @@
|
||||
.guide-popover-arrow {
|
||||
background-color: var(--tab-panel-bg) !important;
|
||||
box-shadow: none !important;
|
||||
background-color: var(--tab-panel-bg);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.guide-popover-content {
|
||||
background-color: var(--background-color-secondary) !important;
|
||||
border: none !important;
|
||||
background-color: var(--background-color-secondary);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.guide-popover-guide-content {
|
||||
|
@ -5,12 +5,12 @@ import {
|
||||
PopoverTrigger,
|
||||
Box,
|
||||
} from '@chakra-ui/react';
|
||||
import { SystemState } from '../../features/system/systemSlice';
|
||||
import { useAppSelector } from '../../app/store';
|
||||
import { RootState } from '../../app/store';
|
||||
import { SystemState } from 'features/system/store/systemSlice';
|
||||
import { useAppSelector } from 'app/store';
|
||||
import { RootState } from 'app/store';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { ReactElement } from 'react';
|
||||
import { Feature, FEATURES } from '../../app/features';
|
||||
import { Feature, FEATURES } from 'app/features';
|
||||
|
||||
type GuideProps = {
|
||||
children: ReactElement;
|
||||
|
86
frontend/src/common/components/IAIAlertDialog.tsx
Normal file
@ -0,0 +1,86 @@
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogBody,
|
||||
AlertDialogContent,
|
||||
AlertDialogFooter,
|
||||
AlertDialogHeader,
|
||||
AlertDialogOverlay,
|
||||
Button,
|
||||
forwardRef,
|
||||
useDisclosure,
|
||||
} from '@chakra-ui/react';
|
||||
import { cloneElement, ReactElement, ReactNode, useRef } from 'react';
|
||||
|
||||
type Props = {
|
||||
acceptButtonText?: string;
|
||||
acceptCallback: () => void;
|
||||
cancelButtonText?: string;
|
||||
cancelCallback?: () => void;
|
||||
children: ReactNode;
|
||||
title: string;
|
||||
triggerComponent: ReactElement;
|
||||
};
|
||||
|
||||
const IAIAlertDialog = forwardRef((props: Props, ref) => {
|
||||
const {
|
||||
acceptButtonText = 'Accept',
|
||||
acceptCallback,
|
||||
cancelButtonText = 'Cancel',
|
||||
cancelCallback,
|
||||
children,
|
||||
title,
|
||||
triggerComponent,
|
||||
} = props;
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const cancelRef = useRef<HTMLButtonElement | null>(null);
|
||||
|
||||
const handleAccept = () => {
|
||||
acceptCallback();
|
||||
onClose();
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
cancelCallback && cancelCallback();
|
||||
onClose();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{cloneElement(triggerComponent, {
|
||||
onClick: onOpen,
|
||||
ref: ref,
|
||||
})}
|
||||
|
||||
<AlertDialog
|
||||
isOpen={isOpen}
|
||||
leastDestructiveRef={cancelRef}
|
||||
onClose={onClose}
|
||||
>
|
||||
<AlertDialogOverlay>
|
||||
<AlertDialogContent className="modal">
|
||||
<AlertDialogHeader fontSize="lg" fontWeight="bold">
|
||||
{title}
|
||||
</AlertDialogHeader>
|
||||
|
||||
<AlertDialogBody>{children}</AlertDialogBody>
|
||||
|
||||
<AlertDialogFooter>
|
||||
<Button
|
||||
ref={cancelRef}
|
||||
onClick={handleCancel}
|
||||
className="modal-close-btn"
|
||||
>
|
||||
{cancelButtonText}
|
||||
</Button>
|
||||
<Button colorScheme="red" onClick={handleAccept} ml={3}>
|
||||
{acceptButtonText}
|
||||
</Button>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialogOverlay>
|
||||
</AlertDialog>
|
||||
</>
|
||||
);
|
||||
});
|
||||
export default IAIAlertDialog;
|
@ -1,3 +1,8 @@
|
||||
.invokeai__button {
|
||||
justify-content: space-between;
|
||||
background-color: var(--btn-base-color);
|
||||
place-content: center;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--btn-base-color-hover);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
svg {
|
||||
width: 0.6rem;
|
||||
height: 0.6rem;
|
||||
stroke-width: 3px !important;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
|
||||
&[data-checked] {
|
||||
|
@ -1,11 +1,11 @@
|
||||
@use '../../styles/Mixins/' as *;
|
||||
|
||||
.invokeai__icon-button {
|
||||
background-color: var(--btn-grey);
|
||||
background: var(--btn-base-color);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--btn-grey-hover);
|
||||
background-color: var(--btn-base-color-hover);
|
||||
}
|
||||
|
||||
&[data-selected='true'] {
|
||||
@ -20,16 +20,39 @@
|
||||
}
|
||||
|
||||
&[data-variant='link'] {
|
||||
background: none !important;
|
||||
background: none;
|
||||
&:hover {
|
||||
background: none !important;
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-selected='true'] {
|
||||
border-color: var(--accent-color);
|
||||
// Check Box Style
|
||||
&[data-as-checkbox='true'] {
|
||||
background-color: var(--btn-base-color);
|
||||
border: 3px solid var(--btn-base-color);
|
||||
|
||||
svg {
|
||||
fill: var(--text-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: var(--accent-color-hover);
|
||||
background-color: var(--btn-base-color);
|
||||
border-color: var(--btn-checkbox-border-hover);
|
||||
svg {
|
||||
fill: var(--text-color);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-selected='true'] {
|
||||
border-color: var(--accent-color);
|
||||
svg {
|
||||
fill: var(--accent-color-hover);
|
||||
}
|
||||
&:hover {
|
||||
svg {
|
||||
fill: var(--accent-color-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,28 +61,12 @@
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-iteration-count: infinite;
|
||||
|
||||
&:hover {
|
||||
animation: none;
|
||||
background-color: var(--accent-color-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-as-checkbox='true'] {
|
||||
background-color: var(--btn-grey);
|
||||
border: 3px solid var(--btn-grey);
|
||||
|
||||
svg {
|
||||
fill: var(--text-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--btn-grey);
|
||||
border-color: var(--btn-checkbox-border-hover);
|
||||
svg {
|
||||
fill: var(--text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulseColor {
|
||||
|
@ -25,13 +25,23 @@ const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => {
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<Tooltip label={tooltip} hasArrow {...tooltipProps}>
|
||||
<Tooltip
|
||||
label={tooltip}
|
||||
hasArrow
|
||||
{...tooltipProps}
|
||||
{...(tooltipProps?.placement
|
||||
? { placement: tooltipProps.placement }
|
||||
: { placement: 'top' })}
|
||||
>
|
||||
<IconButton
|
||||
ref={forwardedRef}
|
||||
className={`invokeai__icon-button ${styleClass}`}
|
||||
className={
|
||||
styleClass
|
||||
? `invokeai__icon-button ${styleClass}`
|
||||
: `invokeai__icon-button`
|
||||
}
|
||||
data-as-checkbox={asCheckbox}
|
||||
data-selected={isChecked !== undefined ? isChecked : undefined}
|
||||
style={props.onClick ? { cursor: 'pointer' } : {}}
|
||||
{...rest}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
@ -1,16 +1,14 @@
|
||||
.invokeai__number-input-form-control {
|
||||
display: grid;
|
||||
grid-template-columns: max-content auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 1rem;
|
||||
|
||||
.invokeai__number-input-form-label {
|
||||
color: var(--text-color-secondary);
|
||||
margin-right: 0;
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0;
|
||||
flex-grow: 2;
|
||||
white-space: nowrap;
|
||||
padding-right: 1rem;
|
||||
|
||||
&[data-focus] + .invokeai__number-input-root {
|
||||
outline: none;
|
||||
@ -33,7 +31,7 @@
|
||||
align-items: center;
|
||||
background-color: var(--background-color-secondary);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 0.2rem;
|
||||
border-radius: 0.3rem;
|
||||
}
|
||||
|
||||
.invokeai__number-input-field {
|
||||
@ -41,10 +39,8 @@
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
font-size: 0.9rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
padding: 0 0.5rem;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
|
@ -21,6 +21,7 @@ const numberStringRegex = /^-?(0\.)?\.?$/;
|
||||
interface Props extends Omit<NumberInputProps, 'onChange'> {
|
||||
styleClass?: string;
|
||||
label?: string;
|
||||
labelFontSize?: string | number;
|
||||
width?: string | number;
|
||||
showStepper?: boolean;
|
||||
value: number;
|
||||
@ -43,6 +44,7 @@ interface Props extends Omit<NumberInputProps, 'onChange'> {
|
||||
const IAINumberInput = (props: Props) => {
|
||||
const {
|
||||
label,
|
||||
labelFontSize = '1rem',
|
||||
styleClass,
|
||||
isDisabled = false,
|
||||
showStepper = true,
|
||||
@ -127,6 +129,7 @@ const IAINumberInput = (props: Props) => {
|
||||
<FormLabel
|
||||
className="invokeai__number-input-form-label"
|
||||
style={{ display: label ? 'block' : 'none' }}
|
||||
fontSize={labelFontSize}
|
||||
{...formLabelProps}
|
||||
>
|
||||
{label}
|
||||
|
@ -1,10 +1,10 @@
|
||||
.invokeai__popover-content {
|
||||
min-width: unset;
|
||||
width: unset !important;
|
||||
width: unset;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem !important;
|
||||
background-color: var(--background-color) !important;
|
||||
border: 2px solid var(--border-color) !important;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--background-color);
|
||||
border: 2px solid var(--border-color);
|
||||
|
||||
.invokeai__popover-arrow {
|
||||
background-color: var(--background-color) !important;
|
||||
|
@ -29,7 +29,7 @@ const IAIPopover = (props: IAIPopoverProps) => {
|
||||
<Popover {...rest}>
|
||||
<PopoverTrigger>{triggerComponent}</PopoverTrigger>
|
||||
<PopoverContent className={`invokeai__popover-content ${styleClass}`}>
|
||||
{hasArrow && <PopoverArrow className={'invokeai__popover-arrow'} />}
|
||||
{hasArrow && <PopoverArrow className="invokeai__popover-arrow" />}
|
||||
{children}
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
@ -4,7 +4,6 @@
|
||||
display: flex;
|
||||
column-gap: 1rem;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
|
||||
.invokeai__select-label {
|
||||
color: var(--text-color-secondary);
|
||||
@ -15,6 +14,7 @@
|
||||
border: 2px solid var(--border-color);
|
||||
background-color: var(--background-color-secondary);
|
||||
font-weight: bold;
|
||||
font-size: 0.9rem;
|
||||
height: 2rem;
|
||||
border-radius: 0.2rem;
|
||||
|
||||
@ -27,5 +27,6 @@
|
||||
|
||||
.invokeai__select-option {
|
||||
background-color: var(--background-color-secondary);
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,18 @@
|
||||
import { FormControl, FormLabel, Select, SelectProps } from '@chakra-ui/react';
|
||||
import {
|
||||
FormControl,
|
||||
FormLabel,
|
||||
Select,
|
||||
SelectProps,
|
||||
Tooltip,
|
||||
TooltipProps,
|
||||
} from '@chakra-ui/react';
|
||||
import { MouseEvent } from 'react';
|
||||
|
||||
type IAISelectProps = SelectProps & {
|
||||
label: string;
|
||||
label?: string;
|
||||
styleClass?: string;
|
||||
tooltip?: string;
|
||||
tooltipProps?: Omit<TooltipProps, 'children'>;
|
||||
validValues:
|
||||
| Array<number | string>
|
||||
| Array<{ key: string; value: string | number }>;
|
||||
@ -16,6 +25,8 @@ const IAISelect = (props: IAISelectProps) => {
|
||||
label,
|
||||
isDisabled,
|
||||
validValues,
|
||||
tooltip,
|
||||
tooltipProps,
|
||||
size = 'sm',
|
||||
fontSize = 'md',
|
||||
styleClass,
|
||||
@ -32,37 +43,41 @@ const IAISelect = (props: IAISelectProps) => {
|
||||
e.nativeEvent.cancelBubble = true;
|
||||
}}
|
||||
>
|
||||
<FormLabel
|
||||
className="invokeai__select-label"
|
||||
fontSize={fontSize}
|
||||
marginBottom={1}
|
||||
flexGrow={2}
|
||||
whiteSpace="nowrap"
|
||||
>
|
||||
{label}
|
||||
</FormLabel>
|
||||
<Select
|
||||
className="invokeai__select-picker"
|
||||
fontSize={fontSize}
|
||||
size={size}
|
||||
{...rest}
|
||||
>
|
||||
{validValues.map((opt) => {
|
||||
return typeof opt === 'string' || typeof opt === 'number' ? (
|
||||
<option key={opt} value={opt} className="invokeai__select-option">
|
||||
{opt}
|
||||
</option>
|
||||
) : (
|
||||
<option
|
||||
key={opt.value}
|
||||
value={opt.value}
|
||||
className="invokeai__select-option"
|
||||
>
|
||||
{opt.key}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
{label && (
|
||||
<FormLabel
|
||||
className="invokeai__select-label"
|
||||
fontSize={fontSize}
|
||||
marginBottom={1}
|
||||
flexGrow={2}
|
||||
whiteSpace="nowrap"
|
||||
>
|
||||
{label}
|
||||
</FormLabel>
|
||||
)}
|
||||
<Tooltip label={tooltip} {...tooltipProps}>
|
||||
<Select
|
||||
className="invokeai__select-picker"
|
||||
fontSize={fontSize}
|
||||
size={size}
|
||||
{...rest}
|
||||
>
|
||||
{validValues.map((opt) => {
|
||||
return typeof opt === 'string' || typeof opt === 'number' ? (
|
||||
<option key={opt} value={opt} className="invokeai__select-option">
|
||||
{opt}
|
||||
</option>
|
||||
) : (
|
||||
<option
|
||||
key={opt.value}
|
||||
value={opt.value}
|
||||
className="invokeai__select-option"
|
||||
>
|
||||
{opt.key}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
</Tooltip>
|
||||
</FormControl>
|
||||
);
|
||||
};
|
||||
|
@ -1,40 +1,62 @@
|
||||
@use '../../styles/Mixins/' as *;
|
||||
|
||||
.invokeai__slider-form-control {
|
||||
.invokeai__slider-component {
|
||||
display: flex;
|
||||
column-gap: 1rem;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
padding-right: 0.25rem;
|
||||
|
||||
.invokeai__slider-inner-container {
|
||||
display: flex;
|
||||
column-gap: 0.5rem;
|
||||
.invokeai__slider-component-label {
|
||||
min-width: max-content;
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-color-secondary);
|
||||
}
|
||||
|
||||
.invokeai__slider-form-label {
|
||||
color: var(--text-color-secondary);
|
||||
margin: 0;
|
||||
margin-right: 0.5rem;
|
||||
margin-bottom: 0.1rem;
|
||||
.invokeai__slider_track {
|
||||
background-color: var(--tab-color);
|
||||
}
|
||||
|
||||
.invokeai__slider_track-filled {
|
||||
background-color: var(--slider-color);
|
||||
}
|
||||
|
||||
.invokeai__slider-thumb {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.invokeai__slider-mark {
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
color: var(--slider-color);
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
.invokeai__slider-number-input {
|
||||
border: none;
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
height: 2rem;
|
||||
background-color: var(--background-color-secondary);
|
||||
border: 2px solid var(--border-color);
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
border: 2px solid var(--input-border-color);
|
||||
box-shadow: 0 0 10px 0 var(--input-box-shadow-color);
|
||||
}
|
||||
|
||||
.invokeai__slider-root {
|
||||
.invokeai__slider-filled-track {
|
||||
background-color: var(--accent-color-hover);
|
||||
}
|
||||
&:disabled {
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
.invokeai__slider-track {
|
||||
background-color: var(--text-color-secondary);
|
||||
height: 5px;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
.invokeai__slider-number-stepper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.invokeai__slider-thumb {
|
||||
}
|
||||
&[data-markers='true'] {
|
||||
.invokeai__slider_container {
|
||||
margin-top: -1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.invokeai__slider-thumb-tooltip {
|
||||
}
|
||||
|