Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use 🧨diffusers model #1583

Merged
merged 251 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
1d43512
initial commit of DiffusionPipeline class
keturn Nov 9, 2022
58ea3bf
spike: proof of concept using diffusers for txt2img
keturn Nov 9, 2022
dcfdb83
doc: type hints for Generator
keturn Nov 9, 2022
9b274bd
refactor(model_cache): factor out load_ckpt
keturn Nov 9, 2022
4c3858e
model_cache: add ability to load a diffusers model pipeline
keturn Nov 10, 2022
ae9b482
model_cache: fix model default image dimensions
keturn Nov 10, 2022
d55e229
txt2img: support switching diffusers schedulers
keturn Nov 10, 2022
1e98f4b
diffusers: let the scheduler do its scaling of the initial latents
keturn Nov 10, 2022
05a1d68
web server: update image_progress callback for diffusers data
keturn Nov 10, 2022
e99faeb
diffusers: restore prompt weighting feature
keturn Nov 11, 2022
97dd4a2
diffusers: fix set-sampler error following model switch
keturn Nov 11, 2022
b6b1a8d
diffusers: use InvokeAIDiffuserComponent for conditioning
keturn Nov 12, 2022
95db6e8
cross_attention_control: stub (no-op) implementations for diffusers
keturn Nov 12, 2022
01ff1cf
model_cache: let offload_model work with DiffusionPipeline, sorta.
keturn Nov 12, 2022
aca6d21
models.yaml.example: add diffusers-format model, set as default
keturn Nov 13, 2022
c5274e6
test-invoke-conda: use diffusers-format model
keturn Nov 13, 2022
94f5734
environment-mac: upgrade to diffusers 0.7 (from 0.6)
keturn Nov 14, 2022
a6a766d
preload_models: explicitly load diffusers models
keturn Nov 16, 2022
f3f6213
fix(model_cache): don't check `model.config` in diffusers format
keturn Nov 22, 2022
efbb807
diffusers integration: support img2img
keturn Nov 24, 2022
ceb53cc
dev: upgrade to diffusers 0.8 (from 0.7.1)
keturn Nov 23, 2022
b7864aa
refactor: remove backported img2img.get_timesteps
keturn Nov 24, 2022
5cee211
ci: use diffusers model
keturn Nov 25, 2022
716ca8f
dev: upgrade to diffusers 0.9 (from 0.8.1)
keturn Nov 25, 2022
56153c2
lint: correct annotations for Python 3.9.
keturn Nov 25, 2022
09728dd
lint: correct AttributeError.name reference for Python 3.9.
keturn Nov 25, 2022
ea07398
CI: prefer diffusers-1.4 because it no longer requires a token
keturn Nov 25, 2022
c21660a
build: there's yet another place to update requirements?
keturn Nov 26, 2022
8ce1ae5
configure: try to download models even without token
keturn Nov 26, 2022
3898336
configure: add troubleshooting info for config-not-found
keturn Nov 27, 2022
73ddde7
fix(configure): prepend root to config path
keturn Nov 27, 2022
35c4d26
fix(configure): remove second `default: true` from models example
keturn Nov 27, 2022
f9dcc9a
CI: simplify test-on-push logic now that we don't need secrets
keturn Nov 29, 2022
ca1f76b
create an embedding_manager for diffusers
keturn Nov 29, 2022
8157bff
internal: avoid importing diffusers DummyObject
keturn Nov 30, 2022
7c558d5
fix "config attributes…not expected" diffusers warnings.
keturn Nov 30, 2022
e9a0f07
fix deprecated scheduler construction
keturn Nov 30, 2022
adaa1c7
work around an apparent MPS torch bug that causes conditioning to hav…
damian0815 Nov 30, 2022
494936a
🚧 post-rebase repair
keturn Nov 30, 2022
b02f368
Merge branch 'main' into dev/diffusers
keturn Dec 1, 2022
ea1cf83
preliminary support for outpainting (no masking yet)
keturn Dec 1, 2022
9d7fe45
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 2, 2022
9ea10ec
monkey-patch diffusers.attention and use Invoke lowvram code
damian0815 Dec 3, 2022
e0495a7
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 4, 2022
f48706e
add always_use_cpu arg to bypass MPS
damian0815 Dec 4, 2022
ff42027
add cross-attention control support to diffusers (fails on MPS)
damian0815 Dec 4, 2022
8753120
diffusers support for the inpainting model
keturn Dec 5, 2022
b2664e8
fix debug_image to not crash with non-RGB images.
keturn Dec 5, 2022
f3570d8
inpainting for the normal model [WIP]
keturn Dec 5, 2022
c6f31e5
fix off-by-one bug in cross-attention-control (#1774)
damian0815 Dec 4, 2022
69d4276
refactor common CrossAttention stuff into a mixin so that the old ldm…
damian0815 Dec 5, 2022
5c7e675
inpainting for the normal model. I think it works this time.
keturn Dec 5, 2022
a0eb30a
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 6, 2022
bf63764
diffusers: reset num_vectors_per_token
keturn Dec 6, 2022
04a5bc9
diffusers: txt2img2img (hires_fix)
keturn Dec 7, 2022
0390e67
Merge branch 'main' into dev/diffusers
keturn Dec 7, 2022
d6eef61
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 8, 2022
821c7df
refactor(diffusers): reduce some code duplication amongst the differe…
keturn Dec 8, 2022
9bcb3b1
fixup! refactor(diffusers): reduce some code duplication amongst the …
keturn Dec 8, 2022
30a8d4c
diffusers: enable DPMSolver++ scheduler
keturn Dec 8, 2022
9199d69
diffusers: upgrade to diffusers 0.10, add Heun scheduler
keturn Dec 8, 2022
c28f56d
diffusers(ModelCache): stopgap to make from_cpu compatible with diffu…
keturn Dec 9, 2022
a3e41d6
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 9, 2022
8e2da9a
CI: default to diffusers-1.5 now that runwayml token requirement is gone
keturn Dec 9, 2022
811dc23
diffusers: update to 0.10 (and transformers to 4.25)
keturn Dec 9, 2022
1a67836
diffusers: use xformers when available
keturn Dec 10, 2022
50c48cf
diffusers: make masked img2img behave better with multi-step schedulers
keturn Dec 10, 2022
66d32b7
diffusers: work more better with more models.
keturn Dec 10, 2022
6353222
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 10, 2022
061c536
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 11, 2022
cd358c4
diffusers: stopgap fix for attention_maps_callback crash after recent…
keturn Dec 11, 2022
a31ac57
fixup import merge conflicts
keturn Dec 11, 2022
4fa26e8
test: add tests/inpainting inputs for masked img2img
keturn Dec 11, 2022
520c17a
diffusers(AddsMaskedGuidance): partial fix for k-schedulers
keturn Dec 11, 2022
e89edeb
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 11, 2022
1cae089
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 11, 2022
e32b82a
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 12, 2022
0b48f2e
fix --safety_checker arg parsing
keturn Dec 13, 2022
31fd285
generate: fix import error
keturn Dec 13, 2022
dea357f
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 13, 2022
07ac88b
Merge branch 'main' into dev/diffusers
keturn Dec 13, 2022
3432164
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 14, 2022
26eac9d
CI: don't try to read the old init location
keturn Dec 14, 2022
1f86e52
Merge branch 'main' into dev/diffusers
keturn Dec 14, 2022
3607042
diffusers: support loading an alternate VAE
keturn Dec 14, 2022
0605cf4
CI: remove sh-syntax if-statement so it doesn't crash powershell
keturn Dec 14, 2022
2c6db2e
CI: fold strings in yaml because backslash is not line-continuation i…
keturn Dec 14, 2022
23eb80b
attention maps callback stuff for diffusers
damian0815 Dec 14, 2022
12a88c8
build: fix syntax error in environment-mac
keturn Dec 14, 2022
6e4dad6
diffusers: add INITIAL_MODELS with diffusers-compatible repos
keturn Dec 14, 2022
87b6058
re-enable the embedding manager; closes #1778
damian0815 Dec 16, 2022
bc515e2
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 16, 2022
8bcca8c
Squashed commit of the following:
damian0815 Dec 18, 2022
c758500
stop using WeightedFrozenCLIPEmbedder
damian0815 Dec 18, 2022
41c5a8e
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 18, 2022
e1c20d0
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 19, 2022
c6c22b2
Merge branch 'main' into dev/diffusers
lstein Dec 20, 2022
ca95445
store diffusion models locally
lstein Dec 21, 2022
2db411f
fix conflicts
lstein Dec 21, 2022
296bd01
allow non-local files during development
lstein Dec 21, 2022
b29dcc7
path takes priority over repo_id
lstein Dec 21, 2022
0e8072b
MVP for model_cache and configure_invokeai
lstein Dec 21, 2022
ebbebd6
proper support for float32/float16
lstein Dec 22, 2022
c73112d
add on-the-fly conversion of .ckpt to diffusers models
lstein Dec 22, 2022
b71b789
add parallel set of generator files for ckpt legacy generation
lstein Dec 22, 2022
10b2870
generation using legacy ckpt models now working
lstein Dec 22, 2022
faffca6
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 23, 2022
a4f3d8a
diffusers: fix missing attention_maps_callback
keturn Dec 23, 2022
2dde89f
Merge branch 'main' into dev/diffusers
keturn Dec 23, 2022
3a61258
associate legacy CrossAttention with .ckpt models
lstein Dec 23, 2022
b72c878
enable autoconvert
lstein Dec 23, 2022
2e3d42d
diffusers: update to diffusers 0.11 (from 0.10.2)
keturn Dec 24, 2022
abb2b24
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 24, 2022
3309baf
fix vae loading & width/height calculation
lstein Dec 24, 2022
5c8d5d4
Merge branch 'dev/diffusers' of github.com:/invoke-ai/InvokeAI into d…
lstein Dec 24, 2022
aaff507
refactor: encapsulate these conditioning data into one container
keturn Dec 24, 2022
644ba5e
diffusers: fix some noise-scaling issues by pushing the noise-mixing …
keturn Dec 24, 2022
003a7f8
add support for safetensors and accelerate
lstein Dec 24, 2022
8ce7c45
set local_files_only when internet unreachable
lstein Dec 24, 2022
f3eb7fe
Merge branch 'main' into dev/diffusers
keturn Dec 24, 2022
f0fb555
diffusers: fix error-handling path when model repo has no fp16 branch
keturn Dec 24, 2022
76075da
fix generatorinpaint error
lstein Dec 24, 2022
eb7db21
Merge branch 'dev/diffusers' of github.com:/invoke-ai/InvokeAI into d…
lstein Dec 24, 2022
aa55ab7
Merge branch 'main' into dev/diffusers
keturn Dec 24, 2022
3e8346b
quench diffuser safety-checker warning
lstein Dec 24, 2022
17af8a8
Merge branch 'dev/diffusers' of github.com:/invoke-ai/InvokeAI into d…
lstein Dec 24, 2022
204cbdf
Merge branch 'main' into dev/diffusers
keturn Dec 25, 2022
50f131c
diffusers: support stochastic DDIM eta parameter
keturn Dec 28, 2022
72f5cbb
fix conda env creation on macos
damian0815 Dec 28, 2022
bac0901
fix cross-attention with diffusers 0.11
damian0815 Dec 28, 2022
e294fca
diffusers: the VAE needs to be tiling as well as the U-Net
keturn Dec 28, 2022
17a6493
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 28, 2022
795a5c7
diffusers: comment on subfolders
keturn Dec 28, 2022
7166165
diffusers: embiggen!
keturn Dec 28, 2022
3d03ebb
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Dec 29, 2022
3811d07
diffusers: make model_cache.list_models serializable
keturn Dec 29, 2022
1340b16
Merge branch 'main' into dev/diffusers
keturn Dec 29, 2022
c086c45
Merge branch 'main' into dev/diffusers
keturn Dec 30, 2022
aa174a9
diffusers(inpaint): restore scaling functionality
keturn Dec 31, 2022
014327f
Merge remote-tracking branch 'origin/dev/diffusers' into dev/diffusers
keturn Dec 31, 2022
45e34d5
fix requirements clash between numba and numpy 1.24
lstein Dec 31, 2022
4e3f5cc
diffusers: allow inpainting model to do non-inpainting tasks
keturn Jan 1, 2023
132c960
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Jan 1, 2023
9a90688
start expanding model_cache functionality
lstein Jan 1, 2023
8a4f339
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 2, 2023
76fbade
add import_ckpt_model() and import_diffuser_model() methods to model_…
lstein Jan 2, 2023
8ef3c68
allow "recommended" flag to be optional in INITIAL_MODELS.yaml
lstein Jan 2, 2023
d8897b7
configure_invokeai now downloads VAE diffusers in advance
lstein Jan 2, 2023
dfa5f56
rename ModelCache to ModelManager
lstein Jan 2, 2023
faa30e4
remove support for `repo_name` in models.yaml
lstein Jan 2, 2023
4c9d796
Merge branch 'main' into dev/diffusers
keturn Jan 2, 2023
c32a7d2
check for and refuse to load embeddings trained on incompatible models
lstein Jan 2, 2023
0ee5fc3
models.yaml.example: s/repo_name/repo_id
keturn Jan 2, 2023
750ea39
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 2, 2023
b8da8d7
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 2, 2023
33d4ee6
add MVP textual inversion script
lstein Jan 3, 2023
088e546
refactor(InvokeAIDiffuserComponent): factor out _combine()
keturn Jan 3, 2023
430f044
InvokeAIDiffuserComponent: implement threshold
keturn Jan 3, 2023
9737077
InvokeAIDiffuserComponent: diagnostic logs for threshold
keturn Jan 3, 2023
0f7d8fd
add a curses-based frontend to textual inversion
lstein Jan 3, 2023
c9811b5
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 3, 2023
1ff402f
add curses-based interface for textual inversion
lstein Jan 4, 2023
690365a
fix crash in convert_and_import()
lstein Jan 4, 2023
13129fd
potential workaround for no 'state_dict' key error
lstein Jan 4, 2023
8bcf4b7
create TI output dir if needed
lstein Jan 4, 2023
2ac2f81
Update environment-lin-cuda.yml (#2159)
wybartel Jan 4, 2023
17ceaed
Merge remote-tracking branch 'origin/main' into dev/diffusers
keturn Jan 4, 2023
34626f3
diffusers: update sampler-to-scheduler mapping
keturn Jan 4, 2023
7d65152
improve user exp for ckt to diffusers conversion
lstein Jan 5, 2023
d1e88de
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 5, 2023
ec98174
web: adapt progress callback to deal with old generator or new diffus…
keturn Jan 5, 2023
fb178d5
clean-up model_manager code
lstein Jan 5, 2023
61d8be1
handle edge cases for import_model() and convert_model()
lstein Jan 6, 2023
f14dac4
add support for safetensor .ckpt files
lstein Jan 6, 2023
b1e9819
fix name error
lstein Jan 6, 2023
282c0ef
code cleanup with pyflake
lstein Jan 6, 2023
a8591cd
improve model setting behavior
lstein Jan 6, 2023
54179e6
update test-invoke-pip.yml
mauwii Jan 6, 2023
0c03f6c
exclude dev/diffusers from "fail for draft PRs"
mauwii Jan 6, 2023
12b454b
disable "fail on PR jobs"
mauwii Jan 6, 2023
18b1b8c
re-add `--skip-sd-weights` since no space
mauwii Jan 6, 2023
b5c9d2f
update workflow environments
mauwii Jan 6, 2023
52147cc
clean up model load failure handling
lstein Jan 7, 2023
6be47b5
further edge-case handling
lstein Jan 7, 2023
b093598
fix incorrect model status listing
lstein Jan 7, 2023
11425b1
CI: do download weights (if not already cached)
keturn Jan 7, 2023
785c366
diffusers: fix scheduler loading in offline mode
keturn Jan 7, 2023
697279a
CI: fix model name (no longer has `diffusers-` prefix)
keturn Jan 8, 2023
df3feb5
CI: do download weights (if not already cached) (#2268)
keturn Jan 8, 2023
91c273a
Merge branch 'main' into dev/diffusers
keturn Jan 8, 2023
d9e41f1
Update txt2img2img.py (#2256)
mickr777 Jan 9, 2023
da12663
fixes to share models with HuggingFace cache system
lstein Jan 9, 2023
5aeba07
feat - make model storage compatible with hugging face caching system
lstein Jan 9, 2023
a46d175
fixes to share models with HuggingFace cache system
lstein Jan 9, 2023
30b74c4
fix error "no attribute CkptInpaint"
lstein Jan 9, 2023
81ded86
model_manager.list_models() returns entire model config stanza+status
lstein Jan 9, 2023
e728b46
Initial Draft - Model Manager Diffusers
blessedcoolant Jan 9, 2023
a17f901
added hash function to diffusers
lstein Jan 9, 2023
1637cbd
implement sha256 hashes on diffusers models
lstein Jan 9, 2023
c233056
Merge branch 'dev/diffusers' into lstein-hf-cache-compatibility
lstein Jan 9, 2023
1cd93a7
Add Model Manager Support for Diffusers
blessedcoolant Jan 9, 2023
ee03e98
fix various problems with model manager
lstein Jan 10, 2023
7f867ab
rebuild frontend
lstein Jan 10, 2023
e735652
fix dictconfig-not-serializable issue
lstein Jan 10, 2023
e136438
fix NoneType' object is not subscriptable crash in model_manager
lstein Jan 10, 2023
f264cc6
fix "str has no attribute get" error in model_manager list_models()
lstein Jan 10, 2023
9128176
Merge branch 'dev/diffusers' into lstein-hf-cache-compatibility
lstein Jan 10, 2023
499c4e2
Add path and repo_id support for Diffusers Model Manager
blessedcoolant Jan 10, 2023
11c8e60
Fix tooltip IT localization not working
blessedcoolant Jan 2, 2023
6a55393
Add Version Number To WebUI
blessedcoolant Jan 2, 2023
9cb7fe0
Optimize Model Search
blessedcoolant Jan 2, 2023
bdf5dc6
Fix incorrect font on the Model Manager UI
blessedcoolant Jan 2, 2023
0c3cbf5
Fix image degradation on merge fixes - [Experimental]
blessedcoolant Jan 3, 2023
8e99add
Add local model filtering for Diffusers / Checkpoints
blessedcoolant Jan 10, 2023
5e04b3d
Go to home on modal close for the Add Modal UI
blessedcoolant Jan 10, 2023
7268836
Styling Fixes
blessedcoolant Jan 10, 2023
b8b927a
Model Manager Diffusers Localization Update
blessedcoolant Jan 10, 2023
4502994
Add Safe Tensor scanning to Model Manager
blessedcoolant Jan 10, 2023
666d6ae
Fix model edit form dispatching string values instead of numbers.
blessedcoolant Jan 10, 2023
6c99273
Resolve VAE handling / edge cases for supplied repos
blessedcoolant Jan 10, 2023
488c722
defer injecting tokens for textual inversions until they're used for …
damian0815 Jan 10, 2023
aa25c3f
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
damian0815 Jan 10, 2023
ee1b965
squash a console warning
damian0815 Jan 10, 2023
2c4e351
implement model migration check
lstein Jan 11, 2023
025c60b
add_model() overwrites previous config rather than merges
lstein Jan 11, 2023
75b8a8d
Merge branch 'dev/diffusers' into lstein-hf-cache-compatibility
lstein Jan 11, 2023
2510ff2
fix model config file attribute merging
lstein Jan 11, 2023
fee971d
fix precision handling in textual inversion script
lstein Jan 11, 2023
8ff37d6
allow ckpt conversion script to work with safetensors .ckpts
lstein Jan 11, 2023
088b927
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 11, 2023
30c282a
fix name "args" is not defined crash in textual_inversion_training
lstein Jan 11, 2023
19663b9
fix a second NameError: name 'args' is not defined crash
lstein Jan 12, 2023
d4e85a5
fix loading of the safety checker from the global cache dir
ebr Jan 12, 2023
6a1c4c2
add installation step to textual inversion frontend
lstein Jan 12, 2023
74ed4c7
Merge branch 'dev/diffusers' of github.com:invoke-ai/InvokeAI into de…
lstein Jan 12, 2023
b9cd54d
don't crash out on incompatible embeddings
lstein Jan 12, 2023
0518c37
add support for checkpoint resuming
lstein Jan 12, 2023
de5130a
textual inversion preferences are saved and restored between sessions
lstein Jan 12, 2023
1e2f871
copy learned_embeddings.bin into right location
lstein Jan 13, 2023
e717c02
add front end for diffusers model merging
lstein Jan 13, 2023
2d3e5cf
improve inpainting experience
lstein Jan 14, 2023
b6e83d6
update environment*yml
lstein Jan 15, 2023
1a045c9
tweak instructions to install HuggingFace token
lstein Jan 15, 2023
75426d0
bump version number
lstein Jan 15, 2023
fb28078
enhance update scripts
lstein Jan 15, 2023
2a3fcfb
enhance invoke.sh/invoke.bat launchers
lstein Jan 15, 2023
84274e2
remove conda workflow (#2321)
mauwii Jan 15, 2023
dfc24dc
fix `token_ids has shape torch.Size([79]) - expected [77]`
damian0815 Jan 15, 2023
a492bf3
Merge branch 'main' into dev/diffusers
lstein Jan 15, 2023
8c450d4
update CHANGELOG.md with 2.3.* info
lstein Jan 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 0 additions & 161 deletions .github/workflows/test-invoke-conda.yml

This file was deleted.

81 changes: 42 additions & 39 deletions .github/workflows/test-invoke-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches:
- 'main'
pull_request:
branches:
- 'main'
types:
- 'ready_for_review'
- 'opened'
Expand All @@ -17,14 +15,14 @@ concurrency:
cancel-in-progress: true

jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-18.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1
# fail_if_pull_request_is_draft:
# if: github.event.pull_request.draft == true && github.head_ref != 'dev/diffusers'
# runs-on: ubuntu-18.04
# steps:
# - name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
# run: exit 1
matrix:
if: github.event.pull_request.draft == false
if: github.event.pull_request.draft == false || github.head_ref == 'dev/diffusers'
strategy:
matrix:
stable-diffusion-model:
Expand All @@ -40,26 +38,23 @@ jobs:
include:
- requirements-file: requirements-lin-cuda.txt
os: ubuntu-22.04
curl-command: curl
github-env: $GITHUB_ENV
- requirements-file: requirements-lin-amd.txt
os: ubuntu-22.04
curl-command: curl
github-env: $GITHUB_ENV
- requirements-file: requirements-mac-mps-cpu.txt
os: macOS-12
curl-command: curl
github-env: $GITHUB_ENV
- requirements-file: requirements-win-colab-cuda.txt
os: windows-2022
curl-command: curl.exe
github-env: $env:GITHUB_ENV
- 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 }}
env:
INVOKE_MODEL_RECONFIGURE: '--yes'
INVOKEAI_ROOT: '${{ github.workspace }}/invokeai'
PYTHONUNBUFFERED: 1
HAVE_SECRETS: ${{ secrets.HUGGINGFACE_TOKEN != '' }}
steps:
- name: Checkout sources
id: checkout-sources
Expand All @@ -77,10 +72,17 @@ jobs:
echo "INVOKEAI_ROOT=${{ github.workspace }}/invokeai" >> ${{ matrix.github-env }}
echo "INVOKEAI_OUTDIR=${{ github.workspace }}/invokeai/outputs" >> ${{ matrix.github-env }}

- 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: Use Cached diffusers-1.5
id: cache-sd-model
uses: actions/cache@v3
env:
cache-name: huggingface-${{ matrix.stable-diffusion-model }}
with:
path: |
${{ env.INVOKEAI_ROOT }}/models/runwayml
${{ env.INVOKEAI_ROOT }}/models/stabilityai
${{ env.INVOKEAI_ROOT }}/models/CompVis
key: ${{ env.cache-name }}

- name: set test prompt to main branch validation
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -110,30 +112,31 @@ jobs:
- name: install requirements
run: pip3 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 }}"
${{ matrix.curl-command }} -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: python3 scripts/configure_invokeai.py --skip-sd-weights --yes
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
run: >
configure_invokeai.py
--yes
--full-precision # can't use fp16 weights without a GPU

- name: Run the tests
id: run-tests
if: matrix.os != 'windows-2022'
run: python3 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_OUTDIR }}"
env:
# Set offline mode to make sure configure preloaded successfully.
HF_HUB_OFFLINE: 1
HF_DATASETS_OFFLINE: 1
TRANSFORMERS_OFFLINE: 1
run: >
python3 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_OUTDIR }}"

