Merge branch 'main' into JPPhoto-add-ideal-size

This commit is contained in:
Lincoln Stein 2023-07-21 15:17:06 -04:00 committed by GitHub
commit 53c8c3b4f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 599 additions and 373 deletions

View File

@ -2,7 +2,7 @@ name: mkdocs-material
on: on:
push: push:
branches: branches:
- 'refs/heads/v2.3' - 'refs/heads/main'
permissions: permissions:
contents: write contents: write

View File

@ -14,6 +14,21 @@ The nodes linked below have been developed and contributed by members of the Inv
## List of Nodes ## List of Nodes
### Face Mask
**Description:** This node autodetects a face in the image using MediaPipe and masks it by making it transparent. Via outpainting you can swap faces with other faces, or invert the mask and swap things around the face with other things. Additionally, you can supply X and Y offset values to scale/change the shape of the mask for finer control. The node also outputs an all-white mask in the same dimensions as the input image. This is needed by the inpaint node (and unified canvas) for outpainting.
**Node Link:** https://github.com/ymgenesis/InvokeAI/blob/facemaskmediapipe/invokeai/app/invocations/facemask.py
**Example Node Graph:** https://www.mediafire.com/file/gohn5sb1bfp8use/21-July_2023-FaceMask.json/file
**Output Examples**
![2e3168cb-af6a-475d-bfac-c7b7fd67b4c2](https://github.com/ymgenesis/InvokeAI/assets/25252829/a5ad7d44-2ada-4b3c-a56e-a21f8244a1ac)
![2_annotated](https://github.com/ymgenesis/InvokeAI/assets/25252829/53416c8a-a23b-4d76-bb6d-3cfd776e0096)
![2fe2150c-fd08-4e26-8c36-f0610bf441bb](https://github.com/ymgenesis/InvokeAI/assets/25252829/b0f7ecfe-f093-4147-a904-b9f131b41dc9)
![831b6b98-4f0f-4360-93c8-69a9c1338cbe](https://github.com/ymgenesis/InvokeAI/assets/25252829/fc7b0622-e361-4155-8a76-082894d084f0)
-------------------------------- --------------------------------
### Super Cool Node Template ### Super Cool Node Template

View File

@ -17,67 +17,267 @@ We thank them for all of their time and hard work.
* @lstein (Lincoln Stein) - Co-maintainer * @lstein (Lincoln Stein) - Co-maintainer
* @blessedcoolant - Co-maintainer * @blessedcoolant - Co-maintainer
* @hipsterusername (Kent Keirsey) - Product Manager * @hipsterusername (Kent Keirsey) - Co-maintainer, CEO, Positive Vibes
* @psychedelicious - Web Team Leader * @psychedelicious (Spencer Mabrito) - Web Team Leader
* @Kyle0654 (Kyle Schouviller) - Node Architect and General Backend Wizard * @Kyle0654 (Kyle Schouviller) - Node Architect and General Backend Wizard
* @damian0815 - Attention Systems and Gameplay Engineer * @damian0815 - Attention Systems and Compel Maintainer
* @mauwii (Matthias Wild) - Continuous integration and product maintenance engineer
* @Netsvetaev (Artur Netsvetaev) - UI/UX Developer
* @tildebyte - General gadfly and resident (self-appointed) know-it-all
* @keturn - Lead for Diffusers port
* @ebr (Eugene Brodsky) - Cloud/DevOps/Sofware engineer; your friendly neighbourhood cluster-autoscaler * @ebr (Eugene Brodsky) - Cloud/DevOps/Sofware engineer; your friendly neighbourhood cluster-autoscaler
* @jpphoto (Jonathan Pollack) - Inference and rendering engine optimization * @genomancer (Gregg Helt) - Controlnet support
* @genomancer (Gregg Helt) - Model training and merging * @StAlKeR7779 (Sergey Borisov) - Torch stack, ONNX, model management, optimization
* @cheerio (Mary Rogers) - Lead Engineer & Web App Development
* @brandon (Brandon Rising) - Platform, Infrastructure, Backend Systems
* @ryanjdick (Ryan Dick) - Machine Learning & Training
* @millu (Millun Atluri) - Community Manager, Documentation, Node-wrangler
* @chainchompa (Jennifer Player) - Web Development & Chain-Chomping
* @keturn (Kevin Turner) - Diffusers
* @gogurt enjoyer - Discord moderator and end user support
* @whosawhatsis - Discord moderator and end user support
* @dwinrger - Discord moderator and end user support
* @526christian - Discord moderator and end user support
## **Contributions by** ## **Full List of Contributors by Commit Name**
- [Sean McLellan](https://github.com/Oceanswave) - AbdBarho
- [Kevin Gibbons](https://github.com/bakkot) - ablattmann
- [Tesseract Cat](https://github.com/TesseractCat) - AdamOStark
- [blessedcoolant](https://github.com/blessedcoolant) - Adam Rice
- [David Ford](https://github.com/david-ford) - Airton Silva
- [yunsaki](https://github.com/yunsaki) - Alexander Eichhorn
- [James Reynolds](https://github.com/magnusviri) - Alexandre D. Roberge
- [David Wager](https://github.com/maddavid123) - Andreas Rozek
- [Jason Toffaletti](https://github.com/toffaletti) - Andre LaBranche
- [tildebyte](https://github.com/tildebyte) - Andy Bearman
- [Cragin Godley](https://github.com/cgodley) - Andy Luhrs
- [BlueAmulet](https://github.com/BlueAmulet) - Andy Pilate
- [Benjamin Warner](https://github.com/warner-benjamin) - Any-Winter-4079
- [Cora Johnson-Roberson](https://github.com/corajr) - apolinario
- [veprogames](https://github.com/veprogames) - ArDiouscuros
- [JigenD](https://github.com/JigenD) - Armando C. Santisbon
- [Niek van der Maas](https://github.com/Niek) - Arthur Holstvoogd
- [Henry van Megen](https://github.com/hvanmegen) - artmen1516
- [Håvard Gulldahl](https://github.com/havardgulldahl) - Artur
- [greentext2](https://github.com/greentext2) - Arturo Mendivil
- [Simon Vans-Colina](https://github.com/simonvc) - Ben Alkov
- [Gabriel Rotbart](https://github.com/gabrielrotbart) - Benjamin Warner
- [Eric Khun](https://github.com/erickhun) - Bernard Maltais
- [Brent Ozar](https://github.com/BrentOzar) - blessedcoolant
- [nderscore](https://github.com/nderscore) - blhook
- [Mikhail Tishin](https://github.com/tishin) - BlueAmulet
- [Tom Elovi Spruce](https://github.com/ilovecomputers) - Bouncyknighter
- [spezialspezial](https://github.com/spezialspezial) - Brandon Rising
- [Yosuke Shinya](https://github.com/shinya7y) - Brent Ozar
- [Andy Pilate](https://github.com/Cubox) - Brian Racer
- [Muhammad Usama](https://github.com/SMUsamaShah) - bsilvereagle
- [Arturo Mendivil](https://github.com/artmen1516) - c67e708d
- [Paul Sajna](https://github.com/sajattack) - CapableWeb
- [Samuel Husso](https://github.com/shusso) - Carson Katri
- [nicolai256](https://github.com/nicolai256) - Chloe
- [Mihai](https://github.com/mh-dm) - Chris Dawson
- [Any Winter](https://github.com/any-winter-4079) - Chris Hayes
- [Doggettx](https://github.com/doggettx) - Chris Jones
- [Matthias Wild](https://github.com/mauwii) - chromaticist
- [Kyle Schouviller](https://github.com/kyle0654) - Claus F. Strasburger
- [rabidcopy](https://github.com/rabidcopy) - cmdr2
- [Dominic Letz](https://github.com/dominicletz) - cody
- [Dmitry T.](https://github.com/ArDiouscuros) - Conor Reid
- [Kent Keirsey](https://github.com/hipsterusername) - Cora Johnson-Roberson
- [psychedelicious](https://github.com/psychedelicious) - coreco
- [damian0815](https://github.com/damian0815) - cosmii02
- [Eugene Brodsky](https://github.com/ebr) - cpacker
- Cragin Godley
- creachec
- Damian Stewart
- Daniel Manzke
- Danny Beer
- Dan Sully
- David Burnett
- David Ford
- David Regla
- David Wager
- Daya Adianto
- db3000
- Denis Olshin
- Dennis
- Dominic Letz
- DrGunnarMallon
- Edward Johan
- elliotsayes
- Elrik
- ElrikUnderlake
- Eric Khun
- Eric Wolf
- Eugene Brodsky
- ExperimentalCyborg
- Fabian Bahl
- Fabio 'MrWHO' Torchetti
- fattire
- Felipe Nogueira
- Félix Sanz
- figgefigge
- Gabriel Mackievicz Telles
- gabrielrotbart
- gallegonovato
- Gérald LONLAS
- GitHub Actions Bot
- gogurtenjoyer
- greentext2
- Gregg Helt
- H4rk
- Håvard Gulldahl
- henry
- Henry van Megen
- hipsterusername
- hj
- Hosted Weblate
- Iman Karim
- ismail ihsan bülbül
- Ivan Efimov
- jakehl
- Jakub Kolčář
- JamDon2
- James Reynolds
- Jan Skurovec
- Jari Vetoniemi
- Jason Toffaletti
- Jaulustus
- Jeff Mahoney
- jeremy
- Jeremy Clark
- JigenD
- Jim Hays
- Johan Roxendal
- Johnathon Selstad
- Jonathan
- Joseph Dries III
- JPPhoto
- jspraul
- Justin Wong
- Juuso V
- Kaspar Emanuel
- Katsuyuki-Karasawa
- Kent Keirsey
- Kevin Coakley
- Kevin Gibbons
- Kevin Schaul
- Kevin Turner
- krummrey
- Kyle Lacy
- Kyle Schouviller
- Lawrence Norton
- LemonDouble
- Leo Pasanen
- Lincoln Stein
- LoganPederson
- Lynne Whitehorn
- majick
- Marco Labarile
- Martin Kristiansen
- Mary Hipp Rogers
- mastercaster9000
- Matthias Wild
- michaelk71
- mickr777
- Mihai
- Mihail Dumitrescu
- Mikhail Tishin
- Millun Atluri
- Minjune Song
- mitien
- mofuzz
- Muhammad Usama
- Name
- _nderscore
- Netzer R
- Nicholas Koh
- Nicholas Körfer
- nicolai256
- Niek van der Maas
- noodlebox
- Nuno Coração
- ofirkris
- Olivier Louvignes
- owenvincent
- Patrick Esser
- Patrick Tien
- Patrick von Platen
- Paul Sajna
- pejotr
- Peter Baylies
- Peter Lin
- plucked
- prixt
- psychedelicious
- Rainer Bernhardt
- Riccardo Giovanetti
- Rich Jones
- rmagur1203
- Rob Baines
- Robert Bolender
- Robin Rombach
- Rohan Barar
- rpagliuca
- rromb
- Rupesh Sreeraman
- Ryan Cao
- Saifeddine
- Saifeddine ALOUI
- SammCheese
- Sammy
- sammyf
- Samuel Husso
- Scott Lahteine
- Sean McLellan
- Sebastian Aigner
- Sergey Borisov
- Sergey Krashevich
- Shapor Naghibzadeh
- Shawn Zhong
- Simon Vans-Colina
- skunkworxdark
- slashtechno
- spezialspezial
- ssantos
- StAlKeR7779
- Stephan Koglin-Fischer
- SteveCaruso
- Steve Martinelli
- Steven Frank
- System X - Files
- Taylor Kems
- techicode
- techybrain-dev
- tesseractcat
- thealanle
- Thomas
- tildebyte
- Tim Cabbage
- Tom
- Tom Elovi Spruce
- Tom Gouville
- tomosuto
- Travco
- Travis Palmer
- tyler
- unknown
- user1
- Vedant Madane
- veprogames
- wa.code
- wfng92
- whosawhatsis
- Will
- William Becher
- William Chong
- xra
- Yeung Yiu Hung
- ymgenesis
- Yorzaren
- Yosuke Shinya
- yun saki
- Zadagu
- zeptofine
- 冯不游
- 唐澤 克幸
## **Original CompVis Authors** ## **Original CompVis Authors**

View File

@ -3,6 +3,6 @@ Initialization file for invokeai.backend.model_management
""" """
from .model_manager import ModelManager, ModelInfo, AddModelResult, SchedulerPredictionType from .model_manager import ModelManager, ModelInfo, AddModelResult, SchedulerPredictionType
from .model_cache import ModelCache from .model_cache import ModelCache
from .models import BaseModelType, ModelType, SubModelType, ModelVariantType, ModelNotFoundException from .models import BaseModelType, ModelType, SubModelType, ModelVariantType, ModelNotFoundException, DuplicateModelException
from .model_merge import ModelMerger, MergeInterpolationMethod from .model_merge import ModelMerger, MergeInterpolationMethod

View File

@ -251,7 +251,9 @@ from .model_search import ModelSearch
from .models import ( from .models import (
BaseModelType, ModelType, SubModelType, BaseModelType, ModelType, SubModelType,
ModelError, SchedulerPredictionType, MODEL_CLASSES, ModelError, SchedulerPredictionType, MODEL_CLASSES,
ModelConfigBase, ModelNotFoundException, InvalidModelException, ModelConfigBase,
ModelNotFoundException, InvalidModelException,
DuplicateModelException,
) )
# We are only starting to number the config file with release 3. # We are only starting to number the config file with release 3.
@ -891,15 +893,18 @@ class ModelManager(object):
model_name = model_path.name if model_path.is_dir() else model_path.stem model_name = model_path.name if model_path.is_dir() else model_path.stem
model_key = self.create_key(model_name, cur_base_model, cur_model_type) model_key = self.create_key(model_name, cur_base_model, cur_model_type)
if model_key in self.models:
raise Exception(f"Model with key {model_key} added twice")
if model_path.is_relative_to(self.app_config.root_path):
model_path = model_path.relative_to(self.app_config.root_path)
try: try:
if model_key in self.models:
raise DuplicateModelException(f"Model with key {model_key} added twice")
if model_path.is_relative_to(self.app_config.root_path):
model_path = model_path.relative_to(self.app_config.root_path)
model_config: ModelConfigBase = model_class.probe_config(str(model_path)) model_config: ModelConfigBase = model_class.probe_config(str(model_path))
self.models[model_key] = model_config self.models[model_key] = model_config
new_models_found = True new_models_found = True
except DuplicateModelException as e:
self.logger.warning(e)
except InvalidModelException: except InvalidModelException:
self.logger.warning(f"Not a valid model: {model_path}") self.logger.warning(f"Not a valid model: {model_path}")
except NotImplementedError as e: except NotImplementedError as e:

View File

@ -2,7 +2,11 @@ import inspect
from enum import Enum from enum import Enum
from pydantic import BaseModel from pydantic import BaseModel
from typing import Literal, get_origin from typing import Literal, get_origin
from .base import BaseModelType, ModelType, SubModelType, ModelBase, ModelConfigBase, ModelVariantType, SchedulerPredictionType, ModelError, SilenceWarnings, ModelNotFoundException, InvalidModelException from .base import (
BaseModelType, ModelType, SubModelType, ModelBase, ModelConfigBase,
ModelVariantType, SchedulerPredictionType, ModelError, SilenceWarnings,
ModelNotFoundException, InvalidModelException, DuplicateModelException
)
from .stable_diffusion import StableDiffusion1Model, StableDiffusion2Model from .stable_diffusion import StableDiffusion1Model, StableDiffusion2Model
from .sdxl import StableDiffusionXLModel from .sdxl import StableDiffusionXLModel
from .vae import VaeModel from .vae import VaeModel

View File

@ -15,6 +15,9 @@ from contextlib import suppress
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from typing import List, Dict, Optional, Type, Literal, TypeVar, Generic, Callable, Any, Union from typing import List, Dict, Optional, Type, Literal, TypeVar, Generic, Callable, Any, Union
class DuplicateModelException(Exception):
pass
class InvalidModelException(Exception): class InvalidModelException(Exception):
pass pass

View File

@ -83,7 +83,7 @@ class ChunkedSlicedAttnProcessor:
self._sliced_attn_processor = _SlicedAttnProcessor(slice_size) self._sliced_attn_processor = _SlicedAttnProcessor(slice_size)
def __call__(self, attn, hidden_states, encoder_hidden_states=None, attention_mask=None): def __call__(self, attn, hidden_states, encoder_hidden_states=None, attention_mask=None):
if self.slice_size != 1: if self.slice_size != 1 or attn.upcast_attention:
return self._sliced_attn_processor(attn, hidden_states, encoder_hidden_states, attention_mask) return self._sliced_attn_processor(attn, hidden_states, encoder_hidden_states, attention_mask)
residual = hidden_states residual = hidden_states

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
margin: 0; margin: 0;
} }
</style> </style>
<script type="module" crossorigin src="./assets/index-3a8b43e1.js"></script> <script type="module" crossorigin src="./assets/index-e2437518.js"></script>
</head> </head>
<body dir="ltr"> <body dir="ltr">

View File

@ -1 +1 @@
__version__ = "3.0.0rc2" __version__ = "3.0.0"

View File

@ -2,11 +2,10 @@
import requests import requests
from ldm.invoke import __app_name__, __version__ from invokeai.version import __version__
local_version = str(__version__).replace("-", "") local_version = str(__version__).replace("-", "")
package_name = str(__app_name__) package_name = 'InvokeAI'
def get_pypi_versions(package_name=package_name) -> list[str]: def get_pypi_versions(package_name=package_name) -> list[str]:
"""Get the versions of the package from PyPI""" """Get the versions of the package from PyPI"""