Compare commits

..

3952 Commits

Author SHA1 Message Date
1f608d3743 add v2.3 branch to push trigger (#3363)
Update the push trigger with the branch which should deploy the docs,
also bring over the updates to the workflow from the v2.3 branch and:

- remove main and development branch from trigger
  - they would fail without the updated toml
- cache pip environment
- update install method (`pip install ".[docs]"`)
2023-05-08 16:26:06 -04:00
df024dd982 bring changes from v2.3 branch over
- remove main and development branch from trigger
  - they would fail without the updated toml
- cache pip environment
- update install method
2023-05-08 21:50:00 +02:00
45da85765c add v2.3 branch to push trigger 2023-05-08 21:10:20 +02:00
8618e41b32 Deploy documentation from v2.3 branch rather than main (#3356)
This PR instructs github to deploy documentation pages from the v2.3
branch.
2023-05-07 21:43:44 +12:00
4687f94141 Merge branch 'main' into actions/mkdocs-deploy 2023-05-07 21:43:18 +12:00
440912dcff feat(ui): make base log level debug 2023-05-07 15:36:37 +10:00
8b87a26e7e feat(ui): support collect nodes 2023-05-07 15:36:37 +10:00
44ae93df3e Deploy documentation from v2.3 branch rather than main 2023-05-06 23:56:04 -04:00
2b213da967 add -y to the automated install instructions (#3349)
hi there, love the project! i noticed a small typo when going over the
install process.

when copying the automated install instructions from the docs into a
terminal, the line to install the python packages failed as it was
missing the `-y` flag.
2023-05-06 13:34:37 -04:00
e91e1eb9aa Merge branch 'main' into patch-1 2023-05-06 13:34:12 -04:00
b24129fb3e Fix logger namespace clash in web server (#3344)
This PR fixes a bug that appeared in the legacy web server after the
logging PR was merged.

closes #3343
2023-05-06 08:35:13 -04:00
350b1421bb Merge branch 'main' into lstein/bugfix/logger-namespace 2023-05-06 08:14:44 -04:00
f01c79a94f add -y to the automated install instructions
when copying the automated install instructions from the docs into a terminal, the line to install the python packages failed as it was missing the `-y` flag.
2023-05-05 21:28:00 -04:00
463f6352ce Add compel node and conditioning field type (#3265)
Done as I said in title, but need to test(and understand) how cli works,
as previously it uses single prompt and now it's positive and negative.
2023-05-06 13:05:04 +12:00
a80fe05e23 Rename compel node 2023-05-05 21:30:16 +03:00
58d7833c5c Review changes 2023-05-05 21:09:29 +03:00
5012f61599 Separate conditionings back to positive and negative 2023-05-05 15:47:51 +03:00
85c33823c3 Merge branch 'main' into feat/compel_node 2023-05-05 14:41:45 +12:00
c83a112669 Fix inpaint node (#3284)
Seems like this is the only change needed for the existing inpaint code
to work as a node. Kyle said on Discord that inpaint shouldn't be a
node, so feel free to just reject this if this code is going to be gone
soon.
2023-05-05 14:41:13 +12:00
e04ada1319 Merge branch 'main' into patch-1 2023-05-05 10:38:45 +10:00
d866dcb3d2 close #3343 2023-05-04 20:30:59 -04:00
81ec476f3a Revert seed field addition 2023-05-04 21:50:40 +03:00
1e6adf0a06 Fix default graph and test 2023-05-04 21:14:31 +03:00
7d221e2518 Combine conditioning to one field(better fits for multiple type conditioning like perp-neg) 2023-05-04 20:14:22 +03:00
56d3cbead0 Merge branch 'main' into feat/compel_node 2023-05-04 00:28:33 +03:00
5e8c97f1ba [Enhancement] Regularize logging messages (#3176)
# Intro

This commit adds invokeai.backend.util.logging, which provides support
for formatted console and logfile messages that follow the status
reporting conventions of earlier InvokeAI versions:

```
 ### A critical error
 *** A non-fatal error
 ** A warning
  >> Informational message
        | Debugging message
```

Internally, the invokeai logging module creates a new default logger
named "invokeai" so that its logging does not interfere with other
module's use of the vanilla logging module. So `logging.error("foo")`
will go through the regular logging path and not add InvokeAI's
informational message decorations, while `ialog.error("foo")` will add
the decorations.
    
# Usage:

This is a thin wrapper around the standard Python logging module. It can
be used in several ways:


## Module-level logging style
 
This style logs everything through a single default logging object and
is identical to using Python's `logging` module. The commonly-used
module-level logging functions are implemented as simple pass-thrus to
logging:
    
```
      import invokeai.backend.util.logging as logger
    
      logger.debug('this is a debugging message')
      logger.info('this is a informational message')
      logger.log(level=logging.CRITICAL, 'get out of dodge')

      logger.disable(level=logging.INFO)
      logger.basicConfig(filename='/var/log/invokeai.log')
      logger.error('this will be logged to console and to invokeai.log')
```    

Internally these functions all go through a custom logging object named
"invokeai". You can access it to perform additional customization in
either of these ways:

```
logger = logger.getLogger()
logger = logger.getLogger('invokeai')
```
    
## Object-oriented style

For more control, the logging module's object-oriented logging style is
also supported. The API is identical to the vanilla logging usage. In
fact, the only thing that has changed is that the getLogger() method
adds a custom formatter to the log messages.
    
```
     import logging
     from invokeai.backend.util.logging import InvokeAILogger
    
     logger = InvokeAILogger.getLogger(__name__)
     fh = logging.FileHandler('/var/invokeai.log')
     logger.addHandler(fh)
     logger.critical('this will be logged to both the console and the log file')
```

## Within the nodes API

From within the nodes API, the logger module is stored in the `logger`
slot of InvocationServices during dependency initialization. For
example, in a router, the idiom is:

```
from ..dependencies import ApiDependencies
logger = ApiDependencies.invoker.services.logger
logger.warning('uh oh')
```

Currently, to change the logger used by the API, one must change the
logging module passed to `ApiDependencies.initialize()` in `api_app.py`.
However, this will eventually be replaced with a method to select the
preferred logging module using the configuration file (dependent on
merging of PR #3221)
2023-05-03 15:00:05 -04:00
4687ad4ed6 Merge branch 'main' into enhance/invokeai-logs 2023-05-03 13:36:06 -04:00
994b247f8e feat(ui): do not persist gallery images
- I've sorted out the issues that make *not* persisting troublesome, these will be rolled out with canvas
- Also realized that persisting gallery images very quickly fills up localStorage, so we can't really do it anyways
2023-05-03 23:41:48 +10:00
0419f50ab0 chore(ui): bump react-virtuoso
- Resolves an issue with gallery not rendering all items
2023-05-02 20:15:29 +10:00
f9f40adcdc fix(nodes): fix t2i graph
Removed width and height edges.
2023-05-02 13:11:28 +10:00
3264d30b44 feat(nodes): allow multiples of 8 for dimensions 2023-05-02 12:01:52 +10:00
4d885653e9 feat(ui): tidy 2023-05-02 11:27:08 +10:00
475b6bef53 feat(ui): use windowing for gallery
vastly improves the gallery performance when many images are loaded.

- `react-virtuoso` to do the virtualized list
- `overlayscrollbars` for a scrollbar
2023-05-02 11:27:08 +10:00
d39de0ad38 fix(nodes): fix duplicate Invoker start/stop events 2023-05-01 18:24:37 -04:00
d14a7d756e nodes-api: enforce single thread for the processor
On hyperthreaded CPUs we get two threads operating on the queue by
default on each core. This cases two threads to process queue items.
This results in pytorch errors and sometimes generates garbage.

Locking this to single thread makes sense because we are bound by the
number of GPUs in the system, not by CPU cores. And to parallelize
across GPUs we should just start multiple processors (and use async
instead of threading)

Fixes #3289
2023-05-01 18:24:37 -04:00
b050c1bb8f use logger in ApiDependencies 2023-05-01 16:27:44 -04:00
276dfc591b feat(ui): disable w/h when img2img & not fit 2023-05-01 17:28:22 +10:00
b49d76ebee feat(nodes): fix image to image fit param
it was ignored previously.
2023-05-01 17:28:22 +10:00
a6be44789b fix(ui): progress image rerender, checkbox 2023-05-01 11:16:49 +10:00
a4313c26cb fix: Do not hide Preview button & color code it 2023-05-01 11:16:49 +10:00
d4b250d509 feat(ui): Add auto show progress previews setting 2023-05-01 11:16:49 +10:00
29743a9e02 fix(ui): next/prev image buttons 2023-05-01 11:16:49 +10:00
fecb77e344 feat(ui): dndkit --> rnd for draggable 2023-05-01 11:16:49 +10:00
779671753d feat(ui): tweak floating preview 2023-05-01 11:16:49 +10:00
d5e152b35e fix(ui): ignore events after canceling session 2023-05-01 11:16:49 +10:00
270657a62c feat(ui): gallery & progress image refactor 2023-05-01 11:16:49 +10:00
3601b9c860 feat(ui): revamp status indicator 2023-05-01 11:16:49 +10:00
c8fe12cd91 feat(ui): init image tweaks 2023-05-01 11:16:49 +10:00
deae5fbaec fix(ui): socket event types 2023-05-01 11:16:49 +10:00
5b558af2b3 fix(ui): fix metadata viewer scroll 2023-05-01 11:16:49 +10:00
4150d5306f chore(ui): regen api client 2023-05-01 11:16:49 +10:00
8c2e4700f9 feat(ui): persist gallery state 2023-05-01 11:16:49 +10:00
adaecada20 fix(ui): fix current image seed button 2023-05-01 11:16:49 +10:00
258895bcc9 feat(ui): being dismantling old sio stuff, fix recall seed/prompt/init
- still need to fix up metadataviewer's recall features
2023-05-01 11:16:49 +10:00
2eb7c25bae feat(ui): clean up and simplify socketio middleware 2023-05-01 11:16:49 +10:00
2e4e9434c1 fix(ui): fix initial image for uploads 2023-05-01 11:16:49 +10:00
0cad204e74 feat(ui): add error handling for linear graph generation 2023-05-01 11:16:49 +10:00
0bc2edc044 Merge branch 'main' into enhance/invokeai-logs 2023-04-29 11:00:18 -04:00
16488e7db8 fix tests 2023-04-29 10:59:50 -04:00
974841926d logger is a interchangeable service 2023-04-29 10:48:50 -04:00
8db20e0d95 rename log to logger throughout 2023-04-29 09:43:40 -04:00
d00d29d6b5 feat(ui): update settings modal 2023-04-29 18:28:19 +10:00
dc976cd665 feat(ui): add switch for logging 2023-04-29 18:28:19 +10:00
6d6b986a66 feat(ui): remove Console and redux logging state 2023-04-29 18:28:19 +10:00
bffdede0fa feat(ui): improve log messages 2023-04-29 18:28:19 +10:00
a4c258e9ec feat(ui): add roarr logger 2023-04-29 18:28:19 +10:00
8d837558ac fix(ui): fix spelling of systemPersistDenylist.ts 2023-04-29 18:28:19 +10:00
e673ed08ec fix(ui): restore missing chakra-cli package
(amending to try and get the workflow to run)
2023-04-29 12:21:11 +10:00
f0e07bff5a fix bad logging path in config script 2023-04-28 15:39:00 -04:00
3ec06a1fc3 Merge branch 'main' into enhance/invokeai-logs 2023-04-28 10:10:33 -04:00
6b79e2b407 Merge branch 'main' into enhance/invokeai-logs
- resolve conflicts
- remove unused code identified by pyflakes
2023-04-28 10:09:46 -04:00
0eed9dbc44 fix(ui): fix packaging import issue (#3294)
I accidentally merged a broken #3292 (merge conflicts incorrectly
resolved). Fixing it
2023-04-29 00:39:56 +12:00
53c7832fd1 fix(ui): fix packaging import issue 2023-04-28 22:37:51 +10:00
ca1cc0e2c2 feat(ui): rerender mitigation sweep 2023-04-28 22:00:18 +10:00
5d8728c7ef feat(ui): persist socket session ids and re-sub on connect 2023-04-28 22:00:18 +10:00
a8cec4c7e6 fix(ui): improve schema parsing error handling 2023-04-28 22:00:18 +10:00
2b5ccdc55f build(ui): treeshake lodash via lodash-es 2023-04-28 21:56:43 +10:00
d92d5b5258 build(ui): fix types exports 2023-04-28 21:56:43 +10:00
a591184d2a build(ui): remove unneeded types file 2023-04-28 21:56:43 +10:00
ee881e4c78 build(ui): add react/react-dom peer deps 2023-04-28 21:56:43 +10:00
61fbb24e36 feat(ui): set up for packaging 2023-04-28 21:56:43 +10:00
d582949488 feat(ui): rename main app components 2023-04-28 21:56:43 +10:00
de574eb4d9 chore(ui): upgrade all packages 2023-04-28 21:56:43 +10:00
bfd90968f1 chore(ui): tidy npm structure 2023-04-28 21:56:43 +10:00
4a924c9b54 feat(nodes): hardcode resize latents downsampling 2023-04-28 09:52:09 +10:00
0453d60c64 fix(nodes): fix slatents and rlatents bugs 2023-04-28 09:52:09 +10:00
c4f4f8b1b8 fix(nodes): remove unused width and height from t2l 2023-04-28 09:52:09 +10:00
3e80eaa342 feat(nodes): add resize and scale latents nodes
- this resize/scale latents is what is needed for hires fix
- also remove unused `seed` from t2l
2023-04-28 09:52:09 +10:00
00a0cb3403 fix(ui): update exported types 2023-04-28 09:20:09 +10:00
ea93cad5ff fix(ui): update to match change in route params 2023-04-28 09:19:03 +10:00
4453a0d20d feat(ui): remove toasts for network bc we have status to tell us 2023-04-28 09:18:19 +10:00
1e837e3c9d fix(ui): add formatted neg prompt for linear nodes (#3282)
* fix(ui): add formatted neg prompt for linear nodes

* remove conditional

---------

Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
2023-04-27 15:05:35 -04:00
0f95f7cea3 Fix inpaint node
Seems like this is the only change needed for the existing inpaint node to work.
2023-04-27 11:03:07 -07:00
0b0068ab86 Merge branch 'main' into feat/compel_node 2023-04-27 14:53:10 +03:00
31c7fa833e feat(ui): simplify image display 2023-04-27 14:10:44 +10:00
db16ca0079 fix(ui): Current Image Buttons position 2023-04-27 14:10:44 +10:00
a824f47bc6 fix(nodes): use absolute path when deleting 2023-04-27 14:10:44 +10:00
99392debe8 feat(ui): refactor DeleteImageModal
- refactor the component
- use translations
- add config for systems where deleted images are not sent to bin (only changes the messaging)
2023-04-27 14:10:44 +10:00
0cc739afc8 feat(nodes): use send2trash to delete images, fix thumbnail_path 2023-04-27 14:10:44 +10:00
0ab62b0343 feat(ui): "blacklist" -> "denylist" 2023-04-27 14:10:44 +10:00
75d25dd5cc feat(ui): restore image deletion functionality 2023-04-27 14:10:44 +10:00
2e54da13d8 chore(ui): regen api client 2023-04-27 14:10:44 +10:00
f34f416bf5 fix(ui): handle floats in NumberInputFieldComponent 2023-04-27 14:10:44 +10:00
021c63891d fix(ui): fix config types and merging 2023-04-27 14:10:44 +10:00
a968862e6b feat(ui): Move img2img badge info to top right 2023-04-27 14:10:44 +10:00
a08189d457 ui: Match styling of img2img to the rest of the accordions 2023-04-27 14:10:44 +10:00
0a936696c3 feat(ui): add config slice, configuration default values 2023-04-27 14:10:44 +10:00
55e33eaf4c docs: add note on README about migration (#3277) 2023-04-27 13:17:43 +12:00
3da5fb223f docs: add note on README about migration 2023-04-27 11:05:32 +10:00
a3c5a664e5 fix(ui): update UI to handle uploads with alternate URLs (#3274) 2023-04-26 07:14:08 -07:00
b638fb2f30 fix(ui): use name in response instead of parsing out of URL to handle alternative URLs 2023-04-26 09:48:16 -04:00
c1b10b2222 feat(ui): open in new tab @ hoverable image 2023-04-26 12:40:10 +10:00
bee29714d9 fix(ui): fix templates not refreshing correctly 2023-04-26 12:40:10 +10:00
d40d5276dd feat(ui): wip img2img ui 2023-04-26 12:40:10 +10:00
568f0aad71 feat(ui): wip img2img ui 2023-04-26 12:40:10 +10:00
38474fa9d4 feat(ui): add lil spinner to loading 2023-04-26 12:17:01 +10:00
f7f974a28b fix(ui): fix inverted conditional 2023-04-26 12:17:01 +10:00
3c150b384c fix(ui): fix export of ApplicationFeature type 2023-04-26 12:17:01 +10:00
65816049ba feat(ui): add secret loading screen override button 2023-04-26 12:17:01 +10:00
c1c881ded5 feat(ui): support disabledFeatures, add nicer loading
- `disabledParametersPanels` -> `disabledFeatures`
- handle disabling `faceRestore`, `upscaling`, `lightbox`, `modelManager` and OSS header links/buttons
- wait until models are loaded to hide loading screen
- also wait until schema is parsed if `nodes` is an enabled tab
2023-04-26 12:17:01 +10:00
82c4dd8b86 fix(api): return same URL on location header 2023-04-26 06:29:30 +10:00
711d09a107 feat(nodes): add get_uri method to image storage
- gets the external URI of an image
2023-04-26 06:29:30 +10:00
74013b6611 fix(nodes): address feedback 2023-04-26 06:29:30 +10:00
790f399986 feat(nodes): tidy images routes 2023-04-26 06:29:30 +10:00
73cdd36594 feat(nodes): raise HTTPExceptions instead of returning Reponses 2023-04-26 06:29:30 +10:00
50ac3eb28d feat(nodes): add delete_image & delete_images routes 2023-04-26 06:29:30 +10:00
d753cff91a Undo debug message 2023-04-25 13:18:50 +03:00
89f1909e4b Update default graph 2023-04-25 13:11:50 +03:00
37916a22ad Use textual inversion manager from pipeline, remove extra conditioning info for uc 2023-04-25 12:53:13 +03:00
76e5d0595d fix(ui): fix no progress images when gallery is empty (#3268)
When gallery was empty (and there is therefore no selected image), no
progress images were displayed.

- fix by correcting the logic in CurrentImageDisplay
- also fix app crash introduced by fixing the first bug
2023-04-25 17:48:24 +12:00
f03cb8f134 fix(ui): fix no progress images when gallery is empty 2023-04-25 15:00:54 +10:00
c2a0e8afc3 [Bugfix] prevent cli crash (#3132)
Prevent legacy CLI crash caused by removal of convert option
    
- Compensatory change to the CLI that prevents it from crashing when it
tries to import a model.
- Bug introduced when the "convert" option removed from the model
manager.
2023-04-25 03:55:33 +01:00
31a904b903 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-25 03:28:45 +01:00
c174cab3ee [Bugfix] fixes and code cleanup to update and installation routines (#3101)
- Fix the update script to work again and fixes the ambiguity between
when a user wants to update to a tag vs updating to a branch, by making
these two operations explicitly separate.
- Remove dangling functions and arguments related to legacy checkpoint
conversion. These are no longer needed now that all legacy models are
either converted at import time, or on-the-fly in RAM.
2023-04-25 03:28:23 +01:00
fe12938c23 update to diffusers 0.15 and fix code for name changes (#3201)
- This is a port of #3184 to the main branch
2023-04-25 03:23:24 +01:00
4fa5c963a1 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-25 03:10:51 +01:00
48ce256ba2 Merge branch 'main' into lstein/enhance/diffusers-0.15 2023-04-25 02:49:59 +01:00
8cb2fa8600 Restore log_tokenization check 2023-04-25 04:29:17 +03:00
8f460b92f1 Make latent generation nodes use conditions instead of prompt 2023-04-25 04:21:03 +03:00
d99a08a441 Add compel node and conditioning field type 2023-04-25 03:48:44 +03:00
7555b1f876 Event service will now sleep for 100ms between polls instead of 1ms, reducing CPU usage significantly (#3256)
I noticed that the current invokeai-new.py was using almost all of a CPU
core. After a bit of profileing I noticed that there were many thousands
of calls to epoll() which suggested to me that something wasn't sleeping
properly in asyncio's loop.

A bit of further investigation with Python profiling revealed that the
__dispatch_from_queue() method in FastAPIEventService
(app/api/events.py:33) was also being called thousands of times.

I believe the asyncio.sleep(0.001) in that method is too aggressive (it
means that the queue will be polled every 1ms) and that 0.1 (100ms) is
still entirely reasonable.
2023-04-24 19:35:27 +12:00
a537231f19 Merge branch 'main' into reduce-event-polling 2023-04-24 19:14:10 +12:00
8044d1b840 translationBot(ui): update translation (Turkish)
Currently translated at 11.3% (58 of 512 strings)

translationBot(ui): added translation (Turkish)

Co-authored-by: ismail ihsan bülbül <e-ben@msn.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/tr/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
2b58ce4ae4 translationBot(ui): update translation (Chinese (Simplified))
Currently translated at 75.0% (380 of 506 strings)

Co-authored-by: Patrick Tien <ivetien@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/zh_Hans/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
ef605cd76c translationBot(ui): update translation (German)
Currently translated at 81.8% (414 of 506 strings)

Co-authored-by: Fabian Bahl <fabian98@bahl-netz.de>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/de/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
a84b5b168f translationBot(ui): update translation (Swedish)
Currently translated at 34.7% (176 of 506 strings)

translationBot(ui): added translation (Swedish)

Co-authored-by: figgefigge <qvintuz@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/sv/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
16f6ee04d0 translationBot(ui): update translation (German)
Currently translated at 81.8% (414 of 506 strings)

translationBot(ui): update translation (German)

Currently translated at 80.8% (409 of 506 strings)

Co-authored-by: Alexander Eichhorn <pfannkuchensack@einfach-doof.de>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/de/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
44be057aa3 translationBot(ui): update translation (Ukrainian)
Currently translated at 100.0% (512 of 512 strings)

translationBot(ui): update translation (Russian)

Currently translated at 100.0% (512 of 512 strings)

translationBot(ui): update translation (English)

Currently translated at 100.0% (512 of 512 strings)

translationBot(ui): update translation (Ukrainian)

Currently translated at 100.0% (506 of 506 strings)

translationBot(ui): update translation (Russian)

Currently translated at 100.0% (506 of 506 strings)

translationBot(ui): update translation (Russian)

Currently translated at 100.0% (506 of 506 strings)

Co-authored-by: System X - Files <vasyasos@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/en/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ru/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/uk/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
422f6967b2 translationBot(ui): update translation (Ukrainian)
Currently translated at 75.8% (384 of 506 strings)

translationBot(ui): update translation (Russian)

Currently translated at 85.5% (433 of 506 strings)

Co-authored-by: mitien <mitien@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ru/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/uk/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
4528cc8ba6 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (512 of 512 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (511 of 511 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (506 of 506 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
87e91ebc1d translationBot(ui): update translation (Spanish)
Currently translated at 100.0% (512 of 512 strings)

translationBot(ui): update translation (Spanish)

Currently translated at 100.0% (511 of 511 strings)

translationBot(ui): update translation (Spanish)

Currently translated at 100.0% (506 of 506 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/es/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
fd00d111ea translationBot(ui): update translation (Dutch)
Currently translated at 100.0% (504 of 504 strings)

Co-authored-by: Dennis <dennis@vanzoerlandt.nl>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/nl/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
b8dc9000bd translationBot(ui): update translation (German)
Currently translated at 73.4% (370 of 504 strings)

Co-authored-by: Jaulustus <jaulustus@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/de/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
58c1066765 translationBot(ui): update translation (Finnish)
Currently translated at 18.2% (92 of 504 strings)

translationBot(ui): added translation (Finnish)

Co-authored-by: Juuso V <juuso.vantola@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/fi/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
37096a697b translationBot(ui): added translation (Mongolian)
Co-authored-by: Bouncyknighter <gebifirm@gmail.com>
2023-04-24 16:05:16 +10:00
17d0920186 translationBot(ui): update translation (Japanese)
Currently translated at 73.0% (368 of 504 strings)

Co-authored-by: 唐澤 克幸 <4ranci0ne@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ja/
Translation: InvokeAI/Web UI
2023-04-24 16:05:16 +10:00
1e05538364 translationBot(ui): added translation (Vietnamese)
Co-authored-by: techybrain-dev <techybrain.dev@gmail.com>
2023-04-24 16:05:16 +10:00
cf28617cd6 Event service will now sleep for 100ms between polls instead of 1ms, reducing CPU usage significantly 2023-04-23 21:27:02 +01:00
d0d8640711 feat(ui): add reload schema button (#3252) 2023-04-23 19:51:37 +12:00
e6158d1874 feat(ui): add reload schema button 2023-04-23 17:49:02 +10:00
2e9d1ea8a3 feat(ui): add support for shouldFetchImages if UI needs to re-fetch an image URL (#3250)
* if `shouldFetchImages` is passed in, UI will make an additional
request to get valid image URL when an invocation is complete
* this is necessary in order to have optional authorization for images
2023-04-23 16:00:13 +10:00
59b0153236 add to types 2023-04-23 15:59:55 +10:00
9f8ff912c4 feat(ui): add support for shouldFetchImages if UI needs to re-fetch an image URL 2023-04-23 15:59:55 +10:00
f0e4a2124a [Nodes UI] More Work (#3248)
- Style the Minimap
- Made the Node UI Legend Responsive
- Set Min Width for nodes on Spawn so resize doesn't snap.
- Initial Implementation of Node Search
- Added FuseJS to handle the node filtering
2023-04-23 17:51:40 +12:00
11ab5c7d56 fix(ui): Fix up arrow not working on unfiltered list 2023-04-23 15:18:35 +12:00
3f334d9e5e feat(ui): Add fusejs to NodeSearch 2023-04-23 15:14:44 +12:00
ff891b1ff2 feat(ui): Basic Node Search Component
Very buggy
2023-04-23 13:35:02 +12:00
2914ee10b0 Merge branch 'main' into lstein/enhance/diffusers-0.15 2023-04-22 20:21:59 +01:00
e29c2fb782 Merge branch 'more-nodes-work' of https://github.com/blessedcoolant/InvokeAI into more-nodes-work 2023-04-23 02:53:25 +12:00
b763f1809e feat(ui): Stylize Node Minimap 2023-04-23 02:52:32 +12:00
d26b44104a fix(ui): minor tidy 2023-04-23 00:45:03 +10:00
b73fd2a6d2 fix(ui): Set Min Width for Nodes 2023-04-23 00:55:43 +12:00
f258aba6d1 chore(ui): Make the Node UI Legend Responsive 2023-04-23 00:55:22 +12:00
2e70848aa0 Responsive Mobile Layout (#3207)
The first draft for a Responsive Mobile Layout for InvokeAI. Some basic
documentation to help contributors. // Notes from: @blessedcoolant

---

The whole rework needs to be done using the `mobile first` concept where
the base design will be catered to mobile and we add responsive changes
as we grow to larger screens.

**Added**

- Basic breakpoints have been added to the `theme.ts` file that indicate
at which values Chakra makes the responsive changes.
- A basic `useResolution` hook has been added that either returns
`mobile`, `tablet` or `desktop` based on the breakpoint. We can
customize this hook further to do more complex checks for us if need be.

**Syntax**

- Any Chakra component is directly capable of taking different values
for the different breakpoints set in our `theme.ts` file. These can be
passed in a few ways with the most descriptive being an object. For
example:

`flexDir={{ base: 'column', xl: 'row' }}` - This would set the `0em and
above` to be column for the flex direction but change to row
automatically when we hit `xl` and above resolutions which in our case
is `80em or 1280px`. This same format is applicable for any element in
Chakra.

`flexDir={['column', null, null, 'row', null]}` - The above syntax can
also be passed as an array to the property with each value in the array
corresponding to each breakpoint we have. Setting `null` just bypasses
it. This is a good short hand but I think we stick to the above syntax
for readability.

**Note**: I've modified a few elements here and there to give an idea on
how the responsive syntax works for reference.

---

**Problems to be solved** @SammCheese 

- Some issues you might run into are with the Resizable components.
We've decided we will get not use resizable components for smaller
resolutions. Doesn't make sense. So you'll need to make conditional
renderings around these.
- Some components that need custom layouts for different screens might
be better if ported over to `Grid` and use `gridTemplateAreas` to swap
out the design layout. I've demonstrated an example of this in a commit
I've made. I'll let you be the judge of where we might need this.
- The header will probably need to be converted to a burger menu of some
sort with the model changing being handled correctly UX wise. We'll
discuss this on discord.

---

Anyone willing to contribute to this PR can feel free to join the
discussion on discord.

https://discord.com/channels/1020123559063990373/1020839344170348605/threads/1097323866780606615
2023-04-22 22:34:30 +10:00
e973aeef0d Merge branch 'main' into responsive-ui 2023-04-22 14:31:19 +02:00
50e1ac731d fix(ui): make input/outputs renderfn callback 2023-04-22 22:25:17 +10:00
43addc1548 fix(ui): memoize everything nodes 2023-04-22 22:25:17 +10:00
4901911c1a fix(ui): improve nodes performance 2023-04-22 22:25:17 +10:00
44a653925a feat(ui): node styling, controls
- custom node controls
- fix some types
- fix badge colors via colorScheme
- style nodes
2023-04-22 22:25:17 +10:00
94a07a8da7 feat(ui): Make Nodes always spawn in center of work area 2023-04-22 22:25:17 +10:00
ad41afe65e feat(ui): Make Nodes Resizable 2023-04-22 22:25:17 +10:00
77fa7519c4 chore(ui): Cleanup Invocation Component 2023-04-22 22:25:17 +10:00
6e29148d4d delete ImageToImageContent.tsx 2023-04-22 08:43:14 +02:00
3044f3bfe5 fix(ui): adapt NodeEditor for smaller screens 2023-04-22 08:33:05 +02:00
67a8627cf6 add dev:host script 2023-04-22 08:30:09 +02:00
3fb433cb91 Merge branch 'main' of https://github.com/invoke-ai/InvokeAI into responsive-ui 2023-04-22 08:27:00 +02:00
5f498e10bd Partial migration of UI to nodes API (#3195)
* feat(ui): add axios client generator and simple example

* fix(ui): update client & nodes test code w/ new Edge type

* chore(ui): organize generated files

* chore(ui): update .eslintignore, .prettierignore

* chore(ui): update openapi.json

* feat(backend): fixes for nodes/generator

* feat(ui): generate object args for api client

* feat(ui): more nodes api prototyping

* feat(ui): nodes cancel

* chore(ui): regenerate api client

* fix(ui): disable OG web server socket connection

* fix(ui): fix scrollbar styles typing and prop

just noticed the typo, and made the types stronger.

* feat(ui): add socketio types

* feat(ui): wip nodes

- extract api client method arg types instead of manually declaring them
- update example to display images
- general tidy up

* start building out node translations from frontend state and add notes about missing features

* use reference to sampler_name

* use reference to sampler_name

* add optional apiUrl prop

* feat(ui): start hooking up dynamic txt2img node generation, create middleware for session invocation

* feat(ui): write separate nodes socket layer, txt2img generating and rendering w single node

* feat(ui): img2img implementation

* feat(ui): get intermediate images working but types are stubbed out

* chore(ui): add support for package mode

* feat(ui): add nodes mode script

* feat(ui): handle random seeds

* fix(ui): fix middleware types

* feat(ui): add rtk action type guard

* feat(ui): disable NodeAPITest

This was polluting the network/socket logs.

* feat(ui): fix parameters panel border color

This commit should be elsewhere but I don't want to break my flow

* feat(ui): make thunk types more consistent

* feat(ui): add type guards for outputs

* feat(ui): load images on socket connect

Rudimentary

* chore(ui): bump redux-toolkit

* docs(ui): update readme

* chore(ui): regenerate api client

* chore(ui): add typescript as dev dependency

I am having trouble with TS versions after vscode updated and now uses TS 5. `madge` has installed 3.9.10 and for whatever reason my vscode wants to use that. Manually specifying 4.9.5 and then setting vscode to use that as the workspace TS fixes the issue.

* feat(ui): begin migrating gallery to nodes

Along the way, migrate to use RTK `createEntityAdapter` for gallery images, and separate `results` and `uploads` into separate slices. Much cleaner this way.

* feat(ui): clean up & comment results slice

* fix(ui): separate thunk for initial gallery load so it properly gets index 0

* feat(ui): POST upload working

* fix(ui): restore removed type

* feat(ui): patch api generation for headers access

* chore(ui): regenerate api

* feat(ui): wip gallery migration

* feat(ui): wip gallery migration

* chore(ui): regenerate api

* feat(ui): wip refactor socket events

* feat(ui): disable panels based on app props

* feat(ui): invert logic to be disabled

* disable panels when app mounts

* feat(ui): add support to disableTabs

* docs(ui): organise and update docs

* lang(ui): add toast strings

* feat(ui): wip events, comments, and general refactoring

* feat(ui): add optional token for auth

* feat(ui): export StatusIndicator and ModelSelect for header use

* feat(ui) working on making socket URL dynamic

* feat(ui): dynamic middleware loading

* feat(ui): prep for socket jwt

* feat(ui): migrate cancelation

also updated action names to be event-like instead of declaration-like

sorry, i was scattered and this commit has a lot of unrelated stuff in it.

* fix(ui): fix img2img type

* chore(ui): regenerate api client

* feat(ui): improve InvocationCompleteEvent types

* feat(ui): increase StatusIndicator font size

* fix(ui): fix middleware order for multi-node graphs

* feat(ui): add exampleGraphs object w/ iterations example

* feat(ui): generate iterations graph

* feat(ui): update ModelSelect for nodes API

* feat(ui): add hi-res functionality for txt2img generations

* feat(ui): "subscribe" to particular nodes

feels like a dirty hack but oh well it works

* feat(ui): first steps to node editor ui

* fix(ui): disable event subscription

it is not fully baked just yet

* feat(ui): wip node editor

* feat(ui): remove extraneous field types

* feat(ui): nodes before deleting stuff

* feat(ui): cleanup nodes ui stuff

* feat(ui): hook up nodes to redux

* fix(ui): fix handle

* fix(ui): add basic node edges & connection validation

* feat(ui): add connection validation styling

* feat(ui): increase edge width

* feat(ui): it blends

* feat(ui): wip model handling and graph topology validation

* feat(ui): validation connections w/ graphlib

* docs(ui): update nodes doc

* feat(ui): wip node editor

* chore(ui): rebuild api, update types

* add redux-dynamic-middlewares as a dependency

* feat(ui): add url host transformation

* feat(ui): handle already-connected fields

* feat(ui): rewrite SqliteItemStore in sqlalchemy

* fix(ui): fix sqlalchemy dynamic model instantiation

* feat(ui, nodes): metadata wip

* feat(ui, nodes): models

* feat(ui, nodes): more metadata wip

* feat(ui): wip range/iterate

* fix(nodes): fix sqlite typing

* feat(ui): export new type for invoke component

* tests(nodes): fix test instantiation of ImageField

* feat(nodes): fix LoadImageInvocation

* feat(nodes): add `title` ui hint

* feat(nodes): make ImageField attrs optional

* feat(ui): wip nodes etc

* feat(nodes): roll back sqlalchemy

* fix(nodes): partially address feedback

* fix(backend): roll back changes to pngwriter

* feat(nodes): wip address metadata feedback

* feat(nodes): add seeded rng to RandomRange

* feat(nodes): address feedback

* feat(nodes): move GET images error handling to DiskImageStorage

* feat(nodes): move GET images error handling to DiskImageStorage

* fix(nodes): fix image output schema customization

* feat(ui): img2img/txt2img -> linear

- remove txt2img and img2img tabs
- add linear tab
- add initial image selection to linear parameters accordion

* feat(ui): tidy graph builders

* feat(ui): tidy misc

* feat(ui): improve invocation union types

* feat(ui): wip metadata viewer recall

* feat(ui): move fonts to normal deps

* feat(nodes): fix broken upload

* feat(nodes): add metadata module + tests, thumbnails

- `MetadataModule` is stateless and needed in places where the `InvocationContext` is not available, so have not made it a `service`
- Handles loading/parsing/building metadata, and creating png info objects
- added tests for MetadataModule
- Lifted thumbnail stuff to util

* fix(nodes): revert change to RandomRangeInvocation

* feat(nodes): address feedback

- make metadata a service
- rip out pydantic validation, implement metadata parsing as simple functions
- update tests
- address other minor feedback items

* fix(nodes): fix other tests

* fix(nodes): add metadata service to cli

* fix(nodes): fix latents/image field parsing

* feat(nodes): customise LatentsField schema

* feat(nodes): move metadata parsing to frontend

* fix(nodes): fix metadata test

---------

Co-authored-by: maryhipp <maryhipp@gmail.com>
Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
2023-04-22 13:10:20 +10:00
fdad62e88b chore: add ".version" and ".last_model" to gitignore (#3208)
Mistakenly closed the previous pr.
2023-04-20 18:26:27 +01:00
955c81acef Merge branch 'main' into patch-1 2023-04-20 18:26:06 +01:00
e1058f3416 update CODEOWNERS for changed team composition (#3234)
Remove @mauwii and @keturn until they are able to reengage with the
development effort. @GreggHelt2 is designated co-codeowner for the
backend.
2023-04-20 17:19:10 +01:00
edf16a253d Merge branch 'main' into patch-1 2023-04-20 14:16:10 +02:00
46f5ef4100 Merge branch 'main' into dev/codeowner-fix-main 2023-04-19 22:40:56 +01:00
b843255236 update CODEOWNERS for changed team composition 2023-04-19 17:37:48 -04:00
3a968e5072 Update NSFW.md
Outdated doc said to change the '.invokeai' file, but it's now named 'invokeai.init' afaik.
2023-04-18 21:18:32 -04:00
b164330e3c replaced remaining print statements with log.*() 2023-04-18 20:49:00 -04:00
69433c9f68 Merge branch 'main' into lstein/enhance/diffusers-0.15 2023-04-18 19:21:53 -04:00
bd8ffd36bf bump to diffusers 0.15.1, remove dangling module 2023-04-18 19:20:38 -04:00
fd80e84ea6 Merge branch 'main' into patch-1 2023-04-18 19:14:28 -04:00
4824237a98 Added CPU instruction for README (#3225)
Since the change itself is quite straight-forward, I'll just describe
the context. Tried using automatic installer on my laptop, kept erroring
out on line 140-something of installer.py, "ERROR: Can not perform a
'--user' install. User site-packages are not visible in this
virtualenv."
Got tired of of fighting with pip so moved on to command line install.
Worked immediately, but at the time lacked instruction for CPU, so
instead of opening any helpful hyperlinks in the readme, took a few
minutes to grab the link from installer.py - thus this pr.
2023-04-18 19:07:37 -04:00
2c9a05eb59 Added CPU instruction for README 2023-04-18 18:46:55 +03:00
ecb5bdaf7e [bug] #3218 HuggingFace API off when --no-internet set (#3219)
#3218 

Huggingface API will not be queried if --no-internet flag is set
2023-04-18 14:34:34 +12:00
2feeb1f44c fix(ui): more responsive layout work 2023-04-18 04:29:31 +12:00
554f353773 fix(ui): Fix Width and Height showing 0 as input 2023-04-18 04:28:58 +12:00
f6cdff2c5b [bug] #3218 HuggingFace API off when --no-internet set
https://github.com/invoke-ai/InvokeAI/issues/3218

Huggingface API will not be queried if --no-internet flag is set
2023-04-17 16:53:31 +02:00
aee27e94c9 fix(ui): Fix site header on really small screens 2023-04-18 01:25:53 +12:00
695893e1ac fix(ui): Improve parameters panel and preview display 2023-04-18 01:09:48 +12:00
b800a8eb2e feat(ui): responsive wip
- Fixed a bunch of padding and margin issues across the app
- Fixed the Invoke logo compressing
- Disabled the visibility of the options panel pin button in tablet and mobile views
- Refined the header menu options in mobile and tablet views
- Refined other site header elements in mobile and tablet views
- Aligned Tab Icons to center in mobile and tablet views
2023-04-18 00:50:09 +12:00
9749ef34b5 layout improvements 2023-04-17 13:30:33 +02:00
9a43362127 Revert "Merge branch 'responsive-ui' of https://github.com/SammCheese/InvokeAI into pr/3207"
This reverts commit 866024ea6c, reversing
changes made to 601cc1f92c.
2023-04-17 13:51:08 +12:00
866024ea6c Merge branch 'responsive-ui' of https://github.com/SammCheese/InvokeAI into pr/3207 2023-04-17 13:50:44 +12:00
601cc1f92c help(ui): Basic responsive updates to demonstrate
Made some basic responsive changes to demonstrate how to go about making changes.

There are a bunch of problems not addressed yet. Like dealing with the resizeable component and etc.
2023-04-17 13:50:13 +12:00
d6a9a4464d feat(ui): Add Basic useResolution Component
This component just classifies `base` and `sm` as mobile, `md` and `lg` as tablet and `xl` and `2xl` as desktop.

This is a basic hook for quicker work with resolutions. Can be modified and adjusted to our needs. All resolution related work can go into this hook.
2023-04-17 13:48:42 +12:00
dac271725a feat(ui): Add Basic Breakpoints 2023-04-17 13:26:10 +12:00
e1fbecfcf7 fix(ui): Syntax issue with the HidePreview icon 2023-04-17 12:42:06 +12:00
63d10027a4 nodes: invocation queue item - make more pydantic 2023-04-16 09:39:33 -04:00
ef0773b8a3 nodes: set default for InvocationQueueItem.invoke_all 2023-04-16 09:39:33 -04:00
3daaddf15b nodes: remove duplicate LatentsToLatentsInvocation 2023-04-16 09:39:33 -04:00
570c3fe690 nodes: ensure Graph and GraphExecutionState ids are cast to str on instantiation 2023-04-16 09:39:33 -04:00
cbd1a7263a nodes: fix typing of GraphExecutionState.id 2023-04-16 09:39:33 -04:00
7fc5fbd4ce nodes: convert InvocationQueueItem to Pydantic class 2023-04-16 09:39:33 -04:00
6f6de402ad make InvocationQueueItem serializable 2023-04-16 09:39:33 -04:00
2ec4f5af10 remove unused import to pass lint & revert package.json 2023-04-15 21:53:33 +02:00
281662a6e1 chore: add ".version" and ".last_model" to gitignore
Mistakenly closed the previous pr
2023-04-15 21:46:47 +02:00
2edd032ec7 draft mobile layout 2023-04-15 21:34:03 +02:00
50eb02f68b chore(ui): build 2023-04-15 20:45:17 +10:00
d73f3adc43 moving shouldHidePreview from gallery to ui slice. 2023-04-15 20:45:17 +10:00
116107f464 chore(ui): build 2023-04-15 20:45:17 +10:00
da44bb1707 rename setter 2023-04-15 20:45:17 +10:00
f43aed677e chore(ui): build 2023-04-15 20:45:17 +10:00
0d051aaae2 rename hidden variable to something more descriptive 2023-04-15 20:45:17 +10:00
e4e48ff995 i forgor to push the locale 2023-04-15 20:45:17 +10:00
442a6bffa4 feat: add "Hide Preview" Button 2023-04-15 20:45:17 +10:00
aab262d991 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-14 20:12:38 -04:00
47b9910b48 update to diffusers 0.15 and fix code for name changes
- This is a port of #3184 to the main branch
2023-04-14 15:35:03 -04:00
0b0e6fe448 convert remainder of print() to log.info() 2023-04-14 15:15:14 -04:00
23d65e7162 [nodes] Add subgraph library, subgraph usage in CLI, and fix subgraph execution (#3180)
* Add latent to latent (img2img equivalent)
Fix a CLI bug with multiple links per node

* Using "latents" instead of "latent"

* [nodes] In-progress implementation of graph library

* Add linking to CLI for graph nodes (still broken)

* Fix subgraph execution, fix subgraph linking in CLI

* Fix LatentsToLatents
2023-04-14 06:41:06 +00:00
024fd54d0b Fixed a Typo. (#3190) 2023-04-14 14:33:31 +12:00
c44c19e911 Fixed a Typo. 2023-04-13 17:42:34 +02:00
c132dbdefa change "ialog" to "log" 2023-04-11 18:48:20 -04:00
f3081e7013 add module-level getLogger() method 2023-04-11 12:23:13 -04:00
f904f14f9e add missing module-level methods 2023-04-11 11:10:43 -04:00
8917a6d99b add logging support
This commit adds invokeai.backend.util.logging, which provides support
for formatted console and logfile messages that follow the status
reporting conventions of earlier InvokeAI versions.

Examples:

   ### A critical error     (logging.CRITICAL)
   *** A non-fatal error    (logging.ERROR)
   ** A warning             (logging.WARNING)
   >> Informational message (logging.INFO)
      | Debugging message   (logging.DEBUG)

This style logs everything through a single logging object and is
identical to using Python's `logging` module. The commonly-used
module-level logging functions are implemented as simple pass-thrus
to logging:

  import invokeai.backend.util.logging as ialog

  ialog.debug('this is a debugging message')
  ialog.info('this is a informational message')
  ialog.log(level=logging.CRITICAL, 'get out of dodge')
  ialog.disable(level=logging.INFO)
  ialog.basicConfig(filename='/var/log/invokeai.log')

Internally, the invokeai logging module creates a new default logger
named "invokeai" so that its logging does not interfere with other
module's use of the vanilla logging module. So `logging.error("foo")`
will go through the regular logging path and not add the additional
message decorations.

For more control, the logging module's object-oriented logging style
is also supported. The API is identical to the vanilla logging
usage. In fact, the only thing that has changed is that the
getLogger() method adds a custom formatter to the log messages.

 import logging
 from invokeai.backend.util.logging import InvokeAILogger

 logger = InvokeAILogger.getLogger(__name__)
 fh = logging.FileHandler('/var/invokeai.log')
 logger.addHandler(fh)
 logger.critical('this will be logged to both the console and the log file')
2023-04-11 10:46:38 -04:00
5a4765046e add logging support
This commit adds invokeai.backend.util.logging, which provides support
for formatted console and logfile messages that follow the status
reporting conventions of earlier InvokeAI versions.

Examples:

   ### A critical error     (logging.CRITICAL)
   *** A non-fatal error    (logging.ERROR)
   ** A warning             (logging.WARNING)
   >> Informational message (logging.INFO)
      | Debugging message   (logging.DEBUG)
2023-04-11 09:33:28 -04:00
d923d1d66b fix(nodes): fix naming of CvInvocationConfig 2023-04-11 12:13:53 +10:00
1f2c1e14db fix(nodes): move InvocationConfig to baseinvocation.py 2023-04-11 12:13:53 +10:00
07e3a0ec15 feat(nodes): add invocation schema customisation, add model selection
- add invocation schema customisation

done via fastapi's `Config` class and `schema_extra`. when using `Config`, inherit from `InvocationConfig` to get type hints.

where it makes sense - like for all math invocations - define a `MathInvocationConfig` class and have all invocations inherit from it.

this customisation can provide any arbitrary additional data to the UI. currently it provides tags and field type hints.

this is necessary for `model` type fields, which are actually string fields. without something like this, we can't reliably differentiate  `model` fields from normal `string` fields.

can also be used for future field types.

all invocations now have tags, and all `model` fields have ui type hints.

- fix model handling for invocations

added a helper to fall back to the default model if an invalid model name is chosen. model names in graphs now work.

- fix latents progress callback

noticed this wasn't correct while working on everything else.
2023-04-11 12:13:53 +10:00
427db7c7e2 feat(nodes): fix typo in PasteImageInvocation 2023-04-10 21:33:08 +10:00
dad3a7f263 fix(nodes): sampler_name --> scheduler
the name of this was changed at some point. nodes still used the old name, so scheduler selection did nothing. simple fix.
2023-04-10 19:54:09 +10:00
5bd0bb637f fix(nodes): add missing type to ImageField 2023-04-10 19:33:15 +10:00
f05095770c Increase chunk size when computing diffusers SHAs (#3159)
When running this app first time in WSL2 environment, which is
notoriously slow when it comes to IO, computing the SHAs of the models
takes an eternity.

Computing shas for sd2.1
```
| Calculating sha256 hash of model files
| sha256 = 1e4ce085102fe6590d41ec1ab6623a18c07127e2eca3e94a34736b36b57b9c5e (49 files hashed in 510.87s)
```

I increased the chunk size to 16MB reduce the number of round trips for
loading the data. New results:

```
| Calculating sha256 hash of model files
| sha256 = 1e4ce085102fe6590d41ec1ab6623a18c07127e2eca3e94a34736b36b57b9c5e (49 files hashed in 59.89s)
```

Higher values don't seem to make an impact.
2023-04-09 22:29:43 -04:00
de189f2db6 Increase chunk size when computing SHAs 2023-04-09 21:53:59 +02:00
cee159dfa3 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-09 12:08:09 -04:00
4463124bdd feat(nodes): mark ImageField properties required, add docs 2023-04-09 22:53:17 +10:00
34402cc46a feat(nodes): add list_images endpoint
- add `list_images` endpoint at `GET api/v1/images`
- extend `ImageStorageBase` with `list()` method, implemented it for `DiskImageStorage`
- add `ImageReponse` class to for image responses, which includes urls, metadata
- add `ImageMetadata` class (basically a stub at the moment)
- uploaded images now named `"{uuid}_{timestamp}.png"`
- add `models` modules. besides separating concerns more clearly, this helps to mitigate circular dependencies
- improve thumbnail handling
2023-04-09 13:48:44 +10:00
54d9833db0 Else. 2023-04-08 12:08:51 -04:00
5fe8cb56fc Correct response note 2023-04-08 12:08:51 -04:00
7919d81fb1 Update to address feedback 2023-04-08 12:08:51 -04:00
9d80b28a4f Begin Convert Work 2023-04-08 12:08:51 -04:00
1fcd91bcc5 Add/Update and Delete Models 2023-04-08 12:08:51 -04:00
e456e2e63a fix typo (#3147)
fix typo.

reference:
21f79e5919/invokeai/configs/INITIAL_MODELS.yaml (L21-L25)
2023-04-08 20:25:31 +12:00
ee41b99049 Update 050_INSTALLING_MODELS.md
fix typo
2023-04-08 17:02:47 +09:00
111d674e71 fix(nodes): use correct torch device in NoiseInvocation 2023-04-08 12:32:03 +10:00
8f048cfbd9 Add python-multipart, which is needed by nodes (#3141)
I'm not quite sure why this isn't being installed by fastapi's
dependencies, but running without it installed yields:

```
root@gnubert:/srv/ssdtank/docker/invokeai/git/InvokeAI# docker run --gpus all -p 9989:9090 -v /srv/ssdtank/docker/invokeai/data:/data -v /srv/ssdtank/docker/invokeai/git/InvokeAI/static/dream_web/:/static/dream_web --rm -ti -u root --entrypoint /bin/bash ghcr.io/cmsj/invokeai-nodes@sha256:426ebc414936cb67e02f5f64d963196500a77b2f485df8122a2d462797293938
root@7a77b56a5771:/usr/src# /invoke-new.py --web
Form data requires "python-multipart" to be installed.
You can install "python-multipart" with:

pip install python-multipart

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /invoke-new.py:22 in <module>                                                                    │
│                                                                                                  │
│   19                                                                                             │
│   20                                                                                             │
│   21 if __name__ == '__main__':                                                                  │
│ ❱ 22 │   main()                                                                                  │
│   23                                                                                             │
│                                                                                                  │
│ /invoke-new.py:13 in main                                                                        │
│                                                                                                  │
│   10 │   os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))                │
│   11 │                                                                                           │
│   12 │   if '--web' in sys.argv:                                                                 │
│ ❱ 13 │   │   from invokeai.app.api_app import invoke_api                                         │
│   14 │   │   invoke_api()                                                                        │
│   15 │   else:                                                                                   │
│   16 │   │   # TODO: Parse some top-level args here.                                             │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/invokeai/app/api_app.py:17 in <module>            │
│                                                                                                  │
│    14                                                                                            │
│    15 from ..backend import Args                                                                 │
│    16 from .api.dependencies import ApiDependencies                                              │
│ ❱  17 from .api.routers import images, sessions, models                                          │
│    18 from .api.sockets import SocketIO                                                          │
│    19 from .invocations import *                                                                 │
│    20 from .invocations.baseinvocation import BaseInvocation                                     │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/invokeai/app/api/routers/images.py:45 in <module> │
│                                                                                                  │
│   42 │   │   404: {"description": "Session not found"},                                          │
│   43 │   },                                                                                      │
│   44 )                                                                                           │
│ ❱ 45 async def upload_image(file: UploadFile, request: Request):                                 │
│   46 │   if not file.content_type.startswith("image"):                                           │
│   47 │   │   return Response(status_code=415)                                                    │
│   48                                                                                             │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/fastapi/routing.py:630 in decorator               │
│                                                                                                  │
│    627 │   │   ),                                                                                │
│    628 │   ) -> Callable[[DecoratedCallable], DecoratedCallable]:                                │
│    629 │   │   def decorator(func: DecoratedCallable) -> DecoratedCallable:                      │
│ ❱  630 │   │   │   self.add_api_route(                                                           │
│    631 │   │   │   │   path,                                                                     │
│    632 │   │   │   │   func,                                                                     │
│    633 │   │   │   │   response_model=response_model,                                            │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/fastapi/routing.py:569 in add_api_route           │
│                                                                                                  │
│    566 │   │   current_generate_unique_id = get_value_or_default(                                │
│    567 │   │   │   generate_unique_id_function, self.generate_unique_id_function                 │
│    568 │   │   )                                                                                 │
│ ❱  569 │   │   route = route_class(                                                              │
│    570 │   │   │   self.prefix + path,                                                           │
│    571 │   │   │   endpoint=endpoint,                                                            │
│    572 │   │   │   response_model=response_model,                                                │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/fastapi/routing.py:444 in __init__                │
│                                                                                                  │
│    441 │   │   │   │   0,                                                                        │
│    442 │   │   │   │   get_parameterless_sub_dependant(depends=depends, path=self.path_format),  │
│    443 │   │   │   )                                                                             │
│ ❱  444 │   │   self.body_field = get_body_field(dependant=self.dependant, name=self.unique_id)   │
│    445 │   │   self.app = request_response(self.get_route_handler())                             │
│    446 │                                                                                         │
│    447 │   def get_route_handler(self) -> Callable[[Request], Coroutine[Any, Any, Response]]:    │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/fastapi/dependencies/utils.py:756 in              │
│ get_body_field                                                                                   │
│                                                                                                  │
│   753 │   │   alias="body",                                                                      │
│   754 │   │   field_info=BodyFieldInfo(**BodyFieldInfo_kwargs),                                  │
│   755 │   )                                                                                      │
│ ❱ 756 │   check_file_field(final_field)                                                          │
│   757 │   return final_field                                                                     │
│   758                                                                                            │
│                                                                                                  │
│ /usr/src/InvokeAI/lib/python3.10/site-packages/fastapi/dependencies/utils.py:111 in              │
│ check_file_field                                                                                 │
│                                                                                                  │
│   108 │   │   │   │   raise RuntimeError(multipart_incorrect_install_error) from None            │
│   109 │   │   except ImportError:                                                                │
│   110 │   │   │   logger.error(multipart_not_installed_error)                                    │
│ ❱ 111 │   │   │   raise RuntimeError(multipart_not_installed_error) from None                    │
│   112                                                                                            │
│   113                                                                                            │
│   114 def get_param_sub_dependant(                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Form data requires "python-multipart" to be installed.
You can install "python-multipart" with:

pip install python-multipart
```
2023-04-07 19:17:37 -04:00
cd1b350dae Merge branch 'main' into bugfix/release-updater 2023-04-07 18:56:21 -04:00
8334757af9 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-07 18:55:54 -04:00
7103ac6a32 Add python-multipart, which is needed by nodes 2023-04-07 19:43:42 +01:00
f6b131e706 remove vestiges of non-functional autoimport code for legacy checkpoints (#3076)
- the functionality to automatically import and run legacy checkpoint
files in a designated folder has been removed from the backend but there
are vestiges of the code remaining in the frontend that are causing
crashes.
- This fixes the problem.

- Closes #3075
2023-04-08 02:21:23 +12:00
d1b2b99226 Merge branch 'main' into bugfix/remove-autoimport-dead-code 2023-04-07 09:59:58 -04:00
e356f2511b chore: configure stale bot 2023-04-07 20:45:08 +10:00
e5f8b22a43 add a new method to model_manager that retrieves individual pipeline components (#3120)
This PR introduces a new set of ModelManager methods that enables you to
retrieve the individual parts of a stable diffusion pipeline model,
including the vae, text_encoder, unet, tokenizer, etc.

To use:

```
from invokeai.backend import ModelManager

manager = ModelManager('/path/to/models.yaml')

# get the VAE
vae = manager.get_model_vae('stable-diffusion-1.5')

# get the unet
unet = manager.get_model_unet('stable-diffusion-1.5')

# get the tokenizer
tokenizer = manager.get_model_tokenizer('stable-diffusion-1.5')

# etc etc
feature_extractor = manager.get_model_feature_extractor('stable-diffusion-1.5')
scheduler = manager.get_model_scheduler('stable-diffusion-1.5')
text_encoder = manager.get_model_text_encoder('stable-diffusion-1.5')

# if no model provided, then defaults to the one currently in GPU, if any
vae = manager.get_model_vae()
```
2023-04-07 01:39:57 -04:00
45b84fb4bb Merge branch 'main' into bugfix/remove-autoimport-dead-code 2023-04-07 17:07:25 +12:00
f022c89249 Merge branch 'main' into feat/return-submodels 2023-04-06 22:03:31 -04:00
ab05144716 Change where !replay looks for its infile (#3129)
!fetch puts its output file into the output directory; it may be
beneficial to have !replay look in the output directory as well.
2023-04-06 22:02:06 -04:00
aeb4914e67 Merge branch 'main' into replay-file_path 2023-04-06 21:45:23 -04:00
76bcd4d44f Fix typo (#3133)
'hotdot' to 'hotdog'; the world's least important PR :)
2023-04-07 12:38:05 +12:00
50f5e1bc83 Fix typo
'hotdot' to 'hotdog'; the world's least important PR :)
2023-04-06 16:47:57 -07:00
4c339dd4b0 refactor get_submodels() into individual methods 2023-04-06 17:08:23 -04:00
bc2b9500e3 Merge branch 'main' into bugfix/prevent-cli-crash 2023-04-06 15:38:46 -04:00
32857d81c5 prevent legacy CLI crash caused by removal of convert option
- Compensatory change to the CLI that prevents it from crashing
  when it tries to import a model.
- Bug introduced when the "convert" option removed from the model
  manager.
2023-04-06 15:36:05 -04:00
7268131f57 change where !replay looks for its infile
!fetch puts its output file into the output directory; it may be beneficial to have !replay look in the output directory as well.
2023-04-06 08:14:11 -04:00
85b020f76c [nodes] Add latent nodes, storage, and fix iteration bugs (#3091)
* Add latents nodes.
* Fix iteration expansion.
* Add collection generator nodes, math nodes.
* Add noise node.
* Add some graph debug commands to the CLI.
* Fix negative id linking in CLI.
* Fix a CLI bug with multiple links per node.
2023-04-06 04:06:05 +00:00
a7833cc9a9 [api] Add models router and list model API. 2023-04-05 23:59:07 -04:00
28f75d80d5 Merge branch 'main' into bugfix/release-updater 2023-04-05 18:25:33 -04:00
919294e977 fix build-container.yml (#3117)
Add permission go write packages to GITHUB_TOKEN
2023-04-06 00:25:00 +02:00
b917ffa4d7 Merge branch 'main' into bugfix/release-updater 2023-04-05 17:37:27 -04:00
d44151d6ff add a new method to model_manager that retrieves individual pipeline parts
- New method is ModelManager.get_sub_model(model_name:str,model_part:SDModelComponent)

To use:

```
from invokeai.backend import ModelManager, SDModelComponent as sdmc
manager = ModelManager('/path/to/models.yaml')
vae = manager.get_sub_model('stable-diffusion-1.5', sdmc.vae)
```
2023-04-05 17:25:42 -04:00
7640acfb1f update build-container.yml
- add packages write permission
2023-04-05 15:44:26 +02:00
aed9ecef2a feat(nodes): add thumbnail generation to DiskImageStorage 2023-04-05 08:22:23 +10:00
18cddd7972 Right link on pytorch installer for linux rocm (#3084)
Right link on pytorch installer for linux rocm
2023-04-04 17:40:42 -04:00
e6b25f4ae3 Merge branch 'main' into patch-1 2023-04-04 17:40:12 -04:00
d1c0050e65 fix(nodes): fix typo in list_sessions handler (#3109)
The typo accidentally did not affect functionality; when `query==""`, it
`search()`ed but found everything due to empty query, then paginated
results, so it worked the same as `list()`.

Still fix it
2023-04-03 21:24:48 -04:00
ecdfa136a0 fix(nodes): fix typo in list_sessions handler 2023-04-04 00:34:32 +10:00
5cd513ee63 [deps] bump compel version to fix crash on invalid (auto111) syntax (#3107)
currently if users input eg `happy (camper:0.3)` it gets parsed
incorrectly, which causes crashes if it's in the negative prompt. bump
to compel 1.0.5 fixes the parser to avoid this (note the weight is
parsed as plain text, it's not converted to proper invoke syntax)
2023-04-04 02:30:17 +12:00
ab45086546 Merge branch 'main' into deps_bump_compel 2023-04-04 02:05:40 +12:00
77ba7359f4 fix(nodes): commit changes to db 2023-04-03 19:09:49 +10:00
8cbe2e14d9 bump compel version to fix on invalid (auto111) syntax 2023-04-03 10:37:01 +02:00
f682fb8040 fix invokeai-update script
- This commit fixes the update script to work again, as well as fixing
  the ambiguity between updating to a tag and updating to a branch.
2023-04-02 11:08:12 -04:00
ee86eedf01 Right link on pytorch installer for linux rocm
Right link on pytorch installer for linux rocm
2023-03-31 17:22:00 -03:00
1f89cf3343 remove vestiges of non-functional autoimport code for legacy checkpoints
- Closes #3075
2023-03-31 04:27:03 -04:00
c4e6511a59 Add support for yet another TI embedding format (main version) (#3050)
- This PR adds support for embedding files that contain a single key
"emb_params". The only example I know of this format is the
"EasyNegative" embedding on HuggingFace, but there are certainly others.

- This PR also adds support for loading embedding files that have been
saved in safetensors format.

- It also cleans up the code so that the logic of probing for and
selecting the right format parser is clear.

- This is the same as #3045, which is on the 2.3 branch.
2023-03-31 03:57:57 -04:00
44843be4c8 Merge branch 'main' into enhance/support-another-embedding-format-main 2023-03-30 23:16:52 -04:00
054e963bef add basic autocomplete functionality to node cli (#3035)
- Commands, invocations and their parameters will now autocomplete using
introspection.
- Two types of parameter *arguments* will also autocomplete:
  - --sampler_name  will autocomplete the scheduler name
  - --model will autocomplete the model name
- There don't seem to be commands for reading/writing image files yet,
so path autocompletion is not implemented
2023-03-30 08:25:36 -04:00
afb66a7884 Merge branch 'main' into feat/node-cli-autocompleter 2023-03-30 07:51:51 -04:00
b9df9e26f2 Merge branch 'main' into enhance/support-another-embedding-format-main 2023-03-30 07:51:23 -04:00
25ae36ceb5 I18n build mode (#3051)
Add build mode option to bundle english translation with UI
2023-03-29 22:26:45 -04:00
3ae8daedaa Merge branch 'main' into i18n-build-mode 2023-03-29 22:26:17 -04:00
e11c1d66ab handle multiple tokens and embeddings in single file 2023-03-29 22:05:06 -04:00
b913e1e11e improve importation and conversion of legacy checkpoint files (#3053)
A long-standing issue with importing legacy checkpoints (both ckpt and
safetensors) is that the user has to identify the correct config file,
either by providing its path or by selecting which type of model the
checkpoint is (e.g. "v1 inpainting"). In addition, some users wish to
provide custom VAEs for use with the model. Currently this is done in
the WebUI by importing the model, editing it, and then typing in the
path to the VAE.

## Model configuration file selection

To improve the user experience, the model manager's `heuristic_import()`
method has been enhanced as follows:

1. When initially called, the caller can pass a config file path, in
which case it will be used.

2. If no config file provided, the method looks for a .yaml file in the
same directory as the model which bears the same basename. e.g.
```
   my-new-model.safetensors
   my-new-model.yaml
```
The yaml file is then used as the configuration file for importation and
conversion.

3. If no such file is found, then the method opens up the checkpoint and
probes it to determine whether it is V1, V1-inpaint or V2. If it is a V1
format, then the appropriate v1-inference.yaml config file is used.
Unfortunately there are two V2 variants that cannot be distinguished by
introspection.

4. If the probe algorithm is unable to determine the model type, then
its last-ditch effort is to execute an optional callback function that
can be provided by the caller. This callback, named
`config_file_callback` receives the path to the legacy checkpoint and
returns the path to the config file to use. The CLI uses to put up a
multiple choice prompt to the user. The WebUI **could** use this to
prompt the user to choose from a radio-button selection.

5. If the config file cannot be determined, then the import is
abandoned.

## Custom VAE Selection

The user can attach a custom VAE to the imported and converted model by
copying the desired VAE into the same directory as the file to be
imported, and giving it the same basename. E.g.:

```
    my-new-model.safetensors
    my-new-model.vae.pt
```

For this to work, the VAE must end with ".vae.pt", ".vae.ckpt", or
".vae.safetensors". The indicated VAE will be converted into diffusers
format and stored with the converted models file, so the ".pt" file can
be deleted after conversion.

No facility is currently provided to swap a diffusers VAE at import
time, but this can be done after the fact using the WebUI and CLI's
model editing functions.

Note that this is the same fix that was applied to the 2.3 branch in
#3043 . This applies to `main`.
2023-03-29 17:22:15 -04:00
3c4b6d5735 Merge branch 'main' into enhance/heuristic-import-improvements 2023-03-29 16:54:43 -04:00
e6123eac19 Merge branch 'main' into i18n-build-mode 2023-03-29 05:33:14 -07:00
30ca25897e Fix bugs in online ckpt conversion of 2.0 models (#3057)
## Enable the on-the-fly conversion of models based on SD 2.0/2.1 into
diffusers

This commit fixes bugs related to the on-the-fly conversion and loading
of legacy checkpoint models built on SD-2.0 base.

- When legacy checkpoints built on SD-2.0 models were converted
on-the-fly using --ckpt_convert, generation would crash with a precision
incompatibility error. This problem has been found and fixed.
2023-03-28 23:34:53 -04:00
abaee6b9ed Merge branch 'main' into feat/node-cli-autocompleter 2023-03-28 23:32:10 -04:00
4d7c9e1ab7 Merge branch 'main' into bugfix/convert-2.0-models 2023-03-28 23:01:36 -04:00
cc5687f26c [nodes] downgrade fastapi+uvicorn to fix openapi schema 2023-03-28 22:53:20 -04:00
cdb3616dca Merge branch 'main' into enhance/support-another-embedding-format-main 2023-03-28 21:03:06 -04:00
78e76f26f9 Merge branch 'main' into i18n-build-mode 2023-03-28 11:04:32 -04:00
9a7580dedd fix bugs in online ckpt conversion of 2.0 models
This commit fixes bugs related to the on-the-fly conversion and loading of
legacy checkpoint models built on SD-2.0 base.

- When legacy checkpoints built on SD-2.0 models were converted
  on-the-fly using --ckpt_convert, generation would crash with a
  precision incompatibility error.
2023-03-28 00:17:20 -04:00
dc2da8cff4 Doc: updating ROCm version in documentation (#3041)
The Pytorch ROCm version in the documentation in outdated (`rocm5.2`)
which leads to errors during the installation of InvokeAI.

This PR updates the documentation with the latest Pytorch ROCm `5.4.2`
version.
2023-03-27 22:37:43 -04:00
019a9f0329 address change requests in PR
1. Prompt has changed to "invoke> ".
2. Function to initialize the autocompleter has been renamed "set_autocompleter()"
2023-03-27 12:20:24 -04:00
fe5d9ad171 improve importation and conversion of legacy checkpoint files
A long-standing issue with importing legacy checkpoints (both ckpt and
safetensors) is that the user has to identify the correct config file,
either by providing its path or by selecting which type of model the
checkpoint is (e.g. "v1 inpainting"). In addition, some users wish to
provide custom VAEs for use with the model. Currently this is done in
the WebUI by importing the model, editing it, and then typing in the
path to the VAE.

To improve the user experience, the model manager's
`heuristic_import()` method has been enhanced as follows:

1. When initially called, the caller can pass a config file path, in
which case it will be used.

2. If no config file provided, the method looks for a .yaml file in the
same directory as the model which bears the same basename. e.g.
```
   my-new-model.safetensors
   my-new-model.yaml
```
   The yaml file is then used as the configuration file for
   importation and conversion.

3. If no such file is found, then the method opens up the checkpoint
   and probes it to determine whether it is V1, V1-inpaint or V2.
   If it is a V1 format, then the appropriate v1-inference.yaml config
   file is used. Unfortunately there are two V2 variants that cannot be
   distinguished by introspection.

4. If the probe algorithm is unable to determine the model type, then its
   last-ditch effort is to execute an optional callback function that can
   be provided by the caller. This callback, named `config_file_callback`
   receives the path to the legacy checkpoint and returns the path to the
   config file to use. The CLI uses to put up a multiple choice prompt to
   the user. The WebUI **could** use this to prompt the user to choose
   from a radio-button selection.

5. If the config file cannot be determined, then the import is abandoned.

The user can attach a custom VAE to the imported and converted model
by copying the desired VAE into the same directory as the file to be
imported, and giving it the same basename. E.g.:

```
    my-new-model.safetensors
    my-new-model.vae.pt
```

For this to work, the VAE must end with ".vae.pt", ".vae.ckpt", or
".vae.safetensors". The indicated VAE will be converted into diffusers
format and stored with the converted models file, so the ".pt" file
can be deleted after conversion.

No facility is currently provided to swap a diffusers VAE at import
time, but this can be done after the fact using the WebUI and CLI's
model editing functions.
2023-03-27 11:27:45 -04:00
dbc0093b31 Merge remote-tracking branch 'origin' into i18n-build-mode 2023-03-27 10:57:41 -04:00
92e512b8b6 add package mode option for i18next 2023-03-27 10:49:52 -04:00
abe4dc8ac1 Add support for yet another textual inversion embedding format
- This PR adds support for embedding files that contain a single key
  "emb_params". The only example I know of this format is the
  "EasyNegative" embedding on HuggingFace, but there are certainly
  others.

- This PR also adds support for loading embedding files that have been
  saved in safetensors format.

- It also cleans up the code so that the logic of probing for and
  selecting the right format parser is clear.
2023-03-27 09:39:03 -04:00
dc14701d20 Merge branch 'main' into feat/node-cli-autocompleter 2023-03-26 23:46:10 -04:00
737e0f3085 doc: fixing error in rocm version 2023-03-26 12:40:20 +02:00
81b7ea4362 doc: updating ROCm version for pip install 2023-03-26 12:32:12 +02:00
09dfde0ba1 fix(ui): fix viewer tooltip localisation strings (#3037)
fixes #2923
2023-03-26 20:35:52 +13:00
3ba7e966b5 Merge branch 'main' into fix/ui/viewer-localisation 2023-03-26 20:35:12 +13:00
a1cd4834d1 nodes: add cancelation, updated progress callback, typing fixes (#3036)
keeping `main` up to date with my api nodes branch:
- bd7e515290: [nodes] Add cancelation to
the API @Kyle0654
- 5fe38f7: fix(backend): simple typing fixes
  - just picking some low-hanging fruit to improve IDE hinting
- c34ac91: fix(nodes): fix cancel; fix callback for img2img, inpaint
- makes nodes cancel immediate, use fix progress images on nodes, fix
callbacks for img2img/inpaint
- 4221cf7: fix(nodes): fix schema generation for output classes
- did this previously for some other class; needed to not have node
outputs be optional
2023-03-26 20:34:27 +13:00
a724038dc6 fix(ui): fix viewer tooltip localisation strings
fixes #2923
2023-03-26 17:43:00 +11:00
4221cf7731 fix(nodes): fix schema generation for output classes
All output classes need to have their properties flagged as `required` for the schema generation to work as needed.
2023-03-26 17:20:10 +11:00
c34ac91ff0 fix(nodes): fix cancel; fix callback for img2img, inpaint 2023-03-26 17:07:40 +11:00
5fe38f7c88 fix(backend): simple typing fixes 2023-03-26 17:07:03 +11:00
bd7e515290 [nodes] Add cancelation to the API 2023-03-26 15:47:32 +11:00
076fac07eb feat[web]: use the predicted denoised image for previews (#2915)
Some schedulers report not only the noisy latents at the current
timestep, but also their estimate so far of what the de-noised latents
will be.

It makes for a more legible preview than the noisy latents do.

I think this is a huge improvement, but there are a few considerations:
- Need to not spook @JPPhoto by changing how previews look.
- Some schedulers (most notably **DPM Solver++**) don't provide this
data, and it falls back to the current behavior there. That's not
terrible, but seeing such a big difference in how _previews_ look from
one scheduler to the next might mislead people into thinking there's a
bigger difference in their overall effectiveness than there really is.

My fear of configuration-option-overwhelm leaves me inclined to _not_
add a configuration option for this, but we could.
2023-03-26 00:29:00 -04:00
9348161600 add basic autocomplete functionality to node cli
- Commands, invocations and their parameters will now autocomplete
  using introspection.
- Two types of parameter *arguments* will also autocomplete:
  - --sampler_name  will autocomplete the scheduler name
  - --model will autocomplete the model name
- There don't seem to be commands for reading/writing image files yet, so
  path autocompletion is not implemented
2023-03-26 00:24:27 -04:00
dac3c158a5 Merge branch 'main' into feat/preview_predicted_x0
- resolve conflicts with generate.py invocation
- remove unused symbols that pyflakes complains about
- add **untested** code for passing intermediate latent image to the
  step callback in the format expected.
2023-03-25 16:07:18 -04:00
17d8bbf330 ask for escalated privileges in push workflows 2023-03-25 15:22:25 -04:00
9344687a56 installer: fix indentation in invoke.sh template (tabs -> spaces) 2023-03-25 13:57:09 -04:00
cf534d735c duplicate of PR #3016, but based on main 2023-03-25 13:57:09 -04:00
501924bc60 do not reexport PipelineIntermediateState 2023-03-25 13:57:09 -04:00
d117251747 make step_callback work again in generate() call
This PR fixes #2951 and restores the step_callback argument in the
refactored generate() method. Note that this issue states that
"something is still wrong because steps and step are zero." However,
I think this is confusion over the call signature of the callback, which
since the diffusers merge has been `callback(state:PipelineIntermediateState)`

This is the test script that I used to determine that `step` is being passed
correctly:

```

from pathlib import Path
from invokeai.backend import ModelManager, PipelineIntermediateState
from invokeai.backend.globals import global_config_dir
from invokeai.backend.generator import Txt2Img

def my_callback(state:PipelineIntermediateState, total_steps:int):
    print(f'callback(step={state.step}/{total_steps})')

def main():
    manager = ModelManager(Path(global_config_dir()) / "models.yaml")
    model = manager.get_model('stable-diffusion-1.5')
    print ('=== TXT2IMG TEST ===')
    steps=30
    output = next(Txt2Img(model).generate(prompt='banana sushi',
                                          iterations=None,
                                          steps=steps,
                                          step_callback=lambda x: my_callback(x,steps)
                                          )
                  )
    print(f'image={output.image}, seed={output.seed}, steps={output.params.steps}')

if __name__=='__main__':
    main()
```
2023-03-25 13:57:09 -04:00
6ea61a8486 fix issue with embeddings being loaded twice (#3029)
This bug was causing a bunch of annoying warnings about not overwriting
previously loaded tokens.

- as noted by JPPhoto
2023-03-26 04:45:20 +13:00
e4d903af20 Merge branch 'main' into bugfix/load-embeddings-once 2023-03-26 04:19:43 +13:00
2d9797da35 (fix)[docs] Fixed snippet/code formatting (#2918)
It was pasted as plain text, now it's a code fence.
2023-03-25 10:49:13 -04:00
07ea806553 Merge branch 'main' into patch-1 2023-03-25 10:48:25 -04:00
5ac0316c62 fix issue with embeddings being loaded twice
- as noted by JPPhoto
2023-03-25 10:45:03 -04:00
9536ba22af Convert custom VAEs during legacy checkpoint loading (#3010)
- When a legacy checkpoint model is loaded via --convert_ckpt and its
models.yaml stanza refers to a custom VAE path (using the 'vae:' key),
the custom VAE will be converted and used within the diffusers model.
Otherwise the VAE contained within the legacy model will be used.
    
- Note that the checkpoint import functions in the CLI or Web UIs
continue to default to the standard stabilityai/sd-vae-ft-mse VAE. This
can be fixed after the fact by editing VAE key using either the CLI or
Web UI.
   
- Fixes issue #2917
2023-03-25 00:37:12 -04:00
5503749085 Merge branch 'main' into feat/use-custom-vaes 2023-03-25 17:09:38 +13:00
9bfe2fa371 add github API token to mkdocs workflow (#3023)
The mkdocs-workflow has been failing over the past week due to
permission denied errors. I *think* this is the result of not passing
the GitHub API token to the workflow, and this is a speculative fix for
the issue.
2023-03-24 17:59:53 -04:00
d8ce6e4426 Merge branch 'bugfix/mkdocs-workflow' of github.com:invoke-ai/InvokeAI into bugfix/mkdocs-workflow 2023-03-24 17:58:16 -04:00
43d2d6d98c add blessedcoolant as backup to mauwii codeowner 2023-03-24 17:58:03 -04:00
64c233efd4 Merge branch 'main' into bugfix/mkdocs-workflow 2023-03-24 17:47:14 -04:00
2245a4e117 doc(readme): fix incorrect install command (#3024)
Hi, I am trying to install InvokeAI on my linux machine, the command in
README.md cannot install correct dependency
2023-03-24 17:46:58 -04:00
9ceec40b76 Merge branch 'main' into feat/use-custom-vaes 2023-03-24 17:45:02 -04:00
0f13b90059 doc(readme): fix incorrect install command 2023-03-24 23:21:51 +08:00
d91fc16ae4 add github API token to mkdocs workflow 2023-03-24 09:17:30 -04:00
bc01a96f9d re-implement model scanning when loading legacy checkpoint files (#3012)
- This PR turns on pickle scanning before a legacy checkpoint file is
loaded from disk within the checkpoint_to_diffusers module.

- Also miscellaneous diagnostic message cleanup.

- See also #3011 for a similar patch to the 2.3 branch.
2023-03-24 08:57:07 -04:00
85b2822f5e Merge branch 'main' into security/scan-ckpt-files-main 2023-03-24 08:39:59 -04:00
c33d8694bb build: do not run python tests on ui build (#2987)
`invokeai/frontend/web/dist/**` should not be triggering the full test
suite.
2023-03-25 00:54:40 +13:00
685bd027f0 Merge branch 'main' into build/no-test-on-ui-build 2023-03-25 00:51:26 +13:00
f592d620d5 ui: translations update from weblate (#3021)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-03-24 19:25:17 +11:00
Tom
2b127b73ac translationBot(ui): update translation (French)
Currently translated at 82.7% (417 of 504 strings)

Co-authored-by: Tom <tom.fouthier@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/fr/
Translation: InvokeAI/Web UI
2023-03-24 04:49:27 +01:00
8855902cfe translationBot(ui): update translation (Spanish)
Currently translated at 100.0% (504 of 504 strings)

translationBot(ui): update translation (Spanish)

Currently translated at 100.0% (501 of 501 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/es/
Translation: InvokeAI/Web UI
2023-03-24 04:49:27 +01:00
9d8ddc6a08 translationBot(ui): update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/
Translation: InvokeAI/Web UI
2023-03-24 04:49:27 +01:00
4ca5189e73 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (504 of 504 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (501 of 501 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (500 of 500 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-03-24 04:49:27 +01:00
873597cb84 Allow loading all types of dreambooth models - Fix issue #2932 (#2933)
Allows to load models with EMA using `model_ema.diffusion_model.xxxx` or
`model_ema.xxxx` weights.

Fixes #2932
2023-03-23 23:40:04 -04:00
44d742f232 Merge branch 'main' into security/scan-ckpt-files-main 2023-03-23 23:33:49 -04:00
6e7dbf99f3 Merge branch 'main' into bugfix/dreambooth_ema 2023-03-23 23:24:15 -04:00
1ba1076888 Tidy up Tests and Provide Documentation (#2869)
Bit of basic housekeeping and documentation to explain to people how to
get local development environment running (including the tests).
2023-03-23 23:23:20 -04:00
cafa108f69 Merge branch 'main' into tests 2023-03-23 23:22:27 -04:00
deeff36e16 Merge branch 'main' into security/scan-ckpt-files-main 2023-03-23 23:20:52 -04:00
d770b14358 [deps] upgrade compel for better .swap defaults and a bugfix (#3014) 2023-03-23 19:01:12 -04:00
20414ba4ad Merge branch 'main' into deps_upgrade_compel 2023-03-23 18:38:46 -04:00
92721a1d45 do not reexport PipelineIntermediateState 2023-03-24 09:32:47 +11:00
f329fddab9 make step_callback work again in generate() call
This PR fixes #2951 and restores the step_callback argument in the
refactored generate() method. Note that this issue states that
"something is still wrong because steps and step are zero." However,
I think this is confusion over the call signature of the callback, which
since the diffusers merge has been `callback(state:PipelineIntermediateState)`

This is the test script that I used to determine that `step` is being passed
correctly:

```

from pathlib import Path
from invokeai.backend import ModelManager, PipelineIntermediateState
from invokeai.backend.globals import global_config_dir
from invokeai.backend.generator import Txt2Img

def my_callback(state:PipelineIntermediateState, total_steps:int):
    print(f'callback(step={state.step}/{total_steps})')

def main():
    manager = ModelManager(Path(global_config_dir()) / "models.yaml")
    model = manager.get_model('stable-diffusion-1.5')
    print ('=== TXT2IMG TEST ===')
    steps=30
    output = next(Txt2Img(model).generate(prompt='banana sushi',
                                          iterations=None,
                                          steps=steps,
                                          step_callback=lambda x: my_callback(x,steps)
                                          )
                  )
    print(f'image={output.image}, seed={output.seed}, steps={output.params.steps}')

if __name__=='__main__':
    main()
```
2023-03-24 09:32:47 +11:00
f2efde27f6 load embeddings after a ckpt legacy model is converted to diffusers (#3013)
This PR corrects a bug in which embeddings were not being applied when a
non-diffusers model was loaded.

- Fixes #2954
- Also improves diagnostic reporting during embedding loading.
2023-03-23 18:10:19 -04:00
02c58f22be upgrade compel for better .swap defaults and a bugfix 2023-03-23 22:34:54 +01:00
f751dcd245 load embeddings after a ckpt legacy model is converted to diffusers
- Fixes #2954
- Also improves diagnostic reporting during embedding loading.
2023-03-23 15:21:58 -04:00
a97107bd90 handle VAEs that do not have a "state_dict" key 2023-03-23 15:11:29 -04:00
b2ce45a417 re-implement model scanning when loading legacy checkpoint files
- This PR turns on pickle scanning before a legacy checkpoint file
  is loaded from disk within the checkpoint_to_diffusers module.

- Also miscellaneous diagnostic message cleanup.
2023-03-23 15:03:30 -04:00
4e0b5d85ba convert custom VAEs into diffusers
- When a legacy checkpoint model is loaded via --convert_ckpt and its
  models.yaml stanza refers to a custom VAE path (using the 'vae:'
  key), the custom VAE will be converted and used within the diffusers
  model. Otherwise the VAE contained within the legacy model will be
  used.

- Note that the heuristic_import() method, which imports arbitrary
  legacy files on disk and URLs, will continue to default to the
  the standard stabilityai/sd-vae-ft-mse VAE. This can be fixed after
  the fact by editing the models.yaml stanza using the Web or CLI
  UIs.

- Fixes issue #2917
2023-03-23 13:14:19 -04:00
a958ae5e29 Merge branch 'main' into feat/use-custom-vaes 2023-03-23 10:32:56 -04:00
4d50fbf8dc Merge branch 'main' into build/no-test-on-ui-build 2023-03-23 01:08:24 +13:00
485f6e5954 Export more for header (#2996)
* export more items needed for dynamic header
* remove build mode that is no longer needed
2023-03-23 01:07:16 +13:00
1f6ce838ba Merge branch 'main' into export-more-for-header 2023-03-22 07:49:15 -04:00
0dc5773849 [nodes] Update fastapi packages to latest (except FastAPI, which has an annotation bug in the newest version) (#3004) 2023-03-22 19:12:45 +13:00
bc347f749c [nodes] Update fastapi packages to latest (except FastAPI, which has an annotation bug in the newest version) 2023-03-21 19:45:17 -07:00
1b215059e7 Merge branch 'main' into export-more-for-header 2023-03-21 16:29:53 -04:00
db079a2733 remove unneeded build:package code 2023-03-21 10:29:27 -04:00
26f71d3536 change back 2023-03-21 10:28:29 -04:00
eb7ae2588c unused var 2023-03-21 10:21:58 -04:00
278c14ba2e try jsx.element 2023-03-21 10:18:38 -04:00
74e83dda54 update type 2023-03-21 10:10:48 -04:00
28c1fca477 Merge branch 'main' into build/no-test-on-ui-build 2023-03-20 02:21:40 +13:00
1f0324102a chore(ui): build 2023-03-19 23:16:29 +11:00
a782ad092d feat(ui): localise iaialertdialog defaults 2023-03-19 23:16:29 +11:00
eae4eb419a fix(ui): popovers trigger on click (accessibility) 2023-03-19 23:16:29 +11:00
fb7f38f46e fix(ui): make alertdialogs centered 2023-03-19 23:16:29 +11:00
93d0cae455 fix(ui): fix alertdialogs closing immediately 2023-03-19 23:16:29 +11:00
35f6b5d562 fix(ui): make invoketabs not lazy 2023-03-19 23:16:29 +11:00
2aefa06ef1 fix(ui): Clean up manual add forms 2023-03-19 23:16:29 +11:00
5906888477 feat(ui): add current image loading fallback 2023-03-19 23:16:29 +11:00
f22c7d0da6 feat(ui): add more w/h options 2023-03-19 23:16:29 +11:00
93b38707b2 feat(ui): tidy up model manager styling
fixes #2970
2023-03-19 23:16:29 +11:00
6ecf53078f fix(ui): Misalignment of model search entries 2023-03-19 23:16:29 +11:00
9c93b7cb59 build: do not run python tests on ui build
`invokeai/frontend/web/dist/**` should not be triggering the full test suite.
2023-03-19 23:01:30 +11:00
7789e8319c Fix some text and a link (#2910)
- Fix link to `070_INSTALL_XFORMERS.md`.
- Fix some spelling.
2023-03-19 05:55:18 +13:00
7d7a28beb3 Merge branch 'main' into main-text-fixup-PR 2023-03-18 09:54:41 -07:00
27a113d872 nodes: api fixes (#2959)
- 86932469e76f1315ee18bfa2fc52b588241dace1 add image_to_dataURL util
- 0c2611059711b45bb6142d30b1d1343ac24268f3 make fast latents method
static
- this method doesn't really need `self` and should be able to be called
without instantiating `Generator`
- 2360bfb6558ea511e9c9576f3d4b5535870d84b4 fix schema gen for
GraphExecutionState
- `GraphExecutionState` uses `default_factory` in its fields; the result
is the OpenAPI schema marks those fields as optional, which propagates
to the generated API client, which means we need a lot of unnecessary
type guards to use this data type. the [simple
fix](https://github.com/pydantic/pydantic/discussions/4577) is to add
config to explicitly say all class properties are required. looks this
this will be resolved in a future pydantic release
- 3cd7319cfdb0f07c6bb12d62d7d02efe1ab12675 fix step callback and fast
latent generation on nodes. have this working in UI. depends on the
small change in #2957
2023-03-16 20:24:28 +11:00
67f8f222d9 fix(nodes): fix step_callback + fast latents generation
this depends on the small change in #2957
2023-03-16 20:03:08 +11:00
5347c12fed fix(nodes): fix schema gen for GraphExecutionState 2023-03-16 20:03:08 +11:00
b194180f76 feat(backend): make fast latents method static 2023-03-16 20:03:08 +11:00
fb30b7d17a feat(backend): add image_to_dataURL util 2023-03-16 20:03:08 +11:00
c341dcaa3d update compel to fix black screens and use new downweighting algorithm (#2961)
Update `compel` to 1.0.0.

This fixes #2832.

It also changes the way downweighting is applied. In particular,
downweighting should now be much better and more controllable.

From the [compel
changelog](https://github.com/damian0815/compel#changelog):

> Downweighting now works by applying an attention mask to remove the
downweighted tokens, rather than literally removing them from the
sequence. This behaviour is the default, but the old behaviour can be
re-enabled by passing `downweight_mode=DownweightMode.REMOVE` on init of
the `Compel` instance.
>
> Formerly, downweighting a token worked by both multiplying the
weighting of the token's embedding, and doing an inverse-weighted blend
with a copy of the token sequence that had the downweighted tokens
removed. The intuition is that as weight approaches zero, the tokens
being downweighted should be actually removed from the sequence.
However, removing the tokens resulted in the positioning of all
downstream tokens becoming messed up. The blend ended up blending a lot
more than just the tokens in question.
> 
> As of v1.0.0, taking advice from @keturn and @bonlime
(https://github.com/damian0815/compel/issues/7) the procedure is by
default different. Downweighting still involves a blend but what is
blended is a version of the token sequence with the downweighted tokens
masked out, rather than removed. This correctly preserves positioning
embeddings of the other tokens.
2023-03-16 17:49:47 +13:00
b695a2574b bump compel version 2023-03-16 01:55:39 +01:00
aa68a326c8 update compel 2023-03-15 23:05:55 +01:00
c2922d5991 add settingsmodal 2023-03-15 16:12:51 -04:00
85888030c3 more things needed for header 2023-03-15 14:38:22 -04:00
7cf59c1e60 Merge branch 'main' into main-text-fixup-PR 2023-03-16 04:43:22 +13:00
9738b0ff69 [nodes] Add Edge data type (#2958)
Adds an `Edge` data type, replacing the current tuple used for edges.
2023-03-15 18:41:56 +11:00
3021c78390 [nodes] Add Edge data type 2023-03-14 23:09:30 -07:00
6eeaf8d9fb Allow for dynamic header (#2955)
* Update root component to allow optional children that will render as
dynamic header of UI
* Export additional components (logo & themeChanger) for use in said
dynamic header (more to come here)
2023-03-15 07:41:24 +13:00
fa9afec0c2 fix npm deps 2023-03-14 14:15:03 -04:00
d6862bf8c1 fix npm deps 2023-03-14 14:14:16 -04:00
de01c38bbe fresh build 2023-03-14 14:11:42 -04:00
7e811908e0 remove 2023-03-14 14:09:16 -04:00
5f59f24f92 cleanup 2023-03-14 14:08:42 -04:00
e414fcf3fb bump version 2023-03-14 13:26:49 -04:00
079ad8f35a fix props 2023-03-14 13:22:57 -04:00
a4d7e0c78e export other components 2023-03-14 12:37:28 -04:00
e9c2f173c5 fix(inpaint): Seam painting being broken (#2952)
After #2942, seed needs to be passed down from inpaint to seam_paint.
Not doing so breaks inpainting and outpainting. This PR fixes it.
2023-03-15 00:38:26 +13:00
44f489d581 Merge branch 'main' into fix-seampaint 2023-03-14 06:19:25 -05:00
cb48bbd806 Removed file-extension-based arbitrary code execution attack vector (#2946)
# The Problem
Pickle files (.pkl, .ckpt, etc) are extremely unsafe as they can be
trivially crafted to execute arbitrary code when parsed using
`torch.load`
Right now the conventional wisdom among ML researchers and users is to
simply `not run untrusted pickle files ever` and instead only use
Safetensor files, which cannot be injected with arbitrary code. This is
very good advice.

Unfortunately, **I have discovered a vulnerability inside of InvokeAI
that allows an attacker to disguise a pickle file as a safetensor and
have the payload execute within InvokeAI.**

# How It Works
Within `model_manager.py` and `convert_ckpt_to_diffusers.py` there are
if-statements that decide which `load` method to use based on the file
extension of the model file. The logic (written in a slightly more
readable format than it exists in the codebase) is as follows:
```
if Path(file).suffix == '.safetensors':
   safetensor_load(file)
else:
   unsafe_pickle_load(file)
```

A malicious actor would only need to create an infected .ckpt file, and
then rename the extension to something that does not pass the `==
'.safetensors'` check, but still appears to a user to be a safetensors
file.
For example, this might be something like `.Safetensors`,
`.SAFETENSORS`, `SafeTensors`, etc.

InvokeAI will happily import the file in the Model Manager and execute
the payload.

# Proof of Concept
1. Create a malicious pickle file.
(https://gist.github.com/CodeZombie/27baa20710d976f45fb93928cbcfe368)
2. Rename the `.ckpt` extension to some variation of `.Safetensors`,
ensuring there is a capital letter anywhere in the extension (eg.
`malicious_pickle.SAFETENSORS`)
3. Import the 'model' like you would normally with any other safetensors
file with the Model Manager.
4. Upon trying to select the model in the web ui, it will be loaded (or
attempt to be converted to a Diffuser) with `torch.load` and the payload
will execute.


![image](https://user-images.githubusercontent.com/466103/224835490-4cf97ff3-41b3-4a31-85df-922cc99042d2.png)


# The Fix
This pull request changes the logic InvokeAI uses to decide which model
loader to use so that the safe behavior is the default. Instead of
loading as a pickle if the extension is not exactly `.safetensors`, it
will now **always** load as a safetensors file unless the extension is
**exactly** `.ckpt`.

# Notes:
I think support for pickle files should be totally dropped ASAP as a
matter of security, but I understand that there are reasons this would
be difficult.

In the meantime, I think `RestrictedUnpickler` or something similar
should be implemented as a replacement for `torch.load`, as this
significantly reduces the amount of Python methods that an attacker has
to work with when crafting malicious payloads
inside a pickle file. 
Automatic1111 already uses this with some success.
(https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/safe.py)
2023-03-15 00:09:17 +13:00
0a761d7c43 fix(inpaint): Seam painting being broken 2023-03-15 00:00:08 +13:00
a0f47aa72e Merge branch 'main' into main 2023-03-14 11:41:29 +01:00
f9abc6fc85 fix --png_compression command line argument (#2950)
- The value of png_compression was always 6, despite the value provided
to the --png_compression argument. This fixes the bug.
- It also fixes an inconsistency between the maximum range of
png_compression and the help text.

- Closes #2945
2023-03-14 18:20:17 +13:00
d840c597b5 fix --png_compression command line argument
- The value of png_compression was always 6, despite the value provided to the
  --png_compression argument. This fixes the bug.
- It also fixes an inconsistency between the maximum range of png_compression
  and the help text.

- Closes #2945
2023-03-14 00:24:05 -04:00
3ca654d256 speculative fix for alternative vaes 2023-03-13 23:27:29 -04:00
e0e01f6c50 Reduced Pickle ACE attack surface
Prior to this commit, all models would be loaded with the extremely unsafe `torch.load` method, except those with the exact extension `.safetensors`. Even a change in casing (eg. `saFetensors`, `Safetensors`, etc) would cause the file to be loaded with torch.load instead of the much safer `safetensors.toch.load_file`.
If a malicious actor renamed an infected `.ckpt` to something like `.SafeTensors` or `.SAFETENSORS` an unsuspecting user would think they are loading a safe .safetensor, but would in fact be parsing an unsafe pickle file, and executing an attacker's payload. This commit fixes this vulnerability by reversing the loading-method decision logic to only use the unsafe `torch.load` when the file extension is exactly `.ckpt`.
2023-03-13 16:16:30 -04:00
d9dab1b6c7 Update BUG_REPORT.yml 2023-03-13 11:17:38 -04:00
3b2ef6e1a8 Update BUG_REPORT.yml 2023-03-13 11:14:53 -04:00
c125a3871a Update BUG_REPORT.yml 2023-03-13 11:14:04 -04:00
0996bd5acf Merge branch 'main' into patch-1 2023-03-14 03:18:58 +13:00
ea77d557da add additional build mode (#2904)
*`yarn build:package` will build default component 
* moved some devDependencies to dependencies that are needed for
postinstall script
2023-03-14 03:15:51 +13:00
1b01161ea4 Merge branch 'main' into pr/2904 2023-03-14 03:14:35 +13:00
2230cb9562 chore(UI, accessibility): Icons. Header links & radio button (#2935)
# Overview
- Links should be parent of icon
- _Added style to link still so they still line up with sibling
components_
- Radio icon buttons
2023-03-14 03:13:19 +13:00
9e0c7c46a2 Merge branch 'main' into add-a-build-config 2023-03-13 09:58:17 -04:00
be305588d3 merged and rebuilt 2023-03-13 09:55:56 -04:00
9f994df814 Merge branch 'main' into chore/UI_more-accessibility-items 2023-03-14 02:49:47 +13:00
3062580006 Fix bug #2931 (#2942)
#2931 was caused by new code that held onto the PRNG in `get_make_image`
and used it in `make_image` for img2img and inpainting. This
functionality has been moved elsewhere so that we can generate multiple
images again.
2023-03-14 02:48:07 +13:00
596ba754b1 Removed seed from get_make_image. 2023-03-13 08:15:46 -05:00
b980e563b9 Fix bug #2931 2023-03-13 08:11:09 -05:00
7fe2606cb3 [nodes] Fixes calls into image to image and inpaint from nodes (#2940) 2023-03-13 19:05:32 +13:00
0c3b1fe3c4 [nodes] Fixes calls into image to image and inpaint from nodes 2023-03-12 22:12:42 -07:00
c9ee2e351c yarn build 2023-03-12 23:29:29 -05:00
e3aef20f42 chore(UI, accessibility): more items
- radio icon buttons
- links should be parent of icon
styled links to still line up with sibling components
2023-03-12 23:27:47 -05:00
60614badaf [nodes-api] Fix API generation to correctly reference outputs (#2939)
Correctly reference output types in node schemas
2023-03-13 17:02:55 +13:00
288cee9611 Merge remote-tracking branch 'origin/main' into feat/preview_predicted_x0
# Conflicts:
#	invokeai/app/invocations/generate.py
2023-03-12 20:56:02 -07:00
24aca37538 Just set output value in node schemas. Don't use additionalProperties, which would impact the schema. 2023-03-12 20:40:29 -07:00
b853ceea65 [nodes-api] Fix API generation to correctly reference outputs 2023-03-12 20:03:26 -07:00
3ee2798ede [fix] Get the model again if current model is empty 2023-03-12 22:26:11 -04:00
5c5106c14a Add keys when non EMA 2023-03-12 16:22:22 -05:00
c367b21c71 Fix issue #2932 2023-03-12 15:40:33 -05:00
2eef6df66a [ui]: add resizable pinnable drawer component (#2874)
wip

this is based off the branch in #2873
2023-03-12 22:46:48 +13:00
300aa8d86c chore(ui): build 2023-03-12 20:13:58 +11:00
727f1638d7 chore(ui): lint 2023-03-12 20:13:58 +11:00
ee6df5852a fix(ui): fix lightbox 2023-03-12 20:13:38 +11:00
90525b1c43 fix(ui): fix scrollable shadow 2023-03-12 20:13:38 +11:00
bbb95dbc5b fix(ui): add color mode watcher 2023-03-12 20:13:38 +11:00
f4b7f80d59 fix(ui): remove key prop 2023-03-12 20:13:38 +11:00
220f7373c8 feat(ui): Basic IAIOption Component & Fix Select Dropdown 2023-03-12 20:13:38 +11:00
4bb5785f29 fix(ui): Move Form Components to the correct folder 2023-03-12 20:13:38 +11:00
f9a7a7d161 fix(ui): set colorMode to fix native selects 2023-03-12 20:13:38 +11:00
de94c780d9 fix(ui): fix canvas status text bg 2023-03-12 20:13:38 +11:00
0b9230380c fix(ui): default gallery category buttons to icon 2023-03-12 20:13:38 +11:00
209a55b681 fix(ui): canvas rescale when toggle gallery 2023-03-12 20:13:38 +11:00
dc2f69f5d1 fix(ui): process buttons display on canvas beta 2023-03-12 20:13:38 +11:00
ad2f1b7b36 fix(ui): hack for hiding pinned panels 2023-03-12 20:13:38 +11:00
dd2d96a50f fix(ui): Bad styling on form elements 2023-03-12 20:13:38 +11:00
2bff28e305 fix(ui): Remove size limitation off the theme changer button 2023-03-12 20:13:38 +11:00
d68234d879 fix(ui): Gallery placeholder text not being centered 2023-03-12 20:13:38 +11:00
b3babf26a5 fix(ui): Fix current image buttons overflow 2023-03-12 20:13:38 +11:00
ecca0eff31 fix(ui): hotkey accordion spacing 2023-03-12 20:13:38 +11:00
28677f9621 fix(ui): process buttons display on canvas beta layout 2023-03-12 20:13:38 +11:00
caecfadf11 fix(ui): fix shadow 2023-03-12 20:13:38 +11:00
5cf8e3aa53 chore(ui): build 2023-03-12 20:13:38 +11:00
76cf2c61db feat(ui): drawer almost done
TODO:
- hide while pinned
- lightbox interaction with gallery
2023-03-12 20:13:38 +11:00
b4d976f2db fix(ui): fix flash of mini preview image
Restored the code that fixes this after having ripped it out thinking it didn't do anything. Spotted in #2915
2023-03-12 20:13:38 +11:00
777d127c74 feat(ui): wip drawer component and build 2023-03-12 20:13:38 +11:00
0678803803 lang(ui): update show canvas debug info string 2023-03-12 20:13:37 +11:00
d2fbc9f5e3 feat(ui): Add ThemeTypes & Move Grid Line Color 2023-03-12 20:13:37 +11:00
d81088dff7 feat(ui): wip resizable pinnable drawer
fix(ui): remove old scrollbar css

fix(ui): make guidepopover lazy

feat(ui): wip resizable drawer

feat(ui): wip resizable drawer

feat(ui): add scroll-linked shadow

feat(ui): organize files

Align Scrollbar next to content

Move resizable drawer underneath the progress bar

Add InvokeLogo to unpinned & align

Adds Invoke Logo to Unpinned Parameters panel and aligns to make it feel seamless.
2023-03-12 20:13:37 +11:00
1aaad9336f Remove image generation node dependencies on generate.py (#2902)
# Remove node dependencies on generate.py

This is a draft PR in which I am replacing `generate.py` with a cleaner,
more structured interface to the underlying image generation routines.
The basic code pattern to generate an image using the new API is this:

```
from invokeai.backend import ModelManager, Txt2Img, Img2Img

manager = ModelManager('/data/lstein/invokeai-main/configs/models.yaml')
model = manager.get_model('stable-diffusion-1.5')
txt2img = Txt2Img(model)
outputs = txt2img.generate(prompt='banana sushi', steps=12, scheduler='k_euler_a', iterations=5)

# generate() returns an iterator
for next_output in outputs:
    print(next_output.image, next_output.seed)

outputs = Img2Img(model).generate(prompt='strawberry` sushi', init_img='./banana_sushi.png')
output = next(outputs)
output.image.save('strawberries.png')
```

### model management

The `ModelManager` handles model selection and initialization. Its
`get_model()` method will return a `dict` with the following keys:
`model`, `model_name`,`hash`, `width`, and `height`, where `model` is
the actual StableDiffusionGeneratorPIpeline. If `get_model()` is called
without a model name, it will return whatever is defined as the default
in `models.yaml`, or the first entry if no default is designated.

### InvokeAIGenerator

The abstract base class `InvokeAIGenerator` is subclassed into into
`Txt2Img`, `Img2Img`, `Inpaint` and `Embiggen`. The constructor for
these classes takes the model dict returned by
`model_manager.get_model()` and optionally an
`InvokeAIGeneratorBasicParams` object, which encapsulates all the
parameters in common among `Txt2Img`, `Img2Img` etc. If you don't
provide the basic params, a reasonable set of defaults will be chosen.
Any of these parameters can be overridden at `generate()` time.

These classes are defined in `invokeai.backend.generator`, but they are
also exported by `invokeai.backend` as shown in the example below.

```
from invokeai.backend import InvokeAIGeneratorBasicParams, Img2Img
params = InvokeAIGeneratorBasicParams(
    perlin = 0.15
    steps = 30
   scheduler = 'k_lms'
)
img2img = Img2Img(model, params)
outputs = img2img.generate(scheduler='k_heun')
```

Note that we were able to override the basic params in the call to
`generate()`

The `generate()` method will returns an iterator over a series of
`InvokeAIGeneratorOutput` objects. These objects contain the PIL image,
the seed, the model name and hash, and attributes for all the parameters
used to generate the object (you can also get these as a dict). The
`iterations` argument controls how many objects will be returned,
defaulting to 1. Pass `None` to get an infinite iterator.

Given the proposed use of `compel` to generate a templated series of
prompts, I thought the API would benefit from a style that lets you loop
over the output results indefinitely. I did consider returning a single
`InvokeAIGeneratorOutput` object in the event that `iterations=1`, but I
think it's dangerous for a method to return different types of result
under different circumstances.

Changing the model is as easy as this:
```
model = manager.get_model('inkspot-2.0`)
txt2img = Txt2Img(model)
```

### Node and legacy support

With respect to `Nodes`, I have written `model_manager_initializer` and
`restoration_services` modules that return `model_manager` and
`restoration` services respectively. The latter is used by the face
reconstruction and upscaling nodes. There is no longer any reference to
`Generate` in the `app` tree.

I have confirmed that `txt2img` and `img2img` work in the nodes client.
I have not tested `embiggen` or `inpaint` yet. pytests are passing, with
some warnings that I don't think are related to what I did.

The legacy WebUI and CLI are still working off `Generate` (which has not
yet been removed from the source tree) and fully functional.

I've finished all the tasks on my TODO list:

- [x] Update the pytests, which are failing due to dangling references
to `generate`
- [x] Rewrite the `reconstruct.py` and `upscale.py` nodes to call
directly into the postprocessing modules rather than going through
`Generate`
- [x] Update the pytests, which are failing due to dangling references
to `generate`
2023-03-11 21:48:23 -05:00
1f3c024d9d Merge branch 'main' into refactor/nodes-on-generator 2023-03-11 21:31:42 -05:00
74a480f94e add back static web directory 2023-03-11 21:23:41 -05:00
c6e8d3269c build: exclude ui from test-invoke-pip (#2892)
Prior to the folder restructure, the `paths` for `test-invoke-pip` did
not include the UI's path `invokeai/frontend/`:

```yaml
    paths:
      - 'pyproject.toml'
      - 'ldm/**'
      - 'invokeai/backend/**'
      - 'invokeai/configs/**'
      - 'invokeai/frontend/dist/**'
```

After the restructure, more code was moved into the `invokeai/frontend/`
folder, and `paths` was updated:

```yaml
    paths:
      - 'pyproject.toml'
      - 'invokeai/**'
      - 'invokeai/backend/**'
      - 'invokeai/configs/**'
      - 'invokeai/frontend/web/dist/**'
```

Now, the second path includes the UI. The UI now needs to be excluded,
and must be excluded prior to `invokeai/frontend/web/dist/**` being
included.

On `test-invoke-pip-skip`, we need to do a bit of logic juggling to
invert the folder selection. First, include the web folder, then exclude
everying around it and finally exclude the `dist/` folder
2023-03-12 14:18:51 +13:00
dcb5a3a740 Merge branch 'main' into build/exclude-ui-actions 2023-03-12 14:18:03 +13:00
c0ef546b02 Merge branch 'refactor/nodes-on-generator' of github.com:invoke-ai/InvokeAI into refactor/nodes-on-generator 2023-03-11 18:31:47 -05:00
7a78a83651 raise operations-per-run for issue workflow to 500 (#2925)
- default value is 30
- limit per hour is 1000

This should help getting the count of open issues down.
2023-03-12 00:10:55 +01:00
10cbf99310 add TODO comments 2023-03-11 18:08:45 -05:00
b63aefcda9 Merge branch 'main' into refactor/nodes-on-generator 2023-03-11 16:22:29 -06:00
6a77634b34 remove unneeded generate initializer routines 2023-03-11 17:14:03 -05:00
8ca91b1774 add restoration services to nodes 2023-03-11 17:00:00 -05:00
1c9d9e79d5 raise operations-per-run to 500
- default value is 30
- limit per hour is 1000
2023-03-11 22:32:13 +01:00
3aa1ee1218 restore NSFW checker 2023-03-11 16:16:44 -05:00
06aa5a8120 Merge branch 'main' into feat/preview_predicted_x0 2023-03-11 14:50:30 -06:00
580f9ecded simplify passing of config options 2023-03-11 11:32:57 -05:00
270032670a build: exclude ui from test-invoke-pip 2023-03-12 03:27:49 +11:00
4f056cdb55 ui: translations update from weblate (#2922)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-03-12 03:18:23 +11:00
c14241436b move ModelManager initialization into its own module and restore embedding support 2023-03-11 10:56:53 -05:00
50b56d6088 translationBot(ui): update translation (Portuguese)
Currently translated at 99.2% (496 of 500 strings)

Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt/
Translation: InvokeAI/Web UI
2023-03-11 16:56:06 +01:00
8ec2ae7954 translationBot(ui): update translation (Russian)
Currently translated at 86.3% (416 of 482 strings)

Co-authored-by: Sergey Krashevich <svk@svk.su>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ru/
Translation: InvokeAI/Web UI
2023-03-11 16:56:05 +01:00
40d82b29cf translationBot(ui): update translation (Chinese (Traditional))
Currently translated at 7.0% (34 of 480 strings)

Co-authored-by: wa.code <adt107118@gm.ntcu.edu.tw>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/zh_Hant/
Translation: InvokeAI/Web UI
2023-03-11 16:56:05 +01:00
0b953d98f5 translationBot(ui): update translation (Portuguese (Brazil))
Currently translated at 98.1% (471 of 480 strings)

Co-authored-by: Felipe Nogueira <contato.fnog@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt_BR/
Translation: InvokeAI/Web UI
2023-03-11 16:56:04 +01:00
8833d76709 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (500 of 500 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (500 of 500 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (482 of 482 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (480 of 480 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-03-11 16:56:04 +01:00
027b316fd2 translationBot(ui): update translation (Spanish)
Currently translated at 100.0% (500 of 500 strings)

translationBot(ui): update translation (Spanish)

Currently translated at 100.0% (482 of 482 strings)

translationBot(ui): update translation (Spanish)

Currently translated at 100.0% (480 of 480 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/es/
Translation: InvokeAI/Web UI
2023-03-11 16:56:03 +01:00
d612f11c11 initialize InvokeAIGenerator object with model, not manager 2023-03-11 09:06:46 -05:00
250b0ab182 add seamless tiling support 2023-03-11 08:33:23 -05:00
675dd12b6c add attention map images to output object 2023-03-11 08:07:01 -05:00
7e76eea059 add embiggen, remove complicated constructor 2023-03-11 07:50:39 -05:00
f45483e519 Merge branch 'main' into feat/preview_predicted_x0 2023-03-10 22:25:26 -06:00
65047bf976 Chore/accessibility add all aria labels to translation (#2919)
# Overview
Setting up the `aria-label` props as translations
2023-03-11 16:16:02 +13:00
d586a82a53 yarn build 2023-03-10 20:54:59 -06:00
28709961e9 add import 2023-03-10 20:53:42 -06:00
e9f237f39d chore(accessibility): add all aria-labels 2023-03-10 20:49:16 -06:00
4156bfd810 Fixed snippet/code formatting
It was pasted as plain text, now it's a code fence.
2023-03-11 02:08:59 +01:00
fe75b95464 Merge branch 'refactor/nodes-on-generator' of github.com:invoke-ai/InvokeAI into refactor/nodes-on-generator 2023-03-10 19:36:40 -05:00
95954188b2 remove factory pattern
Factory pattern is now removed. Typical usage of the InvokeAIGenerator is now:

```
from invokeai.backend.generator import (
    InvokeAIGeneratorBasicParams,
    Txt2Img,
    Img2Img,
    Inpaint,
)
    params = InvokeAIGeneratorBasicParams(
        model_name = 'stable-diffusion-1.5',
        steps = 30,
        scheduler = 'k_lms',
        cfg_scale = 8.0,
        height = 640,
        width = 640
        )
    print ('=== TXT2IMG TEST ===')
    txt2img = Txt2Img(manager, params)
    outputs = txt2img.generate(prompt='banana sushi', iterations=2)

    for i in outputs:
        print(f'image={output.image}, seed={output.seed}, model={output.params.model_name}, hash={output.model_hash}, steps={output.params.steps}')
```

The `params` argument is optional, so if you wish to accept default
parameters and selectively override them, just do this:

```
    outputs = Txt2Img(manager).generate(prompt='banana sushi',
                                        steps=50,
					scheduler='k_heun',
					model_name='stable-diffusion-2.1'
					)
```
2023-03-10 19:33:04 -05:00
63f59201f8 Merge branch 'main' into feat/preview_predicted_x0 2023-03-10 12:34:07 -06:00
370e8281b3 Merge branch 'main' into refactor/nodes-on-generator 2023-03-10 12:34:00 -06:00
685df33584 fix bug that caused black images when converting ckpts to diffusers in RAM (#2914)
Cause of the problem was inadvertent activation of the safety checker.

When conversion occurs on disk, the safety checker is disabled during loading.
However, when converting in RAM, the safety checker was not removed, resulting
in it activating even when user specified --no-nsfw_checker.

This PR fixes the problem by detecting when the caller has requested the InvokeAi
StableDiffusionGeneratorPipeline class to be returned and setting safety checker
to None. Do not do this with diffusers models destined for disk because then they
will be incompatible with the merge script!!

Closes #2836
2023-03-10 18:11:32 +00:00
4332c9c7a6 add generic jsx type definition for default export 2023-03-10 12:14:49 -05:00
4a00f1cc74 Merge branch 'main' into feat/preview_predicted_x0 2023-03-10 09:20:01 -06:00
7ff77504cb Make sure command also works with Oh-my-zsh (#2905)
Many people use oh-my-zsh for their command line: https://ohmyz.sh/ 

Adding `""` should work both on ohmyzsh and native bash
2023-03-10 19:05:22 +13:00
0d1854e44a Merge branch 'main' into patch-1 2023-03-10 19:04:42 +13:00
fe6858f2d9 feat: use the predicted denoised image for previews
Some schedulers report not only the noisy latents at the current timestep,
but also their estimate so far of what the de-noised latents will be.

It makes for a more legible preview than the noisy latents do.
2023-03-09 20:28:06 -08:00
12c7db3a16 backend: more post-ldm-removal cleanup (#2911) 2023-03-09 23:11:10 -05:00
3ecdec02bf Merge branch 'main' into cleanup/more_ldm_cleanup 2023-03-09 22:49:09 -05:00
d6c24d59b0 Revert "Remove label from stale issues on comment event" (#2912)
Reverts invoke-ai/InvokeAI#2903

@mauwii has a point here. It looks like triggering on a comment results
in an action for each of the stale issues, even ones that have been
previously dealt with. I'd like to revert this back to the original
behavior of running once every time the cron job executes.

What's the original motivation for having more frequent labeling of the
issues?
2023-03-09 22:28:49 -05:00
bb3d1bb6cb Revert "Remove label from stale issues on comment event" 2023-03-09 22:24:43 -05:00
14c8738a71 fix dangling reference to _model_to_cpu and missing variable model_description 2023-03-09 21:41:45 -05:00
1a829bb998 pipeline: remove code for legacy model 2023-03-09 18:15:12 -08:00
9d339e94f2 backend..conditioning: remove code for legacy model 2023-03-09 18:15:12 -08:00
ad7b1fa6fb model_manager: model to/from CPU methods are implemented on the Pipeline 2023-03-09 18:15:12 -08:00
42355b70c2 fix(Pipeline.debug_latents): fix import for moved utility function 2023-03-09 18:15:12 -08:00
faa2558e2f chore: add new argument to overridden method to match new signature upstream 2023-03-09 18:15:12 -08:00
081397737b typo: docstring spelling fixes
looks like they've already been corrected in the upstream copy
2023-03-09 18:15:12 -08:00
55d36eaf4f fix: image_resized_to_grid_as_tensor: reconnect dropped multiple_of argument 2023-03-09 18:15:12 -08:00
26cd1728ac Fix some text and a link 2023-03-09 20:03:11 -06:00
a0065da4a4 Remove label from stale issues on comment event (#2903)
I found it to be a chore to remove labels manually in order to
"un-stale" issues. This is contrary to the bot message which says
commenting should remove "stale" status. On the current `cron` schedule,
there may be a delay of up to 24 hours before the label is removed. This
PR will trigger the workflow on issue comments in addition to the
schedule.

Also adds a condition to not run this job on PRs (Github treats issues
and PRs equivalently in this respect), and rewords the messages for
clarity.
2023-03-09 20:17:54 -05:00
c11e823ff3 remove unused _wrap_results 2023-03-09 16:30:06 -05:00
197e50a298 unstage some changes 2023-03-09 15:33:18 -05:00
507e12520e Make sure command also works with Oh-my-zsh
Many people use oh-my-zsh for their command line: https://ohmyz.sh/ 

Adding `""` should work both on ohmyzsh and native bash
2023-03-09 19:21:57 +01:00
2cc04de397 dont care about linting build 2023-03-09 11:46:20 -05:00
f4150a7829 add new build command for building package 2023-03-09 11:10:18 -05:00
5418bd3b24 (ci) unlabel stale issues when commented 2023-03-09 09:22:29 -05:00
76d5fa4694 Bypass the 77 token limit (#2896)
This ought to be working but i don't know how it's supposed to behave so
i haven't been able to verify. At least, I know the numbers are getting
pushed all the way to the SD unet, i just have been unable to verify if
what's coming out is what is expected. Please test.

You'll `need to pip install -e .` after switching to the branch, because
it's currently pulling from a non-main `compel` branch. Once it's
verified as working as intended i'll promote the compel branch to pypi.
2023-03-09 23:52:28 +13:00
386dda8233 Merge branch 'main' into feat_longer_prompts 2023-03-09 22:37:10 +13:00
8076c1697c Merge branch 'feat_longer_prompts' of github.com:damian0815/InvokeAI into feat_longer_prompts 2023-03-09 10:28:13 +01:00
65fc9a6e0e bump compel version to address issues 2023-03-09 10:28:07 +01:00
cde0b6ae8d Merge branch 'main' into refactor/nodes-on-generator 2023-03-09 01:52:45 -05:00
b12760b976 [ui] chore(Accessibility): various additions (#2888)
# Overview
Adding a few accessibility items (I think 9 total items). Mostly
`aria-label`, but also a `<VisuallyHidden>` to the left-side nav tab
icons. Tried to match existing copy that was being used. Feedback
welcome
2023-03-09 19:14:42 +13:00
b679a6ba37 model manager defaults to consistent values of device and precision 2023-03-09 01:09:54 -05:00
2f5f08c35d yarn build 2023-03-08 23:51:46 -06:00
8f48c14ed4 Merge branch 'main' into chore/accessability_various-additions 2023-03-08 23:49:08 -06:00
5d37fa6e36 node-based txt2img working without generate 2023-03-09 00:18:29 -05:00
f51581bd1b Merge branch 'main' into feat_longer_prompts 2023-03-08 23:08:49 -06:00
50ca6b6ffc add back pytorch-lightning dependency (#2899)
- Closes #2893
2023-03-09 17:22:17 +13:00
63b9ec4c5e Merge branch 'main' into bugfix/restore-pytorch-lightning 2023-03-09 16:57:14 +13:00
b115bc4247 [cli] Execute commands in-order with nodes (#2901)
Executes piped commands in the order they were provided (instead of
executing CLI commands immediately).
2023-03-09 16:55:23 +13:00
dadc30f795 Merge branch 'main' into bugfix/restore-pytorch-lightning 2023-03-09 16:46:08 +13:00
111d8391e2 Merge branch 'main' into kyle0654/cli_execution_order 2023-03-09 16:37:15 +13:00
1157b454b2 decouple default component from react root (#2897)
Decouple default component from react root
2023-03-09 16:34:47 +13:00
8a6473610b [cli] Execute commands in-order with nodes 2023-03-08 19:25:03 -08:00
ea7911be89 Merge branch 'main' into chore/accessability_various-additions 2023-03-08 17:15:28 -06:00
9ee648e0c3 Merge branch 'main' into feat_longer_prompts 2023-03-09 00:13:01 +01:00
543682fd3b Merge branch 'feat_longer_prompts' of github.com:damian0815/InvokeAI into feat_longer_prompts 2023-03-08 23:24:41 +01:00
88cb63e4a1 pin new compel version 2023-03-08 23:24:30 +01:00
76212d1cca Merge branch 'main' into bugfix/restore-pytorch-lightning 2023-03-08 17:05:11 -05:00
a8df9e5122 Merge branch 'main' into decouple-component-from-root 2023-03-08 16:58:34 -05:00
2db180d909 Make img2img strength 1 behave the same as txt2img (#2895)
* Fix img2img and inpainting code so a strength of 1 behaves the same as txt2img.

* Make generated images identical to their txt2img counterparts when strength is 1.
2023-03-08 22:50:16 +01:00
b716fe8f06 add pytorch-lightning dependency back in
- Closes #2893
2023-03-08 16:48:39 -05:00
69e2dc0404 update for compel changes 2023-03-08 20:45:01 +01:00
a38b75572f don't log excess tokens as truncated 2023-03-08 20:00:18 +01:00
e18de761b6 Merge branch 'main' into decouple-component-from-root 2023-03-08 13:13:43 -05:00
816ea39827 decouple default component from react root 2023-03-08 12:48:49 -05:00
1cd4cdd0e5 Merge branch 'main' into tests 2023-03-08 12:19:04 -05:00
768e969c90 cleanup and fix kwarg 2023-03-08 18:00:54 +01:00
57db66634d longer prompts wip 2023-03-08 14:25:48 +01:00
87789c1de8 add InvokeAIGenerator and InvokeAIGeneratorFactory classes 2023-03-07 23:52:53 -05:00
c3c1511ec6 add accessibility to localization
only set fallback english values
implement on ModelSelect and ProgressBar
2023-03-07 21:30:51 -06:00
6b41127421 Merge branch 'main' into chore/accessability_various-additions 2023-03-07 17:44:55 -06:00
d232a439f7 build: update actions (#2883)
- Updates triggers for UI workflow `lint-frontend`
- Corrects UI paths for `test-invoke-pip` and `test-invoke-pip-skip`
2023-03-08 11:51:32 +13:00
c04f21e83e Merge branch 'main' into build/update-actions 2023-03-08 11:50:50 +13:00
8762069b37 ui: update readme & scripts (#2884)
- Update ui readme
- Update scripts to use `yarn` instead of `npm` and use `concurrently`
to watch/build the theme token types along with SPA
2023-03-08 00:20:46 +13:00
d9ebdd2684 build(ui): use concurrently to run dev 2023-03-07 21:58:46 +11:00
3e4c10ef9c docs(ui): update readme 2023-03-07 21:58:42 +11:00
17eb2ca5a2 build: update actions
- Updates triggers for UI workflow `lint-frontend`
- Corrects UI paths for `test-invoke-pip` and `test-invoke-pip-skip`
2023-03-07 21:25:43 +11:00
63725d7534 add .pytest.ini to .gitignore 2023-03-07 09:08:27 +00:00
00f30ea457 Merge branch 'main' into tests 2023-03-07 09:03:18 +00:00
1b2a3c7144 ui: translations update from weblate (#2882)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-03-07 21:51:09 +13:00
01a1777370 translationBot(ui): update translation (Chinese (Traditional))
Currently translated at 4.1% (20 of 480 strings)

translationBot(ui): update translation (Portuguese (Brazil))

Currently translated at 97.2% (467 of 480 strings)

translationBot(ui): update translation (Dutch)

Currently translated at 97.2% (467 of 480 strings)

translationBot(ui): update translation (French)

Currently translated at 83.1% (399 of 480 strings)

Co-authored-by: psychedelicious <mabianfu@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/fr/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/nl/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/zh_Hant/
Translation: InvokeAI/Web UI
2023-03-07 09:09:42 +01:00
32945c7f45 translationBot(ui): update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/
Translation: InvokeAI/Web UI
2023-03-07 09:09:42 +01:00
b0b8846430 Add aria-label to icon variant of IAISimpleMenu
Uses whatever the iconTooltip copy is
2023-03-06 22:43:41 -06:00
fdb146a43a add aria-label to UnifiedCanvasLayerSelect
matching tooltip copy
2023-03-06 22:42:39 -06:00
42c1f1fc9d add VisuallyHidden tab text to InvokeTabs 2023-03-06 22:42:04 -06:00
89a8ef86b5 add an aria-label to ProgressBar 2023-03-06 22:41:45 -06:00
f0fb767f57 add aria-label to ModelSelect 2023-03-06 22:39:08 -06:00
4bd93464bf [cli] Update CLI to define commands as Pydantic objects (#2861)
Updates the CLI to define CLI commands as Pydantic objects, similar to
how Invocations (nodes) work. For example:

```py
class HelpCommand(BaseCommand):
    """Shows help"""
    type: Literal['help'] = 'help'

    def run(self, context: CliContext) -> None:
        context.parser.print_help()
```
2023-03-07 13:25:06 +13:00
3d3de82ca9 Merge branch 'main' into kyle/cli_commands 2023-03-07 12:56:30 +13:00
c3ff9e6be8 Fixed startup issues with the web UI. (#2876) 2023-03-06 18:29:28 -05:00
21f79e5919 add missing package (#2878)
Added missing dependency declaration `@chakra-ui/styled-system`
2023-03-07 10:34:50 +13:00
0342e25c74 add missing package 2023-03-06 16:13:17 -05:00
91f982fb0b feat(ui): migrate theming to chakra ui (#2873)
*looks like this #2814 was reverted accidentally. instead of trying to
revert the revert, this PR can simply be re-accepted and will fix the
ui.*

- Migrate UI from SCSS to Chakra's CSS-in-JS system 
  - better dx
  - more capable theming 
  - full RTL language support (we now have Arabic and Hebrew)
  - general cleanup of the whole UI's styling
- Tidy npm packages and update scripts, necessitates update to github
actions

To test this PR in dev mode, you will need to do a `yarn install` as a
lot has changed.

thanks to @blessedcoolant for helping out on this, it was a big effort.
2023-03-07 08:43:26 +13:00
b9ab43a4bb build(ui): clean build chakra migration 2023-03-07 08:39:44 +13:00
6e0e48bf8a Merge branch 'main' into pr/2873 2023-03-07 08:36:09 +13:00
dcc8313dbf support both epsilon and v-prediction v2 inference (#2870)
There are actually two Stable Diffusion v2 legacy checkpoint
configurations:

1. "epsilon" prediction type for Stable Diffusion v2 Base 
2. "v-prediction" type for Stable Diffusion v2-768

This commit adds the configuration file needed for epsilon prediction
type models as well as the UI that prompts the user to select the
appropriate configuration file when the code can't do so automatically.
2023-03-06 14:29:35 -05:00
bf5831faa3 Merge branch 'main' into kyle/cli_commands 2023-03-06 08:52:38 -05:00
5eff035f55 Merge branch 'main' into tests 2023-03-06 08:37:07 -05:00
7c60068388 Merge branch 'main' into bugfix/fix-convert-sd-to-diffusers-error 2023-03-06 08:20:29 -05:00
d843fb078a feat(ui): remove references to dark mode 2023-03-06 20:40:59 +11:00
41b2e4633f chore(ui): remove unused scss files 2023-03-06 20:06:23 +11:00
57144ac0cf feat(ui): migrate theming to chakra ui 2023-03-06 20:03:39 +11:00
a305b6adbf fix call signature of import_diffuser_model() (#2871)
This fixes the borked #2867 PR.
2023-03-05 23:58:08 -05:00
94daaa4abf fix call signature of import_diffuser_model() 2023-03-05 23:37:59 -05:00
901337186d add .git-blame-ignore-revs file to maintain provenance (#2855)
To avoid `git blame` recording all the autoformatting changes under the
name 'lstein', this PR adds a `.git-blame-ignore-revs` that will ignore
any provenance changes that occurred during the recent refactor merge.
2023-03-05 22:58:34 -05:00
7e2f64f60b Merge branch 'main' into refactor/maintain-blame-provenance 2023-03-05 22:57:50 -05:00
126cba2324 Bugfix/reenable ckpt conversion to ram (#2868)
This fixes the crash that was occurring when trying to load a legacy
checkpoint file.

Note that this PR includes commits from #2867 to avoid diffusers files
from re-downloading at startup time.
2023-03-05 22:57:19 -05:00
2f9dcd7906 support both epsilon and v-prediction v2 inference
There are actually two Stable Diffusion v2 legacy checkpoint
configurations:

1) "epsilon" prediction type for Stable Diffusion v2 Base
2) "v-prediction" type for Stable Diffusion v2-768

This commit adds the configuration file needed for epsilon prediction
type models as well as the UI that prompts the user to select the
appropriate configuration file when the code can't do so
automatically.
2023-03-05 22:51:40 -05:00
e537b5d8e1 Revert "Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram"
This reverts commit e0e70c9222, reversing
changes made to 0b184913b9.
2023-03-06 14:29:39 +13:00
e0e70c9222 Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram 2023-03-06 14:27:30 +13:00
1b21e5df54 Migrate to new HF diffusers cache location (#2867)
# Migrate to new HF diffusers cache location

This PR adjusts the model cache directory to use the layout of
`diffusers 0.14`. This will automatically migrate any diffusers models
located in `INVOKEAI_ROOT/models/diffusers` to
`INVOKEAI_ROOT/models/hub`, and cache new downloaded diffusers files
into the same location.

As before, if environment variable `HF_HOME` is set, then both
HuggingFace `from_pretrained()` calls as well as all InvokeAI methods
will use `HF_HOME/hub` as their cache.
2023-03-06 13:05:13 +13:00
4b76af37ae Merge branch 'main' into enhance/use-new-diffusers-path 2023-03-06 12:42:30 +13:00
486c445afb fix typos and replace frontend REAMDE content 2023-03-05 21:05:09 +00:00
4547c48013 add docs for local development including tests 2023-03-05 19:59:06 +00:00
8f21201c91 [ui]: migrate all styling to chakra-ui theme (#2814)
- Migrate UI from SCSS to Chakra's CSS-in-JS system 
  - better dx
  - more capable theming 
  - full RTL language support (we now have Arabic and Hebrew)
  - general cleanup of the whole UI's styling
- Tidy npm packages and update scripts, necessitates update to github
actions

To test this PR in dev mode, you will need to do a `yarn install` as a
lot has changed.

thanks to @blessedcoolant for helping out on this, it was a big effort.
2023-03-06 07:23:59 +13:00
532b74a206 Merge branch 'main' into feat/ui/chakra-theme 2023-03-06 06:54:33 +13:00
0b184913b9 Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram 2023-03-05 12:37:43 -05:00
97719e40e4 fix Dockerfile after restructure (#2863)
this PR should close #2862
2023-03-05 18:33:00 +01:00
5ad3062b66 Merge branch 'main' into fix/broken-dockerfile-2862 2023-03-05 12:32:25 -05:00
92d012a92d Merge branch 'main' into enhance/use-new-diffusers-path 2023-03-05 12:30:24 -05:00
fc187f263e deal with non-directories in diffusers/ 2023-03-05 12:29:52 -05:00
fd94f85abe remove legacy ldm code (#2866)
This removes modules that appear to be no longer used by any code under
the `invokeai` package now that the `ckpt_generator` is gone.

There are a few small changes in here to code that was referencing code
in a conditional branch for ckpt, or to swap out a  function for a
🤗 one, but only as much was strictly necessary to get things to
run. We'll follow with more clean-up to get lingering `if isinstance` or
`except AttributeError` branches later.
2023-03-05 12:10:38 -05:00
4e9e1b660d respect HF_HOME setting when migrating 2023-03-05 12:08:29 -05:00
d01adedff5 give user chance to back out before migration 2023-03-05 12:04:31 -05:00
c247f430f7 combine pytest.ini with pyproject.toml 2023-03-05 17:00:08 +00:00
3d6a358042 remove .coveragerc from source contrl 2023-03-05 16:59:12 +00:00
4d1dcd11de Merge branch 'main' into dev/rm_legacy_deps 2023-03-05 11:50:53 -05:00
b33655b0d6 restore automatic conversion of legacy files to diffusers pipelines 2023-03-05 11:45:25 -05:00
81dee04dc9 during migration do not overwrite symlinks 2023-03-05 08:40:12 -05:00
114018e3e6 Unified spelling of Hugging Face 2023-03-05 07:30:35 -06:00
ef8cf83b28 migrate to new HF diffusers cache location 2023-03-05 08:20:24 -05:00
633857b0e3 build(ui): Migrate UI to Chakra 2023-03-05 21:50:50 +13:00
214574d11f Merge branch 'feat/ui/chakra-theme' of https://github.com/psychedelicious/InvokeAI into pr/2814 2023-03-05 21:48:08 +13:00
8584665ade feat(ui): migrate theming to chakra 2023-03-05 19:41:57 +11:00
516c56d0c5 feat(ui): Model Manager Cleanup 2023-03-05 21:41:55 +13:00
5891b43ce2 Merge branch 'feat/ui/chakra-theme' of https://github.com/psychedelicious/InvokeAI into pr/2814 2023-03-05 21:41:12 +13:00
62e75f95aa feat(ui): migrate theming to chakra 2023-03-05 19:39:51 +11:00
b07621e27e chore(ui): build frontend 2023-03-05 19:30:28 +11:00
545d8968fd feat(ui): migrated theming to chakra
build(ui): fix husky path

build(ui): fix hmr issue, remove emotion cache

build(ui): clean up package.json

build(ui): update gh action and npm scripts

feat(ui): wip port lightbox to chakra theme

feat(ui): wip use chakra theme tokens

feat(ui): Add status text to main loading spinner

feat(ui): wip chakra theme tweaking

feat(ui): simply iaisimplemenu button

feat(ui): wip chakra theming

feat(ui): Theme Management

feat(ui): Add Ocean Blue Theme

feat(ui): wip lightbox

fix(ui): fix lightbox mouse

feat(ui): set default theme variants

feat(ui): model manager chakra theme

chore(ui): lint

feat(ui): remove last scss

feat(ui): fix switch theme

feat(ui): Theme Cleanup

feat(ui): Stylize Search Models Found List

feat(ui): hide scrollbars

feat(ui): fix floating button position

feat(ui): Scrollbar Styling

fix broken scripts

This PR fixes the following scripts:

1) Scripts that can be executed within the repo's scripts directory.
   Note that these are for development testing and are not intended
   to be exposed to the user.

   configure_invokeai.py - configuration
   dream.py              - the legacy CLI
   images2prompt.py      - legacy "dream prompt" retriever
   invoke-new.py         - new nodes-based CLI
   invoke.py             - the legacy CLI under another name
   make_models_markdown_table.py - a utility used during the release/doc process
   pypi_helper.py        - another utility used during the release process
   sd-metadata.py        - retrieve JSON-formatted metadata from a PNG file

2) Scripts that are installed by pip install. They get placed into the venv's
   PATH and are intended to be the official entry points:

   invokeai-node-cli      - new nodes-based CLI
   invokeai-node-web      - new nodes-based web server
   invokeai               - legacy CLI
   invokeai-configure     - install time configuration script
   invokeai-merge         - model merging script
   invokeai-ti            - textual inversion script
   invokeai-model-install - model installer
   invokeai-update        - update script
   invokeai-metadata"     - retrieve JSON-formatted metadata from PNG files

protect invocations against black autoformatting

deps: upgrade to diffusers 0.14, safetensors 0.3, transformers 4.26, accelerate 0.16
2023-03-05 19:30:02 +11:00
7cf2f58513 deps: upgrade to diffusers 0.14, safetensors 0.3, transformers 4.26, accelerate 0.16 (#2865)
Things to check for in this version:

- `diffusers` cache location is now more consistent with other
huggingface-hub using code (i.e. `transformers`) as of
https://github.com/huggingface/diffusers/pull/2005. I think ultimately
this should make @damian0815 (and other folks with multiple
diffusers-using projects) happier, but it's worth taking a look to make
sure the way @lstein set things up to respect `HF_HOME` is still
functioning as intended.
- I've gone ahead and updated `transformers` to the current version
(4.26), but I have a vague memory that we were holding it back at some
point? Need to look that up and see if that's the case and why.
2023-03-05 01:53:01 -05:00
618e3e5e91 deps: add explicitly dependency to rich
was previously pulled in as a secondary dependency of something else.
2023-03-04 18:37:39 -08:00
c703b60986 remove legacy ldm code 2023-03-04 18:16:59 -08:00
7c0ce5c282 fix push expression
- make use of `github.ref_type`
2023-03-05 02:58:13 +01:00
82fe34b1f7 update build-container workflow
- switch versioning from semver to pep440
- remove unecesarry paths
- include `.dockerignore` in paths
2023-03-05 02:13:57 +01:00
65f9aae81d deps: upgrade to diffusers 0.14, safetensors 0.3, transformers 4.26, accelerate 0.16 2023-03-04 16:32:16 -08:00
2d9fac23e7 fix Dockerfile
- update broken paths after restructure
2023-03-04 23:51:07 +01:00
ebc4b52f41 [cli] Update CLI to define commands as Pydantic objects 2023-03-04 14:46:02 -08:00
c4e6d4b348 fix broken scripts (#2857)
This PR fixes the following scripts:

1) Scripts that can be executed within the repo's scripts directory.
   Note that these are for development testing and are not intended
   to be exposed to the user.
```
   configure_invokeai.py - configuration
   dream.py              - the legacy CLI
   images2prompt.py      - legacy "dream prompt" retriever
   invoke-new.py         - new nodes-based CLI
   invoke.py             - the legacy CLI under another name
   make_models_markdown_table.py - a utility used during the release/doc process
   pypi_helper.py        - another utility used during the release process
   sd-metadata.py        - retrieve JSON-formatted metadata from a PNG file
```

2) Scripts that are installed by pip install. They get placed into the
venv's
   PATH and are intended to be the official entry points:
```
   invokeai-node-cli      - new nodes-based CLI
   invokeai-node-web      - new nodes-based web server
   invokeai               - legacy CLI
   invokeai-configure     - install time configuration script
   invokeai-merge         - model merging script
   invokeai-ti            - textual inversion script
   invokeai-model-install - model installer
   invokeai-update        - update script
   invokeai-metadata"     - retrieve JSON-formatted metadata from PNG files
```
2023-03-04 16:57:45 -05:00
eab32bce6c Merge branch 'main' into bugfix/fix-scripts 2023-03-04 13:19:02 -06:00
55d2094094 Protect invocations against black autoformatting (#2854)
This places `#fmt: off` and `#fmt: on` blocks around sections of the
invocation code that shouldn't be reformatted by Black.
2023-03-04 12:26:43 -05:00
a0d50a2b23 Merge branch 'main' into formatting/undo-black-formatting-of-invocations 2023-03-04 12:05:11 -05:00
9efeb1b2ec Merge branch 'main' into bugfix/fix-scripts 2023-03-03 20:36:29 -06:00
86e2cb0428 Fix for txt2img2img.py (#2856)
Fix error when using txt2img 
ModuleNotFoundError: No module named 'invokeai.backend.models'
and
ModuleNotFoundError: No module named
'invokeai.backend.generator.diffusers_pipeline'
2023-03-04 15:24:39 +13:00
53c2c0f91d Update txt2img2img.py 2023-03-04 12:58:33 +11:00
bdc7b8b75a fix broken scripts
This PR fixes the following scripts:

1) Scripts that can be executed within the repo's scripts directory.
   Note that these are for development testing and are not intended
   to be exposed to the user.

   configure_invokeai.py - configuration
   dream.py              - the legacy CLI
   images2prompt.py      - legacy "dream prompt" retriever
   invoke-new.py         - new nodes-based CLI
   invoke.py             - the legacy CLI under another name
   make_models_markdown_table.py - a utility used during the release/doc process
   pypi_helper.py        - another utility used during the release process
   sd-metadata.py        - retrieve JSON-formatted metadata from a PNG file

2) Scripts that are installed by pip install. They get placed into the venv's
   PATH and are intended to be the official entry points:

   invokeai-node-cli      - new nodes-based CLI
   invokeai-node-web      - new nodes-based web server
   invokeai               - legacy CLI
   invokeai-configure     - install time configuration script
   invokeai-merge         - model merging script
   invokeai-ti            - textual inversion script
   invokeai-model-install - model installer
   invokeai-update        - update script
   invokeai-metadata"     - retrieve JSON-formatted metadata from PNG files
2023-03-03 20:19:37 -05:00
1bfdd54810 Update txt2img2img.py 2023-03-04 11:23:21 +11:00
b4bf6c12a5 add .git-blame-ignore-revs file to maintain provenance
To avoid `git blame` recording all the autoformatting changes
under the name 'lstein', this PR adds a `.git-blame-ignore-revs`
that will ignore any provenance changes that occurred during the
recent refactor merge.
2023-03-03 16:23:48 -05:00
ab35c241c2 protect invocations against black autoformatting 2023-03-03 15:25:08 -05:00
b3dccfaeb6 Final phase of source tree restructure (#2833)
# All python code has been moved under `invokeai`. All vestiges of `ldm`
and `ldm.invoke` are now gone.

***You will need to run `pip install -e .` before the code will work
again!***

Everything seems to be functional, but extensive testing is advised.

A guide to where the files have gone is forthcoming.
2023-03-03 15:05:41 -05:00
6477e31c1e revert and disable auto-formatting of invocations 2023-03-03 14:59:17 -05:00
dd4a1c998b merge localisation files that were added in main 2023-03-03 14:47:01 -05:00
70203e6e5a CODEOWNERS coarse draft 2023-03-03 14:36:43 -05:00
d778a7c5ca ui: translations update from weblate (#2850)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-03-03 20:07:34 +11:00
f8e59636cd translationBot(ui): update translation (Korean)
Currently translated at 15.5% (73 of 469 strings)

translationBot(ui): added translation (Korean)

Co-authored-by: LemonDouble <lemondouble2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ko/
Translation: InvokeAI/Web UI
2023-03-03 10:06:13 +01:00
2d1a0b0a05 translationBot(ui): update translation (Portuguese)
Currently translated at 12.7% (60 of 469 strings)

Co-authored-by: Airton Silva <airtonsilva2009@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt/
Translation: InvokeAI/Web UI
2023-03-03 10:06:13 +01:00
c9b2234d90 translationBot(ui): update translation (Dutch)
Currently translated at 100.0% (469 of 469 strings)

Co-authored-by: Dennis <dennis@vanzoerlandt.nl>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/nl/
Translation: InvokeAI/Web UI
2023-03-03 10:06:12 +01:00
82b224539b translationBot(ui): update translation (Hebrew)
Currently translated at 100.0% (469 of 469 strings)

translationBot(ui): added translation (Hebrew)

Co-authored-by: Netz <pixi@pixelabs.net>
Co-authored-by: Netzer R <pixi@pixelabs.net>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/he/
Translation: InvokeAI/Web UI
2023-03-03 10:06:12 +01:00
0b15ffb95b translationBot(ui): update translation (Portuguese)
Currently translated at 12.5% (59 of 469 strings)

translationBot(ui): added translation (Portuguese)

Co-authored-by: Gabriel Mackievicz Telles <telles.gabriel@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt/
Translation: InvokeAI/Web UI
2023-03-03 10:06:11 +01:00
ce9aaab22f translationBot(ui): added translation (Chinese (Traditional))
Co-authored-by: psychedelicious <mabianfu@icloud.com>
2023-03-03 10:06:11 +01:00
3f53f1186d move diagnostic message to stderr; was confusing CI 2023-03-03 01:54:48 -05:00
c0aff396d2 fix ldm->invokeai pathnames in workflows 2023-03-03 01:44:55 -05:00
955900507f fix issue with invokeai.version 2023-03-03 01:34:38 -05:00
d606abc544 fix weblint call 2023-03-03 01:09:56 -05:00
44400d2a66 fix incorrect import of merge code 2023-03-03 01:07:31 -05:00
60a98cacef all vestiges of ldm.invoke removed 2023-03-03 01:02:00 -05:00
6a990565ff all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
3f0b0f3250 almost all of backend migrated; restoration next 2023-03-02 13:28:17 -05:00
1a7371ea17 remove unused embeddings code 2023-03-01 21:09:22 -05:00
850d1ee984 move models and modules under invokeai/backend/ldm 2023-03-01 18:24:18 -05:00
2c7928b163 remove pycaches from repo 2023-02-28 23:25:35 -05:00
87d1ec6a4c Merge branch 'main' into refactor/move-models-and-generators 2023-02-28 17:34:05 -05:00
53c62537f7 fix newlines causing negative prompt to be parsed incorrectly (#2837)
closes #2753
2023-02-28 17:29:46 -05:00
418d93fdfd fix newlines causing negative prompt to be parsed incorrectly 2023-02-28 22:37:28 +01:00
f2ce2f1778 fix import of moved model_manager module 2023-02-28 08:38:14 -05:00
5b6c61fc75 move models and generator into backend 2023-02-28 08:32:11 -05:00
1d77581d96 restore behavior of !import_model; fix initial models bug 2023-02-28 00:45:56 -05:00
3b921cf393 add more missing files 2023-02-28 00:37:13 -05:00
d334f7f1f6 add missing files 2023-02-28 00:31:15 -05:00
8c9764476c first phase of source tree restructure
This is the first phase of a big shifting of files and directories
in the source tree.

You will need to run `pip install -e .` before the code will work again!

Here's what's in the current commit:

1) Remove a lot of dead code that dealt with checkpoint and safetensor loading.
2) Entire ckpt_generator hierarchy is now gone!
3) ldm.invoke.generator.*   => invokeai.generator.*
4) ldm.model.*              => invokeai.model.*
5) ldm.invoke.model_manager => invokeai.model.model_manager

6) In addition, a number of frequently-accessed classes can be imported
   from the invokeai.model and invokeai.generator modules:

   from invokeai.generator import ( Generator, PipelineIntermediateState,
                                    StableDiffusionGeneratorPipeline, infill_methods)

   from invokeai.models import ( ModelManager, SDLegacyType
                                 InvokeAIDiffuserComponent, AttentionMapSaver,
                                 DDIMSampler, KSampler, PLMSSampler,
                                 PostprocessingSettings )
2023-02-27 23:52:46 -05:00
b7d5a3e0b5 [nodes] Add better error handling to processor and CLI (#2828)
* [nodes] Add better error handling to processor and CLI

* [nodes] Use more explicit name for marking node execution error

* [nodes] Update the processor call to error
2023-02-27 10:01:07 -08:00
e0405031a7 add a workflow to close stale issues (#2808)
with values set as discussed in discord
2023-02-26 16:14:42 -05:00
ee24b686b3 Merge branch 'main' into dev/ci/add-close-inactive-issues 2023-02-26 16:14:03 -05:00
835eb14c79 Split requirements / pyproject installation in Dockerfile (#2815)
This should make caching way easier and therefore speed up the image
(re-)creation a lot.

Other small improvements:
- reorder .dockerignore
- rename amd flavor to rocm to align with cuda flavor
- use `user:group` for definitions
- add `--platform=${TARGETPLATFORM}` to base
2023-02-26 13:48:32 -05:00
9aadf7abc1 Merge branch 'main' into dev/ci/add-close-inactive-issues 2023-02-26 13:13:42 -05:00
243f9e8377 Merge branch 'main' into dev/docker/separate-req-inst 2023-02-26 13:13:07 -05:00
6e0c6d9cc9 perf(invoke_ai_web_server): encode intermediate result previews as jpeg (#2817)
For size savings of about 80%, and jpeg encoding is still plenty fast.
2023-02-26 18:47:51 +13:00
a3076cf951 perf(invoke_ai_web_server): encode intermediate result previews as jpeg
For size savings of about 80%, and jpeg encoding is still plenty fast.
2023-02-25 21:23:25 -08:00
6696882c71 doc(invoke_ai_web_server): put docstrings inside their functions (#2816)
Documentation strings are the first thing inside the function body.
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
2023-02-26 18:20:10 +13:00
17b039e85d doc(invoke_ai_web_server): put docstrings inside their functions
Documentation strings are the first thing inside the function body.
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
2023-02-25 20:21:47 -08:00
81539e6ab4 Merge remote-tracking branch 'upstream/main' into dev/docker/separate-req-inst 2023-02-26 00:55:03 +01:00
92304b9f8a remove pip-tools, still split requirements install
- also use user:group for definitions
- add `--platform=${TARGETPLATFORM}` to base
2023-02-26 00:53:43 +01:00
ec1de5ae8b more detailed volume parameters 2023-02-26 00:51:30 +01:00
49198a61ef enable BuildKit in env.sh 2023-02-26 00:50:13 +01:00
c22d529528 Add node-based invocation system (#1650)
This PR adds the core of the node-based invocation system first
discussed in https://github.com/invoke-ai/InvokeAI/discussions/597 and
implements it through a basic CLI and API. This supersedes #1047, which
was too far behind to rebase.

## Architecture

### Invocations
The core of the new system is **invocations**, found in
`/ldm/invoke/app/invocations`. These represent individual nodes of
execution, each with inputs and outputs. Core invocations are already
implemented (`txt2img`, `img2img`, `upscale`, `face_restore`) as well as
a debug invocation (`show_image`). To implement a new invocation, all
that is required is to add a new implementation in this folder (there is
a markdown document describing the specifics, though it is slightly
out-of-date).

### Sessions
Invocations and links between them are maintained in a **session**.
These can be queued for invocation (either the next ready node, or all
nodes). Some notes:
* Sessions may be added to at any time (including after invocation), but
may not be modified.
* Links are always added with a node, and are always links from existing
nodes to the new node. These links can be relative "history" links, e.g.
`-1` to link from a previously executed node, and can link either
specific outputs, or can opportunistically link all matching outputs by
name and type by using `*`.
* There are no iteration/looping constructs. Most needs for this could
be solved by either duplicating nodes or cloning sessions. This is open
for discussion, but is a difficult problem to solve in a way that
doesn't make the code even more complex/confusing (especially regarding
node ids and history).

### Services
These make up the core the invocation system, found in
`/ldm/invoke/app/services`. One of the key design philosophies here is
that most components should be replaceable when possible. For example,
if someone wants to use cloud storage for their images, they should be
able to replace the image storage service easily.

The services are broken down as follows (several of these are
intentionally implemented with an initial simple/naïve approach):
* Invoker: Responsible for creating and executing **sessions** and
managing services used to do so.
* Session Manager: Manages session history. An on-disk implementation is
provided, which stores sessions as json files on disk, and caches
recently used sessions for quick access.
* Image Storage: Stores images of multiple types. An on-disk
implementation is provided, which stores images on disk and retains
recently used images in an in-memory cache.
* Invocation Queue: Used to queue invocations for execution. An
in-memory implementation is provided.
* Events: An event system, primarily used with socket.io to support
future web UI integration.

## Apps

Apps are available through the `/scripts/invoke-new.py` script (to-be
integrated/renamed).

### CLI
```
python scripts/invoke-new.py
```

Implements a simple CLI. The CLI creates a single session, and
automatically links all inputs to the previous node's output. Commands
are automatically generated from all invocations, with command options
being automatically generated from invocation inputs. Help is also
available for the cli and for each command, and is very verbose.
Additionally, the CLI supports command piping for single-line entry of
multiple commands. Example:

```
> txt2img --prompt "a cat eating sushi" --steps 20 --seed 1234 | upscale | show_image
```

### API
```
python scripts/invoke-new.py --api --host 0.0.0.0
```

Implements an API using FastAPI with Socket.io support for signaling.
API documentation is available at `http://localhost:9090/docs` or
`http://localhost:9090/redoc`. This includes OpenAPI schema for all
available invocations, session interaction APIs, and image APIs.
Socket.io signals are per-session, and can be subscribed to by session
id. These aren't currently auto-documented, though the code for event
emission is centralized in `/ldm/invoke/app/services/events.py`.

A very simple test html and script are available at
`http://localhost:9090/static/test.html` This demonstrates creating a
session from a graph, invoking it, and receiving signals from Socket.io.

## What's left?

* There are a number of features not currently covered by invocations. I
kept the set of invocations small during core development in order to
simplify refactoring as I went. Now that the invocation code has
stabilized, I'd love some help filling those out!
* There's no image metadata generated. It would be fairly
straightforward (and would make good sense) to serialize either a
session and node reference into an image, or the entire node into the
image. There are a lot of questions to answer around source images,
linked images, etc. though. This history is all stored in the session as
well, and with complex sessions, the metadata in an image may lose its
value. This needs some further discussion.
* We need a list of features (both current and future) that would be
difficult to implement without looping constructs so we can have a good
conversation around it. I'm really hoping we can avoid needing
looping/iteration in the graph execution, since it'll necessitate
separating an execution of a graph into its own concept/system, and will
further complicate the system.
* The API likely needs further filling out to support the UI. I think
using the new API for the current UI is possible, and potentially
interesting, since it could work like the new/demo CLI in a "single
operation at a time" workflow. I don't know how compatible that will be
with our UI goals though. It would be nice to support only a single API
though.
* Deeper separation of systems. I intentionally tried to not touch
Generate or other systems too much, but a lot could be gained by
breaking those apart. Even breaking apart Args into two pieces (command
line arguments and the parser for the current CLI) would make it easier
to maintain. This is probably in the future though.
2023-02-26 12:25:41 +13:00
8c5773abc1 add a workflow to close stale issues
with values set as discussed in discord
2023-02-25 13:20:05 +01:00
cd98d88fe7 [nodes] Removed InvokerServices, simplying service model 2023-02-24 20:11:28 -08:00
34e3aa1f88 parent 9eed1919c2
author Kyle Schouviller <kyle0654@hotmail.com> 1669872800 -0800
committer Kyle Schouviller <kyle0654@hotmail.com> 1676240900 -0800

Adding base node architecture

Fix type annotation errors

Runs and generates, but breaks in saving session

Fix default model value setting. Fix deprecation warning.

Fixed node api

Adding markdown docs

Simplifying Generate construction in apps

[nodes] A few minor changes (#2510)

* Pin api-related requirements

* Remove confusing extra CORS origins list

* Adds response models for HTTP 200

[nodes] Adding graph_execution_state to soon replace session. Adding tests with pytest.

Minor typing fixes

[nodes] Fix some small output query hookups

[node] Fixing some additional typing issues

[nodes] Move and expand graph code. Add base item storage and sqlite implementation.

Update startup to match new code

[nodes] Add callbacks to item storage

[nodes] Adding an InvocationContext object to use for invocations to provide easier extensibility

[nodes] New execution model that handles iteration

[nodes] Fixing the CLI

[nodes] Adding a note to the CLI

[nodes] Split processing thread into separate service

[node] Add error message on node processing failure

Removing old files and duplicated packages

Adding python-multipart
2023-02-24 18:57:02 -08:00
49ffb64ef3 ui: translations update from weblate (#2804)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-02-25 10:09:37 +11:00
ec14e2db35 translationBot(ui): update translation (Portuguese (Brazil))
Currently translated at 91.8% (431 of 469 strings)

Co-authored-by: Gabriel Mackievicz Telles <telles.gabriel@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/pt_BR/
Translation: InvokeAI/Web UI
2023-02-24 17:54:54 +01:00
5725fcb3e0 translationBot(ui): added translation (Romanian)
Co-authored-by: Jeff Mahoney <jbmahoney@gmail.com>
2023-02-24 17:54:54 +01:00
1447b6df96 translationBot(ui): update translation (Spanish)
Currently translated at 100.0% (469 of 469 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/es/
Translation: InvokeAI/Web UI
2023-02-24 17:54:54 +01:00
e700da23d8 Sync main with v2.3.1 (#2792)
This PR will bring `main` up to date with released v2.3.1
2023-02-24 11:54:46 -05:00
b4ed8bc47a Merge branch 'main' into v2.3 2023-02-24 10:52:03 -05:00
bd85e00530 Last PR needed for v2.3.1 (#2788)
- Add curated set of starter models based on team discussion. The final
list of starter models can be found in
`invokeai/configs/INITIAL_MODELS.yaml`

- To test model installation, I selected and installed all the models on
the list. This led to my discovering that when there are no more starter
models to display, the console front end crashes. So I made a fix to
this in which the entire starter model selection is no longer shown.

- Update model table in 050_INSTALL_MODELS.md

- Add guide to dealing with low-memory situations
- Version is now `v2.3.1`
2023-02-24 10:31:38 -05:00
4e446130d8 Merge branch 'v2.3' into enhance/curated-2.3.1-models 2023-02-24 10:30:42 -05:00
4c93b514bb bump version to final 2.3.1 2023-02-24 10:04:41 -05:00
d078941316 add low memory troubleshooting guide 2023-02-24 10:04:06 -05:00
230d3a496d document starter models
- add new script `scripts/make_models_markdown_table.py` that parses
  INITIAL_MODELS.yaml and creates markdown table for the model installation
  documentation file

- update 050_INSTALLING_MODELS.md with above table, and add a warning
  about additional license terms that apply to some of the models.
2023-02-24 09:33:07 -05:00
ec2890c19b Run garbage collection to allow the CUDA cache to completely empty. (#2791) 2023-02-24 08:48:54 -05:00
a540cc537f add curated set of HuggingFace diffusers models for 2.3.1 release
- Final list can be found in invokeai/configs/INITIAL_MODELS.yaml

- After installing all the models, I discovered a bug in the file
  selection form that caused a crash when no remaining uninstalled
  models remained. So had to fix this.
2023-02-24 00:53:48 -05:00
39c57aa358 fix generate backend to generate "accurate" intermediate images (#2787)
The sample_to_image method in `ldm.invoke.generator.base` was still
using ckpt-era code. As a result when the WebUI was set to show
"accurate" intermediate images, there'd be a crash. This PR corrects the
problem.

- Closes #2784
- Closes #2775
2023-02-24 00:33:29 -05:00
01f8c37bd3 rename amd flavor to rocm 2023-02-24 06:20:44 +01:00
2d990c1f54 Merge branch 'v2.3' into bugfix/webui-accurate-intermediates 2023-02-23 22:07:18 -05:00
7fb2da8741 fix generate backend to generate "accurate" intermediate images
- Closes #2784
- Closes #2775
2023-02-23 22:03:28 -05:00
b7718985d5 update build-container.yml
- add branches 'dev/ci/docker/*' and 'dev/docker/*'
2023-02-24 03:58:22 +01:00
c69fcb1c10 fix ckpt_convert module to work with dreambooth v2 models (#2776)
- Discord member @marcus.llewellyn reported that some civitai
2.1-derived checkpoints were not converting properly (probably
dreambooth-generated):
https://discord.com/channels/1020123559063990373/1078386197589655582/1078387806122025070

- @blessedcoolant tracked this down to a missing key that was used to
derive vector length of the CLIP model used by fetching the second
dimension of the tensor at "cond_stage_model.model.text_projection".

- On inspection, I found that the same second dimension can be recovered
from key 'cond_stage_model.model.ln_final.bias', and use that instead. I
hope this is correct; tested on multiple v1, v2 and inpainting models
and they converted correctly.

- While debugging this, I found and fixed several other issues:

- model download script was not pre-downloading the OpenCLIP
text_encoder or text_tokenizer. This is fixed.
- got rid of legacy code in `ckpt_to_diffuser.py` and replaced with
calls into `model_manager`
  - more consistent status reporting in the CLI.
2023-02-23 21:51:57 -05:00
90cda11868 separate installation of requirements and source
this should highly increase rebuilding of the image when:
- version did not change
- requirements didn't change
2023-02-24 03:51:18 +01:00
0982548e1f Merge branch 'v2.3' into bugfix/v2-model-conversion 2023-02-23 21:27:49 -05:00
5cb877e096 reorder .dockerignore 2023-02-24 02:53:27 +01:00
11a29fdc4d fix python 3.9 compatibility (#2780)
without this change, the project can be installed on 3.9 but not used
this also fixes the container images

Maybe we should re-enable Python 3.9 checks which would have prevented
this.
2023-02-24 00:49:25 +01:00
24407048a5 Version 2.3.1-rc4 (#2782)
Just a version bump to use a format recognized by PyPi.
2023-02-23 18:09:43 -05:00
a7c2333312 Merge branch 'main' into fix/py39-compatibility 2023-02-23 23:53:38 +01:00
b5b541c747 bump version; use correct format for PyPi 2023-02-23 17:47:36 -05:00
ad6ea02c9c Update main with V2.3 fixes (#2774)
Until the nodes merge happens, we can continue to merge bugfixes from
the 2.3 branch into `main`. This will bring main into sync with
`v2.3.1+rc3`
2023-02-23 17:38:16 -05:00
1a6ed85d99 fix typeing to be compatible with python 3.9
without this, the project can be installed on 3.9 but not used
this also fixes the container images
2023-02-23 23:27:16 +01:00
a094bbd839 push to pypi from branch v2.3 (#2778)
This change will cause releases on the v2.3 branch to be pushed to PyPi.
2023-02-23 17:20:24 -05:00
73dda812ea push to pypi from branch v2.3
This change will cause releases on the v2.3 branch to be pushed
to PyPi.
2023-02-23 16:55:25 -05:00
8eaf1c4033 Revert "(updater) style 'pip' progress to use dark background"
This reverts commit 89239d1c54.

- This was making a subprocess call to 'bash', and hence crashing
  on windows systems!
2023-02-23 16:33:57 -05:00
4f44b64052 fix ckpt_convert module to work with dreambooth v2 models
- Discord member @marcus.llewellyn reported that some civitai 2.1-derived checkpoints were
  not converting properly (probably dreambooth-generated):
  https://discord.com/channels/1020123559063990373/1078386197589655582/1078387806122025070

- @blessedcoolant tracked this down to a missing key that was used to
  derive vector length of the CLIP model used by fetching the second
  dimension of the tensor at "cond_stage_model.model.text_projection".
  His proposed solution was to hardcode a value of 1024.

- On inspection, I found that the same second dimension can be
  recovered from key 'cond_stage_model.model.ln_final.bias', and use
  that instead. I hope this is correct; tested on multiple v1, v2 and
  inpainting models and they converted correctly.

- While debugging this, I found and fixed several other issues:

  - model download script was not pre-downloading the OpenCLIP
    text_encoder or text_tokenizer. This is fixed.
  - got rid of legacy code in `ckpt_to_diffuser.py` and replaced
    with calls into `model_manager`
  - more consistent status reporting in the CLI.
2023-02-23 15:43:58 -05:00
c559bf3e10 Add a sanity check to root directory finding algorithm (#2772)
Root directory finding algorithm is:

2) use --root argument
2) use INVOKEAI_ROOT environment variable
3) use VIRTUAL_ENV environment variable
4) use ~/invokeai

Since developers are liable to put virtual environments in their
favorite places, not necessarily in the invokeai root directory, this PR
adds a sanity check that looks for the existence of
`VIRTUAL_ENV/invokeai.init`, and moves on to (4) if not found.
2023-02-23 11:37:11 -05:00
a485515bc6 Merge branch 'v2.3' into bugfix/sanity-check-rootdir 2023-02-23 11:14:52 -05:00
2c9b29725b Bugfix/windows install (#2770)
# This will constitute v2.3.1+rc2

## Windows installer enhancements
  
1. resize installer window to give more room for configure and download
forms
2. replace '\' with '/' in directory names to allow user to
drag-and-drop
       folders into the dialogue boxes that accept directories.
3. similar change in CLI for the !import_model and !convert_model
commands
4. better error reporting when a model download fails due to network
errors
5. put the launcher scripts into a loop so that menu reappears after
       invokeai, merge script, etc exits. User can quit with "Q".
6. do not try to download fp16 of sd-ft-mse-vae, since it doesn't exist.
7. cleaned up status reporting when installing models
8. Detect when install failed for some reason and print helpful error
      message rather than stack trace.
9. Detect window size and resize to minimum acceptable values to provide
      better display of configure and install forms.
10. Fix a bug in the CLI which prevented diffusers imported by their
repo_ids
from being correctly registered in the current session (though they
install
      correctly)
11. Capitalize the "i" in Imported in the autogenerated descriptions.
2023-02-23 11:14:30 -05:00
28612c899a add a sanity check to root directory finding algorithm
Root directory finding algorithm is:

2) use --root argument
2) use INVOKEAI_ROOT environment variable
3) use VIRTUAL_ENV environment variable
4) use ~/invokeai

Since developer's are liable to put virtual environments in their
favorite places, not necessarily in the invokeai root directory, this
PR adds a sanity check that looks for the existence of
VIRTUAL_ENV/invokeai.init, and moves to (4) if not found.
2023-02-23 10:15:01 -05:00
88acbeaa35 install creator tags but don't commit 2023-02-23 07:08:41 -05:00
46729efe95 upgrade to compel 0.1.7 2023-02-23 07:06:40 -05:00
b3d03e1146 Merge branch 'v2.3.1' into bugfix/windows-install 2023-02-23 01:04:39 -05:00
e29c9a7d9e fix CLI import of diffusers by repo_id
- Fix a bug in the CLI which prevented diffusers imported by their repo_ids
  from being correctly registered in the current session (though they install
  correctly)

- Capitalize the "i" in Imported in the autogenerated descriptions.
2023-02-23 01:00:14 -05:00
9b157b6532 fix several issues with Windows installs
1. resize installer window to give more room for configure and download forms
2. replace '\' with '/' in directory names to allow user to drag-and-drop
   folders into the dialogue boxes that accept directories.
3. similar change in CLI for the !import_model and !convert_model commands
4. better error reporting when a model download fails due to network errors
5. put the launcher scripts into a loop so that menu reappears after
   invokeai, merge script, etc exits. User can quit with "Q".
6. do not try to download fp16 of sd-ft-mse-vae, since it doesn't exist.
7. cleaned up status reporting when installing models
2023-02-23 00:49:59 -05:00
10a1e7962b docs: add TRANSLATION.md (#2769) 2023-02-23 15:37:15 +13:00
cb672d7d00 Merge branch 'v2.3.1' into docs/add-translation-md 2023-02-22 21:35:39 -05:00
e791fb6b0b docs: tweak messaging 2023-02-23 13:00:05 +11:00
1c9001ad21 docs: add TRANSLATION.md 2023-02-23 12:53:03 +11:00
3083356cf0 installer enhancements
- Detect when install failed for some reason and print helpful error
  message rather than stack trace.

- Detect window size and resize to minimum acceptable values to provide
  better display of configure and install forms.
2023-02-22 19:18:07 -05:00
179814e50a [WebUI] 2.3.1 Localization (#2765) 2023-02-23 10:29:14 +13:00
9515c07fca Merge branch 'v2.3.1' into localization-231 2023-02-23 10:29:02 +13:00
a45e94fde7 build: localization (2.3.1-final) 2023-02-23 09:47:01 +13:00
8b6196e0a2 version 2.3.1 release candidate 1 2023-02-22 15:26:35 -05:00
ee2c0ab51b translationBot(ui): update translation (Russian)
Currently translated at 81.4% (382 of 469 strings)

translationBot(ui): update translation (Russian)

Currently translated at 81.6% (382 of 468 strings)

Co-authored-by: Sergey Krashevich <svk@svk.su>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ru/
Translation: InvokeAI/Web UI
2023-02-22 21:25:08 +01:00
ca5f129902 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (469 of 469 strings)

translationBot(ui): update translation (Italian)

Currently translated at 100.0% (468 of 468 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-02-22 21:25:08 +01:00
cf2eca7c60 Add new console frontend to initial model selection, and other model mgmt improvements (#2644)
## Major Changes
The invokeai-configure script has now been refactored. The work of
selecting and downloading initial models at install time is now done by
a script named `invokeai-model-install` (module name is
`ldm.invoke.config.model_install`)

Screen 1 - adjust startup options:

![screenshot1](https://user-images.githubusercontent.com/111189/219976468-b642df78-a6fe-44a2-bf97-54ccf34e9656.png)

Screen 2 - select SD models:

![screenshot2](https://user-images.githubusercontent.com/111189/219976494-13c7d257-cc8d-4dae-9521-3b352aab010b.png)

The calling arguments for `invokeai-configure` have not changed, so
nothing should break. After initializing the root directory, the script
calls `invokeai-model-install` to let the user select the starting
models to install.

`invokeai-model-install puts up a console GUI with checkboxes to
indicate which models to install. It respects the `--default_only` and
`--yes` arguments so that CI will continue to work. Here are the various
effects you can achieve:

`invokeai-configure`
       This will use console-based UI to initialize invokeai.init,
       download support models, and choose and download SD models
    
`invokeai-configure --yes`
Without activating the GUI, populate invokeai.init with default values,
       download support models and download the "recommended" SD models
    
`invokeai-configure --default_only`
Activate the GUI for changing init options, but don't show the SD
download
form, and automatically download the default SD model (currently SD-1.5)
    
`invokeai-model-install`
       Select and install models. This can be used to download arbitrary
models from the Internet, install HuggingFace models using their
repo_id,
       or watch a directory for models to load at startup time
    
`invokeai-model-install --yes`
       Import the recommended SD models without a GUI
    
`invokeai-model-install --default_only`
       As above, but only import the default model

## Flexible Model Imports

The console GUI allows the user to import arbitrary models into InvokeAI
using:

1. A HuggingFace Repo_id
2. A URL (http/https/ftp) that points to a checkpoint or safetensors
file
3. A local path on disk pointing to a checkpoint/safetensors file or
diffusers directory
4. A directory to be scanned for all checkpoint/safetensors files to be
imported

The UI allows the user to specify multiple models to bulk import. The
user can specify whether to import the ckpt/safetensors as-is, or
convert to `diffusers`. The user can also designate a directory to be
scanned at startup time for checkpoint/safetensors files.

## Backend Changes

To support the model selection GUI PR introduces a new method in
`ldm.invoke.model_manager` called `heuristic_import(). This accepts a
string-like object which can be a repo_id, URL, local path or directory.
It will figure out what the object is and import it. It interrogates the
contents of checkpoint and safetensors files to determine what type of
SD model they are -- v1.x, v2.x or v1.x inpainting.

## Installer

I am attaching a zip file of the installer if you would like to try the
process from end to end.

[InvokeAI-installer-v2.3.0.zip](https://github.com/invoke-ai/InvokeAI/files/10785474/InvokeAI-installer-v2.3.0.zip)
2023-02-22 15:24:59 -05:00
16aea1e869 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-22 14:22:52 -05:00
75ff6cd3c3 Refactor prompting code paths to use the compel library (#2729)
motivation: i want to be doing future prompting development work in the
`compel` lib (https://github.com/damian0815/compel) - which is currently
pip installable with `pip install compel`.
2023-02-23 08:09:52 +13:00
7b7b31637c Merge branch 'main' into refactor_use_compel 2023-02-23 07:43:30 +13:00
fca564c18a ui: fix use prompt when prompt has colon (#2760)
- Fixes wonky use prompt when prompt contains colon
2023-02-23 07:41:38 +13:00
eb8d87e185 Merge branch 'main' into refactor_use_compel 2023-02-22 12:34:16 -05:00
dbadb1d7b5 Merge branch 'main' into fix/ui/prompt-metadata 2023-02-22 12:33:54 -05:00
a4afb69615 fix crash in textual inversion with "num_samples=0" error (#2762)
-At some point pathlib was added to the list of imported modules and
this broken the os.path code that assembled the sample data set.

-Now fixed by replacing os.path calls with Path methods
2023-02-22 12:31:28 -05:00
8b7925edf3 fix crash in textual inversion with "num_samples=0" error
-At some point pathlib was added to the list of imported modules and this
broken the os.path code that assembled the sample data set.

-Now fixed by replacing os.path calls with Path methods
2023-02-22 11:29:30 -05:00
168a51c5a6 fix textual inversion output directory path
- The configure script was misnaming the directory for text-inversion-output.
- Now fixed.
2023-02-22 10:06:04 -05:00
3f5d8c3e44 remove inaccurate docstring 2023-02-22 13:18:39 +01:00
609bb19573 fixes to resizing and init file editing
- Disable responsive resizing below starting dimensions (you can make
  form larger, but not smaller than what it was at startup)

- Fix bug that caused multiple --ckpt_convert entries (and similar) to
  be written to init file.
2023-02-22 07:05:51 -05:00
d561d6d3dd chore(ui): build frontend 2023-02-22 22:09:11 +11:00
7ffaa17551 fix(ui): use prompt bug when prompt has colon
This bug is related to the format in which we stored prompts for some time: an array of weighted subprompts.

This caused some strife when recalling a prompt if the prompt had colons in it, due to our recently introduced handling of negative prompts.

Currently there is no need to store a prompt as anything other than a string, so we revert to doing that.

Compatibility with structured prompts is maintained via helper hook.
2023-02-22 20:33:58 +11:00
97eac58a50 fix blend tokenizaiton reporting; fix LDM checkpoint support 2023-02-22 10:29:42 +01:00
cedbe8fcd7 fix .blend 2023-02-22 09:04:23 +01:00
a461875abd Merge branch 'main' into refactor_use_compel 2023-02-21 21:14:28 -06:00
ab018ccdfe Fallback to using filename to trigger embeddings (#2752)
Lots of earlier embeds use a common trigger token such as * or the
hebrew letter shan. Previously, the textual inversion manager would
refuse to load the second and subsequent embeddings that used a
previously-claimed trigger. Now, when this case is encountered, the
trigger token is replaced by <filename> and the user is informed of the
fact.
2023-02-21 21:58:11 -05:00
d41dcdfc46 move trigger_str registration into try block 2023-02-21 21:38:42 -05:00
972aecc4c5 fix responsive resizing 2023-02-21 21:33:44 -05:00
6b7be4e5dc remove dangling debug statement 2023-02-21 20:09:34 -05:00
9b1a7b553f add "hit any key to exit" pause at end of install 2023-02-21 20:03:08 -05:00
7f99efc5df require diffusers 0.13 2023-02-21 17:28:07 -05:00
0a6d8b4855 Merge branch 'main' into refactor_use_compel 2023-02-21 17:19:48 -05:00
5e41811fb5 move trigger text munging to upper level per review 2023-02-21 17:04:42 -05:00
5a4967582e reformat with black and isort 2023-02-21 14:12:57 -05:00
1d0ba4a1a7 Merge branch 'main' into bugfix/filename-embedding-fallback 2023-02-21 13:12:34 -06:00
4878c7a2d5 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-21 14:09:38 -05:00
9e5aa645a7 Fix crashing when using 2.1 model (#2757)
We now require more free memory to avoid attention slicing. 17.5% free
was not sufficient headroom in all cases, so now we require 25%.
2023-02-22 08:03:51 +13:00
d01e23973e fix problem that was causing CI failures 2023-02-21 13:44:32 -05:00
71bbd78574 Fix crashing when using 2.1 model
We now require more free memory to avoid attention slicing. 17.5% free was not sufficient headroom, so now we require 25%.
2023-02-21 12:35:03 -06:00
fff41a7349 merged with main 2023-02-21 12:20:59 -05:00
d5f524a156 Merge branch 'main' into bugfix/filename-embedding-fallback 2023-02-22 06:13:41 +13:00
3ab9d02883 Fixed embiggening crash due to clear_cuda_cache not being passed on and bad cuda stats initialization. (#2756) 2023-02-22 06:12:24 +13:00
27a2e27c3a fix crash when installed models < number columns
1. Fixed display crash when the number of installed models is less than
   the number of desired columns to display them.

2. Added --ckpt_convert option to init file.
2023-02-21 12:09:34 -05:00
da04b11a31 Merge branch 'main' into bugfix/filename-embedding-fallback 2023-02-21 10:52:13 -06:00
3795b40f63 implemented the following fixes:
Enhancements:
1. Directory-based imports will not attempt to import components of diffusers models.
2. Diffuser directory imports now supported
3. Files that end with .ckpt that are not Stable Diffusion models (such as VAEs) are
   skipped during import.

Bugs identified in Psychedelicious's review:
1. The invokeai-configure form now tracks the current contents of `invokeai.init` correctly.
2. The autoencoders are no longer treated like installable models, but instead are
   mandatory support models. They will no longer appear in `models.yaml`

Bugs identified in Damian's review:
1. If invokeai-model-install is started before the root directory is initialized, it will
   call invokeai-configure to fix the matter.
2. Fix bug that was causing empty `models.yaml` under certain conditions.
3. Made import textbox smaller
4. Hide the "convert to diffusers" options if nothing to import.
2023-02-21 11:47:41 -05:00
9436f2e3d1 alphabetize trigger strings 2023-02-21 06:23:34 -05:00
7fadd5e5c4 performance: low-memory option for calculating guidance sequentially (#2732)
In theory, this reduces peak memory consumption by doing the conditioned
and un-conditioned predictions one after the other instead of in a
single mini-batch.

In practice, it doesn't reduce the reported "Max VRAM used for this
generation" for me, even without xformers. (But it does slow things down
by a good 18%.)

That suggests to me that the peak memory usage is during VAE decoding,
not the diffusion unet, but ymmv. It does [improve things for gogurt's
16 GB
M1](https://github.com/invoke-ai/InvokeAI/pull/2732#issuecomment-1436187407),
so it seems worthwhile.

To try it out, use the `--sequential_guidance` option:
2dded68267/ldm/invoke/args.py (L487-L492)
2023-02-20 23:00:54 -05:00
4c2a588e1f Merge branch 'main' into perf/lowmem_sequential_guidance 2023-02-20 22:40:31 -05:00
5f9de762ff update installation docs for 2.3.1 installer screens (#2749)
This PR updates the manual page for automatic installation, and contains
screenshots of the new installer screens.
2023-02-20 22:40:02 -05:00
91f7abb398 replace repeated triggers with <filename> 2023-02-20 22:33:13 -05:00
6420b81a5d Merge remote-tracking branch 'upstream/main' into refactor_use_compel 2023-02-20 23:34:38 +01:00
b6ed5eafd6 update installation docs for 2.3.1 installer screens 2023-02-20 17:24:52 -05:00
694d5aa2e8 Add 'update' action to launcher script (#2636)
- Adds an update action to launcher script
- This action calls new python script `invokeai-update`, which prompts
user to update to latest release version, main development version, or
an arbitrary git tag or branch name.
- It then uses `pip` to update to whatever tag was specified.

The user interface (such as it is) looks like this:

![updater-screenshot](https://user-images.githubusercontent.com/111189/218291539-e5542662-6bfd-46ef-8ea9-655ca77392b7.png)
2023-02-21 11:17:22 +13:00
833079140b Merge branch 'main' into enhance/update-menu 2023-02-20 17:16:20 -05:00
fd27948c36 Merge branch 'main' into perf/lowmem_sequential_guidance 2023-02-20 17:15:33 -05:00
1dfaaa2a57 fix web ui issues 2023-02-20 22:58:07 +01:00
bac6b50dd1 During textual inversion training, skip over non-image files (#2747)
- The TI script was looping over all files in the training image
directory, regardless of whether they were image files or not. This PR
adds a check for image file extensions.
- 
- Closes #2715
2023-02-20 16:17:32 -05:00
a30c91f398 Merge branch 'main' into bugfix/textual-inversion-training 2023-02-21 09:58:19 +13:00
17294bfa55 restore ability of textual inversion manager to read .pt files (#2746)
- Fixes longstanding bug in the token vector size code which caused .pt
files to be assigned the wrong token vector length. These were then
tossed out during directory scanning.
2023-02-20 15:34:56 -05:00
3fa1771cc9 Merge branch 'main' into perf/lowmem_sequential_guidance 2023-02-20 15:20:15 -05:00
f3bd386ff0 Merge branch 'main' into bugfix/textual-inversion-training 2023-02-20 15:19:53 -05:00
8486ce31de Merge branch 'main' into bugfix/embedding-vector-length 2023-02-20 15:19:36 -05:00
1d9845557f reduced verbosity of embed loading messages 2023-02-20 15:18:55 -05:00
55dce6cfdd remove more dead code 2023-02-20 15:08:07 -05:00
58be915446 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-20 14:48:41 -05:00
dc9268f772 [WebUI] Symmetry Fix (#2745)
Symmetry now has a toggle on and off. Won't be passed if not enabled.
Symmetry settings now moved to their accordion.
2023-02-21 08:47:23 +13:00
47ddc00c6a in textual inversion training, skip over non-image files
- Closes #2715
2023-02-20 14:44:10 -05:00
0d22fd59ed restore ability of textual inversion manager to read .pt files
- Fixes longstanding bug in the token vector size code which caused
  .pt files to be assigned the wrong token vector length. These
  were then tossed out during directory scanning.
2023-02-20 14:34:14 -05:00
d5efd57c28 Merge branch 'symmetry-fix' of https://github.com/blessedcoolant/InvokeAI into symmetry-fix 2023-02-21 07:44:34 +13:00
b52a92da7e build: symmetry-fix-2 2023-02-21 07:43:56 +13:00
b949162e7e Revert Symmetry Big Size Input 2023-02-21 07:42:20 +13:00
5409991256 Merge branch 'main' into symmetry-fix 2023-02-21 07:29:53 +13:00
be1bcbc173 build: symmetry-fix 2023-02-21 07:28:25 +13:00
d6196e863d Move symmetry settings to their own accordion 2023-02-21 07:25:24 +13:00
63e790b79b fix crash in CLI when --save_intermediates called (#2744)
Fixes #2733
2023-02-21 07:16:45 +13:00
cf53bba99e Merge branch 'main' into bugfix/save-intermediates 2023-02-20 12:51:53 -05:00
ed4c8f6a8a fix crash in CLI when --save_intermediates called
Fixes #2733
2023-02-20 12:50:32 -05:00
aab8263c31 Fix crash on calling diffusers' prepare_attention_mask (#2743)
Diffusers' `prepare_attention_mask` was crashing when we didn't pass in
a batch size.
2023-02-20 12:35:33 -05:00
b21bd6f428 Fix crash on calling diffusers' prepare_attention_mask
Diffusers' `prepare_attention_mask` was crashing when we didn't pass in a batch size.
2023-02-20 11:12:47 -06:00
cb6903dfd0 Merge branch 'main' into perf/lowmem_sequential_guidance 2023-02-20 08:03:11 -08:00
cd87ca8214 Correctly detect when an embedding is incompatible with the current model (#2736)
- Fixed the test for token length; tested on several .pt and .bin files
- Also added a __main__ entrypoint for CLI.py, to make pdb debugging a
bit more convenient.
2023-02-21 04:32:32 +13:00
58e5bf5a58 Merge branch 'main' into bugfix/embedding-compatibility-test 2023-02-21 04:09:18 +13:00
f17c7ca6f7 [WebUI] Symmetry Settings (#2741)
Add the newly added Symmetry settings to the WebUI.
2023-02-21 04:07:30 +13:00
c3dd28cff9 Merge branch 'main' into symmetry-webui 2023-02-21 04:06:54 +13:00
db4e1e8b53 add @lstein and @blessedcoolant to all codeowner paths (#2742)
- In an emergency, one or the other of these individuals will be
available to review any part of the code.
2023-02-21 04:06:23 +13:00
3e43c3e698 add @lstein and @blessedcoolant to all paths
- In an emergency, one or the other of these individuals will
  be available to review any part of the code.
2023-02-20 10:02:32 -05:00
cc7733af1c Merge branch 'main' into enhance/update-menu 2023-02-21 03:54:40 +13:00
2a29734a56 Merge branch 'main' into symmetry-webui 2023-02-21 03:18:47 +13:00
f2e533f7c8 build: threshold slider fix 2023-02-21 03:17:41 +13:00
078f897b67 Revert Threshold Slider to older values 2023-02-21 02:57:00 +13:00
8352ab2076 remove old swagger related files since security issues (#2730) 2023-02-20 14:55:21 +01:00
1a3d47814b Merge branch 'main' into update/docs/remove-swagger-related-files 2023-02-20 14:54:22 +01:00
e852ad0a51 fix bug that prevented converted files from being written into models.yaml` 2023-02-20 08:48:54 -05:00
136cd0e868 Merge branch 'main' into symmetry-webui 2023-02-21 02:43:40 +13:00
7afe26320a build: symmetry-settings 2023-02-21 02:41:26 +13:00
702da71515 swap y/n values for broken model reconfiguration prompt 2023-02-20 08:34:46 -05:00
b313cf8afd Add Symmetry Settings 2023-02-21 02:27:55 +13:00
852d78d9ad Fix for issue #2707 (#2710)
When selecting the last model of the third model-list in the
model-merging-TUI it crashed because the code forgot about the "None"
element.

Additionally it seems that it accidentally always took the wrong model
as third model if selected?

This simple fix resolves both issues.
2023-02-20 08:02:00 -05:00
5570a88858 Merge branch 'main' into update/docs/remove-swagger-related-files 2023-02-20 07:44:42 -05:00
cfd897874b Merge branch 'main' into perf/lowmem_sequential_guidance 2023-02-20 07:42:35 -05:00
1249147c57 Merge branch 'main' into enhance/update-menu 2023-02-20 07:38:56 -05:00
eec5c3bbb1 Merge branch 'main' into main 2023-02-20 07:38:08 -05:00
ca8d9fb885 Add symmetry to generation (#2675)
Added symmetry to Invoke based on discussions with @damian0815. This can currently only be activated via the CLI with the `--h_symmetry_time_pct` and `--v_symmetry_time_pct` options. Those take values from 0.0-1.0, exclusive, indicating the percentage through generation at which symmetry is applied as a one-time operation. To have symmetry in either axis applied after the first step, use a very low value like 0.001.
2023-02-20 07:33:19 -05:00
7d77fb9691 fixed --default_only behavior 2023-02-20 01:29:39 -05:00
a4c0dfb33c fix broken --ckpt_convert option
- not sure why, but at some pont --ckpt_convert (which converts legacy checkpoints)
  into diffusers in memory, stopped working due to float16/float32 issues.

- this commit repairs the problem

- also removed some debugging messages I found in passing
2023-02-20 01:12:02 -05:00
2dded68267 add --sequential_guidance option for low-RAM tradeoff 2023-02-19 21:21:14 -08:00
172ce3dc25 correctly detect when an embedding is incompatible with the current model
- Fixed the test for token length; tested on several .pt and .bin files
- Also added a __main__ entrypoint for CLI.py, to make pdb debugging a bit
  more convenient.
2023-02-19 22:30:57 -05:00
6c8d4b091e dev(InvokeAIDiffuserComponent): mollify type checker's concern about the optional argument 2023-02-19 16:58:54 -08:00
7beebc3659 resolved conflicts; ran black and isort 2023-02-19 19:48:01 -05:00
5461318eda clean up diagnostic messages 2023-02-19 19:38:29 -05:00
d0abe13b60 performance(InvokeAIDiffuserComponent): add low-memory path for calculating conditioned and unconditioned predictions sequentially
Proof of concept. Still needs to be wired up to options or heuristics.
2023-02-19 16:04:54 -08:00
aca9d74489 refactor(InvokeAIDiffuserComponent): rename internal methods
Prefix with `_` as is tradition.
2023-02-19 15:33:16 -08:00
a0c213a158 remove /static 2023-02-19 23:51:00 +01:00
740210fc99 remove old unused files since security issues 2023-02-19 23:47:28 +01:00
ca10d0652f show title of add models screen 2023-02-19 16:55:09 -05:00
e1a85d8184 fix incorrect passing of precision to model installer 2023-02-19 16:24:31 -05:00
9d8236c59d tested and working on Ubuntu
- You can now achieve several effects:

   `invokeai-configure`
   This will use console-based UI to initialize invokeai.init,
   download support models, and choose and download SD models

   `invokeai-configure --yes`
   Without activating the GUI, populate invokeai.init with default values,
   download support models and download the "recommended" SD models

   `invokeai-configure --default_only`
   As above, but only download the default SD model (currently SD-1.5)

   `invokeai-model-install`
   Select and install models. This can be used to download arbitrary
   models from the Internet, install HuggingFace models using their repo_id,
   or watch a directory for models to load at startup time

   `invokeai-model-install --yes`
   Import the recommended SD models without a GUI

   `invokeai-model-install --default_only`
   As above, but only import the default model
2023-02-19 16:08:58 -05:00
7eafcd47a6 [WebUI] Bug Fixes (#2728)
A  few bugs fixed.

- After the recent update to the Cancel Button, it was no longer
respecting sizing in Floating Mode and the Beta Canvas. Fixed that.
- After the recent dependency update, useHotkeys was bugging out for the
fullscreen hotkey `f`. Realized this was happening because the hotkey
was initialized in two places -- in both the gallery and the parameter
floating button. Removed it from both those places and moved it to the
InvokeTabs component. It makes sense to reside it here because it is a
global hotkey.
- Also added index `0` to the default Accordion index in state in order
to ensure that the main accordions stay open. Conveniently this works
great on all tabs. We have all the primary options in accordions so they
stay open. And as for advanced settings, the first one is always Seed
which is an important accordion, so it opens up by default.

Think there may be some more bugs. Looking in to them.
2023-02-20 09:39:48 +13:00
ded3f13a33 move all prompting stuff to use compel 2023-02-19 20:42:29 +01:00
e5646d7241 both forms functional; need integration 2023-02-19 13:12:05 -05:00
79ac9698c1 build: webui-bug-fixes 2023-02-20 05:28:52 +13:00
d29f57c93d fix: Keep the first accordion open by default on reset
We need to do this now because we are using multiple accordions.
2023-02-20 05:26:48 +13:00
9b7cde8918 fix: Fullscreen Hotkey Bug
After upgrading the deps, the full screen hotkey started to bug out. I believe this was happening because it was triggered in two different components causing it to run twice. Removed it from both floating buttons and moved it to the Invoke tab. Makes sense to keep it there as it is a global hotkey.
2023-02-20 05:20:51 +13:00
8ae71303a5 fix: Cancel Button not maintaining min height
After the recent changes the Cancel button wasn't maintaining min height in floating mode. Also the new button group was not scaling in width correctly on the Canvas Beta UI. Fixed both.
2023-02-20 05:18:37 +13:00
2cd7bd4a8e docs: add translation info to readme (#2725)
- Adds a translation status badge
- Adds a blurb about contributing a translation (we want Weblate to be
the source of truth for translations, and to avoid updating translations
directly here)
2023-02-20 04:46:26 +13:00
b813298f2a Merge branch 'main' into docs/readme-translation 2023-02-20 04:43:13 +13:00
58f787f7d4 ui: update deps, fix husky script (#2726)
- Upgraded all dependencies
- Removed beta TS 5.0 as it conflicted with some packages
- Added types for `Array.prototype.findLast` and
`Array.prototype.findLastIndex` (these definitions are provided in TS
5.0
- Fixed fixed type import syntax in a few components
- Re-patched `redux-deep-persist` and tested to ensure the patch still
works

The husky pre-commit command was `npx run lint`, but it should run
`lint-staged`. Also, `npx` wasn't working for me. Changed the command to
`npm run lint-staged` and it all works. Extended the `lint-staged`
triggers to hit `json`, `scss` and `html`.
2023-02-20 04:14:24 +13:00
2bba543d20 Merge branch 'main' into chore/ui/update-deps 2023-02-20 04:13:47 +13:00
d3c1b747ee Fix behavior when encountering a bad embedding (#2721)
When encountering a bad embedding, InvokeAI was asking about reconfiguring models. This is because the embedding load error was never handled - it now is.
2023-02-19 14:04:59 +00:00
b9ecf93ba3 ui: translations update from weblate (#2727)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [InvokeAI/Web
UI](https://hosted.weblate.org/projects/invokeai/web-ui/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widgets/invokeai/-/web-ui/horizontal-auto.svg)
2023-02-19 23:12:05 +11:00
487da8394d translationBot(ui): update translation (French)
Currently translated at 85.4% (398 of 466 strings)

Co-authored-by: psychedelicious <mabianfu@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/fr/
Translation: InvokeAI/Web UI
2023-02-19 13:00:55 +01:00
4c93bc56f8 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (466 of 466 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-02-19 13:00:55 +01:00
727dfeae43 translationBot(ui): update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/
Translation: InvokeAI/Web UI
2023-02-19 13:00:55 +01:00
88d561dee7 chore(ui): build frontend 2023-02-19 22:32:05 +11:00
7a379f1d4f chore(ui): update deps
- Upgraded all dependencies
- Removed beta TS 5.0 as it conflicted with some packages
- Added types for `Array.prototype.findLast` and `Array.prototype.findLastIndex` (these definitions are provided in TS 5.0
- Fixed fixed type import syntax in a few components
- Re-patched `redux-deep-persist` and tested to ensure the patch still works
2023-02-19 22:32:05 +11:00
3ad89f99d2 build(ui): fix husky & lint-staged 2023-02-19 22:32:00 +11:00
d76c5da514 docs: add translation info to readme 2023-02-19 19:13:38 +11:00
da5b0673e7 docs(ti): add using & troubleshooting sections (#2717)
Add `Using Embeddings` and `Troubleshooting` sections clarifying issues
I had when using TI for the first time.
2023-02-19 16:52:44 +13:00
d7180afe9d Merge branch 'main' into docs/ti/add-using-troubleshooting 2023-02-19 16:51:50 +13:00
2e9c15711b docs(ti): add using & troubleshooting sections 2023-02-19 14:45:26 +11:00
e19b08b149 [WebUI] Model Manager Lag Fix (#2720)
Model Manager lags a bit if you have a lot of models.

Basically added a fake delay to rendering the model list so the modal
has time to load first. Hacky but if it works it works.
2023-02-19 14:42:25 +11:00
234d76a269 build: webui-model-manager-lag-fix 2023-02-19 15:25:14 +13:00
826d941068 fix: Fix Model Manager Modal Lag
By hacking in a fake delay to load the list.
2023-02-19 15:23:25 +13:00
34e449213c add ability to retrieve current list of embedding trigger strings (#2650) 2023-02-18 18:05:00 -08:00
671c5943e4 Merge remote-tracking branch 'origin/main' into api/add-trigger-string-retrieval
# Conflicts:
#	ldm/generate.py
2023-02-18 17:44:59 -08:00
16c24ec367 [WebUI] Implement a "Cancel after current iteration" Button (#2642)
## What was the problem/requirement? (What/Why)
Frequently, I wish to cancel the processing of images, but also want the
current image to finalize before I do. To work around this, I need to
wait until the current one finishes before pressing the cancel.

## What was the solution? (How)
* Implemented a button that allows to "Cancel after current iteration,"
which stores a state in the UI that will attempt to cancel the
processing after the current image finishes
* If the button is pressed again, while it is spinning and before the
next iteration happens, this will stop the scheduling of the cancel, and
behave as if the button was never pressed.

### Minor
* Added `.yarn` to `.gitignore` as this was an output folder produced
from following Frontend's README

### Revision 2
#### Major 
* Changed from a standalone button to a context menu next to the
original cancel button. Pressing the context menu will give the
drop-down option to select which type of cancel method the user prefers,
and they can press that button for canceling in the specified type
* Moved states to system state for cross-screen and toggled cancel types
management
* Added in distribution for the target yarn version (allowing any
version of yarn to compile successfully), and updated the README to
ensure `--immutable` is passed for onboarding developers

#### Minor 
* Updated `.gitignore` to ignore specific yarn folders, as specified by
their team -
https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored

## How were these changes tested?
* `yarn dev` => Server started successfully
* Manual testing on the development server to ensure the button behaved
as expected
* `yarn run  build` => Success

### Artifacts
#### Revision 1
* Video showing the UI changes in action

https://user-images.githubusercontent.com/89283782/218347722-3a15ce61-2d8c-4c38-b681-e7a3e79dd595.mov

* Images showing the basic UI changes

![image](https://user-images.githubusercontent.com/89283782/218347124-4afbb699-2abc-4e71-a794-b04f7179cfe2.png)

![image](https://user-images.githubusercontent.com/89283782/218347826-443db351-7a3a-4111-80af-56d56a81f07b.png)

#### Revision 2
* Video showing the UI changes in action

https://user-images.githubusercontent.com/89283782/219901217-048d2912-9b61-4415-85fd-9e8fedb00c79.mov

* Images showing the basic UI changes
(Default state) 

![image](https://user-images.githubusercontent.com/89283782/219901228-918b263a-dc75-4e5d-8897-5fc62c71a790.png)
(Drop-down context menu active) 

![image](https://user-images.githubusercontent.com/89283782/219901241-021be07a-b768-40a2-988f-eb59be4a962d.png)
(Scheduled cancel selected and running)

![image](https://user-images.githubusercontent.com/89283782/219901243-59a9c61a-71a7-44b3-adab-7aa4c9ee1f8e.png)
(Scheduled cancel started)

![image](https://user-images.githubusercontent.com/89283782/219901266-b4c0adc1-d791-4989-9351-075758e06534.png)


## Notes
* Using `SystemState`'s `currentStatus` variable, when the value is
`common:statusIterationComplete` is an alternative to this approach (and
would be more optimal as it should prevent the next iteration from even
starting), but since the names are within the translations, rather than
an enum or other type, this method of tracking the current iteration was
used instead.
* `isLoading` on `IAIIconButton` caused the Icon Button to also be
disabled, so the current solution works around that with conditionally
rendering the icon of the button instead of passing that value.
* I don't have context on the development expectation for `dist` folder
interactions (and couldn't find any documentation outside of the
`.gitignore` mentioning that the folder should remain. Let me know if
they need to be modified a certain way.
2023-02-19 14:35:34 +13:00
e8240855e0 chore(ui): build frontend 2023-02-19 12:18:40 +11:00
a5e065048e feat(ui): persist blacklist cancelAfter 2023-02-19 11:53:52 +11:00
a53c3269db build: cancel-after-iteration-webui 2023-02-19 13:30:15 +13:00
8bf93d3a32 Isolate Cancel Button Menu Styling 2023-02-19 13:23:04 +13:00
d42cc0fd1c Port Cancel Button Options Menu to New Component 2023-02-19 13:18:03 +13:00
d2553d783c Add IAISimpleMenu Component 2023-02-19 13:17:45 +13:00
10b747d22b Run yarn build once more due to merge 2023-02-18 14:45:00 -08:00
1d567fa593 Merge branch 'main' into scheduled-cancel 2023-02-18 14:43:05 -08:00
3a3dd39d3a [ui] fix weblate merge conflict (#2716)
My last attempt to fix the Weblate missing keys was done incorrectly and
caused a merge conflict on the Weblate repo.

This PR follows these steps to fix it
https://docs.weblate.org/en/latest/faq.html#how-to-fix-merge-conflicts-in-translations

🤞
2023-02-19 09:14:35 +11:00
f4b3d7dba2 fix(ui): add useSlidersForAll string 2023-02-19 09:12:14 +11:00
de2c7fd372 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (462 of 462 strings)

Translation: InvokeAI/Web UI
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
2023-02-19 09:05:01 +11:00
b140e1c619 translationBot(ui): update translation (English)
Currently translated at 100.0% (462 of 462 strings)

Co-authored-by: Anonymous <noreply@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/en/
Translation: InvokeAI/Web UI
2023-02-19 09:05:01 +11:00
1308584289 translationBot(ui): update translation (Italian)
Currently translated at 100.0% (459 of 459 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2023-02-19 09:05:01 +11:00
2ac4778bcf Fix broken translation string location in Scheduled Cancel 2023-02-18 13:51:53 -08:00
6101d67dba Post-merge cleanup 2023-02-18 13:35:33 -08:00
3cd50fe3a1 Merge branch 'main' into scheduled-cancel 2023-02-18 13:30:45 -08:00
e683b574d1 Change scheduled send to be as part of context for Cancel button 2023-02-18 13:23:58 -08:00
0decd05913 fix conversion of checkpoints into incompatible diffusers models (#2714)
- The checkpoint conversion script was generating diffusers models with
the safety checker set to null. This resulted in models that could not
be merged with ones that have the safety checker activated.

- This PR fixes the issue by incorporating the safety checker into all
1.x-derived checkpoints, regardless of user's nsfw_checker setting.
2023-02-19 05:42:19 +13:00
d01b7ea2d2 remove debug statement & actually do merge 2023-02-18 11:19:06 -05:00
4fa91724d9 fix conversion of checkpoints into incompatible diffusers models
- The checkpoint conversion script was generating diffusers models
  with the safety checker set to null. This resulted in models
  that could not be merged with ones that have the safety checker
  activated.

- This PR fixes the issue by incorporating the safety checker into
  all 1.x-derived checkpoints, regardless of user's nsfw_checker setting.
2023-02-18 11:07:38 -05:00
e3d1c64b77 fix(diffusers_pipeline): ensure cuda.get_mem_info always gets a specific device index. (#2700)
Also tighten up the typing of `device` attributes in general.

Fixes 
> ValueError: Expected a torch.device with a specified index or an
integer, but got:cuda
2023-02-19 04:33:16 +13:00
17f35a7bba Merge branch 'main' into fix/expected-torch-device 2023-02-19 04:16:13 +13:00
ab2f0a6fbf fix(ui): fix translation files (#2708)
Weblate's first PR was it attempting to fix some translation issues we
had overlooked!

It wanted to remove some keys which it did not see in our translation
source due to typos.

This PR instead corrects the key names to resolve the issues.
2023-02-19 03:51:32 +13:00
41cbf2f7c4 Merge branch 'main' into feat/ui/fix-translations 2023-02-19 03:50:35 +13:00
d5d2e1d7a3 Merge branch 'main' into fix/expected-torch-device 2023-02-18 15:23:08 +01:00
587faa3e52 preparation for startup option editor 2023-02-18 08:51:26 -05:00
80229ab73e Fixed grammar in "other options" feature tooltip (#2711)
It bothered me so i fixed it
2023-02-18 22:05:46 +11:00
68b2911d2f Fixed grammar in "other options" feature tooltip 2023-02-18 11:58:33 +01:00
2bf2f627e4 Fix for issue #2707 2023-02-18 11:40:12 +01:00
58676b2ce2 fix(ui): fix translation files 2023-02-18 19:08:46 +11:00
11f79dc1e1 [WebUI] Localization Port Bug Fixes (#2706)
- Fixed missing localization string for "useSlidersForAll"
- Fixed status messages being broken.
2023-02-18 18:59:05 +11:00
2a095ddc8e build: localization-bug-fixes 2023-02-18 19:35:39 +13:00
dd849d2e91 Fix Localization Porting Bugs 2023-02-18 19:32:55 +13:00
8c63fac958 AttributeError: 'Namespace' object has no attribute 'log_tokenization' (#2698)
Could be fixed here or alternatively declared in file globals.py
2023-02-18 01:08:50 -05:00
11a70e9764 Merge branch 'main' into patch-14 2023-02-18 18:45:05 +13:00
33ce78e4a2 feat(ui): set up for weblate translation (#2702)
# Weblate Translation 

After doing a full integration test of 3 translation service providers
on my fork of InvokeAI, we have chosen
[Weblate](https://hosted.weblate.org). The other two viable options were
[Crowdin](https://crowdin.com/) and
[Transifex](https://www.transifex.com/).

Weblate was the choice because its hosted service provides a very solid
UX / DX, can scale as much as we may ever need, is FOSS itself, and
generously offers free hosted service to other libre projects like ours.

## How it works

Weblate hosts its own fork of our repo and establishes a kind of
unidirectional relationship between our repo and its fork.

### InvokeAI --> Weblate

The `invoke-ai/InvokeAI` repo has had the Weblate GitHub app added to
it. This app watches for changes to our translation source
(`invokeai/frontend/public/locales/en.json`) and then updates the
Weblate fork. The Weblate UI then knows there are new strings to be
translated, or changes to be made.

### Translation

Our translators can then update the translations on the Weblate UI. The
plan now is to invite individual community members who have expressed
interest in maintaining a language or two and give them access to the
app. We can also open the doors to the general public if desired.

### Weblate --> InvokeAI

When a translation is ready or changed, the system will make a PR to
`main`. We have a substantial degree of control over this and will
likely manually trigger these PRs instead of letting them fire off
automatically.

Once a PR is merged, we will still need to rebuild the web UI. I think
we can set things up so that we only need the rebuild when a totally new
language is added, but for now, we will stick to this relatively simple
setup.

## This PR 

This PR sets up the web UI's translation stuff to work with Weblate:
- merged each locale into a single file
- updated the i18next config and UI to work with this simpler file
structure
- update our eslint and prettier rules to ensure the locale files have
the same format as what Weblate outputs (`tabWidth: 4`)
- added a thank you to Weblate in our README

Once this is merged, I'll link Weblate to `main` and do a couple tests
to ensure it is all working as expected.
2023-02-18 18:42:03 +13:00
4f78518858 chore(ui): build frontend 2023-02-18 15:26:24 +11:00
fad99ac4d2 docs: add thanks to weblate for translation 2023-02-18 15:26:24 +11:00
423b592b25 feat(ui): set up for weblate translation 2023-02-18 15:26:04 +11:00
8aa7d1da55 fix(xformers): shush about not having Triton available. (#2701)
It's not readily available on Windows and xformers only uses it on some very specific hardware anyway.
2023-02-17 18:02:32 -08:00
6b702c32ca fix(xformers): shush about not having Triton available.
It's not readily available on Windows and xformers only uses it on some very specific hardware anyway.
2023-02-17 17:41:27 -08:00
767012aec0 [WebUI] Model Merging (#2699)
This PR brings Model Merging to the WebUI.

Inside the Model Manager, you can now find a new button called Merge
Models. Rest of it is self explanatory.


![firefox_BYCM4YNHEa](https://user-images.githubusercontent.com/54517381/219795631-dbb5c5c4-fc3a-4cdd-9549-18c2e5302835.png)
2023-02-18 14:34:35 +13:00
2267057e2b Merge branch 'main' into webui-model-merging 2023-02-18 14:13:44 +13:00
b8212e4dea fix(diffusers_pipeline): ensure cuda.get_mem_info always gets a specific device index.
Also tighten up the typing of `device` attributes in general.
2023-02-17 16:56:15 -08:00
5b7e4a5f5d Add Error Handling For Merging 2023-02-18 12:17:22 +13:00
07f9fa63d0 Bugfixes on the merge_model GUI (#2697)
This fixes a few cosmetic bugs in the merge models console GUI:

1) Fix the minimum and maximum ranges on alpha. Was 0.05 to 0.95. Now
0.01 to 0.99.
2) Don't show the 'add_difference' interpolation method when 2 models
selected, or the other three methods when three models selected
2023-02-17 16:57:03 -05:00
1ae8986451 add log_tokenization to globals 2023-02-17 16:47:32 -05:00
b305c240de fix syntax errors introduced by github web-ui edits 2023-02-17 16:44:20 -05:00
248dc81ec3 build: [WebUI] model-merge 2023-02-18 10:18:29 +13:00
ebe0071ed2 feat: [WebUI] Model Merging 2023-02-18 10:13:56 +13:00
7a518218e5 AttributeError: 'Namespace' object has no attribute 'log_tokenization'
Could be fixed here or alternatively declared in file globals.py
2023-02-17 22:11:49 +01:00
fc14ac7faa Merge branch 'main' into api/add-trigger-string-retrieval 2023-02-17 15:53:57 -05:00
95e2739c47 Merge branch 'main' into bugfix/merge-gui 2023-02-17 15:42:53 -05:00
f129393a2e document add_difference on-screen 2023-02-17 15:42:06 -05:00
c55bbd1a85 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-17 15:00:33 -05:00
ccba41cdb2 Bugfix/convert v2 models (#2630)
## Convert v2 models in CLI

- This PR introduces a CLI prompt for the proper configuration file to
use when converting a ckpt file, in order to support both inpainting
      and v2 models files.
    
- When user tries to directly !import a v2 model, it prints out a proper
warning that v2 ckpts are not directly supported and converts it into a
diffusers model automatically.

The user interaction looks like this:
```
(stable-diffusion-1.5) invoke> !import_model /home/lstein/graphic-art.ckpt
Short name for this model [graphic-art]: graphic-art-test
Description for this model [Imported model graphic-art]: Imported model graphic-art
What type of model is this?:
[1] A model based on Stable Diffusion 1.X
[2] A model based on Stable Diffusion 2.X
[3] An inpainting model based on Stable Diffusion 1.X
[4] Something else
Your choice: [1] 2
```

In addition, this PR enhances the bulk checkpoint import function. If a
directory path is passed to `!import_model` then it will be scanned for
`.ckpt` and `.safetensors` files. The user will be prompted to import
all the files found, or select which ones to import.

Addresses
https://discord.com/channels/1020123559063990373/1073730061380894740/1073954728544845855
2023-02-17 14:50:54 -05:00
3d442bbf22 Merge branch 'main' into bugfix/convert-v2-models 2023-02-17 14:50:05 -05:00
4888d0d832 fix slider and interpolations
- fix alpha slider to show values from 0.01 to 0.99
- fix interpolation list to show 'difference' method for 3 models,
-   and weighted_sum, sigmoid and inverse_sigmoid methods for 2
2023-02-17 14:46:26 -05:00
47de3fb007 correct display of 'add_difference' method when three models defined
- due to typo, the add_difference method was being displayed as "['add_difference']"
2023-02-17 14:41:02 -05:00
41bc160cb8 [WebUI] They see me slidin .. they hatin... (#2614)
Porting over as many usable options to slider as possible.

- Ported Face Restoration settings to Sliders.
- Ported Upscale Settings to Sliders.
- Ported Variation Amount to Sliders.
- Ported Noise Threshold to Sliders <-- Optimized slider so the values
actually make sense.
- Ported Perlin Noise to Sliders.
- Added a suboption hook for the High Res Strength Slider.
- Fixed a couple of small issues with the Slider component.
- Ported Main Options to Sliders.
2023-02-17 21:58:35 +13:00
d0ba155c19 chore(ui): build frontend 2023-02-17 19:54:36 +11:00
5f0848bf7d feat(ui): add all-sliders option 2023-02-17 19:53:44 +11:00
6551527fe2 Update 050_INSTALLING_MODELS.md (#2690)
Fix typo; "cute" to "cube"
2023-02-16 23:03:30 -05:00
159ce2ea08 Merge branch 'main' into bugfix/convert-v2-models 2023-02-16 23:00:58 -05:00
3715570d17 Update 050_INSTALLING_MODELS.md
Fix typo; "cute" to "cube"
2023-02-16 19:53:01 -08:00
65a7432b5a disable xformers if cuda not available 2023-02-16 22:20:30 -05:00
557e28f460 Fix workflow path filters (#2689)
remove leading Slash from paths
2023-02-16 22:15:31 -05:00
62a7f252f5 Merge branch 'main' into fix/ci/workflow-path-filters 2023-02-16 22:14:45 -05:00
2fa14200aa Merge branch 'main' into api/add-trigger-string-retrieval 2023-02-16 22:12:39 -05:00
0605cf94f0 remove leading Slash from paths 2023-02-17 04:10:40 +01:00
d69156c616 remove superseded code 2023-02-16 22:05:00 -05:00
0963bbbe78 rebuild frontend after merge conflict 2023-02-16 21:52:20 -05:00
f3351a5e47 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-16 21:51:15 -05:00
f3f4c68acc fix model download and autodetection bugs
- Corrected error that caused --full-precision argument to be ignored
  when models downloaded using the --yes argument.

- Improved autodetection of v1 inpainting files; no longer relies on the
  file having 'inpaint' in the name.
2023-02-16 21:37:50 -05:00
5d617ce63d rebuild front end 2023-02-16 20:03:59 -05:00
8a0d45ac5a new OffloadingDevice loads one model at a time, on demand (#2596)
* new OffloadingDevice loads one model at a time, on demand

* fixup! new OffloadingDevice loads one model at a time, on demand

* fix(prompt_to_embeddings): call the text encoder directly instead of its forward method

allowing any associated hooks to run with it.

* more attempts to get things on the right device from the offloader

* more attempts to get things on the right device from the offloader

* make offloading methods an explicit part of the pipeline interface

* inlining some calls where device is only used once

* ensure model group is ready after pipeline.to is called

* fixup! Strategize slicing based on free [V]RAM (#2572)

* doc(offloading): docstrings for offloading.ModelGroup

* doc(offloading): docstrings for offloading-related pipeline methods

* refactor(offloading): s/SimpleModelGroup/FullyLoadedModelGroup

* refactor(offloading): s/HotSeatModelGroup/LazilyLoadedModelGroup

to frame it is the same terms as "FullyLoadedModelGroup"

---------

Co-authored-by: Damian Stewart <null@damianstewart.com>
2023-02-16 23:48:27 +00:00
2468ba7445 skip huge workflows if not needed (#2688)
- filter paths for `build-container.yml` and `test-invoke-pip.yml`
  - add workflow to pass required checks on PRs with `paths-ignore`
  - this triggers if `test-invoke-pip.yml` does not
- fix "CI checks on main link" in `/README.md`
2023-02-16 22:57:36 +01:00
65b7d2db47 skip huge workflows if not needed
- filter paths for `build-container.yml` and `test-invoke-pip.yml`
  - add workflow to pass required checks on PRs with `paths-ignore`
  - this triggers if `test-invoke-pip.yml` does not
- fix "CI checks on main link" in `/README.md`
2023-02-16 22:56:39 +01:00
e07f1bb89c build frontend 2023-02-16 21:33:47 +01:00
f4f813d108 design: smooth progress bar animations 2023-02-16 21:33:47 +01:00
6217edcb6c tweak wording of python version requirements 2023-02-16 12:55:13 -05:00
c5cc832304 check maximum value of python version as well as minimum 2023-02-16 12:52:07 -05:00
a76038bac4 [WebUI] Even off JSX string syntax (#2058)
Assuming that mixing `"literal strings"` and `{'JSX expressions'}`
throughout the code is not for a explicit reason but just a result IDE
autocompletion, I changed all props to be consistent with the
conventional style of using simple string literals where it is
sufficient.

This is a somewhat trivial change, but it makes the code a little more
readable and uniform
2023-02-17 01:22:17 +13:00
ff4942f9b4 Merge branch 'main' into pr/2058 2023-02-17 01:05:20 +13:00
1ccad64871 build: lint/format ignores stats.html (#2681) 2023-02-17 00:42:51 +13:00
19f0022bbe build: lint/format ignores stats.html 2023-02-16 20:02:52 +11:00
ecc7b7a700 builds frontend 2023-02-16 19:54:38 +11:00
e46102124e [WebUI] Even off JSX string props
Increased consistency and readability by replacing any unnecessary JSX expressions in places where string literals are sufficient
2023-02-16 19:54:25 +11:00
314ed7d8f6 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-16 03:24:02 -05:00
b1341bc611 fully functional and ready for review
- quashed multiple bugs in model conversion and importing
- found old issue in handling of resume of interrupted downloads
- will require extensive testing
2023-02-16 03:22:25 -05:00
07be605dcb mostly working 2023-02-16 01:30:59 -05:00
fe318775c3 bring in url download bugfix from PR 2630 2023-02-16 00:37:17 -05:00
1bb07795d8 model installer downloads starter models + user-provided paths and repo_ids
- Ability to scan directory not yet implemented
- Can't download from Civitai due to incomplete URL download implementation
2023-02-16 00:34:15 -05:00
caf07479ec fix spelling mistake 2023-02-16 00:19:08 -05:00
508780d07f Also fix .bat file to point at correct configurer 2023-02-16 00:19:08 -05:00
05e67e924c Make configure_invokeai.py call invokeai_configure 2023-02-16 00:19:08 -05:00
fb2488314f fix minor typos (#2666)
Very, very minor typos I noticed.
2023-02-16 10:14:30 +13:00
062f58209b Merge branch 'main' into fix_typos 2023-02-16 10:01:28 +13:00
7cb9d6b1a6 [WebUI] Model Conversion (#2616)
### WebUI Model Conversion

**Model Search Updates**

- Model Search now has a radio group that allows users to pick the type
of model they are importing. If they know their model has a custom
config file, they can assign it right here. Based on their pick, the
model config data is automatically populated. And this same information
is used when converting the model to `diffusers`.


![firefox_q8b4Iog73A](https://user-images.githubusercontent.com/54517381/218283322-6bf31fd5-349a-410f-991a-2aa50ee8b6e1.png)

- Files named `model.safetensors` and
`diffusion_pytorch_model.safetensors` are excluded from the search
because these are naming conventions used by diffusers models and they
will end up showing on the list because our conversion saves safetensors
and not bin files.

**Model Conversion UI**

- The **Convert To Diffusers** button can be found on the Edit page of
any **Checkpoint Model**.


![firefox_VUzv10CZ7m](https://user-images.githubusercontent.com/54517381/218283424-d9864406-ebb3-44a4-9e00-b6adda72d817.png)

- When converting the model, the entire process is handled
automatically. The corresponding config while at the time of the Ckpt
addition is used in the process.
- Users are presented with the choice on where to save the diffusers
converted model - same location as the ckpt, InvokeAI models root folder
or a completely custom location.


![firefox_HJlR97KY0u](https://user-images.githubusercontent.com/54517381/218283443-b9136edd-b432-4569-a8cc-50961544f31f.png)

- When the model is converted, the checkpoint entry is replaced with the
diffusers model entry. A user can readd the ckpt if they wish to.

--- 

More or less done. Might make some minor UX improvements as I refine
things.
2023-02-15 21:58:29 +01:00
fb721234ec final build (webui-model-conversion) 2023-02-16 09:32:54 +13:00
92906aeb08 Merge branch 'main' into webui-model-conversion 2023-02-16 09:31:28 +13:00
cab41f0538 Fix perlin noise generator for diffusers tensors (#2678)
Tensors with diffusers no longer have to be multiples of 8. This broke Perlin noise generation. We now generate noise for the next largest multiple of 8 and return a cropped result. Fixes #2674.
2023-02-15 19:37:42 +01:00
5d0dcaf81e Fix typo and Hi-Res Bug 2023-02-15 13:06:31 +01:00
9591c8d4e0 builds frontend 2023-02-15 22:30:47 +11:00
bcb1fbe031 add tooltips & status messages to model conversion 2023-02-15 22:28:36 +11:00
e87a2fe14b model installer frontend done - needs to be hooked to backend 2023-02-15 01:07:39 -05:00
d00571b5a4 Revert yarn.lock 2023-02-14 18:05:24 -08:00
b08a514594 missed one. 2023-02-14 17:49:01 -08:00
265ccaca4a Merge branch 'main' into enhance/update-menu 2023-02-14 20:48:36 -05:00
7aa6c827f7 fix minor typos 2023-02-14 17:38:21 -08:00
093174942b Add thresholding for all diffusers types (#2479)
`generator` now asks `InvokeAIDiffuserComponent` to do postprocessing work on latents after every step. Thresholding - now implemented as replacing latents outside of the threshold with random noise - is called at this point. This postprocessing step is also where we can hook up symmetry and other image latent manipulations in the future.

Note: code at this layer doesn't need to worry about MPS as relevant torch functions are wrapped and made MPS-safe by `generator.py`.
2023-02-14 18:00:34 -06:00
f299f40763 convert existing model display to column format 2023-02-14 16:32:54 -05:00
7545e38655 frontend design done; functionality not hooked up yet 2023-02-14 00:02:19 -05:00
0bc55a0d55 Fix link to the installation documentation
Broken link in the README. Now pointing to correct mkdocs file.
2023-02-14 04:15:23 +01:00
d38e7170fe fix broken !import_model downloads
1. Now works with sites that produce lots of redirects, such as CIVITAI
2. Derive name of destination model file from HTTP Content-Disposition header,
   if present.
3. Swap \\ for / in file paths provided by users, to hopefully fix issues with
   Windows.
2023-02-13 22:14:24 -05:00
15a9412255 some small formatting fixes 2023-02-13 23:10:58 +01:00
e29399e032 don't even try to load incompatible embeddings 2023-02-13 17:00:52 -05:00
bc18a94d8c add ability to retrieve current list of embedding trigger strings
This PR adds a new attributer to ldm.generate, `embedding_trigger_strings`:

```
gen = Generate(...)
strings = gen.embedding_trigger_strings
strings = gen.embedding_trigger_strings()
```

The trigger strings will change when the model is updated to show only
those strings which are compatible with the current
model. Dynamically-downloaded triggers from the HF Concepts Library
will only show up after they are used for the first time. However, the
full list of concepts available for download can be retrieved
programatically like this:

```
from ldm.invoke.concepts_lib import HuggingFAceConceptsLibrary
concepts = HuggingFaceConceptsLibrary()
trigger_strings = concepts.list_concepts()
```
2023-02-13 14:11:36 -05:00
5d2bdd478c Merge branch 'main' into bugfix/convert-v2-models 2023-02-13 13:15:05 -05:00
9cacba916b Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-13 09:31:34 -05:00
628e82fa79 Added arabic locale files (#2561)
I have added the arabic locale files. There need to be some
modifications to the code in order to detect the language direction and
add it to the current document body properties.

For example we can use this:

import { appWithTranslation, useTranslation } from "next-i18next";
import React, { useEffect } from "react";

  const { t, i18n } = useTranslation();
  const direction = i18n.dir();
  useEffect(() => {
    document.body.dir = direction;
  }, [direction]);

This should be added to the app file. It uses next-i18next to
automatically get the current language and sets the body text direction
(ltr or rtl) depending on the selected language.
2023-02-13 07:45:16 -05:00
fbbbba2fac correct crash on edge case 2023-02-13 07:40:15 -05:00
9cbf9d52b4 Merge branch 'main' into pr/2561 2023-02-13 23:48:18 +13:00
fb35fe1a41 Merge branch 'main' into pr/2561 2023-02-13 23:47:21 +13:00
b60b5750af builds frontend 2023-02-13 21:23:26 +11:00
3ff40114fa adds arabic to language picker 2023-02-13 21:22:39 +11:00
71c6ae8789 fixes mislocated language file 2023-02-13 21:22:18 +11:00
d9a7536fa8 moves languages to fallback lang (en) 2023-02-13 21:21:46 +11:00
99f4417cd7 Improve error messages from Textual Inversion and Merge scripts (#2641)
## Provide informative error messages when TI and Merge scripts have
insufficient space for console UI

- The invokeai-ti and invokeai-merge scripts will crash if there is not
enough space in the console to fit the user interface (even after
responsive formatting).

- This PR intercepts the errors and prints a useful error message
advising user to make window larger.
2023-02-13 00:12:32 -05:00
47f94bde04 Merge branch 'main' into install/refactor-configure-and-model-select 2023-02-12 23:59:31 -05:00
197e6b95e3 add missing file 2023-02-12 23:59:18 -05:00
8e47ca8d57 Merge branch 'main' into bugfix/prevent-ti-frontend-crash 2023-02-12 23:56:41 -05:00
714fff39ba add new console frontend to initial model selection, and other improvements
1. The invokeai-configure script has now been refactored. The work of
   selecting and downloading initial models at install time is now done
   by a script named invokeai-initial-models (module
   name is ldm.invoke.config.initial_model_select)

   The calling arguments for invokeai-configure have not changed, so
   nothing should break. After initializing the root directory, the
   script calls invokeai-initial-models to let the user select the
   starting models to install.

2. invokeai-initial-models puts up a console GUI with checkboxes to
   indicate which models to install. It respects the --default_only
   and --yes arguments so that CI will continue to work.

3. User can now edit the VAE assigned to diffusers models in the CLI.

4. Fixed a bug that caused a crash during model loading when the VAE
   is set to None, rather than being empty.
2023-02-12 23:52:44 -05:00
89239d1c54 (updater) style 'pip' progress to use dark background 2023-02-12 19:10:11 -05:00
c03d98cf46 Implement a cancel after next iteration button 2023-02-12 15:56:03 -08:00
d1ad46d6f1 ask user to make window larger if not enough space for textual inversion/merge gui
- The invokeai-ti and invokeai-merge scripts will crash if there is not enough space
  in the console to fit the user interface (even after responsive formatting).

- This PR intercepts the errors and prints a useful error message advising user to
  make window larger.
2023-02-12 17:38:46 -05:00
6ae7560f66 Merge branch 'main' into webui-model-conversion 2023-02-12 17:22:32 -05:00
e561d19206 a few adjustments
- fix unused variables and f-strings found by pyflakes
- use global_converted_ckpts_dir() to find location of diffusers
- fixed bug in model_manager that was causing the description of converted
  models to read "Optimized version of {model_name}'
2023-02-12 17:20:13 -05:00
9eed1919c2 Strategize slicing based on free [V]RAM (#2572)
Strategize slicing based on free [V]RAM when not using xformers. Free [V]RAM is evaluated at every generation. When there's enough memory, the entire generation occurs without slicing. If there is not enough free memory, we use diffusers' sliced attention.
2023-02-12 18:24:15 +00:00
b87f7b1129 Update Model Conversion Help Text 2023-02-13 00:30:50 +13:00
7410a60208 Merge branch 'main' into webui-model-conversion 2023-02-12 23:35:49 +13:00
7c86130a3d add merge_group trigger to test-invoke-pip.yml (#2590) 2023-02-12 05:00:04 +01:00
58a1d9aae0 Merge branch 'main' into update/ci/prepare-test-invoke-pip-for-queue 2023-02-11 22:38:55 -05:00
24e32f6ae2 add 'update' action to launcher script
- Adds an update action to launcher script
- This action calls new python script `invokeai-update`, which prompts
  user to update to latest release version, main development version,
  or an arbitrary git tag or branch name.
- It then uses `pip` to update to whatever tag was specified.
2023-02-11 22:32:48 -05:00
3dd7393984 Huge Docker Update - better caching, don't use root user, include dockerhub and more.... (#2597)
Some of the core features of this PR include:

- optional push image to dockerhub (will be skipped in repos which
didn't set it up)
- stop using the root user at runtime
- trigger builds also for update/docker/* and update/ci/docker/*
- always cache image from current branch and main branch
- separate caches for container flavors
- updated comments with instructions in build.sh and run.sh
2023-02-11 18:25:48 -05:00
f18f743d03 Merge branch 'main' into update/docker/include-dockerhub 2023-02-11 18:03:03 -05:00
c660dcdfcd improve ability to bulk import .ckpt and .safetensors
This commit cleans up the code that did bulk imports of legacy model
files. The code has been refactored, and the user is now offered the
option of importing all the model files found in the directory, or
selecting which ones to import.
2023-02-11 17:59:12 -05:00
9e0250c0b4 Merge branch 'main' into webui-model-conversion 2023-02-12 11:13:13 +13:00
08c747f1e0 test-build (model-conversion-v1) 2023-02-12 11:12:23 +13:00
04ae6fde80 Model Manager localization updates 2023-02-12 11:11:00 +13:00
b1a53c8ef0 {Model Manager] Backend update to support custom save locations and configs 2023-02-12 11:10:47 +13:00
cd64511f24 [Model Manager] Allows uses to pick Diffusers converted model save location
Users can now pick the folder to save their diffusers converted model. It can either be the same folder as the ckpt, or the invoke root models folder or a totally custom location.
2023-02-12 11:10:17 +13:00
1e98e0b159 [Model Manager] Allow users to pick model type
Users can now pick model type when adding a new model and the configuration files are automatically applied.
2023-02-12 11:09:09 +13:00
4f7af55bc3 if importing a v2 ckpt model, convert to diffusers 2023-02-11 16:35:45 -05:00
d0e6a57e48 make inpaint model conversion work
Fixed a couple of bugs:

1. The original config file for the ckpt file is derived from the entry in
   `models.yaml` rather than relying on the user to select. The implication
   of this is that V2 ckpt models need to be assigned `v2-inference-v.yaml`
   when they are first imported. Otherwise they won't convert right. Note
   that currently V2 ckpts are imported with `v1-inference.yaml`, which
   isn't right either.

2. Fixed a backslash in the output diffusers path, which was causing
   load failures on Linux.

Remaining issues:

1. The radio buttons for selecting the model type are
   nonfunctional. It feels to me like these should be moved into the
   dialogue for importing ckpt/safetensors files, because this is
   where the algorithm needs help from the user.

2. The output diffusers model is written into the same directory as
   the input ckpt file. The CLI does it differently and stores the
   diffusers model in `ROOTDIR/models/converted-ckpts`. We should
   settle on one way or the other.
2023-02-11 15:53:41 -05:00
d28a486769 rebuild frontend 2023-02-11 15:07:12 -05:00
84722d92f6 foo 2023-02-11 15:06:34 -05:00
8a3b5ac21d rebuild frontend 2023-02-11 14:58:49 -05:00
717d53a773 Merge branch 'main' into bugfix/convert-v2-models 2023-02-11 14:27:52 -05:00
96926d6648 v2 Conversion Support & Radio Picker
Converted the picker options to a Radio Group and also updated the backend to use the appropriate config if it is a v2 model that needs to be converted.
2023-02-12 05:00:29 +13:00
f3639de8b1 add note in manual that directly running v2 models not supported 2023-02-11 09:43:14 -05:00
b71e675e8d support conversion of v2 models
- This PR introduces a CLI prompt for the proper configuration file to
  use when converting a ckpt file, in order to support both inpainting
  and v2 models files.

- When user tries to directly !import a v2 model, it prints out a proper
  warning that v2 ckpts are not directly supported.
2023-02-11 09:39:41 -05:00
d3c850104b pulling esrgan denoise strength through to the generate API. 2023-02-12 02:47:37 +13:00
c00155f6a4 pulling esrgan denoise strength through to the generate API. 2023-02-12 02:47:37 +13:00
8753070fc7 Fix Incorrect Windows Environment Activation Location (Manual Installation Documentation) (#2627)
## What was the problem/requirement? (What/Why)
* Windows location for the Python environment activate location is
currently incorrect
  * Due to this, this command will fail for Windows-based users
* The contributing link within the `Developer Install` sections leads to
a [404](https://invoke-ai.github.io/index.md#Contributing)
* `Developer Install`'s numbered list currently lists 1, 1, 2, . . .

## What was the solution? (How)
* Changed the location of Windows script based on actual location -
[reference](https://docs.python.org/3/library/venv.html)
* Moved the link to point to one directory higher -- the main index.md
* Minor format adjustments to allow for the numbered list to appear as
expected

## How were these changes tested?
* `mkdocs serve` => Verified on local server that the changes reflected
as expected

## Notes
Contributing mentions to set the upstream towards the `development`
branch, but that branch has been untouched for several months, so I've
pointed to the `main` branch. Let me know if we need to switch to a
different one.
2023-02-11 08:15:17 -05:00
ed8f9f021d Merge branch 'main' into update-installation-documents 2023-02-11 07:46:29 -05:00
3ccc705396 fix two bugs in conversion of inpaint models from ckpt to diffusers m… (#2620)
…odels

- If CLI asked to convert the currently loaded model, the model would
crash on the first rendering. CLI will now refuse to convert a model
loaded in memory (probably a good idea in any case).

- CLI will offer the `v1-inpainting-inference.yaml` as the configuration
file when importing an inpainting a .ckpt or .safetensors file that has
"inpainting" in the name. Otherwise it offers `v1-inference.yaml` as the
default.
2023-02-11 07:45:06 -05:00
11e422cf29 Ignore two files names instead of the entire folder
rather than bypassing any path with diffusers in it, im specifically bypassing model.safetensors and diffusion_pytorch_model.safetensors both of which should be diffusers files in most cases.
2023-02-12 00:13:22 +13:00
7f695fed39 Ignore safetensor or ckpt files inside diffusers model folders.
Basically skips the path if the path has the word diffusers anywhere inside it.
2023-02-12 00:03:42 +13:00
310501cd8a Add support for custom config files 2023-02-11 23:34:24 +13:00
106b3aea1b Fix incorrect Windows env activation location
Change broken link to Contributing inside of Developer Install
Minor format modification to allow for numbered list to appear properly
2023-02-11 00:30:07 -08:00
6e52ca3307 Model Convert Component 2023-02-11 20:41:49 +13:00
94c31f672f Add Initial Checks for Inpainting
The conversion itself is broken. But that's another issue.
2023-02-11 20:41:18 +13:00
240bbb9852 Merge branch 'main' into main 2023-02-11 01:17:42 +01:00
8cf2ed91a9 Merge branch 'main' into update/docker/include-dockerhub 2023-02-10 22:55:54 +01:00
7be5b4ca8b update Dockerfile
- introduce build arg `VOLUME_DIR`
- fix permissions of the Volume
2023-02-10 22:55:19 +01:00
d589ad96aa fix two bugs in conversion of inpaint models from ckpt to diffusers models
- If CLI asked to convert the currently loaded model, the model would crash
  on the first rendering. CLI will now refuse to convert a model loaded
  in memory (probably a good idea in any case).

- CLI will offer the `v1-inpainting-inference.yaml` as the configuration
  file when importing an inpainting a .ckpt or .safetensors file that
  has "inpainting" in the name. Otherwise it offers `v1-inference.yaml`
  as the default.
2023-02-10 15:06:37 -05:00
097e41e8d2 2.3.0 Documentation Fixes (#2609)
Found a couple of places where the formatting was messed up. I also
added a "Quick Start Guide" to the README for people who encounter
InvokeAI through PyPi. It features the PyPi install!
2023-02-10 13:00:14 -05:00
4cf43b858d update 020_INSTALL_MANUAL.md
- some formatting changes / fixes
- updates venv creation commands
- remove extra index from Mac Installations
2023-02-10 17:29:12 +01:00
13a4666a6e update README.md
- fix some formatting issues
- fix command to create venv
- some other small updates
2023-02-10 16:27:21 +01:00
9232290950 Initial Implementation - Model Conversion Frontend 2023-02-11 03:53:31 +13:00
f3153d45bc Initial Implementation - Model Conversion Backend 2023-02-11 03:53:15 +13:00
d9cb6da951 Merge branch 'main' into update/docker/include-dockerhub 2023-02-10 09:42:07 -05:00
17535d887f Merge branch 'invoke-ai:main' into main 2023-02-10 07:58:28 +01:00
35da7f5b96 Merge branch 'main' into doc/manual-install-fixes 2023-02-09 21:55:21 -05:00
4e95a68582 adding support for ESRGAN denoising strength (#2598)
pulling in denoising support from upstream (its already there, invoke
just isn't using it). I've enabled this as a command line argument as
construction of the ESRGAN handler happens once. Ideally this would be a
UI option that could be adjusted for each upscaling task. Unfortunately
that is beyond my current level of InvokeAI-foo.

Upstream reference is here, starting on line 99 "use dni to control the
denoise strength"

https://github.com/xinntao/Real-ESRGAN/blob/master/inference_realesrgan.py
2023-02-09 21:55:00 -05:00
9dfeb93f80 add quick install instructions to README 2023-02-09 20:28:20 -05:00
02247ffc79 resolved build (denoise_str) 2023-02-10 14:12:21 +13:00
48da030415 resolving conflicts 2023-02-10 14:03:31 +13:00
817e04bee0 add quickstart instructions for PyPi 2023-02-09 19:37:04 -05:00
e5d0b0c37d Formatting fixes, Manual Installation docs
Found a couple of places where the formatting was messed up. This corrects them.
2023-02-09 17:56:25 -05:00
950f450665 Merge branch 'main' into main 2023-02-10 11:52:26 +13:00
f5d1fbd896 Update main to release v2.3.0 (#2608)
# Release 2.3.0

This will bring `main` up to date with release 2.3.0. I will need
approvals from @mauwii (docs) and @blessedcoolant (for _version.py).
2023-02-09 17:28:55 -05:00
424cee63f1 Merge branch 'main' into release/2.3.0-last-tweaks 2023-02-09 16:36:51 -05:00
79daf8b039 clean build (esrgan-denoise-str) 2023-02-10 10:20:37 +13:00
383cbca896 lint-resolve 2023-02-10 10:16:55 +13:00
07c55d5e2a adds upscaling denoising to metadata viewer 2023-02-10 07:30:17 +11:00
156151df45 build (esrgan-denoise-str) 2023-02-10 09:19:55 +13:00
03b1d71af9 Resolving Conflicts 2023-02-10 09:18:02 +13:00
da193ecd4a ESLint EOL Fix 2023-02-10 09:11:07 +13:00
56fd202e21 builds frontend 2023-02-10 08:24:40 +13:00
29454a2974 Update generationSlice.ts 2023-02-10 08:24:40 +13:00
c977d295f5 Update generationSlice.ts 2023-02-10 08:24:40 +13:00
28eaffa188 Update generationSlice.ts
Added perlin noise state restoration.
2023-02-10 08:24:40 +13:00
3feff09fb3 fixes #2049 use threshold not setting correct value 2023-02-10 08:24:40 +13:00
158d1ef384 bump version number; update contributors 2023-02-09 13:01:08 -05:00
f6ad107fdd Merge branch 'main' into update/ci/prepare-test-invoke-pip-for-queue 2023-02-09 08:48:06 +01:00
e2c392631a build (esrgan-denoise-str) 2023-02-09 20:21:22 +13:00
4a1b4d63ef Change denoise_str default to 0.75 2023-02-09 20:21:09 +13:00
83ecda977c Add frontend UI for denoise_str for ESRGAN 2023-02-09 20:19:25 +13:00
9601febef8 Add denoise_str to ESRGARN - frontend server 2023-02-09 20:16:47 +13:00
0503680efa Change denoise_str to an arg instead of a class variable 2023-02-09 20:16:23 +13:00
57ccec1df3 remove metadata to summary step since secret use
- This PR will also close #2593
2023-02-09 07:24:28 +01:00
22f3634481 Merge branch 'main' into update/docker/include-dockerhub 2023-02-09 07:18:45 +01:00
5590c73af2 Prettified Frontend 2023-02-09 19:16:36 +13:00
1f76b30e54 adding support for ESRGAN denoising strength, which allows for improved detail retention when upscaling photorelistic faces 2023-02-08 22:36:35 -06:00
4785a1cd05 Up version to 2.3.0-rc7 (#2591)
This brings `main` up to date with 2.3.0 release candidate 7.
2023-02-08 22:06:58 -05:00
8bd04654c7 remove Trash folder if existing 2023-02-09 04:00:51 +01:00
2876c4ddec Merge branch 'main' into 2.3.0rc7 2023-02-08 21:40:14 -05:00
0dce3188cc make DOCKERHUB_USERNAME a secret 2023-02-09 03:35:16 +01:00
106c7aa956 bindmount outputs directory to ./docker/outputs 2023-02-09 02:48:12 +01:00
b04f199035 revert caching to main; cache to ref_name 2023-02-09 01:33:08 +01:00
a2b992dfd1 always cache-to main 2023-02-09 01:25:32 +01:00
745e253a78 fix condition of Docker Hub Description step 2023-02-09 01:05:08 +01:00
2ea551d37d create user home, expose port 2023-02-09 00:56:09 +01:00
8d1481ca10 cache from main and ref_name 2023-02-09 00:28:04 +01:00
307e7e00c2 only push if refs/heads/main or refs/tags/* 2023-02-09 00:15:46 +01:00
4bce81de26 blank out lstein's employer info 2023-02-08 18:08:02 -05:00
c3ad1c8a9f remove long sha from container tags 2023-02-09 00:06:09 +01:00
05d51d7b5b re-use --link, lock pip cache 2023-02-08 23:45:15 +01:00
09f69a4d28 Add output when activating venv 2023-02-08 23:39:28 +01:00
a338af17c8 Initialize PIP_CACHE_DIR after setting the env 2023-02-08 23:17:15 +01:00
bc82fc0cdd Merge branch 'invoke-ai:main' into main 2023-02-08 22:46:16 +01:00
418a3d6e41 Merge branch 'main' of https://github.com/ParisNeo/ArtBot 2023-02-08 21:59:58 +01:00
fbcc52ec3d upgréaded arabic localization 2023-02-08 21:59:53 +01:00
47e89f4ba1 Merge branch 'invoke-ai:main' into main 2023-02-08 21:59:27 +01:00
12d15a1a3f Up version to 2.3.0-rc7 2023-02-08 15:55:35 -05:00
888d3ae968 cleanup Dockerfile 2023-02-08 21:54:06 +01:00
a28120abdd small improvements to env.sh 2023-02-08 21:53:57 +01:00
2aad4dab90 Initial Slider & Img2Img=1 Updates (#2467)
Adding a slider for Hi Res Fix to control Img2Img

Updated Img2img to accept values of 1 (replacing Inpaint Replace)
2023-02-08 15:50:44 -05:00
4493d83aea update docker-scripts instructions 2023-02-08 21:35:19 +01:00
eff0fb9a69 add merge_group trigger to test-invoke-pip.yml 2023-02-08 21:23:13 +01:00
c19107e0a8 Merge branch 'main' into Img2Img-Slider-Updates 2023-02-08 15:21:46 -05:00
eaf29e1751 Make menu options in invoke.bat the same as options in invoke.sh (#2588)
- This makes the launcher options menu on Windows look and act the same
as the Linux/Mac launcher, which previously was lacking the command-line
help option and didn't list item (6) as an option.
2023-02-08 15:20:43 -05:00
d964374a91 builds frontend 2023-02-09 07:03:58 +11:00
9826f80d7f Initial Slider & Img2Img=1 Updates 2023-02-09 07:02:39 +11:00
ec89bd19dc Merge branch 'main' into installer/fix-launcher-menu 2023-02-08 14:54:36 -05:00
23aaf54f56 Documentation for 2.3.0 (#2564)
Work in progress. I am reviewing and updating the documentation for
2.3.0. The following sections need to be done:

- [x] index.md
- [x] installation/010_INSTALL_AUTOMATED.md
- [x] installation/020_INSTALL_MANUAL.md
- [x] installation/030_INSTALL_CUDA_AND_ROCM.md (needs to be written
from scratch)
- [x] installation/040_INSTALL_DOCKER.md
- [x] installation/050_INSTALLING_MODELS.md
- [x] features/CLI.md
- [x] features/WEB.md
2023-02-08 14:54:20 -05:00
6d3cc25bca Merge branch 'main' into 2.3-documentation-fixes 2023-02-08 14:29:35 -05:00
c9d246c4ec Update 050_INSTALLING_MODELS.md (#2576)
Using Windows 10 I found I needed to use double backslashes to import a
new model, when using single backslash the output would say
"e:_ProjectsCodemodelsldmstable-diffusion-model-to-import.ckpt is
neither the path to a .ckpt file nor a diffusers repository id. Can't
import." This added tip in the documentation will help Windows users
overcome this.
2023-02-08 14:25:36 -05:00
74406456f2 Fix links (ignored deprecated folder) 2023-02-08 20:07:27 +01:00
8e0cd2df18 add 2.3.0 release date 2023-02-08 14:06:53 -05:00
4d4b1777db Merge branch 'main' into patch-1 2023-02-08 13:59:47 -05:00
d6e5da6e37 deprecated out of date FAQ 2023-02-08 13:58:17 -05:00
5bb0f9bedc update Dockerfile - more simple user creation 2023-02-08 19:57:41 +01:00
dec7d8b160 fix up the features/overview document 2023-02-08 13:52:02 -05:00
4ecf016ace Merge branch 'main' into 2.3-documentation-fixes 2023-02-08 12:47:27 -05:00
4d74af2363 Update docs/installation/030_INSTALL_CUDA_AND_ROCM.md
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2023-02-08 12:46:36 -05:00
c6a2ba12e2 finished CLI, IMG2IMG and WEB updates 2023-02-08 12:45:56 -05:00
350b5205a3 fix crash when --prompt="prompt" is used in CLI (#2579)
- The following were supposed to be equivalent, but the latter crashes:
```
invoke> banana sushi
invoke> --prompt="banana sushi"
```
This PR fixes the problem.

- Fixes #2548
2023-02-08 11:36:20 -05:00
06028e0131 Merge branch 'main' into bugfix/cli-crash-on-prompt-arg 2023-02-08 11:06:48 -05:00
c6d13e679f make menu options in invoke.bat the same as options in invoke.sh
- This makes the launcher options menu on Windows look and act the same
  as the Linux/Mac launcher, which previously was lacking the command-line
  help option and didn't list item (6) as an option.
2023-02-08 11:04:00 -05:00
72357266a6 fixes #2578 use prompt bug on webkit browsers 2023-02-09 02:25:57 +13:00
9d69843a9d fix screenshot directory name 2023-02-08 07:57:46 -05:00
0547d20b2f crop screenshots 2023-02-08 07:54:27 -05:00
2af6b8fbd8 screenshot revision 2023-02-08 07:46:47 -05:00
0cee72dba5 fixes #2525 del hotkey doesn't work after canceling
The `useHotkeys` hook for this hotkey didn't have `isConnected` or `isProcessing` in its dependencies array. This prevented `handleDelete()` from dispatching the delete request.
2023-02-09 01:37:55 +13:00
77c11a42ee fixes #2505 add preserve masked to status text 2023-02-09 01:10:59 +13:00
bf812e6493 hotfix - use context github.ref_name for cache 2023-02-08 11:01:55 +01:00
a3da12d867 Merge branch 'invoke-ai:main' into main 2023-02-08 10:22:48 +01:00
1d62b4210f First draft of CODEOWNERS (#2558)
This is an early draft of a codeowners file for InvokeAI. It has plenty
of gaps in it. Please use this PR to add yourself and others where
appropriate.
2023-02-08 01:13:45 -05:00
d5a3571c00 Merge branch 'main' into dev/codeowner-assignment 2023-02-08 00:46:31 -05:00
8b2ed9b8fd finished work on INSTALLING MODELS 2023-02-08 00:40:21 -05:00
24792eb5da add CUDA and ROCm installation instructions 2023-02-07 23:02:45 -05:00
614220576f add that forward slashes work too 2023-02-07 23:01:59 -05:00
70bcbc7401 Better AMD clarification (#2536)
To better clarify that AMD is supported when using linux
2023-02-07 22:36:40 -05:00
492605ac3e Merge branch 'main' into patch-1 2023-02-07 22:14:39 -05:00
67f892455f fix crash when --prompt="prompt" is used in CLI
- The following were supposed to be equivalent, but the latter crashes:
```
invoke> banana sushi
invoke> --prompt="banana sushi"
```
This PR fixes the problem.

- Fixes #2548
2023-02-07 22:09:34 -05:00
ae689d1a4a add platform-specific help instructions to installer (#2530)
This adds some platform-specific help messages to the installer welcome
screen:

- For Windows, the message encourages them to install VC++ core
libraries and the registry long name patch
- For MacOSX, the message warns the user to install the XCode tools.
2023-02-07 20:47:58 -05:00
10990799db Merge branch 'main' into dev/codeowner-assignment 2023-02-07 20:29:38 -05:00
c5b4397212 Merge branch 'main' into installer/platform-specific-help 2023-02-07 20:25:02 -05:00
f62bbef9f7 Update 050_INSTALLING_MODELS.md
I found I needed to use double backslashes to import a new model, when using single backslash the output would say "e:_ProjectsCodemodelsldmstable-diffusion-model-to-import.ckpt is neither the path to a .ckpt file nor a diffusers repository id. Can't import." This added tip in the documentation will help Windows users overcome this.
2023-02-07 18:19:59 -06:00
6b4a06c3fc Merge branch 'invoke-ai:main' into main 2023-02-08 00:25:49 +01:00
9157da8237 Begun to fill the empty CUDA/ROCm doc
🤡
2023-02-08 00:05:24 +01:00
9c2b9af3a8 Bring main up to 2.3.0-rc6 (#2563)
This bumps up the version number, and also applies a hotfix to the
configure script to fix the problem described in PR #2562
2023-02-07 18:02:13 -05:00
3833b28132 Create a new user for the container runtime
without root permission
2023-02-07 23:46:43 +01:00
e3419c82e8 Merge branch 'main' into patch-1 2023-02-07 17:45:15 -05:00
65f3d22649 Merge branch 'main' into dev/codeowner-assignment 2023-02-07 17:44:37 -05:00
39b0288595 Merge branch 'main' into 2.3.0rc6 2023-02-07 17:43:38 -05:00
13d12a0ceb Merge branch 'main' into 2.3-documentation-fixes 2023-02-07 17:08:10 -05:00
b92dc8db83 add developer install instructions 2023-02-07 17:04:01 -05:00
b49188a39d doc updates; clean up install directory
- Large rewrite of documentation for automated and manual install.
- Reorganize installer zip file to reduce visual clutter for user.
2023-02-07 16:35:22 -05:00
b9c8270ee6 update manual install doc 2023-02-07 14:19:55 -05:00
f0f3520bca Switch to using max for attention slicing in all cases for the time being. (#2569) 2023-02-07 19:28:57 +01:00
e8f9ab82ed Merge branch 'invoke-ai:main' into main 2023-02-07 18:48:47 +01:00
6ab364b16a build frontend 2023-02-07 17:06:47 +01:00
a4dc11addc switch to @vitejs/plugin-react-swc 2023-02-07 17:06:47 +01:00
0372702eb4 remove unneeded polyfill 2023-02-07 17:06:47 +01:00
aa8eeea478 update app build configuration 2023-02-07 17:06:47 +01:00
e54ecc4c37 build (vite-4-code-quality) 2023-02-07 17:06:47 +01:00
4a12c76097 Remove build-dev 2023-02-07 17:06:47 +01:00
be72faf78e Upgrade to Vite 4 2023-02-07 17:06:46 +01:00
28d44d80ed Rebase Fix - ModelSelect 2023-02-07 17:06:46 +01:00
9008d9996f builds frontend 2023-02-07 17:06:46 +01:00
be2a9b78bb fixes rebase issues 2023-02-07 17:06:46 +01:00
70003ee5b1 feat: add copy image in share menu 2023-02-07 17:06:46 +01:00
45a5ccba84 Updates code quality tooling and formats codebase
- `eslint` and `prettier` configs
- `husky` to format and lint via pre-commit hook
- `babel-plugin-transform-imports` to treeshake `lodash` and other packages if needed

Lints and formats codebase.
2023-02-07 17:06:46 +01:00
f80a64a0f4 Reorganises internal state
`options` slice was huge and managed a mix of generation parameters and general app settings. It has been split up:

- Generation parameters are now in `generationSlice`.
- Postprocessing parameters are now in `postprocessingSlice`
- UI related things are now in `uiSlice`

There is probably more to be done, like `gallerySlice` perhaps should only manage internal gallery state, and not if the gallery is displayed.

Full-slice selectors have been made for each slice.

Other organisational tweaks.
2023-02-07 17:06:46 +01:00
511df2963b remove debugging statement 2023-02-07 17:06:46 +01:00
f92f62a91b enhance model_manager support for converting inpainting ckpt files
Previously conversions of .ckpt and .safetensors files to diffusers
models were failing with channel mismatch errors. This is corrected
with this PR.

- The model_manager convert_and_import() method now accepts the path
  to the checkpoint file's configuration file, using the parameter
  `original_config_file`. For inpainting files this should be set to
  the full path to `v1-inpainting-inference.yaml`.

- If no configuration file is provided in the call, then the presence
  of an inpainting file will be inferred at the
  `ldm.ckpt_to_diffuser.convert_ckpt_to_diffUser()` level by looking
  for the string "inpaint" in the path. AUTO1111 does something
  similar to this, but it is brittle and not recommended.

- This PR also changes the model manager model_names() method to return
  the model names in case folded sort order.
2023-02-07 17:06:45 +01:00
3efe9899c2 build frontend 2023-02-08 01:53:34 +13:00
bdbe4660fc switch to @vitejs/plugin-react-swc 2023-02-08 01:53:34 +13:00
8af9432f63 remove unneeded polyfill 2023-02-08 01:53:34 +13:00
668d9cdb9d update app build configuration 2023-02-08 01:53:34 +13:00
90f5811e59 build (vite-4-code-quality) 2023-02-08 01:53:34 +13:00
15d21206a3 Remove build-dev 2023-02-08 01:53:34 +13:00
b622286f17 Upgrade to Vite 4 2023-02-08 01:53:34 +13:00
176add58b2 Rebase Fix - ModelSelect 2023-02-08 01:53:34 +13:00
33c5f5a9c2 builds frontend 2023-02-08 01:53:34 +13:00
2b7752b72e fixes rebase issues 2023-02-08 01:53:34 +13:00
5478d2a15e feat: add copy image in share menu 2023-02-08 01:53:34 +13:00
9ad76fe80c Updates code quality tooling and formats codebase
- `eslint` and `prettier` configs
- `husky` to format and lint via pre-commit hook
- `babel-plugin-transform-imports` to treeshake `lodash` and other packages if needed

Lints and formats codebase.
2023-02-08 01:53:34 +13:00
d74c4009cb Reorganises internal state
`options` slice was huge and managed a mix of generation parameters and general app settings. It has been split up:

- Generation parameters are now in `generationSlice`.
- Postprocessing parameters are now in `postprocessingSlice`
- UI related things are now in `uiSlice`

There is probably more to be done, like `gallerySlice` perhaps should only manage internal gallery state, and not if the gallery is displayed.

Full-slice selectors have been made for each slice.

Other organisational tweaks.
2023-02-08 01:53:34 +13:00
ffe0e81ec9 Support conversion of inpainting ckpt files to diffusers (#2550)
#     enhance model_manager support for converting inpainting ckpt files
    
Previously conversions of .ckpt and .safetensors files to diffusers
    models were failing with channel mismatch errors. This is corrected
    with this PR.
    
 - The model_manager convert_and_import() method now accepts the path
      to the checkpoint file's configuration file, using the parameter
      `original_config_file`. For inpainting files this should be set to
      the full path to `v1-inpainting-inference.yaml`.
    
- If no configuration file is provided in the call, then the presence
      of an inpainting file will be inferred at the
      `ldm.ckpt_to_diffuser.convert_ckpt_to_diffUser()` level by looking
      for the string "inpaint" in the path. AUTO1111 does something
      similar to this, but it is brittle and not recommended.
    
- This PR also changes the model manager model_names() method to return
      the model names in case folded sort order.
2023-02-07 07:25:30 -05:00
bdf683ec41 Merge branch 'main' into enhance/convert-inpaint-models 2023-02-07 06:59:35 -05:00
7f41893da4 set scope for caches 2023-02-07 09:27:20 +01:00
42da4f57c2 update .dockerignore 2023-02-07 09:27:20 +01:00
c2e11dfe83 update build-container.yml
- add long sha tag
- update cache-from
Dockerfile:
- re-use `apt-get update`
env.sh/build.sh:
- rename platform to lowercase
2023-02-07 09:27:20 +01:00
17e1930229 remove CONTAINER_FLAVOR build arg
also disable currently unused PIP_PACKAGE build arg
will start using it when problems with XFORMERS are sorted out
2023-02-07 09:27:20 +01:00
bde94347d3 don't use --linkin COPY 2023-02-07 09:27:20 +01:00
b1612afff4 update .dockerignore 2023-02-07 09:27:20 +01:00
1d10d952b2 use cleartext DOCKERHUB_USERNAME 2023-02-07 09:27:20 +01:00
9150f9ef3c move LABEL to top 2023-02-07 09:27:20 +01:00
7bc0f7cc6c update Docker Hub description 2023-02-07 09:27:20 +01:00
c52d11b24c optionally push to DockerHub 2023-02-07 09:27:20 +01:00
59486615dd update build-container.yml 2023-02-07 09:27:20 +01:00
f0212cd361 update Dockerfile 2023-02-07 09:27:20 +01:00
ee4cb5fdc9 add id to Build container 2023-02-07 09:27:20 +01:00
75b919237b update cache-from 2023-02-07 09:27:20 +01:00
07a9062e1f update .dockerignore and scripts 2023-02-07 09:27:20 +01:00
cdb3e18b80 add flavor to pip cache id
to prevent cache invalidation
2023-02-07 09:27:20 +01:00
28a5424242 Update textual inversion doc with the correct CLI name. (#2560) 2023-02-07 01:22:03 -05:00
8d418af20b Merge branch 'main' into ti-doc-update 2023-02-07 00:59:53 -05:00
055badd611 Diffusers Samplers (#2565)
- Diffusers Sampler list is independent from CKPT Sampler list. And the
app will load the correct list based on what model you have loaded.
- Isolated the activeModelSelector coz this is used in multiple places.
- Possible fix to the white screen bug that some users face. This was
happening because of a possible null in the active model list
description tag. Which should hopefully now be fixed with the new
activeModelSelector.

I'll keep tabs on the last thing. Good to go.
2023-02-07 00:59:32 -05:00
944f9e98a7 build (diffusers-samplers) 2023-02-07 18:29:14 +13:00
fcffcf5602 Diffusers Samplers
DIsplay sampler list based on the active model.
2023-02-07 18:26:06 +13:00
f121dfe120 Update model select to use new active model selector
Hopefully this also fixes the white screen error that some users face.
2023-02-07 18:25:45 +13:00
a7dd7b4298 Add activeModelSelector
Active Model details are used in multiple places. So makes sense to have a selector for it.
2023-02-07 18:25:12 +13:00
d94780651c Merge branch 'main' into patch-1 2023-02-07 00:07:31 -05:00
d26abd7f01 add empty CUDA/ROCM install guide 2023-02-07 00:04:56 -05:00
7e2b122105 updated manual install instructions 2023-02-06 23:59:48 -05:00
8a21fc1c50 bump version to 2.3.0-rc6 2023-02-06 23:36:49 -05:00
275d5040f4 Merge branch 'bugfix/configure-script' into 2.3.0rc6 2023-02-06 23:35:32 -05:00
1b5930dcad do not merge diffusers and ckpt stanzas 2023-02-06 23:23:07 -05:00
d5810f6270 Bring main up to date with RC5 (#2555)
Updated the version number
2023-02-06 22:23:58 -05:00
ebc51dc535 incomplete work on manual install 2023-02-06 21:47:29 -05:00
ac6e9238f1 Merge branch 'main' into ti-doc-update 2023-02-06 20:06:33 -05:00
01eb93d664 Added Arabic Localisation 2023-02-07 00:42:09 +01:00
89f69c2d94 Merge branch 'main' of https://github.com/ParisNeo/ArtBot 2023-02-07 00:29:33 +01:00
dc6f6fcab7 Added arabic locale files 2023-02-07 00:29:30 +01:00
6343b245ef Update textual inversion doc with the correct CLI name. 2023-02-06 14:51:22 -08:00
8c80da2844 Merge branch 'main' into 2.3.0rc5 2023-02-06 17:38:25 -05:00
a12189e088 fix build-container.yml (#2557)
This should fix the build-container workflow when triggered by a Tag
(that it is failing was mentioned in #2555 )
2023-02-06 15:09:04 -05:00
472c97e4e8 Merge branch 'main' into patch-1 2023-02-06 22:05:47 +02:00
5baf0ae755 add mkdocs.yml and pyproject.toml
also make docs separate header
2023-02-06 20:47:20 +01:00
a56e3014a4 Merge branch 'main' into update/ci/refine-build-container 2023-02-06 14:42:02 -05:00
f3eff38f90 add tildebyte areas 2023-02-06 14:38:42 -05:00
53d2d34b3d Merge branch 'main' into 2.3.0rc5 2023-02-06 14:34:16 -05:00
ede7d1a8f7 first draft of codeowners 2023-02-06 14:33:46 -05:00
ac23a321b0 build (hires-strength-slider) 2023-02-07 08:22:39 +13:00
f52b233205 Add Hi Res Strength Slider 2023-02-07 08:22:39 +13:00
8242fc8bad update metadata 2023-02-06 19:58:48 +01:00
09b6f7572b Merge branch 'invoke-ai:main' into main 2023-02-06 19:50:40 +01:00
bde6e96800 Merge branch 'main' into 2.3.0rc5 2023-02-06 12:55:47 -05:00
13474e985b Merge branch 'main' into patch-1 2023-02-06 12:54:07 -05:00
28b40bebbe Refactor CUDA cache clearing to add statistical reporting. (#2553) 2023-02-06 12:53:30 -05:00
1c9fd00f98 this is likely the penultimate rc 2023-02-06 12:03:08 -05:00
8ab66a211c force torch reinstall (#2532)
For the torch and torchvision libraries **only**, the installer will now
pass the pip `--force-reinstall` option. This is intended to fix issues
with the user getting a CPU-only version of torch and then not being
able to replace it.
2023-02-06 11:58:57 -05:00
bc03ff8b30 Merge branch 'main' into install/force-torch-reinstall 2023-02-06 11:31:57 -05:00
0247d63511 Build (negative-prompt-box) 2023-02-07 05:21:09 +13:00
7604b36577 Add Negative Prompts Box 2023-02-07 05:21:09 +13:00
4a026bd46e Organize language picker items alphabetically 2023-02-07 05:21:09 +13:00
6241fc19e0 Fix the model manager edit placeholder not being full height 2023-02-07 05:21:09 +13:00
25d7d71dd8 Slightly decrease the size of the tab list icons 2023-02-07 05:21:09 +13:00
2432adb38f In exception handlers, clear the torch CUDA cache (if we're using CUDA) to free up memory for other programs using the GPU and to reduce fragmentation. (#2549) 2023-02-06 10:33:24 -05:00
91acae30bf Merge branch 'main' into patch-1 2023-02-06 10:14:27 -05:00
ca749b7de1 remove debugging statement 2023-02-06 09:45:21 -05:00
7486aa8608 enhance model_manager support for converting inpainting ckpt files
Previously conversions of .ckpt and .safetensors files to diffusers
models were failing with channel mismatch errors. This is corrected
with this PR.

- The model_manager convert_and_import() method now accepts the path
  to the checkpoint file's configuration file, using the parameter
  `original_config_file`. For inpainting files this should be set to
  the full path to `v1-inpainting-inference.yaml`.

- If no configuration file is provided in the call, then the presence
  of an inpainting file will be inferred at the
  `ldm.ckpt_to_diffuser.convert_ckpt_to_diffUser()` level by looking
  for the string "inpaint" in the path. AUTO1111 does something
  similar to this, but it is brittle and not recommended.

- This PR also changes the model manager model_names() method to return
  the model names in case folded sort order.
2023-02-06 09:35:23 -05:00
0402766f4d add author label 2023-02-06 14:05:27 +01:00
a9ef5d1532 update tags 2023-02-06 14:05:27 +01:00
a485d45400 Update test-invoke-pip.yml (#2524)
test-invoke-pip.yml:
- enable caching of pip dependencies in `actions/setup-python@v4`
- add workflow_dispatch trigger
- fix indentation in concurrency
- set env `PIP_USE_PEP517: '1'`
- cache python dependencies
- remove models cache (since we currently use 190.96 GB of 10 GB while I
am writing this)
- add step to set `INVOKEAI_OUTDIR`
- add outdir arg to invokeai
- fix path in archive results

model_manager.py:
- read files in chunks when calculating sha (windows runner is crashing
otherwise)
2023-02-06 12:56:15 +01:00
a40bdef29f update model_manager.py
- read files in chunks when calculating sha
  - windows runner is crashing without
2023-02-06 12:30:10 +01:00
fc2670b4d6 update test-invoke-pip.yml
- add workflow_dispatch trigger
- fix indentation in concurrency
- set env `PIP_USE_PEP517: '1'`
- cache python dependencies
- remove models cache (since currently 183.59 GB of 10 GB are Used)
- add step to set `INVOKEAI_OUTDIR`
- add outdir arg to invokeai
- fix path in archive results
2023-02-06 12:30:10 +01:00
f0cd1aa736 highlight key elements of installer welcome message
- help users to avoid glossing over per-platform prerequisites
- better link colouring
- update link to community instructions to install xcode command line tools
2023-02-06 00:57:29 -05:00
c3807b044d Merge branch 'main' into install/force-torch-reinstall 2023-02-06 00:18:38 -05:00
b7ab025f40 Update base.py (#2543)
Free up CUDA cache right after each image is generated. VRAM usage drops down to pre-generation levels.
2023-02-06 05:14:35 +00:00
633f702b39 fix crash in txt2img and img2img w/ inpainting models and perlin > 0 (#2544)
- get_perlin_noise() was returning 9 channels; fixed code to return
noise for just the 4 image channels and not the mask ones.

- Closes Issue #2541
2023-02-05 23:50:32 -05:00
3969637488 remove misleading completion message from merge_diffusers 2023-02-05 23:39:43 -05:00
658ef829d4 tweak initial model descriptions 2023-02-05 23:23:09 -05:00
0240656361 fix crash in txt2img and img2img w/ inpainting models and perlin > 0
- get_perlin_noise() was returning 9 channels; fixed code to return
  noise for just the 4 image channels and not the mask ones.

- Closes Issue #2541
2023-02-05 22:55:08 -05:00
719a5de506 Merge branch 'main' into patch-1 2023-02-05 21:43:13 -05:00
05bb9e444b update pypi_helper.py (#2533)
- dont rename requests
- remove dash in verison (`2.3.0-rc3` becomes `2.3.0rc3`)
- read package_name instead of hardcode it
2023-02-06 03:34:52 +01:00
0076757767 Merge branch 'main' into dev/ci/update-pypi-helper 2023-02-05 21:10:49 -05:00
6ab03c4d08 fix crash in both textual_inversion and merge front ends when not enough models defined (#2540)
- Issue is that if insufficient diffusers models are defined in
models.yaml the frontend would ungraciously crash.

- Now it emits appropriate error messages telling user what the problem
is.
2023-02-05 19:34:07 -05:00
142016827f fix formatting bugs in both textual_inversion and merge front ends
- Issue is that if insufficient diffusers models are defined in
  models.yaml the frontend would ungraciously crash.

- Now it emits appropriate error messages telling user what the problem
  is.
2023-02-05 18:35:01 -05:00
466a82bcc2 Updates frontend README.md (#2539) 2023-02-05 17:25:25 -05:00
05349f6cdc Merge branch 'main' into dev/ci/update-pypi-helper 2023-02-05 17:13:09 -05:00
ab585aefae Update README.md 2023-02-06 09:07:44 +11:00
083ce9358b hotfix build-container.yml (#2537)
fix broken tag
2023-02-05 22:30:23 +01:00
f56cf2400a Merge branch 'main' into install/force-torch-reinstall 2023-02-05 15:40:35 -05:00
5de5e659d0 Better AMD clarification
To better clarify that AMD is supported when using linux
2023-02-05 12:29:50 -08:00
fc53f6d47c hotfix build-container.yml 2023-02-05 21:25:44 +01:00
2f70daef8f Issue/2487/address docker issues (#2517)
Address issues of #2487
2023-02-05 21:20:13 +01:00
fc2a136eb0 add requested change 2023-02-05 21:15:39 +01:00
ce3da40434 Merge branch 'main' into install/force-torch-reinstall 2023-02-05 15:01:56 -05:00
7933f27a72 update pypi_helper.py`
- dont rename requests
- remove dash in verison (`2.3.0-rc3` becomes `2.3.0rc3`)
- read package_name instead of hardcode it
2023-02-05 20:45:31 +01:00
1c197c602f update Dockerfile, .dockerignore and workflow
- dont build frontend since complications with QEMU
- set pip cache dir
- add pip cache to all pip related build steps
- dont lock pip cache
- update dockerignore to exclude uneeded files
2023-02-05 20:20:50 +01:00
90656aa7bf update Dockerfile
- add build arg `FRONTEND_DIR`
2023-02-05 20:20:50 +01:00
394b4a771e update Dockerfile
- remove yarn install args `--prefer-offline` and `--production=false`
2023-02-05 20:20:50 +01:00
9c3f548900 update settings output in build.sh 2023-02-05 20:20:50 +01:00
5662d2daa8 add invokeai/frontend/dist/** to .dockerignore 2023-02-05 20:20:50 +01:00
fc0f966ad2 fix docs 2023-02-05 20:20:50 +01:00
eb702a5049 fix env.sh, update Dockerfile, update build.sh
env.sh:
- move check for torch to CONVTAINER_FLAVOR detection

Dockerfile
- only mount `/var/cache/apt` for apt related steps
- remove `docker-clean` from `/etc/apt/apt.conf.d` for BuildKit cache
- remove apt-get clean for BuildKit cache
- only copy frontend to frontend-builder
- mount `/usr/local/share/.cache/yarn` in frountend-builder
- separate steps for yarn install and yarn build
- build pytorch in pyproject-builder

build.sh
- prepare for installation with extras
2023-02-05 20:20:50 +01:00
1386d73302 fix env.sh
only try to auto-detect CUDA/ROCm if torch is installed
2023-02-05 20:20:50 +01:00
6089f33e54 fix HUGGING_FACE_HUB_TOKEN 2023-02-05 20:20:50 +01:00
3a260cf54f update directory from docker-build to docker 2023-02-05 20:20:50 +01:00
9949a438f4 update docs with newly added variables
also remove outdated information
2023-02-05 20:20:50 +01:00
84c1122208 fix build.sh and env.sh 2023-02-05 20:20:50 +01:00
cc3d431928 2.3.0rc4 (#2514)
This will bring main up to date with v2.3.0-rc4
2023-02-05 14:05:15 -05:00
c44b060a2e Merge branch 'main' into 2.3.0rc4 2023-02-05 13:40:56 -05:00
eff7fb89d8 installer will --force-reinstall torch 2023-02-05 13:39:46 -05:00
cd5c112fcd Allow multiple models to be imported by passing a directory. (#2529)
This change allows passing a directory with multiple models in it to be
imported.

Ensures that diffusers directories will still work.

Fixed up some minor type issues.
2023-02-05 13:36:00 -05:00
563867fa99 Merge branch 'main' into main 2023-02-05 12:51:03 -05:00
2e230774c2 Merge branch 'main' into 2.3.0rc4 2023-02-05 12:44:44 -05:00
9577410be4 add platform-specific help instructions to installer 2023-02-05 12:43:13 -05:00
4ada4c9f1f Add --log_tokenization to sysargs (#2523)
This allows the --log_tokenization option to be used as a command line
argument (or from invokeai.init), making it possible to view
tokenization information in the terminal when using the web interface.
2023-02-05 11:55:26 -05:00
9a6966924c Merge branch 'main' into main 2023-02-06 05:33:48 +13:00
0d62525f3d reword help message slightly 2023-02-05 08:11:02 -08:00
2ec864e37e Allow multiple models to be imported by passing a directory. 2023-02-05 08:11:02 -08:00
9307ce3dc3 this fixes a crash in the TI frontend (#2527)
- This fixes an edge case crash when the textual inversion frontend
  tried to display the list of models and no default model defined
  in models.yaml

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
2023-02-05 16:05:33 +00:00
15996446e0 Merge branch 'main' into 2.3.0rc4 2023-02-05 10:54:53 -05:00
7a06c8fd89 Merge branch 'main' into main 2023-02-06 04:43:49 +13:00
4895fe8395 fix crash when text mask applied to img2img (#2526)
This PR fixes the crash reported at https://discord.com/channels/1020123559063990373/1031668022294884392/1071782238137630800

It also quiets-down the "NSFW is disabled" nag during img2img generation.
2023-02-05 15:26:40 +00:00
1e793a2dfe Merge branch 'main' into 2.3.0rc4 2023-02-05 10:24:09 -05:00
9c8fcaaf86 Beautify & Cleanup WebUI Logs 2023-02-05 22:55:57 +13:00
bf4344be51 Beautify Usage Stats Log 2023-02-05 22:55:40 +13:00
f7532cdfd4 Beautify Token Log Outputs 2023-02-05 22:55:29 +13:00
f1dd76c20b Remove Deprecation Warning from Diffusers Pipeline 2023-02-05 22:55:10 +13:00
3016eeb6fb Merge branch 'invoke-ai:main' into main 2023-02-04 22:56:59 -05:00
75b62d6ca8 Add --log_tokenization to sysargs
This allows the --log_tokenization option to be used as a command line argument (or from invokeai.init), making it possible to view tokenization information in the terminal when using the web interface.
2023-02-04 19:56:20 -08:00
82ae2769c8 Configuration script tidying up (#2513)
- Rename configure_invokeai.py to invokeai_configure.py to be consistent
with installed script name
- Remove warning message about half-precision models not being available
during the model download process.
- adjust estimated file size reported by configure
- guesstimate disk space needed for "all" models
- fix up the "latest" tag to be named 'v2.3-latest'
2023-02-04 21:58:56 -05:00
61149abd2f Merge branch 'main' into lstein/normalize-names 2023-02-04 21:41:22 -05:00
eff126af6e Merge branch 'main' into 2.3.0rc4 2023-02-04 21:40:47 -05:00
0ca499cf96 Add workflow for PyPI Release (#2516) 2023-02-05 00:31:00 +01:00
3abf85e658 fix conditions
workflow will only run in official repo
2023-02-04 23:58:07 +01:00
5095285854 fix pypi-release.yml 2023-02-04 23:46:10 +01:00
93623a4449 add conditions to check for Repo and Secret 2023-02-04 23:22:23 +01:00
0197459b02 change back to current version 2023-02-04 23:07:20 +01:00
1578bc68cc change version to test workflow 2023-02-04 23:06:29 +01:00
4ace397a99 remove debug steps 2023-02-04 23:05:29 +01:00
d85a710211 rename pypi_helper.py 2023-02-04 23:00:39 +01:00
536d534ab4 add pypi-release.yml and pypi-helper.py 2023-02-04 22:58:21 +01:00
fc752a4e75 move old .venv directory away during install
- To ensure a clean environment, the installer will now detect whether a
  previous .venv exists in the install location, and move it to .venv-backup
  before creating a fresh .venv.

- Any previous .venv-backup is deleted.

- User is informed of process.
2023-02-04 16:14:29 -05:00
3c06d114c3 fix name of latest tag 2023-02-04 14:04:24 -05:00
00d79c1fe3 bump version number to rc4 2023-02-04 14:00:58 -05:00
60213893ab configuration script tidying up
- Rename configure_invokeai.py to invokeai_configure.py to be
  consistent with installed script name
- Remove warning message about half-precision models not being
  available during the model download process.

- adjust estimated file size reported by configure

- guesstimate disk space needed for "all" models

- fix up the "latest" tag to be named 'v2.3-latest'
2023-02-04 13:55:36 -05:00
3b58413d9f Fixes PYTORCH_ENABLE_MPS_FALLBACK not set correctly (#2508)
`torch` wasn't seeing the environment variable. I suspect this is
because it was imported before the variable was set, so was running with
a different environment.

Many `torch` ops are supported on MPS so this wasn't noticed
immediately, but some samplers like k_dpm_2 still use unsupported
operations and need this fallback.
2023-02-04 11:32:52 -05:00
1139884493 Merge branch 'main' into fix/mps-fallback 2023-02-04 11:11:59 -05:00
17e8f966d0 Fix registration of text masks (#2501)
- Scale and crop not applied correctly
- Problem found and fixed by @spezialspezial
- Closes #2470
2023-02-04 10:48:27 -05:00
a42b25339f Merge branch 'main' into bugfix/txt2mask 2023-02-04 10:25:30 -05:00
1b0731dd1a use torch-cu117 from download.torch.org rather than pypi (#2492)
This PR forces the installer to install the official torch-cu117 wheel
from download.torch.org, rather than relying on PyPi.org to return the
correct version. It ought to correct the problems that some people have
experienced with cuda support not being installed.
2023-02-04 10:04:22 -05:00
61c3886843 Merge branch 'main' into bugfix/use-cu117-wheel 2023-02-04 09:43:52 -05:00
f76d57637e Fix bugs in merge and convert process (#2491)
1. The convert module was converting ckpt models into
StableDiffusionGeneratorPipeline objects for use in-memory, but then
when saved to disk created files that could not be merged with
StableDiffusionPipeline models. I have added a flag that selects which
pipeline class to return, so that both in-memory and disk conversions
work properly.

2. This PR also fixes an issue with `invoke.sh` not using the correct
path for the textual inversion and merge scripts.

3. Quench nags during the merge process about the safety checker being
turned off.
2023-02-04 09:40:09 -05:00
6bf73a0cf9 Merge branch 'main' into bugfix/use-cu117-wheel 2023-02-04 09:17:45 -05:00
5145df21d9 Merge branch 'main' into bugfix/merge-fixes 2023-02-04 09:17:01 -05:00
e96ac61cb3 Add Ukranian Localization (#2486)
* Add Ukranian & Update Italian

* Frontend Build (Ukranian Localization)

* Update invokeai/frontend/dist/locales/hotkeys/ua.json

Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>

* UA Localization Fixes

* Build (ua-fixes)

* Clean Build

* Clear Build

* Clean Build (resolving main conflicts)

* Clear Build

* Frontend Build (ua-localization-rebased)

---------

Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2023-02-05 00:24:24 +13:00
0e35d829c1 Build (french-localization) 2023-02-04 23:14:25 +13:00
d08f048621 Add French Localization 2023-02-04 23:14:25 +13:00
cfd453c1c7 Added French localization 2023-02-04 23:14:25 +13:00
6ca177e462 Added French localization 2023-02-04 09:54:30 +01:00
a1b1a48fb3 Fixes PYTORCH_ENABLE_MPS_FALLBACK not set correctly
`torch` wasn't seeing the environment variable. I suspect this is because it was imported before the variable was set, so was running with a different environment.

Many `torch` ops are supported on MPS so this wasn't noticed immediately, but some samplers like k_dpm_2 still use unsupported operations and need this fallback.
2023-02-04 17:27:33 +11:00
b5160321bf fix finding the wheel when running from outside the installer directory
in case of calling python script instead of shell
2023-02-03 23:50:57 -05:00
0cc2a8176e bump version 2023-02-03 23:50:57 -05:00
9ac81c1dc4 change latest tag to v2.2.3-latest, won\'t conflict with 2.2.5 latest tag 2023-02-03 23:50:57 -05:00
50191774fc this fixes an issue when the install script is called outside its directory
- Also reimplements the python-path finding logic of the older install.sh script.
2023-02-03 23:50:57 -05:00
fcd9b813e3 Merge branch 'main' into bugfix/use-cu117-wheel 2023-02-03 23:13:22 -05:00
813f92a1ae do not install the "update" script
- The update script doesn't work yet, so we shouldn't install it.
- For now, users update by re-running the installer.
2023-02-03 20:26:10 -05:00
0d141c1d84 small f-string syntax fix in generate.py (#2483)
Probably low priority, but helps the error message be more clear by
hopefully displaying model_name.
2023-02-03 18:29:50 -05:00
2e3cd03b27 Merge branch 'main' into bugfix/use-cu117-wheel 2023-02-03 18:15:54 -05:00
4500c8b244 Merge branch 'main' into patch-2 2023-02-03 18:03:29 -05:00
d569c9dec6 remove dead code 2023-02-03 17:35:35 -05:00
01a2b8c05b Adapt latest changes to Dockerfile (#2478)
* remove non maintained Dockerfile

* adapt Docker related files to latest changes
- also build the frontend when building the image
- skip user response if INVOKE_MODEL_RECONFIGURE is set
- split INVOKE_MODEL_RECONFIGURE to support more than one argument

* rename `docker-build` dir to `docker`

* update build-container.yml
- rename image to invokeai
- add cpu flavor
- add metadata to build summary
- enable caching
- remove build-cloud-img.yml

* fix yarn cache path, link copyjob
2023-02-03 22:34:47 +00:00
b23664c794 registration of mask images was off due to typo
- Problem found and fixed by @spezialspezial
- Closes #2470
2023-02-03 17:32:35 -05:00
f06fefcacc Merge branch 'main' into patch-2 2023-02-03 17:15:29 -05:00
7fa3a499bb fix crash on Windows10 when configure script given no HF token
Crashes would occur in the invokeai-configure script if no HF token
was found in cache and the user declines to provide one when prompted.
The reason appears to be that on Linux systems getpass_asterisk()
raises an EOFError when no input is provided

On windows10, getpass_asterisk() does not raise the EOFError, but
returns an empty string instead. This patch detects this and raises
the exception so that the control logic is preserved.
2023-02-03 16:06:49 -05:00
c50b64ec1d correct default menu entry in install.bat file 2023-02-03 13:30:21 -05:00
76b0bdb6f9 Fix: upgrade fails if existing venv was created with symlinks (#2489)
if reinstalling over an existing installation where the .venv was
created with symlinks to system python instead of copies of the python
executable, the installer would raise a `SameFileError`, because it
would attempt to copy Python over itself. This fixes the issue.

Copying the executable is still preferred for new environments, because
this guarantees the stable Python version.
2023-02-03 13:29:20 -05:00
b0ad109886 Merge branch 'main' into fix-samefile 2023-02-03 13:02:01 -05:00
66b312c353 enhance console gui for invokeai-merge (#2480)
- Added modest adaptive behavior; if the screen is wide enough the three
checklists of models will be arranged in a horizontal row.
- Added color support
# What it looks like
On a wide window:

![image](https://user-images.githubusercontent.com/111189/216495149-0ceed761-b829-4b21-8e90-0b7faf2c7b72.png)
On a narrow window:

![image](https://user-images.githubusercontent.com/111189/216495239-1d6615cf-0e7e-44fe-83d7-513819635d8a.png)
2023-02-03 13:00:16 -05:00
fc857f9d91 Merge branch 'main' into lstein/enhance-merge-models-gui 2023-02-03 12:36:23 -05:00
d6bd0cbf61 Bugfixes for path finding during manual install (#2490)
- fixes bug in finding the source of the configs dir;
- updates the docs for manual install to clarify the preference to
keeping the `.venv` inside the runtime dir, and the caveat/extra steps
required if done otherwise
2023-02-03 11:02:47 -05:00
a32f6e9ea7 use torch-cu117 from download.torch.org rather than pypi 2023-02-03 10:57:15 -05:00
b41342a779 Merge branch 'main' into bugfix/config-manual-install 2023-02-03 10:28:18 -05:00
7603c8982c feat: add copy image in share menu (#2484)
<img width="233" alt="Screenshot 2023-02-03 at 12 11 46"
src="https://user-images.githubusercontent.com/70191398/216510761-3e5013a3-5346-45d4-92e5-d913d035f1bc.png">
2023-02-03 10:27:54 -05:00
d351e365d6 Merge branch 'main' into lstein/enhance-merge-models-gui 2023-02-03 10:27:32 -05:00
d453afbf6b Merge branch 'main' into fix-samefile 2023-02-03 10:27:03 -05:00
9ae55c91cc quench safety checker warnings from diffusers 2023-02-03 10:14:51 -05:00
9e46badc40 convert no longer creates StableDiffusionGenerator pipelines unless asked to 2023-02-03 10:04:32 -05:00
ca0f3ec0e4 fix launcher shell script to use correct names for ti and merge functions 2023-02-03 09:45:57 -05:00
4b9be6113d (docs) remove an obsolete symlink to a documentation file 2023-02-03 09:01:54 -05:00
31964c7c4c (docs) remove an obsolete manual install doc 2023-02-03 09:01:30 -05:00
64f9fbda2f (docs) update manual install documentation 2023-02-03 08:51:46 -05:00
3ece2f19f0 Merge branch 'main' into share-copy-image 2023-02-04 00:46:48 +11:00
c38b0b906d (config) fix invokeai-configure path handling after manual install 2023-02-03 08:06:27 -05:00
c79678a643 prevent crash when no default model defined 2023-02-03 02:27:50 -05:00
2217998010 remove the environments-and-requirements directory 2023-02-03 01:49:30 -05:00
3b43f3a5a1 (installer) fix failure to create venv over an existing venv
if reinstalling over an existing installation where the .venv
was created with symlinks to system python instead of copies
of the python executable, the installer would raise a
SameFileError, because it would attempt to copy Python over
itself. This fixes the issue.
2023-02-03 00:36:28 -05:00
3f193d2b97 attempted correction of white screen issue 2023-02-02 23:47:55 -05:00
9fe660c515 feat: add copy image in share menu 2023-02-03 12:10:33 +08:00
16356d5225 small f-string fix in generate.py
Probably low priority, but helps the error message be more clear by hopefully displaying model_name.
2023-02-02 19:33:17 -08:00
e04cb70c7c rebuild front end 2023-02-02 21:55:01 -05:00
ddd5137cc6 Update version 2023-02-02 21:17:53 -05:00
b9aef33ae8 enhance console gui for invokeai-merge
- Added modest adaptive behavior; if the screen is wide enough the three
  checklists of models will be arranged in a horizontal row.
- Added color support
2023-02-02 20:26:45 -05:00
797e2f780d Add python version warning from the docs
Just a quick update about Python 3.11.
2023-02-02 19:28:49 -05:00
0642728484 remove requirements step from install manual (#2442)
removing the step to link the requirements file from the docs for manual
Installation after commenting about it in #2431
2023-02-02 16:50:29 -05:00
fe9b4f4a3c Merge branch 'main' into update/docs/remove-requirements-step 2023-02-02 16:14:45 -05:00
756e50f641 Installer rewrite in Python (#2448)
## Summary

This PR rewrites the core of the installer in Python for cross-platform
compatibility. Filesystem path manipulation, platform/arch decisions and
various edge cases are handled in a more convenient fashion. The
original `install.bat.in`/`install.sh.in` scripts are kept as
entrypoints for their respective OSs, but only serve as thin wrappers to
the Python module.

In addition, it:

- builds and **packages the .whl with the installer**, so that
downloading a versioned installer will guarantee installation of the
same version of the application.
- updates shell entrypoints: 
- new commands are `invokeai`, `invokeai-configure`, `invokeai-ti`,
`invokeai-merge`.
- these commands will be available in the activated `.venv` or via the
launch scripts
- `invoke.py` and `configure_invokeai.py` scripts are deprecated but
kept around for backwards compatibility and keeping users' surprise to a
minimum.
- introduces a new `ldm/invoke/config` package and moves the
`configure_invokeai` script into it. Similarly, movers Textual Inversion
script and TUI to `ldm/invoke/training`.
- moves the `configs` directory into the `ldm/invoke/config` package for
easy distribution.
- updates documentation to reflect all of the above changes
- fixes a failing test
- reduces wheel size to 3MB (from 27MB) by excluding unnecessary image
files under `assets`

⚠️ self-updating functionality and ability to install arbitrary
versions are still WIP. For now we can recommend downloading and running
the installer for a specific version as desired.

## Testing the source install

From the cloned source, check out this branch, and:

`$ python3 installer/main.py --root <path_to_destination>`

Also try:

`$ python3 installer/main.py ` - will prompt for paths
`$ python3 installer/main.py --yes` - will not prompt for any input

- try to combine the `--yes` and `--root` options
- try to install in destinations with "quirky" paths, such as paths
containing spaces in the directory name, etc.

## Testing the packaged install ("Automated Installer"):

Download the
[InvokeAI-installer-v2.3.0+a0.zip](https://github.com/invoke-ai/InvokeAI/files/10533913/InvokeAI-installer-v2.3.0%2Ba0.zip)
file, unzip it, and run the install script for your platform (preferably
in a terminal window)

OR make your own: from the cloned source, check out this branch, and:

```
cd installer
./create_installer.sh
# (do NOT tag/push when prompted! just say "no")
```

This will create the installation media:
`InvokeAI-installer-v2.3.0+a0.zip`. The installer is now
*platform-agnostic* - meaning, both Windows and *nix install resources
are packaged together.

Copy it somewhere as if it had been downloaded from the internet. Unzip
the file, enter the created `InvokeAI-Installer` directory, and run
`install.sh` or `install.bat` as applicable your platform.

⚠️ NOTE!!! `install.sh` accepts the same arguments as are
applicable to the Python script, i.e. you can `install.sh --yes --root
....`. This is NOT yet supported by the Windows `.bat` script. Only
interactive installation is supported on Windows. (this is still a
TODO).
2023-02-02 16:08:10 -05:00
2202288eb2 Merge branch 'main' into dev/installer 2023-02-02 15:17:40 -05:00
fc3378bb74 Load legacy ckpt files as diffusers models (#2468)
* refactor ckpt_to_diffuser to allow converted pipeline to remain in memory

- This idea was introduced by Damian
- Note that although I attempted to use the updated HuggingFace module
  pipelines/stable_diffusion/convert_from_ckpt.py, it was unable to
  convert safetensors files for reasons I didn't dig into.
- Default is to extract EMA weights.

* add --ckpt_convert option to load legacy ckpt files as diffusers models

- not quite working - I'm getting artifacts and glitches in the
  converted diffuser models
- leave as draft for time being

* do not include safety checker in converted files

* add ability to control which vae is used

API now allows the caller to pass an external VAE model to the
checkpoint conversion process. In this way, if an external VAE is
specified in the checkpoint's config stanza, this VAE will be used
when constructing the diffusers model.

Tested with both regular and inpainting 1.X models.

Not tested with SD 2.X models!

---------

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
Co-authored-by: Damian Stewart <null@damianstewart.com>
2023-02-02 20:15:44 +00:00
96228507d2 Merge branch 'main' into dev/installer 2023-02-02 14:30:35 -05:00
1fe5ec32f5 Swap codeowners for installer (#2477)
This PR changes the codeowner for the installer directory from
@tildebyte to @ebr due to the former's time commitments.

Further reorganization of the codeowners is pending.
2023-02-02 14:27:31 -05:00
6dee9051a1 swap codeowners for installer 2023-02-02 13:54:53 -05:00
d58574ca46 Merge branch 'main' into dev/installer 2023-02-02 13:53:11 -05:00
d282000c05 swap tildebyte to ebr as code owner 2023-02-02 13:52:45 -05:00
80c5322ccc fix(img2img): do not attempt to do a zero-step img2img when strength is low (#2472) 2023-02-02 10:04:09 -08:00
da181ce64e Merge branch 'main' into fix/img2img-low-strength 2023-02-02 09:40:16 -08:00
5ef66ca237 Fix typo in xformers version, 0.16 -> 0.0.16 (#2475) 2023-02-02 09:39:08 -08:00
e99e720474 resolve conflicts with main and rebuild frontend 2023-02-02 11:00:33 -05:00
7aa331af8c Merge branch 'main' into fix/img2img-low-strength 2023-02-02 07:20:34 -08:00
9e943ff7dc Fix typo in xformers version, 0.16 -> 0.0.16 2023-02-02 05:26:15 -05:00
b5040ba8d0 Build 2023-02-02 22:52:03 +13:00
07462d1d99 Remove Inpaint Replace 2023-02-02 22:52:03 +13:00
d273fba42c (installer) upgrade pip in python3.9 environments 2023-02-02 01:30:47 -05:00
735545dca1 (installer) remove pip from bootstrap venv requirements as it was breaking bootstrapping 2023-02-02 01:18:02 -05:00
328f87559b (installer) remove leftover debug logs; fix typo 2023-02-02 01:03:51 -05:00
6f10b06a0c (installer) clarify user messaging during destination directory selection 2023-02-02 01:03:51 -05:00
fd60c8297d (package) provide more legacy aliases to entrypoints to minimize user surprise 2023-02-02 01:03:51 -05:00
480064fa06 pip won't install itself without --upgrade 2023-02-02 00:48:53 -05:00
3810d6a4ce numerous tweaks
1. only load triton on linux machines
2. require pip >= 23.0 so that editable installs can run without setup.py
3. model files default to SD-1.5, not 2.1
4. use diffusers model of inpainting rather than ckpt
5. selected a new set of initial models based on # of likes at huggingface
2023-02-02 00:28:38 -05:00
44d36a0e0b fix(img2img): do not attempt to do a zero-step img2img when strength is low 2023-02-01 18:42:54 -08:00
3996ee843c fix bugs in launcher script installation
- launcher scripts are installed *before* the configure script runs,
  so that if something goes wrong in the configure script, the user
  can run invoke.{sh,bat} and get the option to re-run configure
- fixed typo in invoke.sh which misspelled name of invokeai-configure
2023-02-01 19:14:07 -05:00
6d966313b9 add a --find-links argument to import custom wheels 2023-02-01 19:03:15 -05:00
8ce9f07223 Merge branch 'main' into dev/installer 2023-02-01 17:50:22 -05:00
11ac50a6ea install xformers and triton when CUDA torch requested 2023-02-01 17:41:38 -05:00
31146eb797 add workflow to clean caches after PR gets closed (#2450)
This helps at least a bit to get rid of all those huge caches
2023-02-01 19:06:07 +01:00
99cd598334 add workflow to clean caches after PR gets closed 2023-02-01 18:32:29 +01:00
5441be8169 requirements: add xformers for CUDA platforms (#2465)
[xformers
0.16](https://github.com/facebookresearch/xformers/releases/tag/v0.0.16)
was released earlier today, and is now installable from wheels on PyPI!

Fixes #1876.
2023-02-01 10:59:13 -05:00
3e98b50b62 Merge branch 'main' into req-xformers 2023-02-01 10:29:49 -05:00
5f16148dea Prevent actions from running on draft PRs (#2457)
Draft PRs are triggering actions on every commit (except
`test-invoke-pip.yml`).

I've added a conditional to each job to only run when the PR is not a
draft.

(maybe there is a reason we are running all applicable workflows on
draft PRs?)
2023-02-01 00:33:15 -05:00
9628d45a92 Merge branch 'main' into build/no-actions-on-draft 2023-02-01 00:15:30 -05:00
6cbdd88fe2 (installer) correctly call invokeai entrypoints in .bat launch script 2023-02-01 00:08:18 -05:00
d423db4f82 (meta) add copyright statements for installer code 2023-01-31 23:47:36 -05:00
5c8c204a1b (installer) fix regression in directory selection 2023-01-31 23:47:36 -05:00
a03471c588 (installer) hide system and user site packages from the installer 2023-01-31 23:47:36 -05:00
6608343455 [enhancement] Print status message at startup when xformers is available (#2461) 2023-01-31 19:11:17 -08:00
abd972f099 Merge branch 'main' into feat/xformers-startup-message 2023-01-31 18:48:09 -08:00
bd57793a65 fix img2img by working around pytorch bug (#2458)
horribly, temporarily send the vae to `.cpu()` so that good latents can
be produced

closes #2418
2023-01-31 21:46:05 -05:00
8cdc65effc Merge branch 'main' into fix_2418_simplified 2023-01-31 17:45:54 -08:00
85b553c567 requirements: add xformers for CUDA platforms
Now available from pip!
2023-01-31 16:51:43 -08:00
af74a2d1f4 fix broken Dockerfile (#2445)
also switch to `python:3.9-slim` since it has a ton less security issues
2023-02-01 01:47:25 +01:00
6fdc9ac224 re-enable INVOKE_MODEL_RECONFIGURE 2023-02-01 01:21:07 +01:00
8107d354d9 fix broken Dockerfile
also switch to python 3.9:slim since it has a ton less security issues
2023-02-01 01:21:07 +01:00
7ca8abb206 integrate required changes
- also remove conda related things
- rename `invoke` to `invokeai`
- rename `configure_invokeai` to `invokeai-configure`
- rename venv back to common `.venv` but add `--prompt InvokeAI`
- remove outdated information
2023-02-01 01:17:24 +01:00
28c17613c4 feat(inpaint): add solid infill for use with inpainting model (#2441)
A new infill method, **solid:** solid color. currently using middle
gray.

Fixes #2417

It seems like the runwayml inpainting model specifically expects those
masked areas to be blanked out like this.

I haven't tried the SD 2.0 inpainting model with it yet.
2023-01-31 18:27:48 -05:00
eeb7a4c28c (ci) disable py3.9, lin-cuda-11_6 and win cuda 2023-02-01 00:24:56 +01:00
0009d82a92 update test_path.py to also verify caution.png 2023-02-01 00:22:28 +01:00
e6d52d7ce6 Merge branch 'main' into fix_2418_simplified 2023-01-31 18:11:56 -05:00
8c726d3e3e Merge branch 'main' into build/no-actions-on-draft 2023-01-31 18:08:52 -05:00
56e2d22b6e Merge branch 'main' into feat/solid-infill 2023-01-31 18:02:17 -05:00
053d11fe30 fix(inpainting model): blank areas to be repainted in the masked image (#2447)
Otherwise the model seems too reluctant to change these areas, even
though the mask channel should allow it to.

This makes the solid infill method proposed by #2441 less necessary,
though I think there's still a place for an infill method that is faster
than patchmatch and more predictable than tiles.

Even with #2441, this PR is still useful because it influences all areas
to be painted, not just the infill area.

Fixes #2417
2023-01-31 18:01:33 -05:00
0066187651 Merge branch 'main' into feat/solid-infill 2023-01-31 17:53:09 -05:00
d3d24fa816 fill color is parameterized 2023-01-31 17:52:33 -05:00
4d58fed6b0 Merge branch 'main' into fix/inpainting-blank-slate 2023-01-31 11:04:56 -08:00
bde5874707 fix dimension errors when inpainting model is used with hires-fix (#2440) 2023-01-31 11:04:02 -08:00
eed802f5d9 Merge branch 'main' into fix/hires_inpaint 2023-01-31 09:34:29 -08:00
c13e11a264 Merge branch 'dev/installer' of github.com:invoke-ai/InvokeAI into dev/installer 2023-01-31 12:26:19 -05:00
1c377b7995 further improvements to ability to find location of data files
- implement the following pattern for finding data files under both
  regular and editable install conditions:

  import invokeai.foo.bar as bar
  path = bar.__path__[0]

- this *seems* to work reliably with Python 3.9. Testing on 3.10 needs
  to be performed.
2023-01-31 12:24:55 -05:00
efe8dcaae9 cleanup test_path.py, enable pytest in pipeline
temporary enable 3.9 tests as well
2023-01-31 18:18:32 +01:00
fc8e3dbcd3 fix crash when editing name of model
- fixes a spurious "unknown model name" error when trying to edit the
  short name of an existing model.
- relaxes naming requirements to include the ':' and '/' characters
  in model names
2023-01-31 09:59:58 -05:00
ec1e83e912 add pytest to test path of frontend and configs 2023-01-31 09:06:06 +01:00
ab9daf1241 remove frontend from configure_invokeai.py
since it does not get accessed there at all
2023-01-31 08:15:48 +01:00
c061c1b1b6 fix frontend path
point to package's path instead of searching for it
2023-01-31 08:15:20 +01:00
b9cc56593e print status message at startup when xformers is available 2023-01-30 22:01:06 -05:00
6a0e1c8673 Merge branch 'main' into build/no-actions-on-draft 2023-01-31 12:00:38 +11:00
371edc993a Implement .swap() against diffusers 0.12 (#2385) 2023-01-30 15:56:24 -08:00
d71734c90d update frontend path in lint test 2023-01-30 18:48:43 -05:00
9ad4c03277 Various fixes
1) Downgrade numpy to avoid dependency conflict with numba
2) Move all non ldm/invoke files into `invokeai`. This includes assets, backend, frontend, and configs.
3) Fix up way that the backend finds the frontend and the generator finds the NSFW caution.png icon.
2023-01-30 18:42:17 -05:00
5299324321 workaround for pytorch bug, fixes #2418 2023-01-30 18:45:53 +01:00
817e36f8bf Merge branch 'diffusers_cross_attention_control_reimplementation' of github.com:damian0815/InvokeAI into diffusers_cross_attention_control_reimplementation 2023-01-30 16:23:52 +01:00
d044d4c577 rename override/restore methods to better reflect what they actually do 2023-01-30 16:23:44 +01:00
3f1120e6f2 Merge branch 'main' into diffusers_cross_attention_control_reimplementation 2023-01-30 16:17:25 +01:00
17d73d09c0 Revert "with diffusers cac, always run the original prompt on the first step"
This reverts commit 27ee939e4b.
2023-01-30 15:38:03 +01:00
478c379534 for cac make t_start=0.1 the default 2023-01-30 15:30:01 +01:00
c5c160a788 Merge branch 'diffusers_cross_attention_control_reimplementation' of github.com:damian0815/InvokeAI into diffusers_cross_attention_control_reimplementation 2023-01-30 14:51:06 +01:00
27ee939e4b with diffusers cac, always run the original prompt on the first step 2023-01-30 14:50:57 +01:00
c222cf7e64 Prevents actions from running on draft PRs 2023-01-30 22:28:05 +11:00
b2a3b8bbf6 (installer) fix the create_installer.sh script so it instructs the user to deactivate an active venv 2023-01-30 03:42:27 -05:00
11cb03f7de (installer) fall back to attempted source install if wheel not found
if running `python3 installer/main.py` from the source distribution,
it would fail because it expected to find a wheel.

this PR tries to perform a source install by going one level up the directory
tree and checking for `pyproject.toml` and `ldm` directory entries to
confirm (to a degree) that this is an InvokeAI distribution
2023-01-30 03:29:09 -05:00
6b1dc34523 (installer) improve selection of destination directory 2023-01-30 03:15:05 -05:00
44786b0496 (installer) improve function naming 2023-01-29 23:39:14 -05:00
d9ed0f6005 fix documentation of huggingface cache location (#2430)
* fix documentation of huggingface cache location

---------

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
2023-01-29 20:30:50 -06:00
2e7a002308 (installer) remove unnecessary shell options from the install wrapper script 2023-01-29 20:10:51 -05:00
5ce62e00c9 Merge branch 'main' into diffusers_cross_attention_control_reimplementation 2023-01-29 13:52:01 -06:00
5a8c28de97 Merge remote-tracking branch 'origin/main' into fix/hires_inpaint 2023-01-29 10:51:59 -08:00
07e03b31b7 Update --hires_fix (#2414)
* Update --hires_fix

Change `--hires_fix` to calculate initial width and height based on the model's resolution (if available) and with a minimum size.
2023-01-29 12:27:01 -06:00
5ee5c5a012 (training) correctly import TI module; fix type annotation 2023-01-28 19:09:16 -05:00
3075c99ed2 (ci) fix test that was failng due to CLI entrypoint change 2023-01-28 19:03:48 -05:00
2c0bee2a6d (config) ensure the correct 'invokeai' command is displayed to the user after configuration 2023-01-28 17:39:33 -05:00
8f86aa7ded (docs) update install docs to refer to the platform-agnostic installer 2023-01-28 17:39:33 -05:00
34e0d7aaa8 (config) rename all mentions of scripts/configure_invokeai.py to the new invokeai-configure command 2023-01-28 17:39:33 -05:00
abe4e1ea91 (scripts) improved script entrypoints 2023-01-28 17:39:33 -05:00
f1f8ce604a (installer) build .whl and distribute together with the installer; install from bundled .whl by default 2023-01-28 17:39:33 -05:00
47dbe7bc0d (assets) move 'caution.png' to avoid including entire 'assets' dir in the wheel
reduces wheel size to 3MB from 27MB
2023-01-28 17:39:33 -05:00
ebe6daac56 (installer) do not install if already in a venv 2023-01-28 17:39:33 -05:00
d209dab881 (installer) support both pip and source install; no longer support installing from a downloaded release .zip 2023-01-28 17:39:33 -05:00
2ff47cdecf (scripts) rename/reorganize CLI scripts
- add torch MPS fallback directly to CLI.py
- rename CLI scripts with `invoke-...` prefix
- delete long-deprecated scripts
- add a missing package dependency
- delete setup.py as obsolete
2023-01-28 17:39:33 -05:00
22c34aabfe (package) move TI scripts into a module; update packaging of 'configs' dir 2023-01-28 17:39:33 -05:00
b58a80109b (test) tweak pytest coverage options
- remove redundant options (unchanged from defaults)
- don't test 3rd party code
- omit fully covered files from coverage report
- gitignore junit (xml) test output directory
2023-01-28 17:39:33 -05:00
c5a9e70e7f (parser) fix missing argument default in parse_legacy_blend 2023-01-28 17:39:33 -05:00
c5914ce236 (installer) new torch index urls + support installation from PyPi 2023-01-28 17:39:33 -05:00
242abac12d (installer) add a --y[es[to_all]] argument for a fully hands-off install/config 2023-01-28 17:39:33 -05:00
4b659982b7 (installer) install.bat wrapper for the python script 2023-01-28 17:39:33 -05:00
71733bcfa1 (installer) copy launch/update scripts to the root dir; improve launch experience on Linux/Mac
- install.sh is now a thin wrapper around the pythonized install script
- install.bat not done yet - to follow
- user messaging is tailored to the current platform (paste shortcuts, file paths, etc)
- emit invoke.sh/invoke.bat scripts to the runtime dir
- improve launch scripts (add help option, etc)
- only emit the platform-specific scripts
2023-01-28 17:39:33 -05:00
d047e070b8 (config) fix config file creation in edge cases
if the config directory is missing, initialize it using the standard
process of copying it over, instead of failing to create the config file

this can happen if the user is re-running the config script in a directory which
already has the init file, but no configs dir
2023-01-28 17:39:33 -05:00
02c530e200 (installer) work around Windows install issues 2023-01-28 17:39:33 -05:00
d36bbb817c (installer) use pep517 for installing dependencies
the 'setup.py install' method is deprecated in favour of a
build-system independent format: https://peps.python.org/pep-0517/

this is needed to install dependencies that don't have a pyproject.toml
file (only setup.py) in a forward-compatible way
2023-01-28 17:39:33 -05:00
9997fde144 (config) moving the 'configs' dir into the 'config' module
This allows reliable distribution of the initial 'configs' directory
with the Python package, and enables the configuration script to be running
from anywhere, as long as the virtual environment is available on the sys.path
2023-01-28 17:39:33 -05:00
9e22ed5c12 (installer) ignore temporary venv cleanup errors on Windows
There is a race condition affecting the 'tempfile' module on Windows.
A PermissionsError is raised when cleaning up the temp dir
Python3.10 introduced a flag to suppress this error.

Windows + Python3.9 users will receive an unpleasant stack trace for now
2023-01-28 17:39:32 -05:00
169c56e471 (installer) install PyTorch from correct repositories 2023-01-28 17:39:32 -05:00
b186965e77 (installer) ask the user for their GPU type; improve other messaging 2023-01-28 17:39:32 -05:00
88526b9294 (config) move configure_invokeai script to the config module for easier importing 2023-01-28 17:39:32 -05:00
071a438745 (installer) add graphics accelerator selection 2023-01-28 17:39:32 -05:00
93129fde32 (installer) run configure_invokeai from within the installer 2023-01-28 17:39:32 -05:00
802b95b9d9 (installer) use prompt-toolkit for directory picking instead of tkinter 2023-01-28 17:39:32 -05:00
c279314cf5 (installer) use plumbum for better stdout streaming 2023-01-28 17:39:32 -05:00
f75b194b76 (installer) PoC to install the app (source installer style) into the app venv 2023-01-28 17:39:32 -05:00
bf1996bbcf (installer) add venv creation for the app 2023-01-28 17:39:32 -05:00
d3962ab7b5 (installer) Windows fixes 2023-01-28 17:39:32 -05:00
2296f5449e (installer) initial work on the installer 2023-01-28 17:39:32 -05:00
b6d37a70ca fix(inpainting model): threshold mask to avoid gray blurry seam 2023-01-28 13:34:22 -08:00
71b6ddf5fb fix(inpainting model): blank areas to be repainted in the masked image
Otherwise the model seems too reluctant to change these areas, even though the mask channel should allow it to.
2023-01-28 11:10:32 -08:00
14de7ed925 remove requirements step from install manual 2023-01-28 00:58:32 +01:00
6556b200b5 remove experimental "blur" infill
It seems counterproductive for use with the inpainting model, and not especially useful otherwise.
2023-01-27 15:25:50 -08:00
d627cd1865 feat(inpaint): add simpler infill methods for use with inpainting model 2023-01-27 14:28:16 -08:00
09b6104bfd refactor(txt2img2img): factor out tensor shape 2023-01-27 12:04:12 -08:00
1bb5b4ab32 fix dimension errors when inpainting model is used with hires-fix 2023-01-27 11:52:05 -08:00
c18db4e47b removed defunct textual inversion script (#2433)
The original textual inversion script in scripts is now superseded. The
replacement can be found in ldm/invoke/textual_inversion.py and is a
merging of the command line and front end scripts. After running `pip
install -e .` there will be a `textual_inversion` command on your path.
You can activate the front end this way:

`textual_inversion -gui`
2023-01-27 10:44:34 -05:00
f9c92e3576 Merge branch 'main' into bugfix/remove-defunct-scripts 2023-01-27 08:32:15 -06:00
1ceb7a60db adds double-click to reset view to 100% (#2436)
Adds double-click to reset canvas view to 100%.

- Adds hook to manage single and double clicks
- Single Click `Reset Canvas View` --> scale to fit, no change to
current behaviour
- Double Click `Reset Canvas View` --> set scale to 1
2023-01-28 00:56:24 +11:00
f509650ec5 adds double-click to reset view to 100% 2023-01-27 08:30:24 -05:00
0d0f35a1e2 Fix download button styling (#2435)
fixes #2383
2023-01-28 00:29:34 +11:00
6dbc42fc1a fixes download button styling 2023-01-27 20:23:12 +11:00
f6018fe5aa removed defunct textual inversion script 2023-01-26 23:35:09 -05:00
e4cd66216e Frontend Build (diffusers-mm-fixes) 2023-01-27 17:23:25 +13:00
995fbc78c8 Diffusers Model Manager Fixes 2023-01-27 17:23:25 +13:00
3083f8313d Default Seam Steps to 30
Seems to be the temporary solution for the seams looking horrible with some diffuser models.
2023-01-27 17:23:25 +13:00
c0614ac7f3 Improve configuration of initial Waifu models (#2426)
Testing suggests that the diffusers versions of Waifu-1.4 anything-v4.0
require the `sd-vae-ft-mse` to generate decent images, so the
appropriate arguments have been added to the initial model file.
2023-01-26 18:18:00 -05:00
0186630514 Merge branch 'main' into install/better-initial-models 2023-01-26 17:42:10 -05:00
d53df09203 [enhancement] Improve organization & behavior of model merging and textual inversion scripts (#2427)
- Model merging and textual inversion scripts have been moved into
`ldm/invoke`, which allows them to be installed properly by
pyproject.toml.
- As part of the pyproject install, the .py suffix is removed from the
command. I.e. use `invoke`, `configure_invokeai`, `merge_models` and
`textual_inversion`.
- GUI versions are activated by adding `--gui` to the command. Without
this, you get a classical argv-based command. Example: `merge_models
--gui`
- Fixed up the launcher scripts to accommodate new naming scheme.
- Keyboard behavior of the GUI front ends has been improved. You can now
use up and down arrow to move from field to field, in addition to <tab>
and ctrl-N/ctrl-P
2023-01-26 17:36:45 -05:00
12a29bfbc0 Merge branch 'main' into install/change-script-locations 2023-01-26 17:10:33 -05:00
f36114eb94 Fix Sliders unable to take typed input (#2407)
So far the slider component was unable to take typed input due to a
bunch of issues that were a pain to solve. This PR fixes it.

Things to test:

- Moving the slider also updates the value in the input text box.
- Input text box next to slider can be changed in two ways: If you type
a manual value, the slider will be updated when you lose focus from the
input box. If you use the stepper icons to update the values, the slider
should update immediately.
- Make sure the reset buttons next to the slider are updating correctly
and make sure this updates both the slider and the input box values.
- Brush Size slider -> make sure the hotkeys are updating the input box
too.
2023-01-26 17:10:16 -05:00
c255481c11 Merge branch 'main' into slider-fix 2023-01-26 16:20:25 -05:00
7f81105acf dev: update to diffusers 0.12, transformers 4.26 (#2420)
Happy New Year!
2023-01-26 16:18:37 -05:00
c8de679dc3 Merge branch 'main' into update-diffusers 2023-01-26 15:43:41 -05:00
85b18fe9ee Merge branch 'main' into install/better-initial-models 2023-01-26 15:42:13 -05:00
e0d8c19da6 fix indentation problem 2023-01-26 15:39:59 -05:00
5567808237 tweak documentation 2023-01-26 15:28:54 -05:00
2817f8a428 update launcher shell scripts for new script names & paths 2023-01-26 15:26:38 -05:00
8e4c044ca2 clean up tab/cursor behavior in textual inversion txt gui 2023-01-26 15:18:28 -05:00
9dc3832b9b clean up merge_models 2023-01-26 15:10:16 -05:00
046abb634e Remove dependency on original clipseg library for text masking (#2425)
- This replaces the original clipseg library with the transformers
version from HuggingFace.
- This should make it possible to register InvokeAI at PyPi and do a
fully automated pip-based install.
- Minor regression: it is no longer possible to specify which device the
clipseg model will be loaded into, and it will reside in CPU. However,
performance is more than acceptable.
2023-01-26 12:14:13 -05:00
d3a469d136 fix location of textual_inversion script 2023-01-26 11:56:23 -05:00
e79f89b619 improve initial model configuration 2023-01-26 11:53:06 -05:00
cbd967cbc4 add documentation caveat about location of HF cached models 2023-01-26 11:48:03 -05:00
e090c0dc10 try without setting every time 2023-01-26 17:46:51 +01:00
c381788ab9 don't restore None 2023-01-26 17:44:27 +01:00
fb312f9ed3 use the correct value - whoops 2023-01-26 17:30:29 +01:00
729752620b trying out JPPhoto's patch on vast.ai 2023-01-26 17:27:33 +01:00
8ed8bf52d0 use 'auto' slice size 2023-01-26 17:04:22 +01:00
a49d546125 simplified code a bit 2023-01-26 09:46:34 -05:00
288e31fc60 remove dependency on original clipseg library
- This replaces the original clipseg library with the transformers
  version from HuggingFace.
- This should make it possible to register InvokeAI at PyPi and do
  a fully automated pip-based install.
- Minor regression: it is no longer possible to specify which device
  the clipseg model will be loaded into, and it will reside in CPU.
  However, performance is more than acceptable.
2023-01-26 09:35:16 -05:00
7b2c0d12a3 add missing VAEs to initial diffuser models 2023-01-26 00:25:39 -05:00
2978c3eb8d Merge branch 'main' into update-diffusers 2023-01-25 18:42:00 -08:00
5e7ed964d2 wip updating docs 2023-01-25 23:49:38 +01:00
93a24445dc Merge remote-tracking branch 'upstream/main' into diffusers_cross_attention_control_reimplementation 2023-01-25 23:05:39 +01:00
95d147c5df MPS support: negatory 2023-01-25 23:03:30 +01:00
41aed57449 wip tracking down MPS slicing support 2023-01-25 22:27:23 +01:00
34a3f4a820 cleanup 2023-01-25 21:47:17 +01:00
1f5ad1b05e sliced swap working 2023-01-25 21:38:27 +01:00
87c63f1f08 Slider Fix Build 2023-01-26 09:04:52 +13:00
5b054dd5b7 Conflict Resolved Build (slider-fix) 2023-01-26 09:04:20 +13:00
fc5c8cc800 Merge branch 'main' into slider-fix 2023-01-26 09:03:02 +13:00
eb2ca4970b Add Dutch Localization Build 2023-01-26 08:56:38 +13:00
c2b10e6461 Add Dutch Localization 2023-01-26 08:56:38 +13:00
190d266060 Dutch localization 2023-01-26 08:56:38 +13:00
8c8e1a448d dev: update to diffusers 0.12, transformers 4.26
Happy New Year!
2023-01-25 10:51:56 -08:00
c52dd7e3f4 Merge branch 'diffusers_cross_attention_control_reimplementation' of github.com:damian0815/InvokeAI into diffusers_cross_attention_control_reimplementation 2023-01-25 14:51:15 +01:00
a4aea1540b more wip sliced attention (.swap doesn't work yet) 2023-01-25 14:51:08 +01:00
3c53b46a35 Merge branch 'main' into diffusers_cross_attention_control_reimplementation 2023-01-24 19:32:34 -08:00
65fd6cd105 Merge branch 'main' into slider-fix 2023-01-25 08:28:37 +13:00
61403fe306 fix second conflict in CLI.py 2023-01-24 14:21:21 -05:00
b2f288d6ec fix conflict in CLI.py 2023-01-24 14:20:40 -05:00
d1d12e4f92 Merge branch 'main' into slider-fix 2023-01-25 08:06:30 +13:00
eaf7934d74 [Enhancements] Allow user to specify VAE with !import_model and delete underlying model with !del_model (#2369)
Fix two deficiencies in the CLI's support for model management:

1. `!import_model` did not allow user to specify VAE file. This is now
fixed.
2. `!del_model` did not offer the user the opportunity to delete the
underlying
       weights file or diffusers directory. This is now fixed.
2023-01-24 13:43:16 -05:00
079ec4cb5c Merge branch 'main' into feat/import-with-vae 2023-01-24 13:16:00 -05:00
38d0b1e3df Merge branch 'main' into slider-fix 2023-01-25 07:14:26 +13:00
fc6500e819 Fix Inpaint Replace Slider 2023-01-25 07:13:01 +13:00
f521f5feba improve UI of textual inversion frontend (#2333)
- File selection box now accepts directories that don't exist yet.
- Fixed crash when resume is selected and no files available to resume
from.
2023-01-24 12:22:17 -05:00
ce865a8d69 Merge branch 'main' into slider-fix 2023-01-24 12:21:39 -05:00
00839d02ab Merge branch 'main' into lstein-improve-ti-frontend 2023-01-24 11:53:03 -05:00
ce52d0c42b Merge branch 'main' into feat/import-with-vae 2023-01-24 11:52:40 -05:00
f687d90bca [feat] Better status reporting when loading embeds and concepts (#2372)
This PR improves the console reporting of the process of recognizing
trigger tokens and loading their embeds.

1. Do not report "concept is not known to HuggingFace" if the trigger
term is in fact a local embedding trigger.
2. When a trigger term is first recognized during a session, report the
fact.
This should help debug embedding issues in the future.

Note that the local embeddings produced by the new InvokeAI TI training
script default to the format <trigger> with literal angle brackets. This
sets them off from the rest of the text well and will enable
autocomplete at some point in the future. However, this means that they
supersede like-named HuggingFace concepts, and may cause problems for
people uploading them to the HuggingFace repository (although that
problem already exists).
2023-01-24 09:35:53 -05:00
7473d814f5 remove original setup.py 2023-01-24 09:11:05 -05:00
b2c30c2093 Merge branch 'main' into bugfix/embed-loading-messages 2023-01-24 09:08:13 -05:00
a7048eea5f Merge branch 'main' into feat/import-with-vae 2023-01-24 09:07:41 -05:00
87c9398266 [enhancement] import .safetensors ckpt files directly (#2353)
This small fix makes it possible to import and run safetensors ckpt
files directly without doing a conversion step first.
2023-01-24 09:06:49 -05:00
63c6019f92 sliced attention processor wip (untested) 2023-01-24 14:46:32 +01:00
8eaf0d8bfe Fix Slider Build 2023-01-24 16:44:58 +13:00
5344481809 Fix Slider not being able to take typed input 2023-01-24 16:43:29 +13:00
9f32daab2d Merge branch 'main' into lstein-import-safetensors 2023-01-23 21:58:07 -05:00
884768c39d Make sure --free_gpu_mem still works when using CKPT-based diffuser model (#2367)
This PR attempts to fix `--free_gpu_mem` option that was not working in
CKPT-based diffuser model after #1583.

I noticed that the memory usage after #1583 did not decrease after
generating an image when `--free_gpu_mem` option was enabled.
It turns out that the option was not propagated into `Generator`
instance, hence the generation will always run without the memory saving
procedure.

This PR also related to #2326. Initially, I was trying to make
`--free_gpu_mem` works on 🤗 diffuser model as well.
In the process, I noticed that InvokeAI will raise an exception when
`--free_gpu_mem` is enabled.
I tried to quickly fix it by simply ignoring the exception and produce a
warning message to user's console.
2023-01-23 21:48:23 -05:00
bc2194228e stability improvements
- provide full traceback when a model fails to load
- fix VAE record for VoxelArt; otherwise load fails
2023-01-23 21:40:27 -05:00
10c3afef17 Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-23 21:15:12 -05:00
98e9721101 correct fail-to-resume error
- applied https://github.com/huggingface/diffusers/pull/2072 to fix
  error in epoch calculation that caused script not to resume from
  latest checkpoint when asked to.
2023-01-23 21:04:07 -05:00
66babb2e81 Japanese Localization Build 2023-01-24 09:07:29 +13:00
31a967965b Add Japanese Localization 2023-01-24 09:07:29 +13:00
b9c9b947cd update japanese translation 2023-01-24 09:07:29 +13:00
1eee08a070 add Japanese Translation 2023-01-24 09:07:29 +13:00
aca1b61413 [Feature] Add interactive diffusers model merger (#2388)
This PR adds `scripts/merge_fe.py`, which will merge any 2-3 diffusers
models registered in InvokeAI's `models.yaml`, producing a new merged
model that will be registered as well.

Currently this script will only work if all models to be merged are
known by their repo_ids. Local models, including those converted from
ckpt files, will cause a crash due to a bug in the diffusers
`checkpoint_merger.py` code. I have made a PR against
huggingface/diffusers which fixes this:
https://github.com/huggingface/diffusers/pull/2060
2023-01-23 09:27:05 -05:00
e18beaff9c Merge branch 'main' into feat/merge-script 2023-01-23 09:05:38 -05:00
d7554b01fd fix typo in prompt 2023-01-23 00:24:06 -08:00
70f8793700 Merge branch 'main' into feat/import-with-vae 2023-01-23 00:17:46 -08:00
0d4e6cbff5 Merge branch 'main' into bugfix/embed-loading-messages 2023-01-23 00:12:33 -08:00
ea61bf2c94 [bugfix] ckpt conversion script respects cache in ~/invokeai/models (#2395) 2023-01-23 00:07:23 -08:00
7dead7696c fixed setup.py to install the new scripts 2023-01-23 00:43:15 -05:00
ffcc5ad795 conversion script uses invokeai models cache by default 2023-01-23 00:35:16 -05:00
48deb3e49d add model merging documentation and launcher script menu entries 2023-01-23 00:20:28 -05:00
6c31225d19 create small module for merge importation logic 2023-01-22 18:07:53 -05:00
c0610f7cb9 pass missing value 2023-01-22 18:19:06 +01:00
313b206ff8 squash float16/float32 mismatch on linux 2023-01-22 18:13:12 +01:00
f0fe483915 Merge branch 'main' into feat/merge-script 2023-01-21 18:42:40 -05:00
4ee8d104f0 working, but needs diffusers PR to be accepted 2023-01-21 18:39:13 -05:00
89791d91e8 fix: use pad_token for padding (#2381)
Stable Diffusion 2 does not use eos_token for padding.

Fixes #2378
2023-01-21 13:30:03 -08:00
87f3da92e9 Merge branch 'main' into fix/sd2-padding-token 2023-01-21 13:11:02 -08:00
f169bb0020 fix long prompt weighting bug in ckpt codepath (#2382) 2023-01-21 15:14:14 -05:00
155efadec2 Merge branch 'main' into fix/sd2-padding-token 2023-01-21 21:05:40 +01:00
bffe199ad7 SwapCrossAttnProcessor working - tested on mac CPU (MPS doesn't work) 2023-01-21 20:54:18 +01:00
0c2a511671 wip SwapCrossAttnProcessor 2023-01-21 18:07:36 +01:00
e94c8fa285 fix long prompt weighting bug in ckpt codepath 2023-01-21 12:08:21 +01:00
b3363a934d Update index.md (#2377) 2023-01-21 00:17:23 -05:00
599c558c87 Merge branch 'main' into patch-1 2023-01-20 23:54:40 -05:00
d35ec3398d fix: use pad_token for padding
Stable Diffusion does not use the eos_token for padding.
2023-01-20 19:25:20 -08:00
96a900d1fe correctly import diffusers models by their local path
- Corrects a bug in which the local path was treated as a repo_id
2023-01-20 20:13:43 -05:00
f00f7095f9 Add instructions for installing xFormers on linux (#2360)
I've written up the install procedure for xFormers on Linux systems.

I need help with the Windows install; I don't know what the build
dependencies (compiler, etc) are. This section of the docs is currently
empty.

Please see `docs/installation/070_INSTALL_XFORMERS.md`
2023-01-20 17:57:12 -05:00
d7217e3801 disable instable CI tests for windows runners
therefore enable all pytorch versions to verify installation
2023-01-20 23:30:25 +01:00
fc5fdae562 update installation instructions 2023-01-20 23:30:25 +01:00
a491644e56 fix dependencies/requirements 2023-01-20 23:30:24 +01:00
ec2a509e01 make images in README.md compatible to pypi
also add missing new-lines before/after headings
2023-01-20 23:30:24 +01:00
6a3a0af676 update test-invoke-pip.yml
- remove stable-diffusion-model from matrix
- add windows-cuda-11_6 and linux-cuda-11_6
- enable linux-cpu
- disable windows-cpu
- change step order
- remove job env
- set runner.os specific env
- install editable
- cache models folder
- remove `--model` and `--root` arguments from invoke command
2023-01-20 23:30:24 +01:00
ef4b03289a enable image generating step for windows as well
- also remove left over debug lines and development branch leftover
2023-01-20 23:30:24 +01:00
963b666844 fix memory issue on windows runner
- use cpu version which is only 162.6 MB
- set `INVOKEAI_ROOT=C:\InvokeAI` on Windows runners
2023-01-20 23:30:24 +01:00
5a788f8f73 fix test-invoke-pip.yml matrix 2023-01-20 23:30:24 +01:00
5afb63e41b replace legacy setup.py with pyproject.toml
other changes which where required:
- move configure_invokeai.py into ldm.invoke
- update files which imported configure_invokeai to use new location:
    - ldm/invoke/CLI.py
    - scripts/load_models.py
    - scripts/preload_models.py
- update test-invoke-pip.yml:
    - remove pr type "converted_to_draft"
    - remove reference to dev/diffusers
    - remove no more needed requirements from matrix
    - add pytorch to matrix
    - install via `pip3 install --use-pep517 .`
    - use the created executables
        - this should also fix configure_invoke not executed in windows
To install use `pip install --use-pep517 -e .` where `-e` is optional
2023-01-20 23:30:24 +01:00
279ffcfe15 Merge branch 'main' into lstein/xformers-instructions 2023-01-20 17:29:39 -05:00
9b73292fcb add pip install documentation for xformers 2023-01-20 17:28:14 -05:00
67d91dc550 Merge branch 'bugfix/embed-loading-messages' of github.com:invoke-ai/InvokeAI into bugfix/embed-loading-messages 2023-01-20 17:16:50 -05:00
a1c0818a08 ignore .DS_Store files when scanning Mac embeddings 2023-01-20 17:16:39 -05:00
2cf825b169 Merge branch 'main' into bugfix/embed-loading-messages 2023-01-20 17:14:46 -05:00
292b0d70d8 Merge branch 'lstein-improve-ti-frontend' of github.com:invoke-ai/InvokeAI into lstein-improve-ti-frontend 2023-01-20 17:14:08 -05:00
c3aa3d48a0 ignore .DS_Store files when scanning Mac embeddings 2023-01-20 17:13:32 -05:00
9e3c947cd3 Merge branch 'main' into lstein-improve-ti-frontend 2023-01-20 17:01:09 -05:00
4b8aebabfb add diffusers repo as a reference for further reading 2023-01-20 16:59:34 -05:00
080fc4b380 add documentation and minor bug fixes
- Added new documentation for textual inversion training process
- Move `main.py` into the deprecated scripts folder
- Fix bug in `textual_inversion.py` which was causing it to not load
  the globals module correctly.
- Sort models alphabetically in console front end
- Only show diffusers models in console front end
2023-01-20 16:55:50 -05:00
195294e74f sort models alphabetically 2023-01-20 15:17:54 -05:00
da81165a4b Update index.md 2023-01-20 19:03:12 +01:00
f3ff386491 [enhancement] Reorganize form for textual inversion training (#2375)
- Add num_train_epochs
- Reorganize widgets so all sliders that control # of steps are together
2023-01-20 10:58:26 -05:00
da524f159e Merge branch 'main' into feat/enhance-ti-training-ui 2023-01-20 10:28:27 -05:00
2d1eeec063 Save HFToken only if it is present (#2370)
Fixes https://github.com/invoke-ai/InvokeAI/issues/2083
2023-01-19 22:16:19 -05:00
a8bb1a1109 Save HFToken only if it is present 2023-01-19 21:47:27 -05:00
d9fa505412 [feat] Provide option to disable xformers from command line (#2373)
Starting `invoke.py` with --no-xformers will disable
memory-efficient-attention support if xformers is installed.

For symmetry, `--xformers` will enable support, but this is already the
default if xformers is available.
2023-01-19 19:15:57 -05:00
02ce602a38 Merge branch 'main' into feat/disable-xformers 2023-01-19 18:45:59 -05:00
9b1843307b [enhancement] Reorganize form for textual inversion training
- Add num_train_epochs
- Reorganize widgets so all sliders that control # of steps are together
2023-01-19 18:43:12 -05:00
f0010919f2 Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-19 18:03:36 -05:00
d113b4ad41 [bugfix] suppress extraneous warning messages generated by diffusers (#2374)
This commit suppresses a few irrelevant warning messages that the
diffusers module produces:

1. The warning that turning off the NSFW detector makes you an
irresponsible person.
2. Warnings about running fp16 models stored in CPU (we are not running
them in CPU, just caching them in CPU RAM)
2023-01-19 18:00:31 -05:00
895505976e [bugfix] suppress extraneous warning messages generated by diffusers
This commit suppresses a few irrelevant warning messages that the
diffusers module produces:

1. The warning that turning off the NSFW detector makes you an
irresponsible person.
2. Warnings about running fp16 models stored in CPU (we are not running
   them in CPU, just caching them in CPU RAM)
2023-01-19 16:49:40 -05:00
171f4aa71b [feat] Provide option to disable xformers from command line
Starting `invoke.py` with --no-xformers will disable
memory-efficient-attention support if xformers is installed.

--xformers will enable support, but this is already the
default.
2023-01-19 16:16:35 -05:00
775e1a21c7 improve embed trigger token not found error
- Now indicates that the trigger is *neither* a huggingface concept,
  nor the trigger of a locally loaded embed.
2023-01-19 15:46:58 -05:00
3c3d893b9d improve status reporting when loading local and remote embeddings
- During trigger token processing, emit better status messages indicating
  which triggers were found.
- Suppress message "<token> is not known to HuggingFace library, when
  token is in fact a local embed.
2023-01-19 15:43:52 -05:00
33a5c83c74 during ckpt->diffusers tell user when custom autoencoder can't be loaded
- When a ckpt or safetensors file uses an external autoencoder and we
  don't know which diffusers model corresponds to this (if any!), then
  we fallback to using stabilityai/sd-vae-ft-mse
- This commit improves error reporting so that user knows what is happening.
2023-01-19 12:05:49 -05:00
7ee0edcb9e when converting a ckpt/safetensors model, preserve vae in diffusers config
- After successfully converting a ckt file to diffusers, model_manager
  will attempt to create an equivalent 'vae' entry to the resulting
  diffusers stanza.

- This is a bit of a hack, as it relies on a hard-coded dictionary
  to map ckpt VAEs to diffusers VAEs. The correct way to do this
  would be to convert the VAE to a diffusers model and then point
  to that. But since (almost) all models are using vae-ft-mse-840000-ema-pruned,
  I did it the easy way first and will work on the better solution later.
2023-01-19 11:02:49 -05:00
7bd2220a24 fix two bugs in model import
1. !import_model did not allow user to specify VAE file. This is now fixed.
2. !del_model did not offer the user the opportunity to delete the underlying
   weights file or diffusers directory. This is now fixed.
2023-01-19 01:30:58 -05:00
284b432ffd add triton install instructions 2023-01-18 22:34:36 -05:00
ab675af264 Merge branch 'main' into lstein-improve-ti-frontend 2023-01-18 22:22:30 -05:00
be58a6bfbc Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-19 10:21:06 +07:00
5a40aadbee Ensure free_gpu_mem option is passed into the generator (#2326) 2023-01-19 09:57:03 +07:00
e11f15cf78 Merge branch 'main' into lstein-import-safetensors 2023-01-18 17:09:48 -05:00
ce17051b28 Store & load 🤗 models at XDG_CACHE_HOME if HF_HOME is not set (#2359)
This commit allows InvokeAI to store & load 🤗 models at a location set
by `XDG_CACHE_HOME` environment variable if `HF_HOME` is not set.

By integrating this commit, a user who either use `HF_HOME` or
`XDG_CACHE_HOME` environment variables in their environment can let
InvokeAI to reuse the existing cache directory used by 🤗 library by
default. I happened to benefit from this commit because I have a Jupyter
Notebook that uses 🤗 diffusers model stored at `XDG_CACHE_HOME`
directory.

Reference:
https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#xdgcachehome
2023-01-18 17:05:06 -05:00
a2bdc8b579 Merge branch 'lstein-import-safetensors' of github.com:invoke-ai/InvokeAI into lstein-import-safetensors 2023-01-18 12:16:06 -05:00
1c62ae461e fix vae safetensor loading 2023-01-18 12:15:57 -05:00
c5b802b596 Merge branch 'main' into feature/hub-in-xdg-cache-home 2023-01-18 11:53:46 -05:00
b9ab9ffb4a Merge branch 'main' into lstein-import-safetensors 2023-01-18 10:58:38 -05:00
f232068ab8 Update automated install doc - link to MS C libs (#2306)
Updated the link for the MS Visual C libraries - I'm not sure if MS
changed the location of the files but this new one leads right to the
file downloads.
2023-01-18 10:56:09 -05:00
4556f29359 Merge branch 'main' into lstein/xformers-instructions 2023-01-18 09:33:17 -05:00
c1521be445 add instructions for installing xFormers on linux 2023-01-18 09:31:19 -05:00
f3e952ecf0 Use global_cache_dir calls properly 2023-01-18 21:06:01 +07:00
aa4e8d8cf3 Migrate legacy models (pre-2.3.0) to 🤗 cache directory if exists 2023-01-18 21:02:31 +07:00
a7b2074106 Ignore free_gpu_mem when using 🤗 diffuser model (#2326) 2023-01-18 19:42:11 +07:00
2282e681f7 Store & load 🤗 models at XDG_CACHE_HOME if HF_HOME is not set
This commit allows InvokeAI to store & load 🤗 models at a location
set by `XDG_CACHE_HOME` environment variable if `HF_HOME` is not set.

Reference: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#xdgcachehome
2023-01-18 19:32:09 +07:00
6e2365f835 Merge branch 'main' into patch-1 2023-01-17 23:52:13 -05:00
e4ea98c277 further improvements to initial load (#2330)
- Migration process will not crash if duplicate model files are found,
one in legacy location and the other in new location. The model in the
legacy location will be deleted in this case.

- Added a hint to stable-diffusion-2.1 telling people it will work best
with 768 pixel images.

- Added the anything-4.0 model.
2023-01-17 23:21:14 -05:00
2fd5fe6c89 Merge branch 'main' into lstein-improve-migration 2023-01-17 22:55:58 -05:00
4a9e93463d Merge branch 'lstein-import-safetensors' of github.com:invoke-ai/InvokeAI into lstein-import-safetensors 2023-01-17 22:52:50 -05:00
0b5c0c374e load safetensors vaes 2023-01-17 22:51:57 -05:00
5750f5dac2 Merge branch 'main' into lstein-import-safetensors 2023-01-17 21:31:56 -05:00
3fb095de88 do not use autocast for diffusers (#2349)
fixes #2345
2023-01-17 14:26:35 -08:00
c5fecfe281 Merge branch 'main' into lstein-improve-migration 2023-01-17 17:05:12 -05:00
1fa6a3558e Merge branch 'main' into lstein-fix-autocast 2023-01-17 14:00:51 -08:00
2ee68cecd9 tip fix (#2281)
Context: Small fix for the manual, added tab for a "!!! tip"
2023-01-17 16:25:09 -05:00
c8d1d4d159 Merge branch 'main' into lstein-fix-autocast 2023-01-17 16:23:33 -05:00
529b19f8f6 Merge branch 'main' into patch-1 2023-01-17 14:57:17 -05:00
be4f44fafd [Enhancement] add --default_only arg to configure_invokeai.py, for CI use (#2355)
Added a --default_only argument that limits model downloads to the
single default model, for use in continuous integration.

New behavior

         - switch -
    --yes      --default_only           Behavior
    -----      --------------           --------

   <not set>     <not set>              interactive download

   --yes         <not set>              non-interactively download all
                                          recommended models

   --yes        --default_only          non-interactively download the
                                          default model
2023-01-17 14:56:50 -05:00
5aec48735e lint(generator): 🚮 remove unused imports 2023-01-17 11:44:45 -08:00
3c919f0337 Restore ldm/invoke/conditioning.py 2023-01-17 11:37:14 -08:00
858ddffab6 add --default_only to run-preload-models step 2023-01-17 20:10:37 +01:00
212fec669a add --default_only arg to configure_invokeai.py for CI use
Added a --default_only argument that limits model downloads to the single
default model, for use in continuous integration.

New behavior

         - switch -
    --yes      --default_only           Behavior
    -----      --------------           --------

   <not set>     <not set>              interactive download

   --yes         <not set>              non-interactively download all
                                          recommended models

   --yes        --default_only          non-interactively download the
                                          default model
2023-01-17 12:45:04 -05:00
fc2098834d support direct loading of .safetensors models
- Small fix to allow ckpt files with the .safetensors suffix
  to be directly loaded, rather than undergo a conversion step
  first.
2023-01-17 08:11:19 -05:00
8a31e5c5e3 allow safetensors models to be imported 2023-01-17 00:18:09 -05:00
bcc0110c59 Merge branch 'lstein-fix-autocast' of github.com:invoke-ai/InvokeAI into lstein-fix-autocast 2023-01-16 23:18:54 -05:00
ce1c5e70b8 fix autocast dependency in cross_attention_control 2023-01-16 23:18:43 -05:00
ce00c9856f fix perlin noise and txt2img2img 2023-01-16 22:50:13 -05:00
7e8f364d8d do not use autocast for diffusers
- All tensors in diffusers code path are now set explicitly to
  float32 or float16, depending on the --precision flag.
- autocast is still used in the ckpt path, since it is being
  deprecated.
2023-01-16 19:32:06 -05:00
088cd2c4dd further tweaks to model management
- Work around problem with OmegaConf.update() that prevented model names
  from containing periods.
- Fix logic bug in !delete_model that didn't check for existence of model
  in config file.
2023-01-16 17:11:59 -05:00
9460763eff Merge branch 'main' into lstein-improve-migration 2023-01-16 16:47:08 -05:00
fe46d9d0f7 Merge branch 'main' into patch-1 2023-01-16 16:46:46 -05:00
563196bd03 pass step count and step index to diffusion step func (#2342) 2023-01-16 19:56:54 +00:00
d2a038200c Merge branch 'main' into lstein-improve-migration 2023-01-16 14:22:13 -05:00
d6ac0eeffd make SD-1.5 the default again 2023-01-16 14:21:34 -05:00
3a1724652e upgrade requirements to CUDA 11.7, torch 1.13 (#2331)
* upgrade requirements to CUDA 11.7, torch 1.13

* fix ROCm version number

Co-authored-by: Lincoln Stein <lstein@gmail.com>
2023-01-16 14:19:27 -05:00
8c073a7818 Merge branch 'main' into patch-1 2023-01-16 08:38:14 -05:00
8c94f6a234 Merge branch 'main' into patch-1 2023-01-16 08:35:25 -05:00
5fa8f8be43 Merge branch 'main' into lstein-improve-migration 2023-01-16 08:33:20 -05:00
5b35fa53a7 Improve readability of the manual installation documentation (#2296)
* docs: Fix links to pip and Conda installation methods

* docs: Improve installation script readability

This commit adds a space between `-m` option and the module name.

* docs: Fix alignments of step 4 & 9 in `pip` installation method

* docs: Rewrite step 10 of the ` pip` installation method

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2023-01-15 22:37:02 +00:00
a2ee32f57f Merge branch 'main' into lstein-improve-ti-frontend 2023-01-15 17:12:50 -05:00
4486169a83 pin dnspython version (#2327)
Fixes dns-related errors that began January 14, 2023
2023-01-15 17:08:45 -05:00
bfeafa8d5e improve UI of textual inversion frontend
- File selection box now accepts directories that don't exist yet.
- Fixed crash when resume is selected and no files available to resume from.
2023-01-15 17:04:14 -05:00
f86c8b043c further improvements to initial load
- Migration process will not crash if duplicate model files are found,
  one in legacy location and the other in new location.
  The model in the legacy location will be deleted in this case.

- Added a hint to stable-diffusion-2.1 telling people it will work best
  with 768 pixel images.

- Added the anything-4.0 model.
2023-01-15 15:08:59 -05:00
251a409087 adjust initial model defaults (#2322)
- Default to SD 1.5
- Add waifu diffusion 1.4
2023-01-15 15:18:41 +00:00
6fdbc1978d use 🧨diffusers model (#1583)
* initial commit of DiffusionPipeline class

* spike: proof of concept using diffusers for txt2img

* doc: type hints for Generator

* refactor(model_cache): factor out load_ckpt

* model_cache: add ability to load a diffusers model pipeline

and update associated things in Generate & Generator to not instantly fail when that happens

* model_cache: fix model default image dimensions

* txt2img: support switching diffusers schedulers

* diffusers: let the scheduler do its scaling of the initial latents

Remove IPNDM scheduler; it is not behaving.

* web server: update image_progress callback for diffusers data

* diffusers: restore prompt weighting feature

* diffusers: fix set-sampler error following model switch

* diffusers: use InvokeAIDiffuserComponent for conditioning

* cross_attention_control: stub (no-op) implementations for diffusers

* model_cache: let offload_model work with DiffusionPipeline, sorta.

* models.yaml.example: add diffusers-format model, set as default

* test-invoke-conda: use diffusers-format model
test-invoke-conda: put huggingface-token where the library can use it

* environment-mac: upgrade to diffusers 0.7 (from 0.6)

this was already done for linux; mac must have been lost in the merge.

* preload_models: explicitly load diffusers models

In non-interactive mode too, as long as you're logged in.

* fix(model_cache): don't check `model.config` in diffusers format

clean-up from recent merge.

* diffusers integration: support img2img

* dev: upgrade to diffusers 0.8 (from 0.7.1)

We get to remove some code by using methods that were factored out in the base class.

* refactor: remove backported img2img.get_timesteps

now that we can use it directly from diffusers 0.8.1

* ci: use diffusers model

* dev: upgrade to diffusers 0.9 (from 0.8.1)

* lint: correct annotations for Python 3.9.

* lint: correct AttributeError.name reference for Python 3.9.

* CI: prefer diffusers-1.4 because it no longer requires a token

The RunwayML models still do.

* build: there's yet another place to update requirements?

* configure: try to download models even without token

Models in the CompVis and stabilityai repos no longer require them. (But runwayml still does.)

* configure: add troubleshooting info for config-not-found

* fix(configure): prepend root to config path

* fix(configure): remove second `default: true` from models example

* CI: simplify test-on-push logic now that we don't need secrets

The "test on push but only in forks" logic was only necessary when tests didn't work for PRs-from-forks.

* create an embedding_manager for diffusers

* internal: avoid importing diffusers DummyObject

see https://github.com/huggingface/diffusers/issues/1479

* fix "config attributes…not expected" diffusers warnings.

* fix deprecated scheduler construction

* work around an apparent MPS torch bug that causes conditioning to have no effect

* 🚧 post-rebase repair

* preliminary support for outpainting (no masking yet)

* monkey-patch diffusers.attention and use Invoke lowvram code

* add always_use_cpu arg to bypass MPS

* add cross-attention control support to diffusers (fails on MPS)

For unknown reasons MPS produces garbage output with .swap(). Use
--always_use_cpu arg to invoke.py for now to test this code on MPS.

* diffusers support for the inpainting model

* fix debug_image to not crash with non-RGB images.

* inpainting for the normal model [WIP]

This seems to be performing well until the LAST STEP, at which point it dissolves to confetti.

* fix off-by-one bug in cross-attention-control (#1774)

prompt token sequences begin with a "beginning-of-sequence" marker <bos> and end with a repeated "end-of-sequence" marker <eos> - to make a default prompt length of <bos> + 75 prompt tokens + <eos>. the .swap() code was failing to take the column for <bos> at index 0 into account. the changes here do that, and also add extra handling for a single <eos> (which may be redundant but which is included for completeness).

based on my understanding and some assumptions about how this all works, the reason .swap() nevertheless seemed to do the right thing, to some extent, is because over multiple steps the conditioning process in Stable Diffusion operates as a feedback loop. a change to token n-1 has flow-on effects to how the [1x4x64x64] latent tensor is modified by all the tokens after it, - and as the next step is processed, all the tokens before it as well. intuitively, a token's conditioning effects "echo" throughout the whole length of the prompt. so even though the token at n-1 was being edited when what the user actually wanted was to edit the token at n, it nevertheless still had some non-negligible effect, in roughly the right direction, often enough that it seemed like it was working properly.

* refactor common CrossAttention stuff into a mixin so that the old ldm code can still work if necessary

* inpainting for the normal model. I think it works this time.

* diffusers: reset num_vectors_per_token

sync with 44a0055571

* diffusers: txt2img2img (hires_fix)

with so much slicing and dicing of pipeline methods to stitch them together

* refactor(diffusers): reduce some code duplication amongst the different tasks

* fixup! refactor(diffusers): reduce some code duplication amongst the different tasks

* diffusers: enable DPMSolver++ scheduler

* diffusers: upgrade to diffusers 0.10, add Heun scheduler

* diffusers(ModelCache): stopgap to make from_cpu compatible with diffusers

* CI: default to diffusers-1.5 now that runwayml token requirement is gone

* diffusers: update to 0.10 (and transformers to 4.25)

* diffusers: use xformers when available

diffusers no longer auto-enables this as of 0.10.2.

* diffusers: make masked img2img behave better with multi-step schedulers

re-randomizing the noise each step was confusing them.

* diffusers: work more better with more models.

fixed relative path problem with local models.

fixed models on hub not always having a `fp16` branch.

* diffusers: stopgap fix for attention_maps_callback crash after recent merge

* fixup import merge conflicts

correction for 061c5369a2

* test: add tests/inpainting inputs for masked img2img

* diffusers(AddsMaskedGuidance): partial fix for k-schedulers

Prevents them from crashing, but results are still hot garbage.

* fix --safety_checker arg parsing

and add note to diffusers loader about where safety checker gets called

* generate: fix import error

* CI: don't try to read the old init location

* diffusers: support loading an alternate VAE

* CI: remove sh-syntax if-statement so it doesn't crash powershell

* CI: fold strings in yaml because backslash is not line-continuation in powershell

* attention maps callback stuff for diffusers

* build: fix syntax error in environment-mac

* diffusers: add INITIAL_MODELS with diffusers-compatible repos

* re-enable the embedding manager; closes #1778

* Squashed commit of the following:

commit e4a956abc37fcb5cf188388b76b617bc5c8fda7d
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 15:43:07 2022 +0100

    import new load handling from EmbeddingManager and cleanup

commit c4abe91a5ba0d415b45bf734068385668b7a66e6
Merge: 032e856e 1efc6397
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 15:09:53 2022 +0100

    Merge branch 'feature_textual_inversion_mgr' into dev/diffusers_with_textual_inversion_manager

commit 032e856eefb3bbc39534f5daafd25764bcfcef8b
Merge: 8b4f0fe9 bc515e24
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 15:08:01 2022 +0100

    Merge remote-tracking branch 'upstream/dev/diffusers' into dev/diffusers_with_textual_inversion_manager

commit 1efc6397fc6e61c1aff4b0258b93089d61de5955
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 15:04:28 2022 +0100

    cleanup and add performance notes

commit e400f804ac471a0ca2ba432fd658778b20c7bdab
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 14:45:07 2022 +0100

    fix bug and update unit tests

commit deb9ae0ae1016750e93ce8275734061f7285a231
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 14:28:29 2022 +0100

    textual inversion manager seems to work

commit 162e02505dec777e91a983c4d0fb52e950d25ff0
Merge: cbad4583 12769b3d
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 11:58:03 2022 +0100

    Merge branch 'main' into feature_textual_inversion_mgr

commit cbad45836c6aace6871a90f2621a953f49433131
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 11:54:10 2022 +0100

    use position embeddings

commit 070344c69b0e0db340a183857d0a787b348681d3
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 11:53:47 2022 +0100

    Don't crash CLI on exceptions

commit b035ac8c6772dfd9ba41b8eeb9103181cda028f8
Author: Damian Stewart <d@damianstewart.com>
Date:   Sun Dec 18 11:11:55 2022 +0100

    add missing position_embeddings

commit 12769b3d3562ef71e0f54946b532ad077e10043c
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 13:33:25 2022 +0100

    debugging why it don't work

commit bafb7215eabe1515ca5e8388fd3bb2f3ac5362cf
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 13:21:33 2022 +0100

    debugging why it don't work

commit 664a6e9e14
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 12:48:38 2022 +0100

    use TextualInversionManager in place of embeddings (wip, doesn't work)

commit 8b4f0fe9d6e4e2643b36dfa27864294785d7ba4e
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 12:48:38 2022 +0100

    use TextualInversionManager in place of embeddings (wip, doesn't work)

commit ffbe1ab11163ba712e353d89404e301d0e0c6cdf
Merge: 6e4dad60 023df37e
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 02:37:31 2022 +0100

    Merge branch 'feature_textual_inversion_mgr' into dev/diffusers

commit 023df37eff
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 02:36:54 2022 +0100

    cleanup

commit 05fac594ea
Author: Damian Stewart <d@damianstewart.com>
Date:   Fri Dec 16 02:07:49 2022 +0100

    tweak error checking

commit 009f32ed39
Author: damian <null@damianstewart.com>
Date:   Thu Dec 15 21:29:47 2022 +0100

    unit tests passing for embeddings with vector length >1

commit beb1b08d9a
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu Dec 15 13:39:09 2022 +0100

    more explicit equality tests when overwriting

commit 44d8a5a7c8
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu Dec 15 13:30:13 2022 +0100

    wip textual inversion manager (unit tests passing for 1v embedding overwriting)

commit 417c2b57d9
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu Dec 15 12:30:55 2022 +0100

    wip textual inversion manager (unit tests passing for base stuff + padding)

commit 2e80872e3b
Author: Damian Stewart <d@damianstewart.com>
Date:   Thu Dec 15 10:57:57 2022 +0100

    wip new TextualInversionManager

* stop using WeightedFrozenCLIPEmbedder

* store diffusion models locally

- configure_invokeai.py reconfigured to store diffusion models rather than
  CompVis models
- hugging face caching model is used, but cache is set to ~/invokeai/models/repo_id
- models.yaml does **NOT** use path, just repo_id
- "repo_name" changed to "repo_id" to following hugging face conventions
- Models are loaded with full precision pending further work.

* allow non-local files during development

* path takes priority over repo_id

* MVP for model_cache and configure_invokeai

- Feature complete (almost)

- configure_invokeai.py downloads both .ckpt and diffuser models,
  along with their VAEs. Both types of download are controlled by
  a unified INITIAL_MODELS.yaml file.

- model_cache can load both type of model and switches back and forth
  in CPU. No memory leaks detected

TO DO:

  1. I have not yet turned on the LocalOnly flag for diffuser models, so
     the code will check the Hugging Face repo for updates before using the
     locally cached models. This will break firewalled systems. I am thinking
     of putting in a global check for internet connectivity at startup time
     and setting the LocalOnly flag based on this. It would be good to check
     updates if there is connectivity.

  2. I have not gone completely through INITIAL_MODELS.yaml to check which
     models are available as diffusers and which are not. So models like
     PaperCut and VoxelArt may not load properly. The runway and stability
     models are checked, as well as the Trinart models.

  3. Add stanzas for SD 2.0 and 2.1 in INITIAL_MODELS.yaml

REMAINING PROBLEMS NOT DIRECTLY RELATED TO MODEL_CACHE:

  1. When loading a .ckpt file there are lots of messages like this:

     Warning! ldm.modules.attention.CrossAttention is no longer being
     maintained. Please use InvokeAICrossAttention instead.

     I'm not sure how to address this.

  2. The ckpt models ***don't actually run*** due to the lack of special-case
     support for them in the generator objects. For example, here's the hard
     crash you get when you run txt2img against the legacy waifu-diffusion-1.3
     model:
```
     >> An error occurred:
     Traceback (most recent call last):
       File "/data/lstein/InvokeAI/ldm/invoke/CLI.py", line 140, in main
           main_loop(gen, opt)
      File "/data/lstein/InvokeAI/ldm/invoke/CLI.py", line 371, in main_loop
         gen.prompt2image(
      File "/data/lstein/InvokeAI/ldm/generate.py", line 496, in prompt2image
	 results = generator.generate(
      File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 108, in generate
         image = make_image(x_T)
      File "/data/lstein/InvokeAI/ldm/invoke/generator/txt2img.py", line 33, in make_image
         pipeline_output = pipeline.image_from_embeddings(
      File "/home/lstein/invokeai/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1265, in __getattr__
         raise AttributeError("'{}' object has no attribute '{}'".format(
     AttributeError: 'LatentDiffusion' object has no attribute 'image_from_embeddings'
```

  3. The inpainting diffusion model isn't working. Here's the output of "banana
     sushi" when inpainting-1.5 is loaded:

```
    Traceback (most recent call last):
      File "/data/lstein/InvokeAI/ldm/generate.py", line 496, in prompt2image
        results = generator.generate(
      File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 108, in generate
        image = make_image(x_T)
      File "/data/lstein/InvokeAI/ldm/invoke/generator/txt2img.py", line 33, in make_image
        pipeline_output = pipeline.image_from_embeddings(
      File "/data/lstein/InvokeAI/ldm/invoke/generator/diffusers_pipeline.py", line 301, in image_from_embeddings
        result_latents, result_attention_map_saver = self.latents_from_embeddings(
      File "/data/lstein/InvokeAI/ldm/invoke/generator/diffusers_pipeline.py", line 330, in latents_from_embeddings
        result: PipelineIntermediateState = infer_latents_from_embeddings(
      File "/data/lstein/InvokeAI/ldm/invoke/generator/diffusers_pipeline.py", line 185, in __call__
        for result in self.generator_method(*args, **kwargs):
      File "/data/lstein/InvokeAI/ldm/invoke/generator/diffusers_pipeline.py", line 367, in generate_latents_from_embeddings
        step_output = self.step(batched_t, latents, guidance_scale,
      File "/home/lstein/invokeai/.venv/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
        return func(*args, **kwargs)
      File "/data/lstein/InvokeAI/ldm/invoke/generator/diffusers_pipeline.py", line 409, in step
        step_output = self.scheduler.step(noise_pred, timestep, latents, **extra_step_kwargs)
      File "/home/lstein/invokeai/.venv/lib/python3.9/site-packages/diffusers/schedulers/scheduling_lms_discrete.py", line 223, in step
        pred_original_sample = sample - sigma * model_output
    RuntimeError: The size of tensor a (9) must match the size of tensor b (4) at non-singleton dimension 1
```

* proper support for float32/float16

- configure script now correctly detects user's preference for
  fp16/32 and downloads the correct diffuser version. If fp16
  version not available, falls back to fp32 version.

- misc code cleanup and simplification in model_cache

* add on-the-fly conversion of .ckpt to diffusers models

1. On-the-fly conversion code can be found in the file ldm/invoke/ckpt_to_diffusers.py.

2. A new !optimize command has been added to the CLI. Should be ported to Web GUI.

User experience on the CLI is this:

```
invoke> !optimize /home/lstein/invokeai/models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
INFO: Converting legacy weights file /home/lstein/invokeai/models/ldm/stable-diffusion-v1/sd-v1-4.ckpt to optimized diffuser model.
      This operation will take 30-60s to complete.
Success. Optimized model is now located at /home/lstein/tmp/invokeai/models/optimized-ckpts/sd-v1-4
Writing new config file entry for sd-v1-4...

>> New configuration:
sd-v1-4:
  description: Optimized version of sd-v1-4
  format: diffusers
  path: /home/lstein/tmp/invokeai/models/optimized-ckpts/sd-v1-4

OK to import [n]? y
>> Verifying that new model loads...
>> Current VRAM usage:  2.60G
>> Offloading stable-diffusion-2.1 to CPU
>> Loading diffusers model from /home/lstein/tmp/invokeai/models/optimized-ckpts/sd-v1-4
  | Using faster float16 precision
You have disabled the safety checker for <class 'ldm.invoke.generator.diffusers_pipeline.StableDiffusionGeneratorPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion \
license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances,\
 disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
  | training width x height = (512 x 512)
>> Model loaded in 3.48s
>> Max VRAM used to load the model: 2.17G
>> Current VRAM usage:2.17G
>> Textual inversions available:
>> Setting Sampler to k_lms (LMSDiscreteScheduler)
Keep model loaded? [y]
```

* add parallel set of generator files for ckpt legacy generation

* generation using legacy ckpt models now working

* diffusers: fix missing attention_maps_callback

fix for 23eb80b404

* associate legacy CrossAttention with .ckpt models

* enable autoconvert

New --autoconvert CLI option will scan a designated directory for
new .ckpt files, convert them into diffuser models, and import
them into models.yaml.

Works like this:

   invoke.py --autoconvert /path/to/weights/directory

In ModelCache added two new methods:

  autoconvert_weights(config_path, weights_directory_path, models_directory_path)
  convert_and_import(ckpt_path, diffuser_path)

* diffusers: update to diffusers 0.11 (from 0.10.2)

* fix vae loading & width/height calculation

* refactor: encapsulate these conditioning data into one container

* diffusers: fix some noise-scaling issues by pushing the noise-mixing down to the common function

* add support for safetensors and accelerate

* set local_files_only when internet unreachable

* diffusers: fix error-handling path when model repo has no fp16 branch

* fix generatorinpaint error

Fixes :
  "ModuleNotFoundError: No module named 'ldm.invoke.generatorinpaint'
   https://github.com/invoke-ai/InvokeAI/pull/1583#issuecomment-1363634318

* quench diffuser safety-checker warning

* diffusers: support stochastic DDIM eta parameter

* fix conda env creation on macos

* fix cross-attention with diffusers 0.11

* diffusers: the VAE needs to be tiling as well as the U-Net

* diffusers: comment on subfolders

* diffusers: embiggen!

* diffusers: make model_cache.list_models serializable

* diffusers(inpaint): restore scaling functionality

* fix requirements clash between numba and numpy 1.24

* diffusers: allow inpainting model to do non-inpainting tasks

* start expanding model_cache functionality

* add import_ckpt_model() and import_diffuser_model() methods to model_manager

- in addition, model_cache.py is now renamed to model_manager.py

* allow "recommended" flag to be optional in INITIAL_MODELS.yaml

* configure_invokeai now downloads VAE diffusers in advance

* rename ModelCache to ModelManager

* remove support for `repo_name` in models.yaml

* check for and refuse to load embeddings trained on incompatible models

* models.yaml.example: s/repo_name/repo_id

and remove extra INITIAL_MODELS now that the main one has diffusers models in it.

* add MVP textual inversion script

* refactor(InvokeAIDiffuserComponent): factor out _combine()

* InvokeAIDiffuserComponent: implement threshold

* InvokeAIDiffuserComponent: diagnostic logs for threshold

...this does not look right

* add a curses-based frontend to textual inversion

- not quite working yet
- requires npyscreen installed
- on windows will also have the windows-curses requirement, but not added
  to requirements yet

* add curses-based interface for textual inversion

* fix crash in convert_and_import()

- This corrects a "local variable referenced before assignment" error
  in model_manager.convert_and_import()

* potential workaround for no 'state_dict' key error

- As reported in https://github.com/huggingface/diffusers/issues/1876

* create TI output dir if needed

* Update environment-lin-cuda.yml (#2159)

Fixing line 42 to be the proper order to define the transformers requirement: ~= instead of =~

* diffusers: update sampler-to-scheduler mapping

based on https://github.com/huggingface/diffusers/issues/277#issuecomment-1371428672

* improve user exp for ckt to diffusers conversion

- !optimize_models command now operates on an existing ckpt file entry in models.yaml
- replaces existing entry, rather than adding a new one
- offers to delete the ckpt file after conversion

* web: adapt progress callback to deal with old generator or new diffusers pipeline

* clean-up model_manager code

- add_model() verified to work for .ckpt local paths,
  .ckpt remote URLs, diffusers local paths, and
  diffusers repo_ids

- convert_and_import() verified to work for local and
  remove .ckpt files

* handle edge cases for import_model() and convert_model()

* add support for safetensor .ckpt files

* fix name error

* code cleanup with pyflake

* improve model setting behavior

- If the user enters an invalid model name at startup time, will not
  try to load it, warn, and use default model
- CLI UI enhancement: include currently active model in the command
  line prompt.

* update test-invoke-pip.yml
- fix model cache path to point to runwayml/stable-diffusion-v1-5
- remove `skip-sd-weights` from configure_invokeai.py args

* exclude dev/diffusers from "fail for draft PRs"

* disable "fail on PR jobs"

* re-add `--skip-sd-weights` since no space

* update workflow environments
- include `INVOKE_MODEL_RECONFIGURE: '--yes'`

* clean up model load failure handling

- Allow CLI to run even when no model is defined or loadable.
- Inhibit stack trace when model load fails - only show last error
- Give user *option* to run configure_invokeai.py when no models
  successfully load.
- Restart invokeai after reconfiguration.

* further edge-case handling

1) only one model in models.yaml file, and that model is broken
2) no models in models.yaml
3) models.yaml doesn't exist at all

* fix incorrect model status listing

- "cached" was not being returned from list_models()
- normalize handling of exceptions during model loading:
   - Passing an invalid model name to generate.set_model() will return
     a KeyError
   - All other exceptions are returned as the appropriate Exception

* CI: do download weights (if not already cached)

* diffusers: fix scheduler loading in offline mode

* CI: fix model name (no longer has `diffusers-` prefix)

* Update txt2img2img.py (#2256)

* fixes to share models with HuggingFace cache system

- If HF_HOME environment variable is defined, then all huggingface models
  are stored in that directory following the standard conventions.
- For seamless interoperability, set HF_HOME to ~/.cache/huggingface
- If HF_HOME not defined, then models are stored in ~/invokeai/models.
  This is equivalent to setting HF_HOME to ~/invokeai/models

A future commit will add a migration mechanism so that this change doesn't
break previous installs.

* feat - make model storage compatible with hugging face caching system

This commit alters the InvokeAI model directory to be compatible with
hugging face, making it easier to share diffusers (and other models)
across different programs.

- If the HF_HOME environment variable is not set, then models are
  cached in ~/invokeai/models in a format that is identical to the
  HuggingFace cache.

- If HF_HOME is set, then models are cached wherever HF_HOME points.

- To enable sharing with other HuggingFace library clients, set
  HF_HOME to ~/.cache/huggingface to set the default cache location
  or to ~/invokeai/models to have huggingface cache inside InvokeAI.

* fixes to share models with HuggingFace cache system

    - If HF_HOME environment variable is defined, then all huggingface models
      are stored in that directory following the standard conventions.
    - For seamless interoperability, set HF_HOME to ~/.cache/huggingface
    - If HF_HOME not defined, then models are stored in ~/invokeai/models.
      This is equivalent to setting HF_HOME to ~/invokeai/models

    A future commit will add a migration mechanism so that this change doesn't
    break previous installs.

* fix error "no attribute CkptInpaint"

* model_manager.list_models() returns entire model config stanza+status

* Initial Draft - Model Manager Diffusers

* added hash function to diffusers

* implement sha256 hashes on diffusers models

* Add Model Manager Support for Diffusers

* fix various problems with model manager

- in cli import functions, fix not enough values to unpack from
  _get_name_and_desc()
- fix crash when using old-style vae: value with new-style diffuser

* rebuild frontend

* fix dictconfig-not-serializable issue

* fix NoneType' object is not subscriptable crash in model_manager

* fix "str has no attribute get" error in model_manager list_models()

* Add path and repo_id support for Diffusers Model Manager

Also fixes bugs

* Fix tooltip IT localization not working

* Add Version Number To WebUI

* Optimize Model Search

* Fix incorrect font on the Model Manager UI

* Fix image degradation on merge fixes - [Experimental]

This change should effectively fix a couple of things.

- Fix image degradation on subsequent merges of the canvas layers.
- Fix the slight transparent border that is left behind when filling the bounding box with a color.
- Fix the left over line of color when filling a bounding box with color.

So far there are no side effects for this. If any, please report.

* Add local model filtering for Diffusers / Checkpoints

* Go to home on modal close for the Add Modal UI

* Styling Fixes

* Model Manager Diffusers Localization Update

* Add Safe Tensor scanning to Model Manager

* Fix model edit form dispatching string values instead of numbers.

* Resolve VAE handling / edge cases for supplied repos

* defer injecting tokens for textual inversions until they're used for the first time

* squash a console warning

* implement model migration check

* add_model() overwrites previous config rather than merges

* fix model config file attribute merging

* fix precision handling in textual inversion script

* allow ckpt conversion script to work with safetensors .ckpts

Applied patch here:
beb932c5d1

* fix name "args" is not defined crash in textual_inversion_training

* fix a second NameError: name 'args' is not defined crash

* fix loading of the safety checker from the global cache dir

* add installation step to textual inversion frontend

- After a successful training run, the script will copy learned_embeds.bin
  to a subfolder of the embeddings directory.
- User given the option to delete the logs and intermediate checkpoints
  (which together use 7-8G of space)
- If textual inversion training fails, reports the error gracefully.

* don't crash out on incompatible embeddings

- put try: blocks around places where the system tries to load an embedding
  which is incompatible with the currently loaded model

* add support for checkpoint resuming

* textual inversion preferences are saved and restored between sessions

- Preferences are stored in a file named text-inversion-training/preferences.conf
- Currently the resume-from-checkpoint option is not working correctly. Possible
  bug in textual_inversion_training.py?

* copy learned_embeddings.bin into right location

* add front end for diffusers model merging

- Front end doesn't do anything yet!!!!
- Made change to model name parsing in CLI to support ability to have merged models
  with the "+" character in their names.

* improve inpainting experience

- recommend ckpt version of inpainting-1.5 to user
- fix get_noise() bug in ckpt version of omnibus.py

* update environment*yml

* tweak instructions to install HuggingFace token

* bump version number

* enhance update scripts

- update scripts will now fetch new INITIAL_MODELS.yaml so that
  configure_invokeai.py will know about the diffusers versions.

* enhance invoke.sh/invoke.bat launchers

- added configure_invokeai.py to menu
- menu defaults to browser-based invoke

* remove conda workflow (#2321)

* fix `token_ids has shape torch.Size([79]) - expected [77]`

* update CHANGELOG.md with 2.3.* info

- Add information on how formats have changed and the upgrade process.
- Add short bug list.

Co-authored-by: Damian Stewart <d@damianstewart.com>
Co-authored-by: Damian Stewart <null@damianstewart.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Co-authored-by: Wybartel-luxmc <37852506+Wybartel-luxmc@users.noreply.github.com>
Co-authored-by: mauwii <Mauwii@outlook.de>
Co-authored-by: mickr777 <115216705+mickr777@users.noreply.github.com>
Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
2023-01-15 09:22:46 -05:00
c855d2a350 Consolidate version numbers (#2201)
* update version number

* print version number at startup

* move version number into ldm/invoke/_version.py

* bump version to 2.2.6+a0

* handle whitespace better

* resolve issues raised by mauwii during PR review
2023-01-15 04:07:21 +01:00
4dd74cdc68 update Readme (#2278)
* Update Readme & Assets

* Update Canvas Assets

* Updated Readme to correct missing refs

* Correcting refs

* Updating Canvas Preview size

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2023-01-15 01:13:11 +00:00
746e97ea1d enhance the installer (#2299)
1. create_installers.sh now asks before tagging and committing the
   current repo
2. trailing whitespace removed from user-provided location of invokeai
   directory in install.bat
2023-01-14 19:28:14 -05:00
241313c4a6 Update automated install doc - link to MS C libs
Updated the link for the MS Visual C libraries - I'm not sure if MS changed the location of the files but this new one leads right to the file downloads.
2023-01-12 14:09:35 -08:00
b6d1a17a1e tip fix 2023-01-09 23:53:55 +06:00
c73434c2a3 tweak install instructions (#2227)
- Removed links from the install instructions to the installer zip files.
- Replaced "2.2.4" with "2.X.X" globally, to avoid the docs going out of
  date.
2023-01-09 00:12:41 +00:00
69b15024a9 update python requirements (#2251)
since torch versions <0.13.1 have a critical security issue
2023-01-08 07:44:03 -05:00
26e413ae9c Require huggingface-hub version 0.11.1 (#2222)
`import login` only works in huggingface-hub >= 0.11.0

Fixes https://github.com/invoke-ai/InvokeAI/issues/2149
2023-01-04 22:21:48 +00:00
91eb84c5d9 Allow multiple CORS origins (#2031)
* Permit cmd override for CORS modification

* Enable multiple origins for CORS

* Remove CMD_OVERRIDE

* Revert executable bit change

* Defensively convert list into string

* Bad if statement

* Retry rebase

* Retry rebase

Co-authored-by: Chris Dawson <chris@vivoh.com>
2023-01-04 14:26:42 -05:00
5d69bd408b fix facexlib weights being downloaded to .venv (#2221)
- fix problem of facexlib weights being downloaded into the .venv
  package directory when codeformer restoration requested.
- now users pre-downloaded weights in ~/invokeai/models/gfpgan/weights
  (which is shared with gfpgan)

Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
2023-01-04 14:22:49 -05:00
21bf512056 Local embeddings support (CLI autocomplete) (#2211)
* integrate local embeds with HF embeds

* Update concepts_lib.py

* Update concepts_lib.py

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2023-01-04 06:22:10 +00:00
6c6e534c1a fix codeformer facexlib files being downloaded into .venv
- Fixed codeformer module so that the facexlib files are downloaded
  into their pre-stored location in models/gfpgan/weights (shared
  with the GFPGAN module)
2023-01-04 00:13:33 -05:00
010378153f spelling mistake fixxed
wil -> will
2023-01-04 05:48:18 +13:00
9091b6e24a Explicitly call python found in system (#2203)
Explicitly calls the python bin found in the system instead of calling `python` which may fail on systems where python is installed as `python3`
2023-01-02 13:47:01 +00:00
64700b07a8 fixing a typo in invoke.py (#2204) 2023-01-02 02:39:43 +00:00
34f8117241 Fix patchmatch-docs (#2111)
* use `uname -m` instead of `arch`
addressing #2105

* fix install patchmatch formating

* fix 2 broken links

* remove instruction to do develop install of patchmatch

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2023-01-01 20:52:05 +00:00
c3f82d4481 update version number (#2199) 2023-01-01 19:26:55 +00:00
3929bd3e13 Lstein release candidate 2.2.5 (#2137)
* installer tweaks in preparation for v2.2.5

- pin numpy to 1.23.* to avoid requirements conflict with numba
- update.sh and update.bat now accept a tag or branch string, not a URL
- update scripts download latest requirements-base before updating.

* update.bat.in debugged and working

* update pulls from "latest" now

* bump version number

* fix permissions on create_installer.sh

* give Linux user option of installing ROCm or CUDA

* rc2.2.5 (install.sh) relative path fixes (#2155)

* (installer) fix bug in resolution of relative paths in linux install script

point installer at 2.2.5-rc1

selecting ~/Data/myapps/ as location  would create a ./~/Data/myapps
instead of expanding the ~/ to the value of ${HOME}

also, squash the trailing slash in path, if it was entered by the user

* (installer) add option to automatically start the app after install

also: when exiting, print the command to get back into the app

* remove extraneous whitespace

* model_cache applies rootdir to config path

* bring installers up to date with 2.2.5-rc2

* bump rc version

* create_installer now adds version number

* rebuild frontend

* bump rc#

* add locales to frontend dist package

- bump to patchlevel 6

* bump patchlevel

* use invoke-ai version of GFPGAN

- This version is very slightly modified to allow weights files
  to be pre-downloaded by the configure script.

* fix formatting error during startup

* bump patch level

* workaround #2 for GFPGAN facexlib() weights downloading

* bump patch

* ready for merge and release

* remove extraneous comment

* set PYTORCH_ENABLE_MPS_FALLBACK directly in invoke.py

Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2023-01-01 17:54:45 +00:00
caf7caddf7 Update WEBUIHOTKEYS.md - Key Display (#2190)
* Update WEBUIHOTKEYS.md

Fixed display errors so it no longer show extra plus signs on the site

* Update WEBUIHOTKEYS.md

Correction to keycap look to have symbols on special keys like enter, shift, and ctrl.
2022-12-31 23:48:17 +01:00
9fded69f0c Frontend Lint 2022-12-31 06:22:32 +13:00
9f719883c8 WebUI 2.2.5 Bug Fix Build 2022-12-31 06:22:32 +13:00
5d4da31dcd Localization Updates 2022-12-31 06:22:32 +13:00
686640af3a Fix status localization not working when iteration count > 0 2022-12-31 06:22:32 +13:00
edc22e06c3 RU Localization for Model Manager and Tooltips
Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>
2022-12-31 06:22:32 +13:00
409a46e2c4 Fix styling of slider input to accommodate 4 digit values 2022-12-31 06:22:32 +13:00
e7ee4ecac7 Fix NumberInput not respecting min and max values on stepper click 2022-12-31 06:22:32 +13:00
da6c690d7b WebUI 2.2.5 Build 2022-12-30 08:35:54 +13:00
7c4544f95e Fix Seed Shuffle layout to adjust to localization text 2022-12-30 08:35:54 +13:00
f173e0a085 i18n: add Spanish (es) translations 2022-12-30 08:35:54 +13:00
2a90e0c55f Remove extra trailing space in JSON file 2022-12-30 08:35:54 +13:00
9d103ef030 attempt to address memory issues when loading ckpt models (#2128)
- A couple of users have reported that switching back and forth
  between ckpt models is causing a "GPU out of memory" crash.
  Traceback suggests there is actually a CPU RAM issue.

- This speculative test simply performs a round of garbage collection
  before the point where the crash occurs.
2022-12-29 09:00:50 -05:00
4cc60669c1 [WebUI] Localize tooltips (#2136)
* [WebUI]: Localize tooltips

* fix: typo in seamCorrection translation

* [WebUI]: Localize tooltips

* fix: typo in seamCorrection translation

* Add Missing Language Placeholders for Tooltip Localization

* Fix UI displacement in RU localization for options

* Fix double options during merge.

* Fix tkinter lefover

Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
2022-12-29 21:19:57 +13:00
d456aea8f3 Update WEBUIHOTKEYS.md
Fixed display errors so it no longer show extra plus signs on the site
2022-12-29 17:30:57 +13:00
4151883cb2 i18n: simplified chinese translations for model manager 2022-12-29 16:37:51 +13:00
a029d90630 Model Manager Final Build 2022-12-29 08:33:27 +13:00
211d6b3831 Improve add models guidance 2022-12-29 08:33:27 +13:00
b40faa98bd Model Manager Test Build 4 2022-12-29 08:33:27 +13:00
8d4ad0de4e Formatting Pass 2022-12-29 08:33:27 +13:00
e4b2f815e8 Improve interaction area for edit and stylize 2022-12-29 08:33:27 +13:00
0dd5804949 Normalize the config path to prevent write errors 2022-12-29 08:33:27 +13:00
53476af72e Add Italian and PT BR Localization for Model Manager 2022-12-29 08:33:27 +13:00
61ee597f4b Add Messages To Indicate to the user to add models. 2022-12-29 08:33:27 +13:00
ad0b366e47 Add option to scan loaded folder again 2022-12-29 08:33:27 +13:00
942f029a24 Model Manager Test Build 3 2022-12-29 08:33:27 +13:00
e0d7c466cc Add Scrollbar Styling 2022-12-29 08:33:27 +13:00
16c0132a6b Model Manager Test Build 2 2022-12-29 08:33:27 +13:00
7cb2fcf8b4 Remove folder picker 2022-12-29 08:33:27 +13:00
1a65d43569 Add Icon To the tkinter folder picker 2022-12-29 08:33:27 +13:00
1313e31f62 Add Italian Localization for Model Manager 2022-12-29 08:33:27 +13:00
aa213285bb Style fixes to accommodate localization in Model Manager 2022-12-29 08:33:27 +13:00
f691353570 Add Model Manager German Localization 2022-12-29 08:33:27 +13:00
1c75010f29 Model Manager Test Build 2022-12-29 08:33:27 +13:00
eba8fb58ed Change Settings Icon in the Site Header 2022-12-29 08:33:27 +13:00
83a7e60fe5 Add Missing Localization Files for Model Manager 2022-12-29 08:33:27 +13:00
d4e86feeeb Add Simplified Chinese Localization
Co-Authored-By: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
2022-12-29 08:33:27 +13:00
427614d1df Populate en-US localization configs 2022-12-29 08:33:27 +13:00
ce6fb8ea29 Model Form Styling 2022-12-29 08:33:27 +13:00
df858eb3f9 Add Edit Model Functionality 2022-12-29 08:33:27 +13:00
6523fd07ab Model Edit Initial Implementation 2022-12-29 08:33:27 +13:00
a823e37126 Fix storehook references 2022-12-29 08:33:27 +13:00
4eed06903c Adding model edits (unstable/WIP) 2022-12-29 08:33:27 +13:00
79d577bff9 Model Manager Frontend Rebased 2022-12-29 08:33:27 +13:00
3521557541 Model Manager Backend Implementation 2022-12-29 08:33:27 +13:00
e66b1a685c Update README.md (#2115)
Copyright (c) 2020 -> 2022

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-25 16:41:11 +00:00
c351aa19eb Update 020_INSTALL_MANUAL.md (#2093)
Fixed a description that was overflowing from the warning box
2022-12-25 02:02:50 +00:00
aa1f46820f Update 020_INSTALL_MANUAL.md (#2114)
«git clone» step added for pip

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 21:11:51 +00:00
1d34405f4f [WebUI] Localization Support (#2050)
* Initial Localization Implementation

* Fix Initial Spinner

* Language Picker Dropdown

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Fixed localization breaking themes

* useUpdateTranslation Hook

To force trigger translations for data objects

* Localize Tab Data

* Localize Prompt Input & Current Image Buttons

* Localize Gallery & Bug FIxes

Fix a bug where the delete image from the context menu wasn't working. Removed tooltips that were broken as they don't work in context menu.

* Fix localization breaking in production

* Add Toast Localization Support

* Localize Unified Canvas

* Localize WIP Tabs

* Localize Hotkeys

* Localize Settings

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Add Support for Italian and Portuguese

* Localize Toasts

* Fix width of language picker items

* Localize Backend Messages

* Disable Debug Messages

* Add Support for French

* Fix missing localization for a string in the SettingsModal

* Disable French

* Styling updates to normalize text and accommodate other langs

* Add Portuguese Brazilian

* Fix Hotkey headers not being localized.

* Fix styling issue on models tag in Settings

* Fix Slider Styling to accommodate different languages

* Fix slider styling in light mode.

* Add German

* Add Italian

* Add Polish

* Update Italian

* Localized Frontend Build

* Updated RU Translations

* Fresh Build with updated RU changes

* Bug Fixes and Loc Updates

* Updated Frontend Build

* Fresh Build

Co-authored-by: Artur <83028930+netsvetaev@users.noreply.github.com>
2022-12-24 18:23:21 +00:00
f961e865f5 use uname -m instead of arch (#2110)
addressing #2105

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 16:55:19 +00:00
9eba6acb7f Fix of Hires Fix on Img2Img tab (#2096)
* Fix of Hires Fix on Img2Img tab

Fixed linting issues

* Attempting to fix prettier workflow issues

* More Prettier Attempts

* Finally Fixed Prettier Issues

* Fix of Hires Fix on Img2Img tab

Fixed linting issues

* Attempting to fix prettier workflow issues

* More Prettier Attempts

* Finally Fixed Prettier Issues

* updated with useEffect

* Update to fix Prettier

* Update useEffect dependencies

* Fix dispatch dependency error from prettier

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-24 10:56:40 -05:00
e32dd1d703 [docs] Provide an example of reading prompts from a script (#2087)
* add example of using -from_file to read from a script

Addresses #1654, #473, #566, #1008 at least partially.

* fix bug in code example

* improve docs for !fetch and !replay

* enable rendering of images in GH WebUI
also fix indention in some bullet lists

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-23 14:06:59 +00:00
bbbfea488d Update 020_INSTALL_MANUAL.md (#2092)
The file name should be configure_invokeai.py
2022-12-23 04:58:40 +00:00
c8a9848ad6 correct a crash in img2img under particular circumstances (#2088)
When using the inpainting model, the following sequence of events
would cause a predictable crash:

1. Use unified canvas to outcrop a portion of the image.
2. Accept outcropped image and import into img2img
3. Try any img2img operation

This closes #1596.

The crash was:

```
operands could not be broadcast together with shapes (320,512) (512,576)

Traceback (most recent call last):
  File "/data/lstein/InvokeAI/backend/invoke_ai_web_server.py", line 1125, in generate_images
    self.generate.prompt2image(
  File "/data/lstein/InvokeAI/ldm/generate.py", line 492, in prompt2image
    results = generator.generate(
  File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 98, in generate
    image = make_image(x_T)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/omnibus.py", line 138, in make_image
    return self.sample_to_image(samples)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/omnibus.py", line 173, in sample_to_image
    corrected_result = super(Img2Img, self).repaste_and_color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius)
  File "/data/lstein/InvokeAI/ldm/invoke/generator/base.py", line 148, in repaste_and_color_correct
    mask_pixels = init_a_pixels * init_mask_pixels > 0
ValueError: operands could not be broadcast together with shapes (320,512) (512,576)
```

This error was caused by the image and its mask not being of identical
size due to the outcropping operation. The ultimate cause of this
error has something to do with different code paths being followed in
the `inpaint` vs the `omnibus` modules.

Since omnibus will be obsoleted by diffusers, I have chosen just to
work around the problem rather than track it down to its source. The
only ill effect is that color correction will not be applied to the
first image created by `img2img` after applying the outcrop and
immediately importing into the img2img canvas. Since the inpainting
model has less of a color drift problem than the standard model, this
is unlikely to be problematic.
2022-12-22 14:53:23 +00:00
e88e274bf2 Add @ebr to Contributors (#2095)
* (docs) @ebr signs Statement of Values

* (docs) add @ebr to Contributors page
2022-12-21 14:33:08 -05:00
cca8d14c79 defer patchmatch loading (#2039)
* defer patchmatch loading

Because of the way that patchmatch was loaded early at import time, it
was impossible to turn off the attempted loading with --no-patchmatch.

In addition, the patchmatch loading messages appear early on during
initialization, interfering with ability to print out the version
cleanly when --version provided to invoke script.

This commit creates a thin wrapper class for patch_match that is only
loaded when needed, solving both problems.

* create a singleton patchmatch object for use in inpainting

This creates a thin wrapper to patchmatch which loads the module
on demand, respecting the global "trypatchmatch" option.

* address 2d round of issues in PR 2039 comments

* Patchmatch->PatchMatch and misc cleanup
2022-12-20 15:32:35 -08:00
464aafa862 Correct asset link (#2081)
* Correct asset link

Minor documentation fix to correct linked asset.

* fix switched graphics
also:
- add blanks before/after figure tag
  (makes the screenshot also appear in github)
- use a table in inpainting example to have the pics side by side

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-20 17:29:54 +00:00
6e98b5535d add --version to invoke.py arguments (#2038)
* add --version to invoke.py arguments

This commit allows invoke.py to print out its name and version
number when given the --version argument. I had to move some
status messages around in order to make the output clean.

There is still an early message about initializing patchmatch
that interferes with a clean print of the version, and in fact the
--no-patchmatch argument is not doing anything. This will be the
subject of a subsequent PR.

* export APP_ID and APP_VERSION

Needed to support the web backend.
2022-12-20 15:14:28 +00:00
ab2972f320 Fix the configure script crash when no TTY is allocated (e.g. a container) (#2080)
* (config) avoid failure when huggingface token is not set

it is not required for model download, and we are handling the
saving of the token during huggingface authentication phase elsewhere.

* (config) safely print to non-tty terminals where width can not be determined
2022-12-20 03:52:58 +01:00
1ba40db361 optimize Dockerfile (#2036)
* remove build-essentials after opencv is built
also remo unecesarry python3-opencv dependencie (its already in venv)

* use branch name as tag

* leave pip and setuptools on the preinstalled vers.

* Rename Argument from WORKDIR to APPDIR

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-19 23:53:19 +01:00
f69fc68e06 Revert "Don't crash CLI on exceptions (#2066)" (#2078)
This reverts commit 147834e99c.
2022-12-20 08:56:04 +13:00
7d8d4bcafb Global replace [ \t]+$, add "GB" (#1751)
* "GB"

* Replace [ \t]+$ global

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-19 16:36:39 +00:00
4fd97ceddd remove redundant code line (#2068)
* remove redundant code line

install.bat was copying the requirements file into the install folder
twice, causing an error message on the second try. This fixes the
issue.

* add further improvements to installer

- Windows version will unzip to have requirements.txt already in
  the right location, to prevent problems when users try to run
  the .bat script from within a mounted read-only zip file manager.

- Do not assume that "pip" is on the path in either the .bat or shell
  versions of the update script.
2022-12-19 14:57:41 +00:00
ded49523cd (docs) update installer links as per some Discord reports 2022-12-18 22:32:33 -05:00
914e5fc4f8 (docs) update python install instructions for Ubuntu. Add documentation for installing OpenGL libraries on Linux. Fixes #1987 2022-12-18 22:32:33 -05:00
ab4d391a3a (docs) call out that the root volume needs at least 6GB of free space for pip cache. Fixes #2056 2022-12-18 22:32:33 -05:00
82f59829b8 set workflow PR triggers to filter PR-types (#2065)
* set workflow PR triggers to filter PR-types
- `review_requested`
- `ready_for_review`

* fail tests if draft pr

* add more types to test pr triggers

* remove unneeded condition

* readd condition

* leave PR-types default, only verify PRs to main
and fail for draft-PRs

* set types to cancel when converted to draft
2022-12-18 20:54:07 +00:00
147834e99c Don't crash CLI on exceptions (#2066) 2022-12-18 16:28:47 +01:00
f41da11d66 Relax Huggingface login requirement during setup (#2046)
* (config) handle huggingface token more gracefully

* (docs) document HuggingFace token requirement for Concepts

* (cli) deprecate the --(no)-interactive CLI flag

It was previously only used to skip the SD weights download, and therefore
the prompt for Huggingface token (the "interactive" part).

Now that we don't need a Huggingface token
to download the SD weights at all, we can replace this flag with
"--skip-sd-weights", to clearly describe its purpose

The `--(no)-interactive` flag still functions the same, but shows a deprecation message

* (cli) fix emergency_model_reconfigure argument parsing

* (config) fix installation issues on systems with non-UTF8 locale

Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
2022-12-18 10:44:50 +01:00
5c5454e4a5 (docs) add redirects for moved pages (#2063) 2022-12-18 08:04:58 +00:00
dedbdeeafc Update scripts/configure_invokeai.py
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
2022-12-18 01:21:47 -05:00
d1770bff37 Accept --root_dir in addition to --root in configure_ivokeai.py to be consistent with the documentation in 020_INSTALL_MANUAL. 2022-12-18 01:21:47 -05:00
20652620d9 Added compiled TS changes 2022-12-17 20:56:42 -05:00
51613525a4 Updated to pull threshold from an existing image even if 0 (#2051)
Addresses #2049 but not other cases where the stored value is 0 (e.g. perlin noise). This should be investigated more throughly.
2022-12-17 19:03:09 -05:00
dc39f8d6a7 Fix broken embedding variants (#2037) 2022-12-17 03:07:05 +00:00
f1748d7017 avoid leaking data to HuggingFace (#2021)
Before making a concept download request to HuggingFace, the concepts
library module now checks the concept name against a downloaded list
of all the concepts currently known to HuggingFace.  If the requested
concept is not on the list, then no download request is made.
2022-12-16 16:50:02 +00:00
de7abce464 add an argument that lets user specify folders to scan for weights (#1977)
* add an argument that lets user specify folders to scan for weights

This PR adds a `--weight_folders` argument to invoke.py. Using
argparse, it adds a "weight_folders" attribute to the Args object, and
can be used like this:

```
'''test.py'''
from ldm.invoke.args import Args

args = Args().parse_args()

for folder in args.weight_folders:
    print(folder)
```

Example output:

```
python test.py --weight_folders /tmp/weights /home/fred/invokeai/weights "./my folder with spaces/weight files"
/tmp/weights
/home/fred/invokeai/weights
./my folder with spaces/weight files
```

* change --weight_folders to --weight_dirs
2022-12-16 15:14:49 +00:00
2aa5bb6aad Auto-format frontend (#2009)
* Auto-format frontend

* Update lint-frontend GA workflow node and checkout

* Fix linter error in ThemeChanger

* Add a `on: pull_request` to lint-frontend workflow

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-16 13:56:39 +01:00
c0c4d7ca69 update (docker-)build scripts, .dockerignore and add patchmatch (#1970)
* update build scripts and dockerignore
updates to build and run script:
- read repository name
- include flavor in container name
- read arch via arch command
- use latest tag instead of arch
- don't bindmount `$HOME/.huggingface`
- make sure HUGGINGFACE_TOKEN is set

updates to .dockerignore
- include environment-and-requirements
- exclude binary_installer
- exclude docker-build
- exclude docs

* disable push and pr triggers of cloud image
also disable pushing.

This was decided since:
- it is not multiarch useable
- the default image is already cloud aproved

* integrate patchmatch in container

* pin verisons of recently introduced dependencies

* remove now unecesarry part from build.sh
move huggingface token to run script, so it can download missing models

* move GPU_FLAGS to run script
since not needed at build time

* update env.sh

- read REPOSITORY_NAME from env if available
- add comment to explain the intension of this file
- remove unecesarry exports

* get rid of repository_name_lc

* capitalize variables

* update INSTALL_DOCKER with new variables

* add comments pointing to the docs

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-16 13:53:37 +01:00
7d09d9da49 delete old 'server' package and the dependency_injector requirement (#2032)
fixes #1944
2022-12-16 06:28:16 -05:00
ffa54f4a35 Fix --config arg not being recognized 2022-12-16 18:29:47 +13:00
69cc0993f8 Add Embedding Parsing (#1973)
* Add Embedding Parsing

* Add Embedding Parsing

* Return token_dim in embedding_info

* fixes to handle other variants

1. Handle the case of a .bin file being mislabeled .pt (seen in the
wild at https://cyberes.github.io/stable-diffusion-textual-inversion-models/)

2. Handle the "broken" .pt files reported by https://github.com/invoke-ai/InvokeAI/issues/1829

3. When token name is not available, use the basename of the pt or bin file rather than the
   whole path.

fixes #1829

* remove whitespace

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-15 17:26:36 -05:00
1050f2726a update links with new filenames 2022-12-16 10:26:02 +13:00
f7170e4156 improve installation documentation
1. Added a big fat warning to the Windows installer to tell user
   to install Visual C++ redistributable.

2. Added a bit fat warning to the automated installer doc to
   tell user the same thing.

3. Reordered entries on the table-of-contents sidebar for installation
   to prioritize the most important docs.

4. Moved older installation documentation into deprecated folder.

5. Moved developer-specific installation documentation into the
   developers folder.
2022-12-16 10:26:02 +13:00
bfa8fed568 update site_name 2022-12-16 10:24:03 +13:00
2923dfaed1 update index and changelog 2022-12-16 10:24:03 +13:00
0932b4affa Replace latest link
The link still points to 2.2.3 .
2022-12-16 10:22:44 +13:00
0b10835269 Fix initial theme setting 2022-12-16 10:20:26 +13:00
6e0f3475b4 Reduce frontend eslint warnings to 0 2022-12-16 10:18:45 +13:00
9b9e276491 Add lint-frontend github actions workflow 2022-12-16 10:16:01 +13:00
392c0725f3 Remove circular dependencies in frontend 2022-12-16 10:16:01 +13:00
2a2f38a016 Correct timestep for img2img initial noise addition (#1946)
* Correct timestep for img2img initial noise addition

* apply fix to inpaint and txt2img2img as well

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-15 15:59:19 -05:00
7a4e647287 build: GitHub Action to lint python files with pyflakes (#1332) 2022-12-15 19:30:58 +00:00
b8e1151a9c change pypatchmatch only 2022-12-15 10:37:13 -05:00
f39cb668fc update requirements and environment files
- Update pypatchmatch to 0.1.5 (see request from @Kyle0654 here
  https://discord.com/channels/1020123559063990373/1034740515209486387/1052465462757310464 )

- Removed basicsrs workaround for environment files, now that we know
  problem was caused by Windows long path issue.
2022-12-15 10:37:13 -05:00
6c015eedb3 better error reporting when root directory not found (#2001)
- The invoke.py script now checks that the root (runtime) directory contains
  the expected config/models.yaml file and if it doesn't exits with a helpful
  error message about how to set the proper root.

- Formerly the script would fail with a "bad model" message and try to redownload
  its models, which is not helpful in the case that the root is missing or
  damaged.
2022-12-15 09:34:10 -05:00
834e56a513 update Contributors directive to merge to main 2022-12-14 23:42:53 -05:00
652aaa809b add missed backticks and some icons for tab
also puth the alf screenshot in a table to fit the other examples
2022-12-14 18:36:07 -05:00
89880e1f72 affirm that <concepts> work with the webGUI 2022-12-14 18:36:07 -05:00
d94f955d9d fix manual install documentation 2022-12-14 18:36:07 -05:00
64339af2dc restrict to 75 tokens and correctly handle blends 2022-12-14 16:54:27 -05:00
5d20f47993 Permit usage of GPUs in docker script (#1985)
* Add gpu support to docker

Enable GPUs within docker

* Use gpus flag

* Add GPU information to readme

* Fix env var name for GPU
2022-12-14 05:21:33 +00:00
ccf8a46320 Fix: define path as None before usage 2022-12-13 19:46:03 -05:00
af3d72e001 re-enable wheel install in test-invoke-pip.yml 2022-12-13 23:29:08 +01:00
1d78e1af9c add concurrency to test actions (#1975)
configured to only cancel workflows in PRs, but not on main branch
origins in #1933, but opitmized to not cancel workflows of non PRs
2022-12-13 19:53:10 +01:00
1fd605604f remove redundant tests, only do 20 steps (#1972)
- remove tests already performed in PR
- remove tests pointing to non existing files
- reduce steps to 20

This should decrease test time a lot and also "fix" failing mac tests.
I still recommend to invent why mac invoke takes so much longer!

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-13 19:39:29 +01:00
f0b04c5066 Typo fix in INSTALL_AUTOMATED.md (#1968) 2022-12-13 19:13:28 +01:00
2836976d6d (install) fix segfault on macos when using homebrew 2022-12-13 11:39:08 -05:00
474220ce8e Fresh Frontend Build 2022-12-13 20:45:37 +13:00
4074705194 Update WEBUIHOTKEYS.md
Update hotkeys docs. They were outdated.
2022-12-13 20:45:37 +13:00
e89ff01caf Update Hotkeys Modal
Update hotkeys modal to reflect the previous changes to the scale and restore hotkeys and also improve a few other descriptions.
2022-12-13 20:45:37 +13:00
2187d0f31c Change Restore and Upscale Hotkeys
Changed the hotkeys of Restore and Upscale from R and U to Shift R and Shift U. Users could accidentally press R and U to trigger these functions which can be annoying. Especially considering R is also a hotkey for Reset View in other tabs and it can become muscle memory.
2022-12-13 20:45:37 +13:00
1219c39d78 Lstein installer improvements (#1954)
* add logic for finding the root (runtime) directory

This commit fixes the root search logic to be as follows:

1) The `--root_dir` command line argument
2) The contents of environment variable INVOKEAI_ROOT
3) The VIRTUAL_ENV environment variable, plus '..'
4) $HOME/invokeai

(3) is the new feature. Since we are now recommending to install
InvokeAI and its dependencies into the .venv in the root directory,
this should be a reliable choice.

* make installer scripts more robust

This commits improves the installer .sh and .bat scripts in the following
ways:

1. They now handle folder/directory names containing spaces.
2. Pip will be installed into the .venv using the `ensurepip`
   module.

This addresses issues identified by @vargol in Issue #1941

* add --prefer-binary option to pip install

* fix unset variable crash

* add patch level to zip file name

* Fix crash introduced in #1948
2022-12-13 01:15:11 -05:00
bc0b0e4752 Possible fix for crash introduced in #1948 (#1963)
* Possible fix for crash introduced in #1948

* fix root dir search logic

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-13 01:14:46 -05:00
cd3da2900d close #1956 (#1962) 2022-12-13 01:12:53 -05:00
4402ca10b2 [WebUI 2.2.5] Unified Canvas Alternate UI Beta (#1951)
* Fix Prompt Placeholder Text Color

* Display Model Desc as tooltip in SiteHeader

This'll allow the user to quickly access info like activation token for that model if they set it in the description.

* Unified Canvas UI Beta

* Initial Test Build

* Make Snap Grid Hotkey Accessible Always
2022-12-12 19:36:05 -05:00
1a1625406c Make Dockerfile cloud ready (tested on runpod) (#1950)
* Push dockerfile (#18)

* update build-container.yml

* add login step to build-container.yml

* update job name

* update matrix: add registry and platforms
also set latest only for cuda image

* quote string

* use latest for amd and cuda image

* separate images for cuda and amd

* change latest from auto to true

* configure_invoke -y instead of --interactive

* fix argument to --yes

* update matrix:
- use flavor instead of pip-requirements
- add flavor `cloud`
- add `dockerfile`

* introduce INVOKE_MODEL_RECONFIGURE

* add `--cap-add=sys_nice` to run.sh

* update Dockerfile: install wheel

* only have main branch in action again

* disable push of cloud image for now
since it still has it's own workflow, but PoC succeeded

* remove now untrue comments in top

* install pip, setuptools and wheel in sep. step

* add labels to the image

* remove doubled installation of wheel
2022-12-12 17:54:42 -05:00
36e6908266 add logic for finding the root (runtime) directory (#1948)
This commit fixes the root search logic to be as follows:

1) The `--root_dir` command line argument
2) The contents of environment variable INVOKEAI_ROOT
3) The VIRTUAL_ENV environment variable, plus '..'
4) $HOME/invokeai

(3) is the new feature. Since we are now recommending to install
InvokeAI and its dependencies into the .venv in the root directory,
this should be a reliable choice.
2022-12-12 15:05:14 -05:00
7314f1a862 add --karras_max option to invoke.py command line (#1762)
This addresses image regression image reported in #1754
2022-12-12 13:16:15 -05:00
5c3cbd05f1 Improves configure_invokeai.py postscript (#1935)
The first few lines directed the user to run `python scripts/invoke.py`, which is not exactly correct anymore, and a holdover from previous versions.

Improves and clarifies the postscript messaging.
2022-12-12 13:13:46 -05:00
f4e7383490 Load model in inpaint when using free_gpu_mem option (#1938)
* Load model in inpaint when using free_gpu_mem option

* Passing free_gpu_mem option to inpaint generator
2022-12-12 09:14:30 -05:00
96a12099ed Fix the mistake of not importing the gc (#1939) 2022-12-12 09:14:09 -05:00
e159bb3dce update installers for v2.2.4 tag (#1936) 2022-12-11 18:17:45 -05:00
bd0c0d77d2 Reduce more memories on free_gpu_mem option (#1915)
* Enhance free_gpu_mem option
Unload cond_stage_model on free_gpu_mem option is setted

* Enhance free_gpu_mem option
Unload cond_stage_model on free_gpu_mem option is setted
2022-12-11 13:49:55 -05:00
f745f78cb3 correct bug when trying to enhance JPG images (#1928)
This fix was authored by @mebelz and is reissued here to base it on
`main`.
2022-12-11 13:48:47 -05:00
7efe0f3996 fix mkdocs formatting (#1927)
* fix mkdocs formatting

* update formatting, add some mkdocs specials

* fix wrong line break, use icon for tab key

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-11 13:48:34 -05:00
9f855a358a fix for crash with inpainting model introduced by #1866 (#1922)
* fix for crash using inpainting model

* prevent crash due to invalid attention_maps_saver
2022-12-11 13:48:12 -05:00
62b80a81d3 Update dockerfile 2.2.4 (#1924)
* updated Dockerfile
- use `python:3.10-slim` as baseimage
- separate builder and runtime stages again
- get rid of uneeded packages
- pin packages for persistence
- remove outdir from entrypoint since invoke.init is available in /data
- shrinked image size to <2GB
- way better security score than before

* small output update to build.sh and run.sh

* update matrix in build-container.yml

* remove branches from build-container.yml
2022-12-11 17:33:54 +01:00
14587c9a95 Fresh Frontend Build 2022-12-11 11:19:22 -05:00
fcae5defe3 Add invokeai.init to gitignore 2022-12-11 11:19:22 -05:00
e7144055d1 make webGUI model changing work again
- Using relative root addresses was causing problems when the
  current working directory was changed after start time.
- This commit makes the root address absolute at start time, such
  that changing the working directory later on doesn't break anything.
2022-12-11 11:19:22 -05:00
c857c6cc62 rebuild frontend for 2.2.4 2022-12-11 11:19:22 -05:00
7ecb11cf86 remove sampler questions (#1903) 2022-12-11 09:07:55 -05:00
e4b61923ae fix InvokeAI download URLs (#1910)
- This fixes the .bat and .sh file URLs for the InvokeAI source
  code.
2022-12-11 07:10:17 -05:00
aa68e4e0da Adds polyfill for Array.prototype.findLast() (#1909) 2022-12-11 06:54:15 -05:00
09365d6d2e Fix GUI not working (#1916) 2022-12-11 06:53:40 -05:00
b77f34998c Responsive for devices under 600px
This doesn't not work for the Canvas Painting yet, but works on img2img and text2img
2022-12-11 22:10:46 +13:00
0439b51a26 Simple Installer for Unified Directory Structure, Initial Implementation (#1819)
* partially working simple installer

* works on linux

* fix linux requirements files

* read root environment variable in right place

* fix cat invokeai.init in test workflows

* fix classical cp error in test-invoke-pip.yml

* respect --root argument now

* untested bat installers added

* windows install.bat now working

fix logic to find frontend files

* rename simple_install to "installer"

1. simple_install => 'installer'
2. source and binary install directories are removed

* enable update scripts to update requirements

- Also pin requirements to known working commits.
- This may be a breaking change; exercise with caution
- No functional testing performed yet!

* update docs and installation requirements

NOTE: This may be a breaking commit! Due to the way the installer
works, I have to push to a public branch in order to do full end-to-end
testing.

- Updated installation docs, removing binary and source installers and
  substituting the "simple" unified installer.
- Pin requirements for the "http:" downloads to known working commits.
- Removed as much as possible the invoke-ai forks of others' repos.

* fix directory path for installer

* correct requirement/environment errors

* exclude zip files in .gitignore

* possible fix for dockerbuild

* ready for torture testing

- final Windows bat file tweaks
- copy environments-and-requirements to the runtime directory so that
  the `update.sh` script can run.

  This is not ideal, since we lose control over the
  requirements. Better for the update script to pull the proper
  updated requirements script from the repository.

* allow update.sh/update.bat to install arbitrary InvokeAI versions

- Can pass the zip file path to any InvokeAI release, branch, commit or tag,
  and the installer will try to install it.
- Updated documentation
- Added Linux Python install hints.

* use binary installer's :err_exit function

* user diffusers 0.10.0

* added logic for CPPFLAGS on mac

* improve windows install documentation

- added information on a couple of gotchas I experienced during
  windows installation, including DLL loading errors experienced
  when Visual Studio C++ Redistributable was not present.

* tagged to pull from 2.2.4-rc1

- also fix error of shell window closing immediately if suitable
  python not found

Co-authored-by: mauwii <Mauwii@outlook.de>
2022-12-11 00:37:08 -05:00
ef6870c714 Fix Inpainting Model entry in models.yaml.example 2022-12-10 23:52:24 -05:00
8cbb50c204 avoid further crash under low-memory conditions 2022-12-10 15:32:11 -05:00
12a8d7fc14 Fix crash introduced in #1866 2022-12-10 15:32:11 -05:00
3d2b497eb0 Run more tests for PRs (#1895)
* run 3 tests for PR with different samplers
reduce tests for PR to do only 5 Iterations

* use correct txt file - delete unused old file
2022-12-10 20:07:14 +01:00
786b8878d6 Save and display per-token attention maps (#1866)
* attention maps saving to /tmp

* tidy up diffusers branch backporting of cross attention refactoring

* base64-encoding the attention maps image for generationResult

* cleanup/refactor conditioning.py

* attention maps and tokens being sent to web UI

* attention maps: restrict count to actual token count and improve robustness

* add argument type hint to image_to_dataURL function

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

Co-authored-by: damian <git@damianstewart.com>
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-12-10 15:57:41 +01:00
55132f6463 pin diffusers to 0.9.0 2022-12-09 09:09:22 -05:00
ed9186b099 Add windows to test workflows (#1809)
* add windows to test runners

* disable fail-fast for debugging

* re-enable login shell for conda workflow
also fix expression to exclude windows from run tests

* enable fail-fast again

* fix condition, pin runner verisons

* remove feature branch from push trigger
since already being triggered now via PR

* use gfpgan from pypi for windows
curious if this would fix the installation here as well
since worked for #1802

* unpin basicsr for windows

* for curiosity enabling testing for windows as well

* disable pip cache
since windows failed with a memory error now
but was working before it had a cache

* use matrix.github-env

* set platform specific root and outdir

* disable tests for windows since memory error
I guess the windows installation uses more space than linux
and for this they have less swap memory
2022-12-09 14:21:38 +01:00
d2026d0509 Fix error when init_mask=None and invert_mask=True
In the event where no `init_mask` is given and `invert_mask` is set to True, the script will raise the following error:

```bash
AttributeError: 'NoneType' object has no attribute 'mode'
```

The new implementation will only run inversion when both variables are valid.
2022-12-08 22:37:11 -05:00
0bc4ed14cd Prompt placeholder changed in PromptInput.tsx
Syntax examples were added
2022-12-08 22:35:41 -05:00
06369d07c0 Update CLI.py 2022-12-08 22:34:49 -05:00
4e61069821 Update embiggen.py 2022-12-08 22:34:49 -05:00
d7ba041007 Enable force free GPU memory in img2img 2022-12-07 19:25:21 -05:00
3859302f1c Remove -e from "INSTALL_PATCHMATCH.md
The -e flag does NOT work in this case and results in a RemoteNotFound Error
2022-12-07 19:24:31 -05:00
865439114b Arch Specific Patchmatch Instructions + Fixing linux conda installation 2022-12-07 19:24:31 -05:00
4d76116152 Update invoke.bat.in isolate environment variables
Without locally scoped (to the script) environment variables, this script can only be run once and then you need to start a new cmd session to get a clean environment.

Surrounding the script with setlocal/endlocal achieves this.

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/endlocal
2022-12-07 17:45:19 -05:00
42f5bd4e12 Account for flat models
Merged models from auto11 merge board are flat for some reason. Current behavior of invoke is not changed by this modification.
2022-12-07 12:11:37 -05:00
04e77f3858 Fix Broken Link To Notebook
* The link pointed to https://github.com/invoke-ai/InvokeAI/blob/main/notebooks/Stable-Diffusion-local-Windows.ipynb which does not exist so it has been replaced with https://github.com/invoke-ai/InvokeAI/blob/main/notebooks/Stable_Diffusion_AI_Notebook.ipynb

* Add buttons for running on Colab 

* Tried adding running InvokeAI on Binder but the error was:
ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python <3.5
ERROR: Could not find a version that satisfies the requirement clipseg (from invokeai) (from versions: none)
ERROR: No matching distribution found for clipseg
Removing intermediate container 25be65428187
The command '/bin/sh -c ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir .' returned a non-zero code: 1

`## Running Online On JupyterHub Binder
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/invoke-ai/InvokeAI/main?labpath=https%3A%2F%2Fgithub.com%2Finvoke-ai%2FInvokeAI%2Fblob%2Fmain%2Fnotebooks%2FStable_Diffusion_AI_Notebook.ipynb)`

This will have to be added for having the Launch | Binder button after it runs properly.
2022-12-07 08:28:14 -05:00
1fc1eeec38 Fix docker push github action and expand with additional metadata (#1837)
* update docker build (cloud) action with additional metadata, new labels

* (docker) also add aarch64 cloud build and remove arch suffix

* (docker) architecture suffix is needed for now

* (docker) don't build aarch64 for now
2022-12-07 14:03:33 +01:00
556081695a disable pushing the cloud container (#1831) 2022-12-06 18:06:48 +01:00
ad7917c7aa Optimized Docker build with support for external working directory (#1544)
* add docker build optimized for size; do not copy models to image

useful for cloud deployments. attempts to utilize docker layer
caching as effectively as possible. also some quick tools to help with
building

* add workflow to build cloud img in ci

* push cloud image in addition to building

* (ci) also tag docker images with git SHA

* (docker) rework Makefile for easy cache population and local use

* support the new conda-less install; further optimize docker build

* (ci) clean up the build-cloud-img action

* improve the Makefile for local use

* move execution of invoke script from entrypoint to cmd, allows overriding the cmd if needed (e.g. in Runpod

* remove unnecessary copyright statements

* (docs) add a section on running InvokeAI in the cloud using Docker

* (docker) add patchmatch to the cloud image; improve build caching; simplify Makefile

* (docker) fix pip requirements path to use binary_installer directory
2022-12-06 13:28:07 +01:00
39cca8139f Clean up readme 2022-12-06 06:58:26 -05:00
1d1988683b Fix Embedding Dir not working 2022-12-05 22:24:31 -05:00
44a0055571 correct regression in loading of PaperCut and VoxelArt models (#1730)
This corrects a regression in loading of these models due to
a change of the embedding_manager parameter `num_vectors_per_token`

Fixes #1718
2022-12-05 19:04:34 +01:00
0cc01143d8 invoke script cds to its location before running (#1805) 2022-12-05 19:03:20 +01:00
1c0247d58a Eventually update APP_VERSION to 2.2.3
Not sure what the procedure is for the version number. Is this supposed to match every git tag or just major versions? Same question for setup.py
2022-12-04 14:33:16 -05:00
d335f51e5f fix off-by-one bug in cross-attention-control (#1774)
prompt token sequences begin with a "beginning-of-sequence" marker <bos> and end with a repeated "end-of-sequence" marker <eos> - to make a default prompt length of <bos> + 75 prompt tokens + <eos>. the .swap() code was failing to take the column for <bos> at index 0 into account. the changes here do that, and also add extra handling for a single <eos> (which may be redundant but which is included for completeness).

based on my understanding and some assumptions about how this all works, the reason .swap() nevertheless seemed to do the right thing, to some extent, is because over multiple steps the conditioning process in Stable Diffusion operates as a feedback loop. a change to token n-1 has flow-on effects to how the [1x4x64x64] latent tensor is modified by all the tokens after it, - and as the next step is processed, all the tokens before it as well. intuitively, a token's conditioning effects "echo" throughout the whole length of the prompt. so even though the token at n-1 was being edited when what the user actually wanted was to edit the token at n, it nevertheless still had some non-negligible effect, in roughly the right direction, often enough that it seemed like it was working properly.
2022-12-04 11:41:03 +01:00
38cd968130 stability and use improvements to binary & source installers
- Pass command-line arguments through to invoke.py via the .bat and .sh scripts.
- Remove obsolete warning message from binary install.bat
- Make sure that current working directory matches where .bat file is installed
2022-12-03 21:25:12 -05:00
0111304982 fix(srcinstall) shell installer: cp scripts instead of linking 2022-12-03 21:24:18 -05:00
c607d4fe6c (config) clarify why we're setting the env var 2022-12-03 14:33:21 -05:00
6d6076d3c7 (config) fix permissions on configure_invokeai.py, improve documentation in globals.py comment 2022-12-03 14:33:21 -05:00
485fcc7fcb (config) do not cache HF token when using the non-canonical env var
this mirrors the behaviour when using the officially supported env var
2022-12-03 14:33:21 -05:00
76633f500a (config) make user aware of any problems downloading models
also implement a generic way of reporting issues at the end of installation
2022-12-03 14:33:21 -05:00
ed6194351c (config) try to authenticate to Huggingface more eagerly, using env vars 2022-12-03 14:33:21 -05:00
f237744ab1 (config) fix f-string in prompt for output location 2022-12-03 14:33:21 -05:00
678cf8519e typo fix 2022-12-03 14:30:48 -05:00
ee9de75b8d Make install instructions discoverable in readme (#1752)
also "Macintosh" → "macOS" to improve "We Support macOS Properly And Not Halfassed Like Other OSS Projects" signalling

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-12-03 14:20:50 -05:00
50f3847ef8 Fix Linux source URL in installation docs 2022-12-03 14:19:58 -05:00
8596e3586c add documentation warning about 1650/60 cards
Several users have been trying to run InvokeAI on GTX 1650 and 1660
cards. They really can't because these cards don't work with
half-precision and only have 4-6GB of memory. Added a warning to
the docs (in two places) about this problem.
2022-12-03 13:16:22 -05:00
5ef1e0714b Merge branch 'main' of github.com:/invoke-ai/InvokeAI into main 2022-12-03 12:25:30 +00:00
be871c3ab3 Merge branch 'ebr-gh-link-src-installer' into main 2022-12-03 12:24:03 +00:00
dec40d9b04 Update source_installer/install.sh.in
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-12-03 07:20:32 -05:00
fe5c008dd5 Update docs/installation/INSTALL_SOURCE.md
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-12-03 07:20:32 -05:00
72def2ae13 documentation fixes for 2.2.3
- Add Xcode installation instructions to source installer walkthrough
- Fix link to source installer page from installer overview
- If OSX install crashes, script will tell Mac users to go to the docs
  to learn how to install Xcode
2022-12-03 07:20:32 -05:00
31cd76a2af (docs) install ux: link directly to release zip files
NB: if we remove the version from the zip file names, we can link
directly to assets in the latest GH release from documentation without
the need to keep the links updated
2022-12-03 00:24:49 -05:00
00c78263ce (docs) install ux: link main README directly to source installer 2022-12-03 00:19:45 -05:00
5c31feb3a1 Remove reference to binary installer 2022-12-02 22:02:51 -05:00
26f129cef8 Fix broken link 2022-12-02 22:02:30 -05:00
292ee06751 Fix description of source code installer
The mkdocs version of INSTALL_SOURCE.md has disappeared and I am patching this in
so that users find the correct installer.
2022-12-02 17:16:29 -05:00
c00d53fcce fix link in documentation 2022-12-02 15:50:34 -05:00
a78a8728fe Fix FlaskUI initialization 2022-12-02 15:50:14 -05:00
6b5d19347a fix(invoke.sh.in): remove additional mystery character 2022-12-02 15:43:59 -05:00
26671d8eed (installer) fix syntax error in invoke.sh.in 2022-12-02 15:43:59 -05:00
b487fa4391 fix basicsr conflict on windows 2022-12-02 12:53:13 -05:00
12b98ba4ec make invoke.sh executable 2022-12-02 12:53:13 -05:00
fa25a64d37 remove references to binary installer from docs 2022-12-02 12:48:26 -05:00
29540452f2 fix bad naming of invoke.sh.in 2022-12-02 11:25:37 -05:00
c7960f930a fix regression in copy function 2022-12-02 10:53:42 -05:00
c1c8b5026a apply current directory patch to binary installer .sh file 2022-12-02 10:53:42 -05:00
5da42e0ad2 add back PYTORCH_ENABLE_MPS_FALLBACK 2022-12-02 10:53:42 -05:00
34d6f35408 run .bat file in directory potentially containing spaces
- The previous fix for the "install in Windows system directory" error would fail
   if the path includes directories with spaces in them. This fixes that.

- In addition, addressing the same issue in source installer, although not
	yet reported in wild.
2022-12-02 10:53:42 -05:00
401165ba35 correctly link current core team 2022-12-02 09:33:19 -05:00
6d8057c84f fix POSTPROCESS ToC 2022-12-02 09:33:19 -05:00
3f23dee6f4 add title 2022-12-02 09:33:19 -05:00
8cdd961ad2 update IMG2IMG.md 2022-12-02 09:33:19 -05:00
470b267939 update CONEPTS.md
- use table with correct syntax for screenshots
- switch Title and first Headline to look better in ToC
2022-12-02 09:33:19 -05:00
bf399e303c add index.md to features
to prevent the menu being occupied from the expanded CLI ToC
Should maybe be fleshed out a bit
2022-12-02 09:33:19 -05:00
b3d7ad7461 a lot of formatting updates to CLI.md 2022-12-02 09:33:19 -05:00
cd66b2c76d fix links in older_docs_to_be_removed 2022-12-02 09:33:19 -05:00
6b406e2b5e Adds tip for importing models on Windows 2022-12-02 09:25:36 -05:00
6737cc1443 recompile for linux 2022-12-02 09:11:17 -05:00
7fd0eeb9f9 update darwin requirements 2022-12-02 09:11:17 -05:00
16e3b45fa2 update linux reuqirements file 2022-12-02 09:11:17 -05:00
2f07ea03a9 binary installer fix
- bat file changes to directory it lives in rather than user's current directory
- restore incorrect requirements and compiled Darwin requirements file
2022-12-02 09:11:17 -05:00
b563d75c58 restored mac requirements file 2022-12-02 09:11:17 -05:00
a7b7b20d16 Updates docs release link to latest 2022-12-02 06:20:16 -05:00
a47ef3ded9 change download links to release candidate 2022-12-01 23:24:23 -05:00
7cb9b654f3 add compiled windows file 2022-12-01 23:07:48 -05:00
8819e12a86 configure script changed from preload_models.py to configure_invokeai.py
This makes a cosmetic change. Instead of calling preload_models.py
(deprecated) it calls configure_invokeai.py. Currently the two do
the same thing.
2022-12-01 22:51:05 -05:00
967eb60ea9 added the linux py3.10* file 2022-12-01 22:51:05 -05:00
b1091ecda1 Fixes failed canvas generation when gallery is empty
There was some old logic from before Unified Canvas which aborted generation when there was no currentImage. 

If you have an image in the gallery, there is always a currentImage. But if gallery is empty, there is no currentImage. Generation would silently fail in this case.

We apparently never tested with an empty gallery and thus never ran into the issue. This removes this old and now-unused logic.
2022-12-01 22:29:56 -05:00
2723dd9051 remove bad characters from end of user input
Some users were leaving whitespace at the end of their root
directories or ending them with a backslash. This caused the root
directory to become unusable. This removes whitespace and backslashes
from the end of the directory names.

Note that more needs to be done to cleanse the input, but for now
this will cover the cases we have seen so far in the wild.
2022-12-01 22:15:39 -05:00
8f050d992e documentation fixes for release 2022-12-01 22:02:50 -05:00
0346095876 fix incorrect syntax for .bat 2022-12-01 22:02:27 -05:00
f9bbc55f74 Merge branch 'source-installer-improvements' into main 2022-12-01 23:18:54 +00:00
878a3907e9 defer loading of Hugging Face concepts until needed
Some users have been complaining that the CLI "freezes" for a while
before the invoke> prompt appears. I believe this is due to internet
delay while the concepts library names are downloaded by the autocompleter.
I have changed logic so that the concepts are downloaded the first time
the user types a < and tabs.
2022-12-01 17:56:18 -05:00
4cfb41d9ae configure_invokeai.py enhancement
- Adds a new option to download <a>ll the models, in addition
  to <r>ecommended and <c>ustomized.
2022-12-01 15:59:14 -05:00
6ec64ecb3c fix commit conflict markers 2022-12-01 15:07:54 -05:00
540315edaa rename to binary_installer in build docs 2022-12-01 14:58:07 -05:00
cf10a1b736 Merge branch 'main' into source-installer-improvements 2022-12-01 19:45:47 +00:00
9fb2a43780 rename "installer" to "binary_installer"
- Fix up internal names so scripts run properly
2022-12-01 19:40:47 +00:00
1b743f7d9b source installer improvements and documentation
- Source installer provides more context for what it is doing, and
  sends user to help/troubleshooting pages when something goes wrong.

- install.sh and install.bat are renamed to install.sh.in and install.bat.in
  to discourage users from running them from within the

- Documentation updated
2022-12-01 19:40:13 +00:00
d7bf3f7d7b make .sh/.bat files inside installer/ non executable (#1664)
* make binary installer executables non-executable inside the repo

* update docs to match previous commit
2022-12-01 19:35:21 +01:00
eba31e7caf Documentation updates for 2.2 release 2022-12-01 08:09:31 -05:00
bde456f9fa fix startup messages and a startup crash
- make the warnings about patchmatch less redundant
- only warn about being unable to load concepts from Hugging Face
  library once
- do not crash when unable to load concepts from Hugging Face
  due to network connectivity issues
2022-12-01 07:42:31 -05:00
9ee83380e6 fix missig history file in output director 2022-12-01 07:39:26 -05:00
6982e6a469 rebuilt frontend 2022-11-30 19:20:57 -05:00
0f4d71ed63 Merge dev into main for 2.2.0 (#1642)
* Fixes inpainting + code cleanup

* Disable stage info in Inpainting Tab

* Mask Brush Preview now always at 0.5 opacity

The new mask is only visible properly at max opacity but at max opacity the brush preview becomes fully opaque blocking the view. So the mask brush preview no remains at 0.5 no matter what the Brush opacity is.

* Remove save button from Canvas Controls (cleanup)

* Implements invert mask

* Changes "Invert Mask" to "Preserve Masked Areas"

* Fixes (?) spacebar issues

* Patches redux-persist and redux-deep-persist with debounced persists

Our app changes redux state very, very often. As our undo/redo history grows, the calls to persist state start to take in the 100ms range, due to a the deep cloning of the history. This causes very noticeable performance lag.

The deep cloning is required because we need to blacklist certain items in redux from being persisted (e.g. the app's connection status).

Debouncing the whole process of persistence is a simple and effective solution. Unfortunately, `redux-persist` dropped `debounce` between v4 and v5, replacing it with `throttle`. `throttle`, instead of delaying the expensive action until a period of X ms of inactivity, simply ensures the action is executed at least every X ms. Of course, this does not fix our performance issue. 

The patch is very simple. It adds a `debounce` argument - a number of milliseconds - and debounces `redux-persist`'s `update()` method (provided by `createPersistoid`) by that many ms.

Before this, I also tried writing a custom storage adapter for `redux-persist` to debounce the calls to `localStorage.setItem()`. While this worked and was far less invasive, it doesn't actually address the issue. It turns out `setItem()` is a very fast part of the process.

We use `redux-deep-persist` to simplify the `redux-persist` configuration, which can get complicated when you need to blacklist or whitelist deeply nested state. There is also a patch here for that library because it uses the same types as `redux-persist`.

Unfortunately, the last release of `redux-persist` used a package `flat-stream` which was malicious and has been removed from npm. The latest commits to `redux-persist` (about 1 year ago) do not build; we cannot use the master branch. And between the last release and last commit, the changes have all been breaking.

Patching this last release (about 3 years old at this point) directly is far simpler than attempting to fix the upstream library's master branch or figuring out an alternative to the malicious and now non-existent dependency.

* Adds debouncing

* Fixes AttributeError: 'dict' object has no attribute 'invert_mask'

* Updates package.json to use redux-persist patches

* Attempts to fix redux-persist debounce patch

* Fixes undo/redo

* Fixes invert mask

* Debounce > 300ms

* Limits history to 256 for each of undo and redo

* Canvas styling

* Hotkeys improvement

* Add Metadata To Viewer

* Increases CFG Scale max to 200

* Fix gallery width size for Outpainting

Also fixes the canvas resizing failing n fast pushes

* Fixes disappearing canvas grid lines

* Adds staging area

* Fixes "use all" not setting variationAmount

Now sets to 0 when the image had variations.

* Builds fresh bundle

* Outpainting tab loads to empty canvas instead of upload

* Fixes wonky canvas layer ordering & compositing

* Fixes error on inpainting paste back

`TypeError: 'float' object cannot be interpreted as an integer`

* Hides staging area outline on mouseover prev/next

* Fixes inpainting not doing img2img when no mask

* Fixes bbox not resizing in outpainting if partially off screen

* Fixes crashes during iterative outpaint. Still doesn't work correctly though.

* Fix iterative outpainting by restoring original images

* Moves image uploading to HTTP

- It all seems to work fine
- A lot of cleanup is still needed
- Logging needs to be added
- May need types to be reviewed

* Fixes: outpainting temp images show in gallery

* WIP refactor to unified canvas

* Removes console.log from redux-persist patch

* Initial unification of canvas

* Removes all references to split inpainting/outpainting canvas

* Add patchmatch and infill_method parameter to prompt2image (options are 'patchmatch' or 'tile').

* Fixes app after removing in/out-painting refs

* Rebases on dev, updates new env files w/ patchmatch

* Organises features/canvas

* Fixes bounding box ending up offscreen

* Organises features/canvas

* Stops unnecessary canvas rescales on gallery state change

* Fixes 2px layout shift on toggle canvas lock

* Clips lines drawn while canvas locked

When drawing with the locked canvas, if a brush stroke gets too close to the edge of the canvas and its stroke would extend past the edge of the canvas, the edge of that stroke will be seen after unlocking the canvas.

This could cause a problem if you unlock the canvas and now have a bunch of strokes just outside the init image area, which are far back in undo history and you cannot easily erase.

With this change, lines drawn while the canvas is locked get clipped to the initial image bbox, fixing this issue.

Additionally, the merge and save to gallery functions have been updated to respect the initial image bbox so they function how you'd expect.

* Fixes reset canvas view when locked

* Fixes send to buttons

* Fixes bounding box not being rounded to 64

* Abandons "inpainting" canvas lock

* Fixes save to gallery including empty area, adds download and copy image

* Fix Current Image display background going over image bounds

* Sets status immediately when clicking Invoke

* Adds hotkeys and refactors sharing of konva instances

Adds hotkeys to canvas. As part of this change, the access to konva instance objects was refactored:

Previously closure'd refs were used to indirectly get access to the konva instances outside of react components.

Now, a  getter and setter function are used to provide access directly to the konva objects.

* Updates hotkeys

* Fixes canvas showing spinner on first load

Also adds good default canvas scale and positioning when no image is on it

* Fixes possible hang on MaskCompositer

* Improves behaviour when setting init canvas image/reset view

* Resets bounding box coords/dims when no image present

* Disables canvas actions which cannot be done during processing

* Adds useToastWatcher hook

- Dispatch an `addToast` action with standard Chakra toast options object to add a toast to the toastQueue
- The hook is called in App.tsx and just useEffect's w/ toastQueue as dependency to create the toasts
- So now you can add toasts anywhere you have access to `dispatch`, which includes middleware and thunks
- Adds first usage of this for the save image buttons in canvas

* Update Hotkey Info

Add missing tooltip hotkeys and update the hotkeys modal to reflect the new hotkeys for the Unified Canvas.

* Fix theme changer not displaying current theme on page refresh

* Fix tab count in hotkeys panel

* Unify Brush and Eraser Sizes

* Fix staging area display toggle not working

* Staging Area delete button is now red

So it doesnt feel blended into to the rest of them.

* Revert "Fix theme changer not displaying current theme on page refresh"

This reverts commit 903edfb803e743500242589ff093a8a8a0912726.

* Add arguments to use SSL to webserver

* Integrates #1487 - touch events

Need to add:
- Pinch zoom
- Touch-specific handling (some things aren't quite right)

* Refactors upload-related async thunks

- Now standard thunks instead of RTK createAsyncThunk()
- Adds toasts for all canvas upload-related actions

* Reorganises app file structure

* Fixes Canvas Auto Save to Gallery

* Fixes staging area outline

* Adds staging area hotkeys, disables gallery left/right when staging

* Fixes Use All Parameters

* Fix metadata viewer image url length when viewing intermediate

* Fixes intermediate images being tiny in txt2img/img2img

* Removes stale code

* Improves canvas status text and adds option to toggle debug info

* Fixes paste image to upload

* Adds model drop-down to site header

* Adds theme changer popover

* Fix missing key on ThemeChanger map

* Fixes stage position changing on zoom

* Hotkey Cleanup

- Viewer is now Z
- Canvas Move tool is V - sync with PS
- Removed some unused hotkeys

* Fix canvas resizing when both options and gallery are unpinned

* Implements thumbnails for gallery

- Thumbnails are saved whenever an image is saved, and when gallery requests images from server
- Thumbnails saved at original image aspect ratio with width of 128px as WEBP
- If the thumbnail property of an image is unavailable for whatever reason, the image's full size URL is used instead

* Saves thumbnails to separate thumbnails directory

* Thumbnail size = 256px

* Fix Lightbox Issues

* Disables canvas image saving functions when processing

* Fix index error on going past last image in Gallery

* WIP - Lightbox Fixes

Still need to fix the images not being centered on load when the image res changes

* Fixes another similar index error, simplifies logic

* Reworks canvas toolbar

* Fixes canvas toolbar upload button

* Cleans up IAICanvasStatusText

* Improves metadata handling, fixes #1450

- Removes model list from metadata
- Adds generation's specific model to metadata
- Displays full metadata in JSON viewer

* Gracefully handles corrupted images; fixes #1486

- App does not crash if corrupted image loaded
- Error is displayed in the UI console and CLI output if an image cannot be loaded

* Adds hotkey to reset canvas interaction state

If the canvas' interaction state (e.g. isMovingBoundingBox, isDrawing, etc) get stuck somehow, user can press Escape to reset the state.

* Removes stray console.log()

* Fixes bug causing gallery to close on context menu open

* Minor bugfixes

- When doing long-running canvas image exporting actions, display indeterminate progress bar
- Fix staging area image outline not displaying after committing/discarding results

* Removes unused imports

* Fixes repo root .gitignore ignoring frontend things

* Builds fresh bundle

* Styling updates

* Removes reasonsWhyNotReady

The popover doesn't play well with the button being disabled, and I don't think adds any value.

* Image gallery resize/style tweaks

* Styles buttons for clearing canvas history and mask

* First pass on Canvas options panel

* Fixes bug where discarding staged images results in loss of history

* Adds Save to Gallery button to staging toolbar

* Rearrange some canvas toolbar icons

Put brush stuff together and canvas movement stuff together

* Fix gallery maxwidth on unified canvas

* Update Layer hotkey display to UI

* Adds option to crop to bounding box on save

* Masking option tweaks

* Crop to Bounding Box > Save Box Region Only

* Adds clear temp folder

* Updates mask options popover behavior

* Builds fresh bundle

* Fix styling on alert modals

* Fix input checkbox styling being incorrect on light theme

* Styling fixes

* Improves gallery resize behaviour

* Cap gallery size on canvas tab so it doesnt overflow

* Fixes bug when postprocessing image with no metadata

* Adds IAIAlertDialog component

* Moves Loopback to app settings

* Fixes metadata viewer not showing metadata after refresh

Also adds Dream-style prompt to metadata

* Adds outpainting specific options

* Linting

* Fixes gallery width on lightbox, fixes gallery button expansion

* Builds fresh bundle

* Fix Lightbox images of different res not centering

* Update feature tooltip text

* Highlight mask icon when on mask layer

* Fix gallery not resizing correctly on open and close

* Add loopback to just img2img. Remove from settings.

* Fix to gallery resizing

* Removes Advanced checkbox, cleans up options panel for unified canvas

* Minor styling fixes to new options panel layout

* Styling Updates

* Adds infill method

* Tab Styling Fixes

* memoize outpainting options

* Fix unnecessary gallery re-renders

* Isolate Cursor Pos debug text on canvas to prevent rerenders

* Fixes missing postprocessed image metadata before refresh

* Builds fresh bundle

* Fix rerenders on model select

* Floating panel re-render fix

* Simplify fullscreen hotkey selector

* Add Training WIP Tab

* Adds Training icon

* Move full screen hotkey to floating to prevent tab rerenders

* Adds single-column gallery layout

* Fixes crash on cancel with intermediates enabled, fixes #1416

* Updates npm dependencies

* Fixes img2img attempting inpaint when init image has transparency

* Fixes missing threshold and perlin parameters in metadata viewer

* Renames "Threshold" > "Noise Threshold"

* Fixes postprocessing not being disabled when clicking use all

* Builds fresh bundle

* Adds color picker

* Lints & builds fresh bundle

* Fixes iterations being disabled when seed random & variations are off

* Un-floors cursor position

* Changes color picker preview to circles

* Fixes variation params not set correctly when recalled

* Fixes invoke hotkey not working in input fields

* Simplifies Accordion

Prep for adding reset buttons for each section

* Fixes mask brush preview color

* Committing color picker color changes tool to brush

* Color picker does not overwrite user-selected alpha

* Adds brush color alpha hotkey

* Lints

* Removes force_outpaint param

* Add inpaint size options to inpaint at a larger size than the actual inpaint image, then scale back down for recombination

* Bug fix for inpaint size

* Adds inpaint size (as scale bounding box) to UI

* Adds auto-scaling for inpaint size

* Improves scaled bbox display logic

* Fixes bug with clear mask and history

* Fixes shouldShowStagingImage not resetting to true on commit

* Builds fresh bundle

* Fixes canvas failing to scale on first run

* Builds fresh bundle

* Fixes unnecessary canvas scaling

* Adds gallery drag and drop to img2img/canvas

* Builds fresh bundle

* Fix desktop mode being broken with new versions of flaskwebgui

* Fixes canvas dimensions not setting on first load

* Builds fresh bundle

* stop crash on !import_models call on model inside rootdir

- addresses bug report #1546

* prevent "!switch state gets confused if model switching fails"

- If !switch were to fail on a particular model, then generate got
  confused and wouldn't try again until you switch to a different working
  model and back again.

- This commit fixes and closes #1547

* Revert "make the docstring more readable and improve the list_models logic"

This reverts commit 248068fe5d.

* fix model cache path

* also set fail-fast to it's default (true)
in this way the whole action fails if one job fails
this should unblock the runners!!!

* fix output path for Archive results

* disable checks for python 3.9

* Update-requirements and test-invoke-pip workflow (#1574)

* update requirements files

* update test-invoke-pip workflow

* move requirements-mkdocs.txt to docs folder (#1575)

* move requirements-mkdocs.txt to docs folder

* update copyright

* Fixes outpainting with resized inpaint size

* Interactive configuration (#1517)

* Update scripts/configure_invokeai.py

prevent crash if output exists

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* implement changes requested by reviews

* default to correct root and output directory on Windows systems

- Previously the script was relying on the readline buffer editing
  feature to set up the correct default. But this feature doesn't
  exist on windows.

- This commit detects when user typed return with an empty directory
  value and replaces with the default directory.

* improved readability of directory choices

* Update scripts/configure_invokeai.py

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* better error reporting at startup

- If user tries to run the script outside of the repo or runtime directory,
  a more informative message will appear explaining the problem.

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* Embedding merging (#1526)

* add whole <style token> to vocab for concept library embeddings

* add ability to load multiple concept .bin files

* make --log_tokenization respect custom tokens

* start working on concept downloading system

* preliminary support for dynamic loading and merging of multiple embedded models

- The embedding_manager is now enhanced with ldm.invoke.concepts_lib,
  which handles dynamic downloading and caching of embedded models from
  the Hugging Face concepts library (https://huggingface.co/sd-concepts-library)

- Downloading of a embedded model is triggered by the presence of one or more
  <concept> tags in the prompt.

- Once the embedded model is downloaded, its trigger phrase will be loaded
  into the embedding manager and the prompt's <concept> tag will be replaced
  with the <trigger_phrase>

- The downloaded model stays on disk for fast loading later.

- The CLI autocomplete will complete partial <concept> tags for you. Type a
  '<' and hit tab to get all ~700 concepts.

BUGS AND LIMITATIONS:

- MODEL NAME VS TRIGGER PHRASE

  You must use the name of the concept embed model from the SD
  library, and not the trigger phrase itself. Usually these are the
  same, but not always. For example, the model named "hoi4-leaders"
  corresponds to the trigger "<HOI4-Leader>"

  One reason for this design choice is that there is no apparent
  constraint on the uniqueness of the trigger phrases and one trigger
  phrase may map onto multiple models. So we use the model name
  instead.

  The second reason is that there is no way I know of to search
  Hugging Face for models with certain trigger phrases. So we'd have
  to download all 700 models to index the phrases.

  The problem this presents is that this may confuse users, who will
  want to reuse prompts from distributions that use the trigger phrase
  directly. Usually this will work, but not always.

- WON'T WORK ON A FIREWALLED SYSTEM

  If the host running IAI has no internet connection, it can't
  download the concept libraries. I will add a script that allows
  users to preload a list of concept models.

- BUG IN PROMPT REPLACEMENT WHEN MODEL NOT FOUND

  There's a small bug that occurs when the user provides an invalid
  model name. The <concept> gets replaced with <None> in the prompt.

* fix loading .pt embeddings; allow multi-vector embeddings; warn on dupes

* simplify replacement logic and remove cuda assumption

* download list of concepts from hugging face

* remove misleading customization of '*' placeholder

the existing code as-is did not do anything; unclear what it was supposed to do.

the obvious alternative -- setting using 'placeholder_strings' instead of
'placeholder_tokens' to match model.params.personalization_config.params.placeholder_strings --
caused a crash. i think this is because the passed string also needed to be handed over
on init of the PersonalizedBase as the 'placeholder_token' argument.
this is weird config dict magic and i don't want to touch it. put a
breakpoint in personalzied.py line 116 (top of PersonalizedBase.__init__) if
you want to have a crack at it yourself.

* address all the issues raised by damian0815 in review of PR #1526

* actually resize the token_embeddings

* multiple improvements to the concept loader based on code reviews

1. Activated the --embedding_directory option (alias --embedding_path)
   to load a single embedding or an entire directory of embeddings at
   startup time.

2. Can turn off automatic loading of embeddings using --no-embeddings.

3. Embedding checkpoints are scanned with the pickle scanner.

4. More informative error messages when a concept can't be loaded due
   either to a 404 not found error or a network error.

* autocomplete terms end with ">" now

* fix startup error and network unreachable

1. If the .invokeai file does not contain the --root and --outdir options,
  invoke.py will now fix it.

2. Catch and handle network problems when downloading hugging face textual
   inversion concepts.

* fix misformatted error string

Co-authored-by: Damian Stewart <d@damianstewart.com>

* model_cache.py: fix list_models

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>

* add statement of values (#1584)

* this adds the Statement of Values

Google doc source = https://docs.google.com/document/d/1-PrUKDJcxy8OyNGc8CyiHhv2VgLvjt7LRGlEpbg1nmQ/edit?usp=sharing

* Fix heading

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* Update InvokeAI_Statement_of_Values.md

* add keturn and mauwii to the team member list

* Fix punctuation

* this adds the Statement of Values

Google doc source = https://docs.google.com/document/d/1-PrUKDJcxy8OyNGc8CyiHhv2VgLvjt7LRGlEpbg1nmQ/edit?usp=sharing

* add keturn and mauwii to the team member list

* fix formating
- make sub bullets use * (decide to all use - or *)
- indent sub bullets
Sorry, first only looked at the code version and found this only after
looking at the markdown rendered version

* use multiparagraph numbered sections

* Break up Statement Of Values as per comments on #1584

* remove duplicated word, reduce vagueness

it's important not to overstate how many artists we are consulting.

* fix typo (sorry blessedcoolant)

Co-authored-by: mauwii <Mauwii@outlook.de>
Co-authored-by: damian <git@damianstewart.com>

* update dockerfile (#1551)

* update dockerfile

* remove not existing file from .dockerignore

* remove bloat and unecesary step
also use --no-cache-dir for pip install
image is now close to 2GB

* make Dockerfile a variable

* set base image to `ubuntu:22.10`

* add build-essential

* link outputs folder for persistence

* update tag variable

* update docs

* fix not customizeable build args, add reqs output

* !model_import autocompletes in ROOTDIR

* Adds psychedelicious to statement of values signature (#1602)

* add a --no-patchmatch option to disable patchmatch loading (#1598)

This feature was added to prevent the CI Macintosh tests from erroring
out when patchmatch is unable to retrieve its shared library from
github assets.

* Fix #1599 by relaxing the `match_trigger` regex (#1601)

* Fix #1599 by relaxing the `match_trigger` regex

Also simplify logic and reduce duplication.

* restrict trigger regex again (but not so far)

* make concepts library work with Web UI

This PR makes it possible to include a Hugging Face concepts library
<style-or-subject-trigger> in the WebUI prompt. The metadata seems
to be correctly handled.

* documentation enhancements (#1603)

- Add documentation for the Hugging Face concepts library and TI embedding.

- Fixup index.md to point to each of the feature documentation files,
  including ones that are pending.

* tweak setup and environment files for linux & pypatchmatch (#1580)

* tweak setup and environment files for linux & pypatchmatch

- Downgrade python requirements to 3.9 because 3.10 is not supported
  on Ubuntu 20.04 LTS (widely-used distro)
- Use our github pypatchmatch 0.1.3 in order to install Makefile
  where it needs to be.
- Restored "-e ." as the last install step on pip installs. Hopefully
  this will not trigger the high-CPU hang we've previously experienced.

* keep windows on basicsr 1.4.1

* keep windows on basicsr 1.4.1

* bump pypatchmatch requirement to 0.1.4

- This brings in a version of pypatchmatch that will gracefully
  handle internet connection not available at startup time.
- Also refactors and simplifies the handling of gfpgan's basicsr requirement
  across various platforms.

* revert to older version of list_models() (#1611)

This restores the correct behavior of list_models() and quenches
the bug of list_models() returning a single model entry named "name".

I have not investigated what was wrong with the new version, but I
think it may have to do with changes to the behavior in dict.update()

* Fixes for #1604 (#1605)

* Converts ESRGAN image input to RGB

- Also adds typing for image input.
- Partially resolves #1604

* ensure there are unmasked pixels before color matching

Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>

* update index.md (#1609)

- comment out non existing link
- fix indention
- add seperator between feature categories

* Debloat-docker (#1612)

* debloat Dockerfile
- less options more but more userfriendly
- better Entrypoint to simulate CLI usage
- without command the container still starts the web-host

* debloat build.sh

* better syntax in run.sh

* update Docker docs
- fix description of VOLUMENAME
- update run script example to reflect new entrypoint

* Test installer (#1618)

* test linux install

* try removing http from parsed requirements

* pip install confirmed working on linux

* ready for linux testing

- rebuilt py3.10-linux-x86_64-cuda-reqs.txt to include pypatchmatch
  dependency.
- point install.sh and install.bat to test-installer branch.

* Updates MPS reqs

* detect broken readline history files

* fix download.pytorch.org URL

* Test installer (Win 11) (#1620)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

* Test installer (MacOS 13.0.1 w/ torch==1.12.0) (#1621)

* Test installer (Win 11)

* Test installer (MacOS 13.0.1 w/ torch==1.12.0)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

* change sourceball to development for testing

* Test installer (MacOS 13.0.1 w/ torch==1.12.1 & torchvision==1.13.1) (#1622)

* Test installer (Win 11)

* Test installer (MacOS 13.0.1 w/ torch==1.12.0)

* Test installer (MacOS 13.0.1 w/ torch==1.12.1 & torchvision==1.13.1)

Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Co-authored-by: Cyrus Chan <82143712+cyruschan360@users.noreply.github.com>
Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>

* 2.2 Doc Updates (#1589)

* Unified Canvas Docs & Assets

Unified Canvas draft

Advanced Tools Updates

Doc Updates (lstein feedback)

* copy edits to Unified Canvas docs

- consistent capitalisation and feature naming
- more intimate address (replace "the user" with "you") for improved User
  Engagement(tm)
- grammatical massaging and *poesie*

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Co-authored-by: damian <git@damianstewart.com>

* include a step after config to `cat ~/.invokeai` (#1629)

* disable patchmatch in CI actions (#1626)

* disable patchmatch in CI actions

* fix indention

* replace tab with spaces

Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Co-authored-by: mauwii <Mauwii@outlook.de>

* Fix installer script for macOS. (#1630)

* refer to the platform as 'osx' instead of 'mac', otherwise the
composed URL to micromamba is wrong.
* move the `-O` option to `tar` to be grouped with the other tar flags
to avoid the `-O` being interpreted as something to unarchive.

* Removes symlinked environment.yaml (#1631)

Was unintentionally added in #1621

* Fix inpainting with iterations (#1635)

* fix error when inpainting using runwayml inpainting model (#1634)

- error was "Omnibus object has no attribute pil_image"
- closes #1596

* add k_dpmpp_2_a and k_dpmpp_2 solvers options (#1389)

* add k_dpmpp_2_a and k_dpmpp_2 solvers options

* update frontend

Co-authored-by: Victor <victorca25@users.noreply.github.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

* add .editorconfig (#1636)

* Web UI 2.2 bugfixes (#1572)

* Fixes bug preventing multiple images from being generated

* Fixes valid seam strength value range

* Update Delete Alert Text

Indicates to the user that images are not permanently deleted.

* Fixes left/right arrows not working on gallery

* Fixes initial image on load erroneously set to a user uploaded image

Should be a result gallery image.

* Lightbox Fixes

- Lightbox is now a button in the current image buttons
- Lightbox is also now available in the gallery context menu
- Lightbox zoom issues fixed
- Lightbox has a fade in animation.

* Fix image display wrapper in current preview not overflow bounds

* Revert "Fix image display wrapper in current preview not overflow bounds"

This reverts commit 5511c82714dbf1d1999d64e8bc357bafa34ddf37.

* Change Staging Area discard icon from Bin to X

* Expose Snap Threshold and Move Snap Settings to BBox Panel

* Changes img2img strength default to 0.75

* Fixes drawing triggering when mouse enters canvas w/ button down

When we only supported inpainting and no zoom, this was useful. It allowed the cursor to leave the canvas (which was easy to do given the limited canvas dimensions) and without losing the "I am drawing" state. 

With a zoomable canvas this is no longer as useful.

Additionally, we have more popovers and tools (like the color pickers) which result in unexpected brush strokes. This fixes that issue.

* Revert "Expose Snap Threshold and Move Snap Settings to BBox Panel"

We will handle this a bit differently - by allowing the grid origin to be moved. I will dig in at some point.

This reverts commit 33c92ecf4da724c2f17d9d91c7ea31a43a2f6deb.

* Adds Limit Strokes to Box

* Adds fill bounding box button

* Adds erase bounding box button

* Changes Staging area discard icon to match others

* Fixes right click breaking move tool

* Fixes brush preview visibility issue with "darken outside box"

* Fixes history bugs with addFillRect, addEraseRect, and other actions

* Adds missing `key`

* Fixes postprocessing being applied to canvas generations

* Fixes bbox not getting scaled in various situations

* Fixes staging area show image toggle not resetting on accept/discard

* Locks down canvas while generating/staging

* Fixes move tool breaking when canvas loses focus during move/transform

* Hides cursor when restrict strokes is on and mouse outside bbox

* Lints

* Builds fresh bundle

* Fix overlapping hotkey for Fill Bounding Box

* Build Fresh Bundle

* Fixes bug with mask and bbox overlay

* Builds fresh bundle

Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

* disable NSFW checker loading during the CI tests (#1641)

* disable NSFW checker loading during the CI tests

The NSFW filter apparently causes invoke.py to crash during CI testing,
possibly due to out of memory errors. This workaround disables NSFW
model loading.

* doc change

* fix formatting errors in yml files

* Configure the NSFW checker at install time with default on (#1624)

* configure the NSFW checker at install time with default on

1. Changes the --safety_checker argument to --nsfw_checker and
--no-nsfw_checker. The original argument is recognized for backward
compatibility.

2. The configure script asks users whether to enable the checker
(default yes). Also offers users ability to select default sampler and
number of generation steps.

3.Enables the pasting of the caution icon on blurred images when
InvokeAI is installed into the package directory.

4. Adds documentation for the NSFW checker, including caveats about
accuracy, memory requirements, and intermediate image dispaly.

* use better fitting icon

* NSFW defaults false for testing

* set default back to nsfw active

Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Co-authored-by: mauwii <Mauwii@outlook.de>

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>
Co-authored-by: javl <mail@jaspervanloenen.com>
Co-authored-by: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com>
Co-authored-by: mauwii <Mauwii@outlook.de>
Co-authored-by: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Co-authored-by: Damian Stewart <d@damianstewart.com>
Co-authored-by: DevOps117 <55235206+devops117@users.noreply.github.com>
Co-authored-by: damian <git@damianstewart.com>
Co-authored-by: Damian Stewart <null@damianstewart.com>
Co-authored-by: Cyrus Chan <82143712+cyruschan360@users.noreply.github.com>
Co-authored-by: Cyrus Chan <cyruswkc@hku.hk>
Co-authored-by: Andre LaBranche <dre@mac.com>
Co-authored-by: victorca25 <41912303+victorca25@users.noreply.github.com>
Co-authored-by: Victor <victorca25@users.noreply.github.com>
2022-11-30 16:12:23 -05:00
8f3f64b22e prevent crash that occurs when changing models.yaml on windows systems
Windows does not support an atomic `os.rename()` operation. This
PR changes it to `os.replace()`, which does the same thing.
2022-11-25 16:59:31 -05:00
dba0280790 Fix Colab requirements (again) (#1505) 2022-11-24 20:41:31 -05:00
19e2cff18c Fix micromamba tar command for macOS
Moved the -O from after the file to after the tar command for compatibility with macOS

Signed-off-by: Kevin Coakley <kcoakley@sdsc.edu>
2022-11-18 16:08:17 -05:00
58f65d49b6 Fixed Google Colab requirements URL
Signed-off-by: slashtechno <77907286+slashtechno@users.noreply.github.com>
2022-11-16 22:31:18 -05:00
e5edd025d6 Fixing Dead Link
I believe this is what you meant to link?
2022-11-14 17:34:51 -05:00
29e229b409 adding troubleshooting tips to the newer doc 2022-11-14 10:31:19 -05:00
93cdb476d9 change installer download repo to main.tar.gz 2022-11-13 16:44:21 -05:00
1305e7a56c documentation hot fixes
- changes pointers to installation instructions from README
- Adds the changelog for the 2.1.3 release
2022-11-13 10:18:28 -05:00
58edf262e4 Fix CWD being removed from path again. Refixes #723 again
Weirdly, I'm not even on a Mac or using a special Python distro.  Just
plain old Debian stable and a plain old venv.
2022-11-13 09:58:42 -05:00
fd67df9447 Remove gfpgan_dir
+ Update GFPGAN Model Path Defaults
>  Update them to match the new file heirarchy
2022-11-13 00:27:56 +00:00
45e5053d06 added assets back 2022-11-13 00:23:51 +00:00
9c5999ede1 added caveats to use of installer script 2022-11-12 20:02:01 +00:00
7ddf7f0b7d use invoke-ai gfpgan to store weights in right place 2022-11-12 19:31:41 +00:00
b8de5244b1 Fixes issue with intermediates size
Sorry @lstein !
2022-11-12 19:03:22 +00:00
72e011a4e4 stop crash on text mask generation 2022-11-12 18:23:16 +00:00
98db0d746c fix crash in inpaint when no seed in original image 2022-11-12 17:57:43 +00:00
1a8e007066 merge release-candidate-1-3-2 into main.
Squashed commit of the following:

commit 9a1fe8e7fb
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 12 17:07:40 2022 +0000

    swap in release URLs for installers

commit ff56f5251b
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 12 17:03:21 2022 +0000

    fix up bad unicode chars in invoke.py

commit ed943bd6c7
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 12 16:05:45 2022 +0000

    outcrop improvements, hand-added

commit 7ad2355b1d
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 12 15:14:33 2022 +0000

    documentation fixes

commit 66c920fc19
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 16:49:25 2022 -0500

    Revert "Resize hires as an image"

    This reverts commit d05b1b3544.

commit 3fc5cb09f8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 12 12:43:17 2022 +0000

    fix incorrect link in install

commit 1345ec77ab
Author: tildebyte <337875+tildebyte@users.noreply.github.com>
Date:   Sun Nov 6 19:07:31 2022 -0500

    toil(repo): add tildebyte as owner of installer/ directory

commit b116715490
Author: Kyle Schouviller <kyle0654@hotmail.com>
Date:   Thu Nov 10 21:43:56 2022 -0800

    Fix performance issue introduced by torch cuda cache clear during generation

commit fa3670270e
Author: mauwii <Mauwii@outlook.de>
Date:   Fri Nov 11 12:42:03 2022 +0100

    small update to dockers huggingface section

commit c304250ef6
Author: mauwii <Mauwii@outlook.de>
Date:   Fri Nov 11 12:19:27 2022 +0100

    fix format and Link in INSTALL_INVOKE.md

commit 802ce5dde5
Author: mauwii <Mauwii@outlook.de>
Date:   Fri Nov 11 11:17:49 2022 +0100

    small fixex to format and a link in INSTALL_MANUAL

commit 311ee320ec
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 07:23:35 2022 +0000

    ignore installer intermediate files

commit e9df17b374
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 07:19:25 2022 +0000

    fix backslash-related syntax error

commit 061fb4ef00
Merge: 52be0d23 4095acd1
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 06:50:04 2022 +0000

    Merge branch 'release-candidate-2-1-3' of github.com:/invoke-ai/InvokeAI into release-candidate-2-1-3

commit 52be0d2396
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 06:49:45 2022 +0000

    add WindowsLongFileName batfile to source installer

commit 4095acd10e
Author: mauwii <Mauwii@outlook.de>
Date:   Fri Nov 11 07:05:17 2022 +0100

    Doc Updates
    A lot of re-formating of new Installation Docs
    also some content updates/corrections

commit 201eb22d76
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 04:41:02 2022 +0000

    prevent two models from being marked default in models.yaml

commit 17ab982200
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 03:56:54 2022 +0000

    installers download branch HEAD not tag

commit a04965b0e9
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 11 03:48:21 2022 +0000

    improve messaging during installation process

commit 0b529f0c57
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 15:22:32 2022 +0000

    enable outcropping of random JPG/PNG images

    - Works best with runwayML inpainting model
    - Numerous code changes required to propagate seed to final metadata.
      Original code predicated on the image being generated within InvokeAI.

commit 6f9f848345
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 17:27:42 2022 +0000

    enhance outcropping with ability to direct contents of new regions

    - When outcropping an image you can now add a `--new_prompt` option, to specify
      a new prompt to be used instead of the original one used to generate the image.

    - Similarly you can provide a new seed using `--seed` (or `-S`). A seed of zero
      will pick one randomly.

    - This PR also fixes the crash that happened when trying to outcrop an image
      that does not contain InvokeAI metadata.

commit 918c1589ef
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 20:16:47 2022 +0000

    fix #1402

commit 116415b3fc
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 21:27:25 2022 +0000

    fix invoke.py crash if no models.yaml file present

    - Script will now offer the user the ability to create a
      minimal models.yaml and then gracefully exit.
    - Closes #1420

commit b4b6eabaac
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 16:49:25 2022 -0500

    Revert "Log strength with hires"

    This reverts commit 82d4904c07.

commit 4ef1f4a854
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 20:01:49 2022 +0000

    remove temporary directory from repo

commit 510fc4ebaa
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 19:59:03 2022 +0000

    remove -e from clipseg load in installer

commit a20914434b
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 19:37:07 2022 +0000

    change clipseg repo branch to avoid clipseg not found error

commit 0d134195fd
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 18:39:29 2022 +0000

    update repo URL to point to rc

commit 649d8c8573
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 18:13:28 2022 +0000

    integrate tildebyte installer

commit a358d370a0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 17:48:14 2022 +0000

    add @tildebyte compiled pip installer

commit 94a9033c4f
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 14:52:00 2022 +0000

    ignore source installer zip files

commit 18a947c503
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 14:46:36 2022 +0000

    documentation and environment file fixes

    - Have clarified the relationship between the @tildebyte and @cmdr2 installers;
      However, @tildebyte installer merge is still a WIP due to conflicts over
      such things as `invoke.sh`.
    - Rechristened 1click installer as "source" installer. @tildebyte installer will be
      "the" installer. (We'll see which one generates the least support requests and
      maintenance work.)
    - Sync'd `environment-mac.yml` with `development`. The former was failing with a
      taming-transformers error as per https://discord.com/channels/@me/1037201214154231899/1040060947378749460

commit a23b031895
Author: Mike DiGiovanni <vinblau@gmail.com>
Date:   Wed Nov 9 16:44:59 2022 -0500

    Fixes typos in README.md

commit 23af68c7d7
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 07:02:27 2022 -0500

    downgrade win installs to basicsr==1.4.1

commit e258beeb51
Merge: 7460c069 e481bfac
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 06:37:45 2022 -0500

    Merge branch 'release-candidate-2-1-3' of github.com:invoke-ai/InvokeAI into release-candidate-2-1-3

commit 7460c069b8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 06:36:48 2022 -0500

    remove --prefer-binary from requirements-base.txt

    It appears that some versions of pip do not recognize this option
    when it appears in the requirements file. Did not explore this further
    but recommend --prefer-binary in the manual install instructions on
    the command line.

commit e481bfac61
Merge: 5040747c d1ab65a4
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 11:21:56 2022 +0000

    Merge branch 'release-candidate-2-1-3' of github.com:/invoke-ai/InvokeAI into release-candidate-2-1-3

commit 5040747c67
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 10 11:21:43 2022 +0000

    fix windows install instructions & bat file

commit d1ab65a431
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 07:18:59 2022 +0100

    update WEBUIHOTKEYS.md

commit af4ee7feb8
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 06:33:49 2022 +0100

    update INSTALL_DOCKER.md

commit 764fb29ade
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 06:30:15 2022 +0100

    fix formatting in INSTALL.md

commit 1014d3ba44
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 06:29:14 2022 +0100

    fix build.sh invokeai_conda_env_file default value

commit 40a48aca88
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 05:25:30 2022 +0100

    fix environment-mac.yml
    moved taming-transformers-rom1504 to pip dependencies

commit 92abc00f16
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 05:19:52 2022 +0100

    fix test-invoke-conda
    - copy required conda environment yaml
    - use environment.yml
    - I use cp instead of ln since would be compatible for windows runners

commit a5719aabf8
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 10 04:14:35 2022 +0100

    update Dockerfile
    - link environment.yml from new environemnts path
    - change default conda_env_file
    - quote all variables to avoid splitting
    - also remove paths from conda-env-files in build-container.yml

commit 44a18511fa
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 20:51:06 2022 +0000

    update paths in container build workflow

commit b850dbadaf
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 20:16:57 2022 +0000

    finished reorganization of install docs

commit 9ef8b944d5
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 18:50:58 2022 +0000

    tweaks to manual install documentation

    --prefer-binary is an iffy option in the requirements file. It isn't
    supported by some versions of pip, so I removed it from
    requirements-base.txt and inserted it into the manual install
    instructions where it seems to do what it is supposed to.

commit efc5a98488
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 18:20:03 2022 +0000

    manual installation documentation tested on Linux

commit 1417c87928
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 17:37:06 2022 +0000

    change name of requirements.txt to avoid confusion

commit 2dd6fc2b93
Merge: 22213612 71ee44a8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 17:26:24 2022 +0000

    Merge branch 'release-candidate-2-1-3' of github.com:/invoke-ai/InvokeAI into release-candidate-2-1-3

commit 22213612a0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 17:25:59 2022 +0000

    directory cleanup; working on install docs

commit 71ee44a827
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 02:07:13 2022 +0000

    prevent crash when switching to an invalid model

commit b17ca0a5e7
Author: damian0815 <null@damianstewart.com>
Date:   Tue Nov 8 14:28:38 2022 +0100

    don't suppress exceptions when doing cross-attention control

commit 71bbfe4a1a
Author: damian0815 <null@damianstewart.com>
Date:   Tue Nov 8 12:59:34 2022 +0100

    Fix #1362 by improving VRAM usage patterns when doing .swap()

    commit ef3f7a26e242b73c2beb0195c7fd8f654ef47f55
    Author: damian0815 <null@damianstewart.com>
    Date:   Tue Nov 8 12:18:37 2022 +0100

        remove log spam

    commit 7189d649622d4668b120b0dd278388ad672142c4
    Author: damian0815 <null@damianstewart.com>
    Date:   Tue Nov 8 12:10:28 2022 +0100

        change the way saved slicing strategy is applied

    commit 01c40f751ab72955140165c16f95ae411732265b
    Author: damian0815 <null@damianstewart.com>
    Date:   Tue Nov 8 12:04:43 2022 +0100

        fix slicing_strategy_getter callsite

    commit f8cfe25150a346958903316bc710737d99839923
    Author: damian0815 <null@damianstewart.com>
    Date:   Tue Nov 8 11:56:22 2022 +0100

        cleanup, consistent dim=0 also tested

    commit 5bf9b1e890d48e962afd4a668a219b68271e5dc1
    Author: damian0815 <null@damianstewart.com>
    Date:   Tue Nov 8 11:34:09 2022 +0100

        refactored context, tested with non-sliced cross attention control

    commit d58a46e39bf562e7459290d2444256e8c08ad0b6
    Author: damian0815 <null@damianstewart.com>
    Date:   Sun Nov 6 00:41:52 2022 +0100

        cleanup

    commit 7e2c658b4c06fe239311b65b9bb16fa3adec7fd7
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:57:31 2022 +0100

        disable logs

    commit 20ee89d93841b070738b3d8a4385c93b097d92eb
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:36:58 2022 +0100

        slice saved attention if necessary

    commit 0a7684a22c880ec0f48cc22bfed4526358f71546
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:32:38 2022 +0100

        raise instead of asserting

    commit 7083104c7f3a0d8fd96e94a2f391de50a3c942e4
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:31:00 2022 +0100

        store dim when saving slices

    commit f7c0808ed383ec1dc70645288a798ed2aa4fa85c
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:27:16 2022 +0100

        don't retry on exception

    commit 749a721e939b3fe7c1741e7998dab6bd2c85a0cb
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:24:50 2022 +0100

        stuff

    commit 032ab90e9533be8726301ec91b97137e2aadef9a
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:20:17 2022 +0100

        more logging

    commit 3dc34b387f033482305360e605809d95a40bf6f8
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:16:47 2022 +0100

        logs

    commit 901c4c1aa4b9bcef695a6551867ec8149e6e6a93
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:12:39 2022 +0100

        actually set save_slicing_strategy to True

    commit f780e0a0a7c6b6a3db320891064da82589358c8a
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 22:10:35 2022 +0100

        store slicing strategy

    commit 93bb6d566fd18c5c69ef7dacc8f74ba2cf671cb7
    Author: damian <git@damianstewart.com>
    Date:   Sat Nov 5 20:43:48 2022 +0100

        still not it

    commit 5e3a9541f8ae00bde524046963910323e20c40b7
    Author: damian <git@damianstewart.com>
    Date:   Sat Nov 5 17:20:02 2022 +0100

        wip offloading attention slices on-demand

    commit 4c2966aa856b6f3b446216da3619ae931552ef08
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 15:47:40 2022 +0100

        pre-emptive offloading, idk if it works

    commit 572576755e9f0a878d38e8173e485126c0efbefb
    Author: root <you@example.com>
    Date:   Sat Nov 5 11:25:32 2022 +0000

        push attention slices to cpu. slow but saves memory.

    commit b57c83a68f2ac03976ebc89ce2ff03812d6d185f
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 12:04:22 2022 +0100

        verbose logging

    commit 3a5dae116f110a96585d9eb71d713b5ed2bc3d2b
    Author: damian0815 <null@damianstewart.com>
    Date:   Sat Nov 5 11:50:48 2022 +0100

        wip fixing mem strategy crash (4 test on runpod)

    commit 3cf237db5fae0c7b0b4cc3c47c81830bdb2ae7de
    Author: damian0815 <null@damianstewart.com>
    Date:   Fri Nov 4 09:02:40 2022 +0100

        wip, only works on cuda

commit 5702271991
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 14:09:36 2022 +0000

    speculative reorganization of the requirements & environment files

    - This is only a test!
    - The various environment*.yml and requirements*.txt files have all
      been moved into a directory named "environments-and-requirements".
    - The idea is to clean up our root directory so that the github home
      page is tidy.
    - The manual install instructions will start with the instructions to
      create a symbolic link from environment.yml to the appropriate file
      for OS and GPU.
    - The 1-click installers have been updated to accommodate this change.

commit 10781e7dc4
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 9 01:59:45 2022 +0000

    refactoring requirements

commit 099d1157c5
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Nov 9 00:16:18 2022 +0100

    better way to make sure if conda is useable

commit ab825bf7ee
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 22:05:33 2022 +0000

    add back --prefer-binaries to requirements

commit 10cfeb5ada
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 8 22:27:19 2022 +0100

    add quotes to set and use `$environment_file`

commit e97515d045
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 8 22:24:21 2022 +0100

    set environment file for conda update

commit 0f04bc5789
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 8 22:21:25 2022 +0100

    use conda env update

commit 3f74aabecd
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 8 22:20:44 2022 +0100

    use command instead of hash

commit b1a99a51b7
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 14:44:44 2022 -0500

    remove --global git config from 1-click installers

commit 8004f8a6d9
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Nov 7 09:07:20 2022 -0500

    Revert "Use array slicing to calc ddim timesteps"

    This reverts commit 1f0c5b4cf1.

commit ff8ff2212a
Merge: 8e5363cd 636620b1
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 14:01:40 2022 +0000

    add initfile support from PR #1386

commit 8e5363cd83
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 13:26:18 2022 +0000

    move 'installer/' to '1-click-installer' to make room for tildebyte installer

commit 1450779146
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 12:56:36 2022 +0000

    update branch for installer to pull against

commit 8cd5d95b8a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 05:30:20 2022 +0000

    move all models into subdirectories of ./models

    - this required an update to the invoke-ai fork of gfpgan
    - simultaneously reverted consolidation of environment and
      requirements files, as their presence in a directory
      triggered setup.py to try to install a sub-package.

commit abd6407394
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 03:52:46 2022 +0000

    leave a copy of environment-cuda.yml at top level

    - named it environment.yml
    - need to avoid a big change for users and breaking older support
      instructions.

commit 734dacfbe9
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 03:50:07 2022 +0000

    consolidate environment files

    - starting to remove unneeded entries and pins
    - no longer require -e in front of github dependencies
    - update setup.py with release number
    - update manual installation instructions

commit 636620b1d5
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 8 03:26:16 2022 +0000

    change initfile to ~/.invokeai

    - adjust documentation
    - also fix 'clipseg_models' to 'clipseg', which seems to be working now

commit 1fe41146f0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 5 14:28:01 2022 -0400

    add support for an initialization file, invokeai.init

    - Place preferred startup command switches in a file named
      "invokeai.init". The file can consist of a single line of switches
      such as "--web --steps=28", a series of switches on each
      line, or any combination of the two.

     Example:
     ```
       --web
       --host=0.0.0.0
       --steps=28
       --grid
       -f 0.6 -C 11.0 -A k_euler_a
    ```

    - The following options, which were previously only available within
      the CLI, are now available on the command line as well:

      --steps
      --strength
      --cfg_scale
      --width
      --height
      --fit

commit 2ad6ef355a
Merge: 865502ee 8b47c829
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Nov 6 18:08:36 2022 +0000

    update discord link

commit 865502ee4f
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 18:00:16 2022 +0100

    update changelog

commit c7984f3299
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 17:07:27 2022 +0100

    update TROUBLESHOOT.md

commit 7f150ed833
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 16:56:58 2022 +0100

    remove `:`from headlines in CONTRIBUTORS.md

commit badf4e256c
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 16:56:37 2022 +0100

    enable navigation tabs
    Since the docs are growing, this way they look cleaner

commit e64c60bbb3
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 16:18:59 2022 +0100

    remove preflight checks from assets
    seems like somebody executed tests and commited them

commit 1780618543
Author: mauwii <Mauwii@outlook.de>
Date:   Sun Nov 6 16:15:06 2022 +0100

    update INSTALLING_MODELS.md

commit f91fd27624
Author: Kyle Schouviller <kyle0654@hotmail.com>
Date:   Sat Nov 5 14:47:53 2022 -0700

    Bug fix for inpaint size

commit 09e41e8f76
Author: Kyle Schouviller <kyle0654@hotmail.com>
Date:   Sat Nov 5 14:34:52 2022 -0700

    Add inpaint size options to inpaint at a larger size than the actual inpaint image, then scale back down for recombination

commit 6eeb2107b3
Author: mauwii <Mauwii@outlook.de>
Date:   Sat Nov 5 21:01:14 2022 +0100

    remove create-caches.yml since not used anywhere

commit 17053ad8b7
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 5 16:01:55 2022 -0400

    fix duplicated argument introduced by conflict resolution

commit fefb4dc1f8
Merge: 762ca60a d05b1b35
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 5 12:47:35 2022 -0700

    Merge branch 'development' into fix_generate.py

commit d05b1b3544
Author: Craig <cwallen@users.noreply.github.com>
Date:   Sat Oct 29 20:40:30 2022 -0400

    Resize hires as an image

commit 82d4904c07
Author: Craig <cwallen@users.noreply.github.com>
Date:   Sat Oct 29 20:37:40 2022 -0400

    Log strength with hires

commit 1cdcf33cfa
Merge: 6616fa83 cbc029c6
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Nov 5 09:57:38 2022 -0400

    Merge branch 'main' into development

    - this synchronizes recent document fixes by mauwii

commit 6616fa835a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 4 00:47:03 2022 -0400

    fix Windows library dependency issues

    This commit addresses two bugs:

    1) invokeai.py crashes immediately with a message about an undefined
       attritube sigKILL (closes #1288). The fix is to pin torch at 1.12.1.

    2) Version 1.4.2 of basicsr fails to load properly on Windows, and is
       a requirement of realesrgan, however 1.4.1 works. Pinning basicsr
       in our requirements file resulted in a dependency conflict, so I
       ended up cloning realesrgan into the invoke-ai Git space and changing
       the requirements file there.

    If there is a more elegant solution, please advise.

commit 7b9a4564b1
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Sat Nov 5 14:36:45 2022 +0100

    Update-docs (#1382)

    * update IMG2IMG.md

    * update INPAINTING.md

    * update WEBUIHOTKEYS.md

    * more doc updates (mostly fix formatting):
    - OUTPAINTING.md
    - POSTPROCESS.md
    - PROMPTS.md
    - VARIATIONS.md
    - WEB.md
    - WEBUIHOTKEYS.md

commit fcdefa0620
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Fri Nov 4 20:47:31 2022 +0100

    Hotifx docs (#1376) (#1377)

commit ef8b3ce639
Merge: b7042095 36870a8f
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Nov 4 12:08:44 2022 -0400

    Merge-main-into-development (#1373)

    To get the rid of the difference between main and development.

    Since otherwise it will be a pain to start fixing the documentatino
    (when the state between main and development is not the same ...)

    Also this should fix the problem of all tests failing since environment
    yamls get updated.

commit 36870a8f53
Merge: 6b89adfa b7042095
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Fri Nov 4 16:25:00 2022 +0100

    Merge branch 'development' into merge-main-into-development

commit b70420951d
Author: damian0815 <null@damianstewart.com>
Date:   Thu Nov 3 12:39:45 2022 +0100

    fix parsing error doing eg `forest ().swap(in winter)`

commit 1f0c5b4cf1
Author: wfng92 <43742196+wfng92@users.noreply.github.com>
Date:   Thu Nov 3 17:13:52 2022 +0800

    Use array slicing to calc ddim timesteps

commit 8648da8111
Author: mauwii <Mauwii@outlook.de>
Date:   Fri Nov 4 00:06:19 2022 +0100

    update environment-linux-aarch64 to use python 3.9

commit 45b4593563
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 3 22:31:46 2022 +0100

    update environment-linux-aarch64.yml
    - move getpass_asterisk to pip

commit 41b04316cf
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 3 20:40:08 2022 +0100

    rename job, remove debug branch from triggers

commit e97c6db2a3
Author: mauwii <Mauwii@outlook.de>
Date:   Thu Nov 3 20:34:01 2022 +0100

    include build matrix to build x86_64 and aarch64

commit 896820a349
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 05:01:15 2022 +0100

    disable caching

commit 06c8f468bf
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 04:26:39 2022 +0100

    disable PR-Validation
    since there are no files passed from context this is unecesarry

commit 61920e2701
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 04:09:39 2022 +0100

    update action to use current branch
    also update build-args of dockerfile and build.sh

commit f34ba7ca70
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 02:30:24 2022 +0100

    remove unecesarry mkdir command again

commit c30ef0895d
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 01:51:12 2022 +0100

    remove symlink to GFPGANv1.4
    also re-add mkdir to prevent action from failing

commit aa3a774f73
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 01:48:59 2022 +0100

    update build-container.yml to use cachev3

commit 2c30555b84
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 01:34:20 2022 +0100

    update Dockerfile
    - create models.yaml from models.yaml.example
    - run preload_models.py with --no-interactive

commit 743f605773
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 01:21:15 2022 +0100

    update build.sh to download sd-v1.5 model

commit 519c661abb
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 25 01:26:50 2022 +0200

    replace old fashined markdown templates with forms
    this will help the readability of issues a lot 🤓

commit 22c956c75f
Merge: 13696adc 0196571a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 3 10:20:21 2022 -0400

    Merge branch 'development' of github.com:invoke-ai/InvokeAI into development

commit 13696adc3a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Nov 3 10:20:10 2022 -0400

    speculative change to solve windows esrgan issues

commit 0196571a12
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 2 22:39:35 2022 -0400

    remove merge markers from preload_models.py

commit 9666f466ab
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 2 18:29:34 2022 -0400

    use refined model by default

commit 240e5486c8
Merge: 8164b6b9 aa247e68
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 2 18:35:00 2022 -0400

    Merge branch 'spezialspezial-patch-9' into development

commit 8164b6b9cf
Merge: 4fc82d55 dd5a88dc
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Nov 2 17:06:46 2022 -0400

    Merge branch 'development' of github.com:invoke-ai/InvokeAI into development

commit 4fc82d554f
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 04:17:28 2022 +1300

    [WebUI] Final 2.1 Release Build

commit 96b34c0f85
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 09:08:11 2022 +0100

    Final WebUI build for Release 2.1
    - squashed commit of 52 commits from PR #1327

    don't log base64 progress images

    Fresh Build For WebUI

    [WebUI] Loopback Default False

    Fixes bugs/styling

    - Fixes missing web app state on new version:
    Adds stateReconciler to redux-persist.

    When we add more values to the state and then release the update app, they will be automatically merged in.

    Reseting web UI will be needed far less.
    7159ec

    - Fixes console z-index
    - Moves reset web UI button to visible area

    Decreases gallery width on inpainting

    Increases workarea split padding to 1rem

    Adds missing tooltips to site header

    Changes inpainting controls settings to hover

    Fixes hotkeys and settings buttons not working

    Improves bounding box interactions

    - Bounding box can now be moved by dragging any of its edges
    - Bounding box does not affect drawing if already drawing a stroke
    - Can lock bounding box to draw directly on the bounding box edges
    - Removes spacebar-hold behaviour due to technical issues

    Fixes silent crash when init image too large

    To send the mask to the server, the UI rendered the mask onto the init image and sent the whole image. The mask was then cropped by the server.

    If the image was too large, the app silently failed. Maybe it exceeds the websocket size limit.

    Fixed by cropping the mask in the UI layer, sending only bounding-box-sized mask image data.

    Disabled bounding box settings when locked

    Styles image uploader

    Builds fresh bundle

    Improves bounding box interaction

    Added spacebar-hold-to-transform back.

    Address bounding box feedback

    - Adds back toggle to hide bounding box
    - Box quick toggle = q, normal toggle = shift + q
    - Styles canvas alert icons

    Adds hints when unable to invoke

    - Popover on Invoke button indicates why exactly it is disabled, e.g. prompt is empty, something else is processing, etc.
    - There may be more than one reason; all are displayed.

    Fix Inpainting Alerts Styling

    Preventing unnecessary re-renders across the app

    Code Split Inpaint Options

    Isolate features to their own components so they dont re-render the other stuff each time.

    [TESTING] Remove  global isReady checking

    I dont believe this is need at all because the isready state is constantly updated when needed and tracked real time in the Redux store. This causes massive re-renders. @psychedelicious If this is absolutely essential for a reason that I do not see, please hit me up on Discord.

    Fresh Bundle

    Fix Bounding Box Settings re-rendering on brush stroke

    [Code Splitting] Bounding Box Options

    Isolated all bounding box components to trigger unnecessary re-renders. Still need to fix  bounding box  triggering re-renders on the control panel inside the canvas itself. But the options panel should be a good to go with this change.

    Inpainting Controls Code Spitting and Performance

    Codesplit the entirety of the inpainting controls. Created new selectors for each and every component to ensure there are no unnecessary re-renders. App feels a lot smoother.

    Fixes rerenders on ClearBrushHistory

    Fixes crash when requesting post-generation upscale/face restoration

    - Moves the inpainting paste to before the postprocessing.

    Removes unused isReady state

    Changes Report Bug icon to a bug

    Restores shift+q bounding box shortcut

    Adds alert for bounding box size to status icons

    Adds asCheckbox to IAIIconButton

    Rough draft of this. Not happy with the styling but it's clearer than having them look just like buttons.

    Fixes crash related to old value of progress_latents in state

    Styling changes and settings modal minor refactor

    Fixes: uploaded JPG images not loading

    Reworks CurrentImageButtons.tsx

    - Change all icons to FA iconset for consistency
    - Refactors IAIIconButton, IAIButton, IAIPopover to handle ref forwarding
    - Redesigns buttons into group

    Only generate 1 iteration when seed fixed & variations disabled

    Fixes progress images select

    Fixes edge case: upload over gets stuck while alt tabbing

    - Press esc to close it now

    Fixes display progress images select typing

    Fixes current image button rerenders

    Adds min width to ImageUploader

    Makes fast-latents in progress default

    Update Icon Button Checkbox Style Styling

    Fixes next/prev image buttons

    Refactor canvas buttons + more

    Add Save Intermediates Step Count

    For accurate mode only.

    Co-Authored-By: Richard Macarthy <richardmacarthy@protonmail.com>

    Restores "initial image" text

    Address feedback

    - moves mask clear button
    - fixes intermediates
    - shrinks inpainting icons by 10%

    Fix Loopback Styling

    Adds escape hotkey to close floating panels

    Readd Hotkey for Dual Display

    Updated Current Image Button Styling

commit dd5a88dcee
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 04:17:28 2022 +1300

    [WebUI] Final 2.1 Release Build

commit 95ed56bf82
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 04:16:31 2022 +1300

    Updated Current Image Button Styling

commit 1ae80f5ab9
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 04:07:57 2022 +1300

    Readd Hotkey for Dual Display

commit 1f0bd3ca6c
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Thu Nov 3 02:07:00 2022 +1100

    Adds escape hotkey to close floating panels

commit a1971f6830
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 03:38:15 2022 +1300

    Fix Loopback Styling

commit c6118e8898
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Thu Nov 3 01:29:51 2022 +1100

    Address feedback

    - moves mask clear button
    - fixes intermediates
    - shrinks inpainting icons by 10%

commit 7ba958cf7f
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Thu Nov 3 01:10:38 2022 +1100

    Restores "initial image" text

commit 383905d5d2
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 02:59:11 2022 +1300

    Add Save Intermediates Step Count

    For accurate mode only.

    Co-Authored-By: Richard Macarthy <richardmacarthy@protonmail.com>

commit 6173e3e9ca
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Thu Nov 3 00:53:53 2022 +1100

    Refactor canvas buttons + more

commit 3feb7d8922
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Thu Nov 3 00:49:23 2022 +1100

    Fixes next/prev image buttons

commit 1d9edbd0dd
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Thu Nov 3 00:50:44 2022 +1300

    Update Icon Button Checkbox Style Styling

commit d439abdb89
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 21:37:24 2022 +1100

    Makes fast-latents in progress default

commit ee47ea0c89
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 21:37:09 2022 +1100

    Adds min width to ImageUploader

commit 300bb2e627
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 21:28:22 2022 +1100

    Fixes current image button rerenders

commit ccf8593501
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 21:27:43 2022 +1100

    Fixes display progress images select typing

commit 0fda612f3f
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 21:02:01 2022 +1100

    Fixes edge case: upload over gets stuck while alt tabbing

    - Press esc to close it now

commit 5afff65b71
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 20:33:19 2022 +1100

    Fixes progress images select

commit 7e55bdefce
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 20:27:47 2022 +1100

    Only generate 1 iteration when seed fixed & variations disabled

commit 620cf84d3d
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 19:51:38 2022 +1100

    Reworks CurrentImageButtons.tsx

    - Change all icons to FA iconset for consistency
    - Refactors IAIIconButton, IAIButton, IAIPopover to handle ref forwarding
    - Redesigns buttons into group

commit cfe567c62a
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 16:14:50 2022 +1100

    Fixes: uploaded JPG images not loading

commit cefe12f1df
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 15:31:18 2022 +1100

    Styling changes and settings modal minor refactor

commit 1e51c39928
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 15:27:46 2022 +1100

    Fixes crash related to old value of progress_latents in state

commit 42a02bbb80
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 13:15:06 2022 +1100

    Adds asCheckbox to IAIIconButton

    Rough draft of this. Not happy with the styling but it's clearer than having them look just like buttons.

commit f1ae6dae4c
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 13:13:56 2022 +1100

    Adds alert for bounding box size to status icons

commit 6195579910
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 11:52:19 2022 +1100

    Restores shift+q bounding box shortcut

commit 16c8b23b34
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 11:32:07 2022 +1100

    Changes Report Bug icon to a bug

commit 07ae626b22
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 11:17:16 2022 +1100

    Removes unused isReady state

commit 8d171bb044
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 11:13:26 2022 +1100

    Fixes crash when requesting post-generation upscale/face restoration

    - Moves the inpainting paste to before the postprocessing.

commit 6e33ca7e9e
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Wed Nov 2 10:59:01 2022 +1100

    Fixes rerenders on ClearBrushHistory

commit db46e12f2b
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 11:36:28 2022 +1300

    Inpainting Controls Code Spitting and Performance

    Codesplit the entirety of the inpainting controls. Created new selectors for each and every component to ensure there are no unnecessary re-renders. App feels a lot smoother.

commit 868e4b2db8
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 07:40:31 2022 +1300

    [Code Splitting] Bounding Box Options

    Isolated all bounding box components to trigger unnecessary re-renders. Still need to fix  bounding box  triggering re-renders on the control panel inside the canvas itself. But the options panel should be a good to go with this change.

commit 2e562742c1
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 06:40:27 2022 +1300

    Fix Bounding Box Settings re-rendering on brush stroke

commit 68e6958009
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 06:28:34 2022 +1300

    Fresh Bundle

commit ea6e3a7949
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 06:26:56 2022 +1300

    [TESTING] Remove  global isReady checking

    I dont believe this is need at all because the isready state is constantly updated when needed and tracked real time in the Redux store. This causes massive re-renders. @psychedelicious If this is absolutely essential for a reason that I do not see, please hit me up on Discord.

commit b2879ca99f
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 06:08:59 2022 +1300

    Code Split Inpaint Options

    Isolate features to their own components so they dont re-render the other stuff each time.

commit 4e911566c3
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 03:50:56 2022 +1300

    Preventing unnecessary re-renders across the app

commit 9bafda6a15
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 03:02:35 2022 +1300

    Fix Inpainting Alerts Styling

commit 871a8a5375
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 23:52:07 2022 +1100

    Adds hints when unable to invoke

    - Popover on Invoke button indicates why exactly it is disabled, e.g. prompt is empty, something else is processing, etc.
    - There may be more than one reason; all are displayed.

commit 0eef74bc00
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 23:40:11 2022 +1100

    Address bounding box feedback

    - Adds back toggle to hide bounding box
    - Box quick toggle = q, normal toggle = shift + q
    - Styles canvas alert icons

commit 423ae32097
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 17:06:07 2022 +1100

    Improves bounding box interaction

    Added spacebar-hold-to-transform back.

commit 8282e5d045
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 16:57:07 2022 +1100

    Builds fresh bundle

commit 19305cdbdf
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 16:51:11 2022 +1100

    Styles image uploader

commit eb9028ab30
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 16:51:03 2022 +1100

    Disabled bounding box settings when locked

commit 21483f5d07
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 16:50:24 2022 +1100

    Fixes silent crash when init image too large

    To send the mask to the server, the UI rendered the mask onto the init image and sent the whole image. The mask was then cropped by the server.

    If the image was too large, the app silently failed. Maybe it exceeds the websocket size limit.

    Fixed by cropping the mask in the UI layer, sending only bounding-box-sized mask image data.

commit 82dcbac28f
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 16:28:30 2022 +1100

    Improves bounding box interactions

    - Bounding box can now be moved by dragging any of its edges
    - Bounding box does not affect drawing if already drawing a stroke
    - Can lock bounding box to draw directly on the bounding box edges
    - Removes spacebar-hold behaviour due to technical issues

commit d43bd4625d
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 15:10:49 2022 +1100

    Fixes hotkeys and settings buttons not working

commit ea891324a2
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 11:04:02 2022 +1100

    Changes inpainting controls settings to hover

commit 8fd9ea2193
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 11:03:41 2022 +1100

    Adds missing tooltips to site header

commit fb02666856
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 11:03:25 2022 +1100

    Increases workarea split padding to 1rem

commit f6f5c2731b
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 11:03:10 2022 +1100

    Decreases gallery width on inpainting

commit b4e3f771e0
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 10:54:59 2022 +1100

    Fixes bugs/styling

    - Fixes missing web app state on new version:
    Adds stateReconciler to redux-persist.

    When we add more values to the state and then release the update app, they will be automatically merged in.

    Reseting web UI will be needed far less.
    7159ec

    - Fixes console z-index
    - Moves reset web UI button to visible area

commit 99bb9491ac
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Tue Nov 1 08:35:45 2022 +1300

    [WebUI] Loopback Default False

commit 0453f21127
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Wed Nov 2 23:23:51 2022 +1300

    Fresh Build For WebUI

commit 9fc09aa4bd
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 09:08:11 2022 +0100

    don't log base64 progress images

commit 5e87062cf8
Author: spezialspezial <75758219+spezialspezial@users.noreply.github.com>
Date:   Wed Nov 2 00:21:27 2022 +0100

    Option to directly invert the grayscale heatmap - fix

commit 3e7a459990
Author: spezialspezial <75758219+spezialspezial@users.noreply.github.com>
Date:   Tue Nov 1 21:37:33 2022 +0100

    Update txt2mask.py

commit bbf4c03e50
Author: spezialspezial <75758219+spezialspezial@users.noreply.github.com>
Date:   Tue Nov 1 21:11:19 2022 +0100

    Option to directly invert the grayscale heatmap

    Theoretically less work inverting the image while it's small but I can't measure a significant difference. Though, handy option to have in some cases.

commit 611a3a9753
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Nov 2 02:23:09 2022 +0100

    fix name of caching step

commit 1611f0d181
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Nov 2 02:18:46 2022 +0100

    readd caching of sd-models
    - this would remove the necesarrity of the secret availability in PRs

commit 08835115e4
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 22:10:12 2022 -0400

    pin pytorch_lightning to 1.7.7, issue #1331

commit 2d84e28d32
Merge: 533fd04e ef17aae8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 22:11:04 2022 -0400

    Merge branch 'development' of github.com:invoke-ai/InvokeAI into development

commit ef17aae8ab
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 00:39:48 2022 +0100

    add damian0815 to contributors list

commit 0cc39f01a3
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 01:18:50 2022 +0100

    report full size for fast latents and update conversion matrix for v1.5

commit 688d7258f1
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 00:33:00 2022 +0100

    fix a bug that broke cross attention control index mapping

commit 4513320bf1
Author: damian0815 <null@damianstewart.com>
Date:   Wed Nov 2 00:31:58 2022 +0100

    save VRAM by not recombining tensors that have been sliced to save VRAM

commit 533fd04ef0
Merge: 6215592b dff5681c
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 17:40:36 2022 -0400

    Merge branch 'development' of github.com:invoke-ai/InvokeAI into development

commit dff5681cf0
Author: damian0815 <d@d.com>
Date:   Tue Nov 1 13:56:03 2022 +0100

    shorter strings

commit 5a2790a69b
Author: damian0815 <d@d.com>
Date:   Tue Nov 1 13:19:20 2022 +0100

    convert progress display to a drop-down

commit 7c5305ccba
Author: damian0815 <d@d.com>
Date:   Tue Nov 1 12:54:46 2022 +0100

    do not try to save base64 intermediates in gallery on cancellation

commit 4013e8ad6f
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Tue Nov 1 21:54:35 2022 +1100

    Fixes b64 image sending and displaying

commit d1dfd257f9
Author: damian <d@d.com>
Date:   Tue Nov 1 11:40:40 2022 +0100

    wip base64

commit 5322d735ee
Author: damian <d@d.com>
Date:   Tue Nov 1 11:31:42 2022 +0100

    update frontend

commit cdb107dcda
Author: damian <d@d.com>
Date:   Tue Nov 1 11:17:43 2022 +0100

    add option to show intermediate latent space

commit be1393a41c
Author: damian <d@d.com>
Date:   Tue Nov 1 10:16:55 2022 +0100

    ensure existing exception handling code also handles new exception class

commit e554c2607f
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Nov 1 10:08:42 2022 +0100

    Rebuilt prompt parsing logic

    Complete re-write of the prompt parsing logic to be more readable and
    logical, and therefore also hopefully easier to debug, maintain, and
    augment.

    In the process it has also become more robust to badly-formed prompts.

    Squashed commit of the following:

    commit 8fcfa88a16e1390d41717e940d72aed64712171c
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Sun Oct 30 17:05:57 2022 +0100

        further cleanup

    commit 1a1fd78bcfeb49d072e3e6d5808aa8df15441629
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Sun Oct 30 16:07:57 2022 +0100

        cleanup and document

    commit 099c9659fa8b8135876f9a5a50fe80b20bc0635c
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Sun Oct 30 15:54:58 2022 +0100

        works fully

    commit 5e6887ea8c25a1e21438ff6defb381fd027d25fd
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Sun Oct 30 15:24:31 2022 +0100

        further...

    commit 492fda120844d9bc1ad4ec7dd408a3374762d0ff
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Sun Oct 30 14:08:57 2022 +0100

        getting there...

    commit c6aab05a8450cc3c95c8691daf38fdc64c74f52d
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Fri Oct 28 14:29:03 2022 +0200

        wip doesn't compile

    commit 5e533f731cfd20cd435330eeb0012e5689e87e81
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Fri Oct 28 13:21:43 2022 +0200

        working with CrossAttentionCtonrol but no Attention support yet

    commit 9678348773431e500e110e8aede99086bb7b5955
    Author: Damian at mba <damian@frey.NOSPAMco.nz>
    Date:   Fri Oct 28 13:04:52 2022 +0200

        wip rebuiling prompt parser

commit 6215592b12
Merge: ef24d76a 349cc254
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 17:34:55 2022 -0400

    Merge branch 'development' of github.com:invoke-ai/InvokeAI into development

commit 349cc25433
Author: damian0815 <d@d.com>
Date:   Tue Nov 1 20:08:52 2022 +0100

    fix crash (be a little less aggressive clearing out the attention slice)

commit 214d276379
Author: damian0815 <d@d.com>
Date:   Tue Nov 1 19:57:55 2022 +0100

    be more aggressive at clearing out saved_attn_slice

commit ef24d76adc
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 14:34:23 2022 -0400

    fix library problems in preload_modules

commit ab2b5a691d
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Nov 1 17:22:48 2022 -0400

    fix model_cache memory management issues

commit c7de2b2801
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Nov 1 02:02:14 2022 +0100

    disable checks with sd-V1.4 model...
    ...to save some resources, since V1.5 is the default now

commit e8075658ac
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 31 22:20:51 2022 +0100

    update test-invoke-conda.yml
    - fix model dl path for sd-v1-4.ckpt
    - copy configs/models.yaml.example to configs/models.yaml

commit 4202dabee1
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 31 22:17:21 2022 +0100

    fix models example weights for sd-v1.4

commit d67db2bcf1
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Tue Nov 1 08:35:45 2022 +1300

    [WebUI] Loopback Default False

commit 7159ec885f
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Oct 31 11:33:05 2022 -0400

    further improvements to preload_models.py

    - Faster startup for command line switch processing
    - Specify configuration file to modify using --config option:

      ./scripts/preload_models.ply --config models/my-models-file.yaml

commit b5cf734ba9
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Oct 31 11:08:19 2022 -0400

    improve behavior of preload_models.py

    - NEVER overwrite user's existing models.yaml
    - Instead, merge its contents into new config file,
      and rename original to models.yaml.orig (with
      message)
    - models.yaml has been removed from repository and renamed
      models.yaml.example

commit f7dc8eafee
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Oct 31 10:47:35 2022 -0400

    restore models.yaml to virgin state

commit 762ca60a30
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Oct 4 22:55:10 2022 -0400

    Update INPAINTING.md

commit e7fb9f342c
Author: Hideyuki Katsushiro <h.katsushiro@qualia.tokyo.jp>
Date:   Wed Oct 5 10:08:53 2022 +0900

    add argument --outdir
2022-11-12 17:17:07 +00:00
8b47c82992 Update README.md 2022-11-06 09:21:05 -08:00
eab435da27 Update index.md 2022-11-06 09:21:05 -08:00
cbc029c6f9 fix Windows library dependency issues
This commit addresses two bugs:

1) invokeai.py crashes immediately with a message about an undefined
   attritube sigKILL (closes #1288). The fix is to pin torch at 1.12.1.

2) Version 1.4.2 of basicsr fails to load properly on Windows, and is
   a requirement of realesrgan, however 1.4.1 works. Pinning basicsr
   in our requirements file resulted in a dependency conflict, so I
   ended up cloning realesrgan into the invoke-ai Git space and changing
   the requirements file there.

If there is a more elegant solution, please advise.
2022-11-05 06:45:28 -07:00
d318968abe remove --no_interactive from preload_scripts.py example (#1378) 2022-11-05 06:23:56 +01:00
e71655237a Hotifx docs (#1376) 2022-11-04 15:17:28 -04:00
6b89adfa7e change "python3" to "python" in instructions 2022-11-03 19:22:05 -04:00
8aa4a258f4 replace old fashined markdown templates with forms
this will help the readability of issues a lot 🤓
2022-11-03 16:28:06 -04:00
174a9b78b0 Bring main back into a consistent state with other branches
- Due to misuse of rebase command, main was transiently
  in an inconsistent state.

- This repairs the damage, and adds a few post-release
  patches that ensure stable conda installs on Mac and Windows.
2022-11-03 15:44:06 -04:00
aa247e68be use refined model by default 2022-11-02 18:29:34 -04:00
895c47fd11 Merge branch 'patch-9' of https://github.com/spezialspezial/stable-diffusion into spezialspezial-patch-9 2022-11-02 18:24:55 -04:00
0c32d7b507 add release-candidate-branch to mkdocs action 2022-11-02 18:17:16 -04:00
09625eae66 webgui working again 2022-11-02 18:07:18 -04:00
76249b3d4e copy dev frontend code over again 2022-11-02 17:56:30 -04:00
d85cd99f17 add option to show intermediate latent space 2022-11-02 17:53:11 -04:00
f4576dcc2d update frontend 2022-11-02 17:51:01 -04:00
62fe308f84 wip base64 2022-11-02 17:47:25 -04:00
9b984e0d1e resolve conflicts 2022-11-02 17:45:48 -04:00
5502b29340 do not try to save base64 intermediates in gallery on cancellation 2022-11-02 17:44:53 -04:00
15fa246ccf convert progress display to a drop-down 2022-11-02 17:44:14 -04:00
4929ae6c1d shorter strings 2022-11-02 17:41:42 -04:00
16a52a607d updated documentation 2022-11-02 17:28:50 -04:00
7c68eff99f remove unused frontend assets 2022-11-02 17:10:20 -04:00
2048a47b85 copy frontend from dev 2022-11-02 17:08:00 -04:00
f73d5a647d Final WebUI build for Release 2.1
- squashed commit of 52 commits from PR #1327

don't log base64 progress images

Fresh Build For WebUI

[WebUI] Loopback Default False

Fixes bugs/styling

- Fixes missing web app state on new version:
Adds stateReconciler to redux-persist.

When we add more values to the state and then release the update app, they will be automatically merged in.

Reseting web UI will be needed far less.
7159ec

- Fixes console z-index
- Moves reset web UI button to visible area

Decreases gallery width on inpainting

Increases workarea split padding to 1rem

Adds missing tooltips to site header

Changes inpainting controls settings to hover

Fixes hotkeys and settings buttons not working

Improves bounding box interactions

- Bounding box can now be moved by dragging any of its edges
- Bounding box does not affect drawing if already drawing a stroke
- Can lock bounding box to draw directly on the bounding box edges
- Removes spacebar-hold behaviour due to technical issues

Fixes silent crash when init image too large

To send the mask to the server, the UI rendered the mask onto the init image and sent the whole image. The mask was then cropped by the server.

If the image was too large, the app silently failed. Maybe it exceeds the websocket size limit.

Fixed by cropping the mask in the UI layer, sending only bounding-box-sized mask image data.

Disabled bounding box settings when locked

Styles image uploader

Builds fresh bundle

Improves bounding box interaction

Added spacebar-hold-to-transform back.

Address bounding box feedback

- Adds back toggle to hide bounding box
- Box quick toggle = q, normal toggle = shift + q
- Styles canvas alert icons

Adds hints when unable to invoke

- Popover on Invoke button indicates why exactly it is disabled, e.g. prompt is empty, something else is processing, etc.
- There may be more than one reason; all are displayed.

Fix Inpainting Alerts Styling

Preventing unnecessary re-renders across the app

Code Split Inpaint Options

Isolate features to their own components so they dont re-render the other stuff each time.

[TESTING] Remove  global isReady checking

I dont believe this is need at all because the isready state is constantly updated when needed and tracked real time in the Redux store. This causes massive re-renders. @psychedelicious If this is absolutely essential for a reason that I do not see, please hit me up on Discord.

Fresh Bundle

Fix Bounding Box Settings re-rendering on brush stroke

[Code Splitting] Bounding Box Options

Isolated all bounding box components to trigger unnecessary re-renders. Still need to fix  bounding box  triggering re-renders on the control panel inside the canvas itself. But the options panel should be a good to go with this change.

Inpainting Controls Code Spitting and Performance

Codesplit the entirety of the inpainting controls. Created new selectors for each and every component to ensure there are no unnecessary re-renders. App feels a lot smoother.

Fixes rerenders on ClearBrushHistory

Fixes crash when requesting post-generation upscale/face restoration

- Moves the inpainting paste to before the postprocessing.

Removes unused isReady state

Changes Report Bug icon to a bug

Restores shift+q bounding box shortcut

Adds alert for bounding box size to status icons

Adds asCheckbox to IAIIconButton

Rough draft of this. Not happy with the styling but it's clearer than having them look just like buttons.

Fixes crash related to old value of progress_latents in state

Styling changes and settings modal minor refactor

Fixes: uploaded JPG images not loading

Reworks CurrentImageButtons.tsx

- Change all icons to FA iconset for consistency
- Refactors IAIIconButton, IAIButton, IAIPopover to handle ref forwarding
- Redesigns buttons into group

Only generate 1 iteration when seed fixed & variations disabled

Fixes progress images select

Fixes edge case: upload over gets stuck while alt tabbing

- Press esc to close it now

Fixes display progress images select typing

Fixes current image button rerenders

Adds min width to ImageUploader

Makes fast-latents in progress default

Update Icon Button Checkbox Style Styling

Fixes next/prev image buttons

Refactor canvas buttons + more

Add Save Intermediates Step Count

For accurate mode only.

Co-Authored-By: Richard Macarthy <richardmacarthy@protonmail.com>

Restores "initial image" text

Address feedback

- moves mask clear button
- fixes intermediates
- shrinks inpainting icons by 10%

Fix Loopback Styling

Adds escape hotkey to close floating panels

Readd Hotkey for Dual Display

Updated Current Image Button Styling
2022-11-02 17:01:02 -04:00
365e2dde1b [WebUI] Final 2.1 Release Build 2022-11-02 16:48:35 -04:00
a48e021c0b remove antlr4 from requirements 2022-11-02 16:35:14 -04:00
825fa6977d Update outcrop.py 2022-11-02 16:33:35 -04:00
e332529fbd Prevent outcrop error when no callback is supplied 2022-11-02 16:33:35 -04:00
0f6aa7fe19 add antlr4 to requirements to fix Windows conda glitch 2022-11-02 15:31:09 -04:00
b8870d8290 more bug fixes to install scripts 2022-11-02 15:26:02 -04:00
ffa91be3f1 Install older version of torch and matching torchvision, fix pytorch-lightning=1.7.7 2022-11-02 14:49:36 -04:00
2d5294bca1 speculative change for .bat installer 2022-11-02 13:56:17 -04:00
2468a28e66 save VRAM by not recombining tensors that have been sliced to save VRAM 2022-11-01 22:39:48 -04:00
e3ed748191 fix a bug that broke cross attention control index mapping 2022-11-01 22:39:39 -04:00
3f5bf7ac44 report full size for fast latents and update conversion matrix for v1.5 2022-11-01 22:39:27 -04:00
00378e1ea6 add damian0815 to contributors list 2022-11-01 22:38:16 -04:00
b45e632f23 Option to directly invert the grayscale heatmap - fix 2022-11-01 22:18:00 -04:00
57be9ae6c3 pin pytorch_lightning to 1.7.7, issue #1331 2022-11-01 22:10:12 -04:00
6c9a2761f5 Optional refined model for Txt2Mask
Don't merge right now, just wanted to show the necessary changes
2022-11-02 00:33:46 +01:00
2bdd738f03 Update txt2mask.py 2022-11-01 17:39:56 -04:00
7782760541 Option to directly invert the grayscale heatmap
Theoretically less work inverting the image while it's small but I can't measure a significant difference. Though, handy option to have in some cases.
2022-11-01 17:39:56 -04:00
de2686d323 fix crash (be a little less aggressive clearing out the attention slice) 2022-11-01 17:35:43 -04:00
0b72a4a35e be more aggressive at clearing out saved_attn_slice 2022-11-01 17:35:34 -04:00
942a202945 fix model_cache memory management issues 2022-11-01 17:22:48 -04:00
1379642fc6 fix library problems in preload_modules 2022-11-01 14:34:23 -04:00
408cf5e092 candidate install scripts for testing 2022-11-01 13:54:42 -04:00
ce298d32b5 attempt to make batch install more reliable
1. added nvidia channel to environment.yml
2. updated pytorch-cuda requirement
3. let conda figure out what version of pytorch to install
4. add conda install status checking to .bat and .sh install files
5. in preload_models.py catch and handle download/access token errors
2022-11-01 12:02:22 -04:00
d7107d931a disable checks with sd-V1.4 model...
...to save some resources, since V1.5 is the default now
2022-10-31 21:35:33 -04:00
147dcc2961 update test-invoke-conda.yml
- fix model dl path for sd-v1-4.ckpt
- copy configs/models.yaml.example to configs/models.yaml
2022-10-31 21:35:20 -04:00
efd7f42414 fix models example weights for sd-v1.4 2022-10-31 21:35:09 -04:00
4e1b619ad7 [WebUI] Loopback Default False 2022-10-31 21:35:01 -04:00
f26199d377 further improvements to preload_models.py
- Faster startup for command line switch processing
- Specify configuration file to modify using --config option:

  ./scripts/preload_models.ply --config models/my-models-file.yaml
2022-10-31 11:34:22 -04:00
90cd791e76 improve behavior of preload_models.py
- NEVER overwrite user's existing models.yaml
- Instead, merge its contents into new config file,
  and rename original to models.yaml.orig (with
  message)
- models.yaml has been removed from repository and renamed
  models.yaml.example
2022-10-31 11:09:57 -04:00
5a95ce5625 restore models.yaml to virgin state 2022-10-31 10:48:42 -04:00
89da42ad79 Merge branch 'pin-options-panel' of https://github.com/psychedelicious/stable-diffusion into psychedelicious-pin-options-panel
- from PR #1301
2022-10-31 09:37:13 -04:00
e8aba99c92 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-31 09:35:21 -04:00
ced9c83e96 various prompting fixes 2022-10-31 09:34:56 -04:00
247816db9a Adds @psychedelicious to contributors list 2022-10-31 09:34:20 -04:00
80f2cfe3e3 set default max_models to 2 internally as well as as arg 2022-10-31 09:05:38 -04:00
9a15a89e20 Tabs Styling Fix 2022-10-31 23:58:08 +11:00
c73a61b785 Add Invoke AI Logo to unpinned Options 2022-10-31 23:58:08 +11:00
88203d8db2 Styling fixes 2022-10-31 23:58:08 +11:00
881c69e905 Fixes invisible image uploader button 2022-10-31 23:58:08 +11:00
c40278dae7 Fixes re-renders triggered by typing prompt 2022-10-31 23:58:08 +11:00
7b329b7c91 Fixes: Progress bar does not activate when changing model 2022-10-31 23:58:08 +11:00
c19b02ab21 Fixes disappearing cursor edge case 2022-10-31 23:58:08 +11:00
6ebddf09c2 Fixes: cancel button disabled after model change 2022-10-31 23:58:08 +11:00
5841e1b5be Fixes safari process buttons style bug 2022-10-31 23:58:08 +11:00
5f09ffa276 Fixes error when inpainting with show progress images enabled 2022-10-31 23:58:02 +11:00
9e70c216f6 Sets defaults to show inpaint box and fill 2022-10-31 23:57:40 +11:00
cbe8a9550c Updates styling 2022-10-31 23:57:40 +11:00
259ecb7b71 Fixes very slightly incorrect pixel offset 2022-10-31 23:57:40 +11:00
002791ef68 Removes unused file 2022-10-31 23:57:40 +11:00
21e491f878 Fixes empty canvas detection 2022-10-31 23:57:40 +11:00
12c4c715aa Demotes inpainting to img2img when mask is empty 2022-10-31 23:57:40 +11:00
fe700d27df Improves styling 2022-10-31 23:57:33 +11:00
7a4ceb0f7c Fixes empty canvas detection 2022-10-31 23:57:19 +11:00
bb5d77a9fb Testing Build 2022-10-31 23:57:19 +11:00
3c55baf06b Readded Bounding Box Visibility Toggle
Only affects preview. The backend still takes the set bounding box.
2022-10-31 23:57:19 +11:00
ca882ad5ff Reworked Invoke Icon Layout when unpinned 2022-10-31 23:57:19 +11:00
6a7b4ef63f Styling Fix 2022-10-31 23:57:19 +11:00
f60d22b29b Fix an issue with the OutsideWatcher
The OutsideWatcher was disabling hotkeys because it was always being active -- whether the object was pinned or not. Modified the hook to now take a new optional argument called "req" which is a boolean that indicates whether to trigger it or not.

We can pass this from the component to control when the outside watcher should work and when it shouldn't.
2022-10-31 23:57:19 +11:00
6a6fbe24a3 Styling & Hotkeys Update 2022-10-31 23:57:19 +11:00
5efd2ed7a8 Demotes inpainting to img2img when mask is empty 2022-10-31 23:56:49 +11:00
62c346850c Improves styling 2022-10-31 23:56:49 +11:00
f6fafe3eb3 Improves bounding box fit behaviour when changing inpaint image 2022-10-31 23:56:49 +11:00
6547c320a9 Adds "loopback" feature 2022-10-31 23:56:49 +11:00
2d32cf4eeb Styling improvements 2022-10-31 23:56:49 +11:00
7a4e358d53 Fixes: unable to postprocess uploaded image "metadata" error 2022-10-31 23:56:49 +11:00
ac1469bbd3 Fixes: inpainting bug "images do not match" 2022-10-31 23:56:49 +11:00
c0c32d9daa Fixes bug with bounding box transforming cursor 2022-10-31 23:56:49 +11:00
52e74fef7c Fixes missing gallery category on generated images 2022-10-31 23:56:49 +11:00
e431d296c0 Builds fresh bundle + tidy 2022-10-31 23:56:49 +11:00
1e7a5fda24 Fixes #1295 2022-10-31 23:56:49 +11:00
050d72478e Attempts to fix #1297 2022-10-31 23:56:49 +11:00
d3a09f1284 Updates styles 2022-10-31 23:56:49 +11:00
e096eef049 Fixes next/prev image not working if category doesn't match 2022-10-31 23:56:49 +11:00
62c97dd7e6 Fixes edge cases, adds invoke button to header when options floating 2022-10-31 23:56:49 +11:00
e58b7a7ef9 Adds pin feature to options panel 2022-10-31 23:56:49 +11:00
dc556cb1a7 add max_load_models parameter for model cache control
- ldm.generate.Generator() now takes an argument named `max_load_models`.
  This is an integer that limits the model cache size. When the cache
  reaches the limit, it will start purging older models from cache.

- CLI takes an argument --max_load_models, default to 2. This will keep
  one model in GPU and the other in CPU and switch back and forth
  quickly.

- To not cache models at all, pass --max_load_models=1
2022-10-31 08:55:53 -04:00
0c8f0e3386 add max_load_models parameter for model cache control
- ldm.generate.Generator() now takes an argument named `max_load_models`.
  This is an integer that limits the model cache size. When the cache
  reaches the limit, it will start purging older models from cache.

- CLI takes an argument --max_load_models, default to 2. This will keep
  one model in GPU and the other in CPU and switch back and forth
  quickly.

- To not cache models at all, pass --max_load_models=1
2022-10-31 08:53:16 -04:00
98f03053ba hard-code strength to 0.9 during outcropping 2022-10-31 07:52:34 -04:00
59ef2471e1 improve outcropping performance
- applied inpainting parameters recommended by @kyle0654
- results are aesthetically pleasing
- Closes #1319
2022-10-31 07:52:26 -04:00
ce7651944d adapt outcrop.py to use new outpainting code
- unfortunately it does not look as good as the old code
  which just used plain inpainting.
2022-10-31 07:52:13 -04:00
a3e0b285d8 fix embiggen crash 2022-10-31 07:52:06 -04:00
3cdfedc649 hard-code strength to 0.9 during outcropping 2022-10-31 01:54:32 -04:00
531f596bd1 improve outcropping performance
- applied inpainting parameters recommended by @kyle0654
- results are aesthetically pleasing
- Closes #1319
2022-10-31 01:37:12 -04:00
8683426041 add seamless to metadata 2022-10-31 00:40:30 -04:00
631592ec99 add --seamless to 2d waterlilly example 2022-10-31 00:39:51 -04:00
4cd29420ef rerun preflight checks 2022-10-31 00:36:38 -04:00
582fee6c3a adapt outcrop.py to use new outpainting code
- unfortunately it does not look as good as the old code
  which just used plain inpainting.
2022-10-31 00:20:53 -04:00
2b39d1677c fix embiggen crash 2022-10-30 22:57:15 -04:00
47342277dd fix captionining 2022-10-30 22:40:09 -04:00
f7ce6fae9a specify which outpainted images use inpainting model 2022-10-30 22:38:50 -04:00
8566490e51 remove redundant output images 2022-10-30 22:37:19 -04:00
6151968cd3 updated preflight prompts file 2022-10-30 22:34:38 -04:00
ba4691dae8 added remainder of preflight check outputs 2022-10-30 22:28:06 -04:00
7d16af3aa7 fix input pictures 2022-10-30 18:32:59 -04:00
61ff90d1fd added files needed for preflight checks 2022-10-30 18:30:22 -04:00
303a2495c7 fix broken url fetch in preload_models.py 2022-10-30 17:43:48 -04:00
23d54ee69e fix mps crash with safety checker 2022-10-30 16:54:06 -04:00
330b417a7b installer pulls from release-candidate-2-1 2022-10-30 12:20:28 -04:00
f70af7afb9 remove debug image gen from outcrop 2022-10-30 12:19:43 -04:00
e7368d7231 preload_models interactively downloads sd model files 2022-10-30 12:19:05 -04:00
07c3c57cde folded in the 1-click installer
- The installer will pull from the branch release-candidate-2-1 for the
  purposes of testing.
- This needs to be changed to "main" before release.
2022-10-30 12:13:11 -04:00
b774c8afc3 Merge branch 'main' of https://github.com/cmdr2/InvokeAI into cmdr2-main 2022-10-30 11:10:54 -04:00
231dfe01f4 fix incorrect thresholding reporting for karras noise; close #1300 2022-10-30 10:35:55 -04:00
5319796e58 add --no-interactive to preload_models step 2022-10-30 08:26:51 -04:00
39daa5aea7 Merge branch 'integrate-models-into-test-matrix' of https://github.com/mauwii/stable-diffusion into mauwii-integrate-models-into-test-matrix 2022-10-30 01:09:29 -04:00
a7517ce0de add pointer to hugging face concepts library 2022-10-30 00:54:00 -04:00
fbfffe028f add --no-interactive mode 2022-10-30 00:33:48 -04:00
19b6c671a6 further improvements to preload_models script
- User can choose to download just recommended models, customize list to download,
  or skip downloading altogether.
- Does direct download to models directory instead of to HuggingFace cache
- Able to resume interrupted downloads
2022-10-30 00:17:05 -04:00
c2fab45a6e Prevent indexing error for mode RGB
I have not explicitly tested mode P
2022-10-29 18:20:53 -04:00
0596ebd5a9 **IMPORTANT FIX**
- pull_request_target trigger does not verify the requesters commit(s)
- is more to be used for automations like labeling, commenting, ...
  - stuff where a token with write access to the repo is necesarry
2022-10-29 23:48:25 +02:00
338efa5a7a remove debug branch 2022-10-29 22:39:37 +02:00
5d4d8f54df Merge branch 'update-workflows' into development 2022-10-29 22:34:49 +02:00
3d4a9c2deb remove redundant information from pipeline names 2022-10-29 22:25:41 +02:00
74fad5f6ed Merge branch 'development' into main 2022-10-30 00:00:26 +05:30
9c264b42c3 Make create_installers.sh executable 2022-10-29 23:41:37 +05:30
09ee1b1877 Run the installer create script inside its own directory 2022-10-29 23:41:00 +05:30
4b27d8821d Script to create the installer zips 2022-10-29 23:40:03 +05:30
c49d9c2611 Open the developer console on windows, and print some debugging info 2022-10-29 23:26:21 +05:30
4134e2e9da Refactored invoke.sh to open a dev console only if the user wants it 2022-10-29 23:22:24 +05:30
e4a212dfca prop. integrate stable-diffusion-model in matrix 2022-10-29 13:52:16 -04:00
19bb185fd9 remove '-O' from curl arguments 2022-10-29 13:52:16 -04:00
1eaa58c970 use propper bearer authentication to dwnload model
instead of --user username:token
2022-10-29 13:52:16 -04:00
4245c9e0cd fix environment-mac.yml - tested on x64 and arm64
- using conda packages where possible according to conda docs
2022-10-29 13:50:06 -04:00
2b078c0d6e Don't need break 2022-10-29 23:14:58 +05:30
0f4413da7d Merge branch 'inpainting-rebase' of https://github.com/psychedelicious/stable-diffusion into psychedelicious-inpainting-rebase 2022-10-29 13:42:00 -04:00
91b491b7e7 Don't need to create the models folder using this script 2022-10-29 23:07:48 +05:30
61e8916141 Merge branch 'development' into main 2022-10-29 23:05:45 +05:30
da5de6a240 remove some bloating caches
since free 10GB Limit is already  overused multiple times
2022-10-29 18:50:37 +02:00
fdf9b1c40c fix CLI inpainting crash 2022-10-29 11:47:06 -04:00
bc7bfed0d3 Show the next steps to the user; Allow starting the command-line or web UI 2022-10-29 21:16:40 +05:30
b532e6dd17 wording and formatting tweaks 2022-10-29 11:28:17 -04:00
b46921c22d move model installation docs into installation dir 2022-10-29 11:15:57 -04:00
13f26a99b8 documentation and usability fixes 2022-10-29 10:37:38 -04:00
3d265e28ff call invoke.py with model parameter 2022-10-29 16:21:31 +02:00
29d9ce03ab Redownload micromamba if the download failed midway; Start the script in the script's directory, not where it was run from 2022-10-29 19:47:55 +05:30
3caa95ced9 add more step-by-step documentation and links 2022-10-29 09:18:48 -04:00
94cf660848 Merge branch 'main' of github.com:cmdr2/InvokeAI 2022-10-29 18:42:18 +05:30
e1cb5b8251 Fixes: inpaint canvas not cleared when its src image is deleted 2022-10-29 23:53:47 +11:00
101fe9efa9 Adds full-app image drag and drop, also image paste 2022-10-29 23:34:21 +11:00
2e9463089d Fixes bounding box being able to escape canvas 2022-10-29 23:32:16 +11:00
8127f0691e fix os matrix 2022-10-29 10:14:24 +02:00
b55dcf5943 remove id from test prompts 2022-10-29 10:11:54 +02:00
bb5fe98e94 rename matrix-job, use macOS-12, add ids to steps 2022-10-29 10:03:03 +02:00
0290cd6814 Fixes bounding box slider & adds canvas caching on gallery actions 2022-10-29 18:32:01 +11:00
fc4d07f198 reenable preload models, move huggingface-cache...
... on top of conda env activation, since `~/.cache` also contains pip
2022-10-29 08:59:23 +02:00
e7aeaa310c run without preload_models.py
since an upcoming update makes it interactive
2022-10-29 08:39:28 +02:00
85b5fcd5e1 fix cache hit expression in download sd-model step
- also update sd-cache display name to include current model
2022-10-29 08:28:17 +02:00
e5d0c9c224 include sd-switch in artifact name 2022-10-29 08:08:15 +02:00
162e420e9c Adds socketio event for Ctrl+C cancel, style fixes 2022-10-29 16:57:05 +11:00
bfbae09a9c Merge remote-tracking branch 'upstream/development' into inpainting-rebase 2022-10-29 16:35:46 +11:00
d2e8ecbd4b fix missing matrix-parameters 2022-10-29 07:35:43 +02:00
a701e4f90b Fixes compilation error; builds new bundle 2022-10-29 16:32:21 +11:00
f22f81b4ff Refactors gallery resizing, persists width 2022-10-29 16:30:51 +11:00
63202e2467 try to run matrix with different models 2022-10-29 07:25:19 +02:00
ef68a419f1 preload_models.py script downloads the weight files
- user can select which weight files to download using huggingface cache
- user must log in to huggingface, generate an access token, and accept
  license terms the very first time this is run. After that, everything
  works automatically.
- added placeholder for docs for installing models
- also got rid of unused config files. hopefully they weren't needed
  for textual inversion, but I don't think so.
2022-10-29 01:02:45 -04:00
9fc6ee0c4c WIP: Fixes gallery resize bug 2022-10-29 14:50:04 +11:00
ea65650883 add conda pkgs cache, remove conda env cache
also directly setup correct conda env
2022-10-29 05:49:12 +02:00
5d76c57ce2 Misc fixes 2022-10-29 14:18:07 +11:00
2c250a515e Misc fixes 2022-10-29 14:17:38 +11:00
4204740cb2 Fixes failed inpainting with float bounding box 2022-10-29 14:17:18 +11:00
bd3ba596c2 fix hashFiles function 2022-10-29 04:58:10 +02:00
0a89d350d9 update conda cache to use actions/cache@v3 2022-10-29 04:54:01 +02:00
b7fcf6dc04 readd conda env cache 2022-10-29 04:49:43 +02:00
accb1779cb Fixes react dom warnings 2022-10-29 13:36:07 +11:00
387f39407a Fixes bounding box hotkey conditions 2022-10-29 13:28:53 +11:00
6a32adb7ed Fixes brush strokes not compositing correct on initial load 2022-10-29 13:12:34 +11:00
3ab3a7d37a use same environment-mac.yml as in #1289 2022-10-29 04:01:44 +02:00
da5fd10bb9 pin nomkl 2022-10-29 03:34:12 +02:00
9291fde960 Fixes responsive images (omg finally), removes app padding 2022-10-29 12:22:07 +11:00
31ef15210d pin versions corelating between arm64 and x64 2022-10-29 03:21:26 +02:00
aa01657678 very fast on m1, synced with output of main branch 2022-10-29 02:43:52 +02:00
6fb6bc6d7f Fixes #940 2022-10-29 11:10:48 +11:00
da33e038ca unpin pytorch / torchvision
also loosen verisons of scipy flask-socketio flask_cors
2022-10-29 02:06:33 +02:00
78f7094a0b set torchmetrics >=0.7.0 and use py-opencv=4.6.0 2022-10-29 01:24:38 +02:00
0b046c95ef Merge remote-tracking branch 'origin/user-image-uploads' into inpainting-rebase 2022-10-29 09:41:07 +11:00
c13d7aea56 Merge pull request #1 from blessedcoolant/user-image-uploads-styling
Styling Updates
2022-10-29 09:40:23 +11:00
f7a47c1b67 reenable caching of sd model 2022-10-28 23:56:13 +02:00
6c34b89cfb loosen pytorch and torchvision version 2022-10-28 23:51:43 +02:00
7138faf5d3 include stable-diffusion-model in job name 2022-10-28 23:51:17 +02:00
0d3a931e88 update mac environment
use conda packages where possible as mentioned in conda docs
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages
2022-10-28 23:11:07 +02:00
861e825ebf Styling Updates 2022-10-29 09:27:44 +13:00
1ca1ab594c fix matrix 2022-10-28 21:11:18 +02:00
9425389240 prop. integrate stable-diffusion-model into matrix 2022-10-28 21:07:59 +02:00
9f16ff1774 remove cache for debugging 2022-10-28 21:01:06 +02:00
2ac3c9e8fd remove -O from curl arguments 2022-10-28 20:58:18 +02:00
4a9209c5e8 add debug branch to trigger run 2022-10-28 20:42:14 +02:00
b78d718357 use propper bearer authentication to dwnload model
instead of --user username:token
2022-10-28 20:41:04 +02:00
104466f5c0 use sd-model link from matrix
this enables running tests with diffferent models
2022-10-28 13:47:45 -04:00
2ecdfca52f also update create-caches.yml
imho this could also be deleted, not sure what it is used for
2022-10-28 13:47:45 -04:00
e81df1a701 add forgotten output-file 2022-10-28 13:47:45 -04:00
61013e8eee prevent secret leakage with pull_request_target
- in this way the action is used from the base repository
- also use new secret HUGGINGFACE_TOKEN (username:token)
  - f.e. `noreply@github.com:hf_lkaugfklagwrjglaslzfgkjzzf`
- change pr prompt file to validate_pr_prompt.txt
2022-10-28 13:47:45 -04:00
48d4fccd61 add tests/validate_pr_prompt.txt 2022-10-28 13:47:45 -04:00
2859af386c Fixes places where isCancelable could get stuck on 2022-10-29 04:44:03 +11:00
8dee3387fd Merge branch 'user-image-uploads' into inpainting-rebase
Adds
- Separate user uploads gallery
- Drag and drop uploads for img2img and inpainting
- Many bugfixes, scss refactored
2022-10-29 04:40:38 +11:00
63eeac49f8 Blacklists isCancelable 2022-10-29 04:25:27 +11:00
d5fdee72d3 Builds fresh bundle 2022-10-29 04:25:27 +11:00
765092eb12 Fixes bug with gallery not closing 2022-10-29 04:25:27 +11:00
2c9747fd41 Fixes bug with infinite redux action loop 2022-10-29 04:25:27 +11:00
62898b0f8f Adds gallery auto-switch toggle; ref #1272 2022-10-29 04:25:27 +11:00
ac7ee9d0a5 Puts model switching into accordion, styling 2022-10-29 04:25:27 +11:00
0adb7d4676 Adds error handling to & improves model switching UI 2022-10-29 04:25:27 +11:00
27a7980dad Update Site Header Icons Layout 2022-10-29 04:25:27 +11:00
a5915ccd2c Adds initial model switching UI 2022-10-29 04:25:27 +11:00
d6815f61ee Fixes build error 2022-10-29 04:25:27 +11:00
d71f11f55c Fixes typo 2022-10-29 04:25:27 +11:00
ed45dca7c1 Improves bounding box hotkeys/UX 2022-10-29 04:25:27 +11:00
dd71066391 Fixes more bounding box bugs 2022-10-29 04:25:27 +11:00
6f51b2078e Improves bounding box behavior 2022-10-29 04:25:27 +11:00
d035e0e811 Fixes bounding box move ending when mouse leaves canvas 2022-10-29 04:25:27 +11:00
55a8da0f02 Adds lock bounding box 2022-10-29 04:25:27 +11:00
43de16cae4 Don't try to tile fill if image doesn't have an alpha layer 2022-10-29 04:25:27 +11:00
320cbdd62d Builds fresh bundle 2022-10-29 04:25:27 +11:00
f8dce07486 Add Space Hotkey to legend
Add space as hotkey for moving boundbox to the hotkeys modal legend.
2022-10-29 04:25:27 +11:00
37382042c1 Adding Bounding Box Reset Disables
Add disable conditions for reset buttons on bounding box width and height
2022-10-29 04:25:27 +11:00
2af8139029 Styling Updates
- Moved Inpaint Replace higher in the options panel
- Fixed inpaint replace switch getting cut off slightly by padding a bit.
2022-10-29 04:25:27 +11:00
a5c77ff926 Fully Updated Hotkeys + Categorization
Added the entire list of available hotkeys to the hotkey module and categorized them accordingly.
2022-10-29 04:25:27 +11:00
15df6c148a Fix galleryImageObjectFit now persisting 2022-10-29 04:25:27 +11:00
e6226b45de Change default of inpaintReplace to 1 2022-10-29 04:25:27 +11:00
ab1e207765 Fixes gallery closing on context menu 2022-10-29 04:25:27 +11:00
d2ed8883f7 Adds support for inpaint_replace 2022-10-29 04:25:27 +11:00
3ddf1f6c3e Removes mask lines check 2022-10-29 04:25:27 +11:00
5395707280 Adds Maintain Aspect Ratio checkbox to ImageGallery 2022-10-29 04:25:27 +11:00
710e465054 Add Inpainting Settings
- Enable and Disable Inpainting Box (with backend support)
- Enable and Disable Bounding Box Darkening
- Reset Bounding Box
2022-10-29 04:25:27 +11:00
30bd79ffa1 Adds fn to checkIsMaskEmpty, tidy 2022-10-29 04:25:27 +11:00
20c83d7568 Fixes bug with overflowing bounding box 2022-10-29 04:25:27 +11:00
67e0e97eda Increases size of bounding box handles 2022-10-29 04:25:27 +11:00
6bebc679c4 Fixes invoke button working when only eraser strokes 2022-10-29 04:25:26 +11:00
9406b95518 Fixes missing border on brush 2022-10-29 04:25:26 +11:00
8d8f93fd00 Fixes bug where bounding box could escape bounds of canvas 2022-10-29 04:25:26 +11:00
20a3875f32 Fixes edge cases with bounding box 2022-10-29 04:25:26 +11:00
8ab428e588 Adds bounding box handles 2022-10-29 04:25:26 +11:00
e5dcae5fff Merges development 2022-10-29 04:25:26 +11:00
329cd8a38b Adds inpainting image reset button 2022-10-29 04:13:15 +11:00
39f0995d78 Reverts models.yaml 2022-10-29 04:12:36 +11:00
0855ab4173 Adds user/result galleries, refactors workarea CSS 2022-10-29 03:54:46 +11:00
fe7ab6e480 fix crash in !del_model command 2022-10-28 11:20:04 -04:00
f8dd2df953 remove conda cache 2022-10-28 11:12:42 -04:00
3795bec037 remove debug branch, set fail-fast to false
to find out if only mac or ubuntu is broken
(otherwise if one fails the otherone automatically cancels)
2022-10-28 11:12:42 -04:00
35face48da adds models.user.yml to .gitignore 2022-10-28 10:43:22 -04:00
864d080502 handle all unicode characters 2022-10-28 10:39:12 -04:00
3a7b495167 Initial user uploads implementation 2022-10-28 23:15:03 +11:00
9d1594cbcc Builds fresh bundle 2022-10-28 21:10:23 +11:00
c48a1092f7 Fixes bug with gallery not closing 2022-10-28 21:03:33 +11:00
35dba1381c Fixes bug with infinite redux action loop 2022-10-28 20:50:10 +11:00
631dce3aca Adds gallery auto-switch toggle; ref #1272 2022-10-28 20:22:01 +11:00
ea6e998094 Puts model switching into accordion, styling 2022-10-28 20:04:57 +11:00
d551de6e06 Adds error handling to & improves model switching UI 2022-10-28 18:51:50 +11:00
7ce1cf6f3e Update Site Header Icons Layout 2022-10-28 19:49:50 +13:00
2e89997d29 Adds initial model switching UI 2022-10-28 16:47:15 +11:00
a7e2a7037a Fixes build error 2022-10-28 15:44:04 +11:00
75d8fc77c2 Fixes typo 2022-10-28 15:00:45 +11:00
4ea954fd66 Improves bounding box hotkeys/UX 2022-10-28 14:53:07 +11:00
8b8c1068d9 fix missleading name to Build container
since it it not pushing the  container anywhere
2022-10-27 23:14:31 -04:00
7793dbb4b4 change pull_request_target to pull_request
since no secrets are used in this action this should be totally fine.
2022-10-27 23:14:31 -04:00
77b93ad0c2 remove debug branch from action trigger 2022-10-27 23:14:31 -04:00
f99671b764 fix tag for repositorys containing uppercase 2022-10-27 23:14:31 -04:00
a8a30065a4 Fixes more bounding box bugs 2022-10-28 14:14:28 +11:00
05b8de5300 fix --hires to support inpainting model 2022-10-27 23:12:21 -04:00
387f796ebe Merge branch 'development' into development 2022-10-27 23:04:04 -04:00
27ba91e74d Improves bounding box behavior 2022-10-28 13:59:52 +11:00
3033331f65 remove unneeded warnings from attention.py 2022-10-27 22:50:06 -04:00
362b234cd1 fix long-standing issue with metadata retrieval
The Args object would crap out when trying to retrieve metadata from
an image file that did not contain InvokeAI-generated metadata, such
as a JPG. This corrects that and returns dummy values (seed of zero,
prompt of '') to avoid downstream breakage.
2022-10-27 22:43:34 -04:00
bbe53841e4 Fixes bounding box move ending when mouse leaves canvas 2022-10-28 11:50:39 +11:00
a825210bd3 Merge branch 'inpainting-rebase' of https://github.com/psychedelicious/stable-diffusion into inpainting-rebase 2022-10-27 17:49:30 -07:00
88fb2a6b46 Don't try to tile fill if image doesn't have an alpha layer 2022-10-27 17:49:26 -07:00
042d3e866f Adds lock bounding box 2022-10-28 11:37:46 +11:00
0ea711e520 Builds fresh bundle 2022-10-28 11:28:58 +11:00
ef5f9600e6 Add Space Hotkey to legend
Add space as hotkey for moving boundbox to the hotkeys modal legend.
2022-10-28 11:28:45 +11:00
acdffb1503 Adding Bounding Box Reset Disables
Add disable conditions for reset buttons on bounding box width and height
2022-10-28 11:28:39 +11:00
6679e5be69 Styling Updates
- Moved Inpaint Replace higher in the options panel
- Fixed inpaint replace switch getting cut off slightly by padding a bit.
2022-10-28 11:28:28 +11:00
89ad2e55d9 Fully Updated Hotkeys + Categorization
Added the entire list of available hotkeys to the hotkey module and categorized them accordingly.
2022-10-28 11:28:20 +11:00
f8dff5b6c2 Fix galleryImageObjectFit now persisting 2022-10-28 11:28:13 +11:00
104b0ef0ba Change default of inpaintReplace to 1 2022-10-28 11:28:03 +11:00
07cdf6e9cb Fixes gallery closing on context menu 2022-10-28 11:27:41 +11:00
4cf9c965d4 Adds support for inpaint_replace 2022-10-28 11:27:41 +11:00
4039e9e368 Removes mask lines check 2022-10-28 11:27:41 +11:00
38fd0668ba Adds Maintain Aspect Ratio checkbox to ImageGallery 2022-10-28 11:27:41 +11:00
5cae8206f9 Add Inpainting Settings
- Enable and Disable Inpainting Box (with backend support)
- Enable and Disable Bounding Box Darkening
- Reset Bounding Box
2022-10-28 11:27:41 +11:00
3ce60161d2 Adds fn to checkIsMaskEmpty, tidy 2022-10-28 11:27:41 +11:00
00b5466f0d Fixes bug with overflowing bounding box 2022-10-28 11:27:41 +11:00
6eeef7c17e Increases size of bounding box handles 2022-10-28 11:27:41 +11:00
219da47576 Fixes invoke button working when only eraser strokes 2022-10-28 11:27:41 +11:00
47106eeeea Fixes missing border on brush 2022-10-28 11:27:41 +11:00
07e21acab5 Fixes bug where bounding box could escape bounds of canvas 2022-10-28 11:27:41 +11:00
65acdfb09b Fixes edge cases with bounding box 2022-10-28 11:27:35 +11:00
9e2ce00f7b Adds bounding box handles 2022-10-28 11:27:35 +11:00
44599a239f Merges development 2022-10-28 11:27:22 +11:00
7b46d5f823 complete inpaint/outpaint documentation
- still need to write INSTALLING-MODELS.md documentation.
2022-10-27 18:43:17 -04:00
2115874587 resolve conflicts with outpainting implementation 2022-10-27 18:06:38 -04:00
cd5141f3d1 fix issues with outpaint merge 2022-10-27 18:02:08 -04:00
b815aa2130 Merge branch 'development' into outpaint 2022-10-27 17:17:34 -04:00
19a6e904ec resolved whitespace difference 2022-10-27 17:12:22 -04:00
1200fbd3bd add threshold for switchover from Karras to LDM noise schedule 2022-10-27 17:07:50 -04:00
343ae8b7af update docker docs 2022-10-27 17:06:50 -04:00
442f584afa add action to build the container
it does not push the container but verify buildability
2022-10-27 17:06:50 -04:00
55482d7ce3 add conda env for linux-aarch64
- neither environment.yml nor environment-mac.yml was working
2022-10-27 17:06:50 -04:00
0c3de595df update entrypoint
- when run without arguments it starts the web-interface
- can also be run with your own arguments
  - if u do so it does not start web unless u do
2022-10-27 17:06:50 -04:00
38ff75c7ea add script to easily run the container 2022-10-27 17:06:50 -04:00
963e0f8a53 add env.sh with variables shared in run and build 2022-10-27 17:06:50 -04:00
12f40cbbeb add build script which also creates volume
it needs a token from huggingface to be able to download the checkpoint
2022-10-27 17:06:50 -04:00
e524fb2086 add .dockerignore to repo-root
since transfering  the 2GB context would not be rly productive
2022-10-27 17:06:50 -04:00
eb7ccc356f update Dockerfile 2022-10-27 17:06:50 -04:00
4635836ebc Update IMG2IMG.md 2022-10-27 17:06:49 -04:00
d25bf7a55a cut over from karras to model noise schedule for higher steps
The k_samplers come with a "karras" noise schedule which performs
very well at low step counts but becomes noisy at higher ones.

This commit introduces a threshold (currently 30 steps) at which the
k samplers will switch over from using karras to the older model
noise schedule.
2022-10-27 17:06:49 -04:00
3539f0a1da slightly more verbose docs 2022-10-27 22:50:32 +02:00
737a7f779b tweak prompt syntax docs 2022-10-27 22:48:06 +02:00
71dcc17fa0 fix prompt syntax doc table error 2022-10-27 22:45:59 +02:00
a90ce61b1b fix broken images 2022-10-27 22:43:21 +02:00
d43167ac0b improve documentation of "attention weighting" syntax 2022-10-27 22:41:06 +02:00
245cf606a3 be more forgiving about prompts with ((words)) 2022-10-27 22:36:33 +02:00
943616044a Merge branch 'switch-ksampler-noise-scheduler-adaptively' into development
- This sets a step switchover point at which the k-samplers stop using the
  Karras noise schedule and start using the LatentDiffusion noise schedule.
  The advantage of this is that the Karras schedule produces excellent
  results at low step counts but starts to become unstable at high
  steps.

- A new command argument --karras_max, lets the user set where the
  switchover occurs. Default is 29 steps (1-29 steps Karras),
  (30 or greater LDM)

- Tildebyte, sorry to do a fast forward three-way merge for this
  but rebasing was just too painful due to extensive recent
  changes to the diffuser code.
2022-10-27 16:11:26 -04:00
943808b925 add threshold for switchover from Karras to LDM noise schedule 2022-10-27 15:50:32 -04:00
30745f163d add one more test case 2022-10-27 21:18:08 +02:00
e20108878c fix attention weight inside .swap() 2022-10-27 21:17:23 +02:00
f73d349dfe refactor hybrid and cross attention control codepaths for readability 2022-10-27 19:40:37 +02:00
dc86fc92ce fix crash parsing empty prompt "" 2022-10-27 19:01:54 +02:00
aa785c3ef1 ready for merge after documentation added 2022-10-27 11:55:00 -04:00
fb4feb380b update docker docs 2022-10-27 11:51:36 -04:00
9b15b228b8 add action to build the container
it does not push the container but verify buildability
2022-10-27 11:51:36 -04:00
99eb7e6ef2 add conda env for linux-aarch64
- neither environment.yml nor environment-mac.yml was working
2022-10-27 11:51:36 -04:00
bf50a68eb5 update entrypoint
- when run without arguments it starts the web-interface
- can also be run with your own arguments
  - if u do so it does not start web unless u do
2022-10-27 11:51:36 -04:00
67a7d46a29 add script to easily run the container 2022-10-27 11:51:36 -04:00
3e2cf8a259 add env.sh with variables shared in run and build 2022-10-27 11:51:36 -04:00
624fe4794b add build script which also creates volume
it needs a token from huggingface to be able to download the checkpoint
2022-10-27 11:51:36 -04:00
44731f8a37 add .dockerignore to repo-root
since transfering  the 2GB context would not be rly productive
2022-10-27 11:51:36 -04:00
b2a3c5cbe8 update Dockerfile 2022-10-27 11:51:36 -04:00
e9f690bf9d Update IMG2IMG.md 2022-10-27 11:16:15 -04:00
0eb07b7488 Merge branch 'outpaint' of https://github.com/Kyle0654/InvokeAI into Kyle0654-outpaint 2022-10-27 09:16:40 -04:00
16e7cbdb38 tweaks to documentation and call signature for advanced prompting 2022-10-27 08:30:09 -04:00
135c62f1a4 fix issue with hot-dog, improve () suppression 2022-10-27 07:37:48 -04:00
582e19056a Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-27 02:06:25 -04:00
52de5c8b33 documentation fix 2022-10-27 01:58:20 -04:00
799dc6d0df acceptable integration of new prompting system and inpainting
This was a difficult merge because both PR #1108 and #1243 made
changes to obscure parts of the diffusion code.

- prompt weighting, merging and cross-attention working
  - cross-attention does not work with runwayML inpainting
    model, but weighting and merging are tested and working
- CLI command parsing code rewritten in order to get embedded
  quotes right
- --hires now works with runwayML inpainting
- --embiggen does not work with runwayML and will give an error
- Added an --invert option to invert masks applied to inpainting
- Updated documentation
2022-10-27 01:51:35 -04:00
79689e87ce fix crash making embeddings from too-long prompts with attention weights 2022-10-26 22:42:17 -04:00
0d0481ce75 inpaint model progress
- working with plain prompts, weighted prompts and merge prompts
- not tested with prompt2prompt
2022-10-26 22:40:01 -04:00
869d9e22c7 documentation fix 2022-10-26 22:37:30 -04:00
3f77b68a9d fix mishandling of embedded quotes in prompt 2022-10-26 18:27:35 -04:00
2daf187bdb working with 1.4, 1.5, not with inpainting 1.5 2022-10-26 18:25:48 -04:00
e73a2d68b5 Add Library\usr\bin to the PATH 2022-10-26 15:38:08 -04:00
2dd5c0696d Repo URL constant 2022-10-26 15:38:08 -04:00
f25ad03011 header 2022-10-26 15:38:08 -04:00
c00da1702f Single-file installer script, micromamba will now be downloaded automatically on the first run; Activate the base environment before running the rest of the conda commands; Don't download conda/git again if it's already been installed by the installer 2022-10-26 15:38:08 -04:00
83f20c23aa Use the correct conda os arch for mac x64 2022-10-26 15:38:08 -04:00
0050176d57 Don't continue if micromamba was required but didn't initialize properly 2022-10-26 15:38:08 -04:00
f7bb90234d Fix line endings for mac 2022-10-26 15:38:08 -04:00
1d3c43b67f Add a pause before the script ends 2022-10-26 15:38:08 -04:00
ef505d2bc5 Update How to create the installers.md 2022-10-26 15:38:08 -04:00
a9a59a3046 Prefer the locally installed conda over any global conda installation 2022-10-26 15:38:08 -04:00
da012e1bfd Prefer the locally installed conda over any global conda installation; activate the env before updating 2022-10-26 15:38:08 -04:00
90c8aa716d Typo in bash path 2022-10-26 15:38:08 -04:00
94cd20de05 Typo in the bash script 2022-10-26 15:38:08 -04:00
14725f9d59 Initialize conda for the shell before running the activate 2022-10-26 15:38:08 -04:00
c6c146f54f Remove -y in linux script 2022-10-26 15:38:08 -04:00
90d9d6ea00 Typo in install.sh 2022-10-26 15:38:08 -04:00
1f62517636 Don't close after updating 2022-10-26 15:38:08 -04:00
29eea93592 Fix the tmp file used for checking the existence of git and conda commands 2022-10-26 15:38:08 -04:00
7179cc7f25 Remove unnecessary quotes while checking if git and conda exist 2022-10-26 15:38:08 -04:00
b12c8a28d7 Updated the installer to simplify the use of micromamba, and use conda for the actual installation; Update conda during the update script 2022-10-26 15:38:08 -04:00
8c2e82cc54 Make the linux/mac scripts executable 2022-10-26 15:38:08 -04:00
3ae094b673 Create the env using -y 2022-10-26 15:38:08 -04:00
74e6ce3e6a Check for missing python/git before activating micromamba 2022-10-26 15:38:08 -04:00
71426d200e 1-click installer using micromamba to install git and python into a contained environment (if necessary) before running the normal installation script 2022-10-26 15:38:08 -04:00
9b7159720f resolve conflicts between PR #1108 and #1243 2022-10-26 15:37:24 -04:00
e7c2b90bd1 Merge branch 'outpaint' of https://github.com/Kyle0654/InvokeAI into outpaint 2022-10-26 12:12:17 -07:00
d05373d35a Force RGB for img2img 2022-10-26 12:12:08 -07:00
bd8bb8c80b Adding outpainting implementation (as part of inpaint). 2022-10-26 12:12:08 -07:00
dac1ab0a05 Better inpainting color-correction 2022-10-26 12:12:08 -07:00
2a44411f5b Force RGB for img2img 2022-10-26 12:09:38 -07:00
2f1c1e7695 Merge branch 'fix-prompts' of https://github.com/damian0815/InvokeAI into merge-prompt-and-inpaint-model 2022-10-26 08:50:55 -04:00
2b6d78e436 minor cleanups
- remove --fnformat from canonicalized dream prompt arguments
  (not needed for image reproducibility)
- add -tm to canonicalized dream prompt arguments
  (definitely needed for image reproducibility)
2022-10-26 08:32:54 -04:00
b1da13a984 minor cleanups
- change default model back to 1.4
- remove --fnformat from canonicalized dream prompt arguments
  (not needed for image reproducibility)
- add -tm to canonicalized dream prompt arguments
  (definitely needed for image reproducibility)
2022-10-26 08:29:56 -04:00
d03947a6ee Add Library\usr\bin to the PATH 2022-10-26 16:39:21 +05:30
422f2ecc91 Repo URL constant 2022-10-26 15:38:49 +05:30
f73a116f43 header 2022-10-26 15:35:42 +05:30
8aa40714e3 Single-file installer script, micromamba will now be downloaded automatically on the first run; Activate the base environment before running the rest of the conda commands; Don't download conda/git again if it's already been installed by the installer 2022-10-26 15:30:48 +05:30
eaf6d46a7b Adding outpainting implementation (as part of inpaint). 2022-10-26 00:39:36 -07:00
906dafe3cd make variations work with inpainting model 2022-10-26 00:18:31 -04:00
d3047c7cb0 do not encode init image in starting latent 2022-10-25 22:44:42 -04:00
62412f8398 fixing aspect ratio on hires 2022-10-25 21:28:50 -05:00
f1ca789097 Better inpainting color-correction 2022-10-25 17:10:28 -07:00
4104ac6270 copied workflows from main to dev 2022-10-25 17:27:38 -04:00
8d5a225011 allow for empty prompts (useful for inpaint removal) 2022-10-25 17:26:00 -04:00
ca2f579f43 prevent crash when providing empty quoted prompt ("") 2022-10-25 15:56:07 -04:00
b1a2f4ab44 Merge branch 'inpaint-model' of github.com:invoke-ai/InvokeAI into inpaint-model 2022-10-25 14:00:18 -04:00
3c1ef48fe2 fix crash when doing img2img with ddim sampler and SD 1.5 2022-10-25 13:57:42 -04:00
c732fd0740 Merge branch 'inpaint-model' of github.com:invoke-ai/InvokeAI into inpaint-model 2022-10-25 13:21:00 -04:00
04c8937fb6 Merge branch 'inpaint-model' of github.com:invoke-ai/InvokeAI into inpaint-model 2022-10-25 13:17:20 -04:00
4352eb6628 stop crashes on non-square images 2022-10-25 13:17:06 -04:00
1ae269b8e0 Merge branch 'development' into inpaint-model 2022-10-25 11:50:08 -04:00
dd07392045 Merge branch 'inpaint-model' of github.com:invoke-ai/InvokeAI into inpaint-model 2022-10-25 11:45:24 -04:00
e33971fe2c plms works, bugs quashed
- The plms sampler now works with custom inpainting model
- Quashed bug that was causing generation on normal models to fail (oops!)
- Can now generate non-square images with custom inpainting model

Credits for advice and assistance during porting:

@any-winter-4079 (http://github.com/any-winter-4079)
@db3000 (Danny Beer http://github.com/db3000)
2022-10-25 11:44:01 -04:00
83e1c39ab8 plms works, bugs quashed
- The plms sampler now works with custom inpainting model
- Quashed bug that was causing generation on normal models to fail (oops!)
- Can now generate non-square images with custom inpainting model
2022-10-25 11:42:30 -04:00
b101be041b add support for runwayML custom inpainting model
This is still a work in progress but seems functional. It supports
inpainting, txt2img and img2img on the ddim and k* samplers (plms
still needs work, but I know what to do).

To test this, get the file `sd-v1-5-inpainting.ckpt' from
https://huggingface.co/runwayml/stable-diffusion-inpainting and place it
at `models/ldm/stable-diffusion-v1/sd-v1-5-inpainting.ckpt`

Launch invoke.py with --model inpainting-1.5 and proceed as usual.

Caveats:

1. The inpainting model takes about 800 Mb more memory than the standard
   1.5 model. This model will not work on 4 GB cards.

2. The inpainting model is temperamental. It wants you to describe the
   entire scene and not just the masked area to replace. So if you want
   to replace the parrot on a man's shoulder with a crow, the prompt
   "crow" may fail. Try "man with a crow on shoulder" instead. The
   symptom of a failed inpainting is that the area will be erased and
   replaced with background.

3. This has not been tested well. Please report bugs.
2022-10-25 10:45:15 -04:00
909740f430 Builds fresh bundle 2022-10-26 03:04:14 +13:00
aaf7a4f1d3 inpaint and txt2img working with ddim sampler 2022-10-25 10:00:28 -04:00
99d23c4d81 fix merge conflicts 2022-10-25 07:30:26 -04:00
5e8d1ca19f resolve conflicts 2022-10-25 07:17:54 -04:00
fb4dc7eaf9 Merge branch 'development' into fix-disabled-prompt 2022-10-25 07:13:57 -04:00
175c7bddfc add missing inpainting yaml file 2022-10-25 07:12:31 -04:00
71a1e0d0e1 Merge branch 'development' into vite-relative-paths 2022-10-25 07:09:14 -04:00
ce1bfbc32d nix: add shell.nix file 2022-10-25 07:08:31 -04:00
a2e53892ec fixed synax errors; now channel mismatch issue 2022-10-25 00:47:13 -04:00
7a923beb4c add missing image needed by nsfw filter 2022-10-25 00:39:00 -04:00
be8a992b85 add missing file 2022-10-25 00:38:24 -04:00
03353ce978 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-25 00:31:58 -04:00
c8f4a04196 fix clipseg install problem; close #1150 2022-10-25 00:31:43 -04:00
9bef643bf5 fix a few more metadata bugs
- facetool and upscale arguments now written into metadata
- cleaned up handling of !fetch command
2022-10-25 00:31:43 -04:00
f6b31d51e0 fix incorrect handling of single quotes in prompts 2022-10-25 00:31:43 -04:00
62e1cb48fd developer documentation fixes 2022-10-25 00:31:43 -04:00
543464182f inpainting fix per PR #1218
- This is a merge of the final version of PR #1218 "Inpainting
  Improvements"

  Various merge conflicts made it easier to commit directly.

Author: Kyle0654
Co-Author: lstein
2022-10-25 00:31:42 -04:00
83a3cc9eb4 start support for 1.5 inpainting model, not complete 2022-10-25 00:30:48 -04:00
d12ae3bab0 documentation for new prompt syntax 2022-10-24 14:58:38 +02:00
61a4897b71 re-enable tokenization logging 2022-10-24 11:49:47 +02:00
194c8e1c2e Merge branch 'development' into fix-prompts 2022-10-24 11:28:37 +02:00
44e4090909 re-enable legacy blend syntax 2022-10-24 11:16:52 +02:00
0564397ee6 cleanup logs 2022-10-24 11:16:43 +02:00
3081b6b7dd fix clipseg install problem; close #1150 2022-10-23 23:46:16 -04:00
37d38f196e fix a few more metadata bugs
- facetool and upscale arguments now written into metadata
- cleaned up handling of !fetch command
2022-10-23 23:01:32 -04:00
17aee48734 fix incorrect handling of single quotes in prompts 2022-10-23 23:01:32 -04:00
9cdd78c6cb developer documentation fixes 2022-10-23 22:56:58 -04:00
5561a95232 inpainting fix per PR #1218
- This is a merge of the final version of PR #1218 "Inpainting
  Improvements"

  Various merge conflicts made it easier to commit directly.

Author: Kyle0654
Co-Author: lstein
2022-10-23 22:52:32 -04:00
27f0f3e52b Merge branch 'inpaint-improvement' of https://github.com/Kyle0654/InvokeAI into add-safety-checker 2022-10-23 22:37:43 -04:00
b159b2fe42 add support for safety checker (NSFW filter)
Now you can activate the Hugging Face `diffusers` library safety check
for NSFW and other potentially disturbing imagery.

To turn on the safety check, pass --safety_checker at the command
line. For developers, the flag is `safety_checker=True` passed to
ldm.generate.Generate(). Once the safety checker is turned on, it
cannot be turned off unless you reinitialize a new Generate object.

When the safety checker is active, suspect images will be blurred and
a warning icon is added. There is also a warning message printed in
the CLI, but it can be a little hard to see because of its positioning
in the output stream.

There is a slight but noticeable delay when the safety checker runs.

Note that invisible watermarking is *not* currently implemented. The
watermark code distributed by the CompViz distribution uses a library
that does not seem to be able to retrieve the watermarks it creates,
and it does not appear that Hugging Face `diffusers` or other SD
distributions are doing any watermarking.
2022-10-23 22:26:18 -04:00
63902f3d34 also apply conditioing during hires fix upscale 2022-10-24 02:08:55 +02:00
1fb15d5c81 fix hires fix 2022-10-24 02:02:42 +02:00
cc2042bd4c keep the effect of _start and _end arguments consistent across k* and other samplers 2022-10-24 01:43:35 +02:00
ee4273d760 fix step count on ddim 2022-10-24 01:23:43 +02:00
2619a0b286 allow longer substitutions without quotes for cross attention swap 2022-10-24 00:22:14 +02:00
92c6a3812d catch fewer exceptions in prompt2image 2022-10-24 00:06:53 +02:00
230527b1fb Add back model description for 1.4 2022-10-23 14:08:41 -07:00
bfe36c9f8b Revert unintended model changes 2022-10-23 14:08:05 -07:00
40388b5b90 Merge branch 'development' into inpaint-improvement 2022-10-23 14:06:30 -07:00
0c34554170 Merge branch 'inpaint-improvement' of https://github.com/Kyle0654/InvokeAI into inpaint-improvement 2022-10-23 14:02:52 -07:00
b0eb864a25 move attention weighting operations to postfix 2022-10-23 23:01:53 +02:00
1264cc2d36 Switch from dilate to erode to fix inpaint edges. Default model to 1.4 instead of 1.5. 2022-10-23 14:01:06 -07:00
f7cd98c238 tweak default cross-attention values 2022-10-23 20:38:28 +02:00
8e7d744c60 fix bad math 2022-10-23 19:43:35 +02:00
9210bf7d3a also parse shape_freedom keyword 2022-10-23 19:40:00 +02:00
8f35819ddf add shape_freedom arg to .swap() 2022-10-23 19:38:31 +02:00
04d93f0445 for k* samplers, estimate step_index from sigma 2022-10-23 16:26:50 +02:00
b7ce5b4f1b Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-23 09:42:28 -04:00
7e27f189cf minor fixes to inpaint code
1. If tensors are passed to inpaint as init_image and/or init_mask, then
   the post-generation image fixup code will be skipped.

2. Post-generation image fixup will work with either a black and white "L"
   or "RGB"  mask, or an "RGBA" mask.
2022-10-23 09:33:15 -04:00
9472945299 ported code refactor changes from PR #1221
- pass a PIL.Image to img2img and inpaint rather than tensor
- To support clipseg, inpaint needs to accept an "L" or "1" format
  mask. Made the appropriate change.
2022-10-23 09:33:15 -04:00
f25c1f900f add support for loading VAE autoencoders
To add a VAE autoencoder to an existing model:

1. Download the appropriate autoencoder and put it into
   models/ldm/stable-diffusion

   Note that you MUST use a VAE that was written for the
   original CompViz Stable Diffusion codebase. For v1.4,
   that would be the file named vae-ft-mse-840000-ema-pruned.ckpt
   that you can download from https://huggingface.co/stabilityai/sd-vae-ft-mse-original

2. Edit config/models.yaml to contain the following stanza, modifying `weights`
   and `vae` as required to match the weights and vae model file names. There is
   no requirement to rename the VAE file.

~~~
stable-diffusion-1.4:
  weights: models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
  description: Stable Diffusion v1.4
  config: configs/stable-diffusion/v1-inference.yaml
  vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
  width: 512
  height: 512
~~~

3. Alternatively from within the `invoke.py` CLI, you may use the command
   `!editmodel stable-diffusion-1.4` to bring up a simple editor that will
   allow you to add the path to the VAE.

4. If you are just installing InvokeAI for the first time, you can also
   use `!import_model models/ldm/stable-diffusion/sd-v1.4.ckpt` instead
   to create the configuration from scratch.

5. That's it!
2022-10-23 09:33:15 -04:00
493eaa7389 Improve inpainting by color-correcting result and pasting init image over result using mask 2022-10-23 09:33:15 -04:00
ce6d618e3b outcropping improvements
- catch syntax errors in the outcrop coordinates
- work (after a fashion) on non-Invoke generated images
2022-10-23 09:33:00 -04:00
8254ca9492 Removed duplicate fix_func for MPS 2022-10-23 09:32:59 -04:00
7d677a63b8 cross attention control options 2022-10-23 14:58:25 +02:00
a2fb2e0d6b Merge branch 'development' into inpaint-improvement 2022-10-22 20:12:04 -07:00
93cba3fba5 Kyle0654 inpaint improvement - with refactoring from PR #1221 (#1)
* Removed duplicate fix_func for MPS

* add support for loading VAE autoencoders

To add a VAE autoencoder to an existing model:

1. Download the appropriate autoencoder and put it into
   models/ldm/stable-diffusion

   Note that you MUST use a VAE that was written for the
   original CompViz Stable Diffusion codebase. For v1.4,
   that would be the file named vae-ft-mse-840000-ema-pruned.ckpt
   that you can download from https://huggingface.co/stabilityai/sd-vae-ft-mse-original

2. Edit config/models.yaml to contain the following stanza, modifying `weights`
   and `vae` as required to match the weights and vae model file names. There is
   no requirement to rename the VAE file.

~~~
stable-diffusion-1.4:
  weights: models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
  description: Stable Diffusion v1.4
  config: configs/stable-diffusion/v1-inference.yaml
  vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
  width: 512
  height: 512
~~~

3. Alternatively from within the `invoke.py` CLI, you may use the command
   `!editmodel stable-diffusion-1.4` to bring up a simple editor that will
   allow you to add the path to the VAE.

4. If you are just installing InvokeAI for the first time, you can also
   use `!import_model models/ldm/stable-diffusion/sd-v1.4.ckpt` instead
   to create the configuration from scratch.

5. That's it!

* ported code refactor changes from PR #1221

- pass a PIL.Image to img2img and inpaint rather than tensor
- To support clipseg, inpaint needs to accept an "L" or "1" format
  mask. Made the appropriate change.

* minor fixes to inpaint code

1. If tensors are passed to inpaint as init_image and/or init_mask, then
   the post-generation image fixup code will be skipped.

2. Post-generation image fixup will work with either a black and white "L"
   or "RGB"  mask, or an "RGBA" mask.

Co-authored-by: wfng92 <43742196+wfng92@users.noreply.github.com>
2022-10-22 20:09:38 -07:00
3e48b9ff85 cut over from karras to model noise schedule for higher steps
The k_samplers come with a "karras" noise schedule which performs
very well at low step counts but becomes noisy at higher ones.

This commit introduces a threshold (currently 30 steps) at which the
k samplers will switch over from using karras to the older model
noise schedule.
2022-10-22 23:02:50 -04:00
a956bf9fda Merge branch 'development' into fix-disabled-prompt 2022-10-22 22:46:34 -04:00
9f77df70c9 minor fixes to inpaint code
1. If tensors are passed to inpaint as init_image and/or init_mask, then
   the post-generation image fixup code will be skipped.

2. Post-generation image fixup will work with either a black and white "L"
   or "RGB"  mask, or an "RGBA" mask.
2022-10-22 22:28:54 -04:00
c04133a512 ported code refactor changes from PR #1221
- pass a PIL.Image to img2img and inpaint rather than tensor
- To support clipseg, inpaint needs to accept an "L" or "1" format
  mask. Made the appropriate change.
2022-10-22 20:06:45 -04:00
59747ecf24 Merge branch 'inpaint-improvement' of https://github.com/Kyle0654/InvokeAI into Kyle0654-inpaint-improvement 2022-10-22 19:30:52 -04:00
a6e7aa8f97 Merge branch 'development' into patch-1 2022-10-22 19:28:50 -04:00
51fdbe22d2 add support for loading VAE autoencoders
To add a VAE autoencoder to an existing model:

1. Download the appropriate autoencoder and put it into
   models/ldm/stable-diffusion

   Note that you MUST use a VAE that was written for the
   original CompViz Stable Diffusion codebase. For v1.4,
   that would be the file named vae-ft-mse-840000-ema-pruned.ckpt
   that you can download from https://huggingface.co/stabilityai/sd-vae-ft-mse-original

2. Edit config/models.yaml to contain the following stanza, modifying `weights`
   and `vae` as required to match the weights and vae model file names. There is
   no requirement to rename the VAE file.

~~~
stable-diffusion-1.4:
  weights: models/ldm/stable-diffusion-v1/sd-v1-4.ckpt
  description: Stable Diffusion v1.4
  config: configs/stable-diffusion/v1-inference.yaml
  vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
  width: 512
  height: 512
~~~

3. Alternatively from within the `invoke.py` CLI, you may use the command
   `!editmodel stable-diffusion-1.4` to bring up a simple editor that will
   allow you to add the path to the VAE.

4. If you are just installing InvokeAI for the first time, you can also
   use `!import_model models/ldm/stable-diffusion/sd-v1.4.ckpt` instead
   to create the configuration from scratch.

5. That's it!
2022-10-22 19:27:46 -04:00
3b01e6e423 Improve inpainting by color-correcting result and pasting init image over result using mask 2022-10-22 14:56:33 -07:00
2e14ba8716 Let the text-to-mask .mask.png file be used as a mask
Ironically, the black and white mask file generated by the
`invoke> !mask` command could not be passed as the mask to
`img2img`. This is now fixed and the documentation updated.
2022-10-22 13:53:23 -04:00
7308022bc7 outcropping improvements
- catch syntax errors in the outcrop coordinates
- work (after a fashion) on non-Invoke generated images
2022-10-22 13:38:32 -04:00
8273c04575 wip implementing options in diffuse step 2022-10-22 12:15:34 +02:00
ee7d4d712a parsing CrossAttentionControlSubstitute options works 2022-10-22 11:27:56 +02:00
d8c1b78d83 Update CLI.md
Corrected path to script in line 11
2022-10-22 10:56:21 +02:00
554445a985 remove debug statement 2022-10-21 21:31:41 -04:00
b2bf2b08ff Merge branch 'model-switching' into development 2022-10-21 21:27:59 -04:00
e7573ac90f Removed duplicate fix_func for MPS 2022-10-22 09:03:31 +08:00
cdb664f6e5 Merge branch 'development' into fix-prompts 2022-10-21 21:34:09 +02:00
a127eeff20 Fixes gallery bugs & adds gallery context menu 2022-10-22 07:54:39 +13:00
1ca517d73b Merge branch 'fix-high-step-count' of https://github.com/holstvoogd/InvokeAI into holstvoogd-fix-high-step-count 2022-10-21 13:58:00 -04:00
38b1dce7c3 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-21 12:58:51 -04:00
c9f9eed04e resolve numerous small merge bugs
- This merges PR #882

Coauthor: ArDiouscuros
2022-10-21 12:57:15 -04:00
fbea657eff fix a number of bugs in textual inversion
- remove unsupported testtubelogger, use csvlogger instead
- fix logic for parsing --gpus option so that it won't crash if
  trailing comma absent
- change trainer accelerator from unsupported 'ddp' to 'auto'
2022-10-21 16:35:35 +02:00
55db9dba0a Merge branch 'Improved-fetch-and-option-to-replay-commands-from-file' of https://github.com/ArDiouscuros/stable-diffusion into ArDiouscuros-Improved-fetch-and-option-to-replay-commands-from-file
- various small conflicts fixed
2022-10-21 10:12:35 -04:00
64051d081c cleanup 2022-10-21 15:07:11 +02:00
ddb007af65 Merge branch 'development' into fix-high-step-count 2022-10-21 06:55:17 -04:00
e574a1574f txt2mask.py now tracking development again 2022-10-21 12:42:07 +02:00
2bf9f1f0d8 rename StrcuturedConditioning to ExtraConditioningInfo 2022-10-21 12:18:40 +02:00
8142b72bcd Merge remote-tracking branch 'upstream/development' into fix-prompts 2022-10-21 11:59:44 +02:00
dc2f30a34e put back txt2mask import 2022-10-21 11:59:42 +02:00
be7de4849c Merge branch 'development' into model-switching 2022-10-21 00:55:52 -04:00
83e6ab08aa further improvements to model loading
- code for committing config changes to models.yaml now in module
  rather than in invoke script
- model marked "default" is now loaded if model not specified on
  command line
- uncache changed models when edited, so that they reload properly
- removed liaon from models.yaml and added stable-diffusion-1.5
2022-10-21 00:28:54 -04:00
b385fdd7de non-normalized blend 2022-10-21 04:34:53 +02:00
d965540103 more blend fixes 2022-10-21 04:23:19 +02:00
404d59b1b8 fix blend 2022-10-21 04:18:17 +02:00
9980c4baf9 Merge branch 'development' into vite-relative-paths 2022-10-20 22:12:52 -04:00
4c1267338b bring in attention etc. 2022-10-21 03:54:13 +02:00
2e0b1c4c8b ok now we're cooking 2022-10-21 03:29:50 +02:00
da75876639 better support for word.swap(otherWord) without parantheses or quotes 2022-10-21 00:08:28 +02:00
d4d1014c9f fix for 'model is not defined' when loading embedding 2022-10-20 17:31:46 -04:00
213e12fe13 Filters existing images when adding new images; Fixes #1085; Builds fresh bundle 2022-10-20 16:53:48 -04:00
3e0a7b6229 Correct color channels in upscale using array slicing 2022-10-20 16:52:07 -04:00
da88097aba fix prompt handling in conditioning.py 2022-10-20 21:41:32 +02:00
3f13dd3ae8 prompt parsing is now much more robust 2022-10-20 21:05:36 +02:00
d3b0c54c14 Adds socket.io path 2022-10-20 23:03:48 +08:00
79b4afeae7 parser working with basic escapes 2022-10-20 16:56:34 +02:00
9c61aed7d0 Removes isDisabled from PromptInput; Resolves #1027 2022-10-20 22:28:07 +08:00
da223dfe81 wip re-writing parts of prompt parser 2022-10-20 15:56:46 +02:00
e035397dcf Changes vite dist asset paths to relative 2022-10-20 20:17:34 +08:00
899ba975a6 Improves logic to determine if clipseg weights should be downloaded 2022-10-20 06:56:50 -04:00
bfa65560eb Fixes torch.load() for MPS/CPU 2022-10-20 06:56:50 -04:00
ed9307f469 Fix typo 2022-10-20 06:56:50 -04:00
ff87239fb0 fix broken image in docs 2022-10-20 06:56:50 -04:00
a357bf4f19 add !mask command to view output of clipseg
- The !mask command takes an image path, a text prompt, and
  (optionally) a masking threshold. It creates a mask over the region
  indicated by the prompt, and outputs several files that show which
  regions will be masked by the chosen prompt and threshold.

- The mask images should not be passed directly to img2img because
  they are designed for visualization only. Instead, use the
  --text_mask option to pass the selected prompt and threshold.

- See docs/features/INPAINTING.md for details.
2022-10-20 06:56:50 -04:00
63f274f6df adjust environment & requirements files 2022-10-20 06:56:50 -04:00
2ca4242f5f fix clipseg loading problems
- The directory "models" in the main InvokeAI directory was conflicting
  with loading "models.clipseg". To fix this issue, I have renamed the
  models.clipseg to clipseg_models.clipseg, and applied this change to
  the 'models-rename' branch of invoke-ai's fork of clipseg.
2022-10-20 06:56:50 -04:00
c9d27634b4 bring in prompt parser from fix-prompts branch
attention is parsed but ignored, blends old syntax doesn't work,
	  conjunctions are parsed but ignored, the only part that's used
	  here is the new .blend() syntax and cross-attention control
	  using .swap()
2022-10-20 12:01:48 +02:00
027990928e Fix typo in docs: s/Formally/Formerly 2022-10-20 02:44:16 -04:00
87469a5fdd Flips channels using array slicing instead of using OpenCV 2022-10-19 23:44:47 -04:00
4101127011 Corrects color channels in face restoration; Fixes #1167 2022-10-19 23:32:57 -04:00
f6191a4f12 Builds fresh bundle 2022-10-19 20:12:19 -04:00
8c5d614c38 Increases max CFG Scale to 200 2022-10-19 20:12:19 -04:00
42883545f9 add prompt language support for cross-attention .swap 2022-10-20 01:42:04 +02:00
61357e4e6e be less verbose when assembling prompt 2022-10-19 21:12:07 +02:00
c6ae9f1176 remove unnecessary assertion 2022-10-19 21:12:07 +02:00
11d7e6b92f undo unwanted changes 2022-10-19 21:12:07 +02:00
c3b992db96 Squashed commit of the following:
commit 9bb0b5d0036c4dffbb72ce11e097fae4ab63defd
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sat Oct 15 23:43:41 2022 +0200

    undo local_files_only stuff

commit eed93f5d30c34cfccaf7497618ae9af17a5ecfbb
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sat Oct 15 23:40:37 2022 +0200

    Revert "Merge branch 'development-invoke' into fix-prompts"

    This reverts commit 7c40892a9f184f7e216f14d14feb0411c5a90e24, reversing
    changes made to e3f2dd62b0548ca6988818ef058093a4f5b022f2.

commit f06d6024e345c69e6d5a91ab5423925a68ee95a7
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 13 23:30:16 2022 +0200

    more efficiently handle multiple conditioning

commit 5efdfcbcd980ce6202ab74e7f90e7415ce7260da
Merge: b9c0dc5 ac08bb6
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 13 14:51:01 2022 +0200

    Merge branch 'optional-disable-karras-schedule' into fix-prompts

commit ac08bb6fd25e19a9d35cf6c199e66500fb604af1
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 13 14:50:43 2022 +0200

    append '*use_model_sigmas*' to prompt string to use model sigmas

commit 70d8c05a3ff329409f76204f4af94e55d468ab8b
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 13 12:12:17 2022 +0200

    make karras scheduling switchable

    commit d60df54f69 replaced the model's
    own scheduling with karras scheduling. this has changed image generation
    (seems worse now?)

    this commit wraps the change in a bool.

commit b9c0dc5f1a658a0e6c3936000e9ae559e1c7a1db
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 20:16:00 2022 +0200

    add test of more complex conjunction

commit 9ac0c15cc0d7b5f6df3289d3ad474260972a17be
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 17:18:25 2022 +0200

    improve comments

commit ad33bce60590b87b2a93e90f16dc9d3e935d04a5
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 17:04:46 2022 +0200

    put back thresholding stuff

commit 4852c698a325049834ba0d4b358f07210bc7171a
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 14:25:02 2022 +0200

    notes on improving conjunction efficiency

commit a53bb1e5b68025d09642b935ae6a9a015cfaf2d6
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 14:14:33 2022 +0200

    optional weights support for Conjunction

commit fec79ab15e4f0c84dd61cb1b45a5e6a72ae4aaeb
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 12:07:27 2022 +0200

    fix blend error and log parsing output

commit 1f751c2a039f9c97af57b18e0f019512631d5a25
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 10:33:33 2022 +0200

    fix broken euler sampler

commit 02f8148d17efe4b6bde8d29b827092a0626363ee
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 10:24:20 2022 +0200

    cleanup prompt parser

commit 8028d49ae6c16c0d6ec9c9de9c12d56c32201421
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Wed Oct 12 10:14:18 2022 +0200

    explicit conjunction, improve flattening logic

commit 8a1710892185f07eb77483f7edae0fc4d6bbb250
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 22:59:30 2022 +0200

    adapt multi-conditioning to also work with ddim

commit 53802a839850d0d1ff017c6bafe457c4bed750b0
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 22:31:42 2022 +0200

    unconditioning is also fancy-prompt-syntaxable

commit 7c40892a9f184f7e216f14d14feb0411c5a90e24
Merge: e3f2dd6 dbe0da4
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 21:39:54 2022 +0200

    Merge branch 'development-invoke' into fix-prompts

commit e3f2dd62b0548ca6988818ef058093a4f5b022f2
Merge: eef0e48 06f542e
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 21:38:09 2022 +0200

    Merge remote-tracking branch 'upstream/development' into fix-prompts

commit eef0e484c2eaa1bd4e0e0b1d3f8d7bba38478144
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 21:26:25 2022 +0200

    fix run-on paren-less attention, add some comments

commit fd29afdf0e9f5e0cdc60239e22480c36ca0aaeca
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 21:03:02 2022 +0200

    python 3.9 compatibility

commit 26f7646eef7f39bc8f7ce805e747df0f723464da
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 20:58:42 2022 +0200

    first pass connecting PromptParser to conditioning

commit ae53dff3796d7b9a5e7ed30fa1edb0374af6cd8d
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 20:51:15 2022 +0200

    update frontend dist

commit 9be4a59a2d76f49e635474b5984bfca826a5dab4
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 19:01:39 2022 +0200

    fix issues with correctness checking FlattenedPrompt

commit 3be212323eab68e72a363a654124edd9809e4cf0
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 18:43:16 2022 +0200

    parsing nested seems to work pretty ok

commit acd73eb08cf67c27cac8a22934754321256f56a9
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 18:26:17 2022 +0200

    wip introducing FlattenedPrompt class

commit 71698d5c7c2ac855b690d8ef67e8830148c59eda
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 15:59:42 2022 +0200

    recursive attention weighting seems to actually work

commit a4e1ec6b20deb7cc0cd12737bdbd266e56144709
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 15:06:24 2022 +0200

    now apparently almost supported nested attention

commit da76fd1ddf22a3888cdc08fd4fed38d8b178e524
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 11 13:23:37 2022 +0200

    wip prompt parsing

commit dbe0da4572c2ac22f26a7afd722349a5680a9e47
Author: Kyle Schouviller <kyle0654@hotmail.com>
Date:   Mon Oct 10 22:32:35 2022 -0700

    Adding node-based invocation apps

commit 8f2a2ffc083366de74d7dae471b50b6f98a7c5f8
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Mon Oct 10 19:03:18 2022 +0200

    fix merge issues

commit 73118dee2a8f4891700756e014caf1c9ca629267
Merge: fd00844 12413b0
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Mon Oct 10 12:42:48 2022 +0200

    Merge remote-tracking branch 'upstream/development' into fix-prompts

commit fd0084413541013c2cf71e006af0392719bef53d
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Mon Oct 10 12:39:38 2022 +0200

    wip prompt parsing

commit 0be9363db9307859d2b65cffc6af01f57d7873a4
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Mon Oct 10 03:20:06 2022 +0200

    better +/- attention parsing

commit 5383f691874a58ab01cda1e4fac6cf330146526a
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Mon Oct 10 02:27:47 2022 +0200

    prompt parser seems to work

commit 591d098a33ce35462428d8c169501d8ed73615ab
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 9 20:25:37 2022 +0200

    supports weighting unconditioning, cross-attention with |

commit 7a7220563aa05a2980235b5b908362f66b728309
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 9 18:15:56 2022 +0200

    i think cross attention might be working?

commit 951ed391e7126bff228c18b2db304ad28d59644a
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 9 16:04:54 2022 +0200

    weighted CFG denoiser working with a single item

commit ee532a0c2827368c9e45a6a5f3975666402873da
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Sun Oct 9 06:33:40 2022 +0200

    wip probably doesn't work or compile

commit 14654bcbd207b9ca28a6cbd37dbd967d699b062d
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 18:11:48 2022 +0200

    use tan() to calculate embedding weight for <1 attentions

commit 1a8e76b31aa5abf5150419ebf3b29d4658d07f2b
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 16:14:54 2022 +0200

    fix bad math.max reference

commit f697ff896875876ccaa1e5527405bdaa7ed27cde
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 15:55:57 2022 +0200

    respect http[s]x protocol when making socket.io middleware

commit 41d3dd4eeae8d4efb05dfb44fc6d8aac5dc468ab
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 13:29:54 2022 +0200

    fractional weighting works, by blending with prompts excluding the word

commit 087fb6dfb3e8f5e84de8c911f75faa3e3fa3553c
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 10:52:03 2022 +0200

    wip doing weights <1 by averaging with conditioning absent the lower-weighted fragment

commit 3c49e3f3ec7c18dc60f3e18ed2f7f0d97aad3a47
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Fri Oct 7 10:36:15 2022 +0200

    notate CFGDenoiser, perhaps

commit d2bcf1bb522026ebf209ad0103f6b370383e5070
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 6 05:04:47 2022 +0200

    hack blending syntax to test attention weighting more extensively

commit 94904ef2cf917f74ec23ef7a570e12ff8255b048
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 6 04:56:37 2022 +0200

    conditioning works, apparently

commit 7c6663ddd70f665fd1308b6dd74f92ca393a8df5
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Thu Oct 6 02:20:24 2022 +0200

    attention weighting, definitely works in positive direction

commit 5856d453a9b020bc1a28ff643ae1f58c12c9be73
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 4 19:02:14 2022 +0200

    wip bubbling weights down

commit a2ed14fd9b7d3cb36b6c5348018b364c76d1e892
Author: Damian at mba <damian@frey.NOSPAMco.nz>
Date:   Tue Oct 4 17:35:39 2022 +0200

    bring in changes from PC
2022-10-19 21:12:07 +02:00
1ffd4a9e06 refactored single diffusion path seems to be working for all samplers 2022-10-19 21:08:03 +02:00
147d39cb7c wip refactoring shared InvokeAI diffuser mixin to component 2022-10-19 21:08:03 +02:00
824cb201b1 pass img2img ddim/plms edited conditioning through kwargs 2022-10-19 21:08:03 +02:00
582880b314 add cross-attention support to im2img; prevent inpainting from crashing 2022-10-19 21:08:03 +02:00
2b79a716aa wip hi-res fix 2022-10-19 21:08:03 +02:00
d572af2acf fix cross-attention on k* samplers 2022-10-19 21:08:03 +02:00
54e6a68acb wip bringing cross-attention to PLMS and DDIM 2022-10-19 21:08:03 +02:00
09f62032ec cleanup and clarify comments 2022-10-19 21:08:03 +02:00
711ffd238f cleanup 2022-10-19 21:08:03 +02:00
056cb0d8a8 sliced cross-attention wrangler works 2022-10-19 21:08:03 +02:00
37a204324b go back to using InvokeAI attention 2022-10-19 21:08:03 +02:00
1fc1f8bf05 cross-attention working with placeholder {} syntax 2022-10-19 21:06:42 +02:00
8ff507b03b runs but doesn't work properly - see below for test prompt
test prompt:
"a cat sitting on a car {a dog sitting on a car}" -W 384 -H 256 -s 10 -S 12346 -A k_euler
note that substition of dog for cat is currently hard-coded (ksampler.py
	line 43-44)
2022-10-19 21:06:42 +02:00
33d6603fef cleanup initial experiments 2022-10-19 21:06:42 +02:00
b0b1993918 initial experiments 2022-10-19 21:06:42 +02:00
07a3df6001 DRAFT: Cross-Attention Control
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-10-19 21:06:42 +02:00
92d4dfaabf Merge branch 'asymmetric-tiling' of https://github.com/carson-katri/InvokeAI into carson-katri-asymmetric-tiling 2022-10-19 13:46:07 -04:00
bc626af6ca Skips normalizing prompts for web UI metadata 2022-10-19 13:38:16 -04:00
a45786ca2e Builds fresh bundle 2022-10-19 13:27:43 -04:00
2926c8299c Fixes lingering references to GFPGAN vs Facetool 2022-10-19 13:27:43 -04:00
32a5ffe436 Adds Codeformer support 2022-10-19 13:27:43 -04:00
62dd3b7d7d resolve models.clipseg vs clipseg ambiguity 2022-10-18 23:09:26 -04:00
15aa7593f6 Merge branch 'development' into asymmetric-tiling 2022-10-18 22:37:18 -04:00
9b3ac92c24 fix incorrect import of clipseg 2022-10-18 19:28:30 -04:00
66f6ef1b35 fix syntax errors in preload 2022-10-18 19:25:18 -04:00
d93cd10b0d Merge branch 'development' into asymmetric-tiling 2022-10-18 17:27:29 -04:00
a488b14373 prevent preload warning message 2022-10-18 17:09:17 -04:00
0147dd6431 update requirements to address #1149 2022-10-18 16:28:58 -04:00
90d37eac03 update requirements to address #1149 2022-10-18 16:00:59 -04:00
9d19213b8a Merge branch 'development' of github.com:lstein/stable-diffusion into asymmetric-tiling 2022-10-18 13:34:10 -04:00
71c3835f3e yarn built 2022-10-18 13:22:58 -04:00
0fbd26e9bf simpler socketio setup URL handling 2022-10-18 13:22:58 -04:00
2a78eb96d0 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-18 08:30:02 -04:00
3a1003f702 Fix typo
Taken from `main` PR #1147 
Author: eltociear
2022-10-18 08:29:26 -04:00
329a9d0b11 Merge branch 'text-masking' of github.com:invoke-ai/InvokeAI into text-masking 2022-10-18 08:28:56 -04:00
17d75f3da8 update environment/requirements for clipseg dependency 2022-10-18 08:27:49 -04:00
20551857da add clipseg support for creating inpaint masks from text
On the command line, the new option is --text_mask or -tm.
Example:

```
invoke> a baseball -I /path/to/still_life.png -tm orange
```

This will find the orange fruit in the still life painting and replace
it with an image of a baseball.
2022-10-18 08:27:48 -04:00
32122e0312 clipseg library and environment in place 2022-10-18 08:27:48 -04:00
230de023ff resolve doc conflicts during merge 2022-10-18 08:27:33 -04:00
e6fc8af249 Fix typo
Taken from `main` PR #1147 
Author: eltociear
2022-10-18 08:08:58 -04:00
febf86dedf Merge branch 'fix-gh-actions' of github.com:mauwii/stable-diffusion into fix-gh-actions 2022-10-18 13:26:03 +02:00
76ae17abac update cache steps
remove restore-keys, make keys uniuqe
2022-10-18 13:25:51 +02:00
339ff4b464 fix conda pkg cache name
also change content of hashFile-function
2022-10-18 13:25:51 +02:00
00c0e487dd move export behind the tests, upload with artifact
also switch to python between 3.9-3.10 and use conda-forge again
2022-10-18 13:25:50 +02:00
5c8dfa38be readd pip dependencie in environment-ma.yml 2022-10-18 13:25:50 +02:00
acf85c66a5 add current branch to push trigger 2022-10-18 13:25:50 +02:00
3619918954 rename step to export conda env 2022-10-18 13:25:50 +02:00
65b14683a8 unpin conda package versions in environment.yml 2022-10-18 13:25:50 +02:00
f4fc02a3da switch to default channel in environment-mac.yml 2022-10-18 13:25:50 +02:00
c334170a93 pin versions only for pip packages 2022-10-18 13:25:50 +02:00
deab6c64fc export conda env instead of only print versions 2022-10-18 13:25:50 +02:00
e1c9503951 list conda packages after activating env
also want to show how much faster it will run now with cached pkgs
2022-10-18 13:25:50 +02:00
9a21812bf5 revert changes to environment.yml
@tildebyte this would not have been pointed out without PR-Validation
2022-10-18 13:25:50 +02:00
347b5ce452 fix expression 2022-10-18 13:25:50 +02:00
b39029521b use very short validation for Pull Requests 2022-10-18 13:25:49 +02:00
97b26f3de2 remove doubled checkpoint cache 2022-10-18 13:25:49 +02:00
e19a7a990d unpin versions in environment
as asked by @tildebyte
2022-10-18 13:25:49 +02:00
3e424e1046 remove pip from dependencies 2022-10-18 13:25:49 +02:00
db20b4af9c remove pr trigger 2022-10-18 13:25:15 +02:00
44ff8f8531 squash merge update-gh-actions into fix-gh-actions
* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* remove 4gotten trigger

* Update-gh-actions (#6)

* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* use macos-latest

* try to update conda before creating mac env

* better conda update trial

* re-pin streamlit version

* re-added trigger to run workflow in current branch

* try to find out if conda mac env could be updated

* install cmake, protobuf and rust b4 conda

* add yes to conda update

* lets try anaconda3-2022.05

* try environment.yml for mac as well

* reenable conda mac env, add pip install
also fix gitignore by changing from dream to invoke

* remove
- unecesary virtualenv creation
- conda update

change != macos back to == linux

* remove cmake from brew install since pre-installed

* disable opencv-python pip requirement

* fixed commands to find latest package versions

* update requirements for mac env

* back to the roots - only install conda env
depending on runner_os with or without extra env variables

* check out macOS in azure-pipelines
since becoming kind of tired of the GitHub Runner which is broken as ...

* let's try to setup python and update conda env

* initialize conda before using it

* add trigger in azure-pipelines.yml

* And another go for update first ....

* update azure-pipelines.yml
- add caching
- add checkpoint download
- add paths to trigger
and more

* unquote checkpoint-url

* fix chekpoint-url variable

* mkdir before downloading model

* set pr trigger to main, rename anaconda cache

* unique cacheHitVariables

* try to use macos-latest instead of macos-12

* update test-invoke-conda.yml:
- remove unecesarry echo step
- use s-weigand/setup-conda@v1
- remove conda update from install deps step since updated with action

* update test-invoke-conda.yml:
- rename conda env cache from ldm to invokeai
- reorder steps:
  1. checkout sources
  2. setup python
  3. setup conda
  4. keep order after set platform variables

* change macos back to 12 since also fails with 11

* update condition in run the tests
make difference between main or not main

* fix path to cache invokeai conda env

* fix invokeai conda env cache path

* update mkdocs-flow.yml

* change conda-channel priority

* update create-caches

* update conda env also when cache was used

* os dependend conda env cache path

* use existing CONDA env pointing to conda root

* create CONDA_ROOT output from $CONDA

* use output variable to define test prompts

* use setup-python v4, get rid of PYTHON_BIN env

* add runner.os to result artifacts name

* update test-invoke-conda.yml:
- reuse macos-latest
- disable setup python 3.9
- setup conda with default python version
- create or update conda environment depending on cache success
- remove name parameter from conda update since name is set in env yml

* improve mkdocs-flow.yml

* disable cache-hugginface-torch
since preload_models.py downloads to more than one location

* update mkdocs-flow.yml with new name

* rename mkdocs action to mkdocs-material

* try to ignore error when creating conda env
maybe it would still be usable, lets see ;P

* remove bloat

* update environment-mac.yml
to match dependencies of invoke-ai/InvokeAI's main branch

* disable conda update, tweak prompt condition

* try to set some env vars for macOS to fix conda

* stop ignoring error, use env instead of outputs

* tweak `[[` connditions

* update python and pip dependencie
makes a difference of 1 sec per itteration compared to 3.9!!!
also I see no reason why using a old pip version would be beneficial

* remove unecesarry env for macOS
everything was pre-tested on my MacBook Air 2020 with M1

* update conda env in setup step

* activate conda env after installation

* update test-invoke-conda.yml
- set conda env dependent on matrix.os
- set CONDA_ENV_NAME to prevent breaking action when renaming conda env
- fix conda env activation

* fix activate conda env

* set bash -l as default shell

* use action to activate conda env

* add conda env file to env activation

* try to replace s-weigeand with conda-incubator

* remove azure-pipelines.yml
funniest part is that the macos runner is the same as the one on github!

* include environment-file in matrix
- also disable auto-activate-base and auto-update-conda
- include macos-latest and macos-12 for debugging purpose
- set miniforge-version in matrix

* fix miniforge-variant, set fail-fast to false

* add step to setup miniconda
- make default shell a matrix variable
- remove bloat

* use a mac env yml without pinned versions

* unpin nomkl, pytorch and torchvision
also removed opencv-pyhton

* cache conda pkgs dir instead of conda env

* use python 3.10, exclude macos-12 from cache

* fix expression

* prepare for PR

* fix doubled id

* reuse pinned versions in mac conda env
- updated python pip version
- unpined pytorch and torchvision
- removed opencv-python
- updated versions to most recent (tested locally)

* fix classical copy/paste error

* remove unused env from shell-block comment

* fix hashFiles function to determine restore-keys

* reenable caching `~.cache`, update create-caches

* unpin all versions in mac conda env file
this was the only way I got it working in the action, also works locally
tested on MacBook Air 2020 M1
remove environment-mac-unpinned.yml

* prepare merge by removing this branch from trigger

* include pull_request trigger for main and dev

* remove pull_request trigger
2022-10-18 13:25:15 +02:00
c974c95e2b Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-17 23:14:55 -04:00
3b2590243c ^C at invoke> cmd line exits gracefully 2022-10-17 23:14:32 -04:00
1c2bd275fe Fix img2img DDIM index out of bound
Added a [community solution](https://github.com/CompVis/stable-diffusion/issues/111#issuecomment-1229483511) to fix index out of bound when doing img2img generation with `ddim` sampler. Also, restored `steps_out` to be `ddim_timesteps + 1` since the removal was meant to fix the [1000 steps issue](https://github.com/CompVis/stable-diffusion/issues/111)
2022-10-17 22:32:15 -04:00
0cf11ce488 add option to CLI and pngwriter that allows user to set PNG compression level
- In CLI: the argument is --png_compression <0..9> (-z<0..9>)
- In API, pass `compress_level` to PngWriter.save_image_and_prompt_to_png()

Compression ranges from 0 (no compression) to 9 (maximum compression).
Default value is 6 (as specified by Pillow package).

This addresses an issue first raised in #652.
2022-10-17 22:27:47 -04:00
a8b794d7e0 update precision info 2022-10-17 22:27:27 -04:00
f868362ca8 fix prompt in README.md 2022-10-17 22:27:27 -04:00
8858f7e97c (re-) fix a lot in mkdocs 2022-10-17 22:27:27 -04:00
d6195522aa Add seamless_axes docs to CLI.md 2022-10-17 20:17:34 -04:00
3b79b935a3 Merge branch 'development' into asymmetric-tiling 2022-10-17 20:15:42 -04:00
4079333e29 Document the seamless_axes argument 2022-10-17 19:33:17 -04:00
99581dbbf7 Split seamless config into separate file 2022-10-17 19:31:20 -04:00
2db4969e18 Merge branch 'main' into fix-gh-actions 2022-10-17 23:41:36 +02:00
2ecc1abf21 fix links to point to invoke-ai.github.io 2022-10-17 17:40:31 -04:00
703bc9494a Merge remote-tracking branch 'upstream/main' into fix-gh-actions-fork 2022-10-17 21:40:16 +02:00
e5ab07091d adding license using GitHub template
Did not attempt to add additional copyright information.
2022-10-17 12:09:24 -04:00
891678b656 remove license files temporarily 2022-10-17 12:08:09 -04:00
39ea2a257c remove additional copyrights from license file
Trying to get GitHub to recognize our MIT license. Perhaps the additional copyrights are confusing it.
2022-10-17 12:07:00 -04:00
2d68eae16b Second try at getting GitHub to register license 2022-10-17 12:05:42 -04:00
d65948c423 Update gitignore to ignore codeformer weights at new location
Eventually making it slightly more flexible
2022-10-17 11:54:45 -04:00
9e599c65c5 Only output facetool parameters if enhancing faces 2022-10-17 11:49:07 -04:00
9910a0b004 Fix broken links to CLI.md
* Looks like there was a bad paste
2022-10-16 23:40:27 -04:00
ff96358cb3 Correct typo in the subtitle of the project
* “Formally” means that there is a formality such as a rule or declaration, “formerly” refers to a prior state.  The latter is almost certainly what is meant here.
2022-10-16 23:40:27 -04:00
22267475eb update environment/requirements for clipseg dependency 2022-10-16 23:34:29 -04:00
5eb0f8ffa7 add clipseg support for creating inpaint masks from text
On the command line, the new option is --text_mask or -tm.
Example:

```
invoke> a baseball -I /path/to/still_life.png -tm orange
```

This will find the orange fruit in the still life painting and replace
it with an image of a baseball.
2022-10-16 23:30:24 -04:00
e03a3fcf68 Add seamless_axes options 2022-10-16 22:45:18 -04:00
edf471f655 update cache steps
remove restore-keys, make keys uniuqe
2022-10-17 04:43:06 +02:00
5b02c8ca4a fix conda pkg cache name
also change content of hashFile-function
2022-10-17 04:02:38 +02:00
e7688c53b8 move export behind the tests, upload with artifact
also switch to python between 3.9-3.10 and use conda-forge again
2022-10-17 03:27:15 +02:00
87cada42db readd pip dependencie in environment-ma.yml 2022-10-17 02:22:19 +02:00
6fe67ee426 add current branch to push trigger 2022-10-17 02:12:46 +02:00
5fbc81885a rename step to export conda env 2022-10-17 02:08:08 +02:00
25ba5451f2 unpin conda package versions in environment.yml 2022-10-17 02:07:17 +02:00
138c9cf7a8 switch to default channel in environment-mac.yml 2022-10-17 02:05:59 +02:00
87981306a3 pin versions only for pip packages 2022-10-17 01:50:19 +02:00
f7893b3ea9 export conda env instead of only print versions 2022-10-17 01:48:22 +02:00
87395fe6fe list conda packages after activating env
also want to show how much faster it will run now with cached pkgs
2022-10-16 22:48:53 +02:00
57bff2a663 clipseg library and environment in place 2022-10-16 16:45:07 -04:00
15f876c66c revert changes to environment.yml
@tildebyte this would not have been pointed out without PR-Validation
2022-10-16 22:02:58 +02:00
522c35ac5b fix expression 2022-10-16 21:52:49 +02:00
bb2d6d640f use very short validation for Pull Requests 2022-10-16 21:50:57 +02:00
2412d8dec1 remove doubled checkpoint cache 2022-10-16 20:53:07 +02:00
2ab5a43663 unpin versions in environment
as asked by @tildebyte
2022-10-16 20:48:31 +02:00
0ec3d6c10a remove pip from dependencies 2022-10-16 20:36:33 +02:00
d208e1b0f5 Merge branch 'fix-gh-actions' of github.com:mauwii/stable-diffusion into fix-gh-actions 2022-10-16 20:35:57 +02:00
8a6ba6a212 remove pr trigger 2022-10-16 13:56:45 -04:00
b793d69ff3 squash merge update-gh-actions into fix-gh-actions
* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* remove 4gotten trigger

* Update-gh-actions (#6)

* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* use macos-latest

* try to update conda before creating mac env

* better conda update trial

* re-pin streamlit version

* re-added trigger to run workflow in current branch

* try to find out if conda mac env could be updated

* install cmake, protobuf and rust b4 conda

* add yes to conda update

* lets try anaconda3-2022.05

* try environment.yml for mac as well

* reenable conda mac env, add pip install
also fix gitignore by changing from dream to invoke

* remove
- unecesary virtualenv creation
- conda update

change != macos back to == linux

* remove cmake from brew install since pre-installed

* disable opencv-python pip requirement

* fixed commands to find latest package versions

* update requirements for mac env

* back to the roots - only install conda env
depending on runner_os with or without extra env variables

* check out macOS in azure-pipelines
since becoming kind of tired of the GitHub Runner which is broken as ...

* let's try to setup python and update conda env

* initialize conda before using it

* add trigger in azure-pipelines.yml

* And another go for update first ....

* update azure-pipelines.yml
- add caching
- add checkpoint download
- add paths to trigger
and more

* unquote checkpoint-url

* fix chekpoint-url variable

* mkdir before downloading model

* set pr trigger to main, rename anaconda cache

* unique cacheHitVariables

* try to use macos-latest instead of macos-12

* update test-invoke-conda.yml:
- remove unecesarry echo step
- use s-weigand/setup-conda@v1
- remove conda update from install deps step since updated with action

* update test-invoke-conda.yml:
- rename conda env cache from ldm to invokeai
- reorder steps:
  1. checkout sources
  2. setup python
  3. setup conda
  4. keep order after set platform variables

* change macos back to 12 since also fails with 11

* update condition in run the tests
make difference between main or not main

* fix path to cache invokeai conda env

* fix invokeai conda env cache path

* update mkdocs-flow.yml

* change conda-channel priority

* update create-caches

* update conda env also when cache was used

* os dependend conda env cache path

* use existing CONDA env pointing to conda root

* create CONDA_ROOT output from $CONDA

* use output variable to define test prompts

* use setup-python v4, get rid of PYTHON_BIN env

* add runner.os to result artifacts name

* update test-invoke-conda.yml:
- reuse macos-latest
- disable setup python 3.9
- setup conda with default python version
- create or update conda environment depending on cache success
- remove name parameter from conda update since name is set in env yml

* improve mkdocs-flow.yml

* disable cache-hugginface-torch
since preload_models.py downloads to more than one location

* update mkdocs-flow.yml with new name

* rename mkdocs action to mkdocs-material

* try to ignore error when creating conda env
maybe it would still be usable, lets see ;P

* remove bloat

* update environment-mac.yml
to match dependencies of invoke-ai/InvokeAI's main branch

* disable conda update, tweak prompt condition

* try to set some env vars for macOS to fix conda

* stop ignoring error, use env instead of outputs

* tweak `[[` connditions

* update python and pip dependencie
makes a difference of 1 sec per itteration compared to 3.9!!!
also I see no reason why using a old pip version would be beneficial

* remove unecesarry env for macOS
everything was pre-tested on my MacBook Air 2020 with M1

* update conda env in setup step

* activate conda env after installation

* update test-invoke-conda.yml
- set conda env dependent on matrix.os
- set CONDA_ENV_NAME to prevent breaking action when renaming conda env
- fix conda env activation

* fix activate conda env

* set bash -l as default shell

* use action to activate conda env

* add conda env file to env activation

* try to replace s-weigeand with conda-incubator

* remove azure-pipelines.yml
funniest part is that the macos runner is the same as the one on github!

* include environment-file in matrix
- also disable auto-activate-base and auto-update-conda
- include macos-latest and macos-12 for debugging purpose
- set miniforge-version in matrix

* fix miniforge-variant, set fail-fast to false

* add step to setup miniconda
- make default shell a matrix variable
- remove bloat

* use a mac env yml without pinned versions

* unpin nomkl, pytorch and torchvision
also removed opencv-pyhton

* cache conda pkgs dir instead of conda env

* use python 3.10, exclude macos-12 from cache

* fix expression

* prepare for PR

* fix doubled id

* reuse pinned versions in mac conda env
- updated python pip version
- unpined pytorch and torchvision
- removed opencv-python
- updated versions to most recent (tested locally)

* fix classical copy/paste error

* remove unused env from shell-block comment

* fix hashFiles function to determine restore-keys

* reenable caching `~.cache`, update create-caches

* unpin all versions in mac conda env file
this was the only way I got it working in the action, also works locally
tested on MacBook Air 2020 M1
remove environment-mac-unpinned.yml

* prepare merge by removing this branch from trigger

* include pull_request trigger for main and dev

* remove pull_request trigger
2022-10-16 13:56:45 -04:00
54f55471df remove pr trigger 2022-10-16 19:34:31 +02:00
cec7fb7dc6 squash merge update-gh-actions into fix-gh-actions
* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* remove 4gotten trigger

* Update-gh-actions (#6)

* fix mkdocs deployment

* update path to python bin

* add trigger for current branch

* change path to python_bin for mac as well

* try to use setup-python@v4 instead of setting env

* remove setup conda action

* try to use $CONDA

* remove overseen action

* change branch from master to main

* sort out if then else for faster syntax

* remove more if functions

* add updates to create-caches as well

* eliminate the rest of if functions

* try to unpin pytorch and torchvision

* restore pinned versions

* try switching from set-output to use env

* update test-invoke-conda as well

* fix env var creation

* quote variable

* add second equal to compare

* try another way to use outputs

* fix outputs

* pip install for mac before creating conda env

* fix output variable

* fix python bin path

* remove pip install for before creating conda env

* unpin streamlit version in conda mac env

* try to make git-workflows better readable

* use macos-latest

* try to update conda before creating mac env

* better conda update trial

* re-pin streamlit version

* re-added trigger to run workflow in current branch

* try to find out if conda mac env could be updated

* install cmake, protobuf and rust b4 conda

* add yes to conda update

* lets try anaconda3-2022.05

* try environment.yml for mac as well

* reenable conda mac env, add pip install
also fix gitignore by changing from dream to invoke

* remove
- unecesary virtualenv creation
- conda update

change != macos back to == linux

* remove cmake from brew install since pre-installed

* disable opencv-python pip requirement

* fixed commands to find latest package versions

* update requirements for mac env

* back to the roots - only install conda env
depending on runner_os with or without extra env variables

* check out macOS in azure-pipelines
since becoming kind of tired of the GitHub Runner which is broken as ...

* let's try to setup python and update conda env

* initialize conda before using it

* add trigger in azure-pipelines.yml

* And another go for update first ....

* update azure-pipelines.yml
- add caching
- add checkpoint download
- add paths to trigger
and more

* unquote checkpoint-url

* fix chekpoint-url variable

* mkdir before downloading model

* set pr trigger to main, rename anaconda cache

* unique cacheHitVariables

* try to use macos-latest instead of macos-12

* update test-invoke-conda.yml:
- remove unecesarry echo step
- use s-weigand/setup-conda@v1
- remove conda update from install deps step since updated with action

* update test-invoke-conda.yml:
- rename conda env cache from ldm to invokeai
- reorder steps:
  1. checkout sources
  2. setup python
  3. setup conda
  4. keep order after set platform variables

* change macos back to 12 since also fails with 11

* update condition in run the tests
make difference between main or not main

* fix path to cache invokeai conda env

* fix invokeai conda env cache path

* update mkdocs-flow.yml

* change conda-channel priority

* update create-caches

* update conda env also when cache was used

* os dependend conda env cache path

* use existing CONDA env pointing to conda root

* create CONDA_ROOT output from $CONDA

* use output variable to define test prompts

* use setup-python v4, get rid of PYTHON_BIN env

* add runner.os to result artifacts name

* update test-invoke-conda.yml:
- reuse macos-latest
- disable setup python 3.9
- setup conda with default python version
- create or update conda environment depending on cache success
- remove name parameter from conda update since name is set in env yml

* improve mkdocs-flow.yml

* disable cache-hugginface-torch
since preload_models.py downloads to more than one location

* update mkdocs-flow.yml with new name

* rename mkdocs action to mkdocs-material

* try to ignore error when creating conda env
maybe it would still be usable, lets see ;P

* remove bloat

* update environment-mac.yml
to match dependencies of invoke-ai/InvokeAI's main branch

* disable conda update, tweak prompt condition

* try to set some env vars for macOS to fix conda

* stop ignoring error, use env instead of outputs

* tweak `[[` connditions

* update python and pip dependencie
makes a difference of 1 sec per itteration compared to 3.9!!!
also I see no reason why using a old pip version would be beneficial

* remove unecesarry env for macOS
everything was pre-tested on my MacBook Air 2020 with M1

* update conda env in setup step

* activate conda env after installation

* update test-invoke-conda.yml
- set conda env dependent on matrix.os
- set CONDA_ENV_NAME to prevent breaking action when renaming conda env
- fix conda env activation

* fix activate conda env

* set bash -l as default shell

* use action to activate conda env

* add conda env file to env activation

* try to replace s-weigeand with conda-incubator

* remove azure-pipelines.yml
funniest part is that the macos runner is the same as the one on github!

* include environment-file in matrix
- also disable auto-activate-base and auto-update-conda
- include macos-latest and macos-12 for debugging purpose
- set miniforge-version in matrix

* fix miniforge-variant, set fail-fast to false

* add step to setup miniconda
- make default shell a matrix variable
- remove bloat

* use a mac env yml without pinned versions

* unpin nomkl, pytorch and torchvision
also removed opencv-pyhton

* cache conda pkgs dir instead of conda env

* use python 3.10, exclude macos-12 from cache

* fix expression

* prepare for PR

* fix doubled id

* reuse pinned versions in mac conda env
- updated python pip version
- unpined pytorch and torchvision
- removed opencv-python
- updated versions to most recent (tested locally)

* fix classical copy/paste error

* remove unused env from shell-block comment

* fix hashFiles function to determine restore-keys

* reenable caching `~.cache`, update create-caches

* unpin all versions in mac conda env file
this was the only way I got it working in the action, also works locally
tested on MacBook Air 2020 M1
remove environment-mac-unpinned.yml

* prepare merge by removing this branch from trigger

* include pull_request trigger for main and dev

* remove pull_request trigger
2022-10-16 19:19:49 +02:00
b0b82efffe restore inline images
<div> around the inline images works great in gh-pages, but breaks plain old markdown in GitHub code display. This removes the <div>s, causing slight degradation in quality of gh-page appearance.
2022-10-16 12:07:21 -04:00
e599604294 restore inline images
<div> seems to be messing with the ability of the plain-old markdown processor to display inline images. Slightly degrades appearance of gh-pages.
2022-10-16 12:05:33 -04:00
528a183d42 add option to CLI and pngwriter that allows user to set PNG compression level
- In CLI: the argument is --png_compression <0..9> (-z<0..9>)
- In API, pass `compress_level` to PngWriter.save_image_and_prompt_to_png()

Compression ranges from 0 (no compression) to 9 (maximum compression).
Default value is 6 (as specified by Pillow package).

This addresses an issue first raised in #652.
2022-10-16 11:53:15 -04:00
b953f82346 Merge branch 'development' into fix-doc-typos 2022-10-16 11:28:59 -04:00
57a3ea9d7b Update 'ldm' env to 'invokeai' in troubleshooting steps 2022-10-16 11:23:00 -04:00
ef2058824a add a strength value to inpaint_replace
- --inpaint_replace 0.X will cause inpainting to ignore what is under
  the masked region with a strength ranging from 0 (don't ignore at all)
  to 1.0 (ignore completely)
- sync with upstream development
- update docs
2022-10-16 10:06:47 -04:00
6f93dc7712 cleanup inpainting and img2img
- add a `--inpaint_replace` option that fills masked regions with
  latent noise. This allows radical changes to inpainted regions
  at the cost of losing context.
- fix up readline, arg processing and metadata writing to accommodate
  this change
- fixed bug in storage and retrieval of variations, discovered incidentally
  during testing
- update documentation
2022-10-16 08:50:55 -04:00
a6e28d2eb7 Fixed documentation typos and resolved merge conflicts in the documentation. 2022-10-16 17:55:57 +05:30
a3a50bb886 Update generate.py
Fixed spelling mistake (open source king)
2022-10-15 16:02:14 -04:00
a705a5a0aa enhance support for model switching and editing
- Error checks for invalid model
- Add !del_model command to invoke.py
- Add del_model() method to model_cache
- Autocompleter kept in sync with model addition/subtraction.
2022-10-15 15:46:29 -04:00
f6bc13736a Fix Typo, committed changing ldm environment to invokeai 2022-10-15 08:48:18 -04:00
194d4c75b3 Update license again
Added back copyright statements from latent diffusion and stable diffusion repos.
2022-10-14 16:40:35 -04:00
bc9c60ae71 Modifiy MIT License using GitHub's template
The license has been there all along, but didn't use GitHub's template and wasn't being picked up automatically
2022-10-14 16:37:18 -04:00
0a7005f2bc update changelogs 2022-10-14 16:25:47 -04:00
c4fb8e304b fix noisy images at high step counts
At step counts greater than ~75, the ksamplers start producing noisy
images when using the Karras noise schedule. This PR reverts to using
the model's own noise schedule, which eliminates the problem at the
cost of slowing convergence at lower step counts.

This PR also introduces a new CLI `--save_intermediates <n>' argument,
which will save every nth intermediate image into a subdirectory
named `intermediates/<image_prefix>'.

Addresses issue #1083.
2022-10-14 16:19:45 -04:00
fe2a2cfc8b Merge branch 'development' into model-switching 2022-10-14 13:18:59 -04:00
32dab7d4bf close #1094, dangling gfpgan_strength reference 2022-10-14 07:45:10 -04:00
1ea541baa6 Reword deprecation warning for dream.py
- this plus previous commit closes #1087
2022-10-14 07:33:10 -04:00
82b7c118c4 Forward dream.py to invoke.py using the same interpreter, add deprecation warning 2022-10-14 07:31:35 -04:00
1c501333e8 minor doc fixes 2022-10-14 07:30:26 -04:00
9a3c7800a7 Use the correct conda os arch for mac x64 2022-10-14 10:23:55 +05:30
11dc3ca1f8 Don't continue if micromamba was required but didn't initialize properly 2022-10-14 10:13:41 +05:30
ce5e57d828 Generalize facetool strength argument 2022-10-14 00:03:06 -04:00
e98fe9c22d fix noisy images at high step counts
At step counts greater than ~75, the ksamplers start producing noisy
images when using the Karras noise schedule. This PR reverts to using
the model's own noise schedule, which eliminates the problem at the
cost of slowing convergence at lower step counts.

This PR also introduces a new CLI `--save_intermediates <n>' argument,
which will save every nth intermediate image into a subdirectory
named `intermediates/<image_prefix>'.

Addresses issue #1083.
2022-10-14 00:01:59 -04:00
6afc0f9b38 add ability to import and edit alternative models online
- !import_model <path/to/model/weights> will import a new model,
  prompt the user for its name and description, write it to the
  models.yaml file, and load it.

- !edit_model <model_name> will bring up a previously-defined model
  and prompt the user to edit its descriptive fields.

Example of !import_model

<pre>
invoke> <b>!import_model models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt</b>
>> Model import in process. Please enter the values needed to configure this model:

Name for this model: <b>waifu-diffusion</b>
Description of this model: <b>Waifu Diffusion v1.3</b>
Configuration file for this model: <b>configs/stable-diffusion/v1-inference.yaml</b>
Default image width: <b>512</b>
Default image height: <b>512</b>
>> New configuration:
waifu-diffusion:
  config: configs/stable-diffusion/v1-inference.yaml
  description: Waifu Diffusion v1.3
  height: 512
  weights: models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
  width: 512
OK to import [n]? <b>y</b>
>> Caching model stable-diffusion-1.4 in system RAM
>> Loading waifu-diffusion from models/ldm/stable-diffusion-v1/model-epoch08-float16.ckpt
   | LatentDiffusion: Running in eps-prediction mode
   | DiffusionWrapper has 859.52 M params.
   | Making attention of type 'vanilla' with 512 in_channels
   | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
   | Making attention of type 'vanilla' with 512 in_channels
   | Using faster float16 precision
</pre>

Example of !edit_model

<pre>
invoke> <b>!edit_model waifu-diffusion</b>
>> Editing model waifu-diffusion from configuration file ./configs/models.yaml
description: <b>Waifu diffusion v1.4beta</b>
weights: models/ldm/stable-diffusion-v1/<b>model-epoch10-float16.ckpt</b>
config: configs/stable-diffusion/v1-inference.yaml
width: 512
height: 512

>> New configuration:
waifu-diffusion:
  config: configs/stable-diffusion/v1-inference.yaml
  description: Waifu diffusion v1.4beta
  weights: models/ldm/stable-diffusion-v1/model-epoch10-float16.ckpt
  height: 512
  width: 512

OK to import [n]? y
>> Caching model stable-diffusion-1.4 in system RAM
>> Loading waifu-diffusion from models/ldm/stable-diffusion-v1/model-epoch10-float16.ckpt
...
</pre>
2022-10-13 23:48:07 -04:00
065a1da9d1 Fix line endings for mac 2022-10-14 08:56:27 +05:30
916f5bfbb2 gracefully recover from failed model load 2022-10-13 12:27:04 -04:00
7f491fd2d2 Reword deprecation warning for dream.py 2022-10-13 12:12:05 -04:00
203a6d8a00 Forward dream.py to invoke.py using the same interpreter, add deprecation warning 2022-10-13 12:12:05 -04:00
cac3f5fc61 fix for "1 leaked semaphore objects to clean up at shutdown" on M1
Implements fix by @Any-Winter-4079 referenced in https://github.com/invoke-ai/InvokeAI/issues/1016#issuecomment-1276825640
2022-10-13 13:33:59 +02:00
7e33560010 Hires Addition
Updated ImageMetaDataViewer with correct values
Updated tooltip text
Add arguments for Hires & Seamless Metadata
2022-10-13 23:57:24 +13:00
759f563b6d Add a pause before the script ends 2022-10-13 15:20:29 +05:30
8c47638eec Update How to create the installers.md 2022-10-13 11:25:02 +05:30
8233098136 Merge pull request #1 from invoke-ai/main
Merge upstream
2022-10-13 11:07:44 +05:30
1cb365fff1 Prefer the locally installed conda over any global conda installation 2022-10-13 11:01:09 +05:30
e405385e0d Prefer the locally installed conda over any global conda installation; activate the env before updating 2022-10-13 10:56:04 +05:30
15c5d6a5ef Typo in bash path 2022-10-13 10:24:44 +05:30
132e2b3ae5 Typo in the bash script 2022-10-13 10:00:53 +05:30
c16b7f090e Initialize conda for the shell before running the activate 2022-10-13 09:57:14 +05:30
057fc95aa3 Print out the device type which is used
Print out the device type which is used for generating images.
2022-10-12 20:36:43 -04:00
94bad8555a Add myself in CODEOWNERS for various "legacy" parts 2022-10-12 20:35:56 -04:00
6c0dd9b5ef Add back old dream.py as legacy_api.py
This commit "reverts" the new API changes by extracting the old
functionality into new files.

The work is based on the commit `803a51d5adca7e6e28491fc414fd3937bee7cb79`

PngWriter regained PromptFormatter as old server used that.

`server_legacy.py` is the old server that `dream.py` used.

Finally `legacy_api.py` is what `dream.py` used to be at the mentioned
commit.

One manually run test has been added in order to be able to test
compatibility with the old API, currently just testing that the API
endpoint works the same way + the image hash is the same as it used to
be before.
2022-10-12 20:35:56 -04:00
1c102c71fc final fixups to memory_cache
- fixed backwards calculation of minimum available memory
- only execute m.padding adjustment code once upon load
2022-10-12 15:56:06 -04:00
75f23793df Remove -y in linux script 2022-10-12 23:01:08 +05:30
9dcfa8de25 Typo in install.sh 2022-10-12 22:56:28 +05:30
3d6650e59b Don't close after updating 2022-10-12 22:44:11 +05:30
7d201d7be0 Fix the tmp file used for checking the existence of git and conda commands 2022-10-12 22:27:22 +05:30
cafaef11f7 Remove unnecessary quotes while checking if git and conda exist 2022-10-12 22:20:06 +05:30
1e201132ed Merge branch 'main' of github.com:cmdr2/InvokeAI 2022-10-12 22:15:49 +05:30
8604fd2727 Updated the installer to simplify the use of micromamba, and use conda for the actual installation; Update conda during the update script 2022-10-12 22:15:38 +05:30
aa6aa68753 proposed fix to work on mps systems 2022-10-12 11:08:27 -04:00
86b7b07c24 Make the linux/mac scripts executable 2022-10-12 16:58:19 +05:30
af56aee5c6 Create the env using -y 2022-10-12 16:56:40 +05:30
1ec92dd5f3 Check for missing python/git before activating micromamba 2022-10-12 16:53:07 +05:30
1c946561d3 1-click installer using micromamba to install git and python into a contained environment (if necessary) before running the normal installation script 2022-10-12 16:38:06 +05:30
b537e92789 move tokenizer into cpu cache as well 2022-10-12 03:03:29 -04:00
7c06849c4d Merge branch 'model-switching' of github.com:invoke-ai/InvokeAI into model-switching 2022-10-12 02:39:57 -04:00
488334710b enable fast switching between models in invoke.py
- This PR enables two new commands in the invoke.py script

 !models         -- list the available models and their cache status
 !switch <model> -- switch to the indicated model

Example:

 invoke> !models
   laion400m            not loaded  Latent Diffusion LAION400M model
   stable-diffusion-1.4     active  Stable Diffusion inference model version 1.4
   waifu-1.3                cached  Waifu anime model version 1.3
 invoke> !switch waifu-1.3
   >> Caching model stable-diffusion-1.4 in system RAM
   >> Retrieving model waifu-1.3 from system RAM cache

The name and descriptions of the models are taken from
`config/models.yaml`. A future enhancement to `model_cache.py` will be
to enable new model stanzas to be added to the file
programmatically. This will be useful for the WebGUI.

More details:

- Use fast switching algorithm described in PR #948
- Models are selected using their configuration stanza name
  given in models.yaml.
- To avoid filling up CPU RAM with cached models, this PR
  implements an LRU cache that monitors available CPU RAM.
- The caching code allows the minimum value of available RAM
  to be adjusted, but invoke.py does not currently have a
  command-line argument that allows you to set it. The
  minimum free RAM is arbitrarily set to 2 GB.
- Add optional description field to configs/models.yaml

Unrelated fixes:
- Added ">>" to CompViz model loading messages in order to make user experience
  more consistent.
- When generating an image greater than defaults, will only warn about possible
  VRAM filling the first time.
- Fixed bug that was causing help message to be printed twice. This involved
  moving the import line for the web backend into the section where it is
  called.

Coauthored by: @ArDiouscuros
2022-10-12 02:37:42 -04:00
19341e95a6 enable fast switching between models in invoke.py
- This PR enables two new commands in the invoke.py script

 !models         -- list the available models and their cache status
 !switch <model> -- switch to the indicated model

Example:

 invoke> !models
   laion400m            not loaded  Latent Diffusion LAION400M model
   stable-diffusion-1.4     active  Stable Diffusion inference model version 1.4
   waifu-1.3                cached  Waifu anime model version 1.3
 invoke> !switch waifu-1.3
   >> Caching model stable-diffusion-1.4 in system RAM
   >> Retrieving model waifu-1.3 from system RAM cache

More details:

- Use fast switching algorithm described in PR #948
- Models are selected using their configuration stanza name
  given in models.yaml.
- To avoid filling up CPU RAM with cached models, this PR
  implements an LRU cache that monitors available CPU RAM.
- The caching code allows the minimum value of available RAM
  to be adjusted, but invoke.py does not currently have a
  command-line argument that allows you to set it. The
  minimum free RAM is arbitrarily set to 2 GB.
- Add optional description field to configs/models.yaml

Unrelated fixes:
- Added ">>" to CompViz model loading messages in order to make user experience
  more consistent.
- When generating an image greater than defaults, will only warn about possible
  VRAM filling the first time.
- Fixed bug that was causing help message to be printed twice. This involved
  moving the import line for the web backend into the section where it is
  called.
2022-10-12 02:19:12 -04:00
c82e94811b Update Stable_Diffusion_AI_Notebook.ipynb 2022-10-11 21:42:31 -04:00
c15a902e8d Update Stable_Diffusion_AI_Notebook.ipynb
Making Stable_Diffusion_AI_Notebook.ipynb work smoothly on Google Colab
2022-10-11 21:42:31 -04:00
ca6385e6fa fix TEXTUAL_INVERSION.md emoji 2022-10-11 21:41:52 -04:00
828ec1fb5c fix emoji im PROMPTS.md 2022-10-11 21:41:52 -04:00
1c687d6d03 more updates to many docs, including:
- better readability in dark mode since color change
- better looking changelog
- fix images which where not loading
- also center most of the images
- fix some syntax errors like
  - headlines ending with a colon
  - codeblocks with wrong fences
  - codeblocks without shell
- update conda prompts from ldm to invokeai
- ....
2022-10-11 21:41:52 -04:00
b9e910b5f4 add mostly functional model caching module 2022-10-11 17:24:10 -04:00
101cac6a21 reintroduce fix for m1 from PR#579 missing after merge
Make results reproducible (so runs with the same seed produce the same result).
Implements fix by @wbowling referenced in https://github.com/invoke-ai/InvokeAI/issues/397#issuecomment-1240679294
2022-10-11 23:00:20 +02:00
8ea07f3bb0 reintroduce fix for m1 from PR#579 missing after merge
Make results reproducible (so runs with the same seed produce the same result).
Implements fix by @wbowling referenced in https://github.com/invoke-ai/InvokeAI/issues/397#issuecomment-1240679294
2022-10-11 21:50:59 +02:00
79e79b78aa mkdocs fixes, PR #1032
Squashed commit of the following:

commit 2c1e0168bb03a2cd625f2d4aca40eee0fdf7e4af
Merge: 2325c6c 31f2733
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Oct 11 08:33:18 2022 -0400

    Merge branch 'mkdocs-fixes' of https://github.com/mauwii/stable-diffusion into mauwii-mkdocs-fixes

commit 31f2733e89
Merge: d9d6d3a a61a690
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Oct 11 08:05:52 2022 -0400

    Merge branch 'main' into mkdocs-fixes

commit d9d6d3af3f
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 08:13:04 2022 +0200

    some more minor, overseen fixes to IMG2IMG

commit 4ab5a2aeba
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 07:49:11 2022 +0200

    add 4gotten alt-text to images

commit f778bd9c0f
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 07:18:11 2022 +0200

    update OTHER.md
    - fix codeblocks, add admonitions, embed graphic

commit a19f148a8e
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 06:51:29 2022 +0200

    update IMG2IMG.md

commit c1f1dfa714
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 06:10:25 2022 +0200

    update EMBIGGEN.md
    - fix codeblocks
    - fix toc
    - use admonitions

commit 791e6c63ef
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 05:58:53 2022 +0200

    better admonitions for CLI.md

commit e078025f00
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 05:50:32 2022 +0200

    huge update to CLI.md
    way too many updates to list them all, including:
    - render keys for keyboard-shortcuts
    - quote commands and "unhide" parameter-values (like `<int>`, `<string>`
    - fix codeblocks
    - quote commands
    - quote filenames
    - use admonitions
    - ....

commit bd98dd2307
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 04:49:57 2022 +0200

    fix INPAINTING.md
    - fix numbered List
    - replace text key combos with actual rendered keyboard keys

commit 5392000335
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 04:30:11 2022 +0200

    fix nubered list and codeblocks in INSTALL_WINDOWS

commit ffe9276f1e
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 04:12:56 2022 +0200

    fix numbered list in INSTALL_LINUX.md
    also fix blank lines, codeblocks and admonition

commit 2c6a6a567f
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 03:51:03 2022 +0200

    upgrade INSTALL_MAC.md:
    - use annotations and content-tabs

    yes, this looks ugly in repo afterwards, but plz also look at mkdocs:
    https://mauwii.github.io/stable-diffusion/installation/INSTALL_MAC/

commit 8f6c544480
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 01:43:11 2022 +0200

    comment out PR part in mkdocs-flow.yml

commit b52c14a67f
Merge: 97ebe58 a1b0b91
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 01:17:28 2022 +0200

    Merge branch 'mkdocs-fixes' of github.com:mauwii/stable-diffusion into mkdocs-fixes

commit a1b0b91bb3
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:59:44 2022 +0200

    fix conda env in codeblock

commit 5f9f9a266e
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:43:46 2022 +0200

    fix 4gotten title in TEXTUAL_INVERSION

commit 8f025b034e
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:41:52 2022 +0200

    quote repo_url and repo_name
    otherwise the version/stars/forks did not appear

commit 3a52b7deb3
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:39:54 2022 +0200

    fix TEXTUAL_INVERSION headline to fit the others

commit 389b21f966
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:35:48 2022 +0200

    fix SAMPLER_CONVERGENCE and add emoji

commit f26fc79a18
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:32:04 2022 +0200

    fix INSTALL_DOCKER.md:
    - fix title (Docker instead of "Before you begin")
    - add headline with Emoji
    - fix headlines to render toc correct

commit cbc3520489
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:24:58 2022 +0200

    add headline with emoji to INSTALL_MAC.md

commit 25f0614d66
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:21:01 2022 +0200

    add log emoji to docs/CHANGELOG.md

commit 42005688fa
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:20:47 2022 +0200

    use better fitting Icon for new Name

commit 0c65bad7f5
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:09:07 2022 +0200

    add Headline with Emoji to WEB and POSTPROCESS

commit 1c1cf2692e
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:56:16 2022 +0200

    update index.md:
    - remove unused template reference
    - make headline rendered bold and underlined, add (kind of) subtitle
    - update discord badge and link
    - update Quick links to look like in GH-Readme
      - also remove self reference to docs
    - add screenshot as in GH-Readme
    - add note pointing to issues tab
    - update path in command line to reflect new Repo Name

commit 0e29b0737e
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:23:10 2022 +0200

    chng site_name to `Stable Diffusion Toolkit Docs`

commit ad8a60d992
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:00:02 2022 +0200

    fix repo_url in mkdocs.yml

commit 234569d6b6
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:54:39 2022 +0200

    fix link to upscaling in WEB.md and TOC
    - TOC fixed by adding `#` to every headline after `## Parting remarks`
    - add missing blank lines

commit 97c84ad824
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:25:32 2022 +0200

    fix broken links in docs/CHANGELOG.md

commit bce62b3a32
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:15:37 2022 +0200

    add title to CHANGELOG.md to render TOC wo. `**`
    alternatively remove `**` around headline

commit 97ebe58b5b
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:59:44 2022 +0200

    fix conda env in codeblock

commit 87ac217e43
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:43:46 2022 +0200

    fix 4gotten title in TEXTUAL_INVERSION

commit 91439e8a52
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:41:52 2022 +0200

    quote repo_url and repo_name
    otherwise the version/stars/forks did not appear

commit 8a632a9e8f
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:39:54 2022 +0200

    fix TEXTUAL_INVERSION headline to fit the others

commit 7c8ffe2feb
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:35:48 2022 +0200

    fix SAMPLER_CONVERGENCE and add emoji

commit e2e86d2d11
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:32:04 2022 +0200

    fix INSTALL_DOCKER.md:
    - fix title (Docker instead of "Before you begin")
    - add headline with Emoji
    - fix headlines to render toc correct

commit 8b54c083fe
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:24:58 2022 +0200

    add headline with emoji to INSTALL_MAC.md

commit 8d8a032434
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:21:01 2022 +0200

    add log emoji to docs/CHANGELOG.md

commit 76519f6fa4
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:20:47 2022 +0200

    use better fitting Icon for new Name

commit aff0725533
Author: mauwii <Mauwii@outlook.de>
Date:   Tue Oct 11 00:09:07 2022 +0200

    add Headline with Emoji to WEB and POSTPROCESS

commit 0f7898cbdd
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:56:16 2022 +0200

    update index.md:
    - remove unused template reference
    - make headline rendered bold and underlined, add (kind of) subtitle
    - update discord badge and link
    - update Quick links to look like in GH-Readme
      - also remove self reference to docs
    - add screenshot as in GH-Readme
    - add note pointing to issues tab
    - update path in command line to reflect new Repo Name

commit f4c04eadf8
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:23:10 2022 +0200

    chng site_name to `Stable Diffusion Toolkit Docs`

commit 6e624827c0
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 23:00:02 2022 +0200

    fix repo_url in mkdocs.yml

commit 158848dd7e
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:54:39 2022 +0200

    fix link to upscaling in WEB.md and TOC
    - TOC fixed by adding `#` to every headline after `## Parting remarks`
    - add missing blank lines

commit 533736e135
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:29:46 2022 +0200

    fix link to truncation_comparison.jpg in OTHER.md

commit dd335142df
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:25:32 2022 +0200

    fix broken links in docs/CHANGELOG.md

commit 374dd54f30
Author: mauwii <Mauwii@outlook.de>
Date:   Mon Oct 10 22:15:37 2022 +0200

    add title to CHANGELOG.md to render TOC wo. `**`
    alternatively remove `**` around headline
2022-10-11 08:36:00 -04:00
2325c6cd40 Update index.md
Bump up disk requirements to 12 GB.
2022-10-11 08:17:37 -04:00
3ec33414ec Update README.md
Bump up disk storage requirements to 12 GB.
2022-10-11 08:16:36 -04:00
hj
a61a690f6c Fix the url 2022-10-11 08:03:19 -04:00
06f542ed7a Update .gitignore 2022-10-11 16:28:48 +13:00
8954171eea add steps for updating environment
Closes #1017
2022-10-10 18:16:08 -04:00
e0e69ad279 Fix broken path in CodeFormer instructions
Closes #1023
2022-10-10 18:07:20 -04:00
e3e8024e15 Update OTHER.md
Fix up reference to perlin demo image.
2022-10-10 18:04:14 -04:00
c4cf888532 Update IMG2IMG.md
Fix merge messages inadvertently left in file.
2022-10-10 17:56:28 -04:00
9eff9e5752 update mac instructions to use invokeai for env name 2022-10-10 17:45:18 -04:00
84c1825abc fixed old reference to ldm on activate env 2022-10-10 17:44:30 -04:00
0621dd7ed4 Fix two broken links in README
Trivial change, two links went to `.m` rather than `.md`.
2022-10-10 17:43:58 -04:00
67ddba9cff add discussion of samplers to VARIATIONS.md doc 2022-10-10 14:15:08 -04:00
cbf5426d27 fix(venv): rename 'ldm' -> 'invokeai' 2022-10-10 13:04:03 -04:00
bac60ca21e Update index.md
-add Discord link
2022-10-10 12:38:31 -04:00
8e0d671488 Update README.md 2022-10-10 12:36:50 -04:00
ee6deef14c Update README.md 2022-10-10 12:33:00 -04:00
5d8c048d0d Update README.md
Add quick links to documentation, bug reports and discussion.
2022-10-10 11:33:45 -04:00
f8fd6e39a3 add quicklinks to README 2022-10-10 11:28:53 -04:00
dafca16c8b Merge branch 'main' of github.com:invoke-ai/InvokeAI into main 2022-10-10 11:23:49 -04:00
3449c05bf4 fix embedded images 2022-10-10 11:23:43 -04:00
5c3fad22fd Update mkdocs.yml
Changed owner and repo name
2022-10-10 11:11:06 -04:00
425cf67ee5 bring gh-page landing page up to date 2022-10-10 11:05:14 -04:00
4f9529db9e Merge branch 'main' of github.com:invoke-ai/InvokeAI into main 2022-10-10 10:51:06 -04:00
f3931a031d update changelog for gh-pages 2022-10-10 10:50:59 -04:00
a4995b7878 README fixes
-add screenshot of WebGUI
-remove redundant TOC
2022-10-10 10:03:55 -04:00
10d8d1bb25 Merge branch 'main' of github.com:invoke-ai/InvokeAI into main 2022-10-10 09:35:54 -04:00
b30ae57731 update web gui walkthrough 2022-10-10 09:35:40 -04:00
b0bfbafd3d update web gui walkthrough 2022-10-10 09:33:40 -04:00
7c50bd2039 rebuild front end 2022-10-10 09:19:52 -04:00
ae4e385abd merge changes to mac installation instructions 2022-10-10 09:18:48 -04:00
e301cd3321 Update OUTPAINTING.md
fix typo
2022-10-10 09:13:35 -04:00
2977680ca1 add links for history processing 2022-10-10 09:13:35 -04:00
2a5aa6e986 fix typos 2022-10-10 09:13:35 -04:00
3bba41ee89 add more features to changelog 2022-10-10 09:13:35 -04:00
179b5f7839 frontend rebuild 2022-10-10 09:13:35 -04:00
26d7712f03 fix link error 2022-10-10 09:13:35 -04:00
c0b370e1b9 add perlin noise to list of new features 2022-10-10 09:13:34 -04:00
15cc92e54a fix environment-mac.yml as per #964 2022-10-10 09:12:48 -04:00
acdd5b3922 Fix markdown typo in WEB.md 2022-10-10 09:09:04 -04:00
9685fc210c Updates INSTALL_MAC.md 2022-10-10 09:08:14 -04:00
f4cdc0001f Update references to lstein/stable-diffusion to invoke-ai/InvokeAI 2022-10-10 09:06:51 -04:00
3f78e9a1a3 rebuild frontend 2022-10-10 09:06:06 -04:00
280e2899d7 fix typo 2022-10-10 09:05:45 -04:00
82b0bb838c fix link error 2022-10-10 09:05:45 -04:00
8482518618 add perlin noise to list of new features 2022-10-10 09:05:45 -04:00
6425bda663 add short list of 2.0.0 new features 2022-10-10 09:05:45 -04:00
12413b0be6 Fix safari display:grid lag 2022-10-10 03:13:56 +02:00
275dca83be Update OUTPAINTING.md
fix typo
2022-10-09 18:46:23 -04:00
be5bf03ccc add links for history processing 2022-10-09 18:44:31 -04:00
0c479cd706 fix typos 2022-10-09 18:43:09 -04:00
7325b73073 add more features to changelog 2022-10-09 18:41:57 -04:00
49380f75a9 frontend rebuild 2022-10-09 18:25:18 -04:00
3d4276439f merge prior to backing out PR #1000 2022-10-09 18:24:15 -04:00
a4c36dbc15 fix link error 2022-10-09 18:21:13 -04:00
4fbd11a1f2 add perlin noise to list of new features 2022-10-09 18:21:13 -04:00
8ce3d4dd7f add short list of 2.0.0 new features 2022-10-09 18:21:13 -04:00
b82c968278 fix references from lstein/stable-diffusion to invoke-ai/InvokeAI
- as per #989
2022-10-09 18:21:13 -04:00
bc8e86e643 fix environment-mac.yml as per #964 2022-10-09 18:21:13 -04:00
1b6fab59a4 run make_schedule() if it hasn't already been called
- fixes #984
2022-10-09 18:21:13 -04:00
d1dd35a1d2 final tweak to embedded screenshots in WEB.md 2022-10-09 18:21:13 -04:00
400f062771 make initial screenshot even larger 2022-10-09 18:21:13 -04:00
40894d67ac fixup image sizes in WEB.md 2022-10-09 18:21:13 -04:00
08a0b85111 fix image links in documentation 2022-10-09 18:21:13 -04:00
7da6fad359 add missing doc files 2022-10-09 18:21:05 -04:00
b24d182237 Update README.md
Small writing error
2022-10-09 18:17:11 -04:00
2bdcc106f2 Fix markdown typo in WEB.md 2022-10-09 18:16:27 -04:00
7a98387e8d Updates INSTALL_MAC.md 2022-10-09 18:16:27 -04:00
58d0f14d03 Update references to lstein/stable-diffusion to invoke-ai/InvokeAI 2022-10-09 18:16:27 -04:00
bc9471987b Update README.md
Small writing error
2022-10-09 18:16:27 -04:00
dc6e60cbcc Update INPAINTING.md
Changed Gimp instructions to indicate that partial transparency is better than full transparency.
2022-10-09 18:16:27 -04:00
7dae5fb131 rebuild frontend 2022-10-09 18:16:24 -04:00
3bc1ff5e5a fix typo 2022-10-09 18:07:57 -04:00
8ff9c69e2f fix link error 2022-10-09 16:41:05 -04:00
988ace8029 add perlin noise to list of new features 2022-10-09 16:39:36 -04:00
6e9d996ece add short list of 2.0.0 new features 2022-10-09 16:36:00 -04:00
789714b0b1 fix references from lstein/stable-diffusion to invoke-ai/InvokeAI
- as per #989
2022-10-09 15:38:22 -04:00
773a64d4c0 fix references from lstein/stable-diffusion to invoke-ai/InvokeAI
- as per #989
2022-10-09 15:37:45 -04:00
bb7629d2b8 fix environment-mac.yml as per #964 2022-10-09 15:34:19 -04:00
745c020aa2 fix environment-mac.yml as per #964 2022-10-09 15:33:56 -04:00
c5344acb25 run make_schedule() if it hasn't already been called
- fixes #984
2022-10-09 15:30:23 -04:00
318eb35ea0 run make_schedule() if it hasn't already been called
- fixes #984
2022-10-09 15:29:04 -04:00
6e2fd2affe rebuild frontend 2022-10-09 14:52:00 -04:00
8faa06fb15 Merge branch 'main' into development
- this syncs documentation and code
2022-10-09 14:47:27 -04:00
0b7ca6a326 Allow user to generate images with initial noise as on M1 / mps system 2022-10-09 12:25:22 -04:00
ce8c238ac4 final tweak to embedded screenshots in WEB.md 2022-10-09 11:45:16 -04:00
f6c37e46e1 make initial screenshot even larger 2022-10-09 11:43:42 -04:00
2d69efccef fixup image sizes in WEB.md 2022-10-09 11:42:59 -04:00
f9d2aafaeb fix image links in documentation 2022-10-09 11:42:03 -04:00
22514aec2e Minor CSS & Link Updates
Also updated dist files with new CSS
2022-10-09 11:40:16 -04:00
5a22a83f4c add missing doc files 2022-10-09 11:38:39 -04:00
b1d43eae46 almost ready for public release
- merged release-candidate-2
- fix up documentation
- add web tutorial
2022-10-09 11:37:00 -04:00
0b8cdb6964 Fix markdown typo in WEB.md 2022-10-09 08:57:14 -04:00
aed5ad22fb Updates INSTALL_MAC.md 2022-10-09 08:49:29 -04:00
dc9c16b93d Update references to lstein/stable-diffusion to invoke-ai/InvokeAI 2022-10-09 08:48:23 -04:00
f6e858a548 Update README.md
Small writing error
2022-10-09 08:45:55 -04:00
4c2db171ca Update INPAINTING.md
Changed Gimp instructions to indicate that partial transparency is better than full transparency.
2022-10-09 08:45:33 -04:00
1255127e49 rebuild frontend 2022-10-09 08:37:51 -04:00
1cb74a6357 [WebUI] Masonry Layout for Gallery 2022-10-09 08:36:28 -04:00
5e2b250426 Images grow to fit space in gallery 2022-10-09 08:36:17 -04:00
ad190cfbb2 Smaller Gallery Images 2022-10-09 08:36:03 -04:00
542ceb051b Rework Gallery DIsplay 2022-10-09 08:34:57 -04:00
3473669458 WebUI Bug Fixes & Tweaks 2022-10-09 08:33:18 -04:00
3170c83d8d [WebUI] Masonry Layout for Gallery 2022-10-09 08:32:06 -04:00
3046dabde2 Images grow to fit space in gallery 2022-10-09 08:32:06 -04:00
1b02074fea Smaller Gallery Images 2022-10-09 08:32:06 -04:00
f15fd2c3d3 Rework Gallery DIsplay 2022-10-09 08:32:06 -04:00
081271d6a1 WebUI Bug Fixes & Tweaks 2022-10-09 08:32:06 -04:00
27f62999c9 * Fix for Perlin noise issue for cuda as well. 2022-10-09 08:24:02 -04:00
89d130edf4 * Fix for Perlin noise issue for cuda as well. 2022-10-09 08:23:23 -04:00
0e551a3844 Merge branch 'development' into fnformat 2022-10-09 13:43:09 +02:00
31869885d9 enhance the in-line -h command help text
- the prompt argument comes before the optional arguments
- usage statement shows 'invoke>' rather than 'invoke.py'
- use pydoc pager to help display long help message
2022-10-08 13:55:05 -04:00
4c026d9d92 enhance the in-line -h command help text
- the prompt argument comes before the optional arguments
- usage statement shows 'invoke>' rather than 'invoke.py'
- use pydoc pager to help display long help message
2022-10-08 13:53:56 -04:00
435231ef08 Get for external TI .bin files to work
Issue referenced in https://github.com/invoke-ai/InvokeAI/issues/980#issuecomment-1272162880
Users whose embeddings are trained on a non-regular num_vectors_per_token (e.g. 6), should update this value in their local repo, to get that embedding to work.
2022-10-08 13:18:19 -04:00
19a79caf41 Get for external TI .bin files to work
Issue referenced in https://github.com/invoke-ai/InvokeAI/issues/980#issuecomment-1272162880
Users whose embeddings are trained on a non-regular num_vectors_per_token (e.g. 6), should update this value in their local repo, to get that embedding to work.
2022-10-08 13:17:44 -04:00
7b095f8f97 add realesrgan to requirements.txt, remove nightie for torch and torchvision due to performance issues 2022-10-08 12:01:45 -04:00
f5dfd5b0dc Fixes CORS handling 2022-10-08 11:57:18 -04:00
9579a401b5 Fixes CORS handling 2022-10-08 11:56:38 -04:00
47a97f7e97 rebuild front end 2022-10-08 11:50:25 -04:00
3c146ebf9e Fix Gallery being open by default 2022-10-08 11:47:11 -04:00
efbcbb0d91 Add Image Gallery Drawer 2022-10-08 11:44:42 -04:00
578d8b0cb4 Add Image Gallery Drawer 2022-10-08 11:43:02 -04:00
2b1aaf4ee7 rename all modules from ldm.dream to ldm.invoke
- scripts and documentation updated to match
- ran preflight checks on both web and CLI and seems to be working
2022-10-08 11:37:23 -04:00
4a7f5c7469 Merge branch 'release-candidate-2' of github.com:invoke-ai/InvokeAI into release-candidate-2 2022-10-08 09:34:11 -04:00
98fe044dee rebrand CLI from "dream" to "invoke"
- rename dream.py to invoke.py
- create a compatibility script named dream.py that execs() invoke.py
- redo documentation
- change help message in args
- this does **not** rename the libraries, which are still ldm.dream.util, etc
2022-10-08 09:32:06 -04:00
62d4bb05d4 Add exception handling during metadata processing 2022-10-08 13:42:30 +02:00
02b1040264 Fix typo in ldm/dream/readline.py during merge, add more exception handling 2022-10-08 13:41:31 +02:00
dfd5899611 Merge branch 'development' into Improved-fetch-and-option-to-replay-commands-from-file 2022-10-08 13:26:22 +02:00
8ea88f49b1 Fix Gallery being open by default 2022-10-08 21:23:41 +13:00
a62541d976 Merge branch 'webui-image-drawer' of https://github.com/blessedcoolant/InvokeAI into webui-image-drawer 2022-10-08 17:39:50 +13:00
fbd9a49899 [WebUI] Gallery Drawer Release Build 2022-10-08 17:36:18 +13:00
4e571e12b8 Add Image Gallery Drawer 2022-10-08 17:33:47 +13:00
2567f5faa5 Add Image Gallery Drawer 2022-10-08 16:55:39 +13:00
97684d78d3 rebuild webui package 2022-10-07 16:44:23 -04:00
57791834ab [WebUI] Add Image To Image UI 2022-10-07 16:41:09 -04:00
3b0c4b74b6 [WebUI] Add Image To Image UI 2022-10-07 16:28:19 -04:00
7a701506a4 restore ability of ksamplers to process -v variation options
- supersedes PR #977
- works with both img2img and txt2img
2022-10-07 16:25:58 -04:00
5157cbeda1 restore ability of ksamplers to process -v variation options
- supersedes #977
2022-10-07 16:21:16 -04:00
3d7bc074cf autorotate init images using exif orientation tag 2022-10-07 12:06:50 -04:00
b296933ba0 autorotate init images using exif orientation tag 2022-10-07 12:06:40 -04:00
70bb7f4a61 fixed perlin noise generation for mps (macos) - fix for cpu fallback 2022-10-07 10:36:45 -04:00
45cc867b0c fixed perlin noise generation for mps (macos) - fix for cpu fallback 2022-10-07 10:35:42 -04:00
9c9cb71544 rebuild frontend package 2022-10-07 10:20:02 -04:00
173dc34194 Merge branch 'development' into fnformat 2022-10-07 15:39:41 +02:00
333219be35 fix broken image generation on plms and ddim samplers 2022-10-07 08:26:53 -04:00
c1230da3ab remove duplicated code 2022-10-07 08:13:34 -04:00
a7515624b2 remove duplicated code 2022-10-07 08:12:55 -04:00
9f34ddfcea fix crash on len(Nonetype) in k_sampler 2022-10-07 08:05:13 -04:00
6499b99dad revert accidental edit 2022-10-07 10:26:14 +00:00
c6611b2ad6 doc: described how filename format works 2022-10-07 10:21:16 +00:00
395445e7b0 using string.format for filename formatting 2022-10-07 09:24:39 +00:00
89c6c11214 feat: adding filename format template 2022-10-07 08:32:39 +00:00
c6a7be63b8 fix crash in generate._transparency_check_and_warning() 2022-10-06 21:00:27 -04:00
75165957c9 Revert "realesrgan inherits precision setting from main program"
This reverts commit 5f42d08945.

This fix was intended to solve issue #939, in which ESRGAN generates
dark images when upscaling 4X on certain GTX cards. However, the fix
apparently causes conflicts with some versions of the ESRGAN library,
and this fix will have to wait until after release of 2.0.
2022-10-06 20:52:38 -04:00
4f247a3672 Web Docs Update 2022-10-07 13:41:27 +13:00
d60df54f69 fix k_samplers in img2img - probably correct now 2022-10-06 18:53:54 -04:00
1f25f52af9 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-06 18:31:25 -04:00
7541c7cf5d fix k_samplers in img2img - probably correct now 2022-10-06 18:31:04 -04:00
a6cdde3ce4 Change Invoke Button Text To Invoke 2022-10-07 10:37:35 +13:00
a53b9a443f Fix WebUI Not Working 2022-10-07 08:09:55 +13:00
6e1328d4c2 Fix WebUI Not Working 2022-10-07 08:02:10 +13:00
440065f7f8 revert previous change 2022-10-06 14:57:06 -04:00
2c27e759cd fix #889 - fuzzy k* img2img at low strength 2022-10-06 14:16:56 -04:00
82481a6f9c Merge branch 'release-candidate-2' of github.com:invoke-ai/InvokeAI into release-candidate-2 2022-10-06 13:58:53 -04:00
90d64388ab Merge branch 'release-candidate-2' into release-candidate-2
- This includes #949 "Bug fixes for new Threshold and Perlin Options"
2022-10-06 13:57:43 -04:00
3444c8e6b8 Merge branch 'release-candidate-2' into release-candidate-2 2022-10-06 13:53:27 -04:00
74419f41a3 Release Candidate 2.0 WebUI 2022-10-07 06:50:34 +13:00
d84321e080 Adds hotkeys to modal 2022-10-06 13:49:09 -04:00
6542556ebd Adds next/prev image buttons/hotkeys 2022-10-06 13:48:59 -04:00
542ee56c77 [WebUI] Fix Threshold and Perlin Noise Styling 2022-10-07 06:48:16 +13:00
461e662644 Adds hotkeys to modal 2022-10-07 06:44:47 +13:00
58d73f5cae Adds next/prev image buttons/hotkeys 2022-10-07 06:44:47 +13:00
0c1c220bb9 Revert Auto Build Frontend Workflow 2022-10-07 06:41:03 +13:00
bf5ccfffa5 Merge branch 'development' of https://github.com/invoke-ai/InvokeAI into development 2022-10-07 06:29:24 +13:00
70bbb670ec Add Basic Hotkey Support 2022-10-06 13:27:42 -04:00
7b270ec3b0 Revert "[bot] builds dev bundle"
This reverts commit 7a0d4c3350.
2022-10-07 06:26:58 +13:00
e4ef7bdbb9 Merge branch 'development' into webui-hotkeys 2022-10-06 13:25:12 -04:00
5f42d08945 realesrgan inherits precision setting from main program 2022-10-06 12:23:30 -04:00
911c99f125 Fix WebUI CORS Issue 2022-10-06 11:17:48 -04:00
c7ccb9dacd Fix WebUI CORS Issue 2022-10-06 11:15:33 -04:00
7a0d4c3350 [bot] builds dev bundle 2022-10-06 11:15:33 -04:00
2154dd2349 prevent crashes due to uninitialized free_gpu_mem 2022-10-06 10:54:05 -04:00
f3050fefce bug and warning message fixes
- txt2img2img back to using DDIM as img2img sampler; results produced
  by some k* samplers are just not reliable enough for good user
  experience
- img2img progress message clarifies why img2img steps taken != steps requested
- warn of potential problems when user tries to run img2img on a small init image
2022-10-06 10:39:08 -04:00
595d15455a Fix generation of image with s>1000 2022-10-06 15:49:35 +02:00
183b98384f set perlin & threshold to zero on generator initialization 2022-10-06 09:35:04 -04:00
40d7141a4d Add Basic Hotkey Support 2022-10-07 02:29:47 +13:00
6d475ee290 * Bug fixes for new Threshold and Perlin options 2022-10-06 08:46:27 -04:00
c430f5452b Resolves @bakkot's review 2022-10-06 07:27:45 -04:00
97de5e31f9 Sets up GH actions to auto-build frontend bundle 2022-10-06 07:27:45 -04:00
a99aab6309 enable --hires to use k* samplers 2022-10-05 20:10:21 -04:00
5a40f7ad15 Fix for crashes in txt2img hires fix mode 2022-10-05 20:10:06 -04:00
2f29b78a00 enable --hires to use k* samplers 2022-10-05 17:18:32 -04:00
bcb6e2e506 Fix for crashes in txt2img hires fix mode 2022-10-05 17:13:43 -04:00
194b875cf3 Update IMG2IMG.md
Added information on the small initial image size bug.
2022-10-05 15:55:38 -04:00
b2cd98259d rename img files with colons 2022-10-05 12:56:57 -04:00
4d5b208601 multiple fixes in response to preflight testing bug reports
- updated environment-mac.yml #932
- use the upstream GFPGAN library now that issues with color-changing fixed
  and facial recognition improved #905
- preload_models fixed to download additional models needed by gfpgan
2022-10-05 12:44:16 -04:00
488890e6bb preload script more robust for downloading gfpgan 2022-10-05 11:29:48 -04:00
3feda31d82 Improve IMG2IMG docs with deeper explanation of what is happening under the hood 2022-10-05 10:21:40 -04:00
0f55d89e20 Improve IMG2IMG docs with deeper explanation of what is happening under the hood 2022-10-05 10:21:03 -04:00
c4b4a0e56e Update PROMPTS.md
fix broken img tags
2022-10-05 10:10:17 -04:00
95c7742c9c change "prompt weighting" to "prompt blending"; Issue #931 2022-10-05 10:08:56 -04:00
44e3995425 remove dangling -V from normalized dream command 2022-10-05 00:48:17 -04:00
7e6443c882 release candidate for InvokeAI 2.0 2022-10-04 23:05:40 -04:00
5dd9e30c2f Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-10-04 22:58:09 -04:00
8a8be92eac Fix markdown typo in WEB.md 2022-10-04 22:53:56 -04:00
f368f682e1 remove unecessary import of pyreadline3 2022-10-04 22:53:07 -04:00
d16f0c8a8f add enhancements to CLI command-line completion and history
- Added support for pyreadline3 so that Window users can benefit.
- Added the !search command to search the history for a matching string:
~~~
!search puppies
[20] puppies at the food bowl -Ak_lms
[54] house overrun by hungry puppies -C20 -s100
~~~
- Added the !clear command to clear the in-memory and on-disk
  command history.
2022-10-04 22:53:07 -04:00
18e667f98e fix miscellaneous regressions:
- embiggen needs to use ddim sampler due to low step count
- --hires_fix option needs to be written to log and command string
- fix call signature of _init_image_mask()
2022-10-04 22:48:19 -04:00
a09c64a1fe merge outcropping and postprocessing fixes 2022-10-04 22:47:21 -04:00
4c482fe24a refactor how postprocessors work
- similar call structures for outpainting, outcropping and face restoration modules
- added documentation for outcropping
- post-processing steps now leave a provenance chain (of sorts) in the sd-metadata field:

~~~
scripts/sd-metadata.py outputs/img-samples/curly.942491079.upscale.png
outputs/img-samples/curly.942491079.upscale.png:
 {
    "model": "stable diffusion",
    "model_id": "stable-diffusion-1.4",
    "model_hash": "fe4efff1e174c627256e44ec2991ba279b3816e364b49f9be2abc0b3ff3f8556",
    "app_id": "lstein/stable-diffusion",
    "app_version": "v1.15",
    "image": {
        "height": 512,
        "width": 512,
        "steps": 50,
        "cfg_scale": 7.5,
        "seed": 942491079,
        "prompt": [
            {
                "prompt": "pretty curly-haired redhead woman",
                "weight": 1.0
            }
        ],
        "postprocessing": [
            {
                "tool": "outcrop",
                "dream_command": "!fix \"test-pictures/curly.png\" -s 50 -S 942491079 -W 512 -H 512 -C 7.5 -A k_lms -c top 64 right 64"
            },
            {
                "tool": "gfpgan",
                "dream_command": "!fix \"outputs/img-samples/curly.942491079.outcrop-02.png\" -s 50 -S 942491079 -W 512 -H 512 -C 7.5 -A k_lms -G 0.8"
            },
            {
                "tool": "upscale",
                "dream_command": "!fix \"outputs/img-samples/curly.942491079.gfpgan.png\" -s 50 -S 942491079 -W 512 -H 512 -C 7.5 -A k_lms -U 4.0 0.75"
            }
        ],
        "sampler": "k_lms",
        "variations": [],
        "type": "txt2img"
    }
}
~~~
2022-10-04 22:37:25 -04:00
609983ffa8 add outcrop postprocessor 2022-10-04 22:37:25 -04:00
0f9bff66bc Merge branch 'development' of github.com:pbaylies/stable-diffusion into pbaylies-development 2022-10-04 22:31:11 -04:00
7f31a79431 Merge branch 'development' into development 2022-10-04 20:58:08 -04:00
c5a0fc8f68 Updates frontend README 2022-10-04 20:55:34 -04:00
87cb35f5da Fixes img2img sampler metadata hardcoded to ddim 2022-10-04 20:55:34 -04:00
5d911b43c0 Merge branch 'development' into development 2022-10-04 18:40:42 -04:00
483097f31c fix off-by-one error 2022-10-05 00:15:47 +02:00
7a3eae4572 revert to original k* noise schedule 2022-10-05 00:15:47 +02:00
db349aa3ce * Fix meshgrid warning for perlin noise. 2022-10-04 16:58:22 -04:00
b5c114c5b7 * Changes for PR 2022-10-04 14:37:32 -04:00
f34279b3e7 add perlin options to formatted dream cmd 2022-10-04 14:32:18 -04:00
9318719b9e Updates INSTALL_MAC.md 2022-10-04 07:16:42 -04:00
815addc452 * Update for another pretty yet not backwards-compatible web rewrite. 2022-10-04 00:28:06 -04:00
d2db92236a * Indent fix 2022-10-04 00:01:13 -04:00
ef20df8933 * Rebuilt frontend, more webui bit-rot. 2022-10-03 23:56:50 -04:00
f041510659 Merge branch 'development' into development 2022-10-03 23:53:19 -04:00
feb405f19a reorder mask creation and scaling to avoid deleting colors under transparency 2022-10-03 23:29:09 -04:00
2c8806341f Fixes error on missing init/mask image 2022-10-03 23:28:53 -04:00
b8e4c13746 Add New WebUI and Desktop Mode
Co-Authored-By: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-10-03 23:28:53 -04:00
40828df663 missing flag in wget download example
The documentation shows a wget command to download the gfpgan files and was missing the `-P` flag
2022-10-03 19:54:44 -04:00
0a217b5f15 Merge branch 'Any-Winter-4079-Textual_Inversion' of github.com:Any-Winter-4079/InvokeAI into development 2022-10-03 19:43:46 -04:00
88a9f33422 Fixes #875 2022-10-03 19:42:12 -04:00
ffcb31faef fix incorrect seed in metadata
- When generating multiple images, the first seed was being used for second
  and subsequent files. This should only happen when variations are being
  generated. Now fixed.
2022-10-03 17:09:48 -04:00
ea67040ef1 restore behavior of --grid argument 2022-10-03 17:09:48 -04:00
e79069a957 Merge branch 'development' into development 2022-10-03 08:33:44 -04:00
1ab09e7a06 use right value for step arg in img_callback in decode() 2022-10-03 05:47:32 -04:00
7c6dbcb14a use right value for step arg in img_callback 2022-10-03 05:46:23 -04:00
8e97bc24a4 restore step argument to step_callback 2022-10-03 05:38:43 -04:00
935a9d3c75 Update !fetch command, add documentation and autocomplete list
-- !fetch takes second optional argument name of the file to save commands to
2022-10-03 10:38:22 +02:00
5a88be3744 fix typo which caused crash in sampler.py 2022-10-02 22:31:11 -04:00
8ba5e385ec Fixes #877 2022-10-02 16:55:23 -04:00
a0f4af087c restore use of sampler.decode() in img2img 2022-10-02 14:58:21 -04:00
958d7650dd img2img works with all samplers, inpainting working with ddim & plms
- img2img confirmed working with all samplers
- inpainting working on ddim & plms. Changes to k-diffusion
  module seem to be needed for inpainting support.
- switched k-diffuser noise schedule to original karras schedule,
  which reduces the step number needed for good results
2022-10-02 14:58:21 -04:00
e246e7c8b9 Merge branch 'development' into development 2022-10-01 19:26:46 -04:00
8e76bc2b5d Update references to lstein/stable-diffusion to invoke-ai/InvokeAI 2022-10-01 18:15:20 -04:00
72834ad16c Gracefully handle invalid files passed to !fix and !fetch 2022-10-01 18:13:10 -04:00
36ac66fff2 add documentation for --hires_fix 2022-10-01 15:25:04 -04:00
93b1298d46 Improve !fetch, add !replay
Allow save fetched commands to a file Replay command to get commands from file inside of interactive prompt
Related to #871
2022-10-01 21:24:10 +02:00
a53e1125e6 remove debugging message 2022-10-01 15:24:05 -04:00
a3a8404f91 Fix missing port variable, adds build 2022-10-01 15:24:05 -04:00
3902c467b9 Fixes vite dev by proxying socket.io 2022-10-01 15:24:05 -04:00
40430ad29c Revert "Fixes vite dev with arbitrary socketio port"
This reverts commit 9ce62f0478.
2022-10-01 15:24:05 -04:00
fb6beaa347 Fixes vite dev with arbitrary socketio port 2022-10-01 15:24:05 -04:00
1a0cf1320b improve behavior and fix bugs in CLI history handling and completion
-if readline.set_auto_history() is not implemented, as in pyreadline3, will fall
back gracefully to automatic history saving. The only issue with this is that
-!history commands will be recorded in the history.
-!fetch on missing file no longer crashes script
-!history is now one of the autocomplete commands
-.dream_history now stored in output directory rather than ~user directory.

An important limitation of the last feature is that the history is
loaded and saved to the .dream_history file in the --outdir directory
specified at script launch time. It is not swapped around when the
--outdir is changed during the session.
2022-10-01 15:24:04 -04:00
fe28c5fbdc add documentation 2022-10-01 15:21:57 -04:00
0c354eccaa Hi res mode fix duplicates with img2img scaling
Add message about interpolation size

Fix crash if sampler not set to DDIM, change parameter name to hires_fix

Hi res mode fix duplicates with img2img scaling
2022-10-01 15:21:11 -04:00
33162355be remove debugging message 2022-10-01 15:03:25 -04:00
1af86618e3 Update README.md
Small writing error
2022-10-01 15:00:25 -04:00
b732bcad2f Update INPAINTING.md
Changed Gimp instructions to indicate that partial transparency is better than full transparency.
2022-10-01 12:17:46 -04:00
a626533cd4 Hi res mode fix duplicates with img2img scaling
Add message about interpolation size

Fix crash if sampler not set to DDIM, change parameter name to hires_fix

Hi res mode fix duplicates with img2img scaling
2022-10-01 11:56:59 +02:00
2d1c3d7b0b * Regenerated frontend. 2022-09-30 17:15:37 -04:00
22b290daad Merge branch 'development' into development 2022-09-30 17:14:34 -04:00
2cbf1e6f4b Fix missing port variable, adds build 2022-09-30 16:15:08 -04:00
3d075a6b5b Fixes vite dev by proxying socket.io 2022-09-30 16:15:08 -04:00
c7c9abdba3 Revert "Fixes vite dev with arbitrary socketio port"
This reverts commit 9ce62f0478.
2022-09-30 16:15:08 -04:00
846fd32209 Fixes vite dev with arbitrary socketio port 2022-09-30 16:15:08 -04:00
6197f81ba0 improve behavior and fix bugs in CLI history handling and completion
-if readline.set_auto_history() is not implemented, as in pyreadline3, will fall
back gracefully to automatic history saving. The only issue with this is that
-!history commands will be recorded in the history.
-!fetch on missing file no longer crashes script
-!history is now one of the autocomplete commands
-.dream_history now stored in output directory rather than ~user directory.

An important limitation of the last feature is that the history is
loaded and saved to the .dream_history file in the --outdir directory
specified at script launch time. It is not swapped around when the
--outdir is changed during the session.
2022-09-30 16:09:38 -04:00
b09491ec45 Merge branch 'development' into development 2022-09-29 17:38:26 -04:00
8c9f2ae705 fix duplicate files created during upscaling/facial reconstruction
- When --save_orig *not* provided during image generation with
  upscaling/face fixing, an extra image file was being created. This
  PR fixes the problem.

- Also generalizes the tab autocomplete for image paths such that
  autocomplete searches the output directory for all path-modifying
  options except for --outdir.
2022-09-29 17:29:04 -04:00
d3a4311c3d * Counteract recent bit-rot and churn negatively affecting my PR, as per feedback. 2022-09-28 19:47:36 -04:00
6b838c6105 Merge branch 'development' into development 2022-09-28 19:21:05 -04:00
779422d01b Merge branch 'development' into patch-2 2022-09-28 18:00:37 -04:00
b947290801 Merge branch 'development' into development 2022-09-28 17:35:30 -04:00
f8bd1e9d78 Update UPSCALE.md code block markdown
Remove leading ">" to allow users to copy-paste the CLI command without issue.
2022-09-28 17:09:25 -04:00
38a9f72e11 INSTALL_MAC.md - change environment-mac.yaml to yml
To reflect the new file name from this pull request: bc9f892cab
2022-09-28 16:56:26 -04:00
ce3b1162ea Implement --free_gpu_mem for server/backend.py
solves #813
solves #831
2022-09-28 16:55:31 -04:00
06802150d9 WebUI - Fix mimetypes missing on Windows 2022-09-28 16:54:18 -04:00
e737ba09be Fix Discord badge link 2022-09-28 15:34:37 -04:00
6b56d45d85 Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-09-28 15:09:10 -04:00
5f4bca0147 make CLI help text shorter to improve readability 2022-09-28 14:56:52 -04:00
98271a0267 fix crash that occurs in write_log when user interrupts generation with ^C 2022-09-28 14:56:52 -04:00
743342816b add documentation and bug fixes
- normalized how filenames are written out when postprocessing invoked
- various fixes of bugs encountered during testing
- updated documentation
- updated help text
2022-09-28 14:56:51 -04:00
fe00a8c05c implement history viewing & replaying in CLI
- Enhance tab completion functionality
- Each of the switches that read a filepath (e.g. --init_img) will trigger file path completion. The
  -S switch will display a list of recently-used seeds.
- Added new !fetch command to retrieve the metadata from a previously-generated image and populate the
  readline linebuffer with the appropriate editable command to regenerate.
- Added new !history command to display previous commands and reload them for modification.
- The !fetch and !fix commands both autocomplete *and* search automatically through the current
  outdir for files.
- The completer maintains a list of recently used seeds and will try to autocomplete them.
2022-09-28 14:56:27 -04:00
36c9a7d39c Fix WebUI Integration Bugs
Co-Authored-By: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-09-28 14:55:37 -04:00
acc5199f85 Integrate New WebUI with dream.py 2022-09-28 14:55:37 -04:00
6e4dc229e2 remove dangling debug statement 2022-09-28 14:55:37 -04:00
d641d8ab6d Update documents, add new options information 2022-09-28 14:54:49 -04:00
8a7ca4a766 stable-diffusion -> InvokeAI 2022-09-28 14:54:48 -04:00
4254e4dd60 Fixes metadata arg value 2022-09-28 14:54:48 -04:00
ba80f656b3 Fixes #822 2022-09-28 14:54:48 -04:00
fb0341fdbf Rename environment files to use default .yml extension 2022-09-28 14:54:48 -04:00
8366eee9c2 Change to InvokeAI git repo and folder names 2022-09-28 14:49:09 -04:00
97ec1b156c fix module-not-found error on startup of new Invoke WebGUI 2022-09-28 14:31:34 -04:00
6e54f504e7 Merge branch 'development' into webui-integration 2022-09-28 14:21:00 -04:00
f93963cd6b make CLI help text shorter to improve readability 2022-09-28 14:20:12 -04:00
e49e83e944 fix crash that occurs in write_log when user interrupts generation with ^C 2022-09-28 14:20:12 -04:00
dff4850a82 add documentation and bug fixes
- normalized how filenames are written out when postprocessing invoked
- various fixes of bugs encountered during testing
- updated documentation
- updated help text
2022-09-28 14:20:12 -04:00
800f9615c2 implement history viewing & replaying in CLI
- Enhance tab completion functionality
- Each of the switches that read a filepath (e.g. --init_img) will trigger file path completion. The
  -S switch will display a list of recently-used seeds.
- Added new !fetch command to retrieve the metadata from a previously-generated image and populate the
  readline linebuffer with the appropriate editable command to regenerate.
- Added new !history command to display previous commands and reload them for modification.
- The !fetch and !fix commands both autocomplete *and* search automatically through the current
  outdir for files.
- The completer maintains a list of recently used seeds and will try to autocomplete them.
2022-09-28 14:20:12 -04:00
29336387be Merge branch 'development' into development 2022-09-28 08:16:42 -04:00
984575b579 Fix WebUI Integration Bugs
Co-Authored-By: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2022-09-28 16:06:41 +13:00
af8383c770 Integrate New WebUI with dream.py 2022-09-28 16:06:41 +13:00
3491a1688b Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-09-27 18:15:14 -04:00
ac1999929f remove dangling debug statement 2022-09-27 18:13:45 -04:00
862a34a211 Merge branch 'development' into development 2022-09-27 14:26:21 -04:00
c78ae752bb Fix dlopen err from choices: protobuf<3.20,>=3.9.2
pytorch-lightning==1.7.5 requires protobuf<3.20,>=3.9.2 but 3.19.5 seems to cause dlopen error on some setups. Downgrading to 3.19.4 seems to fix it.
2022-09-27 12:46:10 +02:00
cad237b4c8 Update documents, add new options information 2022-09-27 03:20:55 -04:00
c2e100e6bf Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-09-27 03:18:48 -04:00
bc9f892cab rename environment.yaml to take advantage of Anaconda default behavior #827
-Rename environment files to use default .yml extension
-Change to InvokeAI git repo and folder names

Author: @Christopher-Hayes
2022-09-27 03:16:27 -04:00
79f23ad031 stable-diffusion -> InvokeAI 2022-09-27 02:51:07 -04:00
52b952526e Fixes metadata arg value 2022-09-27 02:50:25 -04:00
61790bb76a Fixes #822 2022-09-27 02:50:25 -04:00
b1a3fd945d Rename environment files to use default .yml extension 2022-09-27 00:58:05 -04:00
e19aab4a9b Textual Inversion for M1
Update main.py

Update ddpm.py

Update personalized.py

Update personalized_style.py

Update v1-finetune.yaml

Update environment-mac.yaml

Rename v1-finetune.yaml to v1-m1-finetune.yaml

Create v1-finetune.yaml

Update main.py

Update main.py

Update environment-mac.yaml

Update v1-inference.yaml
2022-09-27 01:39:17 +02:00
ce3fe6cce1 * Regenerated frontend. 2022-09-26 09:24:30 -04:00
be99d5a4bd Merge branch 'development' into development 2022-09-26 09:21:15 -04:00
14616f4178 make metadata retrieval more robust to changes in storage format
- args.py will now attempt to return a metadata-containing Args
  object using the following methods:

1. By looking for the 'sd-metadata' tag in the PNG info
2. By looking from the 'Dream' tag
3. As a last resort, fetch the seed from the filename and assume
   defaults for all other options.
2022-09-26 04:18:23 -04:00
b512d198f0 Merge branch 'development' into patch-1 2022-09-26 03:29:33 -04:00
61b19d406c Update INSTALL_MAC.md
I had to use `osx-64` not `osx-x86-64` for conda to install the required packages from conda-forge
2022-09-26 03:29:14 -04:00
d80fff70f2 ESRGAN Improvements 2022-09-26 03:28:23 -04:00
d87bd29a68 Change to InvokeAI git repo and folder names 2022-09-26 03:27:35 -04:00
d63897fc39 tweaks to get embiggen to work with new development changes PR #553
- swapped out calls to choose_autocast()
- fixed call to retrieve_png_metadata() so as to recover original prompt

Original author: @travco
2022-09-26 03:25:26 -04:00
fdf6a542bf Merge branch 'development' into main 2022-09-26 02:26:13 -04:00
8926bfb237 Update local development from origin. 2022-09-26 02:22:36 -04:00
3f53973a2a Update TROUBLESHOOT.md
- PR #772
Author: @h4rk8s
2022-09-26 02:21:37 -04:00
4247e75426 Merge branch 'development' into patch-1 2022-09-26 02:16:59 -04:00
485fe67c92 Add workaround low memory crash during image saving
Sample model moved to cpu before processing samples to image
2022-09-26 02:15:51 -04:00
b40bfb5116 fix(install): update repo/org name in install Notebook
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-26 02:08:06 -04:00
f0fd138ffc Pin openh264 to 2.3.0, Fixes #787
Pin `openh264` to 2.3.0 until OpenCV supports 2.3.1 or newer. Added just to `environment-mac.yml` since I know this happens on M1 / Apple Silicon Macs (running macOS 13) and that's all I can test on.
2022-09-26 02:07:27 -04:00
f79874c586 Improves handling of disconnections and paginates gallery #807
Merge branch 'socketio-timeout-2' of github.com:psychedelicious/stable-diffusion into psychedelicious-socketio-timeout-2
@psychedelicious
2022-09-26 01:54:35 -04:00
61a3234f43 Correct handling of seeds in metadata when generating variations 2022-09-26 01:19:01 -04:00
1f4306423a Fix webui metadata issue #734
Set correct seed in metadata on image generation with more then one
image.
2022-09-26 01:19:01 -04:00
e759ed4bd6 Merge branch 'patch-1' of github.com:mofuzz/InvokeAI into mofuzz-patch-1 2022-09-26 01:15:19 -04:00
f368ebea00 Merge branch 'patch-2' of github.com:spezialspezial/stable-diffusion into spezialspezial-patch-2 2022-09-26 01:13:39 -04:00
460dc897ad Adds pagination & refresh on re-connect to gallery 2022-09-26 11:50:47 +10:00
72702b9f16 * Regenerated frontend 2022-09-25 17:47:45 -04:00
db537f154e Increases socketio timeout 2022-09-26 06:24:31 +10:00
76ab7b1bfe Merge remote-tracking branch 'upstream/development' into development 2022-09-26 06:22:11 +10:00
d2b57029c8 Merge branch 'invoke-ai:development' into development 2022-09-25 19:04:54 +02:00
1853870811 Merge branch 'development' into development 2022-09-25 10:55:21 -04:00
3f25ad59c3 Merge branch 'development' into patch-1 2022-09-25 08:40:17 -04:00
d16d0d3726 Merge branch 'development' into patch-2 2022-09-25 08:37:54 -04:00
66896dcbbe Merge branch 'development' into patch-2 2022-09-25 08:28:55 -04:00
98950e67e9 fix(install): pin 'transformers'
Either Huggingface's 'transformers' lib introduced a regression in v4.22, or we changed how we're using 'transformers' in such a way that we break when using v4.22.

Pin to 'transformers==4.21.*'

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-25 08:24:10 -04:00
af8d73a8e8 Update dream.py
In the case of this "point", the Warp Terminal cannot be clicked directly to trigger the browser to open, and Chrome is a blank page. It should open properly once you remove it
2022-09-25 18:04:56 +08:00
089327241e Merge remote-tracking branch 'upstream/development' into development 2022-09-25 19:08:10 +10:00
5e23ec25f9 Update CLI.md
guidance scale must be >1.0
2022-09-25 08:29:50 +02:00
9050069858 Update INSTALL_MAC.md 2022-09-25 01:27:57 -04:00
47408bb568 Merge branch 'development' into development 2022-09-24 22:11:18 -04:00
c78c39e676 Merge branch 'invoke-ai:development' into development 2022-09-24 22:01:00 +02:00
636c356aaf facexlib and codeformer are broken on mps currently, force CPU device. 2022-09-24 21:22:24 +02:00
3d2175c9f8 Merge branch 'invoke-ai:development' into development 2022-09-24 20:06:38 +02:00
e2bd492764 Create Sampler Tips (SAMPLER_CONVERGENCE.md) 2022-09-24 18:05:14 +02:00
65cfb0f312 Create Sampler Tips (SAMPLER_CONVERGENCE.md) 2022-09-24 17:07:33 +02:00
66dac1884b Fix Generate.sample_to_image crash.
Build the base generator in same place and way as other generators to reduce the chance of missed arguments in the future.
Fixes crash with display in-progress images, though note the feature still doesn't work for other reasons.
2022-09-24 05:20:28 -04:00
ac51ec4939 Addressed merge conflicts for adding UI tooltips 2022-09-24 05:19:31 -04:00
b1d1063a25 Fix CodeFormer not working if GFPGAN is enabeld 2022-09-24 05:19:07 -04:00
0678b24ebb Merge branch 'development' into fix-empty-prompt-exception 2022-09-24 05:12:57 -04:00
53b4c3cc60 Upgrade GFPGAN to Version 1.4 2022-09-24 05:09:45 -04:00
d117d23469 Fix exception when inpainting with DDIM sampler 2022-09-24 05:02:02 -04:00
16a06ba66e fix typo 2022-09-24 05:00:57 -04:00
6858c14d94 Allow Generate to take images as readers or Image instances 2022-09-24 05:00:57 -04:00
bf21a0bf02 fix resizing of inpainting mask
- change image resampling method for mask shrinkage to prevent
  artifacts at edge of mask

Addresses #625
2022-09-24 04:37:34 -04:00
a3463abf13 Update TROUBLESHOOT.md 2022-09-24 08:16:48 +08:00
880142708d Merge branch 'development' into development 2022-09-23 15:41:06 -04:00
e69aa94800 Merge branch 'development' into fix-empty-prompt-exception 2022-09-23 13:18:02 +02:00
660641e720 Missing ux warning 2022-09-23 13:17:06 +02:00
cd8be1d0e9 Restoration Modules are now optional 2022-09-23 10:51:41 +02:00
413064cf45 Web stub for first_seed argument per b93f04e 2022-09-23 09:38:32 +02:00
40b3d07900 Merge branch 'development' into fix-empty-prompt-exception 2022-09-23 09:36:15 +02:00
803a51d5ad Fixes previous name of repo 2022-09-23 09:32:30 +02:00
5f22a72188 Fix division by zero when using an empty prompt 2022-09-22 17:15:28 -07:00
48aca04a72 * Regenerated frontend 2022-09-21 19:49:13 -04:00
665fd8aebf Merge branch 'development' into development 2022-09-21 19:42:57 -04:00
21da4592d1 Merge remote-tracking branch 'upstream/development' into development 2022-09-22 09:10:15 +10:00
f1d4862b13 fix(docs): point readme useful-forks link to new repo
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-22 09:50:56 +12:00
88e3b6d310 Merge branch 'development' into development 2022-09-21 17:47:14 -04:00
0ab5f2159d fix img2img incorrectly loading previous prompt 2022-09-21 15:18:59 -04:00
9b4d328be0 Fix Mac Issue #723
- For unknown reasons, conda removes the base directory from the path
  on Macintoshes when pyproject.toml is present (even if the file is
  empty). This commit renames pyproject.toml to pyproject.toml.hide
  until the issue is understood better.
2022-09-21 13:42:47 -04:00
bdbc76fcd4 Merged two different attempts to create __init__.py 2022-09-21 11:34:53 -04:00
110c4f70df fix module loading errors
1. Add ldm/dream/restoration/__init__.py file that was inadvertently not
   committed earlier.
2. Add '.' to sys.path to address weird mac problem reported in #723
2022-09-21 11:31:15 -04:00
28f06c7200 Reverts divergent fix to resto module path 2022-09-21 11:18:09 -04:00
c0aa92ea13 Adds Restoration module, variations fix, cli args 2022-09-21 11:18:09 -04:00
8c751d342d Bug Fix Patch 2022-09-21 11:18:09 -04:00
883b2b6e62 Merge branch 'development' of https://github.com/pbaylies/stable-diffusion into development 2022-09-21 11:05:34 -04:00
9903ce60f0 Merge branch 'development' into development 2022-09-21 11:05:20 -04:00
50ac367a38 Reverts divergent fix to resto module path 2022-09-22 00:36:53 +10:00
7cf7ba42fb Adds Restoration module, variations fix, cli args 2022-09-22 00:32:26 +10:00
a80119f826 Merge remote-tracking branch 'upstream/development' into development 2022-09-22 00:13:25 +10:00
069f91f930 Bug Fix Patch 2022-09-21 10:07:43 -04:00
6142cf25cc * Bug fixes 2022-09-21 09:12:32 -04:00
72dd5b18ee Bug Fix Patch 2022-09-21 20:24:41 +12:00
93001f48f7 Merge branch 'development' into development 2022-09-21 03:38:47 -04:00
19174949b6 fixed multiple dangling references to lstein/stable-diffusion 2022-09-21 03:29:02 -04:00
a1739a73b4 linux instructions update to /InvokeAI folder name 2022-09-21 03:26:27 -04:00
60f0090786 Merge branch 'development' into development 2022-09-21 03:10:49 -04:00
6987c77e2a Update VARIATIONS.md
Remove <figure markdown> tags.
2022-09-21 03:08:40 -04:00
e91aad6527 Update EMBIGGEN.md
Added info on !fix
2022-09-21 03:06:58 -04:00
0305c63a07 Update PROMPTS.md
Removed <figure markdown> tags which were preventing image display.
2022-09-21 03:02:23 -04:00
fff01f2068 Update INPAINTING.md
fixed images which had been obscured by <markdown> tags.
2022-09-21 02:59:52 -04:00
25777cf922 Update OUTPAINTING.md
fixed image paths
2022-09-21 02:58:25 -04:00
2e5169c74b added documentation for outpainting 2022-09-21 02:53:08 -04:00
05c1810f11 update CONTRIBUTORS 2022-09-21 02:51:17 -04:00
2cf294e6de Add outpainting functionality.
- Adapted from PR #489, author Dominic Letz [https://github.com/dominicletz]
- Too many upstream changes to merge, so frankensteined it in.
- Added support for !fix syntax
- Added documentation
2022-09-21 02:44:46 -04:00
b93f04ee38 fix normalized prompt when a variation is generated
- The seed printed needs to be the one generated prior to the
  initial noising operation. To do this, I added a new "first_seed"
  argument to the image callback in dream.py.
- Closes #641
2022-09-21 00:32:29 -04:00
0632a3a2ea remove dangling debugging statement 2022-09-21 00:06:16 -04:00
8731b498c0 fix merge conflicts 2022-09-20 23:55:57 -04:00
f408ef2e6c resolved multiple conflicts between PR #683 and subsequent PRs 2022-09-20 23:41:43 -04:00
f360e85d61 Update UPSCALE.md 2022-09-20 23:38:50 -04:00
283a0d72c7 tweaks to make postprocess fixing work better
- modify strength of embiggen to reduce tiling ghosts
- normalize naming of postprocessed files (could improve more to avoid
name collisions)
- move restoration modules under ldm.dream
2022-09-20 23:38:04 -04:00
cd69d258aa combine PRs #690 and #683 2022-09-20 23:38:03 -04:00
1b5013ab72 GFPGAN and Real ESRGAN Implementation Refactor 2022-09-20 23:37:19 -04:00
e8bb39370c add ability to post-process images from the CLI
- supports gfpgan, esrgan, codeformer and embiggen
- To use:
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft gfpgan -U2 -G0.8
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft codeformer -G 0.8
   dream> !fix ./outputs/img-samples/000056.29214455.png  -U4
   dream> !fix ./outputs/img-samples/000056.292144555.png -embiggen 1.5

   The first example invokes gfpgan to fix faces and esrgan to upscale.
   The second example invokes codeformer to fix faces, no upscaling
   The third example uses esrgan to upscale 4X
   The four example runs embiggen to enlarge 1.5X

- This is very preliminary work. There are some anomalies to note:
  1. The syntax is non-obvious. I would prefer something like:
     !fix esrgan,gfpgan
     !fix esrgan
     !fix embiggen,codeformer

     However, this will require refactoring the gfpgan and embiggen
     code.

   2. Images generated using gfpgan, esrgan or codeformer all are named
      "xxxxxx.xxxxxx.postprocessed.png" and the original is saved.
      However, the prefix is a new one that is not related to the
      original.

   3. Images generated using embiggen are named "xxxxx.xxxxxxx.png",
      and once again the prefix is new. I'm not sure whether the
      prefix should be aligned with the original file's prefix or not.
      Probably not, but opinions welcome.
2022-09-20 23:33:20 -04:00
43c9288534 Update UPSCALE.md 2022-09-20 23:01:21 -04:00
408e3774e0 Merge branch 'development' into development 2022-09-20 21:25:15 -04:00
1b0d6a9bdb FIX readme (again)
Please don't make me keep having to cclean this up

1) Centering of the front matter is completely wrecked

2) We are not a billboard for Discord. We have a perfectly good badge - if the *link* needs fixing, fix it.

3) Stop putting HTML in Markdown

4) We need to state who and what we are once, clearly, not 3 times...

- <b>InvokeAI: A Stable Diffusion Toolkit</b>
- # Stable Diffusion Dream Script
- # **InvokeAI - A Stable Diffusion Toolkit**

5) Headings in Markdown SHOULD NOT HAVE additional formatting
2022-09-20 20:00:42 -04:00
810112577f Fixes #717 2022-09-20 19:14:20 -04:00
fc61ddab3c Merge branch 'development' into postprocessing-commands 2022-09-20 18:48:42 -04:00
d5209965bc Merge branch 'development' into development 2022-09-20 17:40:21 -04:00
18a9a7c159 Resolved conflicts with workflow 2022-09-20 17:24:00 -04:00
3bc40506fd Merge branch 'main' of github.com:santisbon/stable-diffusion into santisbon-main 2022-09-20 17:23:06 -04:00
555f21cd25 Merge branch 'development' into mkdocs-updates 2022-09-20 17:11:43 -04:00
d176fb07cd Replace --full_precision with --precision that works even if not specified
Allowed values are 'auto', 'float32', 'autocast', 'float16'. If not specified or 'auto' a working precision is automatically selected based on the torch device.
Context: #526
Deprecated --full_precision / -F

Tested on both cuda and cpu by calling scripts/dream.py without arguments and checked the auto configuration worked. With --precision=auto/float32/autocast/float16 it performs as expected, either working or failing with a reasonable error. Also checked Img2Img.
2022-09-20 17:08:00 -04:00
30de9fcfae switch to ldm.dream.log 2022-09-20 16:54:50 -04:00
e02bfd00a8 create ldm.dream.log 2022-09-20 16:54:50 -04:00
a28636dd4a add markdown log option 2022-09-20 16:54:50 -04:00
b3ea8fe24e Merge branch 'development' into development 2022-09-20 16:54:22 -04:00
e33ed45cfc Delete redundant backquotes #665
Author: @mefengl
2022-09-20 16:44:25 -04:00
a1813fd23c Merge branch 'development' of github.com:invoke-ai/InvokeAI into development 2022-09-20 16:39:36 -04:00
7a6587d3dd Update environment-mac.yaml 2022-09-20 16:38:28 -04:00
cc0cf147c8 Update INSTALL_MAC.md
1. let users install Rust right at the beginning in order to avoid some troubleshooting later on
2. add "conda deactivate" for troubleshooting once ldm was activated

Fix conflict

Update INSTALL_MAC.md
2022-09-20 16:38:28 -04:00
4cf4853ae4 Merge branch 'development' into development 2022-09-20 16:34:11 -04:00
90d8f0af73 Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-20 16:32:00 -04:00
c0e1fb5f71 feat(ci): add pyproject.toml with blue config
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-20 16:27:15 -04:00
e8e6be0ebe change WebGUI title to InvokeAI 2022-09-20 16:14:33 -04:00
7830fd8ca1 Merge branch 'development' of github.com:psychedelicious/stable-diffusion into psychedelicious-development 2022-09-20 14:54:09 -04:00
4efee2a1ec Merge branch 'development' into development 2022-09-20 14:40:38 -04:00
e902b50bfc Update Logo Colors 2022-09-20 12:44:17 -04:00
c08eedf264 Delete redundant backquotes
remove extra space
2022-09-20 23:32:22 +08:00
1ee3023cdd Fixes cascading bugs 2022-09-21 00:44:57 +10:00
3e8a861fc0 Fixes missing seed in filename 2022-09-21 00:26:05 +10:00
cae0579ba9 Fixes bug with unused parser 2022-09-21 00:25:49 +10:00
f06f69a81a Removes unused file 2022-09-20 23:25:04 +10:00
b970ec4ce9 Refactors metadata & types, bugfixes, organization 2022-09-20 23:17:31 +10:00
a22ae23e9e Merge branch 'invoke-ai:main' into main 2022-09-20 08:03:54 -05:00
bb75174f4a Merge branch 'development' into development 2022-09-20 08:43:25 -04:00
27b238999f Use model_url instead of model_path for gfpgan and CodeFormer. Fixes lstein/stable-diffusion#678 2022-09-20 07:15:54 -04:00
893bdca0a8 fixed README formatting 2022-09-20 07:04:38 -04:00
de47f68b61 fix typo in README 2022-09-20 07:04:05 -04:00
6af9f2716e Update README.md 2022-09-20 07:03:41 -04:00
60b83ff07e Change README name to InvokeAI 2022-09-20 07:02:03 -04:00
38c9001e8e remove line-breaks from tables in CLI
instead I use empty img-tags with defined width in the table headers
2022-09-20 10:11:34 +02:00
7335f908af center pictures in prompt.md 2022-09-20 06:53:04 +02:00
96b90be5c3 make pictures in variations appear centered
also added captions to most of them
2022-09-20 06:46:51 +02:00
06ad4387a2 update Recipe for Photoshop
this way the view doesn't break that fast
2022-09-20 06:29:02 +02:00
a637c2418a Merge branch 'lstein:main' into main 2022-09-19 18:35:00 -05:00
5f8f2e63eb Merge remote-tracking branch 'upstream/development' into development 2022-09-20 07:27:32 +10:00
c6e4352c3f Add missing option to wget command 2022-09-19 16:28:11 -04:00
8c72da3643 Merge remote-tracking branch 'upstream/development' into development 2022-09-19 15:48:22 -04:00
23af057e5c tweaks to make postprocess fixing work better
- modify strength of embiggen to reduce tiling ghosts
- normalize naming of postprocessed files (could improve more to avoid
name collisions)
- move restoration modules under ldm.dream
2022-09-19 14:54:52 -04:00
bde9d6d33b Merge branch 'postprocessing-commands' of github.com:lstein/stable-diffusion into postprocessing-commands 2022-09-19 14:00:58 -04:00
c14bdcb8fd combine PRs #690 and #683 2022-09-19 13:59:43 -04:00
f816526d0d add ability to post-process images from the CLI
- supports gfpgan, esrgan, codeformer and embiggen
- To use:
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft gfpgan -U2 -G0.8
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft codeformer -G 0.8
   dream> !fix ./outputs/img-samples/000056.29214455.png  -U4
   dream> !fix ./outputs/img-samples/000056.292144555.png -embiggen 1.5

   The first example invokes gfpgan to fix faces and esrgan to upscale.
   The second example invokes codeformer to fix faces, no upscaling
   The third example uses esrgan to upscale 4X
   The four example runs embiggen to enlarge 1.5X

- This is very preliminary work. There are some anomalies to note:
  1. The syntax is non-obvious. I would prefer something like:
     !fix esrgan,gfpgan
     !fix esrgan
     !fix embiggen,codeformer

     However, this will require refactoring the gfpgan and embiggen
     code.

   2. Images generated using gfpgan, esrgan or codeformer all are named
      "xxxxxx.xxxxxx.postprocessed.png" and the original is saved.
      However, the prefix is a new one that is not related to the
      original.

   3. Images generated using embiggen are named "xxxxx.xxxxxxx.png",
      and once again the prefix is new. I'm not sure whether the
      prefix should be aligned with the original file's prefix or not.
      Probably not, but opinions welcome.
2022-09-19 12:38:14 -04:00
50d607ffea Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-19 12:35:03 -04:00
57577401bd Fixes metadata_loads() #686 2022-09-19 12:33:45 -04:00
58c63fe339 Merge branch 'development' of github.com:psychedelicious/stable-diffusion into psychedelicious-development 2022-09-19 12:27:42 -04:00
7b0cbb34d6 GFPGAN and Real ESRGAN Implementation Refactor 2022-09-19 23:38:56 +12:00
37c44ced1d Merge branch 'development' into development 2022-09-19 07:22:03 -04:00
e59307d284 fixed incompatible syntax of inpainting PS section
this was the best looking result I could come up with.
2022-09-19 12:34:34 +02:00
2a6999d500 Fixes various issues with metadata handling 2022-09-19 17:38:56 +10:00
5ab7c68cc7 Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-19 08:55:13 +02:00
e92122f2c2 update requirements-mkdocs.txt 2022-09-19 08:38:46 +02:00
ead0e92bac remove feature list from index.md since in menu
fix double bs python path in cli.md and fix tables again
add more keys in cli.md
fix annotations in install_mac.md
remove torchaudio from pythorch-nightly installation
fix self reference
2022-09-19 08:36:42 +02:00
682d74754c Fixes metadata_loads() #686 2022-09-18 22:41:39 -04:00
082df27ecd Merge branch 'fix-metadata-rfc' into development 2022-09-19 12:37:10 +10:00
dc024845cf Merge branch 'development' into development 2022-09-18 22:34:00 -04:00
94ca13c494 Fixes metadata_loads() #686 2022-09-19 12:33:37 +10:00
1f29cb1dc1 Merge remote-tracking branch 'upstream/development' into development 2022-09-19 12:28:09 +10:00
f404c692ad Fixes metadata_loads() #686 2022-09-19 11:53:47 +10:00
6bf19cd897 Updating with evergreen Discord invite (#635)
* Update to add Adobe Photoshop Guide for inpainting (#617)

* updating with Adobe instructions & assets

* Assets for Adobe guide

* correcting paths

* update Readme with evergreen discord invite link

* discord image asset uploaded

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-18 21:30:21 -04:00
2743e17588 Fix token display when using -t
Add true weight used for subprompt
2022-09-18 21:25:27 -04:00
f0b500fba8 Fixes metadata implementation #686 2022-09-18 21:24:29 -04:00
aaec6baeca Add .gitkeep to the weights folder 2022-09-18 20:35:05 -04:00
61611d7d0d Fixes metadata implementation #686 2022-09-19 10:07:31 +10:00
73154a25d4 Merge remote-tracking branch 'upstream/development' into development 2022-09-19 10:06:43 +10:00
f4a275d1b5 * Tweaked frontend options; rebuilt frontend. 2022-09-18 19:21:59 -04:00
c3712b013f Fixes metadata implementation #686 2022-09-19 09:09:11 +10:00
3692f223e1 Merge branch 'development' into development 2022-09-18 18:58:04 -04:00
fccf809e3a add ability to post-process images from the CLI
- supports gfpgan, esrgan, codeformer and embiggen
- To use:
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft gfpgan -U2 -G0.8
   dream> !fix ./outputs/img-samples/000056.292144555.png -ft codeformer -G 0.8
   dream> !fix ./outputs/img-samples/000056.29214455.png  -U4
   dream> !fix ./outputs/img-samples/000056.292144555.png -embiggen 1.5

   The first example invokes gfpgan to fix faces and esrgan to upscale.
   The second example invokes codeformer to fix faces, no upscaling
   The third example uses esrgan to upscale 4X
   The four example runs embiggen to enlarge 1.5X

- This is very preliminary work. There are some anomalies to note:
  1. The syntax is non-obvious. I would prefer something like:
     !fix esrgan,gfpgan
     !fix esrgan
     !fix embiggen,codeformer

     However, this will require refactoring the gfpgan and embiggen
     code.

   2. Images generated using gfpgan, esrgan or codeformer all are named
      "xxxxxx.xxxxxx.postprocessed.png" and the original is saved.
      However, the prefix is a new one that is not related to the
      original.

   3. Images generated using embiggen are named "xxxxx.xxxxxxx.png",
      and once again the prefix is new. I'm not sure whether the
      prefix should be aligned with the original file's prefix or not.
      Probably not, but opinions welcome.
2022-09-18 17:26:09 -04:00
23e62efdc5 Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 21:41:14 +02:00
6ea0a7699e add Icons to Titles and in index.md 2022-09-18 21:30:18 +02:00
1e8e5245eb CLI writes prompt string metadata in same format as web server 2022-09-18 15:08:56 -04:00
4f926fc470 Merge branch 'development' into development 2022-09-18 15:04:01 -04:00
a0a9b12daf fix(scripts): dream.py typo (#675)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-18 15:03:11 -04:00
f3292a6953 Implement CodeFormer Face Restoration (#669)
* Implement CodeFormer Face Restoration

* fix codeformer model destination path

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-18 15:01:05 -04:00
062f3e8f31 Gfpgan download fix (#655)
* restore ability to save files to directories named after prompt

* don't download gfpgan model file if it exists

- Fixes #647
2022-09-18 14:42:43 -04:00
20ffd4082c needs protobuf 3.20.1 2022-09-18 13:25:21 -05:00
578638c258 include rust inst. step in standalone installation
also include protobuf uninstall if installed previously
2022-09-18 18:48:05 +02:00
cdc78cc6a1 use inline codeblocks for those very long prompts
this way they linebreak which helps a lot in this case
also removed odd whitespaces
2022-09-18 18:46:03 +02:00
c98ade9b25 Merge branch 'development' into development 2022-09-18 12:35:28 -04:00
fe0f5bcc11 readd missed backticks and add tabkey 2022-09-18 16:43:04 +02:00
df98178018 fix paths in PROMPTS.md 2022-09-18 16:39:18 +02:00
0b0cde2351 Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 16:34:14 +02:00
5b4c37e043 fix #643 shortcut for --strength is -f 2022-09-18 16:09:08 +02:00
3c4c4d71c9 VARIATIONS.md - fix typo in formatting (#664)
A beginning line for a code section was left out.
2022-09-18 09:50:54 -04:00
ea2b0828d8 Documentation for negative prompts (#668)
Documentation for pull lstein#661, and splits prompt docs into a separate file.
2022-09-18 09:50:19 -04:00
045aa7a9a3 Support color correction for img2img and inpainting (#613)
* Support color correction for img2img and inpainting, avoiding the shift to magenta seen when running images through img2img repeatedly.

* Fix docs for color correction

* add --init_color to prompt reconstruction

* For best results, the --init_color option should point to the *very first* image used in the sequence of img2img operations. Otherwise color correction will skew towards cyan.

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-18 09:47:57 -04:00
d478a241a8 Merge branch 'development' into development 2022-09-18 09:20:13 -04:00
0a4397094e Negative / Unconditioned Prompts (#661)
Co-Authored-By: rabidcopy <8052832+rabidcopy@users.noreply.github.com>

Co-authored-by: rabidcopy <8052832+rabidcopy@users.noreply.github.com>
2022-09-18 09:08:30 -04:00
0b786f61cc Merge branch 'development' into development 2022-09-18 08:54:22 -04:00
b68cb521ba restore ability to save files to directories named after prompt (#654) 2022-09-18 08:37:08 -04:00
e1f0ee819d Minor bug fix 2022-09-18 21:13:42 +10:00
f2c3fba28d update mkdocs-flow
for the git-revision-date addon it is necesarry to set fetch-depth to 0
2022-09-18 11:33:09 +02:00
676c772f11 update mkdocs config
- use git-revision-date-localized with enabled creation date
- update requirements-mkdocs.txt and pin verisons
- add requirements
- add dev addr
- fix template
- use better icons for repo and edit button
- remove odd extension
2022-09-18 11:12:45 +02:00
016fd65f6a use more admonitions and introduce keys 2022-09-18 11:09:27 +02:00
09bf6dd7c1 Merge remote-tracking branch 'upstream/development' into development 2022-09-18 18:44:40 +10:00
6e927acd58 Improves state/API code structure, formatting, etc 2022-09-18 17:33:09 +10:00
383b870499 update index.md to use same labes as README.md 2022-09-18 07:00:43 +02:00
98f189cc69 fix username for magiclinks to point to lstein 2022-09-18 06:43:50 +02:00
dbc9134630 add previously missed admonition 2022-09-18 05:06:54 +02:00
746162b578 Merge remote-tracking branch 'upstream/development' into mkdocs-updates 2022-09-18 04:58:40 +02:00
0071f43b2c use Admonitions for notes, warnings, ... 2022-09-18 04:54:20 +02:00
6d09f8c6b2 some smaller fixes to linux and windows install 2022-09-18 04:09:42 +02:00
66e9fd4771 fix CLI.md
disabled toc in order to view those large tables
added linebreaks in long cells to stop multiline arguments/shortcut
added backticks arround arguments to stop interpreting `<...>` as html
added missing identifiers to codeblocks
changed html tags to markdown to insert the png
2022-09-18 03:00:07 +02:00
ef6609abcb Updates frontend/README 2022-09-18 10:45:06 +10:00
2f93418095 Merge branch 'development' into development 2022-09-17 20:35:48 -04:00
9bcb0dff96 feat(docs): readme - add discord server badge/link (#644)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-17 18:28:26 -04:00
f84372efd8 fix(doc): readme - more meaningful CI links from badges (#645)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-17 18:26:09 -04:00
334045b27d fix CompViz assets 2022-09-18 00:13:45 +02:00
071f65a892 Enable even larger images with one simple torch.nn.functional.silu import (#653)
Fixes:
File "stable-diffusion/ldm/modules/diffusionmodules/model.py", line 37, in nonlinearity
    return x*torch.sigmoid(x)
RuntimeError: CUDA out of memory. Tried to allocate 1.56 GiB [..]

Now up to 1536x1280 is possible on 8GB VRAM.
Also remove unused SiLU class.
2022-09-17 18:03:52 -04:00
e30827e19b Adds enter keydown > generate 2022-09-18 06:13:27 +10:00
af98524179 Merge branch 'lstein:main' into main 2022-09-17 13:42:38 -05:00
e994073b5b fix(ci): Cherry-pick new CI to main (#646)
* Added linux to the workflows

- rename workflow files

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* fixes: run on merge to 'main', 'dev'; 

- reduce dev merge test cases to 1 (1 takes 11 minutes 😯)
- fix model cache name

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* add test prompts to workflows

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: James Reynolds <magnsuviri@me.com>
2022-09-17 14:12:14 -04:00
ad292b095d minor fix to ldm.dream.args
- If no list of seeds is provided to metadata_dumps(), then the contents
of the Args object's seed attribute are used.
2022-09-17 13:44:39 -04:00
d8685ad66b Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-17 13:29:21 -04:00
239f41f3e0 add sd-metadata metadata_loads() and metadata_dumps() functions 2022-09-17 13:28:37 -04:00
e0951f28cf Refactor attention.CrossAttention to remove duplicate code and apply optimizations
Apply ~6% speedup by moving * self.scale to earlier on a smaller tensor.
When we have enough VRAM don't make a useless zeros tensor.
Switch between cuda/mps/cpu based on q.device.type to allow cleaner per architecture future optimizations.
For cuda and cpu keep VRAM usage and faster slicing consistent.
For cpu use smaller slices. Tested ~20% faster on i7, 9.8 to 7.7 s/it.
Fix = typo to self.mem_total >= 8 in einsum_op_mps_v2 as per #582 discussion.
2022-09-17 20:19:21 +03:00
100f2e8f57 toil(docs): readme - remove remaining markdown warts, HTML
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-17 13:00:37 -04:00
7ade11c4f3 Merge branch 'development' into development 2022-09-17 12:29:25 -04:00
2faa116238 tidy up generation of prompt when variations in use 2022-09-17 11:59:47 -04:00
c94b8cd959 small bug fixes in prompt generation
- fixes no closing quote in pretty-printed dream_prompt string
- removes unecessary -f switch when txt2img used

In addition, this commit does an experimental commenting-out of the
random.seed() call in the variation-generating part of ldm.dream.generator.base.
This fixes the problem of two calls that use the same seed and -v0.1
generating different images (#641). However, it does not fix the issue
of two images generated using the same seed and -VXXXXXX being
different.
2022-09-17 10:18:55 -04:00
0c1a2b68bf * Added parameters to new more verbose React app and rebuilt the app. 2022-09-17 09:11:29 -04:00
c06dc5b85b Merge branch 'development' into development 2022-09-17 08:43:15 -04:00
34fa6e38e7 fix long hex-encoded error message from legacy server
- closes issue #618
2022-09-17 08:39:20 -04:00
7b9958e59d * Add fields back to new "legacy_web" index as well. 2022-09-17 03:53:10 -04:00
f8775f2f2d Merge branch 'development' into development 2022-09-17 03:45:14 -04:00
b74354795d Delete sends img to trash instead of delete 2022-09-17 17:19:09 +10:00
9461c8127d upgrade Pillow 2022-09-17 02:44:31 -04:00
b5ed668eff small legacy web appearance tweaks 2022-09-17 02:44:07 -04:00
c6c19f1b3c Remove unnecessary wget 2022-09-17 01:39:49 -05:00
20ba51ce7d Merge remote-tracking branch 'upstream/development' into development 2022-09-17 16:35:47 +10:00
e45f46d673 Improves code structure, comments, formatting, linting 2022-09-17 16:32:59 +10:00
b3e026aa4e point legacy web server at legacy static files 2022-09-17 02:18:52 -04:00
89540f293b Restored static files needed for new flask/react web server
WARNING: old web server will no longer display correct interface.
2022-09-17 02:01:55 -04:00
ed8ee8c690 update install-mode refference 2022-09-17 07:55:55 +02:00
31daf1f0d7 preload_models.py now downloads gfpgan model 2022-09-17 01:32:31 -04:00
5b692f4720 include width and height in png dream prompt 2022-09-17 01:14:00 -04:00
b89aadb3c9 fix crash on second prompt #636 2022-09-17 00:57:35 -04:00
b9183b00a0 add Content tabs 2022-09-17 06:34:38 +02:00
7b28b5c9a1 update format in EMBIGGEN.md to make use of mkdocs 2022-09-17 05:17:21 +02:00
994c6b7512 Merge branch 'development' into bug-fixes 2022-09-16 23:08:02 -04:00
42072fc15c Bug Fixes 2022-09-17 14:12:35 +12:00
103b30f915 update index.md with the new badges 2022-09-17 03:49:11 +02:00
1799bf5e42 Merge remote-tracking branch 'upstream/development' into development 2022-09-17 11:28:42 +10:00
17e755e062 shorten long commands in codeblocks
this way it looks much better in MkDocs Codeblocks (and ofc still works)
also remove a markdown styled link from a bash-codeblock
2022-09-17 03:05:13 +02:00
ae963fcfdc fix codeblock anotations 2022-09-17 02:56:02 +02:00
3c732500e7 many updatedes to INSTALL_MAC.md 2022-09-17 02:46:59 +02:00
cd494c2f6c fix some markdown violations as well 2022-09-17 02:34:25 +02:00
443fcd030f change printWidth for markdown files to 80
since 80 is the defautl lenght
2022-09-17 02:23:00 +02:00
fefcdffb55 fix(readme): switch last-commit badge to last DEV commit (#626)
- switch badge service to badgen, as I couldn't figure out shields.io

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-16 20:21:19 -04:00
fa7fe382b7 remove protobuf from brew install docs 2022-09-17 02:10:16 +02:00
d8d30ab4cb separate toc by disabling toc.integrate
this way the leftside menu does not look so bloated and users can
find what they are looking for much faster
2022-09-17 02:08:37 +02:00
61f46cac31 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-16 19:59:17 -04:00
df4c80f177 respect --outdir again; fix issue #628 2022-09-16 19:58:45 -04:00
df95a7ddf2 respect --outdir again; fix issue #628 2022-09-16 19:58:16 -04:00
fb7a9f37e4 Set temporary instructions
Set temporary instructions to use the branch that can currently be
containerized.
2022-09-16 18:35:50 -05:00
1e3200801f Merge remote-tracking branch 'upstream/development' into development 2022-09-16 19:29:08 -04:00
b4debcc4ad Merge remote-tracking branch 'origin/main' 2022-09-16 18:24:21 -05:00
622db491b2 change tensor length to 768 per #572 2022-09-16 18:25:43 -04:00
0db8d6943c Merge branch 'lstein:main' into main 2022-09-16 17:14:34 -05:00
37e2418ee0 Added linux to the workflows (#463)
* Added linux to the workflows

- rename workflow files

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* fixes: run on merge to 'main', 'dev'; 

- reduce dev merge test cases to 1 (1 takes 11 minutes 😯)
- fix model cache name

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* add test prompts to workflows

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 17:46:57 -04:00
d81bc46218 Merge branch 'development' into main 2022-09-16 17:44:15 -04:00
40b61870f6 update Intel Mac instructions (#599)
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 17:42:21 -04:00
6cab2e0ca0 refine env rebuild tip (#611) 2022-09-16 17:32:52 -04:00
ba4892e03f Zero-pad intermediate image file names (#616) 2022-09-16 17:32:18 -04:00
2b9f8e7218 Update to add Adobe Photoshop Guide for inpainting (#617)
* updating with Adobe instructions & assets

* Assets for Adobe guide

* correcting paths
2022-09-16 17:31:26 -04:00
6cb6c4a911 restore static files for old web server 2022-09-16 17:27:08 -04:00
693bed5514 Merge remote-tracking branch 'upstream/development' into development 2022-09-17 07:06:46 +10:00
fe12c6c099 Squashed commit of the following:
commit 67fbaa7c31
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Sep 16 16:57:54 2022 -0400

    reconciled conflicting changes to pngwriter call

commit ddc68b01f7
Merge: f9feaac cbac95b
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:39:22 2022 +1000

    Merge remote-tracking branch 'upstream/development' into development

commit f9feaac8c7
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:16:16 2022 +1000

    Fixes metadata related to new args

commit d1de1e357a
Author: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date:   Sat Sep 17 06:15:55 2022 +1000

    Fixes PromptFormatter import bug
2022-09-16 16:58:16 -04:00
67fbaa7c31 reconciled conflicting changes to pngwriter call 2022-09-16 16:57:54 -04:00
ddc68b01f7 Merge remote-tracking branch 'upstream/development' into development 2022-09-17 06:39:22 +10:00
f9feaac8c7 Fixes metadata related to new args 2022-09-17 06:36:19 +10:00
d1de1e357a Fixes PromptFormatter import bug 2022-09-17 06:35:53 +10:00
cbac95b02a Merge with PR #602
- New and improved web api
- Author: @Kyle0654
2022-09-16 16:35:34 -04:00
00d2d0e90e Flask/React web server now merged, but needs fixes.
* due to changes in the metadata written to PNG files, web server cannot
display images
* issue is identified and will be fixed in next 24h
* Python 3.9 required for flask/react web server; environment must be
updated.
2022-09-16 14:54:19 -04:00
d1a2c4cd8c React web UI with flask-socketio API (#429)
* Implements rudimentary api
* Fixes blocking in API
* Adds UI to monorepo > src/frontend/
* Updates frontend/README
* Reverts conda env name to `ldm`
* Fixes environment yamls
* CORS config for testing
* Fixes LogViewer position
* API WID
* Adds actions to image viewer
* Increases vite chunkSizeWarningLimit to 1500
* Implements init image
* Implements state persistence in localStorage
* Improve progress data handling
* Final build
* Fixes mimetypes error on windows
* Adds error logging
* Fixes bugged img2img strength component
* Adds sourcemaps to dev build
* Fixes missing key
* Changes connection status indicator to text
* Adds ability to serve other hosts than localhost
* Adding Flask API server
* Removes source maps from config
* Fixes prop transfer
* Add missing packages and add CORS support
* Adding API doc
* Remove defaults from openapi doc
* Adds basic error handling for server config query
* Mostly working socket.io implementation.
* Fixes bug preventing mask upload
* Fixes bug with sampler name not written to metadata
* UI Overhaul, numerous fixes

Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-16 13:18:15 -04:00
403d02d94f implementation of RFC #266 (#587)
* Feature complete for #266 with exception of several small deviations:
1. initial image and model weight hashes use full sha256 hash rather than first 8 digits
2. Initialization parameters for post-processing steps not provided
3. Uses top-level "images" tags for both a single image and a grid of images. This change was suggested in a comment.

* Added scripts/sd_metadata.py to retrieve and print metadata from PNG files
* New ldm.dream.args.Args class is a namespace like object which holds all defaults and can be modified during exection to hold current settings.
* Modified dream.py and server.py to accommodate Args class.
2022-09-16 13:09:04 -04:00
9a8fecb2cb Merge branch 'development' into development 2022-09-16 08:52:27 -04:00
45af30f3a4 fix(install): unpinned 'protobuf' breaks macOS installs (#596)
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-16 07:39:23 -04:00
58baf9533b Make API return error before raising error again (#606)
This change makes it so any API clients can show the same error as what
happens in the terminal where you run the API. Useful for various WebUIs
to display more helpful error messages to users.

Co-authored-by: CapableWeb <capableweb@domain.com>
2022-09-16 07:33:42 -04:00
f59b399f52 update dependencies 2022-09-15 21:07:36 -05:00
10f4c0c6b3 Merge branch 'development' into development 2022-09-15 20:25:34 -04:00
f9b272a7b9 Update to exclude GTX 16xx from autocast selection (#576)
* Update to exclude GTX 1660/1650 from autocast selection
2022-09-15 19:29:19 -04:00
96d7639d2a Fix visible trailing semi-transparent hard edge in normal tiling mode (when img2img diverges between tiles) using an asymmetric alpha mask in the corner. (LTaC fix) 2022-09-15 17:26:53 -04:00
e6011631a1 Mkdocs material (#593)
* Squashed commit of the following:

commit 82d9c25d9a
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:29:11 2022 +0200

    fix branch name in mkdocs-flow

commit 2e276cecc1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:28:35 2022 +0200

    fix theme name

commit 2eb77c1173
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:14:42 2022 +0200

    fixed some links and formating in main README

commit 66a7152e48
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 08:58:58 2022 +0200

    trigger mkdocs deployment on main

commit 897cc373ce
Merge: 89da371 3b5a830
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Wed Sep 14 07:51:23 2022 +0200

    Merge pull request #1 from mauwii/mkdocs

    Mkdocs

commit 3b5a8308eb
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:42:56 2022 +0200

    huge update
    I was pretty busy trying to make the Readmes / docs  look good in MkDocs

commit 0b4f5a926f
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:41:45 2022 +0200

    update mkdocs config

commit 872172ea70
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:33:49 2022 +0200

    added the mkdocs-git-revision-date-plugin

commit eac81bf875
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 06:46:43 2022 +0200

    add  prettier config
    remove markdownlint
    move and rename requirements-mkdocs.txt

commit b36d4cc088
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 02:06:39 2022 +0200

    add dark theme

commit a14f18fede
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:38:02 2022 +0200

    update mkdocs flow and config

commit 2764b48693
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:15:33 2022 +0200

    add mkdocs workflow

commit 1bd22523b1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 00:57:37 2022 +0200
    I already begun with formating /  revising the sites

* change repository in mkdocs config to lstein

* adapt changes from repos main README.md

* add PR to mkdocs-flow

* update docs/index.md
- removed unecessary headlines
- added instructions how to host the docs locally
- removed TOC since it is already available via MkDocs
- update appearance of the latest changes

* Update appearance of docs/featuers/changelog

* add me to the contributors
and a small cosmetical change to docs/other/CLI.md

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 14:35:22 -04:00
54b9cb49c1 Merge branch 'development' into development 2022-09-15 11:09:27 -04:00
60b731e7ab Update dream.py. k_euler_a and k_dpm_2_a M1 fix (#579)
* Update dream.py. k_euler_a and k_dpm_2_a M1 fix

Make results reproducible (so runs with the same seed produce the same result).
Implements fix by @wbowling referenced in https://github.com/lstein/stable-diffusion/issues/397#issuecomment-1240679294

* Update dream.py. Remove import torch from dream.py

* generate.py: k_euler_a and k_dpm_2_a M1 fix #579

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 11:02:17 -04:00
ec2dc24ad7 Mkdocs-material (#575)
* Squashed commit of the following:

commit 82d9c25d9a
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:29:11 2022 +0200

    fix branch name in mkdocs-flow

commit 2e276cecc1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:28:35 2022 +0200

    fix theme name

commit 2eb77c1173
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 19:14:42 2022 +0200

    fixed some links and formating in main README

commit 66a7152e48
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 08:58:58 2022 +0200

    trigger mkdocs deployment on main

commit 897cc373ce
Merge: 89da371 3b5a830
Author: Matthias Wild <40327258+mauwii@users.noreply.github.com>
Date:   Wed Sep 14 07:51:23 2022 +0200

    Merge pull request #1 from mauwii/mkdocs

    Mkdocs

commit 3b5a8308eb
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:42:56 2022 +0200

    huge update
    I was pretty busy trying to make the Readmes / docs  look good in MkDocs

commit 0b4f5a926f
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:41:45 2022 +0200

    update mkdocs config

commit 872172ea70
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 07:33:49 2022 +0200

    added the mkdocs-git-revision-date-plugin

commit eac81bf875
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 06:46:43 2022 +0200

    add  prettier config
    remove markdownlint
    move and rename requirements-mkdocs.txt

commit b36d4cc088
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 02:06:39 2022 +0200

    add dark theme

commit a14f18fede
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:38:02 2022 +0200

    update mkdocs flow and config

commit 2764b48693
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 01:15:33 2022 +0200

    add mkdocs workflow

commit 1bd22523b1
Author: mauwii <Mauwii@outlook.de>
Date:   Wed Sep 14 00:57:37 2022 +0200
    I already begun with formating /  revising the sites

* change repository in mkdocs config to lstein

* adapt changes from repos main README.md

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-15 10:53:41 -04:00
357e1ad35f Merge branch 'development' into development 2022-09-15 09:59:11 -04:00
340189fa0d fixup 2022-09-15 15:52:36 +02:00
8d2afefe6a fixup 2022-09-15 15:45:48 +02:00
9faf7025c6 fixup 2022-09-15 15:39:03 +02:00
511924c9ab fixup 2022-09-15 15:37:27 +02:00
4d997145b4 Add -D for outpainting 2022-09-15 15:34:23 +02:00
9df743e2bf Web cleanup (#539)
* Refactor generate.py and dream.py

* config file path (models.yaml) is parsed inside Generate() to simplify
API

* Better handling of keyboard interrupts in file loading mode vs
interactive

* Removed oodles of unused variables.

* move nonfunctional inpainting out of the scripts directory

* fix ugly ddim tqdm formatting

* fix embiggen breakage, formatting fixes
2022-09-15 07:43:43 -04:00
ccb2b7c2fb Use cuda only when available in main.py. (#567)
Allows testing textual inversion / training flow on cpu only (very slow though).
Context: #508
2022-09-15 07:41:24 -04:00
30e69f8b32 Fix image location on webpage - windows (#568) 2022-09-15 07:40:27 -04:00
df4d1162b5 docs: VARIATIONS.md used wrong syntax in examples (#589) 2022-09-15 07:21:17 -04:00
81bb44319a Hopefully fix embiggen for CPU users, change embiggen seeding behavior, tweak gradient corner 2022-09-14 21:08:16 -04:00
bb05a43787 Make embiggen_tiles masking more intelligent and count from one (at least for the user), rewrite sections of Embiggen README, fix various typos throughout README
drop duplicate log message
2022-09-14 20:44:42 -04:00
66ff890b85 Merge branch 'development' into development 2022-09-14 20:03:39 -04:00
dd3fff1d3e ~7% speedup by switch to += in ldm.modules.attention. (#569)
Tested on 8GB eGPU nvidia setup so YMMV.
Re-land with .clone() fix, context #508
2022-09-14 18:10:33 -04:00
d8d2043467 Merge branch 'development' into development 2022-09-14 12:54:04 -04:00
94a7b3cc07 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-14 10:05:32 -04:00
b02ea331df Clarify behavior of -v and -n parameters (#551)
Fixes https://github.com/lstein/stable-diffusion/issues/544
2022-09-14 09:47:17 -04:00
9208bfd151 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-14 07:13:32 -04:00
80579a30e5 Merge branch 'development' into development 2022-09-14 07:10:39 -04:00
5818528aa6 fix web server handling of rel and abs outdir paths (#550)
* fix web server handling of rel and abs outdir paths
* Can now specify either a relative or absolute path for outdir
* Outdir path does not need to be inside the stable-diffusion directory
* Closes security hole that allowed user to read any file within
stable-diffusion (eek!)
* Closes #536
2022-09-14 07:09:01 -04:00
6ec7eab85a Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-14 07:07:20 -04:00
e6179af46a Refactor generate.py and dream.py (#534)
* revert inadvertent change of conda env name (#528)

* Refactor generate.py and dream.py

* config file path (models.yaml) is parsed inside Generate() to simplify
API

* Better handling of keyboard interrupts in file loading mode vs
interactive

* Removed oodles of unused variables.

* move nonfunctional inpainting out of the scripts directory

* fix ugly ddim tqdm formatting
2022-09-14 07:02:31 -04:00
d15c75ecae TOIL(pip): Refactor pip requirements across the board (#531)
* Refactor pip requirements across the board

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* fix name, version in setup.py

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* Update notebooks for new requirements file changes

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-14 07:01:58 -04:00
2e438542e9 * Fixes and updates for PR. 2022-09-13 21:56:17 -04:00
54c5665635 Merge branch 'development' into development 2022-09-13 21:26:34 -04:00
8a8c093795 Merge branch 'lstein:main' into main 2022-09-13 14:58:43 -05:00
7fa45b0540 Merge branch 'main' into development 2022-09-13 15:50:26 -04:00
89da371f48 Fix images in Variations example (#537)
Images had their relative paths broken. Adjust paths.
2022-09-13 15:17:26 -04:00
10c51b4f35 Minor cleanup and re-arranging of PATH docs (#533)
* slightly more consistent in how the different scenarios are described
* moved the stuff about `/usr/bin/python` to be adjacent to the stuff about `/usr/bin/python3`
* added an example of the 'option 1' goal state
* described a way to directly answer the question: how many snakes are living in your computer?
2022-09-13 15:13:47 -04:00
ecb84ecc10 Add missing contributors.
* A more systematic review of contributors needed.
2022-09-13 11:38:43 -04:00
0d1aad53ef Merge branch 'development' into development 2022-09-13 10:57:05 -04:00
d0a71dc361 Update attention.py for 16-32GB M1 performance (#540)
Code cleanup and attention.py einsum_ops update for M1 16-32GB performance.
Expected: On par with fastest ever from 8 to 128GB for 512x512. Allows large images.
2022-09-13 10:53:45 -04:00
f31aa32e4d Merge branch 'development' into development 2022-09-13 09:11:53 -04:00
e1a6d0c138 web server does not supply embiggen options yet (#535) 2022-09-13 08:29:14 -04:00
0aa3dfbc35 Update link to guide on Docker, supported architectures, and platform specifiers. 2022-09-12 23:46:45 -05:00
5ad080f056 Update dev with upstream changes 2022-09-12 23:31:06 -05:00
d4941ca833 Doc cleanup 2022-09-12 22:17:37 -05:00
00b002f731 Move README-Docker to docs folder 2022-09-12 22:01:40 -05:00
82a223c5f6 Remove Apple silicon section 2022-09-12 21:52:23 -05:00
654ec17000 Remove Apple silicon section 2022-09-12 21:43:15 -05:00
e1f6ea2be7 Merge branch 'development' of https://github.com/pbaylies/stable-diffusion into development 2022-09-12 18:35:25 -04:00
5941ee620c * check for missing parameters. 2022-09-12 18:35:10 -04:00
a18d0b9ef1 Squashed commit of the following:
commit 9b28c65e4b
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 18:10:27 2022 -0400

    revert inadvertent change of conda env name (#528)
2022-09-12 18:12:44 -04:00
eeecc33aaa Merge branch 'lstein:main' into main 2022-09-12 17:12:38 -05:00
dfad1dccf4 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-12 18:12:08 -04:00
d016017b6d Merge branch 'main' into development 2022-09-12 18:11:14 -04:00
9b28c65e4b revert inadvertent change of conda env name (#528) 2022-09-12 18:10:27 -04:00
0a6c98e47d Merge branch 'development' into development 2022-09-12 17:58:27 -04:00
dedf8a3692 Remove pointless del statements in diffusionmodules.model. (#520) 2022-09-12 17:39:06 -04:00
993158fc6a Merge branch 'lstein:main' into main 2022-09-12 16:18:05 -05:00
5e15f1e017 Merge branch 'development' into development 2022-09-12 16:59:15 -04:00
b9592ff2dc document ability to use -ve numbers to retrieve previous seeds and image paths (#524) 2022-09-12 16:55:39 -04:00
0bc6779361 Disable autocast for cpu to fix error. Remove unused precision arg. (#518)
When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
2022-09-12 16:55:21 -04:00
2a292d5b82 * Fallback in case we don't have get_noise() (using the base class for some reason...) 2022-09-12 16:52:22 -04:00
4a5a228fd8 Merge branch 'development' into development 2022-09-12 16:34:10 -04:00
6665f4494f Add documentation for Embiggen
This was originally part of PR #437, but was inside README.md
which was refactored. Now it is a standalone doc.
2022-09-12 15:46:07 -04:00
dbf2c63c90 Add Embiggen automation to upscale-cut-img2img-stitch and achieve high res without extra VRAM (#437)
* Add Embiggen automation

* Make embiggen_tiles masking more intelligent and count from one (at least for the user), rewrite sections of Embiggen README, fix various typos throughout README

* drop duplicate log message
2022-09-12 15:37:26 -04:00
bf1beaa607 revert 49a96b90 due to conflicts during training 2022-09-12 14:34:36 -04:00
7dee9efb24 Merge branch 'development' into main 2022-09-12 14:33:05 -04:00
9d6d728b51 Squashed commit of the following:
commit 1c649e4663
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 13:29:16 2022 -0400

    fix torchvision dependency version #511

commit 4d197f699e
Merge: a3e07fb 190ba78
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 07:29:19 2022 -0400

    Merge branch 'development' of github.com:lstein/stable-diffusion into development

commit a3e07fb84a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 07:28:58 2022 -0400

    fix grid crash

commit 9fa1f31bf2
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 07:07:05 2022 -0400

    fix opencv and realesrgan dependencies in mac install

commit 190ba78960
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 12 01:50:58 2022 -0400

    Update requirements-mac.txt

    Fixed dangling dash on last line.

commit 25d9ccc509
Author: Any-Winter-4079 <50542132+Any-Winter-4079@users.noreply.github.com>
Date:   Mon Sep 12 03:17:29 2022 +0200

    Update model.py

commit 9cdf3aca7d
Author: Any-Winter-4079 <50542132+Any-Winter-4079@users.noreply.github.com>
Date:   Mon Sep 12 02:52:36 2022 +0200

    Update attention.py

    Performance improvements to generate larger images in M1 #431

    Update attention.py

    Added dtype=r1.dtype to softmax

commit 49a96b90d8
Author: Mihai <299015+mh-dm@users.noreply.github.com>
Date:   Sat Sep 10 16:58:07 2022 +0300

    ~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.attention. (#482)

    Tested on 8GB eGPU nvidia setup so YMMV.
    512x512 output, max VRAM stays same.

commit aba94b85e8
Author: Niek van der Maas <mail@niekvandermaas.nl>
Date:   Fri Sep 9 15:01:37 2022 +0200

    Fix macOS `pyenv` instructions, add code block highlight (#441)

    Fix: `anaconda3-latest` does not work, specify the correct virtualenv, add missing init.

commit aac5102cf3
Author: Henry van Megen <h.vanmegen@gmail.com>
Date:   Thu Sep 8 05:16:35 2022 +0200

    Disabled debug output (#436)

    Co-authored-by: Henry van Megen <hvanmegen@gmail.com>

commit 0ab5a36464
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 17:19:46 2022 -0400

    fix missing lines in outputs

commit 5e433728b5
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 16:20:14 2022 -0400

    upped max_steps in v1-finetune.yaml and fixed TI docs to address #493

commit 7708f4fb98
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 16:03:37 2022 -0400

    slight efficiency gain by using += in attention.py

commit b86a1deb00
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Mon Sep 12 07:47:12 2022 +1200

    Remove print statement styling (#504)

    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit 4951e66103
Author: chromaticist <mhostick@gmail.com>
Date:   Sun Sep 11 12:44:26 2022 -0700

    Adding support for .bin files from huggingface concepts (#498)

    * Adding support for .bin files from huggingface concepts

    * Updating documentation to include huggingface .bin info

commit 79b445b0ca
Merge: a323070 f7662c1
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 15:39:38 2022 -0400

    Merge branch 'development' of github.com:lstein/stable-diffusion into development

commit a323070a4d
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 15:28:57 2022 -0400

    update requirements for new location of gfpgan

commit f7662c1808
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 15:00:24 2022 -0400

    update requirements for changed location of gfpgan

commit 93c242c9fb
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:47:58 2022 -0400

    make gfpgan_model_exists flag available to web interface

commit c7c6cd7735
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:43:07 2022 -0400

    Update UPSCALE.md

    New instructions needed to accommodate fact that the ESRGAN and GFPGAN packages are now installed by environment.yaml.

commit 77ca83e103
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:31:56 2022 -0400

    Update CLI.md

    Final documentation tweak.

commit 0ea145d188
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:29:26 2022 -0400

    Update CLI.md

    More doc fixes.

commit 162285ae86
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:28:45 2022 -0400

    Update CLI.md

    Minor documentation fix

commit 37c921dfe2
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 14:26:41 2022 -0400

    documentation enhancements

commit 4f72cb44ad
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 13:05:38 2022 -0400

    moved the notebook files into their own directory

commit 878ef2e9e0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 12:58:06 2022 -0400

    documentation tweaks

commit 4923118610
Merge: 16f6a67 defafc0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 12:51:25 2022 -0400

    Merge branch 'development' of github.com:lstein/stable-diffusion into development

commit defafc0e8e
Author: Dominic Letz <dominic@diode.io>
Date:   Sun Sep 11 18:51:01 2022 +0200

    Enable upscaling on m1 (#474)

commit 16f6a6731d
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 12:47:26 2022 -0400

    install GFPGAN inside SD repository in order to fix 'dark cast' issue #169

commit 0881d429f2
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Mon Sep 12 03:52:43 2022 +1200

    Docs Update (#466)

    Authored-by: @blessedcoolant
    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit 9a29d442b4
Author: Gérald LONLAS <gerald@lonlas.com>
Date:   Sun Sep 11 23:23:18 2022 +0800

    Revert "Add 3x Upscale option on the Web UI (#442)" (#488)

    This reverts commit f8a540881c.

commit d301836fbd
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 10:52:19 2022 -0400

    can select prior output for init_img using -1, -2, etc

commit 70aa674e9e
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 10:34:06 2022 -0400

    merge PR #495 - keep using float16 in ldm.modules.attention

commit 8748370f44
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 10:22:32 2022 -0400

    negative -S indexing recovers correct previous seed; closes issue #476

commit 839e30e4b8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 11 10:02:44 2022 -0400

    improve CUDA VRAM monitoring

    extra check that device==cuda before getting VRAM stats

commit bfb2781279
Author: tildebyte <337875+tildebyte@users.noreply.github.com>
Date:   Sat Sep 10 10:15:56 2022 -0400

    fix(readme): add note about updating env via conda (#475)

commit 5c43988862
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 10 10:02:43 2022 -0400

    reduce VRAM memory usage by half during model loading

    * This moves the call to half() before model.to(device) to avoid GPU
    copy of full model. Improves speed and reduces memory usage dramatically

    * This fix contributed by @mh-dm (Mihai)

commit 99122708ca
Merge: 817c4a2 ecc6b75
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 10 09:54:34 2022 -0400

    Merge branch 'development' of github.com:lstein/stable-diffusion into development

commit 817c4a26de
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 10 09:53:27 2022 -0400

    remove -F option from normalized prompt; closes #483

commit ecc6b75a3e
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 10 09:53:27 2022 -0400

    remove -F option from normalized prompt

commit 723d074442
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Sep 9 18:49:51 2022 -0400

    Allow ctrl c when using --from_file (#472)

    * added ansi escapes to highlight key parts of CLI session

    * adjust exception handling so that ^C will abort when reading prompts from a file

commit 75f633cda8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Sep 9 12:03:45 2022 -0400

    re-add new logo

commit 10db192cc4
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Fri Sep 9 09:26:10 2022 -0400

    changes to dogettx optimizations to run on m1
    * Author @any-winter-4079
    * Author @dogettx
    Thanks to many individuals who contributed time and hardware to
    benchmarking and debugging these changes.

commit c85ae00b33
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 23:57:45 2022 -0400

    fix bug which caused seed to get "stuck" on previous image even when UI specified -1

commit 1b5aae3ef3
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:36:47 2022 -0400

    add icon to dream web server

commit 6abf739315
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:25:09 2022 -0400

    add favicon to web server

commit db825b8138
Merge: 33874ba afee7f9
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:17:37 2022 -0400

    Merge branch 'deNULL-development' into development

commit 33874bae8d
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:16:29 2022 -0400

    Squashed commit of the following:

    commit afee7f9cea
    Merge: 6531446 171f8db
    Author: Lincoln Stein <lincoln.stein@gmail.com>
    Date:   Thu Sep 8 22:14:32 2022 -0400

        Merge branch 'development' of github.com:deNULL/stable-diffusion into deNULL-development

    commit 171f8db742
    Author: Denis Olshin <me@denull.ru>
    Date:   Thu Sep 8 03:15:20 2022 +0300

        saving full prompt to metadata when using web ui

    commit d7e67b62f0
    Author: Denis Olshin <me@denull.ru>
    Date:   Thu Sep 8 01:51:47 2022 +0300

        better logic for clicking to make variations

commit afee7f9cea
Merge: 6531446 171f8db
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:14:32 2022 -0400

    Merge branch 'development' of github.com:deNULL/stable-diffusion into deNULL-development

commit 653144694f
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 20:41:37 2022 -0400

    work around unexplained crash when timesteps=1000 (#440)

    * work around unexplained crash when timesteps=1000

    * this fix seems to work

commit c33a84cdfd
Author: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Date:   Fri Sep 9 12:39:51 2022 +1200

    Add New Logo (#454)

    * Add instructions on how to install alongside pyenv (#393)

    Like probably many others, I have a lot of different virtualenvs, one for each project. Most of them are handled by `pyenv`.
    After installing according to these instructions I had issues with ´pyenv`and `miniconda` fighting over the $PATH of my system.
    But then I stumbled upon this nice solution on SO: https://stackoverflow.com/a/73139031 , upon which I have based my suggested changes.

    It runs perfectly on my M1 setup, with the anaconda setup as a virtual environment handled by pyenv.

    Feel free to incorporate these instructions as you see fit.

    Thanks a million for all your hard work.

    * Disabled debug output (#436)

    Co-authored-by: Henry van Megen <hvanmegen@gmail.com>

    * Add New Logo

    Co-authored-by: Håvard Gulldahl <havard@lurtgjort.no>
    Co-authored-by: Henry van Megen <h.vanmegen@gmail.com>
    Co-authored-by: Henry van Megen <hvanmegen@gmail.com>
    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit f8a540881c
Author: Gérald LONLAS <gerald@lonlas.com>
Date:   Fri Sep 9 01:45:54 2022 +0800

    Add 3x Upscale option on the Web UI (#442)

commit 244239e5f6
Author: James Reynolds <magnusviri@users.noreply.github.com>
Date:   Thu Sep 8 05:36:33 2022 -0600

    macOS CI workflow, dream.py exits with an error, but the workflow com… (#396)

    * macOS CI workflow, dream.py exits with an error, but the workflow completes.

    * Files for testing

    Co-authored-by: James Reynolds <magnsuviri@me.com>
    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit 711d49ed30
Author: James Reynolds <magnusviri@users.noreply.github.com>
Date:   Thu Sep 8 05:35:08 2022 -0600

    Cache model workflow (#394)

    * Add workflow that caches the model, step 1 for CI

    * Change name of workflow job

    Co-authored-by: James Reynolds <magnsuviri@me.com>
    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit 7996a30e3a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 07:34:03 2022 -0400

    add auto-creation of mask for inpainting (#438)

    * now use a single init image for both image and mask

    * turn on debugging for now to write out mask and image

    * add back -M option as a fallback

commit a69ca31f34
Author: elliotsayes <elliotsayes@gmail.com>
Date:   Thu Sep 8 15:30:06 2022 +1200

    .gitignore WebUI temp files (#430)

    * Add instructions on how to install alongside pyenv (#393)

    Like probably many others, I have a lot of different virtualenvs, one for each project. Most of them are handled by `pyenv`.
    After installing according to these instructions I had issues with ´pyenv`and `miniconda` fighting over the $PATH of my system.
    But then I stumbled upon this nice solution on SO: https://stackoverflow.com/a/73139031 , upon which I have based my suggested changes.

    It runs perfectly on my M1 setup, with the anaconda setup as a virtual environment handled by pyenv.

    Feel free to incorporate these instructions as you see fit.

    Thanks a million for all your hard work.

    * .gitignore WebUI temp files

    Co-authored-by: Håvard Gulldahl <havard@lurtgjort.no>

commit 5c6b612a72
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Sep 7 22:50:55 2022 -0400

    fix bug that caused same seed to be redisplayed repeatedly

commit 56f155c590
Author: Johan Roxendal <johan@roxendal.com>
Date:   Thu Sep 8 04:50:06 2022 +0200

    added support for parsing run log and displaying images in the frontend init state (#410)

    Co-authored-by: Johan Roxendal <johan.roxendal@litteraturbanken.se>
    Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>

commit 41687746be
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Sep 7 20:24:35 2022 -0400

    added missing initialization of latent_noise to None

commit 171f8db742
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 03:15:20 2022 +0300

    saving full prompt to metadata when using web ui

commit d7e67b62f0
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 01:51:47 2022 +0300

    better logic for clicking to make variations

commit d1d044aa87
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Sep 7 17:56:59 2022 -0400

    actual image seed now written into web log rather than -1 (#428)

commit edada042b3
Author: Arturo Mendivil <60411196+artmen1516@users.noreply.github.com>
Date:   Wed Sep 7 10:42:26 2022 -0700

    Improve notebook and add requirements file (#422)

commit 29ab3c2028
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Sep 7 13:28:11 2022 -0400

    disable neonpixel optimizations on M1 hardware (#414)

    * disable neonpixel optimizations on M1 hardware

    * fix typo that was causing random noise images on m1

commit 7670ecc63f
Author: cody <cnmizell@gmail.com>
Date:   Wed Sep 7 12:24:41 2022 -0500

    add more keyboard support on the web server (#391)

    add ability to submit prompts with the "enter" key
    add ability to cancel generations with the "escape" key

commit dd2aedacaf
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Wed Sep 7 13:23:53 2022 -0400

    report VRAM usage stats during initial model loading (#419)

commit f6284777e6
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Tue Sep 6 17:12:39 2022 -0400

    Squashed commit of the following:

    commit 7d1344282d942a33dcecda4d5144fc154ec82915
    Merge: caf4ea3 ebeb556
    Author: Lincoln Stein <lincoln.stein@gmail.com>
    Date:   Mon Sep 5 10:07:27 2022 -0400

        Merge branch 'development' of github.com:WebDev9000/stable-diffusion into WebDev9000-development

    commit ebeb556af9
    Author: Web Dev 9000 <rirath@gmail.com>
    Date:   Sun Sep 4 18:05:15 2022 -0700

        Fixed unintentionally removed lines

    commit ff2c4b9a1b
    Author: Web Dev 9000 <rirath@gmail.com>
    Date:   Sun Sep 4 17:50:13 2022 -0700

        Add ability to recreate variations via image click

    commit c012929cda
    Author: Web Dev 9000 <rirath@gmail.com>
    Date:   Sun Sep 4 14:35:33 2022 -0700

        Add files via upload

    commit 02a6018992
    Author: Web Dev 9000 <rirath@gmail.com>
    Date:   Sun Sep 4 14:35:07 2022 -0700

        Add files via upload

commit eef788981c
Author: Olivier Louvignes <olivier@mg-crea.com>
Date:   Tue Sep 6 12:41:08 2022 +0200

    feat(txt2img): allow from_file to work with len(lines) < batch_size (#349)

commit 720e5cd651
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 5 20:40:10 2022 -0400

    Refactoring simplet2i (#387)

    * start refactoring -not yet functional

    * first phase of refactor done - not sure weighted prompts working

    * Second phase of refactoring. Everything mostly working.
    * The refactoring has moved all the hard-core inference work into
    ldm.dream.generator.*, where there are submodules for txt2img and
    img2img. inpaint will go in there as well.
    * Some additional refactoring will be done soon, but relatively
    minor work.

    * fix -save_orig flag to actually work

    * add @neonsecret attention.py memory optimization

    * remove unneeded imports

    * move token logging into conditioning.py

    * add placeholder version of inpaint; porting in progress

    * fix crash in img2img

    * inpainting working; not tested on variations

    * fix crashes in img2img

    * ported attention.py memory optimization #117 from basujindal branch

    * added @torch_no_grad() decorators to img2img, txt2img, inpaint closures

    * Final commit prior to PR against development
    * fixup crash when generating intermediate images in web UI
    * rename ldm.simplet2i to ldm.generate
    * add backward-compatibility simplet2i shell with deprecation warning

    * add back in mps exception, addresses @vargol comment in #354

    * replaced Conditioning class with exported functions

    * fix wrong type of with_variations attribute during intialization

    * changed "image_iterator()" to "get_make_image()"

    * raise NotImplementedError for calling get_make_image() in parent class

    * Update ldm/generate.py

    better error message

    Co-authored-by: Kevin Gibbons <bakkot@gmail.com>

    * minor stylistic fixes and assertion checks from code review

    * moved get_noise() method into img2img class

    * break get_noise() into two methods, one for txt2img and the other for img2img

    * inpainting works on non-square images now

    * make get_noise() an abstract method in base class

    * much improved inpainting

    Co-authored-by: Kevin Gibbons <bakkot@gmail.com>

commit 1ad2a8e567
Author: thealanle <35761977+thealanle@users.noreply.github.com>
Date:   Mon Sep 5 17:35:04 2022 -0700

    Fix --outdir function for web (#373)

    * Fix --outdir function for web

    * Removed unnecessary hardcoded path

commit 52d8bb2836
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 5 10:31:59 2022 -0400

    Squashed commit of the following:

    commit 0cd48e932f1326e000c46f4140f98697eb9bdc79
    Author: Lincoln Stein <lincoln.stein@gmail.com>
    Date:   Mon Sep 5 10:27:43 2022 -0400

        resolve conflicts with development

    commit d7bc8c12e0
    Author: Scott McMillin <scott@scottmcmillin.com>
    Date:   Sun Sep 4 18:52:09 2022 -0500

        Add title attribute back to img tag

    commit 5397c89184
    Author: Scott McMillin <scott@scottmcmillin.com>
    Date:   Sun Sep 4 13:49:46 2022 -0500

        Remove temp code

    commit 1da080b509
    Author: Scott McMillin <scott@scottmcmillin.com>
    Date:   Sun Sep 4 13:33:56 2022 -0500

        Cleaned up HTML; small style changes; image click opens image; add seed to figcaption beneath image

commit caf4ea3d89
Author: Adam Rice <adam@askadam.io>
Date:   Mon Sep 5 10:05:39 2022 -0400

    Add a 'Remove Image' button to clear the file upload field (#382)

    * added "remove image" button

    * styled a new "remove image" button

    * Update index.js

commit 95c088b303
Author: Kevin Gibbons <bakkot@gmail.com>
Date:   Sun Sep 4 19:04:14 2022 -0700

    Revert "Add CORS headers to dream server to ease integration with third-party web interfaces" (#371)

    This reverts commit 91e826e5f4.

commit a20113d5a3
Author: Kevin Gibbons <bakkot@gmail.com>
Date:   Sun Sep 4 18:59:12 2022 -0700

    put no_grad decorator on make_image closures (#375)

commit 0f93dadd6a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 4 21:39:15 2022 -0400

    fix several dangling references to --gfpgan option, which no longer exists

commit f4004f660e
Author: tildebyte <337875+tildebyte@users.noreply.github.com>
Date:   Sun Sep 4 19:43:04 2022 -0400

    TOIL(requirements): Split requirements to per-platform (#355)

    * toil(reqs): split requirements to per-platform

    Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

    * toil(reqs): fix for Win and Lin...

    ...allow pip to resolve latest torch, numpy

    Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

    * toil(install): update reqs in Win install notebook

    Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

    Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

commit 4406fd138d
Merge: 5116c81 fd7a72e
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 4 08:23:53 2022 -0400

    Merge branch 'SebastianAigner-main' into development
    Add support for full CORS headers for dream server.

commit fd7a72e147
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 4 08:23:11 2022 -0400

    remove debugging message

commit 3a2be621f3
Merge: 91e826e 5116c81
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sun Sep 4 08:15:51 2022 -0400

    Merge branch 'development' into main

commit 5116c8178c
Author: Justin Wong <1584142+wongjustin99@users.noreply.github.com>
Date:   Sun Sep 4 07:17:58 2022 -0400

    fix save_original flag saving to the same filename (#360)

    * Update README.md with new Anaconda install steps (#347)

    pip3 version did not work for me and this is the recommended way to install Anaconda now it seems

    * fix save_original flag saving to the same filename

    Before this, the `--save_orig` flag was not working. The upscaled/GFPGAN would overwrite the original output image.

    Co-authored-by: greentext2 <112735219+greentext2@users.noreply.github.com>

commit 91e826e5f4
Author: Sebastian Aigner <SebastianAigner@users.noreply.github.com>
Date:   Sun Sep 4 10:22:54 2022 +0200

    Add CORS headers to dream server to ease integration with third-party web interfaces

commit 6266d9e8d6
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 15:45:20 2022 -0400

    remove stray debugging message

commit 138956e516
Author: greentext2 <112735219+greentext2@users.noreply.github.com>
Date:   Sat Sep 3 13:38:57 2022 -0500

    Update README.md with new Anaconda install steps (#347)

    pip3 version did not work for me and this is the recommended way to install Anaconda now it seems

commit 60be735e80
Author: Cora Johnson-Roberson <cora.johnson.roberson@gmail.com>
Date:   Sat Sep 3 14:28:34 2022 -0400

    Switch to regular pytorch channel and restore Python 3.10 for Macs. (#301)

    * Switch to regular pytorch channel and restore Python 3.10 for Macs.

    Although pytorch-nightly should in theory be faster, it is currently
    causing increased memory usage and slower iterations:

    https://github.com/lstein/stable-diffusion/pull/283#issuecomment-1234784885

    This changes the environment-mac.yaml file back to the regular pytorch
    channel and moves the `transformers` dep into pip for now (since it
    cannot be satisfied until tokenizers>=0.11 is built for Python 3.10).

    * Specify versions for Pip packages as well.

commit d0d95d3a2a
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 14:10:31 2022 -0400

    make initimg appear in web log

commit b90a215000
Merge: 1eee811 6270e31
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 13:47:15 2022 -0400

    Merge branch 'prixt-seamless' into development

commit 6270e313b8
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 13:46:29 2022 -0400

    add credit to prixt for seamless circular tiling

commit a01b7bdc40
Merge: 1eee811 9d88abe
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 13:43:04 2022 -0400

    add web interface for seamless option

commit 1eee8111b9
Merge: 64eca42 fb857f0
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 12:33:39 2022 -0400

    Merge branch 'development' of github.com:lstein/stable-diffusion into development

commit 64eca42610
Merge: 9130ad7 21a1f68
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 12:33:05 2022 -0400

    Merge branch 'main' into development
    * brings in small documentation fixes that were
    added directly to main during release tweaking.

commit fb857f05ba
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Sat Sep 3 12:07:07 2022 -0400

    fix typo in docs

commit 9d88abe2ea
Author: prixt <paraxite@naver.com>
Date:   Sat Sep 3 22:42:16 2022 +0900

    fixed typo

commit a61e49bc97
Author: prixt <paraxite@naver.com>
Date:   Sat Sep 3 22:39:35 2022 +0900

    * Removed unnecessary code
    * Added description about --seamless

commit 02bee4fdb1
Author: prixt <paraxite@naver.com>
Date:   Sat Sep 3 16:08:03 2022 +0900

    added --seamless tag logging to normalize_prompt

commit d922b53c26
Author: prixt <paraxite@naver.com>
Date:   Sat Sep 3 15:13:31 2022 +0900

    added seamless tiling mode and commands
2022-09-12 14:31:48 -04:00
1c649e4663 fix torchvision dependency version #511 2022-09-12 13:29:16 -04:00
ea60d036d1 Merge branch 'development' into development 2022-09-12 10:37:49 -04:00
4d197f699e Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-12 07:29:19 -04:00
a3e07fb84a fix grid crash 2022-09-12 07:28:58 -04:00
9fa1f31bf2 fix opencv and realesrgan dependencies in mac install 2022-09-12 07:07:05 -04:00
77db46f99e Merge branch 'development' into development 2022-09-12 04:50:40 -04:00
190ba78960 Update requirements-mac.txt
Fixed dangling dash on last line.
2022-09-12 01:50:58 -04:00
012c0dfdeb [Documentation] Cleanup 2022-09-11 22:11:34 -05:00
25d9ccc509 Update model.py 2022-09-11 22:37:45 -04:00
9cdf3aca7d Update attention.py
Performance improvements to generate larger images in M1 #431

Update attention.py

Added dtype=r1.dtype to softmax
2022-09-11 22:36:58 -04:00
49a96b90d8 ~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.attention. (#482)
Tested on 8GB eGPU nvidia setup so YMMV.
512x512 output, max VRAM stays same.
2022-09-11 22:35:37 -04:00
aba94b85e8 Fix macOS pyenv instructions, add code block highlight (#441)
Fix: `anaconda3-latest` does not work, specify the correct virtualenv, add missing init.
2022-09-11 22:34:39 -04:00
aac5102cf3 Disabled debug output (#436)
Co-authored-by: Henry van Megen <hvanmegen@gmail.com>
2022-09-11 22:34:35 -04:00
c705ff5e72 [Documentation] Fix typo 2022-09-11 19:26:42 -05:00
b20f2bcd7e [Documentation] Why containers? 2022-09-11 19:09:05 -05:00
95f4ae4c1e Update README.md 2022-09-11 19:06:08 -04:00
a73017939f Update OTHER.md 2022-09-11 19:04:40 -04:00
45673e8723 Merge branch 'development' into development 2022-09-11 19:03:29 -04:00
3f8a289e9b [Documentation] Clarification on which conda installer to use 2022-09-11 16:23:04 -05:00
0ab5a36464 fix missing lines in outputs 2022-09-11 17:19:46 -04:00
443a4ad87c [Documentation] Updates on Docker platform 2022-09-11 15:57:32 -05:00
585b47fdd1 Docker platform now configurable. No longer Mac-specific 2022-09-11 15:36:09 -05:00
5e433728b5 upped max_steps in v1-finetune.yaml and fixed TI docs to address #493 2022-09-11 16:20:14 -04:00
7708f4fb98 slight efficiency gain by using += in attention.py 2022-09-11 16:03:54 -04:00
b86a1deb00 Remove print statement styling (#504)
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-11 15:47:12 -04:00
4951e66103 Adding support for .bin files from huggingface concepts (#498)
* Adding support for .bin files from huggingface concepts

* Updating documentation to include huggingface .bin info
2022-09-11 15:44:26 -04:00
79b445b0ca Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-11 15:39:38 -04:00
a323070a4d update requirements for new location of gfpgan 2022-09-11 15:28:57 -04:00
f7662c1808 update requirements for changed location of gfpgan 2022-09-11 15:00:24 -04:00
93c242c9fb make gfpgan_model_exists flag available to web interface 2022-09-11 14:47:58 -04:00
c7c6cd7735 Update UPSCALE.md
New instructions needed to accommodate fact that the ESRGAN and GFPGAN packages are now installed by environment.yaml.
2022-09-11 14:43:07 -04:00
77ca83e103 Update CLI.md
Final documentation tweak.
2022-09-11 14:31:56 -04:00
0ea145d188 Update CLI.md
More doc fixes.
2022-09-11 14:29:26 -04:00
162285ae86 Update CLI.md
Minor documentation fix
2022-09-11 14:28:45 -04:00
37c921dfe2 documentation enhancements 2022-09-11 14:26:41 -04:00
4f72cb44ad moved the notebook files into their own directory 2022-09-11 13:05:38 -04:00
878ef2e9e0 documentation tweaks 2022-09-11 12:58:06 -04:00
4923118610 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-11 12:51:25 -04:00
defafc0e8e Enable upscaling on m1 (#474) 2022-09-11 12:51:01 -04:00
16f6a6731d install GFPGAN inside SD repository in order to fix 'dark cast' issue #169 2022-09-11 12:47:26 -04:00
19fb66f3d5 Add comments on next steps 2022-09-11 11:03:33 -05:00
0881d429f2 Docs Update (#466)
Authored-by: @blessedcoolant 
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-11 11:52:43 -04:00
9a29d442b4 Revert "Add 3x Upscale option on the Web UI (#442)" (#488)
This reverts commit f8a540881c.
2022-09-11 11:23:18 -04:00
d301836fbd can select prior output for init_img using -1, -2, etc 2022-09-11 10:52:19 -04:00
da95729d90 Refactor docker build and move docker assets to their own folder 2022-09-11 09:47:54 -05:00
70aa674e9e merge PR #495 - keep using float16 in ldm.modules.attention 2022-09-11 10:34:06 -04:00
737a97c898 Merge branch 'development' into development 2022-09-11 10:30:23 -04:00
8748370f44 negative -S indexing recovers correct previous seed; closes issue #476 2022-09-11 10:22:32 -04:00
839e30e4b8 improve CUDA VRAM monitoring
extra check that device==cuda before getting VRAM stats
2022-09-11 10:10:24 -04:00
e21938c12d Remove unnecesary chmod from Dockerfile to avoid bloating 2022-09-11 02:04:11 -05:00
eeff8e9033 [Documentation] Add +x permissions to miniconda installer 2022-09-10 22:45:08 -05:00
336e16ef85 [Documentation] Fix typo 2022-09-10 19:31:39 -05:00
eceb7d2b54 [Documentation] Clarify path to use 2022-09-10 18:52:12 -05:00
9775a3502c Fix documentation link 2022-09-10 15:29:44 -05:00
f240e878e5 Merge branch 'docker-apple-silicon' 2022-09-10 14:41:11 -05:00
529fc57f2b ~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.attention. (#482)
Tested on 8GB eGPU nvidia setup so YMMV.
512x512 output, max VRAM stays same.
2022-09-10 14:07:12 -05:00
0ca9d1f228 Merge branch 'lstein:main' into main 2022-09-10 14:05:25 -05:00
b656d333de Add entrypoint and update documentation 2022-09-10 13:58:07 -05:00
7136603604 Ignore Anaconda/Miniconda installer used during Docker build 2022-09-10 13:58:07 -05:00
5cbea51f31 Initial version of Dockerfile and entreypoint 2022-09-10 13:58:07 -05:00
2cf8de9234 Add entrypoint and update documentation 2022-09-10 13:56:18 -05:00
f9239af7dc Ignore Anaconda/Miniconda installer used during Docker build 2022-09-10 12:42:05 -05:00
97c0c4bfe8 Initial version of Dockerfile and entreypoint 2022-09-10 12:38:31 -05:00
c6be8f320d Merge branch 'development' into development 2022-09-10 10:31:32 -04:00
bfb2781279 fix(readme): add note about updating env via conda (#475) 2022-09-10 10:15:56 -04:00
5c43988862 reduce VRAM memory usage by half during model loading
* This moves the call to half() before model.to(device) to avoid GPU
copy of full model. Improves speed and reduces memory usage dramatically

* This fix contributed by @mh-dm (Mihai)
2022-09-10 10:02:43 -04:00
62863ac586 ~7% speedup (1.57 to 1.69it/s) from switch to += in ldm.modules.attention. (#482)
Tested on 8GB eGPU nvidia setup so YMMV.
512x512 output, max VRAM stays same.
2022-09-10 09:58:07 -04:00
99122708ca Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-10 09:54:34 -04:00
817c4a26de remove -F option from normalized prompt; closes #483 2022-09-10 09:54:26 -04:00
ecc6b75a3e remove -F option from normalized prompt 2022-09-10 09:53:27 -04:00
bf707d9e75 * Use the right graphic. 2022-09-10 08:11:14 -04:00
db52991b9d Update README.md
Add descriptions for truncation and perlin noise, and link to a graphic.
2022-09-10 08:10:58 -04:00
a34d8813b6 * Add truncation / perlin comparison montage graphic. 2022-09-10 07:52:26 -04:00
103b3e7965 Merge branch 'development' into development 2022-09-10 07:43:54 -04:00
f74e52079b Update documentation 2022-09-09 23:24:29 -05:00
e3be28ecca Clean up instructioins 2022-09-09 23:24:29 -05:00
dbfc35ece2 Add README for Mac-Docker 2022-09-09 23:24:29 -05:00
4185afea5c Update documentation 2022-09-09 23:15:09 -05:00
723d074442 Allow ctrl c when using --from_file (#472)
* added ansi escapes to highlight key parts of CLI session

* adjust exception handling so that ^C will abort when reading prompts from a file
2022-09-09 18:49:51 -04:00
6d2084e030 Clean up instructioins 2022-09-09 15:46:14 -05:00
4a0354c604 Add README for Mac-Docker 2022-09-09 15:28:15 -05:00
424f4fe244 Merge branch 'development' into development 2022-09-09 13:15:43 -04:00
348b4b8be5 Add requirements file for linux container on Apple silicon 2022-09-09 11:11:55 -05:00
75f633cda8 re-add new logo 2022-09-09 12:03:45 -04:00
2b3acc7b87 Merge branch 'lstein:main' into docker-apple-silicon 2022-09-09 10:16:29 -05:00
044e1ec2a8 Add requirements file for linux container on Apple silicon 2022-09-09 09:55:48 -05:00
10db192cc4 changes to dogettx optimizations to run on m1
* Author @any-winter-4079
* Author @dogettx
Thanks to many individuals who contributed time and hardware to
benchmarking and debugging these changes.
2022-09-09 09:51:41 -04:00
79ac0f3420 Fix macOS pyenv instructions, add code block highlight (#441)
Fix: `anaconda3-latest` does not work, specify the correct virtualenv, add missing init.
2022-09-09 09:01:37 -04:00
c41599746d Merge branch 'development' into development 2022-09-09 00:19:17 -04:00
c85ae00b33 fix bug which caused seed to get "stuck" on previous image even when UI specified -1 2022-09-08 23:57:45 -04:00
7f0cc7072b Merge branch 'development' into development 2022-09-08 22:54:26 -04:00
1b5aae3ef3 add icon to dream web server 2022-09-08 22:36:47 -04:00
6abf739315 add favicon to web server 2022-09-08 22:25:09 -04:00
db825b8138 Merge branch 'deNULL-development' into development 2022-09-08 22:17:37 -04:00
33874bae8d Squashed commit of the following:
commit afee7f9cea
Merge: 6531446 171f8db
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Thu Sep 8 22:14:32 2022 -0400

    Merge branch 'development' of github.com:deNULL/stable-diffusion into deNULL-development

commit 171f8db742
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 03:15:20 2022 +0300

    saving full prompt to metadata when using web ui

commit d7e67b62f0
Author: Denis Olshin <me@denull.ru>
Date:   Thu Sep 8 01:51:47 2022 +0300

    better logic for clicking to make variations
2022-09-08 22:16:29 -04:00
afee7f9cea Merge branch 'development' of github.com:deNULL/stable-diffusion into deNULL-development 2022-09-08 22:14:32 -04:00
653144694f work around unexplained crash when timesteps=1000 (#440)
* work around unexplained crash when timesteps=1000

* this fix seems to work
2022-09-08 20:41:37 -04:00
c33a84cdfd Add New Logo (#454)
* Add instructions on how to install alongside pyenv (#393)

Like probably many others, I have a lot of different virtualenvs, one for each project. Most of them are handled by `pyenv`. 
After installing according to these instructions I had issues with ´pyenv`and `miniconda` fighting over the $PATH of my system.
But then I stumbled upon this nice solution on SO: https://stackoverflow.com/a/73139031 , upon which I have based my suggested changes.

It runs perfectly on my M1 setup, with the anaconda setup as a virtual environment handled by pyenv. 

Feel free to incorporate these instructions as you see fit. 

Thanks a million for all your hard work.

* Disabled debug output (#436)

Co-authored-by: Henry van Megen <hvanmegen@gmail.com>

* Add New Logo

Co-authored-by: Håvard Gulldahl <havard@lurtgjort.no>
Co-authored-by: Henry van Megen <h.vanmegen@gmail.com>
Co-authored-by: Henry van Megen <hvanmegen@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-08 20:39:51 -04:00
bd1715ff5c Merge branch 'development' into development 2022-09-08 16:31:48 -04:00
f8a540881c Add 3x Upscale option on the Web UI (#442) 2022-09-08 13:45:54 -04:00
c71d8750f7 Merge branch 'development' into development 2022-09-08 10:23:23 -04:00
244239e5f6 macOS CI workflow, dream.py exits with an error, but the workflow com… (#396)
* macOS CI workflow, dream.py exits with an error, but the workflow completes.

* Files for testing

Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-08 07:36:33 -04:00
711d49ed30 Cache model workflow (#394)
* Add workflow that caches the model, step 1 for CI

* Change name of workflow job

Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-08 07:35:08 -04:00
7996a30e3a add auto-creation of mask for inpainting (#438)
* now use a single init image for both image and mask

* turn on debugging for now to write out mask and image

* add back -M option as a fallback
2022-09-08 07:34:03 -04:00
d0832bfcaa Merge branch 'development' into development 2022-09-07 23:44:00 -04:00
a69ca31f34 .gitignore WebUI temp files (#430)
* Add instructions on how to install alongside pyenv (#393)

Like probably many others, I have a lot of different virtualenvs, one for each project. Most of them are handled by `pyenv`. 
After installing according to these instructions I had issues with ´pyenv`and `miniconda` fighting over the $PATH of my system.
But then I stumbled upon this nice solution on SO: https://stackoverflow.com/a/73139031 , upon which I have based my suggested changes.

It runs perfectly on my M1 setup, with the anaconda setup as a virtual environment handled by pyenv. 

Feel free to incorporate these instructions as you see fit. 

Thanks a million for all your hard work.

* .gitignore WebUI temp files

Co-authored-by: Håvard Gulldahl <havard@lurtgjort.no>
2022-09-07 23:30:06 -04:00
049ea02fc7 Disabled debug output (#436)
Co-authored-by: Henry van Megen <hvanmegen@gmail.com>
2022-09-07 23:16:35 -04:00
ab39bc0bac Merge branch 'development' into development 2022-09-07 23:15:09 -04:00
5c6b612a72 fix bug that caused same seed to be redisplayed repeatedly 2022-09-07 22:50:55 -04:00
56f155c590 added support for parsing run log and displaying images in the frontend init state (#410)
Co-authored-by: Johan Roxendal <johan.roxendal@litteraturbanken.se>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-09-07 22:50:06 -04:00
bd4fc64156 Merge branch 'development' into development 2022-09-07 21:30:39 -04:00
41687746be added missing initialization of latent_noise to None 2022-09-07 20:24:35 -04:00
171f8db742 saving full prompt to metadata when using web ui 2022-09-08 03:15:20 +03:00
d7e67b62f0 better logic for clicking to make variations 2022-09-08 01:51:47 +03:00
d1d044aa87 actual image seed now written into web log rather than -1 (#428) 2022-09-07 17:56:59 -04:00
8b0d1e59fe Merge branch 'development' into development 2022-09-07 15:23:58 -04:00
edada042b3 Improve notebook and add requirements file (#422) 2022-09-07 13:42:26 -04:00
29ab3c2028 disable neonpixel optimizations on M1 hardware (#414)
* disable neonpixel optimizations on M1 hardware

* fix typo that was causing random noise images on m1
2022-09-07 13:28:11 -04:00
7670ecc63f add more keyboard support on the web server (#391)
add ability to submit prompts with the "enter" key
add ability to cancel generations with the "escape" key
2022-09-07 13:24:41 -04:00
dd2aedacaf report VRAM usage stats during initial model loading (#419) 2022-09-07 13:23:53 -04:00
dc500946ad * Make warmup feature less aggressive to support higher thresholding values properly. 2022-09-07 04:50:53 -04:00
a48c03e0f4 Merge branch 'development' into development 2022-09-06 17:25:28 -04:00
f6284777e6 Squashed commit of the following:
commit 7d1344282d942a33dcecda4d5144fc154ec82915
Merge: caf4ea3 ebeb556
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 5 10:07:27 2022 -0400

    Merge branch 'development' of github.com:WebDev9000/stable-diffusion into WebDev9000-development

commit ebeb556af9
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 18:05:15 2022 -0700

    Fixed unintentionally removed lines

commit ff2c4b9a1b
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 17:50:13 2022 -0700

    Add ability to recreate variations via image click

commit c012929cda
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 14:35:33 2022 -0700

    Add files via upload

commit 02a6018992
Author: Web Dev 9000 <rirath@gmail.com>
Date:   Sun Sep 4 14:35:07 2022 -0700

    Add files via upload
2022-09-06 17:12:39 -04:00
7647490617 Merge branch 'development' into development 2022-09-06 08:08:43 -04:00
dbc8fc7900 Add instructions on how to install alongside pyenv (#393)
Like probably many others, I have a lot of different virtualenvs, one for each project. Most of them are handled by `pyenv`. 
After installing according to these instructions I had issues with ´pyenv`and `miniconda` fighting over the $PATH of my system.
But then I stumbled upon this nice solution on SO: https://stackoverflow.com/a/73139031 , upon which I have based my suggested changes.

It runs perfectly on my M1 setup, with the anaconda setup as a virtual environment handled by pyenv. 

Feel free to incorporate these instructions as you see fit. 

Thanks a million for all your hard work.
2022-09-06 07:07:10 -04:00
eef788981c feat(txt2img): allow from_file to work with len(lines) < batch_size (#349) 2022-09-06 06:41:08 -04:00
5b22acca6d Update dream.py 2022-09-05 23:11:15 -04:00
8c8b34a889 * Update to resolve conflicts. 2022-09-05 22:57:33 -04:00
7ff94383ce Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-05 22:57:03 -04:00
0891910cac * Updates for thresholding and perlin noise options, added warmup for thresholding. 2022-09-05 21:40:05 -04:00
720e5cd651 Refactoring simplet2i (#387)
* start refactoring -not yet functional

* first phase of refactor done - not sure weighted prompts working

* Second phase of refactoring. Everything mostly working.
* The refactoring has moved all the hard-core inference work into
ldm.dream.generator.*, where there are submodules for txt2img and
img2img. inpaint will go in there as well.
* Some additional refactoring will be done soon, but relatively
minor work.

* fix -save_orig flag to actually work

* add @neonsecret attention.py memory optimization

* remove unneeded imports

* move token logging into conditioning.py

* add placeholder version of inpaint; porting in progress

* fix crash in img2img

* inpainting working; not tested on variations

* fix crashes in img2img

* ported attention.py memory optimization #117 from basujindal branch

* added @torch_no_grad() decorators to img2img, txt2img, inpaint closures

* Final commit prior to PR against development
* fixup crash when generating intermediate images in web UI
* rename ldm.simplet2i to ldm.generate
* add backward-compatibility simplet2i shell with deprecation warning

* add back in mps exception, addresses @vargol comment in #354

* replaced Conditioning class with exported functions

* fix wrong type of with_variations attribute during intialization

* changed "image_iterator()" to "get_make_image()"

* raise NotImplementedError for calling get_make_image() in parent class

* Update ldm/generate.py

better error message

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>

* minor stylistic fixes and assertion checks from code review

* moved get_noise() method into img2img class

* break get_noise() into two methods, one for txt2img and the other for img2img

* inpainting works on non-square images now

* make get_noise() an abstract method in base class

* much improved inpainting

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
2022-09-05 20:40:10 -04:00
1ad2a8e567 Fix --outdir function for web (#373)
* Fix --outdir function for web

* Removed unnecessary hardcoded path
2022-09-05 20:35:04 -04:00
52d8bb2836 Squashed commit of the following:
commit 0cd48e932f1326e000c46f4140f98697eb9bdc79
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date:   Mon Sep 5 10:27:43 2022 -0400

    resolve conflicts with development

commit d7bc8c12e0
Author: Scott McMillin <scott@scottmcmillin.com>
Date:   Sun Sep 4 18:52:09 2022 -0500

    Add title attribute back to img tag

commit 5397c89184
Author: Scott McMillin <scott@scottmcmillin.com>
Date:   Sun Sep 4 13:49:46 2022 -0500

    Remove temp code

commit 1da080b509
Author: Scott McMillin <scott@scottmcmillin.com>
Date:   Sun Sep 4 13:33:56 2022 -0500

    Cleaned up HTML; small style changes; image click opens image; add seed to figcaption beneath image
2022-09-05 10:31:59 -04:00
caf4ea3d89 Add a 'Remove Image' button to clear the file upload field (#382)
* added "remove image" button

* styled a new "remove image" button

* Update index.js
2022-09-05 10:05:39 -04:00
95c088b303 Revert "Add CORS headers to dream server to ease integration with third-party web interfaces" (#371)
This reverts commit 91e826e5f4.
2022-09-04 22:04:14 -04:00
a20113d5a3 put no_grad decorator on make_image closures (#375) 2022-09-04 21:59:12 -04:00
0f93dadd6a fix several dangling references to --gfpgan option, which no longer exists 2022-09-04 21:39:15 -04:00
f4004f660e TOIL(requirements): Split requirements to per-platform (#355)
* toil(reqs): split requirements to per-platform

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* toil(reqs): fix for Win and Lin...

...allow pip to resolve latest torch, numpy

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

* toil(install): update reqs in Win install notebook

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-09-04 19:43:04 -04:00
4406fd138d Merge branch 'SebastianAigner-main' into development
Add support for full CORS headers for dream server.
2022-09-04 08:23:53 -04:00
fd7a72e147 remove debugging message 2022-09-04 08:23:11 -04:00
3a2be621f3 Merge branch 'development' into main 2022-09-04 08:15:51 -04:00
5116c8178c fix save_original flag saving to the same filename (#360)
* Update README.md with new Anaconda install steps (#347)

pip3 version did not work for me and this is the recommended way to install Anaconda now it seems

* fix save_original flag saving to the same filename

Before this, the `--save_orig` flag was not working. The upscaled/GFPGAN would overwrite the original output image.

Co-authored-by: greentext2 <112735219+greentext2@users.noreply.github.com>
2022-09-04 07:17:58 -04:00
91e826e5f4 Add CORS headers to dream server to ease integration with third-party web interfaces 2022-09-04 10:22:54 +02:00
751283a2de fix img2img variations/MPS (#353)
* fix img2img variations

* fix assert for variation_amount
2022-09-04 00:34:20 -06:00
6266d9e8d6 remove stray debugging message 2022-09-03 15:45:20 -04:00
c22c3dec56 Update README.md with new Anaconda install steps (#347)
pip3 version did not work for me and this is the recommended way to install Anaconda now it seems
2022-09-03 14:41:25 -04:00
138956e516 Update README.md with new Anaconda install steps (#347)
pip3 version did not work for me and this is the recommended way to install Anaconda now it seems
2022-09-03 14:38:57 -04:00
60be735e80 Switch to regular pytorch channel and restore Python 3.10 for Macs. (#301)
* Switch to regular pytorch channel and restore Python 3.10 for Macs.

Although pytorch-nightly should in theory be faster, it is currently
causing increased memory usage and slower iterations:

https://github.com/lstein/stable-diffusion/pull/283#issuecomment-1234784885

This changes the environment-mac.yaml file back to the regular pytorch
channel and moves the `transformers` dep into pip for now (since it
cannot be satisfied until tokenizers>=0.11 is built for Python 3.10).

* Specify versions for Pip packages as well.
2022-09-03 14:28:34 -04:00
d0d95d3a2a make initimg appear in web log 2022-09-03 14:10:31 -04:00
b90a215000 Merge branch 'prixt-seamless' into development 2022-09-03 13:47:15 -04:00
6270e313b8 add credit to prixt for seamless circular tiling 2022-09-03 13:46:29 -04:00
a01b7bdc40 add web interface for seamless option 2022-09-03 13:43:04 -04:00
1eee8111b9 Merge branch 'development' of github.com:lstein/stable-diffusion into development 2022-09-03 12:33:39 -04:00
64eca42610 Merge branch 'main' into development
* brings in small documentation fixes that were
added directly to main during release tweaking.
2022-09-03 12:33:05 -04:00
21a1f681dc added attributions for several contributors; let me know if I've missed someone 2022-09-03 12:19:54 -04:00
2882c2d0a6 documentation update 2022-09-03 12:11:10 -04:00
fb857f05ba fix typo in docs 2022-09-03 12:07:07 -04:00
4ffdf73412 Merge branch 'development' into main
This merge adds the following major features:

* Support for image variations.

* Security fix for webGUI (binds to localhost by default, use
--host=0.0.0.0 to allow access from external interface.

* Scalable configs/models.yaml configuration file for adding more
models as they become available.

* More tuning and exception handling for M1 hardware running MPS.

* Various documentation fixes.
2022-09-03 11:58:46 -04:00
9130ad7e08 make results section of webgui full width 2022-09-03 11:58:05 -04:00
d66010410c FEAT: add notebook for Windows for from-zero install and run (#164)
* Update README.md

Those []() link pairs get me every time.

* New issue template

* Added issue templates

* feat(install+run): add notebook for Windows for from-zero install...

...and run

Tested with JupyterLab and VSCode

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Co-authored-by: James Reynolds <magnusviri@users.noreply.github.com>
Co-authored-by: James Reynolds <magnsuviri@me.com>
2022-09-03 11:49:37 -04:00
6566c2298c add scalable support for new models using a configs/models.yaml file 2022-09-03 11:45:21 -04:00
063b4a1995 add ability to specify location of config file (models.yaml) 2022-09-03 11:36:04 -04:00
18cdb556bd update requirements.txt to run on m1 w/pip 2022-09-03 10:56:06 -04:00
8d16a69b80 Merge branch 'erickhun-patch-1' into development 2022-09-03 10:45:12 -04:00
a406b588b4 Merge branch 'development' into patch-1 2022-09-03 10:43:59 -04:00
5454a0edc2 code cleanup
* check that fixed side provided when requesting variant parameter sweep
(-v)
* move _get_noise() into outer scope to improve readability -
refactoring of big method call needed
2022-09-03 10:40:20 -04:00
fe5cc79249 fixes dream.py mps seed 2022-09-03 10:11:46 -04:00
361cc42829 fix(readme): Add individual OS links to TOC; fix TOC changelog link 2022-09-03 09:46:06 -04:00
91cce6b4c3 move special-casing test for precision on mps into T2I class 2022-09-03 09:43:18 -04:00
9d88abe2ea fixed typo 2022-09-03 22:42:16 +09:00
a61e49bc97 * Removed unnecessary code
* Added description about --seamless
2022-09-03 22:39:35 +09:00
d0df894c9f Merge branch 'cgodley-web-host-port' into development 2022-09-03 09:33:46 -04:00
f46916d521 Add warning message about change in default host 2022-09-03 09:33:02 -04:00
12755c6ef6 Merge branch 'web-host-port' of github.com:cgodley/stable-diffusion into cgodley-web-host-port
this allows host and port to be set on --web command line.
changes default binding from 0.0.0.0 to 127.0.0.1
2022-09-03 09:12:32 -04:00
cc4f33bf3a Merge branch 'bakkot-variant-commas' into development
Change the image variation weighting syntax to match the prompt weighting
syntax
2022-09-03 09:08:20 -04:00
d8c0d020eb remove space between -V and its value in generated prompt, for consistency with other switches 2022-09-03 09:08:10 -04:00
1a4bed2e55 Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-03 05:02:25 -04:00
02bee4fdb1 added --seamless tag logging to normalize_prompt 2022-09-03 16:08:03 +09:00
e918cb1a8a replace list delimiters in variations syntax 2022-09-02 23:51:22 -07:00
d922b53c26 added seamless tiling mode and commands 2022-09-03 15:13:31 +09:00
0163310a47 Merge branch 'development' into patch-1 2022-09-03 03:27:25 +00:00
423d25716d Fix unclosed code section 2022-09-02 18:04:15 -04:00
1d999ba974 Fix reference to variations walkthru
Had wrong href for the VARIATIONS.md file
2022-09-02 18:01:52 -04:00
27d4bb5624 Merge branch 'development' of github.com:lstein/stable-diffusion into development
Synchronize with earlier changes in development
2022-09-02 18:00:02 -04:00
c78b496da6 Merge branch 'bakkot-seed-fuzz' into development
This adds support for variations and mixtures of weighted variations
2022-09-02 17:58:42 -04:00
dd2af3f93c added walkthru, small code fixes 2022-09-02 17:54:55 -04:00
2d65b03f05 Merge branch 'seed-fuzz' of github.com:bakkot/stable-diffusion into bakkot-seed-fuzz 2022-09-02 16:17:51 -04:00
2288412ef2 dream.py: fix indentation 2022-09-02 15:00:07 -04:00
6bff985496 dream.py: include 0.0.0.0 in --host help
Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
2022-09-02 14:58:57 -04:00
918ade12ed dream.py: use localhost in url when host is 0.0.0.0
Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
2022-09-02 14:56:52 -04:00
70ef83ac30 Merge branch 'development' of https://github.com/lstein/stable-diffusion into development 2022-09-02 13:39:53 -04:00
b6cf8b9052 * Add threshold and perlin noise options for Karras samplers. 2022-09-02 13:39:26 -04:00
68f62c8352 web: allow custom host/port, default to 127.0.0.1 for security reasons 2022-09-02 12:27:12 -04:00
33936430d0 Added issue templates 2022-09-02 12:16:09 -04:00
81b3de9c65 New issue template 2022-09-02 12:16:09 -04:00
ad6cf6f2f7 Update readme to make it clearer for Windows users 2022-09-02 12:12:48 -04:00
ecef72ca39 Merge branch 'development' into patch-1 2022-09-02 15:22:30 +00:00
92d1ed744a Merge branch 'magnusviri-readme-mac-update-take2' into development 2022-09-02 10:42:39 -04:00
da4bf95fbc Merge branch 'development' into readme-mac-update-take2 2022-09-02 10:41:10 -04:00
d43c5c01e3 Update README.md
Those []() link pairs get me every time.
2022-09-02 10:38:59 -04:00
51278c7a10 add brief contribution instructions in lieu of full code-of-conduct and contribution guidelines 2022-09-02 10:37:35 -04:00
6ef7c1ad4e Added psychedelicious' changes 2022-09-02 08:29:28 -06:00
33cc16473f Merge branch 'main' into development
Synchronizing dev with legacy pulls to main.
2022-09-02 10:22:57 -04:00
1701c2ea94 README-Mac update 2022-09-02 10:22:26 -04:00
2e299a1daf Merge branch 'gabrielrotbart-fix_img2img_m1' into main
This may improve the black image problem when using img2img with some
samplers on M1 hardware.
2022-09-02 10:18:06 -04:00
0b582a40d0 add developer's guidance for refactoring this change 2022-09-02 10:17:51 -04:00
1306457b27 README-Mac update 2022-09-02 08:17:19 -06:00
f4a19af04f fix scope being set to autocast even for m1 2022-09-02 14:55:24 +03:00
58545ba057 Update README-Mac-MPS.md 2022-09-02 19:52:13 +08:00
4fe265735a support generating variations
Co-authored-by: xra <mail@xra.dev>
2022-09-01 23:48:53 -07:00
2b7f32502c Merge branch 'lstein:main' into main 2022-09-01 19:41:14 -06:00
3ee82d8a3b Merge branch 'toffaletti-dream-m1' into main
This provides support for Apple M1 hardware
2022-09-01 17:55:36 -04:00
629ca09fda Merge branch 'dream-m1' of github.com:toffaletti/stable-diffusion into toffaletti-dream-m1
* Fix conflicts with main branch changes
* Fix logic error in choose_autocast_device() that was causing crashes
on CUDA systems.
2022-09-01 17:54:01 -04:00
833de06299 fix InitImageResizer not found error, closes #294 2022-09-01 16:16:46 -04:00
68eabab2af Deprecate --laion400m and --weights arguments
Removes functionality for the --laion400m and --weights arguments and notifies user to use the --model argument instead.
2022-09-01 20:46:53 +01:00
a4f69e62d7 Set sensible default for 1.4
Use the file that already exists for the majority of users for the default value.
2022-09-01 20:21:39 +01:00
7db51d0171 Merge branch 'main' into main 2022-09-01 19:27:38 +01:00
1b3c7acce3 fix ambiguous naming of self.device 2022-09-01 14:18:17 -04:00
e6b2c15fc5 Merge branch 'main' into fit-init-img
add a --fit option to limit the size of the initial image to the
maximum boundaries specified by width and height.
2022-09-01 14:09:46 -04:00
d319b8a762 Reference model from configs/models.yaml
By supplying --model (defaulting to stable-diffusion-1.4) a user can specify which model to load.
Width/Height/Config Location/Weights Location are referenced from configs/models.yaml
2022-09-01 19:04:31 +01:00
db580ccefd Create models.yaml
models.yaml can serve as a base for expanding our support for other versions of Latent/Stable Diffusion.
Contained are parameters for default width/height, as well as where to find the config and weights for this model.
Adding a new model is as simple as adding to this file.
2022-09-01 19:02:57 +01:00
9e99fcbc16 README.md - fixing "further reading" formatting
Fixing typo in header and hyperlinking a file.
2022-09-01 10:27:58 -04:00
346c9b66ec Merge branch 'corajr-main' into main
This improves Mac M1 installation instructions and makes the
environment easier to install.
2022-09-01 10:25:59 -04:00
a52870684a Merge branch 'main' of https://github.com/corajr/stable-diffusion into corajr-main 2022-09-01 10:25:43 -04:00
2455bb38a4 Remove redundant chain of types
torch->cuda and cuda->torch, so torch.cuda.torch.cuda actually works. However it looks like (and probably is) a typo.
2022-09-01 10:23:45 -04:00
01e05a98de this fixes the inconsistent use of self.device, sometimes a str and sometimes an obj 2022-09-01 10:16:05 -04:00
2cac4697aa Correct some verbiage in Mac readme. 2022-09-01 10:11:14 -04:00
c5e95adb49 closes #273, crash on M1 machines 2022-09-01 10:01:41 -04:00
91565970c2 Move environment-mac.yaml to Python 3.9 and patch dream.py for Macs.
I'm using stable-diffusion on a 2022 Macbook M2 Air with 24 GB unified memory.
I see this taking about 2.0s/it.

I've moved many deps from pip to conda-forge, to take advantage of the
precompiled binaries. Some notes for Mac users, since I've seen a lot of
confusion about this:

One doesn't need the `apple` channel to run this on a Mac-- that's only
used by `tensorflow-deps`, required for running tensorflow-metal. For
that, I have an example environment.yml here:

https://developer.apple.com/forums/thread/711792?answerId=723276022#723276022

However, the `CONDA_ENV=osx-arm64` environment variable *is* needed to
ensure that you do not run any Intel-specific packages such as `mkl`,
which will fail with [cryptic errors](https://github.com/CompVis/stable-diffusion/issues/25#issuecomment-1226702274)
on the ARM architecture and cause the environment to break.

I've also added a comment in the env file about 3.10 not working yet.
When it becomes possible to update, those commands run on an osx-arm64
machine should work to determine the new version set.

Here's what a successful run of dream.py should look like:

```
$ python scripts/dream.py --full_precision                                                                                                           SIGABRT(6) ↵  08:42:59
* Initializing, be patient...

Loading model from models/ldm/stable-diffusion-v1/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using slower but more accurate full-precision math (--full_precision)
>> Setting Sampler to k_lms
model loaded in 6.12s

* Initialization done! Awaiting your command (-h for help, 'q' to quit)
dream> "an astronaut riding a horse"
Generating:   0%|                                                                                                                                                                         | 0/1 [00:00<?, ?it/s]/Users/corajr/Documents/lstein/ldm/modules/embedding_manager.py:152: UserWarning: The operator 'aten::nonzero' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/_temp/anaconda/conda-bld/pytorch_1662016319283/work/aten/src/ATen/mps/MPSFallback.mm:11.)
  placeholder_idx = torch.where(
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50/50 [01:37<00:00,  1.95s/it]
Generating: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [01:38<00:00, 98.55s/it]
Usage stats:
   1 image(s) generated in 98.60s
   Max VRAM used for this generation: 0.00G
Outputs:
outputs/img-samples/000001.1525943180.png: "an astronaut riding a horse" -s50 -W512 -H512 -C7.5 -Ak_lms -F -S1525943180
```
2022-09-01 09:04:30 -04:00
09bd9fa47e move autocast device selection to a function 2022-08-31 22:21:14 -07:00
dc30adfbb4 closes #273, crash on M1 machines 2022-09-01 01:09:56 -04:00
fa98601bfb better error reporting for load_model 2022-08-31 22:03:50 -07:00
66fe110148 default full_prevision to True for mps device 2022-08-31 22:03:50 -07:00
bf50ab9dd6 changes to get dream.py working on M1
- move all device init logic to T2I.__init__
- handle m1 specific edge case with autocast device type
- check torch.cuda.is_available before using cuda
2022-08-31 22:03:42 -07:00
70119602a0 Issue 270 fix (#274)
* check if torch.backends has mps before calling it

* Fixes issue 270

Co-authored-by: James Reynolds <magnsuviri@me.com>
2022-09-01 00:59:20 -04:00
28fe84177e optionally scale initial image to fit box defined by width x height
* This functionality is triggered by the --fit option in the CLI (default
false), and by the "fit" checkbox in the WebGUI (default True)

* In addition, this commit contains a number of whitespace changes to
make the code more readable, as well as an attempt to unify the visual
appearance of info and warning messages.
2022-09-01 00:52:43 -04:00
35d3f0ed90 Merge branch 'lstein:main' into main 2022-08-31 21:42:12 -06:00
0433b3d625 Add Warning When Image Is Too Large (#271)
* Add Warning When Image Is Too Large

* fix incomprehensible formatting introduced by "blue"

Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2022-08-31 23:13:21 -04:00
4b560b50c2 fix AttributeError crash when running on non-CUDA systems (#256)
* fix AttributeError crash when running on non-CUDA systems; closes issue #234 and issue #250
* although this prevents dream.py script from crashing immediately on MPS systems, MPS support still very much a work in progress.
2022-08-31 16:59:27 -04:00
9ad79207c2 Merge branch 'main' of github.com:lstein/stable-diffusion into main 2022-08-31 14:44:18 -04:00
0be2351c97 Merge branch 'resolution-checker' of https://github.com/blessedcoolant/stable-diffusion into main 2022-08-31 14:43:17 -04:00
ed513397b2 Allow configuration of which SD model to use (#263)
* Allow configuration of which SD model to use

Closes https://github.com/lstein/stable-diffusion/issues/49 The syntax isn't quite the same (opting for --weights over --model), although --weights is more in-line with the existing naming convention.
This method also locks us into models in the models/ldm/stable-diffusion-v1/ directory. Personally, I'm not averse to this, although a secondary solution may be necessary if we wish to supply weights from an external directory.

* Fix typo

* Allow either filename OR filepath input for arg

This approach allows both
--weights SD13 
--weights C:/StableDiffusion/models/ldm/stable-diffusion-v1/SD13.ckpt
2022-08-31 14:20:28 -04:00
c52ba1b022 feat: simplify and enhance prompt weight splitting (#258)
* feat: simplify and enhance prompt weight splitting

* fix: don't shadow the prompt variable

* feat: enable backslash-escaped colons in prompts
2022-08-31 14:00:10 -04:00
d022d0dd11 continue to display in-progress image until the post-processing is done, for better esthetics (#255) 2022-08-31 12:32:56 -04:00
a14fd69a5a fix progress bar in webui when using strength parameter (#254) 2022-08-31 11:28:11 -04:00
0d2e6f90c8 Readme update (#253)
* check if torch.backends has mps before calling it

* Updated Mac Readme with latest debugging info

Co-authored-by: James Reynolds <magnsuviri@me.com>
2022-08-31 11:27:13 -04:00
58e3562652 Fix merging embeddings (#226)
Fixed merging embeddings based on the changes made in textual inversion. Tested and working. Inverted their logic to prioritize Stable Diffusion implementation over alternatives, but left the option for alternatives to still be used.
2022-08-31 11:24:11 -04:00
b622819051 Expose img2img strength parameter in Web UI (#239)
* Expose img2img strength parameter in Web UI

* Fix strength label id

Co-authored-by: Mikhail Tishin <michail.tishin@fayrix.com>
Co-authored-by: Kevin Gibbons https://github.com/bakkot
2022-08-31 11:18:32 -04:00
a547c33327 check if torch.backends has mps before calling it (#245)
Co-authored-by: James Reynolds <magnsuviri@me.com>
2022-08-31 10:56:38 -04:00
31b77dbaf8 Readme.md - fix hyperlink to Mac docs (#246)
The square brackets & curly brackets were mixed up.
2022-08-31 10:53:21 -04:00
4280788c18 Fix link to Mac instructions in README (#235) 2022-08-31 10:51:25 -04:00
146e75a1de Merge branch 'bakkot-refactor-pngwriter-2' into main
This fixes regressions in the WebGUI and makes maintenance of pngwriter
easier.
2022-08-31 10:07:57 -04:00
8a2b849620 fix regression in WebGUI progress bar and WebGUI crashes, closes issue #236. Closes issue #249 2022-08-31 10:07:19 -04:00
462a1961e4 fix infinite hang during GFPGAN duration inadvertently introduced during batch_size cleanup 2022-08-31 08:21:49 -04:00
84c10346fb check if torch.backends has mps before calling it 2022-08-31 03:29:37 -06:00
2aa8393272 set PYTORCH_ENABLE_MPS_FALLBACK in mac environment (#232)
- this enables cpu fallback for op not yet implemented for m1 gpu
2022-08-31 02:00:40 -04:00
c83d01b369 fix hang during GFPGAN processing due to bug introduced by recent removal of batch_size arg from pngwriter 2022-08-31 01:41:15 -04:00
5354122094 Merge branch 'main' into refactor-pngwriter-2 2022-08-31 01:24:17 -04:00
64444025a9 Update simplet2i.py (#228)
Typo causing bug when preinitializing the model. Unsupported Sampler: klms, Defaulting to plms
2022-08-31 01:08:46 -04:00
d566ee092a move make_grid into image_utils 2022-08-30 22:03:53 -07:00
b983d61e93 tweak format of "result" event in web ui 2022-08-30 22:03:53 -07:00
153c93bdd4 refactor pngwriter 2022-08-30 22:03:51 -07:00
3be1cee17c avoid crash due to dangling batch_size reference 2022-08-31 00:56:12 -04:00
bdb0651eb2 add support for Apple hardware using MPS acceleration 2022-08-31 00:33:23 -04:00
1480ef84dc Add Resolution Checker 2022-08-31 14:54:16 +12:00
1714816fe2 remove support for batch_size from dream.py (#227)
* remove dream.py support for batch_size

* expect to get a single image
2022-08-30 22:30:12 -04:00
b5565d2c82 Update .gitignore (#225)
Include log folders in git ignore.
2022-08-30 20:29:26 -04:00
4fad71cd8c Training optimizations (#217)
* Optimizations to the training model

Based on the changes made in
textual_inversion I carried over the relevant changes that improve model training. These changes reduce the amount of memory used, significantly improve the speed at which training runs, and improves the quality of the results.

It also fixes the problem where the model trainer wouldn't automatically stop when it hit the set number of steps.

* Update main.py

Cleaned up whitespace
2022-08-30 15:59:32 -04:00
d126db2413 Update README.md 2022-08-30 15:57:54 -04:00
7811d20f21 Add Badges to README.md and add CHANGELOG.md (#205)
* Update README.md - Add Badges

* Add CHANGELOG.md
2022-08-30 15:40:56 -04:00
d524e5797d Add regression test (#136)
* Add regression test
* fix regression test with full_precision
2022-08-30 15:39:14 -04:00
8ca4d6542d support progress for img2img (#215)
WebGUI shows progress bar when an initial image is provided.
2022-08-30 15:36:12 -04:00
a51e18ea98 resize initial image to match requested width and height, preserving aspect ratio. Closes #210. Closes #207 (#214) 2022-08-30 15:26:02 -04:00
8bf321f6ae Merge pull request #182 from bakkot/webui-cancel
webui: support cancelation
2022-08-30 12:02:05 -04:00
5d13207aa6 webui: support cancelation 2022-08-30 08:55:40 -07:00
dae2b26765 remove message about GFPGAN being required, since it is no longer displayed if GFPGAN missing 2022-08-30 09:50:39 -04:00
713b2a03dc Merge branch 'bakkot-sw-drop' into main
This adds a checkbox that shows the intermediate images fpr,omg as txt2img()
goes through its denoising steps.
2022-08-30 09:31:19 -04:00
186d0f9d10 Merge branch 'sw-drop' of https://github.com/bakkot/stable-diffusion into bakkot-sw-drop 2022-08-30 09:17:07 -04:00
55b448818e Update README.md
Highlighted Colab notebook addition.
2022-08-29 23:49:42 -04:00
b4babf7680 add a screenshot to description of command-line utility 2022-08-29 23:27:44 -04:00
85f32752fe promote most headings by one level 2022-08-29 23:16:41 -04:00
b757384aba promote most headings by one level 2022-08-29 23:16:21 -04:00
a5d21d7c94 Update README.md
Added a table of contents and a troubleshooting guide.
2022-08-29 23:15:49 -04:00
8f3520e2d5 add troubleshooting guide to README 2022-08-29 23:08:04 -04:00
19e4298cf9 Merge branch 'BlueAmulet-prompt_as_dir' into main
This adds the frequently-requested feature of naming the output
directory after the text prompt.
2022-08-29 22:34:48 -04:00
42ffcd7204 add the recently added commands to the readline command-line-completion list; fix command-line documentation bug, closing issue #188 2022-08-29 22:34:09 -04:00
d48299e56c Merge branch 'prompt_as_dir' of https://github.com/BlueAmulet/stable-diffusion into BlueAmulet-prompt_as_dir 2022-08-29 22:13:37 -04:00
2e22d9ecf1 Address bakkot review 2022-08-29 18:10:15 -06:00
18597ad1d9 fix bug in pngwriter 2022-08-29 16:33:32 -07:00
0173d3a8fc stream images 2022-08-29 16:33:31 -07:00
e7658b941e Merge pull request #187 from bakkot/webui-upscalers-optional
webui: hide gfpgan part if not installed
2022-08-29 19:29:16 -04:00
a7a62d39d4 webui: hide gfpgan if not installed 2022-08-29 16:27:44 -07:00
24ce56b3db Merge branch 'webui-sampler-fix' into main 2022-08-29 19:25:49 -04:00
3220f73f0a add missing dropdown element for K_EULER_A 2022-08-29 19:24:52 -04:00
27a1044e65 Merge pull request #199 from david-ford/gitattributes
Create .gitattributes
2022-08-29 19:15:25 -04:00
39c56f20be Merge pull request #200 from david-ford/html-minor-changes
Minor updates to index.html
2022-08-29 19:14:51 -04:00
f6b2ec61b2 Merge pull request #201 from blessedcoolant/placeholder-logo
Add Temp Logo To Repo
2022-08-29 19:13:54 -04:00
e57d6fd1a6 Add Temp Logo To Repo 2022-08-30 11:00:11 +12:00
1b40a31a89 Update .gitattributes
Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
2022-08-29 16:58:41 -05:00
4fce1063c4 Minor updates to index.html
Some minor tweaks to index.html for accessibility and browsers.
2022-08-29 16:55:20 -05:00
f9862a3d88 Create .gitattributes
Added a .gitattributes file to autoresolve line endings across different environments.
2022-08-29 16:50:28 -05:00
81ad239197 Merge pull request #192 from david-ford/working-branch
Fix case sensitive check to be case insensitive
2022-08-29 17:48:12 -04:00
ed38c97ed8 Removed unrelated changes and updated based on recommendation
Removed the changes to the index.html and .gitattributes for this PR. Will add them in separate PRs.

Applied recommended change for resolving the case issue.
2022-08-29 16:43:34 -05:00
4f8e7356b3 Add prompt as output directory feature
Based on previous code by czyz
2022-08-29 14:52:02 -06:00
c363f033e8 Merge pull request #198 from bakkot/instructions-typo
fix path to dream server in readme
2022-08-29 16:41:24 -04:00
22c25b3615 fix path to dream server in readme 2022-08-29 13:38:52 -07:00
7fe7cdc8c9 Merge pull request #176 from xraxra/show-tokenization
Print out tokenization data during image generation, allowing truncated prompts to be visible.
2022-08-29 15:36:10 -04:00
e26fee78b5 Merge pull request #158 from Cubox/patch-1
Fix wrong help message
2022-08-29 15:12:24 -04:00
63178c6a8c Merge branch 'main' into patch-1 2022-08-29 15:12:14 -04:00
6fb2f1ed6e fixes WebUI so that the selected sampler is actually applied 2022-08-29 14:06:18 -04:00
38701a6d7b Fix IndexError when generating grid; --grid option can now be passed on shell command line 2022-08-29 13:52:44 -04:00
31fa92a83f Fix case sensitive check to be case insensitive
Case sensitivity between os.getcwd and os.realpath can fail due to different drive letter casing. C:\ vs c:\. This change addresses that by normalizing the strings before comparing.
2022-08-29 12:46:24 -05:00
0abfc3cac6 Merge branch 'main' of github.com:lstein/stable-diffusion into main
This fixes issue with grid generation.
2022-08-29 13:39:59 -04:00
d483fcb53a Merge pull request #166 from SMUsamaShah/patch-1
Bug fix in grid
2022-08-29 13:39:50 -04:00
c7db038c96 grid is broken, needs the grid-fix PR#166 to fix 2022-08-29 13:39:20 -04:00
132d23e55d Merge pull request #186 from lstein/reset-properly
Fix form reset logic
2022-08-29 13:03:30 -04:00
90cbc6362c Display new features more prominently in the README 2022-08-29 12:59:34 -04:00
f33ae1bdf4 Display new features more prominently in the README 2022-08-29 12:58:48 -04:00
754525be82 fix reset logic 2022-08-29 09:47:56 -07:00
d9eab7f383 use LF not CRLF for files, oh god 2022-08-29 09:47:45 -07:00
f695988915 fix whitespace in index.html 2022-08-29 09:47:20 -07:00
5d19294810 Merge pull request #128 from artmen1516/feature/colab-notebook
Feature: Add Colab Notebook
2022-08-29 12:37:11 -04:00
77803cf233 Merge branch 'bakkot-rebase-streaming-web' into main
This adds correct treatment of upscaling/face-fixing within the WebUI.
Also adds a basic status message so that the user knows what's happening
during the post-processing steps.
2022-08-29 12:09:44 -04:00
4acfb76be6 correctly handle upscaling in webUI, including displaying status messages during GFPGAN/ESRGAN postprocessing 2022-08-29 12:08:18 -04:00
fd13526454 Merge pull request #175 from bakkot/unicode
read/write plain text files in utf-8, not ascii
2022-08-29 07:03:55 -04:00
7718af041c Merge pull request #178 from lstein/dream-web-upscaling
FEAT: Dream web upscaling
2022-08-29 06:59:21 -04:00
30dbf0e589 Merge pull request #177 from lstein/bugfixes
Bugfixes to image generation logic
2022-08-29 06:58:42 -04:00
070795a3b4 webui: stream progress events to page 2022-08-28 21:54:10 -07:00
e351d6ffe5 set correct default values for scaling and sampler; closes issues #167 #157 2022-08-29 00:13:18 -04:00
46464ac677 remove unused metadatastr variable 2022-08-28 23:45:50 -04:00
03d8eb19e0 when no callback used, modify results list so that upscaled/face-fixed image replaces the old one 2022-08-28 23:40:04 -04:00
xra
fef632e0e1 tokenization logging (take 2)
This adds an option -t argument that will print out color-coded tokenization, SD has a maximum of 77 tokens, it silently discards tokens over the limit if your prompt is too long.
By using -t you can see how your prompt is being tokenized which helps prompt crafting.
2022-08-29 12:28:49 +09:00
05061a70b3 report errors on non-cuda systems rather than failing silently 2022-08-28 23:13:23 -04:00
617a029ae7 pass outdir from txt2img() and img2img() to prompt2img() correctly 2022-08-28 23:12:49 -04:00
7ae79b350e write log files in utf-8, not ascii 2022-08-28 20:00:11 -07:00
9a8cd9684e Merge pull request #173 from warner-benjamin/bug-fixes-improvements
Fix grid image saving & sampler selection, log to outdir path, display sampler options once
2022-08-28 22:46:38 -04:00
18899be4ae working, but there is a bug in underlying txt2png() call that is preventing upscaled images from being returned 2022-08-28 22:42:31 -04:00
3ea505bc2d Merge branch 'lstein:main' into bug-fixes-improvements 2022-08-28 21:34:13 -05:00
e2ae6d288d added reset to defaults button and sampler selection 2022-08-28 21:35:52 -04:00
41b26e0520 Merge pull request #171 from blessedcoolant/sampler-bug-fix
Fix sampler changer not working.
2022-08-29 13:06:30 +12:00
b6053108c1 Merge pull request #168 from blessedcoolant/bug-fixes
Fixed grid image not saving
2022-08-29 13:05:53 +12:00
22365a3f12 begin adding fields for GFPGAN and ESRGAN adjustment; only making public because need to switch computers 2022-08-28 21:04:32 -04:00
594c0eeb8c check in rest of sampler fix 2022-08-28 19:53:25 -05:00
529040708b Fix grid image saving, log to outdir path, display sampler options once 2022-08-28 19:34:55 -05:00
f0e2fa781f Grid image not saving after recent changes has been fixed. 2022-08-29 11:29:45 +12:00
87b7446228 Fix unique filename bug 2022-08-29 11:28:16 +12:00
8a517fdc17 Fix sampler changer not working. 2022-08-29 11:26:19 +12:00
373a2d9c32 Merge branch 'main' of github.com:lstein/stable-diffusion into main 2022-08-28 19:03:45 -04:00
1f8bc9482a added support for changing sampler on prompt line 2022-08-28 19:03:38 -04:00
b85773f332 resolved conflicts and write properly-formatted prompt string (with sampler & upscaling) into image file 2022-08-28 19:01:45 -04:00
ddc0e9b4d8 Merge pull request #133 from bakkot/dir-traversal
prevent directory traversal in the web UI
2022-08-28 18:32:12 -04:00
44a48d0981 Merge pull request #130 from bakkot/patch-1
make web ui default to 512x512
2022-08-28 18:30:32 -04:00
8bbe7936bd close Issue #165 2022-08-28 18:21:20 -04:00
9e7865704a prevent directory traversal in the web UI 2022-08-28 14:33:30 -07:00
ac02a775e4 moved server.py into right location 2022-08-28 17:27:43 -04:00
7c485a1a4a adjusted -U upscaling argument so that it defaults to upscaling strength 0.75 if the second argument is not given 2022-08-28 17:26:39 -04:00
36bc989a27 Merge branch 'blessedcoolant-gfpgan-optimization' into main
This reduces VRAM requirements when GFPGAN face fixing and Real-ESRGAN
upscaling are used. --gfpgan flag is no longer needed (or accepted)
2022-08-28 17:06:49 -04:00
ea2ee33be8 cosmetic fixup to how the outputs are reported 2022-08-28 17:06:33 -04:00
5d67986997 Merge branch 'dagf2101-main' into main
This consolidates dream.py with dream_web.py, such that you now invoke
the web server by executing "scripts/dream.py --web (+other options)"
2022-08-28 16:37:50 -04:00
7dfca3dcb5 moved scripts/dream_server.py into ldm/dream/server.py 2022-08-28 16:37:27 -04:00
e0de42bd03 Update README.md 2022-08-29 08:25:55 +12:00
614974a8e8 Merge branch 'main' into gfpgan-optimization 2022-08-29 08:22:26 +12:00
6e49c070bb Optimize and Improve GFPGAN and Real-ESRGAN Pipeline 2022-08-29 08:14:29 +12:00
08a9702b73 Merge branch 'main' of github.com:lstein/stable-diffusion into main 2022-08-28 15:54:33 -04:00
042a9043d1 got rid of the cd and pwd commands, and just allow user to specify --outdir on the command 2022-08-28 15:54:12 -04:00
a7ac93a899 Merge pull request #110 from sajattack/half-precision-embeddings
Support full-precision embeddings in half precision inference mode
2022-08-28 15:36:26 -04:00
3b2569ebdd Merge branch 'yunsaki-main' into main 2022-08-28 14:20:48 -04:00
8b9a520c5c adjusted handling of from_file 2022-08-28 14:20:34 -04:00
ba03289c14 print current and max VRAM usage stats after each round of generation 2022-08-28 13:05:01 -04:00
d1551b1bd4 Enable users to set sampler using prompts 2022-08-29 04:27:54 +12:00
fab9e1a423 Fix wrong help message 2022-08-28 17:11:24 +02:00
59be6c815d bug fix in grid
In case of 6 images 3rd image was also copied to 4th box missing the last image in the grid.
2022-08-28 15:39:09 +01:00
ff6c11406b add notebook and readme section 2022-08-27 17:20:44 -07:00
6f90c7daf6 make web ui default to 512x512 2022-08-26 18:26:22 -07:00
38ed6393fa updated TODO 2022-08-26 14:59:53 -04:00
a5a3300fc6 Merge pull request #114 from TesseractCat/main
Replace numerical size inputs with dropdowns
2022-08-26 14:42:57 -04:00
0ab03a5fde Replace numerical size inputs with dropdowns 2022-08-26 13:35:27 -04:00
800132970e Merge pull request #105 from shusso/select-device
Move torch.device selection to it's own function
2022-08-26 12:23:21 -04:00
555f13e469 Merge branch 'main' into half-precision-embeddings 2022-08-26 08:33:46 -07:00
9b5101cd8d support full-precision embeddings in half precision mode 2022-08-26 08:30:58 -07:00
7040995ceb fixed variable name error 2022-08-26 14:25:49 +02:00
5129f256a3 simplet2i: changed image file handling to work as stated in the [docs](https://pillow.readthedocs.io/en/stable/reference/open_files.html) 2022-08-26 14:13:16 +02:00
b0b4ccf521 Merge pull request #101 from BaristaLabs/remove-gpfgan
Set default to none for gfpgan_strength
2022-08-26 07:55:47 -04:00
ed72ff3268 Move torch.device selection to it's own function 2022-08-26 14:43:18 +03:00
89805a5239 fixed mistake in comment 2022-08-26 13:25:12 +02:00
e00397f9ca refactored logfile handling; minimised time spent in context managers (with open) 2022-08-26 13:22:53 +02:00
12f59e1daa removed log.close(); 'with open' automatically closes the file 2022-08-26 13:12:56 +02:00
cf750f62db refactored infile handling 2022-08-26 13:10:37 +02:00
0f28663805 remove redundant None check (if var does the same thing) 2022-08-26 12:43:13 +02:00
f3fad22cb6 Fix 2022-08-26 05:27:34 -04:00
7bf0bc5208 fix comment 2022-08-26 04:08:18 -04:00
4e5aa7e714 fix comment 2022-08-26 04:07:01 -04:00
46a223f229 Double check for null and 0, and add a comment to indicate intent 2022-08-26 04:05:09 -04:00
eb9f0be91a Set default to none for gfpgan_strength 2022-08-26 03:53:55 -04:00
4f02b72c9c prettified all the code using "blue" at the urging of @tildebyte 2022-08-26 03:15:42 -04:00
dd670200bb documentation tweaks for installation and running of the GFPGAN extension; now you have the ability to specify the previous image's seed with -S -1, the one before that with -S -2, and so forth 2022-08-26 02:17:14 -04:00
8f89a2456a something is not quite right; when providing -G1 option on one prompt, and then omitting it on the next, I see a "images do not match" error from GFPGAN 2022-08-26 01:20:01 -04:00
407d70a987 Fix backwards logic 2022-08-26 00:49:12 -04:00
f1ffb5b51b Fix blend if the target image has been upscaled 2022-08-26 00:45:19 -04:00
4f1664ec4f remove params 2022-08-26 00:41:41 -04:00
fcdd95b652 Refactor so that behavior is consolidated at top level 2022-08-26 00:39:57 -04:00
470a62dbbe Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-gfpgan-option 2022-08-26 00:26:03 -04:00
2c08cf7175 Merge branch 'more-refactoring' into main
This breaks up the dream utility modules in a more
sensible manner.
2022-08-25 23:59:30 -04:00
539c15966d Update README.md
Put in a plug for Yansuki's morphing code.
2022-08-25 23:54:44 -04:00
5f844807cb Update README.md
Removed a bit of an uncaught merge conflict warning.
2022-08-25 23:50:56 -04:00
cb86b9ae6e Remove the redundancy, better logging 2022-08-25 23:48:35 -04:00
3a30a8f2d2 Fix not being able to disable bgupscaler; update readme 2022-08-25 23:39:03 -04:00
60ed004328 Update readme, fix defaults for case-sensitive fs's 2022-08-25 23:31:08 -04:00
dbb9132f4d Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-gfpgan-option 2022-08-25 23:19:17 -04:00
5711b6d611 Add optional GFPGAN support 2022-08-25 22:57:30 -04:00
f1bed52530 moved dream utilities into their own subfolder 2022-08-25 22:49:15 -04:00
23fb4a72bb Merge branch 'bakkot-more-refactor' into main 2022-08-25 22:19:27 -04:00
c38b6964b4 improved inline error messages slightly 2022-08-25 22:19:12 -04:00
e202441f0c Merge branch 'more-refactor' of https://github.com/bakkot/stable-diffusion into bakkot-more-refactor 2022-08-25 21:55:08 -04:00
d051d86df6 Merge pull request #96 from TesseractCat/main
Keep a log of requests for dream_web
2022-08-25 21:42:17 -04:00
b49475a54f Keep a log of requests for dream_web 2022-08-25 21:06:17 -04:00
797de3257c fix batch_size 2022-08-25 17:28:52 -07:00
31b22e057d switch to generators 2022-08-25 17:06:06 -07:00
078859207d factor out loop 2022-08-25 16:51:39 -07:00
a10baf5808 factor out exception handler 2022-08-25 15:13:07 -07:00
0eba55ddbc Merge pull request #91 from veprogames/update-ignorance
Properly remove src from repository, add ignored directory for initial images
2022-08-25 17:32:10 -04:00
19fa222810 refactoring complete; please test carefully! 2022-08-25 17:30:08 -04:00
b3e3b0e861 feature complete; looks like ready for merge 2022-08-25 17:26:48 -04:00
dde2994d10 add inputs/ to .gitignore (a place for initial images) 2022-08-25 22:31:24 +02:00
888ca39ce2 remove k-diffusion from repository (git rm --cached)
should fix conda environment hanging
2022-08-25 22:29:12 +02:00
f4c95bfec0 Update README.md 2022-08-25 15:33:49 -04:00
91d3e4605e Update README.md 2022-08-25 15:32:48 -04:00
652c67c90e Update README.md 2022-08-25 15:29:41 -04:00
2114c386ad moved index.js .html and .css files into static/dream_web/; changed batch to iterations again 2022-08-25 15:27:43 -04:00
6d2b4cbda1 Merge branch 'main' of github.com:lstein/stable-diffusion into main 2022-08-25 15:15:07 -04:00
562831fc4b Merge branch 'TesseractCat-main' into main 2022-08-25 15:14:50 -04:00
d04518e65e resolved conflicts in use of batch vs iterations 2022-08-25 15:14:38 -04:00
d598b6c79d Update README.md 2022-08-25 15:11:06 -04:00
4ec21a5423 resolved conflicts 2022-08-25 15:09:55 -04:00
b64c902354 added missing image 2022-08-25 15:06:10 -04:00
2ada3288e7 Small cleanups.
- Quenched tokenizer warnings during model initialization.
- Changed "batch" to "iterations" for generating multiple images in
  order to conserve vram.
- Updated README.
- Moved static folder from under scripts to top level. Can store other
  static content there in future.
- Added screenshot of web server in action (to static folder).
2022-08-25 15:03:40 -04:00
91966e9ffa Fix appearance on mobile 2022-08-25 15:01:08 -04:00
2ad73246f9 Normalize working directory 2022-08-25 14:27:33 -04:00
d3a802db69 Fix horizontal divider 2022-08-25 14:18:29 -04:00
b95908daec Move style and script to individual files 2022-08-25 14:15:08 -04:00
79add5f0b6 Merge branch 'main' of https://github.com/TesseractCat/stable-diffusion into TesseractCat-main 2022-08-25 13:52:44 -04:00
650ae3eb13 Merge pull request #89 from BlueAmulet/remove-accelerate
Remove accelerate library
2022-08-25 13:48:48 -04:00
0e3059728c Merge pull request #85 from JigenD/VRAMutilizationFix
fix VRAM utilization
2022-08-25 13:47:49 -04:00
b7735b3788 Fix attribution 2022-08-25 11:13:12 -06:00
39b55ae016 Remove accelerate library
This library is not required to use k-diffusion
Make k-diffusion wrapper closer to the other samplers
2022-08-25 11:04:57 -06:00
e82c5eba18 PR revision: replace cuda call with dynamic type 2022-08-25 12:18:35 -04:00
1c8ecacddf remove src directory, which is gumming up conda installs; addresses issue #77 2022-08-25 10:43:05 -04:00
26dc05e0e0 document --from_file flag, closes issue #82 2022-08-25 09:47:27 -04:00
49247b4aa4 fix performance regression; closes issue #42 2022-08-25 09:41:12 -04:00
eb58276a2c fix VRAM utilization 2022-08-25 08:34:51 -04:00
72a9d75330 404 on missing file 2022-08-25 01:25:22 -04:00
1a7743f3c2 Merge pull request #79 from BaristaLabs/update-readme-with-variant-disc
Update readme with variant disc
2022-08-25 00:44:45 -04:00
0b4459b707 mostly back to full functionality; just missing grid generation code 2022-08-25 00:42:37 -04:00
c521ac08ee Another update 2022-08-25 00:00:39 -04:00
29727f3e12 Another update 2022-08-24 23:59:37 -04:00
51b9a1d8d3 Update readme.md 2022-08-24 23:55:31 -04:00
ab131cb55e Add img2img support, fix naming conventions 2022-08-24 23:03:02 -04:00
269fcf92d9 Reapply prompt config on image click 2022-08-24 21:38:47 -04:00
8b682ac83b Merge pull request #75 from tildebyte/docs-readme-update-109-notes
DOCS: update release features for v1.09 in README - add k_diffusion samplers note
2022-08-24 19:55:10 -04:00
36e4130f1c Merge pull request #72 from BaristaLabs/fix-dependencies
Various fixes in requirements and variant counting.
2022-08-24 19:54:38 -04:00
b978536385 code is reorganized and mostly functional. Grid needs to be brought back online, as well as naming of img2img variants (currently the variants get written but not logged) 2022-08-24 19:47:59 -04:00
0a7fe6f2d9 Switch to ThreadingHTTPServer 2022-08-24 18:19:50 -04:00
b12955c963 remove unneeded imports from dream.py 2022-08-24 17:57:44 -04:00
9133087850 first draft at big refactoring; will be broken 2022-08-24 17:52:34 -04:00
25fa0ad1f2 docs(readme): update release features for v1.09 2022-08-24 17:50:29 -04:00
df9f088eb4 Preserve prompt across generations 2022-08-24 17:28:59 -04:00
b1600d4ca3 Update seed on click 2022-08-24 17:26:22 -04:00
0efc3bf780 Add bare bones web UI 2022-08-24 17:04:30 -04:00
dd16fe16bb Fix issue where more than the expected number of variants are generated 2022-08-24 16:26:58 -04:00
4d72644db4 Housekeeping 2022-08-24 15:54:49 -04:00
7ea168227c Update README.md
Added a few features that were missed in initial 1.09 commit.
2022-08-24 15:35:10 -04:00
ef8ddffe46 updated README 2022-08-24 15:28:19 -04:00
81cbcb919e add ability to generate variants on an img2img; warnings quieted 2022-08-24 15:26:59 -04:00
1eec6b776b tweaked documentation and comments slightly 2022-08-24 15:25:52 -04:00
776c747978 added warning message when width/height specified along with init img 2022-08-24 14:04:27 -04:00
caf4dd4155 added a TODO list to keep track of user requests 2022-08-24 13:54:59 -04:00
ee10021ea2 bikeshedding 2022-08-24 13:36:27 -04:00
ca82acfd3b Remove unnecessary print, small optmi 2022-08-24 13:33:19 -04:00
feea5fb063 Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-simple-variant-mechanism 2022-08-24 13:16:15 -04:00
b5cdbd3b0b Fixes issue with cuda/current mismatch 2022-08-24 13:14:08 -04:00
e043f238af backed out change from PR #44 that was causing ddim sampler to fail with the message 'sqrt _vml_cpu not implemented for 'Half' 2022-08-24 13:10:42 -04:00
47a5da25b7 runtime errors now produce a stack trace 2022-08-24 12:57:04 -04:00
f55f4d7156 squelch warnings about modified untracked content due to the src/* submodules 2022-08-24 12:31:48 -04:00
5055e9e1d5 corrected double clip reference from requirements.txt 2022-08-24 12:09:22 -04:00
c6b5e930dc Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-simple-variant-mechanism 2022-08-24 12:06:29 -04:00
d33e1bf563 Add simple way to make variants 2022-08-24 12:02:36 -04:00
923466387f minor tweak to .gitignore 2022-08-24 11:52:13 -04:00
56f7b0f434 Merge branch 'warner-benjamin-small-improvements' into main 2022-08-24 11:51:16 -04:00
c24a16ccb0 resolved merge conflicts 2022-08-24 11:50:48 -04:00
ab8ee9bbb6 Merge branch 'BaristaLabs-ensure-image-exists' into main
This catches the case in which user specifies an img2img init img that
doesn't exist.
2022-08-24 11:42:55 -04:00
37609d6e53 resolved merge conflicts 2022-08-24 11:42:44 -04:00
fb9b845fda Merge branch 'BaristaLabs-add-textual-inversion' into main
This allows the use of a custom dataset to fine tune model outputs.
2022-08-24 11:33:39 -04:00
9050ce152b Fixed up a few merge conflicts, looks good so far 2022-08-24 11:29:32 -04:00
73901a2777 Merge pull request #58 from nicolai256/main
init img didn't work in textual inversion, now it does :)
2022-08-24 11:24:30 -04:00
decd1a58d2 Merge branch 'escape-single-quotes' into main
This prevents single quotes in the prompt from generating a parse error.
2022-08-24 11:21:09 -04:00
7f4a5e946d Merge branch 'tildebyte-feat-samplers-add-remaining-k' into main
This adds the remaining k_* samplers to the dream.py script.
2022-08-24 11:19:45 -04:00
4bc64a6aff sampler now written to PNG metadata 2022-08-24 11:18:51 -04:00
02cf5879a1 Merge branch 'feat-samplers-add-remaining-k' of https://github.com/tildebyte/stable-diffusion into tildebyte-feat-samplers-add-remaining-k
This adds all the remaining k_* sampling algorithms.
2022-08-24 10:56:24 -04:00
d495bac307 updated README for version release 2022-08-24 09:31:17 -04:00
3393b8cad1 added assertion checks for out-of-bound arguments; added various copyright and license agreement files 2022-08-24 09:22:27 -04:00
886f1c0138 Undo more 'cuda' hardcoding 2022-08-24 00:39:25 -05:00
9588444f0e textual inversion + init img fix 2022-08-24 05:16:01 +02:00
24b11ecf9f Fix silent SystemExit if embedding_path is not specified 2022-08-23 22:45:02 -04:00
84989f0d05 Remote token output on startup 2022-08-23 22:39:10 -04:00
a93a79568d Tweak save_top_k setting 2022-08-23 21:56:05 -04:00
7081a84600 Fix GPU parameter in readme, add SD style finetune config 2022-08-23 20:14:40 -04:00
1df1e5c38b Test for the presence of the specified img2img 2022-08-23 19:22:35 -04:00
5a513426bd Remove test .ps1 file 2022-08-23 18:32:38 -04:00
611ccb991e Remove another duplicate file 2022-08-23 18:31:41 -04:00
bde956647f Remove duplicate t2i file 2022-08-23 18:29:50 -04:00
8952196bbf Add personalization 2022-08-23 18:26:28 -04:00
050dffd269 feat(samplers): add ability use all k_* samplers
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-08-23 17:26:22 -04:00
0cdf5e61b0 Merge pull request #1 from lstein/main
Upstream changes
2022-08-23 15:44:36 -04:00
de1cea92ce Small QoL imporvements 2022-08-23 12:49:17 -05:00
3a58988e4a escape single quotes in the command stream so as not to confuse the shlex parser 2022-08-23 13:46:50 -04:00
7a67d3d837 confirmed that pip install -r requirements.txt is working as expected 2022-08-23 13:15:03 -04:00
9050f3d399 Merge branch 'main' into pip-install-test 2022-08-23 11:00:57 -04:00
a21156e3e3 removed the reference to the mod-deleted Reddit walkthru of prompt weighting usage 2022-08-23 10:44:33 -04:00
716dbbdf8c resolved conflicts in README changelog 2022-08-23 10:40:22 -04:00
1f2e52a1d6 fixed filename generation so that newer files are always chronologically later 2022-08-23 10:39:18 -04:00
dc788f92b3 in output directory, new image files always start with the number higher than the previous maximum filename to ensure alphabetic sort==chronological sort 2022-08-23 10:19:11 -04:00
13774912f4 generated requirements.txt to test pip-only (non-conda) install 2022-08-23 09:46:27 -04:00
cb9e6d544a Update README.md
Fixed a forward/backward slash error.
2022-08-23 09:35:28 -04:00
1217 changed files with 319537 additions and 11989 deletions

View File

@ -0,0 +1,32 @@
import argparse
import numpy as np
from PIL import Image
def read_image_int16(image_path):
image = Image.open(image_path)
return np.array(image).astype(np.int16)
def calc_images_mean_L1(image1_path, image2_path):
image1 = read_image_int16(image1_path)
image2 = read_image_int16(image2_path)
assert image1.shape == image2.shape
mean_L1 = np.abs(image1 - image2).mean()
return mean_L1
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('image1_path')
parser.add_argument('image2_path')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
mean_L1 = calc_images_mean_L1(args.image1_path, args.image2_path)
print(mean_L1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

View File

@ -0,0 +1 @@
"a photograph of an astronaut riding a horse" -s50 -S42

View File

@ -0,0 +1,19 @@
# generate an image
PROMPT_FILE=".dev_scripts/sample_command.txt"
OUT_DIR="outputs/img-samples/test_regression_txt2img_v1_4"
SAMPLES_DIR=${OUT_DIR}
python scripts/dream.py \
--from_file ${PROMPT_FILE} \
--outdir ${OUT_DIR} \
--sampler plms
# original output by CompVis/stable-diffusion
IMAGE1=".dev_scripts/images/v1_4_astronaut_rides_horse_plms_step50_seed42.png"
# new output
IMAGE2=`ls -A ${SAMPLES_DIR}/*.png | sort | tail -n 1`
echo ""
echo "comparing the following two images"
echo "IMAGE1: ${IMAGE1}"
echo "IMAGE2: ${IMAGE2}"
python .dev_scripts/diff_images.py ${IMAGE1} ${IMAGE2}

View File

@ -0,0 +1,23 @@
# generate an image
PROMPT="a photograph of an astronaut riding a horse"
OUT_DIR="outputs/txt2img-samples/test_regression_txt2img_v1_4"
SAMPLES_DIR="outputs/txt2img-samples/test_regression_txt2img_v1_4/samples"
python scripts/orig_scripts/txt2img.py \
--prompt "${PROMPT}" \
--outdir ${OUT_DIR} \
--plms \
--ddim_steps 50 \
--n_samples 1 \
--n_iter 1 \
--seed 42
# original output by CompVis/stable-diffusion
IMAGE1=".dev_scripts/images/v1_4_astronaut_rides_horse_plms_step50_seed42.png"
# new output
IMAGE2=`ls -A ${SAMPLES_DIR}/*.png | sort | tail -n 1`
echo ""
echo "comparing the following two images"
echo "IMAGE1: ${IMAGE1}"
echo "IMAGE2: ${IMAGE2}"
python .dev_scripts/diff_images.py ${IMAGE1} ${IMAGE2}

25
.dockerignore Normal file
View File

@ -0,0 +1,25 @@
# use this file as a whitelist
*
!invokeai
!ldm
!pyproject.toml
# ignore frontend/web but whitelist dist
invokeai/frontend/web/
!invokeai/frontend/web/dist/
# ignore invokeai/assets but whitelist invokeai/assets/web
invokeai/assets/
!invokeai/assets/web/
# Guard against pulling in any models that might exist in the directory tree
**/*.pt*
**/*.ckpt
# Byte-compiled / optimized / DLL files
**/__pycache__/
**/*.py[cod]
# Distribution / packaging
**/*.egg-info/
**/*.egg

12
.editorconfig Normal file
View 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

1
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1 @@
b3dccfaeb636599c02effc377cdd8a87d658256c

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
# Auto normalizes line endings on commit so devs don't need to change local settings.
# Only affects text files and ignores other file types.
# For more info see: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
* text=auto

34
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,34 @@
# continuous integration
/.github/workflows/ @lstein @blessedcoolant
# documentation
/docs/ @lstein @tildebyte @blessedcoolant
/mkdocs.yml @lstein @blessedcoolant
# nodes
/invokeai/app/ @Kyle0654 @blessedcoolant
# installation and configuration
/pyproject.toml @lstein @blessedcoolant
/docker/ @lstein @blessedcoolant
/scripts/ @ebr @lstein
/installer/ @lstein @ebr
/invokeai/assets @lstein @ebr
/invokeai/configs @lstein
/invokeai/version @lstein @blessedcoolant
# web ui
/invokeai/frontend @blessedcoolant @psychedelicious @lstein
/invokeai/backend @blessedcoolant @psychedelicious @lstein
# generation, model management, postprocessing
/invokeai/backend @damian0815 @lstein @blessedcoolant @jpphoto @gregghelt2
# front ends
/invokeai/frontend/CLI @lstein
/invokeai/frontend/install @lstein @ebr
/invokeai/frontend/merge @lstein @blessedcoolant @hipsterusername
/invokeai/frontend/training @lstein @blessedcoolant @hipsterusername
/invokeai/frontend/web @psychedelicious @blessedcoolant

112
.github/ISSUE_TEMPLATE/BUG_REPORT.yml vendored Normal file
View File

@ -0,0 +1,112 @@
name: 🐞 Bug Report
description: File a bug report
title: '[bug]: '
labels: ['bug']
# assignees:
# - moderator_bot
# - lstein
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Bug Report!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: |
Please use the [search function](https://github.com/invoke-ai/InvokeAI/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
irst to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: markdown
attributes:
value: __Describe your environment__
- type: dropdown
id: os_dropdown
attributes:
label: OS
description: Which operating System did you use when the bug occured
multiple: false
options:
- 'Linux'
- 'Windows'
- 'macOS'
validations:
required: true
- type: dropdown
id: gpu_dropdown
attributes:
label: GPU
description: Which kind of Graphic-Adapter is your System using
multiple: false
options:
- 'cuda'
- 'amd'
- 'mps'
- 'cpu'
validations:
required: true
- type: input
id: vram
attributes:
label: VRAM
description: Size of the VRAM if known
placeholder: 8GB
validations:
required: false
- type: input
id: version-number
attributes:
label: What version did you experience this issue on?
description: |
Please share the version of Invoke AI that you experienced the issue on. If this is not the latest version, please update first to confirm the issue still exists. If you are testing main, please include the commit hash instead.
placeholder: X.X.X
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: |
Briefly describe what happened, what you expected to happen and how to reproduce this bug.
placeholder: When using the webinterface and right-clicking on button X instead of the popup-menu there error Y appears
validations:
required: true
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem
placeholder: this is what the result looked like <screenshot>
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here
placeholder: Only happens when there is full moon and Friday the 13th on Christmas Eve 🎅🏻
validations:
required: false
- type: input
id: contact
attributes:
label: Contact Details
description: __OPTIONAL__ How can we get in touch with you if we need more info (besides this issue)?
placeholder: ex. email@example.com, discordname, twitter, ...
validations:
required: false

View File

@ -0,0 +1,56 @@
name: Feature Request
description: Commit a idea or Request a new feature
title: '[enhancement]: '
labels: ['enhancement']
# assignees:
# - lstein
# - tildebyte
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Feature request!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: |
Please make use of the [search function](https://github.com/invoke-ai/InvokeAI/labels/enhancement)
to see if a simmilar issue already exists for the feature you want to request
options:
- label: I have searched the existing issues
required: true
- type: input
id: contact
attributes:
label: Contact Details
description: __OPTIONAL__ How could we get in touch with you if we need more info (besides this issue)?
placeholder: ex. email@example.com, discordname, twitter, ...
validations:
required: false
- type: textarea
id: whatisexpected
attributes:
label: What should this feature add?
description: Please try to explain the functionality this feature should add
placeholder: |
Instead of one huge textfield, it would be nice to have forms for bug-reports, feature-requests, ...
Great benefits with automatic labeling, assigning and other functionalitys not available in that form
via old-fashioned markdown-templates. I would also love to see the use of a moderator bot 🤖 like
https://github.com/marketplace/actions/issue-moderator-with-commands to auto close old issues and other things
validations:
required: true
- type: textarea
attributes:
label: Alternatives
description: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Aditional Content
description: Add any other context or screenshots about the feature request here.
placeholder: This is a Mockup of the design how I imagine it <screenshot>

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Project-Documentation
url: https://invoke-ai.github.io/InvokeAI/
about: Should be your first place to go when looking for manuals/FAQs regarding our InvokeAI Toolkit
- name: Discord
url: https://discord.gg/ZmtBAhwWhy
about: Our Discord Community could maybe help you out via live-chat
- name: GitHub Community Support
url: https://github.com/orgs/community/discussions
about: Please ask and answer questions regarding the GitHub Platform here.
- name: GitHub Security Bug Bounty
url: https://bounty.github.com/
about: Please report security vulnerabilities of the GitHub Platform here.

19
.github/stale.yaml vendored Normal file
View File

@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 28
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Please
update the ticket if this is still a problem on the latest release.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Due to inactivity, this issue has been automatically closed. If this is
still a problem on the latest release, please recreate the issue.

114
.github/workflows/build-container.yml vendored Normal file
View File

@ -0,0 +1,114 @@
name: build container image
on:
push:
branches:
- 'main'
- 'update/ci/docker/*'
- 'update/docker/*'
- 'dev/ci/docker/*'
- 'dev/docker/*'
paths:
- 'pyproject.toml'
- '.dockerignore'
- 'invokeai/**'
- 'docker/Dockerfile'
tags:
- 'v*.*.*'
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
docker:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
flavor:
- rocm
- cuda
- cpu
include:
- flavor: rocm
pip-extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
- flavor: cuda
pip-extra-index-url: ''
- flavor: cpu
pip-extra-index-url: 'https://download.pytorch.org/whl/cpu'
runs-on: ubuntu-latest
name: ${{ matrix.flavor }}
env:
PLATFORMS: 'linux/amd64,linux/arm64'
DOCKERFILE: 'docker/Dockerfile'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
ghcr.io/${{ github.repository }}
${{ vars.DOCKERHUB_REPOSITORY }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=pep440,pattern={{version}}
type=pep440,pattern={{major}}.{{minor}}
type=pep440,pattern={{major}}
type=sha,enable=true,prefix=sha-,format=short
flavor: |
latest=${{ matrix.flavor == 'cuda' && github.ref == 'refs/heads/main' }}
suffix=-${{ matrix.flavor }},onlatest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: ${{ env.PLATFORMS }}
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: github.event_name != 'pull_request' && vars.DOCKERHUB_REPOSITORY != ''
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build container
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ${{ env.DOCKERFILE }}
platforms: ${{ env.PLATFORMS }}
push: ${{ github.ref == 'refs/heads/main' || github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: PIP_EXTRA_INDEX_URL=${{ matrix.pip-extra-index-url }}
cache-from: |
type=gha,scope=${{ github.ref_name }}-${{ matrix.flavor }}
type=gha,scope=main-${{ matrix.flavor }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ matrix.flavor }}
- name: Docker Hub Description
if: github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' && vars.DOCKERHUB_REPOSITORY != ''
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_REPOSITORY }}
short-description: ${{ github.event.repository.description }}

34
.github/workflows/clean-caches.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=${{ github.ref }}
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,27 @@
name: Close inactive issues
on:
schedule:
- cron: "00 6 * * *"
env:
DAYS_BEFORE_ISSUE_STALE: 14
DAYS_BEFORE_ISSUE_CLOSE: 28
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }}
stale-issue-label: "Inactive Issue"
stale-issue-message: "There has been no activity in this issue for ${{ env.DAYS_BEFORE_ISSUE_STALE }} days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release."
close-issue-message: "Due to inactivity, this issue was automatically closed. If you are still experiencing the issue, please recreate the issue."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: 500

37
.github/workflows/lint-frontend.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Lint frontend
on:
pull_request:
paths:
- 'invokeai/frontend/web/**'
types:
- 'ready_for_review'
- 'opened'
- 'synchronize'
push:
branches:
- 'main'
paths:
- 'invokeai/frontend/web/**'
merge_group:
workflow_dispatch:
defaults:
run:
working-directory: invokeai/frontend/web
jobs:
lint-frontend:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: '18'
- uses: actions/checkout@v3
- run: 'yarn install --frozen-lockfile'
- run: 'yarn run lint:tsc'
- run: 'yarn run lint:madge'
- run: 'yarn run lint:eslint'
- run: 'yarn run lint:prettier'

51
.github/workflows/mkdocs-material.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: mkdocs-material
on:
push:
branches:
- 'refs/heads/v2.3'
permissions:
contents: write
jobs:
mkdocs-material:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
REPO_URL: '${{ github.server_url }}/${{ github.repository }}'
REPO_NAME: '${{ github.repository }}'
SITE_URL: 'https://${{ github.repository_owner }}.github.io/InvokeAI'
steps:
- name: checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: pyproject.toml
- name: install requirements
env:
PIP_USE_PEP517: 1
run: |
python -m \
pip install ".[docs]"
- name: confirm buildability
run: |
python -m \
mkdocs build \
--clean \
--verbose
- name: deploy to gh-pages
if: ${{ github.ref == 'refs/heads/v2.3' }}
run: |
python -m \
mkdocs gh-deploy \
--clean \
--force

20
.github/workflows/pyflakes.yml vendored Normal file
View File

@ -0,0 +1,20 @@
on:
pull_request:
push:
branches:
- main
- development
- 'release-candidate-*'
jobs:
pyflakes:
name: runner / pyflakes
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: pyflakes
uses: reviewdog/action-pyflakes@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review

41
.github/workflows/pypi-release.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: PyPI Release
on:
push:
paths:
- 'invokeai/version/invokeai_version.py'
workflow_dispatch:
jobs:
release:
if: github.repository == 'invoke-ai/InvokeAI'
runs-on: ubuntu-22.04
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_NON_INTERACTIVE: 1
steps:
- name: checkout sources
uses: actions/checkout@v3
- name: install deps
run: pip install --upgrade build twine
- name: build package
run: python3 -m build
- name: check distribution
run: twine check dist/*
- name: check PyPI versions
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2.3'
run: |
pip install --upgrade requests
python -c "\
import scripts.pypi_helper; \
EXISTS=scripts.pypi_helper.local_on_pypi(); \
print(f'PACKAGE_EXISTS={EXISTS}')" >> $GITHUB_ENV
- name: upload package
if: env.PACKAGE_EXISTS == 'False' && env.TWINE_PASSWORD != ''
run: twine upload dist/*

View File

@ -0,0 +1,66 @@
name: Test invoke.py pip
on:
pull_request:
paths:
- '**'
- '!pyproject.toml'
- '!invokeai/**'
- 'invokeai/frontend/web/**'
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
matrix:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version:
# - '3.9'
- '3.10'
pytorch:
# - linux-cuda-11_6
- linux-cuda-11_7
- linux-rocm-5_2
- linux-cpu
- macos-default
- windows-cpu
# - windows-cuda-11_6
# - windows-cuda-11_7
include:
# - pytorch: linux-cuda-11_6
# os: ubuntu-22.04
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
# github-env: $GITHUB_ENV
- pytorch: linux-cuda-11_7
os: ubuntu-22.04
github-env: $GITHUB_ENV
- pytorch: linux-rocm-5_2
os: ubuntu-22.04
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
github-env: $GITHUB_ENV
- pytorch: linux-cpu
os: ubuntu-22.04
extra-index-url: 'https://download.pytorch.org/whl/cpu'
github-env: $GITHUB_ENV
- pytorch: macos-default
os: macOS-12
github-env: $GITHUB_ENV
- pytorch: windows-cpu
os: windows-2022
github-env: $env:GITHUB_ENV
# - pytorch: windows-cuda-11_6
# os: windows-2022
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
# github-env: $env:GITHUB_ENV
# - pytorch: windows-cuda-11_7
# os: windows-2022
# extra-index-url: 'https://download.pytorch.org/whl/cu117'
# github-env: $env:GITHUB_ENV
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
steps:
- run: 'echo "No build required"'

144
.github/workflows/test-invoke-pip.yml vendored Normal file
View File

@ -0,0 +1,144 @@
name: Test invoke.py pip
on:
push:
branches:
- 'main'
paths:
- 'pyproject.toml'
- 'invokeai/**'
- '!invokeai/frontend/web/**'
pull_request:
paths:
- 'pyproject.toml'
- 'invokeai/**'
- '!invokeai/frontend/web/**'
types:
- 'ready_for_review'
- 'opened'
- 'synchronize'
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
matrix:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version:
# - '3.9'
- '3.10'
pytorch:
# - linux-cuda-11_6
- linux-cuda-11_7
- linux-rocm-5_2
- linux-cpu
- macos-default
- windows-cpu
# - windows-cuda-11_6
# - windows-cuda-11_7
include:
# - pytorch: linux-cuda-11_6
# os: ubuntu-22.04
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
# github-env: $GITHUB_ENV
- pytorch: linux-cuda-11_7
os: ubuntu-22.04
github-env: $GITHUB_ENV
- pytorch: linux-rocm-5_2
os: ubuntu-22.04
extra-index-url: 'https://download.pytorch.org/whl/rocm5.2'
github-env: $GITHUB_ENV
- pytorch: linux-cpu
os: ubuntu-22.04
extra-index-url: 'https://download.pytorch.org/whl/cpu'
github-env: $GITHUB_ENV
- pytorch: macos-default
os: macOS-12
github-env: $GITHUB_ENV
- pytorch: windows-cpu
os: windows-2022
github-env: $env:GITHUB_ENV
# - pytorch: windows-cuda-11_6
# os: windows-2022
# extra-index-url: 'https://download.pytorch.org/whl/cu116'
# github-env: $env:GITHUB_ENV
# - pytorch: windows-cuda-11_7
# os: windows-2022
# extra-index-url: 'https://download.pytorch.org/whl/cu117'
# github-env: $env:GITHUB_ENV
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
env:
PIP_USE_PEP517: '1'
steps:
- name: Checkout sources
id: checkout-sources
uses: actions/checkout@v3
- name: set test prompt to main branch validation
if: ${{ github.ref == 'refs/heads/main' }}
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> ${{ matrix.github-env }}
- name: set test prompt to Pull Request validation
if: ${{ github.ref != 'refs/heads/main' }}
run: echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> ${{ matrix.github-env }}
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: install invokeai
env:
PIP_EXTRA_INDEX_URL: ${{ matrix.extra-index-url }}
run: >
pip3 install
--editable=".[test]"
- name: run pytest
id: run-pytest
run: pytest
- name: set INVOKEAI_OUTDIR
run: >
python -c
"import os;from invokeai.backend.globals import Globals;OUTDIR=os.path.join(Globals.root,str('outputs'));print(f'INVOKEAI_OUTDIR={OUTDIR}')"
>> ${{ matrix.github-env }}
- name: run invokeai-configure
id: run-preload-models
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
run: >
invokeai-configure
--yes
--default_only
--full-precision
# can't use fp16 weights without a GPU
- name: run invokeai
id: run-invokeai
env:
# Set offline mode to make sure configure preloaded successfully.
HF_HUB_OFFLINE: 1
HF_DATASETS_OFFLINE: 1
TRANSFORMERS_OFFLINE: 1
run: >
invokeai
--no-patchmatch
--no-nsfw_checker
--from_file ${{ env.TEST_PROMPTS }}
--outdir ${{ env.INVOKEAI_OUTDIR }}/${{ matrix.python-version }}/${{ matrix.pytorch }}
- name: Archive results
id: archive-results
uses: actions/upload-artifact@v3
with:
name: results
path: ${{ env.INVOKEAI_OUTDIR }}

233
.gitignore vendored Normal file
View File

@ -0,0 +1,233 @@
# ignore default image save location and model symbolic link
.idea/
embeddings/
outputs/
models/ldm/stable-diffusion-v1/model.ckpt
**/restoration/codeformer/weights
# ignore user models config
configs/models.user.yaml
config/models.user.yml
invokeai.init
.version
.last_model
# ignore the Anaconda/Miniconda installer used while building Docker image
anaconda.sh
# ignore a directory which serves as a place for initial images
inputs/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# emacs autosave and recovery files
*~
.#*
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coveragerc
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
cov.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.pytest.ini
cover/
junit/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
src
**/__pycache__/
outputs
# Logs and associated folders
# created from generated embeddings.
logs
testtube
checkpoints
# If it's a Mac
.DS_Store
# Let the frontend manage its own gitignore
!invokeai/frontend/web/*
# Scratch folder
.scratch/
.vscode/
gfpgan/
models/ldm/stable-diffusion-v1/*.sha256
# GFPGAN model files
gfpgan/
# config file (will be created by installer)
configs/models.yaml
# ignore initfile
.invokeai
# ignore environment.yml and requirements.txt
# these are links to the real files in environments-and-requirements
environment.yml
requirements.txt
# source installer files
installer/*zip
installer/install.bat
installer/install.sh
installer/update.bat
installer/update.sh

View File

13
.prettierrc.yaml Normal file
View File

@ -0,0 +1,13 @@
endOfLine: lf
tabWidth: 2
useTabs: false
singleQuote: true
quoteProps: as-needed
embeddedLanguageFormatting: auto
overrides:
- files: '*.md'
options:
proseWrap: always
printWidth: 80
parser: markdown
cursorOffset: -1

128
CODE_OF_CONDUCT.md Normal file
View 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.

View File

@ -0,0 +1,84 @@
<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
artists 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**, **keturn**, and **ebr** (Eugene Brodsky). Although individuals within the group may hold differing views on particular details and/or their implications, we are all in agreement about its fundamental statements, as well as their significance and importance to this project moving forward.

19
LICENSE
View File

@ -1,9 +1,16 @@
All rights reserved by the authors.
You must not distribute the weights provided to you directly or indirectly without explicit consent of the authors.
You must not distribute harmful, offensive, dehumanizing content or otherwise harmful representations of people or their environments, cultures, religions, etc. produced with the model weights
or other generated content described in the "Misuse and Malicious Use" section in the model card.
The model weights are provided for research purposes only.
MIT License
Copyright (c) 2022 InvokeAI Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@ -11,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

294
LICENSE-ModelWeights.txt Normal file
View File

@ -0,0 +1,294 @@
Copyright (c) 2022 Robin Rombach and Patrick Esser and contributors
CreativeML Open RAIL-M
dated August 22, 2022
Section I: PREAMBLE
Multimodal generative models are being widely adopted and used, and
have the potential to transform the way artists, among other
individuals, conceive and benefit from AI or ML technologies as a tool
for content creation.
Notwithstanding the current and potential benefits that these
artifacts can bring to society at large, there are also concerns about
potential misuses of them, either due to their technical limitations
or ethical considerations.
In short, this license strives for both the open and responsible
downstream use of the accompanying model. When it comes to the open
character, we took inspiration from open source permissive licenses
regarding the grant of IP rights. Referring to the downstream
responsible use, we added use-based restrictions not permitting the
use of the Model in very specific scenarios, in order for the licensor
to be able to enforce the license in case potential misuses of the
Model may occur. At the same time, we strive to promote open and
responsible research on generative models for art and content
generation.
Even though downstream derivative versions of the model could be
released under different licensing terms, the latter will always have
to include - at minimum - the same use-based restrictions as the ones
in the original license (this license). We believe in the intersection
between open and responsible AI development; thus, this License aims
to strike a balance between both in order to enable responsible
open-science in the field of AI.
This License governs the use of the model (and its derivatives) and is
informed by the model card associated with the model.
NOW THEREFORE, You and Licensor agree as follows:
1. Definitions
- "License" means the terms and conditions for use, reproduction, and
Distribution as defined in this document.
- "Data" means a collection of information and/or content extracted
from the dataset used with the Model, including to train, pretrain,
or otherwise evaluate the Model. The Data is not licensed under this
License.
- "Output" means the results of operating a Model as embodied in
informational content resulting therefrom.
- "Model" means any accompanying machine-learning based assemblies
(including checkpoints), consisting of learnt weights, parameters
(including optimizer states), corresponding to the model
architecture as embodied in the Complementary Material, that have
been trained or tuned, in whole or in part on the Data, using the
Complementary Material.
- "Derivatives of the Model" means all modifications to the Model,
works based on the Model, or any other model which is created or
initialized by transfer of patterns of the weights, parameters,
activations or output of the Model, to the other model, in order to
cause the other model to perform similarly to the Model, including -
but not limited to - distillation methods entailing the use of
intermediate data representations or methods based on the generation
of synthetic data by the Model for training the other model.
- "Complementary Material" means the accompanying source code and
scripts used to define, run, load, benchmark or evaluate the Model,
and used to prepare data for training or evaluation, if any. This
includes any accompanying documentation, tutorials, examples, etc,
if any.
- "Distribution" means any transmission, reproduction, publication or
other sharing of the Model or Derivatives of the Model to a third
party, including providing the Model as a hosted service made
available by electronic or other remote means - e.g. API-based or
web access.
- "Licensor" means the copyright owner or entity authorized by the
copyright owner that is granting the License, including the persons
or entities that may have rights in the Model and/or distributing
the Model.
- "You" (or "Your") means an individual or Legal Entity exercising
permissions granted by this License and/or making use of the Model
for whichever purpose and in any field of use, including usage of
the Model in an end-use application - e.g. chatbot, translator,
image generator.
- "Third Parties" means individuals or legal entities that are not
under common control with Licensor or You.
- "Contribution" means any work of authorship, including the original
version of the Model and any modifications or additions to that
Model or Derivatives of the Model thereof, that is intentionally
submitted to Licensor for inclusion in the Model by the copyright
owner or by an individual or Legal Entity authorized to submit on
behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written
communication sent to the Licensor or its representatives, including
but not limited to communication on electronic mailing lists, source
code control systems, and issue tracking systems that are managed
by, or on behalf of, the Licensor for the purpose of discussing and
improving the Model, but excluding communication that is
conspicuously marked or otherwise designated in writing by the
copyright owner as "Not a Contribution."
- "Contributor" means Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Model.
Section II: INTELLECTUAL PROPERTY RIGHTS
Both copyright and patent grants apply to the Model, Derivatives of
the Model and Complementary Material. The Model and Derivatives of the
Model are subject to additional terms as described in Section III.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare, publicly display, publicly
perform, sublicense, and distribute the Complementary Material, the
Model, and Derivatives of the Model.
3. Grant of Patent License. Subject to the terms and conditions of
this License and where and as applicable, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this paragraph) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Model and the Complementary Material, where
such license applies only to those patent claims licensable by such
Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Model to
which such Contribution(s) was submitted. If You institute patent
litigation against any entity (including a cross-claim or counterclaim
in a lawsuit) alleging that the Model and/or Complementary Material or
a Contribution incorporated within the Model and/or Complementary
Material constitutes direct or contributory patent infringement, then
any patent licenses granted to You under this License for the Model
and/or Work shall terminate as of the date such litigation is asserted
or filed.
Section III: CONDITIONS OF USAGE, DISTRIBUTION AND REDISTRIBUTION
4. Distribution and Redistribution. You may host for Third Party
remote access purposes (e.g. software-as-a-service), reproduce and
distribute copies of the Model or Derivatives of the Model thereof in
any medium, with or without modifications, provided that You meet the
following conditions: Use-based restrictions as referenced in
paragraph 5 MUST be included as an enforceable provision by You in any
type of legal agreement (e.g. a license) governing the use and/or
distribution of the Model or Derivatives of the Model, and You shall
give notice to subsequent users You Distribute to, that the Model or
Derivatives of the Model are subject to paragraph 5. This provision
does not apply to the use of Complementary Material. You must give
any Third Party recipients of the Model or Derivatives of the Model a
copy of this License; You must cause any modified files to carry
prominent notices stating that You changed the files; You must retain
all copyright, patent, trademark, and attribution notices excluding
those notices that do not pertain to any part of the Model,
Derivatives of the Model. You may add Your own copyright statement to
Your modifications and may provide additional or different license
terms and conditions - respecting paragraph 4.a. - for use,
reproduction, or Distribution of Your modifications, or for any such
Derivatives of the Model as a whole, provided Your use, reproduction,
and Distribution of the Model otherwise complies with the conditions
stated in this License.
5. Use-based restrictions. The restrictions set forth in Attachment A
are considered Use-based restrictions. Therefore You cannot use the
Model and the Derivatives of the Model for the specified restricted
uses. You may use the Model subject to this License, including only
for lawful purposes and in accordance with the License. Use may
include creating any content with, finetuning, updating, running,
training, evaluating and/or reparametrizing the Model. You shall
require all of Your users who use the Model or a Derivative of the
Model to comply with the terms of this paragraph (paragraph 5).
6. The Output You Generate. Except as set forth herein, Licensor
claims no rights in the Output You generate using the Model. You are
accountable for the Output you generate and its subsequent uses. No
use of the output can contravene any provision as stated in the
License.
Section IV: OTHER PROVISIONS
7. Updates and Runtime Restrictions. To the maximum extent permitted
by law, Licensor reserves the right to restrict (remotely or
otherwise) usage of the Model in violation of this License, update the
Model through electronic means, or modify the Output of the Model
based on updates. You shall undertake reasonable efforts to use the
latest version of the Model.
8. Trademarks and related. Nothing in this License permits You to make
use of Licensors trademarks, trade names, logos or to otherwise
suggest endorsement or misrepresent the relationship between the
parties; and any rights not expressly granted herein are reserved by
the Licensors.
9. Disclaimer of Warranty. Unless required by applicable law or agreed
to in writing, Licensor provides the Model and the Complementary
Material (and each Contributor provides its Contributions) on an "AS
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied, including, without limitation, any warranties or
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
A PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Model, Derivatives of
the Model, and the Complementary Material and assume any risks
associated with Your exercise of permissions under this License.
10. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise, unless
required by applicable law (such as deliberate and grossly negligent
acts) or agreed to in writing, shall any Contributor be liable to You
for damages, including any direct, indirect, special, incidental, or
consequential damages of any character arising as a result of this
License or out of the use or inability to use the Model and the
Complementary Material (including but not limited to damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any
and all other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
11. Accepting Warranty or Additional Liability. While redistributing
the Model, Derivatives of the Model and the Complementary Material
thereof, You may choose to offer, and charge a fee for, acceptance of
support, warranty, indemnity, or other liability obligations and/or
rights consistent with this License. However, in accepting such
obligations, You may act only on Your own behalf and on Your sole
responsibility, not on behalf of any other Contributor, and only if
You agree to indemnify, defend, and hold each Contributor harmless for
any liability incurred by, or claims asserted against, such
Contributor by reason of your accepting any such warranty or
additional liability.
12. If any provision of this License is held to be invalid, illegal or
unenforceable, the remaining provisions shall be unaffected thereby
and remain valid as if such provision had not been set forth herein.
END OF TERMS AND CONDITIONS
Attachment A
Use Restrictions
You agree not to use the Model or Derivatives of the Model:
- In any way that violates any applicable national, federal, state,
local or international law or regulation;
- For the purpose of exploiting, harming or attempting to exploit or
harm minors in any way;
- To generate or disseminate verifiably false information and/or
content with the purpose of harming others;
- To generate or disseminate personal identifiable information that
can be used to harm an individual;
- To defame, disparage or otherwise harass others;
- For fully automated decision making that adversely impacts an
individuals legal rights or otherwise creates or modifies a
binding, enforceable obligation;
pp- For any use intended to or which has the effect of discriminating
against or harming individuals or groups based on online or offline
social behavior or known or predicted personal or personality
characteristics;
- To exploit any of the vulnerabilities of a specific group of persons
based on their age, social, physical or mental characteristics, in
order to materially distort the behavior of a person pertaining to
that group in a manner that causes or is likely to cause that person
or another person physical or psychological harm;
- For any use intended to or which has the effect of discriminating
against individuals or groups based on legally protected
characteristics or categories;
- To provide medical advice and medical results interpretation;
- To generate or disseminate information for the purpose to be used
for administration of justice, law enforcement, immigration or
asylum processes, such as predicting an individual will commit
fraud/crime commitment (e.g. by text profiling, drawing causal
relationships between assertions made in documents, indiscriminate
and arbitrarily-targeted use).

834
README.md
View File

@ -1,586 +1,294 @@
# Stable Diffusion Dream Script
This is a fork of CompVis/stable-diffusion, the wonderful open source
text-to-image generator.
The original has been modified in several ways:
## Interactive command-line interface similar to the Discord bot
The *dream.py* script, located in scripts/dream.py,
provides an interactive interface to image generation similar to
the "dream mothership" bot that Stable AI provided on its Discord
server. Unlike the txt2img.py and img2img.py scripts provided in the
original CompViz/stable-diffusion source code repository, the
time-consuming initialization of the AI model
initialization only happens once. After that image generation
from the command-line interface is very fast.
The script uses the readline library to allow for in-line editing,
command history (up and down arrows), autocompletion, and more. To help
keep track of which prompts generated which images, the script writes a
log file of image names and prompts to the selected output directory.
In addition, as of version 1.02, it also writes the prompt into the PNG
file's metadata where it can be retrieved using scripts/images2prompt.py
The script is confirmed to work on Linux and Windows systems. It should
work on MacOSX as well, but this is not confirmed. Note that this script
runs from the command-line (CMD or Terminal window), and does not have a GUI.
~~~~
(ldm) ~/stable-diffusion$ python3 ./scripts/dream.py
* Initializing, be patient...
Loading model from models/ldm/text2img-large/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 872.30 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading Bert tokenizer from "models/bert"
setting sampler to plms
* Initialization done! Awaiting your command...
dream> ashley judd riding a camel -n2 -s150
Outputs:
outputs/img-samples/00009.png: "ashley judd riding a camel" -n2 -s150 -S 416354203
outputs/img-samples/00010.png: "ashley judd riding a camel" -n2 -s150 -S 1362479620
dream> "there's a fly in my soup" -n6 -g
outputs/img-samples/00011.png: "there's a fly in my soup" -n6 -g -S 2685670268
seeds for individual rows: [2685670268, 1216708065, 2335773498, 822223658, 714542046, 3395302430]
dream> q
# this shows how to retrieve the prompt stored in the saved image's metadata
(ldm) ~/stable-diffusion$ python3 ./scripts/images2prompt.py outputs/img_samples/*.png
00009.png: "ashley judd riding a camel" -s150 -S 416354203
00010.png: "ashley judd riding a camel" -s150 -S 1362479620
00011.png: "there's a fly in my soup" -n6 -g -S 2685670268
~~~~
The dream> prompt's arguments are pretty much identical to those used
in the Discord bot, except you don't need to type "!dream" (it doesn't
hurt if you do). A significant change is that creation of individual
images is now the default unless --grid (-g) is given. For backward
compatibility, the -i switch is recognized. For command-line help
type -h (or --help) at the dream> prompt.
The script itself also recognizes a series of command-line switches
that will change important global defaults, such as the directory for
image outputs and the location of the model weight files.
## Image-to-Image
This script also provides an img2img feature that lets you seed your
creations with a drawing or photo. This is a really cool feature that tells
stable diffusion to build the prompt on top of the image you provide, preserving
the original's basic shape and layout. To use it, provide the --init_img
option as shown here:
~~~~
dream> "waterfall and rainbow" --init_img=./init-images/crude_drawing.png --strength=0.5 -s100 -n4
~~~~
The --init_img (-I) option gives the path to the seed picture. --strength (-f) controls how much
the original will be modified, ranging from 0.0 (keep the original intact), to 1.0 (ignore the original
completely). The default is 0.75, and ranges from 0.25-0.75 give interesting results.
## Weighted Prompts
You may weight different sections of the prompt to tell the sampler to attach different levels of
priority to them, by adding :(number) to the end of the section you wish to up- or downweight.
For example consider this prompt:
~~~~
tabby cat:0.25 white duck:0.75 hybrid
~~~~
This will tell the sampler to invest 25% of its effort on the tabby
cat aspect of the image and 75% on the white duck aspect
(surprisingly, this example actually works). The prompt weights can
use any combination of integers and floating point numbers, and they
do not need to add up to 1. A practical example of using this type of
weighting is described here:
https://www.reddit.com/r/StableDiffusion/comments/wvb7q7/using_prompt_weights_to_tweak_an_image_with/
## Changes
* v1.06 (23 August 2022)
* Added weighted prompt support contributed by [xraxra](https://github.com/xraxra)
* Example of using weighted prompts to tweak a demonic figure contributed by [bmaltais](https://github.com/bmaltais)
* v1.05 (22 August 2022 - after the drop)
* Filenames now use the following formats:
000010.95183149.png -- Two files produced by the same command (e.g. -n2),
000010.26742632.png -- distinguished by a different seed.
000011.455191342.01.png -- Two files produced by the same command using
000011.455191342.02.png -- a batch size>1 (e.g. -b2). They have the same seed.
000011.4160627868.grid#1-4.png -- a grid of four images (-g); the whole grid can
be regenerated with the indicated key
* It should no longer be possible for one image to overwrite another
* You can use the "cd" and "pwd" commands at the dream> prompt to set and retrieve
the path of the output directory.
* v1.04 (22 August 2022 - after the drop)
* Updated README to reflect installation of the released weights.
* Suppressed very noisy and inconsequential warning when loading the frozen CLIP
tokenizer.
* v1.03 (22 August 2022)
* The original txt2img and img2img scripts from the CompViz repository have been moved into
a subfolder named "orig_scripts", to reduce confusion.
* v1.02 (21 August 2022)
* A copy of the prompt and all of its switches and options is now stored in the corresponding
image in a tEXt metadata field named "Dream". You can read the prompt using scripts/images2prompt.py,
or an image editor that allows you to explore the full metadata.
**Please run "conda env update -f environment.yaml" to load the k_lms dependencies!!**
* v1.01 (21 August 2022)
* added k_lms sampling.
**Please run "conda env update -f environment.yaml" to load the k_lms dependencies!!**
* use half precision arithmetic by default, resulting in faster execution and lower memory requirements
Pass argument --full_precision to dream.py to get slower but more accurate image generation
## Installation
There are separate installation walkthroughs for [Linux/Mac](#linuxmac) and [Windows](#windows).
### Linux/Mac
1. You will need to install the following prerequisites if they are not already available. Use your
operating system's preferred installer
* Python (version 3.8.5 recommended; higher may work)
* git
2. Install the Python Anaconda environment manager using pip3.
```
~$ pip3 install anaconda
```
After installing anaconda, you should log out of your system and log back in. If the installation
worked, your command prompt will be prefixed by the name of the current anaconda environment, "(base)".
3. Copy the stable-diffusion source code from GitHub:
```
(base) ~$ git clone https://github.com/lstein/stable-diffusion.git
```
This will create stable-diffusion folder where you will follow the rest of the steps.
4. Enter the newly-created stable-diffusion folder. From this step forward make sure that you are working in the stable-diffusion directory!
```
(base) ~$ cd stable-diffusion
(base) ~/stable-diffusion$
```
5. Use anaconda to copy necessary python packages, create a new python environment named "ldm",
and activate the environment.
```
(base) ~/stable-diffusion$ conda env create -f environment.yaml
(base) ~/stable-diffusion$ conda activate ldm
(ldm) ~/stable-diffusion$
```
After these steps, your command prompt will be prefixed by "(ldm)" as shown above.
6. Load a couple of small machine-learning models required by stable diffusion:
```
(ldm) ~/stable-diffusion$ python3 scripts/preload_models.py
```
Note that this step is necessary because I modified the original
just-in-time model loading scheme to allow the script to work on GPU
machines that are not internet connected. See [Workaround for machines with limited internet connectivity](#workaround-for-machines-with-limited-internet-connectivity)
7. Now you need to install the weights for the stable diffusion model.
For running with the released weights, you will first need to set up an acount with Hugging Face (https://huggingface.co).
Use your credentials to log in, and then point your browser at https://huggingface.co/CompVis/stable-diffusion-v-1-4-original.
You may be asked to sign a license agreement at this point.
Click on "Files and versions" near the top of the page, and then click on the file named "sd-v1-4.ckpt". You'll be taken
to a page that prompts you to click the "download" link. Save the file somewhere safe on your local machine.
Now run the following commands from within the stable-diffusion directory. This will create a symbolic
link from the stable-diffusion model.ckpt file, to the true location of the sd-v1-4.ckpt file.
```
(ldm) ~/stable-diffusion$ mkdir -p models/ldm/stable-diffusion-v1
(ldm) ~/stable-diffusion$ ln -sf /path/to/sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt
```
8. Start generating images!
```
# for the pre-release weights use the -l or --liaon400m switch
(ldm) ~/stable-diffusion$ python3 scripts/dream.py -l
# for the post-release weights do not use the switch
(ldm) ~/stable-diffusion$ python3 scripts/dream.py
# for additional configuration switches and arguments, use -h or --help
(ldm) ~/stable-diffusion$ python3 scripts/dream.py -h
```
9. Subsequently, to relaunch the script, be sure to run "conda activate ldm" (step 5, second command), enter the "stable-diffusion"
directory, and then launch the dream script (step 8). If you forget to activate the ldm environment, the script will fail with multiple ModuleNotFound errors.
#### Updating to newer versions of the script
This distribution is changing rapidly. If you used the "git clone" method (step 5) to download the stable-diffusion directory, then to update to the latest and greatest version, launch the Anaconda window, enter "stable-diffusion", and type:
```
(ldm) ~/stable-diffusion$ git pull
```
This will bring your local copy into sync with the remote one.
### Windows
1. Install Python version 3.8.5 from here: https://www.python.org/downloads/windows/
(note that several users have reported that later versions do not work properly)
2. Install Anaconda3 (miniconda3 version) from here: https://docs.anaconda.com/anaconda/install/windows/
3. Install Git from here: https://git-scm.com/download/win
4. Launch Anaconda from the Windows Start menu. This will bring up a command window. Type all the remaining commands in this window.
5. Run the command:
```
git clone https://github.com/lstein/stable-diffusion.git
```
This will create stable-diffusion folder where you will follow the rest of the steps.
6. Enter the newly-created stable-diffusion folder. From this step forward make sure that you are working in the stable-diffusion directory!
```
cd stable-diffusion
```
7. Run the following two commands:
```
conda env create -f environment.yaml (step 7a)
conda activate ldm (step 7b)
```
This will install all python requirements and activate the "ldm" environment which sets PATH and other environment variables properly.
8. Run the command:
```
python scripts\preload_models.py
```
This installs several machine learning models that stable diffusion
requires. (Note that this step is required. I created it because some people
are using GPU systems that are behind a firewall and the models can't be
downloaded just-in-time)
9. Now you need to install the weights for the big stable diffusion model.
For running with the released weights, you will first need to set up
an acount with Hugging Face (https://huggingface.co). Use your
credentials to log in, and then point your browser at
https://huggingface.co/CompVis/stable-diffusion-v-1-4-original. You
may be asked to sign a license agreement at this point.
Click on "Files and versions" near the top of the page, and then click
on the file named "sd-v1-4.ckpt". You'll be taken to a page that
prompts you to click the "download" link. Now save the file somewhere
safe on your local machine. The weight file is >4 GB in size, so
downloading may take a while.
Now run the following commands from **within the stable-diffusion
directory** to copy the weights file to the right place:
```
mkdir -p models/ldm/stable-diffusion-v1
copy C:\path\to\sd-v1-4.ckpt models\ldm\stable-diffusion-v1\model.ckpt
```
Please replace "C:\path\to\sd-v1.4.ckpt" with the correct path to wherever
you stashed this file. If you prefer not to copy or move the .ckpt file,
you may instead create a shortcut to it from within
"models\ldm\stable-diffusion-v1\".
10. Start generating images!
```
# for the pre-release weights
python scripts\dream.py -l
# for the post-release weights
python scripts\dream.py
```
11. Subsequently, to relaunch the script, first activate the Anaconda command window (step 4), enter the stable-diffusion directory (step 6, "cd \path\to\stable-diffusion"), run "conda activate ldm" (step 7b), and then launch the dream script (step 10).
#### Updating to newer versions of the script
This distribution is changing rapidly. If you used the "git clone" method (step 5) to download the stable-diffusion directory, then to update to the latest and greatest version, launch the Anaconda window, enter "stable-diffusion", and type:
```
git pull
```
This will bring your local copy into sync with the remote one.
## Simplified API for text to image generation
For programmers who wish to incorporate stable-diffusion into other
products, this repository includes a simplified API for text to image generation, which
lets you create images from a prompt in just three lines of code:
~~~~
from ldm.simplet2i import T2I
model = T2I()
outputs = model.txt2img("a unicorn in manhattan")
~~~~
Outputs is a list of lists in the format [[filename1,seed1],[filename2,seed2]...]
Please see ldm/simplet2i.py for more information.
## Workaround for machines with limited internet connectivity
My development machine is a GPU node in a high-performance compute
cluster which has no connection to the internet. During model
initialization, stable-diffusion tries to download the Bert tokenizer
and a file needed by the kornia library. This obviously didn't work
for me.
To work around this, I have modified ldm/modules/encoders/modules.py
to look for locally cached Bert files rather than attempting to
download them. For this to work, you must run
"scripts/preload_models.py" once from an internet-connected machine
prior to running the code on an isolated one. This assumes that both
machines share a common network-mounted filesystem with a common
.cache directory.
~~~~
(ldm) ~/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
~~~~
If you don't need this change and want to download the files just in
time, copy over the file ldm/modules/encoders/modules.py from the
CompVis/stable-diffusion repository. Or you can run preload_models.py
on the target machine.
## Support
For support,
please use this repository's GitHub Issues tracking service. Feel free
to send me an email if you use and like the script.
*Original Author:* Lincoln D. Stein <lincoln.stein@gmail.com>
*Contributions by:* [Peter Kowalczyk](https://github.com/slix), [Henry Harrison](https://github.com/hwharrison), [xraxra](https://github.com/xraxra), and [bmaltais](https://github.com/bmaltais)
# Original README from CompViz/stable-diffusion
*Stable Diffusion was made possible thanks to a collaboration with [Stability AI](https://stability.ai/) and [Runway](https://runwayml.com/) and builds upon our previous work:*
[**High-Resolution Image Synthesis with Latent Diffusion Models**](https://ommer-lab.com/research/latent-diffusion-models/)<br/>
[Robin Rombach](https://github.com/rromb)\*,
[Andreas Blattmann](https://github.com/ablattmann)\*,
[Dominik Lorenz](https://github.com/qp-qp)\,
[Patrick Esser](https://github.com/pesser),
[Björn Ommer](https://hci.iwr.uni-heidelberg.de/Staff/bommer)<br/>
**CVPR '22 Oral**
which is available on [GitHub](https://github.com/CompVis/latent-diffusion). PDF at [arXiv](https://arxiv.org/abs/2112.10752). Please also visit our [Project page](https://ommer-lab.com/research/latent-diffusion-models/).
![txt2img-stable2](assets/stable-samples/txt2img/merged-0006.png)
[Stable Diffusion](#stable-diffusion-v1) is a latent text-to-image diffusion
model.
Thanks to a generous compute donation from [Stability AI](https://stability.ai/) and support from [LAION](https://laion.ai/), we were able to train a Latent Diffusion Model on 512x512 images from a subset of the [LAION-5B](https://laion.ai/blog/laion-5b/) database.
Similar to Google's [Imagen](https://arxiv.org/abs/2205.11487),
this model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts.
With its 860M UNet and 123M text encoder, the model is relatively lightweight and runs on a GPU with at least 10GB VRAM.
See [this section](#stable-diffusion-v1) below and the [model card](https://huggingface.co/CompVis/stable-diffusion).
## Requirements
A suitable [conda](https://conda.io/) environment named `ldm` can be created
and activated with:
```
conda env create -f environment.yaml
conda activate ldm
```
You can also update an existing [latent diffusion](https://github.com/CompVis/latent-diffusion) environment by running
```
conda install pytorch torchvision -c pytorch
pip install transformers==4.19.2
pip install -e .
```
## Stable Diffusion v1
Stable Diffusion v1 refers to a specific configuration of the model
architecture that uses a downsampling-factor 8 autoencoder with an 860M UNet
and CLIP ViT-L/14 text encoder for the diffusion model. The model was pretrained on 256x256 images and
then finetuned on 512x512 images.
*Note: Stable Diffusion v1 is a general text-to-image diffusion model and therefore mirrors biases and (mis-)conceptions that are present
in its training data.
Details on the training procedure and data, as well as the intended use of the model can be found in the corresponding [model card](https://huggingface.co/CompVis/stable-diffusion).
Research into the safe deployment of general text-to-image models is an ongoing effort. To prevent misuse and harm, we currently provide access to the checkpoints only for [academic research purposes upon request](https://stability.ai/academia-access-form).
**This is an experiment in safe and community-driven publication of a capable and general text-to-image model. We are working on a public release with a more permissive license that also incorporates ethical considerations.***
[Request access to Stable Diffusion v1 checkpoints for academic research](https://stability.ai/academia-access-form)
### Weights
We currently provide three checkpoints, `sd-v1-1.ckpt`, `sd-v1-2.ckpt` and `sd-v1-3.ckpt`,
which were trained as follows,
- `sd-v1-1.ckpt`: 237k steps at resolution `256x256` on [laion2B-en](https://huggingface.co/datasets/laion/laion2B-en).
194k steps at resolution `512x512` on [laion-high-resolution](https://huggingface.co/datasets/laion/laion-high-resolution) (170M examples from LAION-5B with resolution `>= 1024x1024`).
- `sd-v1-2.ckpt`: Resumed from `sd-v1-1.ckpt`.
515k steps at resolution `512x512` on "laion-improved-aesthetics" (a subset of laion2B-en,
filtered to images with an original size `>= 512x512`, estimated aesthetics score `> 5.0`, and an estimated watermark probability `< 0.5`. The watermark estimate is from the LAION-5B metadata, the aesthetics score is estimated using an [improved aesthetics estimator](https://github.com/christophschuhmann/improved-aesthetic-predictor)).
- `sd-v1-3.ckpt`: Resumed from `sd-v1-2.ckpt`. 195k steps at resolution `512x512` on "laion-improved-aesthetics" and 10\% dropping of the text-conditioning to improve [classifier-free guidance sampling](https://arxiv.org/abs/2207.12598).
Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling
steps show the relative improvements of the checkpoints:
![sd evaluation results](assets/v1-variants-scores.jpg)
### Text-to-Image with Stable Diffusion
![txt2img-stable2](assets/stable-samples/txt2img/merged-0005.png)
![txt2img-stable2](assets/stable-samples/txt2img/merged-0007.png)
Stable Diffusion is a latent diffusion model conditioned on the (non-pooled) text embeddings of a CLIP ViT-L/14 text encoder.
#### Sampling Script
<div align="center">
After [obtaining the weights](#weights), link them
```
mkdir -p models/ldm/stable-diffusion-v1/
ln -s <path/to/model.ckpt> models/ldm/stable-diffusion-v1/model.ckpt
```
and sample with
```
python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
```
![project logo](https://github.com/invoke-ai/InvokeAI/raw/main/docs/assets/invoke_ai_banner.png)
By default, this uses a guidance scale of `--scale 7.5`, [Katherine Crowson's implementation](https://github.com/CompVis/latent-diffusion/pull/51) of the [PLMS](https://arxiv.org/abs/2202.09778) sampler,
and renders images of size 512x512 (which it was trained on) in 50 steps. All supported arguments are listed below (type `python scripts/txt2img.py --help`).
# InvokeAI: A Stable Diffusion Toolkit
```commandline
usage: txt2img.py [-h] [--prompt [PROMPT]] [--outdir [OUTDIR]] [--skip_grid] [--skip_save] [--ddim_steps DDIM_STEPS] [--plms] [--laion400m] [--fixed_code] [--ddim_eta DDIM_ETA] [--n_iter N_ITER] [--H H] [--W W] [--C C] [--f F] [--n_samples N_SAMPLES] [--n_rows N_ROWS]
[--scale SCALE] [--from-file FROM_FILE] [--config CONFIG] [--ckpt CKPT] [--seed SEED] [--precision {full,autocast}]
[![discord badge]][discord link]
optional arguments:
-h, --help show this help message and exit
--prompt [PROMPT] the prompt to render
--outdir [OUTDIR] dir to write results to
--skip_grid do not save a grid, only individual samples. Helpful when evaluating lots of samples
--skip_save do not save individual samples. For speed measurements.
--ddim_steps DDIM_STEPS
number of ddim sampling steps
--plms use plms sampling
--laion400m uses the LAION400M model
--fixed_code if enabled, uses the same starting code across samples
--ddim_eta DDIM_ETA ddim eta (eta=0.0 corresponds to deterministic sampling
--n_iter N_ITER sample this often
--H H image height, in pixel space
--W W image width, in pixel space
--C C latent channels
--f F downsampling factor
--n_samples N_SAMPLES
how many samples to produce for each given prompt. A.k.a. batch size
--n_rows N_ROWS rows in the grid (default: n_samples)
--scale SCALE unconditional guidance scale: eps = eps(x, empty) + scale * (eps(x, cond) - eps(x, empty))
--from-file FROM_FILE
if specified, load prompts from this file
--config CONFIG path to config which constructs model
--ckpt CKPT path to checkpoint of model
--seed SEED the seed (for reproducible sampling)
--precision {full,autocast}
evaluate at this precision
[![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link]
```
Note: The inference config for all v1 versions is designed to be used with EMA-only checkpoints.
For this reason `use_ema=False` is set in the configuration, otherwise the code will try to switch from
non-EMA to EMA weights. If you want to examine the effect of EMA vs no EMA, we provide "full" checkpoints
which contain both types of weights. For these, `use_ema=False` will load and use the non-EMA weights.
[![CI checks on main badge]][CI checks on main link] [![latest commit to main badge]][latest commit to main link]
[![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link] [![translation status badge]][translation status link]
#### Diffusers Integration
[CI checks on main badge]: https://flat.badgen.net/github/checks/invoke-ai/InvokeAI/main?label=CI%20status%20on%20main&cache=900&icon=github
[CI checks on main link]:https://github.com/invoke-ai/InvokeAI/actions?query=branch%3Amain
[discord badge]: https://flat.badgen.net/discord/members/ZmtBAhwWhy?icon=discord
[discord link]: https://discord.gg/ZmtBAhwWhy
[github forks badge]: https://flat.badgen.net/github/forks/invoke-ai/InvokeAI?icon=github
[github forks link]: https://useful-forks.github.io/?repo=invoke-ai%2FInvokeAI
[github open issues badge]: https://flat.badgen.net/github/open-issues/invoke-ai/InvokeAI?icon=github
[github open issues link]: https://github.com/invoke-ai/InvokeAI/issues?q=is%3Aissue+is%3Aopen
[github open prs badge]: https://flat.badgen.net/github/open-prs/invoke-ai/InvokeAI?icon=github
[github open prs link]: https://github.com/invoke-ai/InvokeAI/pulls?q=is%3Apr+is%3Aopen
[github stars badge]: https://flat.badgen.net/github/stars/invoke-ai/InvokeAI?icon=github
[github stars link]: https://github.com/invoke-ai/InvokeAI/stargazers
[latest commit to main badge]: https://flat.badgen.net/github/last-commit/invoke-ai/InvokeAI/main?icon=github&color=yellow&label=last%20dev%20commit&cache=900
[latest commit to main link]: https://github.com/invoke-ai/InvokeAI/commits/main
[latest release badge]: https://flat.badgen.net/github/release/invoke-ai/InvokeAI/development?icon=github
[latest release link]: https://github.com/invoke-ai/InvokeAI/releases
[translation status badge]: https://hosted.weblate.org/widgets/invokeai/-/svg-badge.svg
[translation status link]: https://hosted.weblate.org/engage/invokeai/
Another way to download and sample Stable Diffusion is by using the [diffusers library](https://github.com/huggingface/diffusers/tree/main#new--stable-diffusion-is-now-fully-compatible-with-diffusers)
```py
# make sure you're logged in with `huggingface-cli login`
from torch import autocast
from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler
</div>
pipe = StableDiffusionPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-3-diffusers",
use_auth_token=True
)
_**Note: The UI is not fully functional on `main`. If you need a stable UI based on `main`, use the `pre-nodes` tag while we [migrate to a new backend](https://github.com/invoke-ai/InvokeAI/discussions/3246).**_
prompt = "a photo of an astronaut riding a horse on mars"
with autocast("cuda"):
image = pipe(prompt)["sample"][0]
image.save("astronaut_rides_horse.png")
```
InvokeAI is a leading creative engine built to empower professionals and enthusiasts alike. Generate and create stunning visual media using the latest AI-driven technologies. InvokeAI offers an industry leading Web Interface, interactive Command Line Interface, and also serves as the foundation for multiple commercial products.
**Quick links**: [[How to Install](https://invoke-ai.github.io/InvokeAI/#installation)] [<a href="https://discord.gg/ZmtBAhwWhy">Discord Server</a>] [<a href="https://invoke-ai.github.io/InvokeAI/">Documentation and Tutorials</a>] [<a href="https://github.com/invoke-ai/InvokeAI/">Code and Downloads</a>] [<a href="https://github.com/invoke-ai/InvokeAI/issues">Bug Reports</a>] [<a href="https://github.com/invoke-ai/InvokeAI/discussions">Discussion, Ideas & Q&A</a>]
_Note: InvokeAI is rapidly evolving. Please use the
[Issues](https://github.com/invoke-ai/InvokeAI/issues) tab to report bugs and make feature
requests. Be sure to use the provided templates. They will help us diagnose issues faster._
### Image Modification with Stable Diffusion
<div align="center">
By using a diffusion-denoising mechanism as first proposed by [SDEdit](https://arxiv.org/abs/2108.01073), the model can be used for different
tasks such as text-guided image-to-image translation and upscaling. Similar to the txt2img sampling script,
we provide a script to perform image modification with Stable Diffusion.
![canvas preview](https://github.com/invoke-ai/InvokeAI/raw/main/docs/assets/canvas_preview.png)
The following describes an example where a rough sketch made in [Pinta](https://www.pinta-project.com/) is converted into a detailed artwork.
```
python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8
```
Here, strength is a value between 0.0 and 1.0, that controls the amount of noise that is added to the input image.
Values that approach 1.0 allow for lots of variations but will also produce images that are not semantically consistent with the input. See the following example.
</div>
**Input**
## Table of Contents
![sketch-in](assets/stable-samples/img2img/sketch-mountains-input.jpg)
**Outputs**
1. [Quick Start](#getting-started-with-invokeai)
2. [Installation](#detailed-installation-instructions)
3. [Hardware Requirements](#hardware-requirements)
4. [Features](#features)
5. [Latest Changes](#latest-changes)
6. [Troubleshooting](#troubleshooting)
7. [Contributing](#contributing)
8. [Contributors](#contributors)
9. [Support](#support)
10. [Further Reading](#further-reading)
![out3](assets/stable-samples/img2img/mountains-3.png)
![out2](assets/stable-samples/img2img/mountains-2.png)
This procedure can, for example, also be used to upscale samples from the base model.
## Comments
- Our codebase for the diffusion models builds heavily on [OpenAI's ADM codebase](https://github.com/openai/guided-diffusion)
and [https://github.com/lucidrains/denoising-diffusion-pytorch](https://github.com/lucidrains/denoising-diffusion-pytorch).
Thanks for open-sourcing!
- The implementation of the transformer encoder is from [x-transformers](https://github.com/lucidrains/x-transformers) by [lucidrains](https://github.com/lucidrains?tab=repositories).
## Getting Started with InvokeAI
For full installation and upgrade instructions, please see:
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/)
## BibTeX
```
@misc{rombach2021highresolution,
title={High-Resolution Image Synthesis with Latent Diffusion Models},
author={Robin Rombach and Andreas Blattmann and Dominik Lorenz and Patrick Esser and Björn Ommer},
year={2021},
eprint={2112.10752},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
### Automatic Installer (suggested for 1st time users)
```
1. Go to the bottom of the [Latest Release Page](https://github.com/invoke-ai/InvokeAI/releases/latest)
2. Download the .zip file for your OS (Windows/macOS/Linux).
3. Unzip the file.
4. If you are on Windows, double-click on the `install.bat` script. On
macOS, open a Terminal window, drag the file `install.sh` from Finder
into the Terminal, and press return. On Linux, run `install.sh`.
5. You'll be asked to confirm the location of the folder in which
to install InvokeAI and its image generation model files. Pick a
location with at least 15 GB of free memory. More if you plan on
installing lots of models.
6. Wait while the installer does its thing. After installing the software,
the installer will launch a script that lets you configure InvokeAI and
select a set of starting image generation models.
7. Find the folder that InvokeAI was installed into (it is not the
same as the unpacked zip file directory!) The default location of this
folder (if you didn't change it in step 5) is `~/invokeai` on
Linux/Mac systems, and `C:\Users\YourName\invokeai` on Windows. This directory will contain launcher scripts named `invoke.sh` and `invoke.bat`.
8. On Windows systems, double-click on the `invoke.bat` file. On
macOS, open a Terminal window, drag `invoke.sh` from the folder into
the Terminal, and press return. On Linux, run `invoke.sh`
9. Press 2 to open the "browser-based UI", press enter/return, wait a
minute or two for Stable Diffusion to start up, then open your browser
and go to http://localhost:9090.
10. Type `banana sushi` in the box on the top left and click `Invoke`
### Command-Line Installation (for users familiar with Terminals)
You must have Python 3.9 or 3.10 installed on your machine. Earlier or later versions are
not supported.
1. Open a command-line window on your machine. The PowerShell is recommended for Windows.
2. Create a directory to install InvokeAI into. You'll need at least 15 GB of free space:
```terminal
mkdir invokeai
````
3. Create a virtual environment named `.venv` inside this directory and activate it:
```terminal
cd invokeai
python -m venv .venv --prompt InvokeAI
```
4. Activate the virtual environment (do it every time you run InvokeAI)
_For Linux/Mac users:_
```sh
source .venv/bin/activate
```
_For Windows users:_
```ps
.venv\Scripts\activate
```
5. Install the InvokeAI module and its dependencies. Choose the command suited for your platform & GPU.
_For Windows/Linux with an NVIDIA GPU:_
```terminal
pip install "InvokeAI[xformers]" --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
```
_For Linux with an AMD GPU:_
```sh
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.4.2
```
_For non-GPU systems:_
```terminal
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
```
_For Macintoshes, either Intel or M1/M2:_
```sh
pip install InvokeAI --use-pep517
```
6. Configure InvokeAI and install a starting set of image generation models (you only need to do this once):
```terminal
invokeai-configure
```
7. Launch the web server (do it every time you run InvokeAI):
```terminal
invokeai --web
```
8. Point your browser to http://localhost:9090 to bring up the web interface.
9. Type `banana sushi` in the box on the top left and click `Invoke`.
Be sure to activate the virtual environment each time before re-launching InvokeAI,
using `source .venv/bin/activate` or `.venv\Scripts\activate`.
### Detailed Installation Instructions
This fork is supported across Linux, Windows and Macintosh. Linux
users can use either an Nvidia-based card (with CUDA support) or an
AMD card (using the ROCm driver). For full installation and upgrade
instructions, please see:
[InvokeAI Installation Overview](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_SOURCE/)
## Hardware Requirements
InvokeAI is supported across Linux, Windows and macOS. Linux
users can use either an Nvidia-based card (with CUDA support) or an
AMD card (using the ROCm driver).
### System
You will need one of the following:
- An NVIDIA-based graphics card with 4 GB or more VRAM memory.
- An Apple computer with an M1 chip.
- An AMD-based graphics card with 4GB or more VRAM memory. (Linux only)
We do not recommend the GTX 1650 or 1660 series video cards. They are
unable to run in half-precision mode and do not have sufficient VRAM
to render 512x512 images.
### Memory
- At least 12 GB Main Memory RAM.
### Disk
- 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/)
### *Web Server & UI*
InvokeAI offers a locally hosted Web Server & React Frontend, with an industry leading user experience. The Web-based UI allows for simple and intuitive workflows, and is responsive for use on mobile devices and tablets accessing the web server.
### *Unified Canvas*
The Unified Canvas is a fully integrated canvas implementation with support for all core generation capabilities, in/outpainting, brush tools, and more. This creative tool unlocks the capability for artists to create with AI as a creative collaborator, and can be used to augment AI-generated imagery, sketches, photography, renders, and more.
### *Advanced Prompt Syntax*
InvokeAI's advanced prompt syntax allows for token weighting, cross-attention control, and prompt blending, allowing for fine-tuned tweaking of your invocations and exploration of the latent space.
### *Command Line Interface*
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
- *Node-Based Architecture & UI*
- And more...
### Latest Changes
For our latest changes, view our [Release
Notes](https://github.com/invoke-ai/InvokeAI/releases) and the
[CHANGELOG](docs/CHANGELOG.md).
## Troubleshooting
Please check out our **[Q&A](https://invoke-ai.github.io/InvokeAI/help/TROUBLESHOOT/#faq)** to get solutions for common installation
problems and other issues.
## 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.
To join, just raise your hand on the InvokeAI Discord server (#dev-chat) or the GitHub discussion board.
If you'd like to help with translation, please see our [translation guide](docs/other/TRANSLATION.md).
If you are unfamiliar with how
to contribute to GitHub projects, here is a
[Getting Started Guide](https://opensource.com/article/19/7/create-pull-request-github). A full set of contribution guidelines, along with templates, are in progress. You can **make your pull request against the "main" branch**.
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.
[Check out the list of all these amazing people](https://invoke-ai.github.io/InvokeAI/other/CONTRIBUTORS/). We thank them for
their time, hard work and effort.
Thanks to [Weblate](https://weblate.org/) for generously providing translation services to this project.
### Support
For support, please use this repository's GitHub Issues tracking service, or join the Discord.
Original portions of the software are Copyright (c) 2023 by respective contributors.

View File

@ -21,7 +21,7 @@ This model card focuses on the model associated with the Stable Diffusion model,
# Uses
## Direct Use
## Direct Use
The model is intended for research purposes only. Possible research areas and
tasks include
@ -68,11 +68,11 @@ Using the model to generate content that is cruel to individuals is a misuse of
considerations.
### Bias
While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.
Stable Diffusion v1 was trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/),
which consists of images that are primarily limited to English descriptions.
Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for.
This affects the overall output of the model, as white and western cultures are often set as the default. Further, the
While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.
Stable Diffusion v1 was trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/),
which consists of images that are primarily limited to English descriptions.
Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for.
This affects the overall output of the model, as white and western cultures are often set as the default. Further, the
ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts.
@ -84,7 +84,7 @@ The model developers used the following dataset for training the model:
- LAION-2B (en) and subsets thereof (see next section)
**Training Procedure**
Stable Diffusion v1 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training,
Stable Diffusion v1 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training,
- Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4
- Text prompts are encoded through a ViT-L/14 text-encoder.
@ -108,12 +108,12 @@ filtered to images with an original size `>= 512x512`, estimated aesthetics scor
- **Batch:** 32 x 8 x 2 x 4 = 2048
- **Learning rate:** warmup to 0.0001 for 10,000 steps and then kept constant
## Evaluation Results
## Evaluation Results
Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling
steps show the relative improvements of the checkpoints:
![pareto](assets/v1-variants-scores.jpg)
![pareto](assets/v1-variants-scores.jpg)
Evaluated using 50 PLMS steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores.
## Environmental Impact

Binary file not shown.

View File

@ -0,0 +1,164 @@
@echo off
@rem This script will install git (if not found on the PATH variable)
@rem using micromamba (an 8mb static-linked single-file binary, conda replacement).
@rem For users who already have git, this step will be skipped.
@rem Next, it'll download the project's source code.
@rem Then it will download a self-contained, standalone Python and unpack it.
@rem Finally, it'll create the Python virtual environment and preload the models.
@rem This enables a user to install this project without manually installing git or Python
@rem change to the script's directory
PUSHD "%~dp0"
set "no_cache_dir=--no-cache-dir"
if "%1" == "use-cache" (
set "no_cache_dir="
)
echo ***** Installing InvokeAI.. *****
@rem Config
set INSTALL_ENV_DIR=%cd%\installer_files\env
@rem https://mamba.readthedocs.io/en/latest/installation.html
set MICROMAMBA_DOWNLOAD_URL=https://github.com/cmdr2/stable-diffusion-ui/releases/download/v1.1/micromamba.exe
set RELEASE_URL=https://github.com/invoke-ai/InvokeAI
set RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
set PYTHON_BUILD_STANDALONE_URL=https://github.com/indygreg/python-build-standalone/releases/download
set PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-x86_64-pc-windows-msvc-shared-install_only.tar.gz
set PACKAGES_TO_INSTALL=
call git --version >.tmp1 2>.tmp2
if "%ERRORLEVEL%" NEQ "0" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% git
@rem Cleanup
del /q .tmp1 .tmp2
@rem (if necessary) install git into a contained environment
if "%PACKAGES_TO_INSTALL%" NEQ "" (
@rem download micromamba
echo ***** Downloading micromamba from %MICROMAMBA_DOWNLOAD_URL% to micromamba.exe *****
call curl -L "%MICROMAMBA_DOWNLOAD_URL%" > micromamba.exe
@rem test the mamba binary
echo ***** Micromamba version: *****
call micromamba.exe --version
@rem create the installer env
if not exist "%INSTALL_ENV_DIR%" (
call micromamba.exe create -y --prefix "%INSTALL_ENV_DIR%"
)
echo ***** Packages to install:%PACKAGES_TO_INSTALL% *****
call micromamba.exe install -y --prefix "%INSTALL_ENV_DIR%" -c conda-forge %PACKAGES_TO_INSTALL%
if not exist "%INSTALL_ENV_DIR%" (
echo ----- There was a problem while installing "%PACKAGES_TO_INSTALL%" using micromamba. Cannot continue. -----
pause
exit /b
)
)
del /q micromamba.exe
@rem For 'git' only
set PATH=%INSTALL_ENV_DIR%\Library\bin;%PATH%
@rem Download/unpack/clean up InvokeAI release sourceball
set err_msg=----- InvokeAI source download failed -----
echo Trying to download "%RELEASE_URL%%RELEASE_SOURCEBALL%"
curl -L %RELEASE_URL%%RELEASE_SOURCEBALL% --output InvokeAI.tgz
if %errorlevel% neq 0 goto err_exit
set err_msg=----- InvokeAI source unpack failed -----
tar -zxf InvokeAI.tgz
if %errorlevel% neq 0 goto err_exit
del /q InvokeAI.tgz
set err_msg=----- InvokeAI source copy failed -----
cd InvokeAI-*
xcopy . .. /e /h
if %errorlevel% neq 0 goto err_exit
cd ..
@rem cleanup
for /f %%i in ('dir /b InvokeAI-*') do rd /s /q %%i
rd /s /q .dev_scripts .github docker-build tests
del /q requirements.in requirements-mkdocs.txt shell.nix
echo ***** Unpacked InvokeAI source *****
@rem Download/unpack/clean up python-build-standalone
set err_msg=----- Python download failed -----
curl -L %PYTHON_BUILD_STANDALONE_URL%/%PYTHON_BUILD_STANDALONE% --output python.tgz
if %errorlevel% neq 0 goto err_exit
set err_msg=----- Python unpack failed -----
tar -zxf python.tgz
if %errorlevel% neq 0 goto err_exit
del /q python.tgz
echo ***** Unpacked python-build-standalone *****
@rem create venv
set err_msg=----- problem creating venv -----
.\python\python -E -s -m venv .venv
if %errorlevel% neq 0 goto err_exit
call .venv\Scripts\activate.bat
echo ***** Created Python virtual environment *****
@rem Print venv's Python version
set err_msg=----- problem calling venv's python -----
echo We're running under
.venv\Scripts\python --version
if %errorlevel% neq 0 goto err_exit
set err_msg=----- pip update failed -----
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location --upgrade pip wheel
if %errorlevel% neq 0 goto err_exit
echo ***** Updated pip and wheel *****
set err_msg=----- requirements file copy failed -----
copy binary_installer\py3.10-windows-x86_64-cuda-reqs.txt requirements.txt
if %errorlevel% neq 0 goto err_exit
set err_msg=----- main pip install failed -----
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -r requirements.txt
if %errorlevel% neq 0 goto err_exit
echo ***** Installed Python dependencies *****
set err_msg=----- InvokeAI setup failed -----
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -e .
if %errorlevel% neq 0 goto err_exit
copy binary_installer\invoke.bat.in .\invoke.bat
echo ***** Installed invoke launcher script ******
@rem more cleanup
rd /s /q binary_installer installer_files
@rem preload the models
call .venv\Scripts\python ldm\invoke\config\invokeai_configure.py
set err_msg=----- model download clone failed -----
if %errorlevel% neq 0 goto err_exit
deactivate
echo ***** Finished downloading models *****
echo All done! Execute the file invoke.bat in this directory to start InvokeAI
pause
exit
:err_exit
echo %err_msg%
pause
exit

View File

@ -0,0 +1,235 @@
#!/usr/bin/env bash
# ensure we're in the correct folder in case user's CWD is somewhere else
scriptdir=$(dirname "$0")
cd "$scriptdir"
set -euo pipefail
IFS=$'\n\t'
function _err_exit {
if test "$1" -ne 0
then
echo -e "Error code $1; Error caught was '$2'"
read -p "Press any key to exit..."
exit
fi
}
# This script will install git (if not found on the PATH variable)
# using micromamba (an 8mb static-linked single-file binary, conda replacement).
# For users who already have git, this step will be skipped.
# Next, it'll download the project's source code.
# Then it will download a self-contained, standalone Python and unpack it.
# Finally, it'll create the Python virtual environment and preload the models.
# This enables a user to install this project without manually installing git or Python
echo -e "\n***** Installing InvokeAI into $(pwd)... *****\n"
export no_cache_dir="--no-cache-dir"
if [ $# -ge 1 ]; then
if [ "$1" = "use-cache" ]; then
export no_cache_dir=""
fi
fi
OS_NAME=$(uname -s)
case "${OS_NAME}" in
Linux*) OS_NAME="linux";;
Darwin*) OS_NAME="darwin";;
*) echo -e "\n----- Unknown OS: $OS_NAME! This script runs only on Linux or macOS -----\n" && exit
esac
OS_ARCH=$(uname -m)
case "${OS_ARCH}" in
x86_64*) ;;
arm64*) ;;
*) echo -e "\n----- Unknown system architecture: $OS_ARCH! This script runs only on x86_64 or arm64 -----\n" && exit
esac
# https://mamba.readthedocs.io/en/latest/installation.html
MAMBA_OS_NAME=$OS_NAME
MAMBA_ARCH=$OS_ARCH
if [ "$OS_NAME" == "darwin" ]; then
MAMBA_OS_NAME="osx"
fi
if [ "$OS_ARCH" == "linux" ]; then
MAMBA_ARCH="aarch64"
fi
if [ "$OS_ARCH" == "x86_64" ]; then
MAMBA_ARCH="64"
fi
PY_ARCH=$OS_ARCH
if [ "$OS_ARCH" == "arm64" ]; then
PY_ARCH="aarch64"
fi
# Compute device ('cd' segment of reqs files) detect goes here
# This needs a ton of work
# Suggestions:
# - lspci
# - check $PATH for nvidia-smi, gtt CUDA/GPU version from output
# - Surely there's a similar utility for AMD?
CD="cuda"
if [ "$OS_NAME" == "darwin" ] && [ "$OS_ARCH" == "arm64" ]; then
CD="mps"
fi
# config
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${MAMBA_OS_NAME}-${MAMBA_ARCH}/latest"
RELEASE_URL=https://github.com/invoke-ai/InvokeAI
RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
PYTHON_BUILD_STANDALONE_URL=https://github.com/indygreg/python-build-standalone/releases/download
if [ "$OS_NAME" == "darwin" ]; then
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-apple-darwin-install_only.tar.gz
elif [ "$OS_NAME" == "linux" ]; then
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-unknown-linux-gnu-install_only.tar.gz
fi
echo "INSTALLING $RELEASE_SOURCEBALL FROM $RELEASE_URL"
PACKAGES_TO_INSTALL=""
if ! hash "git" &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi
# (if necessary) install git and conda into a contained environment
if [ "$PACKAGES_TO_INSTALL" != "" ]; then
# download micromamba
echo -e "\n***** Downloading micromamba from $MICROMAMBA_DOWNLOAD_URL to micromamba *****\n"
curl -L "$MICROMAMBA_DOWNLOAD_URL" | tar -xvjO bin/micromamba > micromamba
chmod u+x ./micromamba
# test the mamba binary
echo -e "\n***** Micromamba version: *****\n"
./micromamba --version
# create the installer env
if [ ! -e "$INSTALL_ENV_DIR" ]; then
./micromamba create -y --prefix "$INSTALL_ENV_DIR"
fi
echo -e "\n***** Packages to install:$PACKAGES_TO_INSTALL *****\n"
./micromamba install -y --prefix "$INSTALL_ENV_DIR" -c conda-forge "$PACKAGES_TO_INSTALL"
if [ ! -e "$INSTALL_ENV_DIR" ]; then
echo -e "\n----- There was a problem while initializing micromamba. Cannot continue. -----\n"
exit
fi
fi
rm -f micromamba.exe
export PATH="$INSTALL_ENV_DIR/bin:$PATH"
# Download/unpack/clean up InvokeAI release sourceball
_err_msg="\n----- InvokeAI source download failed -----\n"
curl -L $RELEASE_URL/$RELEASE_SOURCEBALL --output InvokeAI.tgz
_err_exit $? _err_msg
_err_msg="\n----- InvokeAI source unpack failed -----\n"
tar -zxf InvokeAI.tgz
_err_exit $? _err_msg
rm -f InvokeAI.tgz
_err_msg="\n----- InvokeAI source copy failed -----\n"
cd InvokeAI-*
cp -r . ..
_err_exit $? _err_msg
cd ..
# cleanup
rm -rf InvokeAI-*/
rm -rf .dev_scripts/ .github/ docker-build/ tests/ requirements.in requirements-mkdocs.txt shell.nix
echo -e "\n***** Unpacked InvokeAI source *****\n"
# Download/unpack/clean up python-build-standalone
_err_msg="\n----- Python download failed -----\n"
curl -L $PYTHON_BUILD_STANDALONE_URL/$PYTHON_BUILD_STANDALONE --output python.tgz
_err_exit $? _err_msg
_err_msg="\n----- Python unpack failed -----\n"
tar -zxf python.tgz
_err_exit $? _err_msg
rm -f python.tgz
echo -e "\n***** Unpacked python-build-standalone *****\n"
# create venv
_err_msg="\n----- problem creating venv -----\n"
if [ "$OS_NAME" == "darwin" ]; then
# patch sysconfig so that extensions can build properly
# adapted from https://github.com/cashapp/hermit-packages/commit/fcba384663892f4d9cfb35e8639ff7a28166ee43
PYTHON_INSTALL_DIR="$(pwd)/python"
SYSCONFIG="$(echo python/lib/python*/_sysconfigdata_*.py)"
TMPFILE="$(mktemp)"
chmod +w "${SYSCONFIG}"
cp "${SYSCONFIG}" "${TMPFILE}"
sed "s,'/install,'${PYTHON_INSTALL_DIR},g" "${TMPFILE}" > "${SYSCONFIG}"
rm -f "${TMPFILE}"
fi
./python/bin/python3 -E -s -m venv .venv
_err_exit $? _err_msg
source .venv/bin/activate
echo -e "\n***** Created Python virtual environment *****\n"
# Print venv's Python version
_err_msg="\n----- problem calling venv's python -----\n"
echo -e "We're running under"
.venv/bin/python3 --version
_err_exit $? _err_msg
_err_msg="\n----- pip update failed -----\n"
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location --upgrade pip
_err_exit $? _err_msg
echo -e "\n***** Updated pip *****\n"
_err_msg="\n----- requirements file copy failed -----\n"
cp binary_installer/py3.10-${OS_NAME}-"${OS_ARCH}"-${CD}-reqs.txt requirements.txt
_err_exit $? _err_msg
_err_msg="\n----- main pip install failed -----\n"
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -r requirements.txt
_err_exit $? _err_msg
echo -e "\n***** Installed Python dependencies *****\n"
_err_msg="\n----- InvokeAI setup failed -----\n"
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -e .
_err_exit $? _err_msg
echo -e "\n***** Installed InvokeAI *****\n"
cp binary_installer/invoke.sh.in ./invoke.sh
chmod a+rx ./invoke.sh
echo -e "\n***** Installed invoke launcher script ******\n"
# more cleanup
rm -rf binary_installer/ installer_files/
# preload the models
.venv/bin/python3 scripts/configure_invokeai.py
_err_msg="\n----- model download clone failed -----\n"
_err_exit $? _err_msg
deactivate
echo -e "\n***** Finished downloading models *****\n"
echo "All done! Run the command"
echo " $scriptdir/invoke.sh"
echo "to start InvokeAI."
read -p "Press any key to exit..."
exit

View File

@ -0,0 +1,36 @@
@echo off
PUSHD "%~dp0"
call .venv\Scripts\activate.bat
echo Do you want to generate images using the
echo 1. command-line
echo 2. browser-based UI
echo OR
echo 3. open the developer console
set /p choice="Please enter 1, 2 or 3: "
if /i "%choice%" == "1" (
echo Starting the InvokeAI command-line.
.venv\Scripts\python scripts\invoke.py %*
) else if /i "%choice%" == "2" (
echo Starting the InvokeAI browser-based UI.
.venv\Scripts\python scripts\invoke.py --web %*
) else if /i "%choice%" == "3" (
echo Developer Console
echo Python command is:
where python
echo Python version is:
python --version
echo *************************
echo You are now in the system shell, with the local InvokeAI Python virtual environment activated,
echo so that you can troubleshoot this InvokeAI installation as necessary.
echo *************************
echo *** Type `exit` to quit this shell and deactivate the Python virtual environment ***
call cmd /k
) else (
echo Invalid selection
pause
exit /b
)
deactivate

View File

@ -0,0 +1,46 @@
#!/usr/bin/env sh
set -eu
. .venv/bin/activate
# set required env var for torch on mac MPS
if [ "$(uname -s)" == "Darwin" ]; then
export PYTORCH_ENABLE_MPS_FALLBACK=1
fi
echo "Do you want to generate images using the"
echo "1. command-line"
echo "2. browser-based UI"
echo "OR"
echo "3. open the developer console"
echo "Please enter 1, 2, or 3:"
read choice
case $choice in
1)
printf "\nStarting the InvokeAI command-line..\n";
.venv/bin/python scripts/invoke.py $*;
;;
2)
printf "\nStarting the InvokeAI browser-based UI..\n";
.venv/bin/python scripts/invoke.py --web $*;
;;
3)
printf "\nDeveloper Console:\n";
printf "Python command is:\n\t";
which python;
printf "Python version is:\n\t";
python --version;
echo "*************************"
echo "You are now in your user shell ($SHELL) with the local InvokeAI Python virtual environment activated,";
echo "so that you can troubleshoot this InvokeAI installation as necessary.";
printf "*************************\n"
echo "*** Type \`exit\` to quit this shell and deactivate the Python virtual environment *** ";
/usr/bin/env "$SHELL";
;;
*)
echo "Invalid selection";
exit
;;
esac

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
InvokeAI
Project homepage: https://github.com/invoke-ai/InvokeAI
Installation on Windows:
NOTE: You might need to enable Windows Long Paths. If you're not sure,
then you almost certainly need to. Simply double-click the 'WinLongPathsEnabled.reg'
file. Note that you will need to have admin privileges in order to
do this.
Please double-click the 'install.bat' file (while keeping it inside the invokeAI folder).
Installation on Linux and Mac:
Please open the terminal, and run './install.sh' (while keeping it inside the invokeAI folder).
After installation, please run the 'invoke.bat' file (on Windows) or 'invoke.sh'
file (on Linux/Mac) to start InvokeAI.

View File

@ -0,0 +1,33 @@
--prefer-binary
--extra-index-url https://download.pytorch.org/whl/torch_stable.html
--extra-index-url https://download.pytorch.org/whl/cu116
--trusted-host https://download.pytorch.org
accelerate~=0.15
albumentations
diffusers[torch]~=0.11
einops
eventlet
flask_cors
flask_socketio
flaskwebgui==1.0.3
getpass_asterisk
imageio-ffmpeg
pyreadline3
realesrgan
send2trash
streamlit
taming-transformers-rom1504
test-tube
torch-fidelity
torch==1.12.1 ; platform_system == 'Darwin'
torch==1.12.0+cu116 ; platform_system == 'Linux' or platform_system == 'Windows'
torchvision==0.13.1 ; platform_system == 'Darwin'
torchvision==0.13.0+cu116 ; platform_system == 'Linux' or platform_system == 'Windows'
transformers
picklescan
https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip
https://github.com/invoke-ai/clipseg/archive/1f754751c85d7d4255fa681f4491ff5711c1c288.zip
https://github.com/invoke-ai/GFPGAN/archive/3f5d2397361199bc4a91c08bb7d80f04d7805615.zip ; platform_system=='Windows'
https://github.com/invoke-ai/GFPGAN/archive/c796277a1cf77954e5fc0b288d7062d162894248.zip ; platform_system=='Linux' or platform_system=='Darwin'
https://github.com/Birch-san/k-diffusion/archive/363386981fee88620709cf8f6f2eea167bd6cd74.zip
https://github.com/invoke-ai/PyPatchMatch/archive/129863937a8ab37f6bbcec327c994c0f932abdbc.zip

View File

@ -1,54 +0,0 @@
model:
base_learning_rate: 4.5e-6
target: ldm.models.autoencoder.AutoencoderKL
params:
monitor: "val/rec_loss"
embed_dim: 16
lossconfig:
target: ldm.modules.losses.LPIPSWithDiscriminator
params:
disc_start: 50001
kl_weight: 0.000001
disc_weight: 0.5
ddconfig:
double_z: True
z_channels: 16
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult: [ 1,1,2,2,4] # num_down = len(ch_mult)-1
num_res_blocks: 2
attn_resolutions: [16]
dropout: 0.0
data:
target: main.DataModuleFromConfig
params:
batch_size: 12
wrap: True
train:
target: ldm.data.imagenet.ImageNetSRTrain
params:
size: 256
degradation: pil_nearest
validation:
target: ldm.data.imagenet.ImageNetSRValidation
params:
size: 256
degradation: pil_nearest
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 1000
max_images: 8
increase_log_steps: True
trainer:
benchmark: True
accumulate_grad_batches: 2

View File

@ -1,53 +0,0 @@
model:
base_learning_rate: 4.5e-6
target: ldm.models.autoencoder.AutoencoderKL
params:
monitor: "val/rec_loss"
embed_dim: 4
lossconfig:
target: ldm.modules.losses.LPIPSWithDiscriminator
params:
disc_start: 50001
kl_weight: 0.000001
disc_weight: 0.5
ddconfig:
double_z: True
z_channels: 4
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult: [ 1,2,4,4 ] # num_down = len(ch_mult)-1
num_res_blocks: 2
attn_resolutions: [ ]
dropout: 0.0
data:
target: main.DataModuleFromConfig
params:
batch_size: 12
wrap: True
train:
target: ldm.data.imagenet.ImageNetSRTrain
params:
size: 256
degradation: pil_nearest
validation:
target: ldm.data.imagenet.ImageNetSRValidation
params:
size: 256
degradation: pil_nearest
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 1000
max_images: 8
increase_log_steps: True
trainer:
benchmark: True
accumulate_grad_batches: 2

View File

@ -1,54 +0,0 @@
model:
base_learning_rate: 4.5e-6
target: ldm.models.autoencoder.AutoencoderKL
params:
monitor: "val/rec_loss"
embed_dim: 3
lossconfig:
target: ldm.modules.losses.LPIPSWithDiscriminator
params:
disc_start: 50001
kl_weight: 0.000001
disc_weight: 0.5
ddconfig:
double_z: True
z_channels: 3
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult: [ 1,2,4 ] # num_down = len(ch_mult)-1
num_res_blocks: 2
attn_resolutions: [ ]
dropout: 0.0
data:
target: main.DataModuleFromConfig
params:
batch_size: 12
wrap: True
train:
target: ldm.data.imagenet.ImageNetSRTrain
params:
size: 256
degradation: pil_nearest
validation:
target: ldm.data.imagenet.ImageNetSRValidation
params:
size: 256
degradation: pil_nearest
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 1000
max_images: 8
increase_log_steps: True
trainer:
benchmark: True
accumulate_grad_batches: 2

View File

@ -1,53 +0,0 @@
model:
base_learning_rate: 4.5e-6
target: ldm.models.autoencoder.AutoencoderKL
params:
monitor: "val/rec_loss"
embed_dim: 64
lossconfig:
target: ldm.modules.losses.LPIPSWithDiscriminator
params:
disc_start: 50001
kl_weight: 0.000001
disc_weight: 0.5
ddconfig:
double_z: True
z_channels: 64
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult: [ 1,1,2,2,4,4] # num_down = len(ch_mult)-1
num_res_blocks: 2
attn_resolutions: [16,8]
dropout: 0.0
data:
target: main.DataModuleFromConfig
params:
batch_size: 12
wrap: True
train:
target: ldm.data.imagenet.ImageNetSRTrain
params:
size: 256
degradation: pil_nearest
validation:
target: ldm.data.imagenet.ImageNetSRValidation
params:
size: 256
degradation: pil_nearest
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 1000
max_images: 8
increase_log_steps: True
trainer:
benchmark: True
accumulate_grad_batches: 2

View File

@ -1,86 +0,0 @@
model:
base_learning_rate: 2.0e-06
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0195
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
image_size: 64
channels: 3
monitor: val/loss_simple_ema
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 64
in_channels: 3
out_channels: 3
model_channels: 224
attention_resolutions:
# note: this isn\t actually the resolution but
# the downsampling factor, i.e. this corresnponds to
# attention on spatial resolution 8,16,32, as the
# spatial reolution of the latents is 64 for f4
- 8
- 4
- 2
num_res_blocks: 2
channel_mult:
- 1
- 2
- 3
- 4
num_head_channels: 32
first_stage_config:
target: ldm.models.autoencoder.VQModelInterface
params:
embed_dim: 3
n_embed: 8192
ckpt_path: models/first_stage_models/vq-f4/model.ckpt
ddconfig:
double_z: false
z_channels: 3
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config: __is_unconditional__
data:
target: main.DataModuleFromConfig
params:
batch_size: 48
num_workers: 5
wrap: false
train:
target: taming.data.faceshq.CelebAHQTrain
params:
size: 256
validation:
target: taming.data.faceshq.CelebAHQValidation
params:
size: 256
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 5000
max_images: 8
increase_log_steps: False
trainer:
benchmark: True

View File

@ -1,98 +0,0 @@
model:
base_learning_rate: 1.0e-06
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0195
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
cond_stage_key: class_label
image_size: 32
channels: 4
cond_stage_trainable: true
conditioning_key: crossattn
monitor: val/loss_simple_ema
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 32
in_channels: 4
out_channels: 4
model_channels: 256
attention_resolutions:
#note: this isn\t actually the resolution but
# the downsampling factor, i.e. this corresnponds to
# attention on spatial resolution 8,16,32, as the
# spatial reolution of the latents is 32 for f8
- 4
- 2
- 1
num_res_blocks: 2
channel_mult:
- 1
- 2
- 4
num_head_channels: 32
use_spatial_transformer: true
transformer_depth: 1
context_dim: 512
first_stage_config:
target: ldm.models.autoencoder.VQModelInterface
params:
embed_dim: 4
n_embed: 16384
ckpt_path: configs/first_stage_models/vq-f8/model.yaml
ddconfig:
double_z: false
z_channels: 4
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 2
- 4
num_res_blocks: 2
attn_resolutions:
- 32
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config:
target: ldm.modules.encoders.modules.ClassEmbedder
params:
embed_dim: 512
key: class_label
data:
target: main.DataModuleFromConfig
params:
batch_size: 64
num_workers: 12
wrap: false
train:
target: ldm.data.imagenet.ImageNetTrain
params:
config:
size: 256
validation:
target: ldm.data.imagenet.ImageNetValidation
params:
config:
size: 256
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 5000
max_images: 8
increase_log_steps: False
trainer:
benchmark: True

View File

@ -1,68 +0,0 @@
model:
base_learning_rate: 0.0001
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0195
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
cond_stage_key: class_label
image_size: 64
channels: 3
cond_stage_trainable: true
conditioning_key: crossattn
monitor: val/loss
use_ema: False
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 64
in_channels: 3
out_channels: 3
model_channels: 192
attention_resolutions:
- 8
- 4
- 2
num_res_blocks: 2
channel_mult:
- 1
- 2
- 3
- 5
num_heads: 1
use_spatial_transformer: true
transformer_depth: 1
context_dim: 512
first_stage_config:
target: ldm.models.autoencoder.VQModelInterface
params:
embed_dim: 3
n_embed: 8192
ddconfig:
double_z: false
z_channels: 3
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config:
target: ldm.modules.encoders.modules.ClassEmbedder
params:
n_classes: 1001
embed_dim: 512
key: class_label

View File

@ -1,85 +0,0 @@
model:
base_learning_rate: 2.0e-06
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0195
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
image_size: 64
channels: 3
monitor: val/loss_simple_ema
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 64
in_channels: 3
out_channels: 3
model_channels: 224
attention_resolutions:
# note: this isn\t actually the resolution but
# the downsampling factor, i.e. this corresnponds to
# attention on spatial resolution 8,16,32, as the
# spatial reolution of the latents is 64 for f4
- 8
- 4
- 2
num_res_blocks: 2
channel_mult:
- 1
- 2
- 3
- 4
num_head_channels: 32
first_stage_config:
target: ldm.models.autoencoder.VQModelInterface
params:
embed_dim: 3
n_embed: 8192
ckpt_path: configs/first_stage_models/vq-f4/model.yaml
ddconfig:
double_z: false
z_channels: 3
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config: __is_unconditional__
data:
target: main.DataModuleFromConfig
params:
batch_size: 42
num_workers: 5
wrap: false
train:
target: taming.data.faceshq.FFHQTrain
params:
size: 256
validation:
target: taming.data.faceshq.FFHQValidation
params:
size: 256
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 5000
max_images: 8
increase_log_steps: False
trainer:
benchmark: True

View File

@ -1,85 +0,0 @@
model:
base_learning_rate: 2.0e-06
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0195
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
image_size: 64
channels: 3
monitor: val/loss_simple_ema
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 64
in_channels: 3
out_channels: 3
model_channels: 224
attention_resolutions:
# note: this isn\t actually the resolution but
# the downsampling factor, i.e. this corresnponds to
# attention on spatial resolution 8,16,32, as the
# spatial reolution of the latents is 64 for f4
- 8
- 4
- 2
num_res_blocks: 2
channel_mult:
- 1
- 2
- 3
- 4
num_head_channels: 32
first_stage_config:
target: ldm.models.autoencoder.VQModelInterface
params:
ckpt_path: configs/first_stage_models/vq-f4/model.yaml
embed_dim: 3
n_embed: 8192
ddconfig:
double_z: false
z_channels: 3
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config: __is_unconditional__
data:
target: main.DataModuleFromConfig
params:
batch_size: 48
num_workers: 5
wrap: false
train:
target: ldm.data.lsun.LSUNBedroomsTrain
params:
size: 256
validation:
target: ldm.data.lsun.LSUNBedroomsValidation
params:
size: 256
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 5000
max_images: 8
increase_log_steps: False
trainer:
benchmark: True

View File

@ -1,91 +0,0 @@
model:
base_learning_rate: 5.0e-5 # set to target_lr by starting main.py with '--scale_lr False'
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.0155
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
loss_type: l1
first_stage_key: "image"
cond_stage_key: "image"
image_size: 32
channels: 4
cond_stage_trainable: False
concat_mode: False
scale_by_std: True
monitor: 'val/loss_simple_ema'
scheduler_config: # 10000 warmup steps
target: ldm.lr_scheduler.LambdaLinearScheduler
params:
warm_up_steps: [10000]
cycle_lengths: [10000000000000]
f_start: [1.e-6]
f_max: [1.]
f_min: [ 1.]
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 32
in_channels: 4
out_channels: 4
model_channels: 192
attention_resolutions: [ 1, 2, 4, 8 ] # 32, 16, 8, 4
num_res_blocks: 2
channel_mult: [ 1,2,2,4,4 ] # 32, 16, 8, 4, 2
num_heads: 8
use_scale_shift_norm: True
resblock_updown: True
first_stage_config:
target: ldm.models.autoencoder.AutoencoderKL
params:
embed_dim: 4
monitor: "val/rec_loss"
ckpt_path: "models/first_stage_models/kl-f8/model.ckpt"
ddconfig:
double_z: True
z_channels: 4
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult: [ 1,2,4,4 ] # num_down = len(ch_mult)-1
num_res_blocks: 2
attn_resolutions: [ ]
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config: "__is_unconditional__"
data:
target: main.DataModuleFromConfig
params:
batch_size: 96
num_workers: 5
wrap: False
train:
target: ldm.data.lsun.LSUNChurchesTrain
params:
size: 256
validation:
target: ldm.data.lsun.LSUNChurchesValidation
params:
size: 256
lightning:
callbacks:
image_logger:
target: main.ImageLogger
params:
batch_frequency: 5000
max_images: 8
increase_log_steps: False
trainer:
benchmark: True

View File

@ -1,71 +0,0 @@
model:
base_learning_rate: 5.0e-05
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.00085
linear_end: 0.012
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: image
cond_stage_key: caption
image_size: 32
channels: 4
cond_stage_trainable: true
conditioning_key: crossattn
monitor: val/loss_simple_ema
scale_factor: 0.18215
use_ema: False
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 32
in_channels: 4
out_channels: 4
model_channels: 320
attention_resolutions:
- 4
- 2
- 1
num_res_blocks: 2
channel_mult:
- 1
- 2
- 4
- 4
num_heads: 8
use_spatial_transformer: true
transformer_depth: 1
context_dim: 1280
use_checkpoint: true
legacy: False
first_stage_config:
target: ldm.models.autoencoder.AutoencoderKL
params:
embed_dim: 4
monitor: val/rec_loss
ddconfig:
double_z: true
z_channels: 4
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 2
- 4
- 4
num_res_blocks: 2
attn_resolutions: []
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config:
target: ldm.modules.encoders.modules.BERTEmbedder
params:
n_embed: 1280
n_layer: 32

View File

@ -1,68 +0,0 @@
model:
base_learning_rate: 0.0001
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.0015
linear_end: 0.015
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: jpg
cond_stage_key: nix
image_size: 48
channels: 16
cond_stage_trainable: false
conditioning_key: crossattn
monitor: val/loss_simple_ema
scale_by_std: false
scale_factor: 0.22765929
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 48
in_channels: 16
out_channels: 16
model_channels: 448
attention_resolutions:
- 4
- 2
- 1
num_res_blocks: 2
channel_mult:
- 1
- 2
- 3
- 4
use_scale_shift_norm: false
resblock_updown: false
num_head_channels: 32
use_spatial_transformer: true
transformer_depth: 1
context_dim: 768
use_checkpoint: true
first_stage_config:
target: ldm.models.autoencoder.AutoencoderKL
params:
monitor: val/rec_loss
embed_dim: 16
ddconfig:
double_z: true
z_channels: 16
resolution: 256
in_channels: 3
out_ch: 3
ch: 128
ch_mult:
- 1
- 1
- 2
- 2
- 4
num_res_blocks: 2
attn_resolutions:
- 16
dropout: 0.0
lossconfig:
target: torch.nn.Identity
cond_stage_config:
target: torch.nn.Identity

4
coverage/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

107
docker/Dockerfile Normal file
View File

@ -0,0 +1,107 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.9
##################
## base image ##
##################
FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim AS python-base
LABEL org.opencontainers.image.authors="mauwii@outlook.de"
# Prepare apt for buildkit cache
RUN rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache
# Install dependencies
RUN \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y \
--no-install-recommends \
libgl1-mesa-glx=20.3.* \
libglib2.0-0=2.66.* \
libopencv-dev=4.5.*
# Set working directory and env
ARG APPDIR=/usr/src
ARG APPNAME=InvokeAI
WORKDIR ${APPDIR}
ENV PATH ${APPDIR}/${APPNAME}/bin:$PATH
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
# Don't fall back to legacy build system
ENV PIP_USE_PEP517=1
#######################
## build pyproject ##
#######################
FROM python-base AS pyproject-builder
# Install build dependencies
RUN \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update \
&& apt-get install -y \
--no-install-recommends \
build-essential=12.9 \
gcc=4:10.2.* \
python3-dev=3.9.*
# Prepare pip for buildkit cache
ARG PIP_CACHE_DIR=/var/cache/buildkit/pip
ENV PIP_CACHE_DIR ${PIP_CACHE_DIR}
RUN mkdir -p ${PIP_CACHE_DIR}
# Create virtual environment
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
python3 -m venv "${APPNAME}" \
--upgrade-deps
# Install requirements
COPY --link pyproject.toml .
COPY --link invokeai/version/invokeai_version.py invokeai/version/__init__.py invokeai/version/
ARG PIP_EXTRA_INDEX_URL
ENV PIP_EXTRA_INDEX_URL ${PIP_EXTRA_INDEX_URL}
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
"${APPNAME}"/bin/pip install .
# Install pyproject.toml
COPY --link . .
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
"${APPNAME}/bin/pip" install .
# Build patchmatch
RUN python3 -c "from patchmatch import patch_match"
#####################
## runtime image ##
#####################
FROM python-base AS runtime
# Create a new user
ARG UNAME=appuser
RUN useradd \
--no-log-init \
-m \
-U \
"${UNAME}"
# Create volume directory
ARG VOLUME_DIR=/data
RUN mkdir -p "${VOLUME_DIR}" \
&& chown -hR "${UNAME}:${UNAME}" "${VOLUME_DIR}"
# Setup runtime environment
USER ${UNAME}:${UNAME}
COPY --chown=${UNAME}:${UNAME} --from=pyproject-builder ${APPDIR}/${APPNAME} ${APPNAME}
ENV INVOKEAI_ROOT ${VOLUME_DIR}
ENV TRANSFORMERS_CACHE ${VOLUME_DIR}/.cache
ENV INVOKE_MODEL_RECONFIGURE "--yes --default_only"
EXPOSE 9090
ENTRYPOINT [ "invokeai" ]
CMD [ "--web", "--host", "0.0.0.0", "--port", "9090" ]
VOLUME [ "${VOLUME_DIR}" ]

51
docker/build.sh Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -e
# If you want to build a specific flavor, set the CONTAINER_FLAVOR environment variable
# e.g. CONTAINER_FLAVOR=cpu ./build.sh
# Possible Values are:
# - cpu
# - cuda
# - rocm
# Don't forget to also set it when executing run.sh
# if it is not set, the script will try to detect the flavor by itself.
#
# Doc can be found here:
# https://invoke-ai.github.io/InvokeAI/installation/040_INSTALL_DOCKER/
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
cd "$SCRIPTDIR" || exit 1
source ./env.sh
DOCKERFILE=${INVOKE_DOCKERFILE:-./Dockerfile}
# print the settings
echo -e "You are using these values:\n"
echo -e "Dockerfile:\t\t${DOCKERFILE}"
echo -e "index-url:\t\t${PIP_EXTRA_INDEX_URL:-none}"
echo -e "Volumename:\t\t${VOLUMENAME}"
echo -e "Platform:\t\t${PLATFORM}"
echo -e "Container Registry:\t${CONTAINER_REGISTRY}"
echo -e "Container Repository:\t${CONTAINER_REPOSITORY}"
echo -e "Container Tag:\t\t${CONTAINER_TAG}"
echo -e "Container Flavor:\t${CONTAINER_FLAVOR}"
echo -e "Container Image:\t${CONTAINER_IMAGE}\n"
# Create docker volume
if [[ -n "$(docker volume ls -f name="${VOLUMENAME}" -q)" ]]; then
echo -e "Volume already exists\n"
else
echo -n "creating docker volume "
docker volume create "${VOLUMENAME}"
fi
# Build Container
docker build \
--platform="${PLATFORM:-linux/amd64}" \
--tag="${CONTAINER_IMAGE:-invokeai}" \
${CONTAINER_FLAVOR:+--build-arg="CONTAINER_FLAVOR=${CONTAINER_FLAVOR}"} \
${PIP_EXTRA_INDEX_URL:+--build-arg="PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}"} \
${PIP_PACKAGE:+--build-arg="PIP_PACKAGE=${PIP_PACKAGE}"} \
--file="${DOCKERFILE}" \
..

54
docker/env.sh Normal file
View File

@ -0,0 +1,54 @@
#!/usr/bin/env bash
# This file is used to set environment variables for the build.sh and run.sh scripts.
# Try to detect the container flavor if no PIP_EXTRA_INDEX_URL got specified
if [[ -z "$PIP_EXTRA_INDEX_URL" ]]; then
# Activate virtual environment if not already activated and exists
if [[ -z $VIRTUAL_ENV ]]; then
[[ -e "$(dirname "${BASH_SOURCE[0]}")/../.venv/bin/activate" ]] \
&& source "$(dirname "${BASH_SOURCE[0]}")/../.venv/bin/activate" \
&& echo "Activated virtual environment: $VIRTUAL_ENV"
fi
# Decide which container flavor to build if not specified
if [[ -z "$CONTAINER_FLAVOR" ]] && python -c "import torch" &>/dev/null; then
# Check for CUDA and ROCm
CUDA_AVAILABLE=$(python -c "import torch;print(torch.cuda.is_available())")
ROCM_AVAILABLE=$(python -c "import torch;print(torch.version.hip is not None)")
if [[ "${CUDA_AVAILABLE}" == "True" ]]; then
CONTAINER_FLAVOR="cuda"
elif [[ "${ROCM_AVAILABLE}" == "True" ]]; then
CONTAINER_FLAVOR="rocm"
else
CONTAINER_FLAVOR="cpu"
fi
fi
# Set PIP_EXTRA_INDEX_URL based on container flavor
if [[ "$CONTAINER_FLAVOR" == "rocm" ]]; then
PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/rocm"
elif [[ "$CONTAINER_FLAVOR" == "cpu" ]]; then
PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"
# elif [[ -z "$CONTAINER_FLAVOR" || "$CONTAINER_FLAVOR" == "cuda" ]]; then
# PIP_PACKAGE=${PIP_PACKAGE-".[xformers]"}
fi
fi
# Variables shared by build.sh and run.sh
REPOSITORY_NAME="${REPOSITORY_NAME-$(basename "$(git rev-parse --show-toplevel)")}"
REPOSITORY_NAME="${REPOSITORY_NAME,,}"
VOLUMENAME="${VOLUMENAME-"${REPOSITORY_NAME}_data"}"
ARCH="${ARCH-$(uname -m)}"
PLATFORM="${PLATFORM-linux/${ARCH}}"
INVOKEAI_BRANCH="${INVOKEAI_BRANCH-$(git branch --show)}"
CONTAINER_REGISTRY="${CONTAINER_REGISTRY-"ghcr.io"}"
CONTAINER_REPOSITORY="${CONTAINER_REPOSITORY-"$(whoami)/${REPOSITORY_NAME}"}"
CONTAINER_FLAVOR="${CONTAINER_FLAVOR-cuda}"
CONTAINER_TAG="${CONTAINER_TAG-"${INVOKEAI_BRANCH##*/}-${CONTAINER_FLAVOR}"}"
CONTAINER_IMAGE="${CONTAINER_REGISTRY}/${CONTAINER_REPOSITORY}:${CONTAINER_TAG}"
CONTAINER_IMAGE="${CONTAINER_IMAGE,,}"
# enable docker buildkit
export DOCKER_BUILDKIT=1

41
docker/run.sh Executable file
View File

@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -e
# How to use: https://invoke-ai.github.io/InvokeAI/installation/040_INSTALL_DOCKER/
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
cd "$SCRIPTDIR" || exit 1
source ./env.sh
# Create outputs directory if it does not exist
[[ -d ./outputs ]] || mkdir ./outputs
echo -e "You are using these values:\n"
echo -e "Volumename:\t${VOLUMENAME}"
echo -e "Invokeai_tag:\t${CONTAINER_IMAGE}"
echo -e "local Models:\t${MODELSPATH:-unset}\n"
docker run \
--interactive \
--tty \
--rm \
--platform="${PLATFORM}" \
--name="${REPOSITORY_NAME}" \
--hostname="${REPOSITORY_NAME}" \
--mount type=volume,volume-driver=local,source="${VOLUMENAME}",target=/data \
--mount type=bind,source="$(pwd)"/outputs/,target=/data/outputs/ \
${MODELSPATH:+--mount="type=bind,source=${MODELSPATH},target=/data/models"} \
${HUGGING_FACE_HUB_TOKEN:+--env="HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN}"} \
--publish=9090:9090 \
--cap-add=sys_nice \
${GPU_FLAGS:+--gpus="${GPU_FLAGS}"} \
"${CONTAINER_IMAGE}" ${@:+$@}
echo -e "\nCleaning trash folder ..."
for f in outputs/.Trash*; do
if [ -e "$f" ]; then
rm -Rf "$f"
break
fi
done

587
docs/CHANGELOG.md Normal file
View File

@ -0,0 +1,587 @@
---
title: Changelog
---
# :octicons-log-16: **Changelog**
## v2.3.0 <small>(15 January 2023)</small>
**Transition to diffusers
Version 2.3 provides support for both the traditional `.ckpt` weight
checkpoint files as well as the HuggingFace `diffusers` format. This
introduces several changes you should know about.
1. The models.yaml format has been updated. There are now two
different type of configuration stanza. The traditional ckpt
one will look like this, with a `format` of `ckpt` and a
`weights` field that points to the absolute or ROOTDIR-relative
location of the ckpt file.
```
inpainting-1.5:
description: RunwayML SD 1.5 model optimized for inpainting (4.27 GB)
repo_id: runwayml/stable-diffusion-inpainting
format: ckpt
width: 512
height: 512
weights: models/ldm/stable-diffusion-v1/sd-v1-5-inpainting.ckpt
config: configs/stable-diffusion/v1-inpainting-inference.yaml
vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
```
A configuration stanza for a diffusers model hosted at HuggingFace will look like this,
with a `format` of `diffusers` and a `repo_id` that points to the
repository ID of the model on HuggingFace:
```
stable-diffusion-2.1:
description: Stable Diffusion version 2.1 diffusers model (5.21 GB)
repo_id: stabilityai/stable-diffusion-2-1
format: diffusers
```
A configuration stanza for a diffuers model stored locally should
look like this, with a `format` of `diffusers`, but a `path` field
that points at the directory that contains `model_index.json`:
```
waifu-diffusion:
description: Latest waifu diffusion 1.4
format: diffusers
path: models/diffusers/hakurei-haifu-diffusion-1.4
```
2. In order of precedence, InvokeAI will now use HF_HOME, then
XDG_CACHE_HOME, then finally default to `ROOTDIR/models` to
store HuggingFace diffusers models.
Consequently, the format of the models directory has changed to
mimic the HuggingFace cache directory. When HF_HOME and XDG_HOME
are not set, diffusers models are now automatically downloaded
and retrieved from the directory `ROOTDIR/models/diffusers`,
while other models are stored in the directory
`ROOTDIR/models/hub`. This organization is the same as that used
by HuggingFace for its cache management.
This allows you to share diffusers and ckpt model files easily with
other machine learning applications that use the HuggingFace
libraries. To do this, set the environment variable HF_HOME
before starting up InvokeAI to tell it what directory to
cache models in. To tell InvokeAI to use the standard HuggingFace
cache directory, you would set HF_HOME like this (Linux/Mac):
`export HF_HOME=~/.cache/huggingface`
Both HuggingFace and InvokeAI will fall back to the XDG_CACHE_HOME
environment variable if HF_HOME is not set; this path
takes precedence over `ROOTDIR/models` to allow for the same sharing
with other machine learning applications that use HuggingFace
libraries.
3. If you upgrade to InvokeAI 2.3.* from an earlier version, there
will be a one-time migration from the old models directory format
to the new one. You will see a message about this the first time
you start `invoke.py`.
4. Both the front end back ends of the model manager have been
rewritten to accommodate diffusers. You can import models using
their local file path, using their URLs, or their HuggingFace
repo_ids. On the command line, all these syntaxes work:
```
!import_model stabilityai/stable-diffusion-2-1-base
!import_model /opt/sd-models/sd-1.4.ckpt
!import_model https://huggingface.co/Fictiverse/Stable_Diffusion_PaperCut_Model/blob/main/PaperCut_v1.ckpt
```
**KNOWN BUGS (15 January 2023)
1. On CUDA systems, the 768 pixel stable-diffusion-2.0 and
stable-diffusion-2.1 models can only be run as `diffusers` models
when the `xformer` library is installed and configured. Without
`xformers`, InvokeAI returns black images.
2. Inpainting and outpainting have regressed in quality.
Both these issues are being actively worked on.
## v2.2.4 <small>(11 December 2022)</small>
**the `invokeai` directory**
Previously there were two directories to worry about, the directory that
contained the InvokeAI source code and the launcher scripts, and the `invokeai`
directory that contained the models files, embeddings, configuration and
outputs. With the 2.2.4 release, this dual system is done away with, and
everything, including the `invoke.bat` and `invoke.sh` launcher scripts, now
live in a directory named `invokeai`. By default this directory is located in
your home directory (e.g. `\Users\yourname` on Windows), but you can select
where it goes at install time.
After installation, you can delete the install directory (the one that the zip
file creates when it unpacks). Do **not** delete or move the `invokeai`
directory!
**Initialization file `invokeai/invokeai.init`**
You can place frequently-used startup options in this file, such as the default
number of steps or your preferred sampler. To keep everything in one place, this
file has now been moved into the `invokeai` directory and is named
`invokeai.init`.
**To update from Version 2.2.3**
The easiest route is to download and unpack one of the 2.2.4 installer files.
When it asks you for the location of the `invokeai` runtime directory, respond
with the path to the directory that contains your 2.2.3 `invokeai`. That is, if
`invokeai` lives at `C:\Users\fred\invokeai`, then answer with `C:\Users\fred`
and answer "Y" when asked if you want to reuse the directory.
The `update.sh` (`update.bat`) script that came with the 2.2.3 source installer
does not know about the new directory layout and won't be fully functional.
**To update to 2.2.5 (and beyond) there's now an update path**
As they become available, you can update to more recent versions of InvokeAI
using an `update.sh` (`update.bat`) script located in the `invokeai` directory.
Running it without any arguments will install the most recent version of
InvokeAI. Alternatively, you can get set releases by running the `update.sh`
script with an argument in the command shell. This syntax accepts the path to
the desired release's zip file, which you can find by clicking on the green
"Code" button on this repository's home page.
**Other 2.2.4 Improvements**
- Fix InvokeAI GUI initialization by @addianto in #1687
- fix link in documentation by @lstein in #1728
- Fix broken link by @ShawnZhong in #1736
- Remove reference to binary installer by @lstein in #1731
- documentation fixes for 2.2.3 by @lstein in #1740
- Modify installer links to point closer to the source installer by @ebr in
#1745
- add documentation warning about 1650/60 cards by @lstein in #1753
- Fix Linux source URL in installation docs by @andybearman in #1756
- Make install instructions discoverable in readme by @damian0815 in #1752
- typo fix by @ofirkris in #1755
- Non-interactive model download (support HUGGINGFACE_TOKEN) by @ebr in #1578
- fix(srcinstall): shell installer - cp scripts instead of linking by @tildebyte
in #1765
- stability and usage improvements to binary & source installers by @lstein in
#1760
- fix off-by-one bug in cross-attention-control by @damian0815 in #1774
- Eventually update APP_VERSION to 2.2.3 by @spezialspezial in #1768
- invoke script cds to its location before running by @lstein in #1805
- Make PaperCut and VoxelArt models load again by @lstein in #1730
- Fix --embedding_directory / --embedding_path not working by @blessedcoolant in
#1817
- Clean up readme by @hipsterusername in #1820
- Optimized Docker build with support for external working directory by @ebr in
#1544
- disable pushing the cloud container by @mauwii in #1831
- Fix docker push github action and expand with additional metadata by @ebr in
#1837
- Fix Broken Link To Notebook by @VedantMadane in #1821
- Account for flat models by @spezialspezial in #1766
- Update invoke.bat.in isolate environment variables by @lynnewu in #1833
- Arch Linux Specific PatchMatch Instructions & fixing conda install on linux by
@SammCheese in #1848
- Make force free GPU memory work in img2img by @addianto in #1844
- New installer by @lstein
## v2.2.3 <small>(2 December 2022)</small>
!!! Note
This point release removes references to the binary installer from the
installation guide. The binary installer is not stable at the current
time. First time users are encouraged to use the "source" installer as
described in [Installing InvokeAI with the Source Installer](installation/deprecated_documentation/INSTALL_SOURCE.md)
With InvokeAI 2.2, this project now provides enthusiasts and professionals a
robust workflow solution for creating AI-generated and human facilitated
compositions. Additional enhancements have been made as well, improving safety,
ease of use, and installation.
Optimized for efficiency, InvokeAI needs only ~3.5GB of VRAM to generate a
512x768 image (and less for smaller images), and is compatible with
Windows/Linux/Mac (M1 & M2).
You can see the [release video](https://youtu.be/hIYBfDtKaus) here, which
introduces the main WebUI enhancement for version 2.2 -
[The Unified Canvas](features/UNIFIED_CANVAS.md). This new workflow is the
biggest enhancement added to the WebUI to date, and unlocks a stunning amount of
potential for users to create and iterate on their creations. The following
sections describe what's new for InvokeAI.
## v2.2.2 <small>(30 November 2022)</small>
!!! note
The binary installer is not ready for prime time. First time users are recommended to install via the "source" installer accessible through the links at the bottom of this page.****
With InvokeAI 2.2, this project now provides enthusiasts and professionals a
robust workflow solution for creating AI-generated and human facilitated
compositions. Additional enhancements have been made as well, improving safety,
ease of use, and installation.
Optimized for efficiency, InvokeAI needs only ~3.5GB of VRAM to generate a
512x768 image (and less for smaller images), and is compatible with
Windows/Linux/Mac (M1 & M2).
You can see the [release video](https://youtu.be/hIYBfDtKaus) here, which
introduces the main WebUI enhancement for version 2.2 -
[The Unified Canvas](https://invoke-ai.github.io/InvokeAI/features/UNIFIED_CANVAS/).
This new workflow is the biggest enhancement added to the WebUI to date, and
unlocks a stunning amount of potential for users to create and iterate on their
creations. The following sections describe what's new for InvokeAI.
## v2.2.0 <small>(2 December 2022)</small>
With InvokeAI 2.2, this project now provides enthusiasts and professionals a
robust workflow solution for creating AI-generated and human facilitated
compositions. Additional enhancements have been made as well, improving safety,
ease of use, and installation.
Optimized for efficiency, InvokeAI needs only ~3.5GB of VRAM to generate a
512x768 image (and less for smaller images), and is compatible with
Windows/Linux/Mac (M1 & M2).
You can see the [release video](https://youtu.be/hIYBfDtKaus) here, which
introduces the main WebUI enhancement for version 2.2 -
[The Unified Canvas](features/UNIFIED_CANVAS.md). This new workflow is the
biggest enhancement added to the WebUI to date, and unlocks a stunning amount of
potential for users to create and iterate on their creations. The following
sections describe what's new for InvokeAI.
## v2.1.3 <small>(13 November 2022)</small>
- A choice of installer scripts that automate installation and configuration.
See
[Installation](installation/index.md).
- A streamlined manual installation process that works for both Conda and
PIP-only installs. See
[Manual Installation](installation/020_INSTALL_MANUAL.md).
- The ability to save frequently-used startup options (model to load, steps,
sampler, etc) in a `.invokeai` file. See
[Client](features/CLI.md)
- Support for AMD GPU cards (non-CUDA) on Linux machines.
- Multiple bugs and edge cases squashed.
## v2.1.0 <small>(2 November 2022)</small>
- update mac instructions to use invokeai for env name by @willwillems in #1030
- Update .gitignore by @blessedcoolant in #1040
- reintroduce fix for m1 from #579 missing after merge by @skurovec in #1056
- Update Stable_Diffusion_AI_Notebook.ipynb (Take 2) by @ChloeL19 in #1060
- Print out the device type which is used by @manzke in #1073
- Hires Addition by @hipsterusername in #1063
- fix for "1 leaked semaphore objects to clean up at shutdown" on M1 by
@skurovec in #1081
- Forward dream.py to invoke.py using the same interpreter, add deprecation
warning by @db3000 in #1077
- fix noisy images at high step counts by @lstein in #1086
- Generalize facetool strength argument by @db3000 in #1078
- Enable fast switching among models at the invoke> command line by @lstein in
#1066
- Fix Typo, committed changing ldm environment to invokeai by @jdries3 in #1095
- Update generate.py by @unreleased in #1109
- Update 'ldm' env to 'invokeai' in troubleshooting steps by @19wolf in #1125
- Fixed documentation typos and resolved merge conflicts by @rupeshs in #1123
- Fix broken doc links, fix malaprop in the project subtitle by @majick in #1131
- Only output facetool parameters if enhancing faces by @db3000 in #1119
- Update gitignore to ignore codeformer weights at new location by
@spezialspezial in #1136
- fix links to point to invoke-ai.github.io #1117 by @mauwii in #1143
- Rework-mkdocs by @mauwii in #1144
- add option to CLI and pngwriter that allows user to set PNG compression level
by @lstein in #1127
- Fix img2img DDIM index out of bound by @wfng92 in #1137
- Fix gh actions by @mauwii in #1128
- update mac instructions to use invokeai for env name by @willwillems in #1030
- Update .gitignore by @blessedcoolant in #1040
- reintroduce fix for m1 from #579 missing after merge by @skurovec in #1056
- Update Stable_Diffusion_AI_Notebook.ipynb (Take 2) by @ChloeL19 in #1060
- Print out the device type which is used by @manzke in #1073
- Hires Addition by @hipsterusername in #1063
- fix for "1 leaked semaphore objects to clean up at shutdown" on M1 by
@skurovec in #1081
- Forward dream.py to invoke.py using the same interpreter, add deprecation
warning by @db3000 in #1077
- fix noisy images at high step counts by @lstein in #1086
- Generalize facetool strength argument by @db3000 in #1078
- Enable fast switching among models at the invoke> command line by @lstein in
#1066
- Fix Typo, committed changing ldm environment to invokeai by @jdries3 in #1095
- Fixed documentation typos and resolved merge conflicts by @rupeshs in #1123
- Only output facetool parameters if enhancing faces by @db3000 in #1119
- add option to CLI and pngwriter that allows user to set PNG compression level
by @lstein in #1127
- Fix img2img DDIM index out of bound by @wfng92 in #1137
- Add text prompt to inpaint mask support by @lstein in #1133
- Respect http[s] protocol when making socket.io middleware by @damian0815 in
#976
- WebUI: Adds Codeformer support by @psychedelicious in #1151
- Skips normalizing prompts for web UI metadata by @psychedelicious in #1165
- Add Asymmetric Tiling by @carson-katri in #1132
- Web UI: Increases max CFG Scale to 200 by @psychedelicious in #1172
- Corrects color channels in face restoration; Fixes #1167 by @psychedelicious
in #1175
- Flips channels using array slicing instead of using OpenCV by @psychedelicious
in #1178
- Fix typo in docs: s/Formally/Formerly by @noodlebox in #1176
- fix clipseg loading problems by @lstein in #1177
- Correct color channels in upscale using array slicing by @wfng92 in #1181
- Web UI: Filters existing images when adding new images; Fixes #1085 by
@psychedelicious in #1171
- fix a number of bugs in textual inversion by @lstein in #1190
- Improve !fetch, add !replay command by @ArDiouscuros in #882
- Fix generation of image with s>1000 by @holstvoogd in #951
- Web UI: Gallery improvements by @psychedelicious in #1198
- Update CLI.md by @krummrey in #1211
- outcropping improvements by @lstein in #1207
- add support for loading VAE autoencoders by @lstein in #1216
- remove duplicate fix_func for MPS by @wfng92 in #1210
- Metadata storage and retrieval fixes by @lstein in #1204
- nix: add shell.nix file by @Cloudef in #1170
- Web UI: Changes vite dist asset paths to relative by @psychedelicious in #1185
- Web UI: Removes isDisabled from PromptInput by @psychedelicious in #1187
- Allow user to generate images with initial noise as on M1 / mps system by
@ArDiouscuros in #981
- feat: adding filename format template by @plucked in #968
- Web UI: Fixes broken bundle by @psychedelicious in #1242
- Support runwayML custom inpainting model by @lstein in #1243
- Update IMG2IMG.md by @talitore in #1262
- New dockerfile - including a build- and a run- script as well as a GH-Action
by @mauwii in #1233
- cut over from karras to model noise schedule for higher steps by @lstein in
#1222
- Prompt tweaks by @lstein in #1268
- Outpainting implementation by @Kyle0654 in #1251
- fixing aspect ratio on hires by @tjennings in #1249
- Fix-build-container-action by @mauwii in #1274
- handle all unicode characters by @damian0815 in #1276
- adds models.user.yml to .gitignore by @JakeHL in #1281
- remove debug branch, set fail-fast to false by @mauwii in #1284
- Protect-secrets-on-pr by @mauwii in #1285
- Web UI: Adds initial inpainting implementation by @psychedelicious in #1225
- fix environment-mac.yml - tested on x64 and arm64 by @mauwii in #1289
- Use proper authentication to download model by @mauwii in #1287
- Prevent indexing error for mode RGB by @spezialspezial in #1294
- Integrate sd-v1-5 model into test matrix (easily expandable), remove
unecesarry caches by @mauwii in #1293
- add --no-interactive to configure_invokeai step by @mauwii in #1302
- 1-click installer and updater. Uses micromamba to install git and conda into a
contained environment (if necessary) before running the normal installation
script by @cmdr2 in #1253
- configure_invokeai.py script downloads the weight files by @lstein in #1290
## v2.0.1 <small>(13 October 2022)</small>
- fix noisy images at high step count when using k\* samplers
- dream.py script now calls invoke.py module directly rather than via a new
python process (which could break the environment)
## v2.0.0 <small>(9 October 2022)</small>
- `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains for
backward compatibility.
- Completely new WebGUI - launch with `python3 scripts/invoke.py --web`
- Support for [inpainting](features/INPAINTING.md) and
[outpainting](features/OUTPAINTING.md)
- img2img runs on all k\* samplers
- Support for
[negative prompts](features/PROMPTS.md#negative-and-unconditioned-prompts)
- Support for CodeFormer face reconstruction
- Support for Textual Inversion on Macintoshes
- Support in both WebGUI and CLI for
[post-processing of previously-generated images](features/POSTPROCESS.md)
using facial reconstruction, ESRGAN upscaling, outcropping (similar to DALL-E
infinite canvas), and "embiggen" upscaling. See the `!fix` command.
- New `--hires` option on `invoke>` line allows
[larger images to be created without duplicating elements](features/CLI.md#this-is-an-example-of-txt2img),
at the cost of some performance.
- New `--perlin` and `--threshold` options allow you to add and control
variation during image generation (see
[Thresholding and Perlin Noise Initialization](features/OTHER.md#thresholding-and-perlin-noise-initialization-options))
- Extensive metadata now written into PNG files, allowing reliable regeneration
of images and tweaking of previous settings.
- Command-line completion in `invoke.py` now works on Windows, Linux and Mac
platforms.
- Improved [command-line completion behavior](features/CLI.md) New commands
added:
- List command-line history with `!history`
- Search command-line history with `!search`
- Clear history with `!clear`
- Deprecated `--full_precision` / `-F`. Simply omit it and `invoke.py` will auto
configure. To switch away from auto use the new flag like
`--precision=float32`.
## v1.14 <small>(11 September 2022)</small>
- Memory optimizations for small-RAM cards. 512x512 now possible on 4 GB GPUs.
- Full support for Apple hardware with M1 or M2 chips.
- Add "seamless mode" for circular tiling of image. Generates beautiful effects.
([prixt](https://github.com/prixt)).
- Inpainting support.
- Improved web server GUI.
- Lots of code and documentation cleanups.
## v1.13 <small>(3 September 2022)</small>
- Support image variations (see [VARIATIONS](features/VARIATIONS.md)
([Kevin Gibbons](https://github.com/bakkot) and many contributors and
reviewers)
- Supports a Google Colab notebook for a standalone server running on Google
hardware [Arturo Mendivil](https://github.com/artmen1516)
- WebUI supports GFPGAN/ESRGAN facial reconstruction and upscaling
[Kevin Gibbons](https://github.com/bakkot)
- WebUI supports incremental display of in-progress images during generation
[Kevin Gibbons](https://github.com/bakkot)
- A new configuration file scheme that allows new models (including upcoming
stable-diffusion-v1.5) to be added without altering the code.
([David Wager](https://github.com/maddavid12))
- Can specify --grid on invoke.py command line as the default.
- Miscellaneous internal bug and stability fixes.
- Works on M1 Apple hardware.
- Multiple bug fixes.
---
## v1.12 <small>(28 August 2022)</small>
- Improved file handling, including ability to read prompts from standard input.
(kudos to [Yunsaki](https://github.com/yunsaki)
- The web server is now integrated with the invoke.py script. Invoke by adding
--web to the invoke.py command arguments.
- Face restoration and upscaling via GFPGAN and Real-ESGAN are now automatically
enabled if the GFPGAN directory is located as a sibling to Stable Diffusion.
VRAM requirements are modestly reduced. Thanks to both
[Blessedcoolant](https://github.com/blessedcoolant) and
[Oceanswave](https://github.com/oceanswave) for their work on this.
- You can now swap samplers on the invoke> command line.
[Blessedcoolant](https://github.com/blessedcoolant)
---
## v1.11 <small>(26 August 2022)</small>
- NEW FEATURE: Support upscaling and face enhancement using the GFPGAN module.
(kudos to [Oceanswave](https://github.com/Oceanswave)
- You now can specify a seed of -1 to use the previous image's seed, -2 to use
the seed for the image generated before that, etc. Seed memory only extends
back to the previous command, but will work on all images generated with the
-n# switch.
- Variant generation support temporarily disabled pending more general solution.
- Created a feature branch named **yunsaki-morphing-invoke** which adds
experimental support for iteratively modifying the prompt and its parameters.
Please
see[Pull Request #86](https://github.com/lstein/stable-diffusion/pull/86) for
a synopsis of how this works. Note that when this feature is eventually added
to the main branch, it will may be modified significantly.
---
## v1.10 <small>(25 August 2022)</small>
- A barebones but fully functional interactive web server for online generation
of txt2img and img2img.
---
## v1.09 <small>(24 August 2022)</small>
- A new -v option allows you to generate multiple variants of an initial image
in img2img mode. (kudos to [Oceanswave](https://github.com/Oceanswave).
[ See this discussion in the PR for examples and details on use](https://github.com/lstein/stable-diffusion/pull/71#issuecomment-1226700810))
- Added ability to personalize text to image generation (kudos to
[Oceanswave](https://github.com/Oceanswave) and
[nicolai256](https://github.com/nicolai256))
- Enabled all of the samplers from k_diffusion
---
## v1.08 <small>(24 August 2022)</small>
- Escape single quotes on the invoke> command before trying to parse. This
avoids parse errors.
- Removed instruction to get Python3.8 as first step in Windows install.
Anaconda3 does it for you.
- Added bounds checks for numeric arguments that could cause crashes.
- Cleaned up the copyright and license agreement files.
---
## v1.07 <small>(23 August 2022)</small>
- Image filenames will now never fill gaps in the sequence, but will be assigned
the next higher name in the chosen directory. This ensures that the alphabetic
and chronological sort orders are the same.
---
## v1.06 <small>(23 August 2022)</small>
- Added weighted prompt support contributed by
[xraxra](https://github.com/xraxra)
- Example of using weighted prompts to tweak a demonic figure contributed by
[bmaltais](https://github.com/bmaltais)
---
## v1.05 <small>(22 August 2022 - after the drop)</small>
- Filenames now use the following formats: 000010.95183149.png -- Two files
produced by the same command (e.g. -n2), 000010.26742632.png -- distinguished
by a different seed.
000011.455191342.01.png -- Two files produced by the same command using
000011.455191342.02.png -- a batch size>1 (e.g. -b2). They have the same seed.
000011.4160627868.grid#1-4.png -- a grid of four images (-g); the whole grid
can be regenerated with the indicated key
- It should no longer be possible for one image to overwrite another
- You can use the "cd" and "pwd" commands at the invoke> prompt to set and
retrieve the path of the output directory.
---
## v1.04 <small>(22 August 2022 - after the drop)</small>
- Updated README to reflect installation of the released weights.
- Suppressed very noisy and inconsequential warning when loading the frozen CLIP
tokenizer.
---
## v1.03 <small>(22 August 2022)</small>
- The original txt2img and img2img scripts from the CompViz repository have been
moved into a subfolder named "orig_scripts", to reduce confusion.
---
## v1.02 <small>(21 August 2022)</small>
- A copy of the prompt and all of its switches and options is now stored in the
corresponding image in a tEXt metadata field named "Dream". You can read the
prompt using scripts/images2prompt.py, or an image editor that allows you to
explore the full metadata. **Please run "conda env update" to load the k_lms
dependencies!!**
---
## v1.01 <small>(21 August 2022)</small>
- added k_lms sampling. **Please run "conda env update" to load the k_lms
dependencies!!**
- use half precision arithmetic by default, resulting in faster execution and
lower memory requirements Pass argument --full_precision to invoke.py to get
slower but more accurate image generation
---
## Links
- **[Read Me](index.md)**

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Some files were not shown because too many files have changed in this diff Show More