- name: Archive results
id: archive-results
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ to render 512x512 images.

- At least 12 GB of free disk space for the machine learning model, Python, and all its dependencies.


## Features

Feature documentation can be reviewed by navigating to [the InvokeAI Documentation page](https://invoke-ai.github.io/InvokeAI/features/)
Expand All @@ -118,21 +117,23 @@ InvokeAI's advanced prompt syntax allows for token weighting, cross-attention co
For users utilizing a terminal-based environment, or who want to take advantage of CLI features, InvokeAI offers an extensive and actively supported command-line interface that provides the full suite of generation functionality available in the tool.

### Other features
- *Support for both ckpt and diffusers models*
- *SD 2.0, 2.1 support*
- *Noise Control & Tresholding*
- *Popular Sampler Support*
- *Upscaling & Face Restoration Tools*
- *Embedding Manager & Support*
- *Model Manager & Support*

### Coming Soon
- *2.0/2.1 Model Support*
- *Depth2Img Support*
- *Node-Based Architecture & UI*
- And more...

### Latest Changes

For our latest changes, view our [Release Notes](https://github.com/invoke-ai/InvokeAI/releases)
For our latest changes, view our [Release
Notes](https://github.com/invoke-ai/InvokeAI/releases) and the
[CHANGELOG](docs/CHANGELOG.md).

## Troubleshooting

Expand Down
Loading